summaryrefslogtreecommitdiff
path: root/test/routines/level1/xamax.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/routines/level1/xamax.hpp')
-rw-r--r--test/routines/level1/xamax.hpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/test/routines/level1/xamax.hpp b/test/routines/level1/xamax.hpp
index a22f681f..faffff33 100644
--- a/test/routines/level1/xamax.hpp
+++ b/test/routines/level1/xamax.hpp
@@ -74,12 +74,12 @@ class TestXamax {
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 = Amax<T>(args.n,
- buffers.scalar(), args.imax_offset,
- buffers.x_vec(), args.x_offset, args.x_inc,
+ buffers[0].scalar(), args.imax_offset,
+ buffers[0].x_vec(), args.x_offset, args.x_inc,
&queue_plain, &event);
if (status == StatusCode::kSuccess) { clWaitForEvents(1, &event); clReleaseEvent(event); }
return status;
@@ -87,12 +87,12 @@ class TestXamax {
// 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 = clblasXamax<T>(args.n,
- buffers.scalar, args.imax_offset,
- buffers.x_vec, args.x_offset, args.x_inc,
+ buffers[0].scalar, args.imax_offset,
+ buffers[0].x_vec, args.x_offset, args.x_inc,
1, &queue_plain, 0, nullptr, &event);
clWaitForEvents(1, &event);
return static_cast<StatusCode>(status);
@@ -101,15 +101,15 @@ class TestXamax {
// 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> 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);
+ buffers[0].scalar.Read(queue, args.scalar_size, scalar_cpu);
+ buffers[0].x_vec.Read(queue, args.x_size, x_vec_cpu);
cblasXamax(args.n,
scalar_cpu, args.imax_offset,
x_vec_cpu, args.x_offset, args.x_inc);
- buffers.scalar.Write(queue, args.scalar_size, scalar_cpu);
+ buffers[0].scalar.Write(queue, args.scalar_size, scalar_cpu);
return StatusCode::kSuccess;
}
#endif