From 6b625f8915ce0596d65187bd3a8eb47e91a0084e Mon Sep 17 00:00:00 2001 From: Cedric Nugteren Date: Mon, 10 Apr 2017 22:54:14 +0200 Subject: Added reference implementations for performance-testing against cuBLAS --- test/routines/level2/xhpr2.hpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'test/routines/level2/xhpr2.hpp') diff --git a/test/routines/level2/xhpr2.hpp b/test/routines/level2/xhpr2.hpp index 21f0970a..651989a4 100644 --- a/test/routines/level2/xhpr2.hpp +++ b/test/routines/level2/xhpr2.hpp @@ -117,6 +117,19 @@ class TestXhpr2 { } #endif + // Describes how to run the cuBLAS routine (for correctness/performance comparison) + #ifdef CLBLAST_REF_CUBLAS + static StatusCode RunReference3(const Arguments &args, BuffersCUDA &buffers, Queue &) { + auto status = cublasXhpr2(args.layout, + convertToCUBLAS(args.triangle), + args.n, args.alpha, + buffers.x_vec, args.x_offset, args.x_inc, + buffers.y_vec, args.y_offset, args.y_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 DownloadResult(const Arguments &args, Buffers &buffers, Queue &queue) { std::vector result(args.ap_size, static_cast(0)); -- cgit v1.2.3