diff options
author | Cedric Nugteren <web@cedricnugteren.nl> | 2017-04-10 22:54:14 +0200 |
---|---|---|
committer | Cedric Nugteren <web@cedricnugteren.nl> | 2017-04-10 22:54:14 +0200 |
commit | 6b625f8915ce0596d65187bd3a8eb47e91a0084e (patch) | |
tree | ed16d34e567e52667f74131ff09f0673619dd661 /test/routines/level1/xdot.hpp | |
parent | 22b3ea9256bd197da3cd320560c14e5f3bd7fb86 (diff) |
Added reference implementations for performance-testing against cuBLAS
Diffstat (limited to 'test/routines/level1/xdot.hpp')
-rw-r--r-- | test/routines/level1/xdot.hpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/routines/level1/xdot.hpp b/test/routines/level1/xdot.hpp index cb3d7979..c95b16ef 100644 --- a/test/routines/level1/xdot.hpp +++ b/test/routines/level1/xdot.hpp @@ -110,6 +110,17 @@ class TestXdot { } #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 &) { + auto status = cublasXdot(args.n, + buffers.scalar, args.dot_offset, + buffers.x_vec, args.x_offset, args.x_inc, + buffers.y_vec, args.y_offset, args.y_inc); + if (status == CUBLAS_STATUS_SUCCESS) { return StatusCode::kSuccess; } else { return StatusCode::kUnknownError; } + } + #endif + // Describes how to download the results of the computation (more importantly: which buffer) static std::vector<T> DownloadResult(const Arguments<T> &args, Buffers<T> &buffers, Queue &queue) { std::vector<T> result(args.scalar_size, static_cast<T>(0)); |