diff options
author | Cedric Nugteren <web@cedricnugteren.nl> | 2017-03-05 15:04:16 +0100 |
---|---|---|
committer | Cedric Nugteren <web@cedricnugteren.nl> | 2017-03-05 15:04:16 +0100 |
commit | cdf354f89524ed88d4f9358004e5a8eabd9ce286 (patch) | |
tree | 644b8a67d2e34663335a5a7faa2052e13fe6e1aa /test/routines/level2/xsyr.hpp | |
parent | 7f14b11f1e240f12f5f6bf93cbbeab26001e9a5c (diff) |
Adjusted the test-infrastructure to support testing of batched-versions of routines
Diffstat (limited to 'test/routines/level2/xsyr.hpp')
-rw-r--r-- | test/routines/level2/xsyr.hpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/test/routines/level2/xsyr.hpp b/test/routines/level2/xsyr.hpp index ac4ee1ff..ac2c5e98 100644 --- a/test/routines/level2/xsyr.hpp +++ b/test/routines/level2/xsyr.hpp @@ -76,13 +76,13 @@ class TestXsyr { std::vector<T>&, std::vector<T>&) {} // N/A for this routine // Describes how to run the CLBlast routine - static StatusCode RunRoutine(const Arguments<T> &args, Buffers<T> &buffers, Queue &queue) { + static StatusCode RunRoutine(const Arguments<T> &args, std::vector<Buffers<T>> &buffers, Queue &queue) { auto queue_plain = queue(); auto event = cl_event{}; auto status = Syr(args.layout, args.triangle, args.n, args.alpha, - buffers.x_vec(), args.x_offset, args.x_inc, - buffers.a_mat(), args.a_offset, args.a_ld, + buffers[0].x_vec(), args.x_offset, args.x_inc, + buffers[0].a_mat(), args.a_offset, args.a_ld, &queue_plain, &event); if (status == StatusCode::kSuccess) { clWaitForEvents(1, &event); clReleaseEvent(event); } return status; @@ -90,14 +90,14 @@ class TestXsyr { // Describes how to run the clBLAS routine (for correctness/performance comparison) #ifdef CLBLAST_REF_CLBLAS - static StatusCode RunReference1(const Arguments<T> &args, Buffers<T> &buffers, Queue &queue) { + static StatusCode RunReference1(const Arguments<T> &args, std::vector<Buffers<T>> &buffers, Queue &queue) { auto queue_plain = queue(); auto event = cl_event{}; auto status = clblasXsyr(convertToCLBLAS(args.layout), convertToCLBLAS(args.triangle), args.n, args.alpha, - buffers.x_vec, args.x_offset, args.x_inc, - buffers.a_mat, args.a_offset, args.a_ld, + buffers[0].x_vec, args.x_offset, args.x_inc, + buffers[0].a_mat, args.a_offset, args.a_ld, 1, &queue_plain, 0, nullptr, &event); clWaitForEvents(1, &event); return static_cast<StatusCode>(status); @@ -106,17 +106,17 @@ class TestXsyr { // 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) { + static StatusCode RunReference2(const Arguments<T> &args, std::vector<Buffers<T>> &buffers, Queue &queue) { std::vector<T> a_mat_cpu(args.a_size, static_cast<T>(0)); std::vector<T> x_vec_cpu(args.x_size, static_cast<T>(0)); - buffers.a_mat.Read(queue, args.a_size, a_mat_cpu); - buffers.x_vec.Read(queue, args.x_size, x_vec_cpu); + buffers[0].a_mat.Read(queue, args.a_size, a_mat_cpu); + buffers[0].x_vec.Read(queue, args.x_size, x_vec_cpu); cblasXsyr(convertToCBLAS(args.layout), convertToCBLAS(args.triangle), args.n, args.alpha, x_vec_cpu, args.x_offset, args.x_inc, a_mat_cpu, args.a_offset, args.a_ld); - buffers.a_mat.Write(queue, args.a_size, a_mat_cpu); + buffers[0].a_mat.Write(queue, args.a_size, a_mat_cpu); return StatusCode::kSuccess; } #endif |