diff options
Diffstat (limited to 'test/routines/levelx/xaxpybatched.hpp')
-rw-r--r-- | test/routines/levelx/xaxpybatched.hpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/routines/levelx/xaxpybatched.hpp b/test/routines/levelx/xaxpybatched.hpp index d8b3837c..add6c1e1 100644 --- a/test/routines/levelx/xaxpybatched.hpp +++ b/test/routines/levelx/xaxpybatched.hpp @@ -125,6 +125,19 @@ class TestXaxpyBatched { } #endif + // Describes how to run the cuBLAS routine (for correctness/performance comparison) + #ifdef CLBLAST_REF_CUBLAS + static StatusCode RunReference3(const Arguments<T> &args, BuffersCUDA<T> &buffers, Queue &) { + for (auto batch = size_t{0}; batch < args.batch_count; ++batch) { + auto status = cublasXaxpy(args.n, args.alphas[batch], + buffers.x_vec, args.x_offsets[batch], args.x_inc, + buffers.y_vec, args.y_offsets[batch], args.y_inc); + if (status != CUBLAS_STATUS_SUCCESS) { return StatusCode::kUnknownError; } + } + return StatusCode::kSuccess; + } + #endif + // Describes how to download the results of the computation static std::vector<T> DownloadResult(const Arguments<T> &args, Buffers<T> &buffers, Queue &queue) { std::vector<T> result(args.y_size, static_cast<T>(0)); |