diff options
Diffstat (limited to 'test/routines/level2/xhpr.hpp')
-rw-r--r-- | test/routines/level2/xhpr.hpp | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/test/routines/level2/xhpr.hpp b/test/routines/level2/xhpr.hpp index 88bae86b..f9d580cd 100644 --- a/test/routines/level2/xhpr.hpp +++ b/test/routines/level2/xhpr.hpp @@ -16,15 +16,7 @@ #ifndef CLBLAST_TEST_ROUTINES_XHPR_H_ #define CLBLAST_TEST_ROUTINES_XHPR_H_ -#include <vector> -#include <string> - -#ifdef CLBLAST_REF_CLBLAS - #include "test/wrapper_clblas.hpp" -#endif -#ifdef CLBLAST_REF_CBLAS - #include "test/wrapper_cblas.hpp" -#endif +#include "test/routines/common.hpp" namespace clblast { // ================================================================================================= @@ -118,6 +110,18 @@ class TestXhpr { } #endif + // Describes how to run the cuBLAS routine (for correctness/performance comparison) + #ifdef CLBLAST_REF_CUBLAS + static StatusCode RunReference3(const Arguments<U> &args, BuffersCUDA<T> &buffers, Queue &) { + auto status = cublasXhpr(reinterpret_cast<cublasHandle_t>(args.cublas_handle), args.layout, + convertToCUBLAS(args.triangle), + args.n, args.alpha, + buffers.x_vec, args.x_offset, args.x_inc, + buffers.ap_mat, args.ap_offset); + 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<U> &args, Buffers<T> &buffers, Queue &queue) { std::vector<T> result(args.ap_size, static_cast<T>(0)); |