summaryrefslogtreecommitdiff
path: root/test/routines/level1/xnrm2.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/routines/level1/xnrm2.hpp')
-rw-r--r--test/routines/level1/xnrm2.hpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/test/routines/level1/xnrm2.hpp b/test/routines/level1/xnrm2.hpp
index ce33fe59..cb1ec683 100644
--- a/test/routines/level1/xnrm2.hpp
+++ b/test/routines/level1/xnrm2.hpp
@@ -43,6 +43,8 @@ class TestXnrm2 {
kArgXInc,
kArgXOffset, kArgNrm2Offset};
}
+ static std::vector<std::string> BuffersIn() { return {kBufVecX, 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) {
@@ -101,15 +103,10 @@ class TestXnrm2 {
// 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));
- buffers.scalar.Read(queue, args.scalar_size, scalar_cpu);
- buffers.x_vec.Read(queue, args.x_size, x_vec_cpu);
+ static StatusCode RunReference2(const Arguments<T> &args, BuffersHost<T> &buffers_host, Queue &) {
cblasXnrm2(args.n,
- scalar_cpu, args.nrm2_offset,
- x_vec_cpu, args.x_offset, args.x_inc);
- buffers.scalar.Write(queue, args.scalar_size, scalar_cpu);
+ buffers_host.scalar, args.nrm2_offset,
+ buffers_host.x_vec, args.x_offset, args.x_inc);
return StatusCode::kSuccess;
}
#endif