summaryrefslogtreecommitdiff
path: root/test/routines/level1/xdotc.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/routines/level1/xdotc.hpp')
-rw-r--r--test/routines/level1/xdotc.hpp17
1 files changed, 6 insertions, 11 deletions
diff --git a/test/routines/level1/xdotc.hpp b/test/routines/level1/xdotc.hpp
index 96d97dc4..2cc71b93 100644
--- a/test/routines/level1/xdotc.hpp
+++ b/test/routines/level1/xdotc.hpp
@@ -43,6 +43,8 @@ class TestXdotc {
kArgXInc, kArgYInc,
kArgXOffset, kArgYOffset, kArgDotOffset};
}
+ static std::vector<std::string> BuffersIn() { return {kBufVecX, kBufVecY, kBufScalar}; }
+ static std::vector<std::string> BuffersOut() { return {kBufScalar}; }
// Describes how to obtain the sizes of the buffers
static size_t GetSizeX(const Arguments<T> &args) {
@@ -107,18 +109,11 @@ class TestXdotc {
// Describes how to run the CPU BLAS routine (for correctness/performance comparison)
#ifdef CLBLAST_REF_CBLAS
- static StatusCode RunReference2(const Arguments<T> &args, Buffers<T> &buffers, Queue &queue) {
- std::vector<T> scalar_cpu(args.scalar_size, static_cast<T>(0));
- std::vector<T> x_vec_cpu(args.x_size, static_cast<T>(0));
- std::vector<T> y_vec_cpu(args.y_size, static_cast<T>(0));
- buffers.scalar.Read(queue, args.scalar_size, scalar_cpu);
- buffers.x_vec.Read(queue, args.x_size, x_vec_cpu);
- buffers.y_vec.Read(queue, args.y_size, y_vec_cpu);
+ static StatusCode RunReference2(const Arguments<T> &args, BuffersHost<T> &buffers_host, Queue &) {
cblasXdotc(args.n,
- scalar_cpu, args.dot_offset,
- x_vec_cpu, args.x_offset, args.x_inc,
- y_vec_cpu, args.y_offset, args.y_inc);
- buffers.scalar.Write(queue, args.scalar_size, scalar_cpu);
+ buffers_host.scalar, args.dot_offset,
+ buffers_host.x_vec, args.x_offset, args.x_inc,
+ buffers_host.y_vec, args.y_offset, args.y_inc);
return StatusCode::kSuccess;
}
#endif