mirror of
https://github.com/CNugteren/CLBlast.git
synced 2024-07-15 19:05:44 +02:00
Merge pull request #26 from CNugteren/routine_definitions
Generated API interface and implementations
This commit is contained in:
commit
42db8ea968
|
@ -90,7 +90,7 @@ enum class Precision { kHalf = 16, kSingle = 32, kDouble = 64,
|
|||
// Swap two vectors: SSWAP/DSWAP/CSWAP/ZSWAP
|
||||
template <typename T>
|
||||
StatusCode Swap(const size_t n,
|
||||
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
|
||||
cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
|
||||
cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
|
||||
|
@ -144,7 +144,7 @@ StatusCode Dotc(const size_t n,
|
|||
// BLAS level-2 (matrix-vector) routines
|
||||
// =================================================================================================
|
||||
|
||||
// Templated-precision generalized matrix-vector multiplication: SGEMV/DGEMV/CGEMV/ZGEMV
|
||||
// General matrix-vector multiplication: SGEMV/DGEMV/CGEMV/ZGEMV
|
||||
template <typename T>
|
||||
StatusCode Gemv(const Layout layout, const Transpose a_transpose,
|
||||
const size_t m, const size_t n,
|
||||
|
@ -155,7 +155,18 @@ StatusCode Gemv(const Layout layout, const Transpose a_transpose,
|
|||
cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
|
||||
// Templated-precision hermitian matrix-vector multiplication: SHEMV/DHEMV
|
||||
// General banded matrix-vector multiplication: SGBMV/DGBMV/CGBMV/ZGBMV
|
||||
template <typename T>
|
||||
StatusCode Gbmv(const Layout layout, const Transpose a_transpose,
|
||||
const size_t m, const size_t n, const size_t kl, const size_t ku,
|
||||
const T alpha,
|
||||
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
|
||||
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
|
||||
const T beta,
|
||||
cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
|
||||
// Hermitian matrix-vector multiplication: CHEMV/ZHEMV
|
||||
template <typename T>
|
||||
StatusCode Hemv(const Layout layout, const Triangle triangle,
|
||||
const size_t n,
|
||||
|
@ -166,7 +177,29 @@ StatusCode Hemv(const Layout layout, const Triangle triangle,
|
|||
cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
|
||||
// Templated-precision symmetric matrix-vector multiplication: SSYMV/DSYMV
|
||||
// Hermitian banded matrix-vector multiplication: CHBMV/ZHBMV
|
||||
template <typename T>
|
||||
StatusCode Hbmv(const Layout layout, const Triangle triangle,
|
||||
const size_t n, const size_t k,
|
||||
const T alpha,
|
||||
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
|
||||
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
|
||||
const T beta,
|
||||
cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
|
||||
// Hermitian packed matrix-vector multiplication: CHPMV/ZHPMV
|
||||
template <typename T>
|
||||
StatusCode Hpmv(const Layout layout, const Triangle triangle,
|
||||
const size_t n,
|
||||
const T alpha,
|
||||
const cl_mem ap_buffer, const size_t ap_offset,
|
||||
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
|
||||
const T beta,
|
||||
cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
|
||||
// Symmetric matrix-vector multiplication: SSYMV/DSYMV
|
||||
template <typename T>
|
||||
StatusCode Symv(const Layout layout, const Triangle triangle,
|
||||
const size_t n,
|
||||
|
@ -177,11 +210,187 @@ StatusCode Symv(const Layout layout, const Triangle triangle,
|
|||
cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
|
||||
// Symmetric banded matrix-vector multiplication: SSBMV/DSBMV
|
||||
template <typename T>
|
||||
StatusCode Sbmv(const Layout layout, const Triangle triangle,
|
||||
const size_t n, const size_t k,
|
||||
const T alpha,
|
||||
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
|
||||
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
|
||||
const T beta,
|
||||
cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
|
||||
// Symmetric packed matrix-vector multiplication: SSPMV/DSPMV
|
||||
template <typename T>
|
||||
StatusCode Spmv(const Layout layout, const Triangle triangle,
|
||||
const size_t n,
|
||||
const T alpha,
|
||||
const cl_mem ap_buffer, const size_t ap_offset,
|
||||
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
|
||||
const T beta,
|
||||
cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
|
||||
// Triangular matrix-vector multiplication: STRMV/DTRMV/CTRMV/ZTRMV
|
||||
template <typename T>
|
||||
StatusCode Trmv(const Layout layout, const Triangle triangle, const Transpose a_transpose, const Diagonal diagonal,
|
||||
const size_t n,
|
||||
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
|
||||
cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
|
||||
// Triangular banded matrix-vector multiplication: STBMV/DTBMV/CTBMV/ZTBMV
|
||||
template <typename T>
|
||||
StatusCode Tbmv(const Layout layout, const Triangle triangle, const Transpose a_transpose, const Diagonal diagonal,
|
||||
const size_t n, const size_t k,
|
||||
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
|
||||
cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
|
||||
// Triangular packed matrix-vector multiplication: STPMV/DTPMV/CTPMV/ZTPMV
|
||||
template <typename T>
|
||||
StatusCode Tpmv(const Layout layout, const Triangle triangle, const Transpose a_transpose, const Diagonal diagonal,
|
||||
const size_t n,
|
||||
const cl_mem ap_buffer, const size_t ap_offset,
|
||||
cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
|
||||
// Solves a triangular system of equations: STRSV/DTRSV/CTRSV/ZTRSV
|
||||
template <typename T>
|
||||
StatusCode Trsv(const Layout layout, const Triangle triangle, const Transpose a_transpose, const Diagonal diagonal,
|
||||
const size_t n,
|
||||
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
|
||||
cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
|
||||
// Solves a banded triangular system of equations: STBSV/DTBSV/CTBSV/ZTBSV
|
||||
template <typename T>
|
||||
StatusCode Tbsv(const Layout layout, const Triangle triangle, const Transpose a_transpose, const Diagonal diagonal,
|
||||
const size_t n, const size_t k,
|
||||
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
|
||||
cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
|
||||
// Solves a packed triangular system of equations: STPSV/DTPSV/CTPSV/ZTPSV
|
||||
template <typename T>
|
||||
StatusCode Tpsv(const Layout layout, const Triangle triangle, const Transpose a_transpose, const Diagonal diagonal,
|
||||
const size_t n,
|
||||
const cl_mem ap_buffer, const size_t ap_offset,
|
||||
cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
|
||||
// General rank-1 matrix update: SGER/DGER
|
||||
template <typename T>
|
||||
StatusCode Ger(const Layout layout,
|
||||
const size_t m, const size_t n,
|
||||
const T alpha,
|
||||
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
|
||||
const cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
|
||||
cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
|
||||
// General rank-1 complex matrix update: CGERU/ZGERU
|
||||
template <typename T>
|
||||
StatusCode Geru(const Layout layout,
|
||||
const size_t m, const size_t n,
|
||||
const T alpha,
|
||||
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
|
||||
const cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
|
||||
cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
|
||||
// General rank-1 complex conjugated matrix update: CGERC/ZGERC
|
||||
template <typename T>
|
||||
StatusCode Gerc(const Layout layout,
|
||||
const size_t m, const size_t n,
|
||||
const T alpha,
|
||||
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
|
||||
const cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
|
||||
cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
|
||||
// Hermitian rank-1 matrix update: CHER/ZHER
|
||||
template <typename T>
|
||||
StatusCode Her(const Layout layout, const Triangle triangle,
|
||||
const size_t n,
|
||||
const T alpha,
|
||||
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
|
||||
cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
|
||||
// Hermitian packed rank-1 matrix update: CHPR/ZHPR
|
||||
template <typename T>
|
||||
StatusCode Hpr(const Layout layout, const Triangle triangle,
|
||||
const size_t n,
|
||||
const T alpha,
|
||||
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
|
||||
cl_mem ap_buffer, const size_t ap_offset,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
|
||||
// Hermitian rank-2 matrix update: CHER2/ZHER2
|
||||
template <typename T>
|
||||
StatusCode Her2(const Layout layout, const Triangle triangle,
|
||||
const size_t n,
|
||||
const T alpha,
|
||||
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
|
||||
const cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
|
||||
cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
|
||||
// Hermitian packed rank-2 matrix update: CHPR2/ZHPR2
|
||||
template <typename T>
|
||||
StatusCode Hpr2(const Layout layout, const Triangle triangle,
|
||||
const size_t n,
|
||||
const T alpha,
|
||||
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
|
||||
const cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
|
||||
cl_mem ap_buffer, const size_t ap_offset,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
|
||||
// Symmetric rank-1 matrix update: SSYR/DSYR
|
||||
template <typename T>
|
||||
StatusCode Syr(const Layout layout, const Triangle triangle,
|
||||
const size_t n,
|
||||
const T alpha,
|
||||
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
|
||||
cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
|
||||
// Symmetric packed rank-1 matrix update: SSPR/DSPR
|
||||
template <typename T>
|
||||
StatusCode Spr(const Layout layout, const Triangle triangle,
|
||||
const size_t n,
|
||||
const T alpha,
|
||||
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
|
||||
cl_mem ap_buffer, const size_t ap_offset,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
|
||||
// Symmetric rank-2 matrix update: SSYR2/DSYR2
|
||||
template <typename T>
|
||||
StatusCode Syr2(const Layout layout, const Triangle triangle,
|
||||
const size_t n,
|
||||
const T alpha,
|
||||
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
|
||||
const cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
|
||||
cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
|
||||
// Symmetric packed rank-2 matrix update: SSPR2/DSPR2
|
||||
template <typename T>
|
||||
StatusCode Spr2(const Layout layout, const Triangle triangle,
|
||||
const size_t n,
|
||||
const T alpha,
|
||||
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
|
||||
const cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
|
||||
cl_mem ap_buffer, const size_t ap_offset,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
|
||||
// =================================================================================================
|
||||
// BLAS level-3 (matrix-matrix) routines
|
||||
// =================================================================================================
|
||||
|
||||
// Templated-precision generalized matrix-matrix multiplication: SGEMM/DGEMM/CGEMM/ZGEMM
|
||||
// General matrix-matrix multiplication: SGEMM/DGEMM/CGEMM/ZGEMM
|
||||
template <typename T>
|
||||
StatusCode Gemm(const Layout layout, const Transpose a_transpose, const Transpose b_transpose,
|
||||
const size_t m, const size_t n, const size_t k,
|
||||
|
@ -192,7 +401,7 @@ StatusCode Gemm(const Layout layout, const Transpose a_transpose, const Transpos
|
|||
cl_mem c_buffer, const size_t c_offset, const size_t c_ld,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
|
||||
// Templated-precision symmetric matrix-matrix multiplication: SSYMM/DSYMM/CSYMM/ZSYMM
|
||||
// Symmetric matrix-matrix multiplication: SSYMM/DSYMM/CSYMM/ZSYMM
|
||||
template <typename T>
|
||||
StatusCode Symm(const Layout layout, const Side side, const Triangle triangle,
|
||||
const size_t m, const size_t n,
|
||||
|
@ -203,7 +412,7 @@ StatusCode Symm(const Layout layout, const Side side, const Triangle triangle,
|
|||
cl_mem c_buffer, const size_t c_offset, const size_t c_ld,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
|
||||
// Templated-precision hermitian matrix-matrix multiplication: CHEMM/ZHEMM
|
||||
// Hermitian matrix-matrix multiplication: CHEMM/ZHEMM
|
||||
template <typename T>
|
||||
StatusCode Hemm(const Layout layout, const Side side, const Triangle triangle,
|
||||
const size_t m, const size_t n,
|
||||
|
@ -214,7 +423,7 @@ StatusCode Hemm(const Layout layout, const Side side, const Triangle triangle,
|
|||
cl_mem c_buffer, const size_t c_offset, const size_t c_ld,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
|
||||
// Templated-precision rank-K update of a symmetric matrix: SSYRK/DSYRK/CSYRK/ZSYRK
|
||||
// Rank-K update of a symmetric matrix: SSYRK/DSYRK/CSYRK/ZSYRK
|
||||
template <typename T>
|
||||
StatusCode Syrk(const Layout layout, const Triangle triangle, const Transpose a_transpose,
|
||||
const size_t n, const size_t k,
|
||||
|
@ -224,7 +433,7 @@ StatusCode Syrk(const Layout layout, const Triangle triangle, const Transpose a_
|
|||
cl_mem c_buffer, const size_t c_offset, const size_t c_ld,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
|
||||
// Templated-precision rank-K update of a hermitian matrix: CHERK/ZHERK
|
||||
// Rank-K update of a hermitian matrix: CHERK/ZHERK
|
||||
template <typename T>
|
||||
StatusCode Herk(const Layout layout, const Triangle triangle, const Transpose a_transpose,
|
||||
const size_t n, const size_t k,
|
||||
|
@ -234,7 +443,7 @@ StatusCode Herk(const Layout layout, const Triangle triangle, const Transpose a_
|
|||
cl_mem c_buffer, const size_t c_offset, const size_t c_ld,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
|
||||
// Templated-precision rank-2K update of a symmetric matrix: SSYR2K/DSYR2K/CSYR2K/ZSYR2K
|
||||
// Rank-2K update of a symmetric matrix: SSYR2K/DSYR2K/CSYR2K/ZSYR2K
|
||||
template <typename T>
|
||||
StatusCode Syr2k(const Layout layout, const Triangle triangle, const Transpose ab_transpose,
|
||||
const size_t n, const size_t k,
|
||||
|
@ -245,7 +454,7 @@ StatusCode Syr2k(const Layout layout, const Triangle triangle, const Transpose a
|
|||
cl_mem c_buffer, const size_t c_offset, const size_t c_ld,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
|
||||
// Templated-precision rank-2K update of a hermitian matrix: CHER2K/ZHER2K
|
||||
// Rank-2K update of a hermitian matrix: CHER2K/ZHER2K
|
||||
template <typename T, typename U>
|
||||
StatusCode Her2k(const Layout layout, const Triangle triangle, const Transpose ab_transpose,
|
||||
const size_t n, const size_t k,
|
||||
|
@ -256,27 +465,23 @@ StatusCode Her2k(const Layout layout, const Triangle triangle, const Transpose a
|
|||
cl_mem c_buffer, const size_t c_offset, const size_t c_ld,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
|
||||
// Templated-precision triangular matrix-matrix multiplication: STRMM/DTRMM/CTRMM/ZTRMM
|
||||
// Triangular matrix-matrix multiplication: STRMM/DTRMM/CTRMM/ZTRMM
|
||||
template <typename T>
|
||||
StatusCode Trmm(const Layout layout, const Side side, const Triangle triangle,
|
||||
const Transpose a_transpose, const Diagonal diagonal,
|
||||
StatusCode Trmm(const Layout layout, const Side side, const Triangle triangle, const Transpose a_transpose, const Diagonal diagonal,
|
||||
const size_t m, const size_t n,
|
||||
const T alpha,
|
||||
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
|
||||
cl_mem b_buffer, const size_t b_offset, const size_t b_ld,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
|
||||
// Templated-precision matrix equation solver: STRSM/DTRSM/CTRSM/ZTRSM
|
||||
/*
|
||||
// Solves a triangular system of equations: STRSM/DTRSM/CTRSM/ZTRSM
|
||||
template <typename T>
|
||||
StatusCode Trsm(const Layout layout, const Side side, const Triangle triangle,
|
||||
const Transpose a_transpose, const Diagonal diagonal,
|
||||
StatusCode Trsm(const Layout layout, const Side side, const Triangle triangle, const Transpose a_transpose, const Diagonal diagonal,
|
||||
const size_t m, const size_t n,
|
||||
const T alpha,
|
||||
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
|
||||
cl_mem b_buffer, const size_t b_offset, const size_t b_ld,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
*/
|
||||
|
||||
// =================================================================================================
|
||||
} // namespace clblast
|
||||
|
|
|
@ -85,19 +85,19 @@ typedef enum Precision_ { kHalf = 16, kSingle = 32, kDouble = 64,
|
|||
|
||||
// Swap two vectors: SSWAP/DSWAP/CSWAP/ZSWAP
|
||||
StatusCode CLBlastSswap(const size_t n,
|
||||
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
|
||||
cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
|
||||
cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
StatusCode CLBlastDswap(const size_t n,
|
||||
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
|
||||
cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
|
||||
cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
StatusCode CLBlastCswap(const size_t n,
|
||||
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
|
||||
cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
|
||||
cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
StatusCode CLBlastZswap(const size_t n,
|
||||
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
|
||||
cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
|
||||
cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
|
||||
|
@ -199,7 +199,7 @@ StatusCode CLBlastZdotc(const size_t n,
|
|||
// BLAS level-2 (matrix-vector) routines
|
||||
// =================================================================================================
|
||||
|
||||
// Generalized matrix-vector multiplication: SGEMV/DGEMV/CGEMV/ZGEMV
|
||||
// General matrix-vector multiplication: SGEMV/DGEMV/CGEMV/ZGEMV
|
||||
StatusCode CLBlastSgemv(const Layout layout, const Transpose a_transpose,
|
||||
const size_t m, const size_t n,
|
||||
const float alpha,
|
||||
|
@ -233,6 +233,40 @@ StatusCode CLBlastZgemv(const Layout layout, const Transpose a_transpose,
|
|||
cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
|
||||
// General banded matrix-vector multiplication: SGBMV/DGBMV/CGBMV/ZGBMV
|
||||
StatusCode CLBlastSgbmv(const Layout layout, const Transpose a_transpose,
|
||||
const size_t m, const size_t n, const size_t kl, const size_t ku,
|
||||
const float alpha,
|
||||
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
|
||||
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
|
||||
const float beta,
|
||||
cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
StatusCode CLBlastDgbmv(const Layout layout, const Transpose a_transpose,
|
||||
const size_t m, const size_t n, const size_t kl, const size_t ku,
|
||||
const double alpha,
|
||||
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
|
||||
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
|
||||
const double beta,
|
||||
cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
StatusCode CLBlastCgbmv(const Layout layout, const Transpose a_transpose,
|
||||
const size_t m, const size_t n, const size_t kl, const size_t ku,
|
||||
const cl_float2 alpha,
|
||||
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
|
||||
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
|
||||
const cl_float2 beta,
|
||||
cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
StatusCode CLBlastZgbmv(const Layout layout, const Transpose a_transpose,
|
||||
const size_t m, const size_t n, const size_t kl, const size_t ku,
|
||||
const cl_double2 alpha,
|
||||
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
|
||||
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
|
||||
const cl_double2 beta,
|
||||
cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
|
||||
// Hermitian matrix-vector multiplication: CHEMV/ZHEMV
|
||||
StatusCode CLBlastChemv(const Layout layout, const Triangle triangle,
|
||||
const size_t n,
|
||||
|
@ -251,6 +285,42 @@ StatusCode CLBlastZhemv(const Layout layout, const Triangle triangle,
|
|||
cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
|
||||
// Hermitian banded matrix-vector multiplication: CHBMV/ZHBMV
|
||||
StatusCode CLBlastChbmv(const Layout layout, const Triangle triangle,
|
||||
const size_t n, const size_t k,
|
||||
const cl_float2 alpha,
|
||||
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
|
||||
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
|
||||
const cl_float2 beta,
|
||||
cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
StatusCode CLBlastZhbmv(const Layout layout, const Triangle triangle,
|
||||
const size_t n, const size_t k,
|
||||
const cl_double2 alpha,
|
||||
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
|
||||
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
|
||||
const cl_double2 beta,
|
||||
cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
|
||||
// Hermitian packed matrix-vector multiplication: CHPMV/ZHPMV
|
||||
StatusCode CLBlastChpmv(const Layout layout, const Triangle triangle,
|
||||
const size_t n,
|
||||
const cl_float2 alpha,
|
||||
const cl_mem ap_buffer, const size_t ap_offset,
|
||||
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
|
||||
const cl_float2 beta,
|
||||
cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
StatusCode CLBlastZhpmv(const Layout layout, const Triangle triangle,
|
||||
const size_t n,
|
||||
const cl_double2 alpha,
|
||||
const cl_mem ap_buffer, const size_t ap_offset,
|
||||
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
|
||||
const cl_double2 beta,
|
||||
cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
|
||||
// Symmetric matrix-vector multiplication: SSYMV/DSYMV
|
||||
StatusCode CLBlastSsymv(const Layout layout, const Triangle triangle,
|
||||
const size_t n,
|
||||
|
@ -269,11 +339,347 @@ StatusCode CLBlastDsymv(const Layout layout, const Triangle triangle,
|
|||
cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
|
||||
// Symmetric banded matrix-vector multiplication: SSBMV/DSBMV
|
||||
StatusCode CLBlastSsbmv(const Layout layout, const Triangle triangle,
|
||||
const size_t n, const size_t k,
|
||||
const float alpha,
|
||||
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
|
||||
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
|
||||
const float beta,
|
||||
cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
StatusCode CLBlastDsbmv(const Layout layout, const Triangle triangle,
|
||||
const size_t n, const size_t k,
|
||||
const double alpha,
|
||||
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
|
||||
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
|
||||
const double beta,
|
||||
cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
|
||||
// Symmetric packed matrix-vector multiplication: SSPMV/DSPMV
|
||||
StatusCode CLBlastSspmv(const Layout layout, const Triangle triangle,
|
||||
const size_t n,
|
||||
const float alpha,
|
||||
const cl_mem ap_buffer, const size_t ap_offset,
|
||||
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
|
||||
const float beta,
|
||||
cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
StatusCode CLBlastDspmv(const Layout layout, const Triangle triangle,
|
||||
const size_t n,
|
||||
const double alpha,
|
||||
const cl_mem ap_buffer, const size_t ap_offset,
|
||||
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
|
||||
const double beta,
|
||||
cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
|
||||
// Triangular matrix-vector multiplication: STRMV/DTRMV/CTRMV/ZTRMV
|
||||
StatusCode CLBlastStrmv(const Layout layout, const Triangle triangle, const Transpose a_transpose, const Diagonal diagonal,
|
||||
const size_t n,
|
||||
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
|
||||
cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
StatusCode CLBlastDtrmv(const Layout layout, const Triangle triangle, const Transpose a_transpose, const Diagonal diagonal,
|
||||
const size_t n,
|
||||
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
|
||||
cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
StatusCode CLBlastCtrmv(const Layout layout, const Triangle triangle, const Transpose a_transpose, const Diagonal diagonal,
|
||||
const size_t n,
|
||||
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
|
||||
cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
StatusCode CLBlastZtrmv(const Layout layout, const Triangle triangle, const Transpose a_transpose, const Diagonal diagonal,
|
||||
const size_t n,
|
||||
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
|
||||
cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
|
||||
// Triangular banded matrix-vector multiplication: STBMV/DTBMV/CTBMV/ZTBMV
|
||||
StatusCode CLBlastStbmv(const Layout layout, const Triangle triangle, const Transpose a_transpose, const Diagonal diagonal,
|
||||
const size_t n, const size_t k,
|
||||
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
|
||||
cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
StatusCode CLBlastDtbmv(const Layout layout, const Triangle triangle, const Transpose a_transpose, const Diagonal diagonal,
|
||||
const size_t n, const size_t k,
|
||||
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
|
||||
cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
StatusCode CLBlastCtbmv(const Layout layout, const Triangle triangle, const Transpose a_transpose, const Diagonal diagonal,
|
||||
const size_t n, const size_t k,
|
||||
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
|
||||
cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
StatusCode CLBlastZtbmv(const Layout layout, const Triangle triangle, const Transpose a_transpose, const Diagonal diagonal,
|
||||
const size_t n, const size_t k,
|
||||
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
|
||||
cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
|
||||
// Triangular packed matrix-vector multiplication: STPMV/DTPMV/CTPMV/ZTPMV
|
||||
StatusCode CLBlastStpmv(const Layout layout, const Triangle triangle, const Transpose a_transpose, const Diagonal diagonal,
|
||||
const size_t n,
|
||||
const cl_mem ap_buffer, const size_t ap_offset,
|
||||
cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
StatusCode CLBlastDtpmv(const Layout layout, const Triangle triangle, const Transpose a_transpose, const Diagonal diagonal,
|
||||
const size_t n,
|
||||
const cl_mem ap_buffer, const size_t ap_offset,
|
||||
cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
StatusCode CLBlastCtpmv(const Layout layout, const Triangle triangle, const Transpose a_transpose, const Diagonal diagonal,
|
||||
const size_t n,
|
||||
const cl_mem ap_buffer, const size_t ap_offset,
|
||||
cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
StatusCode CLBlastZtpmv(const Layout layout, const Triangle triangle, const Transpose a_transpose, const Diagonal diagonal,
|
||||
const size_t n,
|
||||
const cl_mem ap_buffer, const size_t ap_offset,
|
||||
cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
|
||||
// Solves a triangular system of equations: STRSV/DTRSV/CTRSV/ZTRSV
|
||||
StatusCode CLBlastStrsv(const Layout layout, const Triangle triangle, const Transpose a_transpose, const Diagonal diagonal,
|
||||
const size_t n,
|
||||
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
|
||||
cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
StatusCode CLBlastDtrsv(const Layout layout, const Triangle triangle, const Transpose a_transpose, const Diagonal diagonal,
|
||||
const size_t n,
|
||||
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
|
||||
cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
StatusCode CLBlastCtrsv(const Layout layout, const Triangle triangle, const Transpose a_transpose, const Diagonal diagonal,
|
||||
const size_t n,
|
||||
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
|
||||
cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
StatusCode CLBlastZtrsv(const Layout layout, const Triangle triangle, const Transpose a_transpose, const Diagonal diagonal,
|
||||
const size_t n,
|
||||
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
|
||||
cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
|
||||
// Solves a banded triangular system of equations: STBSV/DTBSV/CTBSV/ZTBSV
|
||||
StatusCode CLBlastStbsv(const Layout layout, const Triangle triangle, const Transpose a_transpose, const Diagonal diagonal,
|
||||
const size_t n, const size_t k,
|
||||
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
|
||||
cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
StatusCode CLBlastDtbsv(const Layout layout, const Triangle triangle, const Transpose a_transpose, const Diagonal diagonal,
|
||||
const size_t n, const size_t k,
|
||||
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
|
||||
cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
StatusCode CLBlastCtbsv(const Layout layout, const Triangle triangle, const Transpose a_transpose, const Diagonal diagonal,
|
||||
const size_t n, const size_t k,
|
||||
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
|
||||
cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
StatusCode CLBlastZtbsv(const Layout layout, const Triangle triangle, const Transpose a_transpose, const Diagonal diagonal,
|
||||
const size_t n, const size_t k,
|
||||
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
|
||||
cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
|
||||
// Solves a packed triangular system of equations: STPSV/DTPSV/CTPSV/ZTPSV
|
||||
StatusCode CLBlastStpsv(const Layout layout, const Triangle triangle, const Transpose a_transpose, const Diagonal diagonal,
|
||||
const size_t n,
|
||||
const cl_mem ap_buffer, const size_t ap_offset,
|
||||
cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
StatusCode CLBlastDtpsv(const Layout layout, const Triangle triangle, const Transpose a_transpose, const Diagonal diagonal,
|
||||
const size_t n,
|
||||
const cl_mem ap_buffer, const size_t ap_offset,
|
||||
cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
StatusCode CLBlastCtpsv(const Layout layout, const Triangle triangle, const Transpose a_transpose, const Diagonal diagonal,
|
||||
const size_t n,
|
||||
const cl_mem ap_buffer, const size_t ap_offset,
|
||||
cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
StatusCode CLBlastZtpsv(const Layout layout, const Triangle triangle, const Transpose a_transpose, const Diagonal diagonal,
|
||||
const size_t n,
|
||||
const cl_mem ap_buffer, const size_t ap_offset,
|
||||
cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
|
||||
// General rank-1 matrix update: SGER/DGER
|
||||
StatusCode CLBlastSger(const Layout layout,
|
||||
const size_t m, const size_t n,
|
||||
const float alpha,
|
||||
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
|
||||
const cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
|
||||
cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
StatusCode CLBlastDger(const Layout layout,
|
||||
const size_t m, const size_t n,
|
||||
const double alpha,
|
||||
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
|
||||
const cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
|
||||
cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
|
||||
// General rank-1 complex matrix update: CGERU/ZGERU
|
||||
StatusCode CLBlastCgeru(const Layout layout,
|
||||
const size_t m, const size_t n,
|
||||
const cl_float2 alpha,
|
||||
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
|
||||
const cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
|
||||
cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
StatusCode CLBlastZgeru(const Layout layout,
|
||||
const size_t m, const size_t n,
|
||||
const cl_double2 alpha,
|
||||
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
|
||||
const cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
|
||||
cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
|
||||
// General rank-1 complex conjugated matrix update: CGERC/ZGERC
|
||||
StatusCode CLBlastCgerc(const Layout layout,
|
||||
const size_t m, const size_t n,
|
||||
const cl_float2 alpha,
|
||||
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
|
||||
const cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
|
||||
cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
StatusCode CLBlastZgerc(const Layout layout,
|
||||
const size_t m, const size_t n,
|
||||
const cl_double2 alpha,
|
||||
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
|
||||
const cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
|
||||
cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
|
||||
// Hermitian rank-1 matrix update: CHER/ZHER
|
||||
StatusCode CLBlastCher(const Layout layout, const Triangle triangle,
|
||||
const size_t n,
|
||||
const float alpha,
|
||||
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
|
||||
cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
StatusCode CLBlastZher(const Layout layout, const Triangle triangle,
|
||||
const size_t n,
|
||||
const double alpha,
|
||||
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
|
||||
cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
|
||||
// Hermitian packed rank-1 matrix update: CHPR/ZHPR
|
||||
StatusCode CLBlastChpr(const Layout layout, const Triangle triangle,
|
||||
const size_t n,
|
||||
const float alpha,
|
||||
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
|
||||
cl_mem ap_buffer, const size_t ap_offset,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
StatusCode CLBlastZhpr(const Layout layout, const Triangle triangle,
|
||||
const size_t n,
|
||||
const double alpha,
|
||||
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
|
||||
cl_mem ap_buffer, const size_t ap_offset,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
|
||||
// Hermitian rank-2 matrix update: CHER2/ZHER2
|
||||
StatusCode CLBlastCher2(const Layout layout, const Triangle triangle,
|
||||
const size_t n,
|
||||
const cl_float2 alpha,
|
||||
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
|
||||
const cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
|
||||
cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
StatusCode CLBlastZher2(const Layout layout, const Triangle triangle,
|
||||
const size_t n,
|
||||
const cl_double2 alpha,
|
||||
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
|
||||
const cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
|
||||
cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
|
||||
// Hermitian packed rank-2 matrix update: CHPR2/ZHPR2
|
||||
StatusCode CLBlastChpr2(const Layout layout, const Triangle triangle,
|
||||
const size_t n,
|
||||
const cl_float2 alpha,
|
||||
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
|
||||
const cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
|
||||
cl_mem ap_buffer, const size_t ap_offset,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
StatusCode CLBlastZhpr2(const Layout layout, const Triangle triangle,
|
||||
const size_t n,
|
||||
const cl_double2 alpha,
|
||||
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
|
||||
const cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
|
||||
cl_mem ap_buffer, const size_t ap_offset,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
|
||||
// Symmetric rank-1 matrix update: SSYR/DSYR
|
||||
StatusCode CLBlastSsyr(const Layout layout, const Triangle triangle,
|
||||
const size_t n,
|
||||
const float alpha,
|
||||
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
|
||||
cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
StatusCode CLBlastDsyr(const Layout layout, const Triangle triangle,
|
||||
const size_t n,
|
||||
const double alpha,
|
||||
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
|
||||
cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
|
||||
// Symmetric packed rank-1 matrix update: SSPR/DSPR
|
||||
StatusCode CLBlastSspr(const Layout layout, const Triangle triangle,
|
||||
const size_t n,
|
||||
const float alpha,
|
||||
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
|
||||
cl_mem ap_buffer, const size_t ap_offset,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
StatusCode CLBlastDspr(const Layout layout, const Triangle triangle,
|
||||
const size_t n,
|
||||
const double alpha,
|
||||
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
|
||||
cl_mem ap_buffer, const size_t ap_offset,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
|
||||
// Symmetric rank-2 matrix update: SSYR2/DSYR2
|
||||
StatusCode CLBlastSsyr2(const Layout layout, const Triangle triangle,
|
||||
const size_t n,
|
||||
const float alpha,
|
||||
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
|
||||
const cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
|
||||
cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
StatusCode CLBlastDsyr2(const Layout layout, const Triangle triangle,
|
||||
const size_t n,
|
||||
const double alpha,
|
||||
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
|
||||
const cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
|
||||
cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
|
||||
// Symmetric packed rank-2 matrix update: SSPR2/DSPR2
|
||||
StatusCode CLBlastSspr2(const Layout layout, const Triangle triangle,
|
||||
const size_t n,
|
||||
const float alpha,
|
||||
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
|
||||
const cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
|
||||
cl_mem ap_buffer, const size_t ap_offset,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
StatusCode CLBlastDspr2(const Layout layout, const Triangle triangle,
|
||||
const size_t n,
|
||||
const double alpha,
|
||||
const cl_mem x_buffer, const size_t x_offset, const size_t x_inc,
|
||||
const cl_mem y_buffer, const size_t y_offset, const size_t y_inc,
|
||||
cl_mem ap_buffer, const size_t ap_offset,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
|
||||
// =================================================================================================
|
||||
// BLAS level-3 (matrix-matrix) routines
|
||||
// =================================================================================================
|
||||
|
||||
// Generalized matrix-matrix multiplication: SGEMM/DGEMM/CGEMM/ZGEMM
|
||||
// General matrix-matrix multiplication: SGEMM/DGEMM/CGEMM/ZGEMM
|
||||
StatusCode CLBlastSgemm(const Layout layout, const Transpose a_transpose, const Transpose b_transpose,
|
||||
const size_t m, const size_t n, const size_t k,
|
||||
const float alpha,
|
||||
|
@ -483,6 +889,32 @@ StatusCode CLBlastZtrmm(const Layout layout, const Side side, const Triangle tri
|
|||
cl_mem b_buffer, const size_t b_offset, const size_t b_ld,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
|
||||
// Solves a triangular system of equations: STRSM/DTRSM/CTRSM/ZTRSM
|
||||
StatusCode CLBlastStrsm(const Layout layout, const Side side, const Triangle triangle, const Transpose a_transpose, const Diagonal diagonal,
|
||||
const size_t m, const size_t n,
|
||||
const float alpha,
|
||||
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
|
||||
cl_mem b_buffer, const size_t b_offset, const size_t b_ld,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
StatusCode CLBlastDtrsm(const Layout layout, const Side side, const Triangle triangle, const Transpose a_transpose, const Diagonal diagonal,
|
||||
const size_t m, const size_t n,
|
||||
const double alpha,
|
||||
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
|
||||
cl_mem b_buffer, const size_t b_offset, const size_t b_ld,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
StatusCode CLBlastCtrsm(const Layout layout, const Side side, const Triangle triangle, const Transpose a_transpose, const Diagonal diagonal,
|
||||
const size_t m, const size_t n,
|
||||
const cl_float2 alpha,
|
||||
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
|
||||
cl_mem b_buffer, const size_t b_offset, const size_t b_ld,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
StatusCode CLBlastZtrsm(const Layout layout, const Side side, const Triangle triangle, const Transpose a_transpose, const Diagonal diagonal,
|
||||
const size_t m, const size_t n,
|
||||
const cl_double2 alpha,
|
||||
const cl_mem a_buffer, const size_t a_offset, const size_t a_ld,
|
||||
cl_mem b_buffer, const size_t b_offset, const size_t b_ld,
|
||||
cl_command_queue* queue, cl_event* event);
|
||||
|
||||
// =================================================================================================
|
||||
|
||||
// CLBLAST_CLBLAST_C_H_
|
||||
|
|
61
scripts/generator/datatype.py
Normal file
61
scripts/generator/datatype.py
Normal file
|
@ -0,0 +1,61 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
# ==================================================================================================
|
||||
# This file is part of the CLBlast project. The project is licensed under Apache Version 2.0. This
|
||||
# project loosely follows the Google C++ styleguide and uses a max-width of 100 characters per line.
|
||||
#
|
||||
# Author(s):
|
||||
# Cedric Nugteren <www.cedricnugteren.nl>
|
||||
#
|
||||
# This file contains the 'DataType' class, used in the generator script to generate the CLBlast API
|
||||
# interface and implementation.
|
||||
#
|
||||
# ==================================================================================================
|
||||
|
||||
# Short-hands for data-types
|
||||
FLT = "float"
|
||||
DBL = "double"
|
||||
FLT2 = "float2"
|
||||
DBL2 = "double2"
|
||||
F2CL = "cl_float2"
|
||||
D2CL = "cl_double2"
|
||||
|
||||
# Structure holding data-type and precision information
|
||||
class DataType():
|
||||
def __init__(self, name, template, scalars, buffertype):
|
||||
self.name = name
|
||||
self.template = template
|
||||
self.alpha_cpp = scalars[0]
|
||||
self.beta_cpp = scalars[1]
|
||||
self.alpha_cl = scalars[2]
|
||||
self.beta_cl = scalars[3]
|
||||
self.buffertype = buffertype
|
||||
|
||||
# Outputs the name of the data-type (alpha/beta), possibly transforming into the right type
|
||||
def UseAlpha(self):
|
||||
if self.alpha_cpp in [FLT2, DBL2]:
|
||||
return self.alpha_cpp+"{alpha.s[0], alpha.s[1]}"
|
||||
return "alpha"
|
||||
def UseBeta(self):
|
||||
if self.beta_cpp in [FLT2, DBL2]:
|
||||
return self.beta_cpp+"{beta.s[0], beta.s[1]}"
|
||||
return "beta"
|
||||
|
||||
# As above, but the transformation is in the opposite direction
|
||||
def UseAlphaCL(self):
|
||||
if self.alpha_cpp in [FLT2, DBL2]:
|
||||
return self.alpha_cl+"{{alpha.real(), alpha.imag()}}"
|
||||
return "alpha"
|
||||
def UseBetaCL(self):
|
||||
if self.beta_cpp in [FLT2, DBL2]:
|
||||
return self.beta_cl+"{{beta.real(), beta.imag()}}"
|
||||
return "beta"
|
||||
|
||||
# Returns the template as used in the correctness/performance tests
|
||||
def TestTemplate(self):
|
||||
if self.buffertype != self.beta_cpp:
|
||||
return "<"+self.buffertype+","+self.beta_cpp+">, "+self.buffertype+", "+self.beta_cpp
|
||||
return "<"+self.buffertype+">, "+self.buffertype+", "+self.beta_cpp
|
||||
|
||||
|
||||
# ==================================================================================================
|
343
scripts/generator/generator.py
Normal file
343
scripts/generator/generator.py
Normal file
|
@ -0,0 +1,343 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
# ==================================================================================================
|
||||
# This file is part of the CLBlast project. The project is licensed under Apache Version 2.0. This
|
||||
# project loosely follows the Google C++ styleguide and uses a max-width of 100 characters per line.
|
||||
#
|
||||
# Author(s):
|
||||
# Cedric Nugteren <www.cedricnugteren.nl>
|
||||
#
|
||||
# This script automatically generates the bodies of the following files, creating the full CLBlast
|
||||
# API interface and implementation (C, C++, and clBLAS wrapper):
|
||||
# clblast.h
|
||||
# clblast.cc
|
||||
# clblast_c.h
|
||||
# clblast_c.cc
|
||||
# wrapper_clblas.h
|
||||
# It also generates the main functions for the correctness and performance tests as found in
|
||||
# test/correctness/routines/levelX/xYYYY.cc
|
||||
# test/performance/routines/levelX/xYYYY.cc
|
||||
#
|
||||
# ==================================================================================================
|
||||
|
||||
# System modules
|
||||
import sys
|
||||
import os.path
|
||||
|
||||
# Local files
|
||||
from routine import Routine
|
||||
from datatype import DataType, FLT, DBL, FLT2, DBL2, F2CL, D2CL
|
||||
|
||||
# ==================================================================================================
|
||||
|
||||
# Regular data-types
|
||||
S = DataType("S", FLT, [FLT, FLT, FLT, FLT], FLT ) # single (32)
|
||||
D = DataType("D", DBL, [DBL, DBL, DBL, DBL], DBL ) # double (64)
|
||||
C = DataType("C", FLT2, [FLT2, FLT2, F2CL, F2CL], FLT2) # single-complex (3232)
|
||||
Z = DataType("Z", DBL2, [DBL2, DBL2, D2CL, D2CL], DBL2) # double-complex (6464)
|
||||
|
||||
# Special cases
|
||||
Css = DataType("C", FLT, [FLT, FLT, FLT, FLT], FLT2) # As C, but with constants from S
|
||||
Zdd = DataType("Z", DBL, [DBL, DBL, DBL, DBL], DBL2) # As Z, but with constants from D
|
||||
Ccs = DataType("C", FLT2+","+FLT, [FLT2, FLT, F2CL, FLT], FLT2) # As C, but with one constant from S
|
||||
Zzd = DataType("Z", DBL2+","+DBL, [DBL2, DBL, D2CL, DBL], DBL2) # As Z, but with one constant from D
|
||||
|
||||
# C++ template data-types
|
||||
T = DataType("typename T", "T", ["T", "T", "T", "T"], "T") # regular routine
|
||||
Tc = DataType("typename T", "std::complex<T>,T", ["T", "T", "T", "T"], "std::complex<T>") # for herk
|
||||
TU = DataType("typename T, typename U", "T,U", ["T", "U", "T", "U"], "T") # for her2k
|
||||
|
||||
# ==================================================================================================
|
||||
|
||||
# Populates a list of routines
|
||||
routines = [
|
||||
[ # Level 1: vector-vector
|
||||
#Routine(False, "1", "rotg", T, [S,D], [], [], [], [], ["a","b","c","s"], False, "Generate plane rotation"),
|
||||
#Routine(False, "1", "rot", T, [S,D], ["n"], [], [], ["x","y"], ["c","s"], False, "Apply plane rotation"),
|
||||
Routine(True, "1", "swap", T, [S,D,C,Z], ["n"], [], [], ["x","y"], [], False, "Swap two vectors"),
|
||||
Routine(True, "1", "scal", T, [S,D,C,Z], ["n"], [], [], ["x"], ["alpha"], False, "Vector scaling"),
|
||||
Routine(True, "1", "copy", T, [S,D,C,Z], ["n"], [], ["x"], ["y"], [], False, "Vector copy"),
|
||||
Routine(True, "1", "axpy", T, [S,D,C,Z], ["n"], [], ["x"], ["y"], ["alpha"], False, "Vector-times-constant plus vector"),
|
||||
Routine(True, "1", "dot", T, [S,D], ["n"], [], ["x","y"], ["dot"], [], True, "Dot product of two vectors"),
|
||||
Routine(True, "1", "dotu", T, [C,Z], ["n"], [], ["x","y"], ["dot"], [], True, "Dot product of two complex vectors"),
|
||||
Routine(True, "1", "dotc", T, [C,Z], ["n"], [], ["x","y"], ["dot"], [], True, "Dot product of two complex vectors, one conjugated"),
|
||||
],
|
||||
[ # Level 2: matrix-vector
|
||||
Routine(True, "2a", "gemv", T, [S,D,C,Z], ["m","n"], ["layout","a_transpose"], ["a","x"], ["y"], ["alpha","beta"], False, "General matrix-vector multiplication"),
|
||||
Routine(False, "2a", "gbmv", T, [S,D,C,Z], ["m","n","kl","ku"], ["layout","a_transpose"], ["a","x"], ["y"], ["alpha","beta"], False, "General banded matrix-vector multiplication"),
|
||||
Routine(True, "2a", "hemv", T, [C,Z], ["n"], ["layout","triangle"], ["a","x"], ["y"], ["alpha","beta"], False, "Hermitian matrix-vector multiplication"),
|
||||
Routine(False, "2a", "hbmv", T, [C,Z], ["n","k"], ["layout","triangle"], ["a","x"], ["y"], ["alpha","beta"], False, "Hermitian banded matrix-vector multiplication"),
|
||||
Routine(False, "2a", "hpmv", T, [C,Z], ["n"], ["layout","triangle"], ["ap","x"], ["y"], ["alpha","beta"], False, "Hermitian packed matrix-vector multiplication"),
|
||||
Routine(True, "2a", "symv", T, [S,D], ["n"], ["layout","triangle"], ["a","x"], ["y"], ["alpha","beta"], False, "Symmetric matrix-vector multiplication"),
|
||||
Routine(False, "2a", "sbmv", T, [S,D], ["n","k"], ["layout","triangle"], ["a","x"], ["y"], ["alpha","beta"], False, "Symmetric banded matrix-vector multiplication"),
|
||||
Routine(False, "2a", "spmv", T, [S,D], ["n"], ["layout","triangle"], ["ap","x"], ["y"], ["alpha","beta"], False, "Symmetric packed matrix-vector multiplication"),
|
||||
Routine(False, "2a", "trmv", T, [S,D,C,Z], ["n"], ["layout","triangle","a_transpose","diagonal"], ["a"], ["x"], [], True, "Triangular matrix-vector multiplication"),
|
||||
Routine(False, "2a", "tbmv", T, [S,D,C,Z], ["n","k"], ["layout","triangle","a_transpose","diagonal"], ["a"], ["x"], [], True, "Triangular banded matrix-vector multiplication"),
|
||||
Routine(False, "2a", "tpmv", T, [S,D,C,Z], ["n"], ["layout","triangle","a_transpose","diagonal"], ["ap"], ["x"], [], True, "Triangular packed matrix-vector multiplication"),
|
||||
Routine(False, "2a", "trsv", T, [S,D,C,Z], ["n"], ["layout","triangle","a_transpose","diagonal"], ["a"], ["x"], [], False, "Solves a triangular system of equations"),
|
||||
Routine(False, "2a", "tbsv", T, [S,D,C,Z], ["n","k"], ["layout","triangle","a_transpose","diagonal"], ["a"], ["x"], [], False, "Solves a banded triangular system of equations"),
|
||||
Routine(False, "2a", "tpsv", T, [S,D,C,Z], ["n"], ["layout","triangle","a_transpose","diagonal"], ["ap"], ["x"], [], False, "Solves a packed triangular system of equations"),
|
||||
# Level 2: matrix update
|
||||
Routine(False, "2b", "ger", T, [S,D], ["m","n"], ["layout"], ["x","y"], ["a"], ["alpha"], False, "General rank-1 matrix update"),
|
||||
Routine(False, "2b", "geru", T, [C,Z], ["m","n"], ["layout"], ["x","y"], ["a"], ["alpha"], False, "General rank-1 complex matrix update"),
|
||||
Routine(False, "2b", "gerc", T, [C,Z], ["m","n"], ["layout"], ["x","y"], ["a"], ["alpha"], False, "General rank-1 complex conjugated matrix update"),
|
||||
Routine(False, "2b", "her", Tc, [Css,Zdd], ["n"], ["layout","triangle"], ["x"], ["a"], ["alpha"], False, "Hermitian rank-1 matrix update"),
|
||||
Routine(False, "2b", "hpr", Tc, [Css,Zdd], ["n"], ["layout","triangle"], ["x"], ["ap"], ["alpha"], False, "Hermitian packed rank-1 matrix update"),
|
||||
Routine(False, "2b", "her2", T, [C,Z], ["n"], ["layout","triangle"], ["x","y"], ["a"], ["alpha"], False, "Hermitian rank-2 matrix update"),
|
||||
Routine(False, "2b", "hpr2", T, [C,Z], ["n"], ["layout","triangle"], ["x","y"], ["ap"], ["alpha"], False, "Hermitian packed rank-2 matrix update"),
|
||||
Routine(False, "2b", "syr", T, [S,D], ["n"], ["layout","triangle"], ["x"], ["a"], ["alpha"], False, "Symmetric rank-1 matrix update"),
|
||||
Routine(False, "2b", "spr", T, [S,D], ["n"], ["layout","triangle"], ["x"], ["ap"], ["alpha"], False, "Symmetric packed rank-1 matrix update"),
|
||||
Routine(False, "2b", "syr2", T, [S,D], ["n"], ["layout","triangle"], ["x","y"], ["a"], ["alpha"], False, "Symmetric rank-2 matrix update"),
|
||||
Routine(False, "2b", "spr2", T, [S,D], ["n"], ["layout","triangle"], ["x","y"], ["ap"], ["alpha"], False, "Symmetric packed rank-2 matrix update"),
|
||||
],
|
||||
[ # Level 3: matrix-matrix
|
||||
Routine(True, "3", "gemm", T, [S,D,C,Z], ["m","n","k"], ["layout","a_transpose","b_transpose"], ["a","b"], ["c"], ["alpha","beta"], False, "General matrix-matrix multiplication"),
|
||||
Routine(True, "3", "symm", T, [S,D,C,Z], ["m","n"], ["layout","side","triangle"], ["a","b"], ["c"], ["alpha","beta"], False, "Symmetric matrix-matrix multiplication"),
|
||||
Routine(True, "3", "hemm", T, [C,Z], ["m","n"], ["layout","side","triangle"], ["a","b"], ["c"], ["alpha","beta"], False, "Hermitian matrix-matrix multiplication"),
|
||||
Routine(True, "3", "syrk", T, [S,D,C,Z], ["n","k"], ["layout","triangle","a_transpose"], ["a"], ["c"], ["alpha","beta"], False, "Rank-K update of a symmetric matrix"),
|
||||
Routine(True, "3", "herk", Tc, [Css,Zdd], ["n","k"], ["layout","triangle","a_transpose"], ["a"], ["c"], ["alpha","beta"], False, "Rank-K update of a hermitian matrix"),
|
||||
Routine(True, "3", "syr2k", T, [S,D,C,Z], ["n","k"], ["layout","triangle","ab_transpose"], ["a","b"], ["c"], ["alpha","beta"], False, "Rank-2K update of a symmetric matrix"),
|
||||
Routine(True, "3", "her2k", TU, [Ccs,Zzd], ["n","k"], ["layout","triangle","ab_transpose"], ["a","b"], ["c"], ["alpha","beta"], False, "Rank-2K update of a hermitian matrix"),
|
||||
Routine(True, "3", "trmm", T, [S,D,C,Z], ["m","n"], ["layout","side","triangle","a_transpose","diagonal"], ["a"], ["b"], ["alpha"], False, "Triangular matrix-matrix multiplication"),
|
||||
Routine(False, "3", "trsm", T, [S,D,C,Z], ["m","n"], ["layout","side","triangle","a_transpose","diagonal"], ["a"], ["b"], ["alpha"], False, "Solves a triangular system of equations"),
|
||||
]]
|
||||
|
||||
# ==================================================================================================
|
||||
|
||||
# Separators for the BLAS levels
|
||||
separators = ["""
|
||||
// =================================================================================================
|
||||
// BLAS level-1 (vector-vector) routines
|
||||
// =================================================================================================""",
|
||||
"""
|
||||
// =================================================================================================
|
||||
// BLAS level-2 (matrix-vector) routines
|
||||
// =================================================================================================""",
|
||||
"""
|
||||
// =================================================================================================
|
||||
// BLAS level-3 (matrix-matrix) routines
|
||||
// ================================================================================================="""]
|
||||
|
||||
# Main header/footer for source files
|
||||
header = """
|
||||
// =================================================================================================
|
||||
// This file is part of the CLBlast project. The project is licensed under Apache Version 2.0. This
|
||||
// project loosely follows the Google C++ styleguide and uses a tab-size of two spaces and a max-
|
||||
// width of 100 characters per line.
|
||||
//
|
||||
// Author(s):
|
||||
// Cedric Nugteren <www.cedricnugteren.nl>
|
||||
//
|
||||
// =================================================================================================
|
||||
"""
|
||||
footer = """
|
||||
// =================================================================================================
|
||||
"""
|
||||
|
||||
# ==================================================================================================
|
||||
|
||||
# The C++ API header (.h)
|
||||
def clblast_h(routines):
|
||||
result = ""
|
||||
for routine in routines:
|
||||
result += "\n// "+routine.description+": "+routine.ShortNames()+"\n"
|
||||
result += routine.RoutineHeaderCPP(12)+";\n"
|
||||
return result
|
||||
|
||||
# The C++ API implementation (.cc)
|
||||
def clblast_cc(routines):
|
||||
result = ""
|
||||
for routine in routines:
|
||||
indent1 = " "*(20 + routine.Length())
|
||||
result += "\n// "+routine.description+": "+routine.ShortNames()+"\n"
|
||||
if routine.implemented:
|
||||
result += routine.RoutineHeaderCPP(12)+" {\n"
|
||||
result += " auto queue_cpp = Queue(*queue);\n"
|
||||
result += " auto event_cpp = Event(*event);\n"
|
||||
result += " auto routine = X"+routine.name+"<"+routine.template.template+">(queue_cpp, event_cpp);\n"
|
||||
result += " auto status = routine.SetUp();\n"
|
||||
result += " if (status != StatusCode::kSuccess) { return status; }\n"
|
||||
result += " return routine.Do"+routine.name.capitalize()+"("
|
||||
result += (",\n"+indent1).join([a for a in routine.ArgumentsCladuc(routine.template, indent1)])
|
||||
result += ");\n"
|
||||
else:
|
||||
result += routine.RoutineHeaderTypeCPP(12)+" {\n"
|
||||
result += " return StatusCode::kNotImplemented;\n"
|
||||
result += "}\n"
|
||||
for flavour in routine.flavours:
|
||||
indent2 = " "*(23 + routine.Length() + len(flavour.template))
|
||||
result += "template StatusCode "+routine.name.capitalize()+"<"+flavour.template+">("
|
||||
result += (",\n"+indent2).join([a for a in routine.ArgumentsType(flavour)])
|
||||
result += ",\n"+indent2+"cl_command_queue*, cl_event*);\n"
|
||||
return result
|
||||
|
||||
# ==================================================================================================
|
||||
|
||||
# The C API header (.h)
|
||||
def clblast_c_h(routines):
|
||||
result = ""
|
||||
for routine in routines:
|
||||
result += "\n// "+routine.description+": "+routine.ShortNames()+"\n"
|
||||
for flavour in routine.flavours:
|
||||
result += routine.RoutineHeaderC(flavour, 20)+";\n"
|
||||
return result
|
||||
|
||||
# The C API implementation (.cc)
|
||||
def clblast_c_cc(routines):
|
||||
result = ""
|
||||
for routine in routines:
|
||||
result += "\n// "+routine.name.upper()+"\n"
|
||||
for flavour in routine.flavours:
|
||||
template = "<"+flavour.template+">" if routine.NoScalars() else ""
|
||||
indent = " "*(26 + routine.Length() + len(template))
|
||||
result += routine.RoutineHeaderC(flavour, 20)+" {\n"
|
||||
result += " auto status = clblast::"+routine.name.capitalize()+template+"("
|
||||
result += (",\n"+indent).join([a for a in routine.ArgumentsCast(flavour, indent)])
|
||||
result += ",\n"+indent+"queue, event);"
|
||||
result += "\n return static_cast<StatusCode>(status);\n}\n"
|
||||
return result
|
||||
|
||||
# ==================================================================================================
|
||||
|
||||
# The wrapper to the reference clBLAS routines (for performance/correctness testing)
|
||||
def wrapper_clblas(routines):
|
||||
result = ""
|
||||
for routine in routines:
|
||||
result += "\n// Forwards the clBLAS calls for %s\n" % (routine.ShortNames())
|
||||
if routine.NoScalars():
|
||||
result += routine.RoutineHeaderWrapper(routine.template, True, 21)+";\n"
|
||||
for flavour in routine.flavours:
|
||||
indent = " "*(17 + routine.Length())
|
||||
result += routine.RoutineHeaderWrapper(flavour, False, 21)+" {\n"
|
||||
arguments = routine.ArgumentsWrapper(flavour)
|
||||
if routine.scratch:
|
||||
result += " auto queue = Queue(queues[0]);\n"
|
||||
result += " auto context = queue.GetContext();\n"
|
||||
result += " auto scratch_buffer = Buffer<"+flavour.template+">(context, n);\n"
|
||||
arguments += ["scratch_buffer()"]
|
||||
result += " return clblas"+flavour.name+routine.name+"("
|
||||
result += (",\n"+indent).join([a for a in arguments])
|
||||
result += ",\n"+indent+"num_queues, queues, num_wait_events, wait_events, events);"
|
||||
result += "\n}\n"
|
||||
return result
|
||||
|
||||
# ==================================================================================================
|
||||
|
||||
# Checks for the number of command-line arguments
|
||||
if len(sys.argv) != 2:
|
||||
print "[ERROR] Usage: generator.py <root_of_clblast>"
|
||||
sys.exit()
|
||||
|
||||
# Parses the command-line arguments
|
||||
path_clblast = sys.argv[1]
|
||||
files = [
|
||||
path_clblast+"/include/clblast.h",
|
||||
path_clblast+"/src/clblast.cc",
|
||||
path_clblast+"/include/clblast_c.h",
|
||||
path_clblast+"/src/clblast_c.cc",
|
||||
path_clblast+"/test/wrapper_clblas.h",
|
||||
]
|
||||
header_lines = [84, 44, 80, 24, 22]
|
||||
footer_lines = [6, 3, 5, 2, 6]
|
||||
|
||||
# Checks whether the command-line arguments are valid; exists otherwise
|
||||
for f in files:
|
||||
if not os.path.isfile(f):
|
||||
print "[ERROR] The path '"+path_clblast+"' does not point to the root of the CLBlast library"
|
||||
sys.exit()
|
||||
|
||||
# ==================================================================================================
|
||||
|
||||
# Iterates over all files to output
|
||||
for i in xrange(0,len(files)):
|
||||
|
||||
# Stores the header and the footer of the original file
|
||||
with open(files[i]) as f:
|
||||
original = f.readlines()
|
||||
file_header = original[:header_lines[i]]
|
||||
file_footer = original[-footer_lines[i]:]
|
||||
|
||||
# Re-writes the body of the file
|
||||
with open(files[i], "w") as f:
|
||||
body = ""
|
||||
for level in [1,2,3]:
|
||||
body += separators[level-1]+"\n"
|
||||
if i == 0:
|
||||
body += clblast_h(routines[level-1])
|
||||
if i == 1:
|
||||
body += clblast_cc(routines[level-1])
|
||||
if i == 2:
|
||||
body += clblast_c_h(routines[level-1])
|
||||
if i == 3:
|
||||
body += clblast_c_cc(routines[level-1])
|
||||
if i == 4:
|
||||
body += wrapper_clblas(routines[level-1])
|
||||
f.write("".join(file_header))
|
||||
f.write(body)
|
||||
f.write("".join(file_footer))
|
||||
|
||||
# ==================================================================================================
|
||||
|
||||
# Outputs all the correctness-test implementations
|
||||
for level in [1,2,3]:
|
||||
for routine in routines[level-1]:
|
||||
filename = path_clblast+"/test/correctness/routines/level"+str(level)+"/x"+routine.name+".cc"
|
||||
with open(filename, "w") as f:
|
||||
body = ""
|
||||
body += "#include \"correctness/testblas.h\"\n"
|
||||
body += "#include \"routines/level"+str(level)+"/x"+routine.name+".h\"\n\n"
|
||||
body += "// Shortcuts to the clblast namespace\n"
|
||||
body += "using float2 = clblast::float2;\n"
|
||||
body += "using double2 = clblast::double2;\n\n"
|
||||
body += "// Main function (not within the clblast namespace)\n"
|
||||
body += "int main(int argc, char *argv[]) {\n"
|
||||
not_first = "false"
|
||||
for flavour in routine.flavours:
|
||||
body += " clblast::RunTests<clblast::TestX"+routine.name+flavour.TestTemplate()
|
||||
body += ">(argc, argv, "+not_first+", \""+flavour.name+routine.name.upper()+"\");\n"
|
||||
not_first = "true"
|
||||
body += " return 0;\n"
|
||||
body += "}\n"
|
||||
f.write(header+"\n")
|
||||
f.write(body)
|
||||
f.write(footer)
|
||||
|
||||
# Outputs all the performance-test implementations
|
||||
for level in [1,2,3]:
|
||||
for routine in routines[level-1]:
|
||||
filename = path_clblast+"/test/performance/routines/level"+str(level)+"/x"+routine.name+".cc"
|
||||
with open(filename, "w") as f:
|
||||
body = ""
|
||||
body += "#include \"performance/client.h\"\n"
|
||||
body += "#include \"routines/level"+str(level)+"/x"+routine.name+".h\"\n\n"
|
||||
body += "// Shortcuts to the clblast namespace\n"
|
||||
body += "using float2 = clblast::float2;\n"
|
||||
body += "using double2 = clblast::double2;\n\n"
|
||||
body += "// Main function (not within the clblast namespace)\n"
|
||||
body += "int main(int argc, char *argv[]) {\n"
|
||||
body += " switch(clblast::GetPrecision(argc, argv)) {\n"
|
||||
for precision in ["H","S","D","C","Z"]:
|
||||
enum = {
|
||||
'H': "Half",
|
||||
'S': "Single",
|
||||
'D': "Double",
|
||||
'C': "ComplexSingle",
|
||||
'Z': "ComplexDouble",
|
||||
}[precision]
|
||||
body += " case clblast::Precision::k"+enum+":"
|
||||
found = False
|
||||
for flavour in routine.flavours:
|
||||
if flavour.name == precision:
|
||||
body += "\n clblast::RunClient<clblast::TestX"+routine.name+flavour.TestTemplate()
|
||||
body += ">(argc, argv); break;\n"
|
||||
found = True
|
||||
if not found:
|
||||
body += " throw std::runtime_error(\"Unsupported precision mode\");\n"
|
||||
body += " }\n"
|
||||
body += " return 0;\n"
|
||||
body += "}\n"
|
||||
f.write(header+"\n")
|
||||
f.write(body)
|
||||
f.write(footer)
|
||||
|
||||
# ==================================================================================================
|
352
scripts/generator/routine.py
Normal file
352
scripts/generator/routine.py
Normal file
|
@ -0,0 +1,352 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
# ==================================================================================================
|
||||
# This file is part of the CLBlast project. The project is licensed under Apache Version 2.0. This
|
||||
# project loosely follows the Google C++ styleguide and uses a max-width of 100 characters per line.
|
||||
#
|
||||
# Author(s):
|
||||
# Cedric Nugteren <www.cedricnugteren.nl>
|
||||
#
|
||||
# This file contains the 'Routine' class, used in the generator script to generate the CLBlast API
|
||||
# interface and implementation.
|
||||
#
|
||||
# ==================================================================================================
|
||||
|
||||
# System modules
|
||||
from itertools import chain
|
||||
|
||||
# Translates an option name to a CLBlast data-type
|
||||
def OptionToCLBlast(x):
|
||||
return {
|
||||
'layout': "Layout",
|
||||
'a_transpose': "Transpose",
|
||||
'b_transpose': "Transpose",
|
||||
'ab_transpose': "Transpose",
|
||||
'side': "Side",
|
||||
'triangle': "Triangle",
|
||||
'diagonal': "Diagonal",
|
||||
}[x]
|
||||
|
||||
# As above, but for clBLAS data-types
|
||||
def OptionToWrapper(x):
|
||||
return {
|
||||
'layout': "clblasOrder",
|
||||
'a_transpose': "clblasTranspose",
|
||||
'b_transpose': "clblasTranspose",
|
||||
'ab_transpose': "clblasTranspose",
|
||||
'side': "clblasSide",
|
||||
'triangle': "clblasUplo",
|
||||
'diagonal': "clblasDiag",
|
||||
}[x]
|
||||
|
||||
# Buffers without 'ld' or 'inc' parameter
|
||||
NO_LD_INC = ["dot","ap"]
|
||||
|
||||
# ==================================================================================================
|
||||
|
||||
# Class holding routine-specific information (e.g. name, which arguments, which precisions)
|
||||
class Routine():
|
||||
def __init__(self, implemented, level, name, template, flavours, sizes, options,
|
||||
inputs, outputs, scalars, scratch, description):
|
||||
self.implemented = implemented
|
||||
self.level = level
|
||||
self.name = name
|
||||
self.template = template
|
||||
self.flavours = flavours
|
||||
self.sizes = sizes
|
||||
self.options = options
|
||||
self.inputs = inputs
|
||||
self.outputs = outputs
|
||||
self.scalars = scalars
|
||||
self.scratch = scratch # Scratch buffer (e.g. for xDOT)
|
||||
self.description = description
|
||||
|
||||
# Retrieves the number of characters in the routine's name
|
||||
def Length(self):
|
||||
return len(self.name)
|
||||
|
||||
# Retrieves the postfix for a buffer
|
||||
def Postfix(self, name):
|
||||
return "inc" if (name in ["x","y"]) else "ld"
|
||||
|
||||
# Determines whether or not this routine has scalar arguments (alpha/beta)
|
||||
def NoScalars(self):
|
||||
return self.scalars == []
|
||||
|
||||
# Returns the upper-case names of these routines (all flavours)
|
||||
def ShortNames(self):
|
||||
return "/".join([f.name+self.name.upper() for f in self.flavours])
|
||||
|
||||
# Determines which buffers go first (between alpha and beta) and which ones go after
|
||||
def BuffersFirst(self):
|
||||
if self.level == "2b":
|
||||
return ["x","y"]
|
||||
return ["ap","a","b","x"]
|
||||
def BuffersSecond(self):
|
||||
if self.level == "2b":
|
||||
return ["ap","a","b","c"]
|
||||
return ["y","c"]
|
||||
|
||||
# ==============================================================================================
|
||||
|
||||
# Retrieves a variable name for a specific input/output vector/matrix (e.g. 'x')
|
||||
def Buffer(self, name):
|
||||
if (name in self.inputs) or (name in self.outputs):
|
||||
a = [name+"_buffer"]
|
||||
b = [name+"_offset"]
|
||||
c = [name+"_"+self.Postfix(name)] if (name not in NO_LD_INC) else []
|
||||
return [", ".join(a+b+c)]
|
||||
return []
|
||||
|
||||
# As above but with data-types
|
||||
def BufferDef(self, name):
|
||||
prefix = "const " if (name in self.inputs) else ""
|
||||
if (name in self.inputs) or (name in self.outputs):
|
||||
a = [prefix+"cl_mem "+name+"_buffer"]
|
||||
b = ["const size_t "+name+"_offset"]
|
||||
c = ["const size_t "+name+"_"+self.Postfix(name)] if (name not in NO_LD_INC) else []
|
||||
return [", ".join(a+b+c)]
|
||||
return []
|
||||
|
||||
# As above but with Claduc buffers
|
||||
def BufferCladuc(self, name):
|
||||
if (name in self.inputs) or (name in self.outputs):
|
||||
a = ["Buffer<"+self.template.buffertype+">("+name+"_buffer)"]
|
||||
b = [name+"_offset"]
|
||||
c = [name+"_"+self.Postfix(name)] if (name not in NO_LD_INC) else []
|
||||
return [", ".join(a+b+c)]
|
||||
return []
|
||||
|
||||
# As above but with a static cast for clBLAS wrapper
|
||||
def BufferWrapper(self, name):
|
||||
if (name in self.inputs) or (name in self.outputs):
|
||||
a = [name+"_buffer"]
|
||||
b = [name+"_offset"]
|
||||
c = []
|
||||
if (name in ["x","y"]):
|
||||
c = ["static_cast<int>("+name+"_"+self.Postfix(name)+")"]
|
||||
elif (name in ["a","b","c"]):
|
||||
c = [name+"_"+self.Postfix(name)]
|
||||
return [", ".join(a+b+c)]
|
||||
return []
|
||||
|
||||
# As above, but only data-types
|
||||
def BufferType(self, name):
|
||||
prefix = "const " if (name in self.inputs) else ""
|
||||
if (name in self.inputs) or (name in self.outputs):
|
||||
a = [prefix+"cl_mem"]
|
||||
b = ["const size_t"]
|
||||
c = ["const size_t"] if (name not in NO_LD_INC) else []
|
||||
return [", ".join(a+b+c)]
|
||||
return []
|
||||
|
||||
# ==============================================================================================
|
||||
|
||||
# Retrieves the name of a scalar (alpha/beta)
|
||||
def Scalar(self, name):
|
||||
if (name in self.scalars):
|
||||
return [name]
|
||||
return []
|
||||
|
||||
# Retrieves the use of a scalar (alpha/beta)
|
||||
def ScalarUse(self, name, flavour):
|
||||
if name in self.scalars:
|
||||
if name == "alpha":
|
||||
return [flavour.UseAlpha()]
|
||||
elif name == "beta":
|
||||
return [flavour.UseBeta()]
|
||||
return [name]
|
||||
return []
|
||||
|
||||
# Retrieves the use of a scalar (alpha/beta)
|
||||
def ScalarUseWrapper(self, name, flavour):
|
||||
if name in self.scalars:
|
||||
if name == "alpha":
|
||||
return [flavour.UseAlphaCL()]
|
||||
elif name == "beta":
|
||||
return [flavour.UseBetaCL()]
|
||||
return [name]
|
||||
return []
|
||||
|
||||
# Retrieves the definition of a scalar (alpha/beta)
|
||||
def ScalarDef(self, name, flavour):
|
||||
if name in self.scalars:
|
||||
if name == "alpha":
|
||||
return ["const "+flavour.alpha_cl+" "+name]
|
||||
return ["const "+flavour.beta_cl+" "+name]
|
||||
return []
|
||||
|
||||
# As above, but without 'cl_' prefix
|
||||
def ScalarDefPlain(self, name, flavour):
|
||||
if name in self.scalars:
|
||||
if name == "alpha":
|
||||
return ["const "+flavour.alpha_cpp+" "+name]
|
||||
return ["const "+flavour.beta_cpp+" "+name]
|
||||
return []
|
||||
|
||||
# Retrieves the type of a scalar (alpha/beta)
|
||||
def ScalarType(self, name, flavour):
|
||||
if name in self.scalars:
|
||||
if name == "alpha":
|
||||
return ["const "+flavour.alpha_cpp]
|
||||
return ["const "+flavour.beta_cpp]
|
||||
return []
|
||||
|
||||
# ==============================================================================================
|
||||
|
||||
# Retrieves a list of comma-separated sizes (m, n, k)
|
||||
def Sizes(self):
|
||||
if self.sizes:
|
||||
return [", ".join([s for s in self.sizes])]
|
||||
return []
|
||||
|
||||
# Retrieves the definition of the sizes (m,n,k)
|
||||
def SizesDef(self):
|
||||
if self.sizes:
|
||||
return [", ".join(["const size_t "+s for s in self.sizes])]
|
||||
return []
|
||||
|
||||
# Retrieves the types of the sizes (m,n,k)
|
||||
def SizesType(self):
|
||||
if self.sizes:
|
||||
return [", ".join(["const size_t" for s in self.sizes])]
|
||||
return []
|
||||
|
||||
# ==============================================================================================
|
||||
|
||||
# Retrieves a list of options
|
||||
def Options(self):
|
||||
if self.options:
|
||||
return [", ".join(self.options)]
|
||||
return []
|
||||
|
||||
# As above, but now casted to CLBlast data-types
|
||||
def OptionsCast(self, indent):
|
||||
if self.options:
|
||||
options = ["static_cast<clblast::"+OptionToCLBlast(o)+">("+o+")" for o in self.options]
|
||||
return [(",\n"+indent).join(options)]
|
||||
return []
|
||||
|
||||
# Retrieves the definitions of the options (layout, transpose, side, etc.)
|
||||
def OptionsDef(self):
|
||||
if self.options:
|
||||
definitions = ["const "+OptionToCLBlast(o)+" "+o for o in self.options]
|
||||
return [", ".join(definitions)]
|
||||
return []
|
||||
|
||||
# As above, but now using clBLAS data-types
|
||||
def OptionsDefWrapper(self):
|
||||
if self.options:
|
||||
definitions = ["const "+OptionToWrapper(o)+" "+o for o in self.options]
|
||||
return [", ".join(definitions)]
|
||||
return []
|
||||
|
||||
# Retrieves the types of the options (layout, transpose, side, etc.)
|
||||
def OptionsType(self):
|
||||
if self.options:
|
||||
definitions = ["const "+OptionToCLBlast(o) for o in self.options]
|
||||
return [", ".join(definitions)]
|
||||
return []
|
||||
|
||||
# ==============================================================================================
|
||||
|
||||
# Retrieves a combination of all the argument names, with Claduc casts
|
||||
def ArgumentsCladuc(self, flavour, indent):
|
||||
return (self.Options() + self.Sizes() + self.BufferCladuc("dot") +
|
||||
self.Scalar("alpha") +
|
||||
list(chain(*[self.BufferCladuc(b) for b in self.BuffersFirst()])) +
|
||||
self.Scalar("beta") +
|
||||
list(chain(*[self.BufferCladuc(b) for b in self.BuffersSecond()])) +
|
||||
list(chain(*[self.Scalar(s) for s in ["d1","d2","a","b","c","s"]])))
|
||||
|
||||
# Retrieves a combination of all the argument names, with CLBlast casts
|
||||
def ArgumentsCast(self, flavour, indent):
|
||||
return (self.OptionsCast(indent) + self.Sizes() + self.Buffer("dot") +
|
||||
self.ScalarUse("alpha", flavour) +
|
||||
list(chain(*[self.Buffer(b) for b in self.BuffersFirst()])) +
|
||||
self.ScalarUse("beta", flavour) +
|
||||
list(chain(*[self.Buffer(b) for b in self.BuffersSecond()])) +
|
||||
list(chain(*[self.ScalarUse(s, flavour) for s in ["d1","d2","a","b","c","s"]])))
|
||||
|
||||
# As above, but for the clBLAS wrapper
|
||||
def ArgumentsWrapper(self, flavour):
|
||||
return (self.Options() + self.Sizes() + self.BufferWrapper("dot") +
|
||||
self.ScalarUseWrapper("alpha", flavour) +
|
||||
list(chain(*[self.BufferWrapper(b) for b in self.BuffersFirst()])) +
|
||||
self.ScalarUseWrapper("beta", flavour) +
|
||||
list(chain(*[self.BufferWrapper(b) for b in self.BuffersSecond()])) +
|
||||
list(chain(*[self.ScalarUseWrapper(s, flavour) for s in ["d1","d2","a","b","c","s"]])))
|
||||
|
||||
# Retrieves a combination of all the argument definitions
|
||||
def ArgumentsDef(self, flavour):
|
||||
return (self.OptionsDef() + self.SizesDef() + self.BufferDef("dot") +
|
||||
self.ScalarDef("alpha", flavour) +
|
||||
list(chain(*[self.BufferDef(b) for b in self.BuffersFirst()])) +
|
||||
self.ScalarDef("beta", flavour) +
|
||||
list(chain(*[self.BufferDef(b) for b in self.BuffersSecond()])) +
|
||||
list(chain(*[self.ScalarDef(s, flavour) for s in ["d1","d2","a","b","c","s"]])))
|
||||
|
||||
# As above, but clBLAS wrapper plain datatypes
|
||||
def ArgumentsDefWrapper(self, flavour):
|
||||
return (self.OptionsDefWrapper() + self.SizesDef() + self.BufferDef("dot") +
|
||||
self.ScalarDefPlain("alpha", flavour) +
|
||||
list(chain(*[self.BufferDef(b) for b in self.BuffersFirst()])) +
|
||||
self.ScalarDefPlain("beta", flavour) +
|
||||
list(chain(*[self.BufferDef(b) for b in self.BuffersSecond()])) +
|
||||
list(chain(*[self.ScalarDefPlain(s, flavour) for s in ["d1","d2","a","b","c","s"]])))
|
||||
|
||||
# Retrieves a combination of all the argument types
|
||||
def ArgumentsType(self, flavour):
|
||||
return (self.OptionsType() + self.SizesType() + self.BufferType("dot") +
|
||||
self.ScalarType("alpha", flavour) +
|
||||
list(chain(*[self.BufferType(b) for b in self.BuffersFirst()])) +
|
||||
self.ScalarType("beta", flavour) +
|
||||
list(chain(*[self.BufferType(b) for b in self.BuffersSecond()])) +
|
||||
list(chain(*[self.ScalarType(s, flavour) for s in ["d1","d2","a","b","c","s"]])))
|
||||
|
||||
|
||||
# ==============================================================================================
|
||||
|
||||
# Retrieves the C++ templated definition for a routine
|
||||
def RoutineHeaderCPP(self, spaces):
|
||||
indent = " "*(spaces + self.Length())
|
||||
result = "template <"+self.template.name+">\n"
|
||||
result += "StatusCode "+self.name.capitalize()+"("
|
||||
result += (",\n"+indent).join([a for a in self.ArgumentsDef(self.template)])
|
||||
result += ",\n"+indent+"cl_command_queue* queue, cl_event* event)"
|
||||
return result
|
||||
|
||||
# As above, but now without variable names
|
||||
def RoutineHeaderTypeCPP(self, spaces):
|
||||
indent = " "*(spaces + self.Length())
|
||||
result = "template <"+self.template.name+">\n"
|
||||
result += "StatusCode "+self.name.capitalize()+"("
|
||||
result += (",\n"+indent).join([a for a in self.ArgumentsType(self.template)])
|
||||
result += ",\n"+indent+"cl_command_queue*, cl_event*)"
|
||||
return result
|
||||
|
||||
# As above, but now for C
|
||||
def RoutineHeaderC(self, flavour, spaces):
|
||||
indent = " "*(spaces + self.Length())
|
||||
result = "StatusCode CLBlast"+flavour.name+self.name+"("
|
||||
result += (",\n"+indent).join([a for a in self.ArgumentsDef(flavour)])
|
||||
result += ",\n"+indent+"cl_command_queue* queue, cl_event* event)"
|
||||
return result
|
||||
|
||||
# As above, but now for the clBLAS wrapper
|
||||
def RoutineHeaderWrapper(self, flavour, def_only, spaces):
|
||||
template = "<"+flavour.template+">" if self.NoScalars() and not def_only else ""
|
||||
indent = " "*(spaces + self.Length() + len(template))
|
||||
result = ""
|
||||
if self.NoScalars():
|
||||
result += "template <"
|
||||
if def_only:
|
||||
result += flavour.name
|
||||
result += ">\n"
|
||||
result += "clblasStatus clblasX"+self.name+template+"("
|
||||
result += (",\n"+indent).join([a for a in self.ArgumentsDefWrapper(flavour)])
|
||||
result += ",\n"+indent+"cl_uint num_queues, cl_command_queue *queues"
|
||||
result += ",\n"+indent+"cl_uint num_wait_events, const cl_event *wait_events, cl_event *events)"
|
||||
return result
|
||||
|
||||
# ==================================================================================================
|
1155
src/clblast.cc
1155
src/clblast.cc
File diff suppressed because it is too large
Load diff
1058
src/clblast_c.cc
1058
src/clblast_c.cc
File diff suppressed because it is too large
Load diff
|
@ -7,15 +7,11 @@
|
|||
// Author(s):
|
||||
// Cedric Nugteren <www.cedricnugteren.nl>
|
||||
//
|
||||
// This file implements the tests for the Xaxpy routine.
|
||||
//
|
||||
// =================================================================================================
|
||||
|
||||
#include "correctness/testblas.h"
|
||||
#include "routines/level1/xaxpy.h"
|
||||
|
||||
// =================================================================================================
|
||||
|
||||
// Shortcuts to the clblast namespace
|
||||
using float2 = clblast::float2;
|
||||
using double2 = clblast::double2;
|
||||
|
|
|
@ -7,15 +7,11 @@
|
|||
// Author(s):
|
||||
// Cedric Nugteren <www.cedricnugteren.nl>
|
||||
//
|
||||
// This file implements the tests for the Xcopy routine.
|
||||
//
|
||||
// =================================================================================================
|
||||
|
||||
#include "correctness/testblas.h"
|
||||
#include "routines/level1/xcopy.h"
|
||||
|
||||
// =================================================================================================
|
||||
|
||||
// Shortcuts to the clblast namespace
|
||||
using float2 = clblast::float2;
|
||||
using double2 = clblast::double2;
|
||||
|
|
|
@ -7,15 +7,11 @@
|
|||
// Author(s):
|
||||
// Cedric Nugteren <www.cedricnugteren.nl>
|
||||
//
|
||||
// This file implements the tests for the Xdot routine.
|
||||
//
|
||||
// =================================================================================================
|
||||
|
||||
#include "correctness/testblas.h"
|
||||
#include "routines/level1/xdot.h"
|
||||
|
||||
// =================================================================================================
|
||||
|
||||
// Shortcuts to the clblast namespace
|
||||
using float2 = clblast::float2;
|
||||
using double2 = clblast::double2;
|
||||
|
|
|
@ -7,22 +7,18 @@
|
|||
// Author(s):
|
||||
// Cedric Nugteren <www.cedricnugteren.nl>
|
||||
//
|
||||
// This file implements the tests for the Xdotc routine.
|
||||
//
|
||||
// =================================================================================================
|
||||
|
||||
#include "correctness/testblas.h"
|
||||
#include "routines/level1/xdotc.h"
|
||||
|
||||
// =================================================================================================
|
||||
|
||||
// Shortcuts to the clblast namespace
|
||||
using float2 = clblast::float2;
|
||||
using double2 = clblast::double2;
|
||||
|
||||
// Main function (not within the clblast namespace)
|
||||
int main(int argc, char *argv[]) {
|
||||
clblast::RunTests<clblast::TestXdotc<float2>, float2, float2>(argc, argv, true, "CDOTC");
|
||||
clblast::RunTests<clblast::TestXdotc<float2>, float2, float2>(argc, argv, false, "CDOTC");
|
||||
clblast::RunTests<clblast::TestXdotc<double2>, double2, double2>(argc, argv, true, "ZDOTC");
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -7,22 +7,18 @@
|
|||
// Author(s):
|
||||
// Cedric Nugteren <www.cedricnugteren.nl>
|
||||
//
|
||||
// This file implements the tests for the Xdotu routine.
|
||||
//
|
||||
// =================================================================================================
|
||||
|
||||
#include "correctness/testblas.h"
|
||||
#include "routines/level1/xdotu.h"
|
||||
|
||||
// =================================================================================================
|
||||
|
||||
// Shortcuts to the clblast namespace
|
||||
using float2 = clblast::float2;
|
||||
using double2 = clblast::double2;
|
||||
|
||||
// Main function (not within the clblast namespace)
|
||||
int main(int argc, char *argv[]) {
|
||||
clblast::RunTests<clblast::TestXdotu<float2>, float2, float2>(argc, argv, true, "CDOTU");
|
||||
clblast::RunTests<clblast::TestXdotu<float2>, float2, float2>(argc, argv, false, "CDOTU");
|
||||
clblast::RunTests<clblast::TestXdotu<double2>, double2, double2>(argc, argv, true, "ZDOTU");
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -7,15 +7,11 @@
|
|||
// Author(s):
|
||||
// Cedric Nugteren <www.cedricnugteren.nl>
|
||||
//
|
||||
// This file implements the tests for the Xscal routine.
|
||||
//
|
||||
// =================================================================================================
|
||||
|
||||
#include "correctness/testblas.h"
|
||||
#include "routines/level1/xscal.h"
|
||||
|
||||
// =================================================================================================
|
||||
|
||||
// Shortcuts to the clblast namespace
|
||||
using float2 = clblast::float2;
|
||||
using double2 = clblast::double2;
|
||||
|
|
|
@ -7,15 +7,11 @@
|
|||
// Author(s):
|
||||
// Cedric Nugteren <www.cedricnugteren.nl>
|
||||
//
|
||||
// This file implements the tests for the Xswap routine.
|
||||
//
|
||||
// =================================================================================================
|
||||
|
||||
#include "correctness/testblas.h"
|
||||
#include "routines/level1/xswap.h"
|
||||
|
||||
// =================================================================================================
|
||||
|
||||
// Shortcuts to the clblast namespace
|
||||
using float2 = clblast::float2;
|
||||
using double2 = clblast::double2;
|
||||
|
|
28
test/correctness/routines/level2/xgbmv.cc
Normal file
28
test/correctness/routines/level2/xgbmv.cc
Normal file
|
@ -0,0 +1,28 @@
|
|||
|
||||
// =================================================================================================
|
||||
// This file is part of the CLBlast project. The project is licensed under Apache Version 2.0. This
|
||||
// project loosely follows the Google C++ styleguide and uses a tab-size of two spaces and a max-
|
||||
// width of 100 characters per line.
|
||||
//
|
||||
// Author(s):
|
||||
// Cedric Nugteren <www.cedricnugteren.nl>
|
||||
//
|
||||
// =================================================================================================
|
||||
|
||||
#include "correctness/testblas.h"
|
||||
#include "routines/level2/xgbmv.h"
|
||||
|
||||
// Shortcuts to the clblast namespace
|
||||
using float2 = clblast::float2;
|
||||
using double2 = clblast::double2;
|
||||
|
||||
// Main function (not within the clblast namespace)
|
||||
int main(int argc, char *argv[]) {
|
||||
clblast::RunTests<clblast::TestXgbmv<float>, float, float>(argc, argv, false, "SGBMV");
|
||||
clblast::RunTests<clblast::TestXgbmv<double>, double, double>(argc, argv, true, "DGBMV");
|
||||
clblast::RunTests<clblast::TestXgbmv<float2>, float2, float2>(argc, argv, true, "CGBMV");
|
||||
clblast::RunTests<clblast::TestXgbmv<double2>, double2, double2>(argc, argv, true, "ZGBMV");
|
||||
return 0;
|
||||
}
|
||||
|
||||
// =================================================================================================
|
|
@ -7,15 +7,11 @@
|
|||
// Author(s):
|
||||
// Cedric Nugteren <www.cedricnugteren.nl>
|
||||
//
|
||||
// This file implements the tests for the Xgemv routine.
|
||||
//
|
||||
// =================================================================================================
|
||||
|
||||
#include "correctness/testblas.h"
|
||||
#include "routines/level2/xgemv.h"
|
||||
|
||||
// =================================================================================================
|
||||
|
||||
// Shortcuts to the clblast namespace
|
||||
using float2 = clblast::float2;
|
||||
using double2 = clblast::double2;
|
||||
|
|
26
test/correctness/routines/level2/xger.cc
Normal file
26
test/correctness/routines/level2/xger.cc
Normal file
|
@ -0,0 +1,26 @@
|
|||
|
||||
// =================================================================================================
|
||||
// This file is part of the CLBlast project. The project is licensed under Apache Version 2.0. This
|
||||
// project loosely follows the Google C++ styleguide and uses a tab-size of two spaces and a max-
|
||||
// width of 100 characters per line.
|
||||
//
|
||||
// Author(s):
|
||||
// Cedric Nugteren <www.cedricnugteren.nl>
|
||||
//
|
||||
// =================================================================================================
|
||||
|
||||
#include "correctness/testblas.h"
|
||||
#include "routines/level2/xger.h"
|
||||
|
||||
// Shortcuts to the clblast namespace
|
||||
using float2 = clblast::float2;
|
||||
using double2 = clblast::double2;
|
||||
|
||||
// Main function (not within the clblast namespace)
|
||||
int main(int argc, char *argv[]) {
|
||||
clblast::RunTests<clblast::TestXger<float>, float, float>(argc, argv, false, "SGER");
|
||||
clblast::RunTests<clblast::TestXger<double>, double, double>(argc, argv, true, "DGER");
|
||||
return 0;
|
||||
}
|
||||
|
||||
// =================================================================================================
|
26
test/correctness/routines/level2/xgerc.cc
Normal file
26
test/correctness/routines/level2/xgerc.cc
Normal file
|
@ -0,0 +1,26 @@
|
|||
|
||||
// =================================================================================================
|
||||
// This file is part of the CLBlast project. The project is licensed under Apache Version 2.0. This
|
||||
// project loosely follows the Google C++ styleguide and uses a tab-size of two spaces and a max-
|
||||
// width of 100 characters per line.
|
||||
//
|
||||
// Author(s):
|
||||
// Cedric Nugteren <www.cedricnugteren.nl>
|
||||
//
|
||||
// =================================================================================================
|
||||
|
||||
#include "correctness/testblas.h"
|
||||
#include "routines/level2/xgerc.h"
|
||||
|
||||
// Shortcuts to the clblast namespace
|
||||
using float2 = clblast::float2;
|
||||
using double2 = clblast::double2;
|
||||
|
||||
// Main function (not within the clblast namespace)
|
||||
int main(int argc, char *argv[]) {
|
||||
clblast::RunTests<clblast::TestXgerc<float2>, float2, float2>(argc, argv, false, "CGERC");
|
||||
clblast::RunTests<clblast::TestXgerc<double2>, double2, double2>(argc, argv, true, "ZGERC");
|
||||
return 0;
|
||||
}
|
||||
|
||||
// =================================================================================================
|
26
test/correctness/routines/level2/xgeru.cc
Normal file
26
test/correctness/routines/level2/xgeru.cc
Normal file
|
@ -0,0 +1,26 @@
|
|||
|
||||
// =================================================================================================
|
||||
// This file is part of the CLBlast project. The project is licensed under Apache Version 2.0. This
|
||||
// project loosely follows the Google C++ styleguide and uses a tab-size of two spaces and a max-
|
||||
// width of 100 characters per line.
|
||||
//
|
||||
// Author(s):
|
||||
// Cedric Nugteren <www.cedricnugteren.nl>
|
||||
//
|
||||
// =================================================================================================
|
||||
|
||||
#include "correctness/testblas.h"
|
||||
#include "routines/level2/xgeru.h"
|
||||
|
||||
// Shortcuts to the clblast namespace
|
||||
using float2 = clblast::float2;
|
||||
using double2 = clblast::double2;
|
||||
|
||||
// Main function (not within the clblast namespace)
|
||||
int main(int argc, char *argv[]) {
|
||||
clblast::RunTests<clblast::TestXgeru<float2>, float2, float2>(argc, argv, false, "CGERU");
|
||||
clblast::RunTests<clblast::TestXgeru<double2>, double2, double2>(argc, argv, true, "ZGERU");
|
||||
return 0;
|
||||
}
|
||||
|
||||
// =================================================================================================
|
26
test/correctness/routines/level2/xhbmv.cc
Normal file
26
test/correctness/routines/level2/xhbmv.cc
Normal file
|
@ -0,0 +1,26 @@
|
|||
|
||||
// =================================================================================================
|
||||
// This file is part of the CLBlast project. The project is licensed under Apache Version 2.0. This
|
||||
// project loosely follows the Google C++ styleguide and uses a tab-size of two spaces and a max-
|
||||
// width of 100 characters per line.
|
||||
//
|
||||
// Author(s):
|
||||
// Cedric Nugteren <www.cedricnugteren.nl>
|
||||
//
|
||||
// =================================================================================================
|
||||
|
||||
#include "correctness/testblas.h"
|
||||
#include "routines/level2/xhbmv.h"
|
||||
|
||||
// Shortcuts to the clblast namespace
|
||||
using float2 = clblast::float2;
|
||||
using double2 = clblast::double2;
|
||||
|
||||
// Main function (not within the clblast namespace)
|
||||
int main(int argc, char *argv[]) {
|
||||
clblast::RunTests<clblast::TestXhbmv<float2>, float2, float2>(argc, argv, false, "CHBMV");
|
||||
clblast::RunTests<clblast::TestXhbmv<double2>, double2, double2>(argc, argv, true, "ZHBMV");
|
||||
return 0;
|
||||
}
|
||||
|
||||
// =================================================================================================
|
|
@ -7,15 +7,11 @@
|
|||
// Author(s):
|
||||
// Cedric Nugteren <www.cedricnugteren.nl>
|
||||
//
|
||||
// This file implements the tests for the Xhemv routine.
|
||||
//
|
||||
// =================================================================================================
|
||||
|
||||
#include "correctness/testblas.h"
|
||||
#include "routines/level2/xhemv.h"
|
||||
|
||||
// =================================================================================================
|
||||
|
||||
// Shortcuts to the clblast namespace
|
||||
using float2 = clblast::float2;
|
||||
using double2 = clblast::double2;
|
||||
|
|
26
test/correctness/routines/level2/xher.cc
Normal file
26
test/correctness/routines/level2/xher.cc
Normal file
|
@ -0,0 +1,26 @@
|
|||
|
||||
// =================================================================================================
|
||||
// This file is part of the CLBlast project. The project is licensed under Apache Version 2.0. This
|
||||
// project loosely follows the Google C++ styleguide and uses a tab-size of two spaces and a max-
|
||||
// width of 100 characters per line.
|
||||
//
|
||||
// Author(s):
|
||||
// Cedric Nugteren <www.cedricnugteren.nl>
|
||||
//
|
||||
// =================================================================================================
|
||||
|
||||
#include "correctness/testblas.h"
|
||||
#include "routines/level2/xher.h"
|
||||
|
||||
// Shortcuts to the clblast namespace
|
||||
using float2 = clblast::float2;
|
||||
using double2 = clblast::double2;
|
||||
|
||||
// Main function (not within the clblast namespace)
|
||||
int main(int argc, char *argv[]) {
|
||||
clblast::RunTests<clblast::TestXher<float2,float>, float2, float>(argc, argv, false, "CHER");
|
||||
clblast::RunTests<clblast::TestXher<double2,double>, double2, double>(argc, argv, true, "ZHER");
|
||||
return 0;
|
||||
}
|
||||
|
||||
// =================================================================================================
|
26
test/correctness/routines/level2/xher2.cc
Normal file
26
test/correctness/routines/level2/xher2.cc
Normal file
|
@ -0,0 +1,26 @@
|
|||
|
||||
// =================================================================================================
|
||||
// This file is part of the CLBlast project. The project is licensed under Apache Version 2.0. This
|
||||
// project loosely follows the Google C++ styleguide and uses a tab-size of two spaces and a max-
|
||||
// width of 100 characters per line.
|
||||
//
|
||||
// Author(s):
|
||||
// Cedric Nugteren <www.cedricnugteren.nl>
|
||||
//
|
||||
// =================================================================================================
|
||||
|
||||
#include "correctness/testblas.h"
|
||||
#include "routines/level2/xher2.h"
|
||||
|
||||
// Shortcuts to the clblast namespace
|
||||
using float2 = clblast::float2;
|
||||
using double2 = clblast::double2;
|
||||
|
||||
// Main function (not within the clblast namespace)
|
||||
int main(int argc, char *argv[]) {
|
||||
clblast::RunTests<clblast::TestXher2<float2>, float2, float2>(argc, argv, false, "CHER2");
|
||||
clblast::RunTests<clblast::TestXher2<double2>, double2, double2>(argc, argv, true, "ZHER2");
|
||||
return 0;
|
||||
}
|
||||
|
||||
// =================================================================================================
|
26
test/correctness/routines/level2/xhpmv.cc
Normal file
26
test/correctness/routines/level2/xhpmv.cc
Normal file
|
@ -0,0 +1,26 @@
|
|||
|
||||
// =================================================================================================
|
||||
// This file is part of the CLBlast project. The project is licensed under Apache Version 2.0. This
|
||||
// project loosely follows the Google C++ styleguide and uses a tab-size of two spaces and a max-
|
||||
// width of 100 characters per line.
|
||||
//
|
||||
// Author(s):
|
||||
// Cedric Nugteren <www.cedricnugteren.nl>
|
||||
//
|
||||
// =================================================================================================
|
||||
|
||||
#include "correctness/testblas.h"
|
||||
#include "routines/level2/xhpmv.h"
|
||||
|
||||
// Shortcuts to the clblast namespace
|
||||
using float2 = clblast::float2;
|
||||
using double2 = clblast::double2;
|
||||
|
||||
// Main function (not within the clblast namespace)
|
||||
int main(int argc, char *argv[]) {
|
||||
clblast::RunTests<clblast::TestXhpmv<float2>, float2, float2>(argc, argv, false, "CHPMV");
|
||||
clblast::RunTests<clblast::TestXhpmv<double2>, double2, double2>(argc, argv, true, "ZHPMV");
|
||||
return 0;
|
||||
}
|
||||
|
||||
// =================================================================================================
|
26
test/correctness/routines/level2/xhpr.cc
Normal file
26
test/correctness/routines/level2/xhpr.cc
Normal file
|
@ -0,0 +1,26 @@
|
|||
|
||||
// =================================================================================================
|
||||
// This file is part of the CLBlast project. The project is licensed under Apache Version 2.0. This
|
||||
// project loosely follows the Google C++ styleguide and uses a tab-size of two spaces and a max-
|
||||
// width of 100 characters per line.
|
||||
//
|
||||
// Author(s):
|
||||
// Cedric Nugteren <www.cedricnugteren.nl>
|
||||
//
|
||||
// =================================================================================================
|
||||
|
||||
#include "correctness/testblas.h"
|
||||
#include "routines/level2/xhpr.h"
|
||||
|
||||
// Shortcuts to the clblast namespace
|
||||
using float2 = clblast::float2;
|
||||
using double2 = clblast::double2;
|
||||
|
||||
// Main function (not within the clblast namespace)
|
||||
int main(int argc, char *argv[]) {
|
||||
clblast::RunTests<clblast::TestXhpr<float2,float>, float2, float>(argc, argv, false, "CHPR");
|
||||
clblast::RunTests<clblast::TestXhpr<double2,double>, double2, double>(argc, argv, true, "ZHPR");
|
||||
return 0;
|
||||
}
|
||||
|
||||
// =================================================================================================
|
26
test/correctness/routines/level2/xhpr2.cc
Normal file
26
test/correctness/routines/level2/xhpr2.cc
Normal file
|
@ -0,0 +1,26 @@
|
|||
|
||||
// =================================================================================================
|
||||
// This file is part of the CLBlast project. The project is licensed under Apache Version 2.0. This
|
||||
// project loosely follows the Google C++ styleguide and uses a tab-size of two spaces and a max-
|
||||
// width of 100 characters per line.
|
||||
//
|
||||
// Author(s):
|
||||
// Cedric Nugteren <www.cedricnugteren.nl>
|
||||
//
|
||||
// =================================================================================================
|
||||
|
||||
#include "correctness/testblas.h"
|
||||
#include "routines/level2/xhpr2.h"
|
||||
|
||||
// Shortcuts to the clblast namespace
|
||||
using float2 = clblast::float2;
|
||||
using double2 = clblast::double2;
|
||||
|
||||
// Main function (not within the clblast namespace)
|
||||
int main(int argc, char *argv[]) {
|
||||
clblast::RunTests<clblast::TestXhpr2<float2>, float2, float2>(argc, argv, false, "CHPR2");
|
||||
clblast::RunTests<clblast::TestXhpr2<double2>, double2, double2>(argc, argv, true, "ZHPR2");
|
||||
return 0;
|
||||
}
|
||||
|
||||
// =================================================================================================
|
26
test/correctness/routines/level2/xsbmv.cc
Normal file
26
test/correctness/routines/level2/xsbmv.cc
Normal file
|
@ -0,0 +1,26 @@
|
|||
|
||||
// =================================================================================================
|
||||
// This file is part of the CLBlast project. The project is licensed under Apache Version 2.0. This
|
||||
// project loosely follows the Google C++ styleguide and uses a tab-size of two spaces and a max-
|
||||
// width of 100 characters per line.
|
||||
//
|
||||
// Author(s):
|
||||
// Cedric Nugteren <www.cedricnugteren.nl>
|
||||
//
|
||||
// =================================================================================================
|
||||
|
||||
#include "correctness/testblas.h"
|
||||
#include "routines/level2/xsbmv.h"
|
||||
|
||||
// Shortcuts to the clblast namespace
|
||||
using float2 = clblast::float2;
|
||||
using double2 = clblast::double2;
|
||||
|
||||
// Main function (not within the clblast namespace)
|
||||
int main(int argc, char *argv[]) {
|
||||
clblast::RunTests<clblast::TestXsbmv<float>, float, float>(argc, argv, false, "SSBMV");
|
||||
clblast::RunTests<clblast::TestXsbmv<double>, double, double>(argc, argv, true, "DSBMV");
|
||||
return 0;
|
||||
}
|
||||
|
||||
// =================================================================================================
|
26
test/correctness/routines/level2/xspmv.cc
Normal file
26
test/correctness/routines/level2/xspmv.cc
Normal file
|
@ -0,0 +1,26 @@
|
|||
|
||||
// =================================================================================================
|
||||
// This file is part of the CLBlast project. The project is licensed under Apache Version 2.0. This
|
||||
// project loosely follows the Google C++ styleguide and uses a tab-size of two spaces and a max-
|
||||
// width of 100 characters per line.
|
||||
//
|
||||
// Author(s):
|
||||
// Cedric Nugteren <www.cedricnugteren.nl>
|
||||
//
|
||||
// =================================================================================================
|
||||
|
||||
#include "correctness/testblas.h"
|
||||
#include "routines/level2/xspmv.h"
|
||||
|
||||
// Shortcuts to the clblast namespace
|
||||
using float2 = clblast::float2;
|
||||
using double2 = clblast::double2;
|
||||
|
||||
// Main function (not within the clblast namespace)
|
||||
int main(int argc, char *argv[]) {
|
||||
clblast::RunTests<clblast::TestXspmv<float>, float, float>(argc, argv, false, "SSPMV");
|
||||
clblast::RunTests<clblast::TestXspmv<double>, double, double>(argc, argv, true, "DSPMV");
|
||||
return 0;
|
||||
}
|
||||
|
||||
// =================================================================================================
|
26
test/correctness/routines/level2/xspr.cc
Normal file
26
test/correctness/routines/level2/xspr.cc
Normal file
|
@ -0,0 +1,26 @@
|
|||
|
||||
// =================================================================================================
|
||||
// This file is part of the CLBlast project. The project is licensed under Apache Version 2.0. This
|
||||
// project loosely follows the Google C++ styleguide and uses a tab-size of two spaces and a max-
|
||||
// width of 100 characters per line.
|
||||
//
|
||||
// Author(s):
|
||||
// Cedric Nugteren <www.cedricnugteren.nl>
|
||||
//
|
||||
// =================================================================================================
|
||||
|
||||
#include "correctness/testblas.h"
|
||||
#include "routines/level2/xspr.h"
|
||||
|
||||
// Shortcuts to the clblast namespace
|
||||
using float2 = clblast::float2;
|
||||
using double2 = clblast::double2;
|
||||
|
||||
// Main function (not within the clblast namespace)
|
||||
int main(int argc, char *argv[]) {
|
||||
clblast::RunTests<clblast::TestXspr<float>, float, float>(argc, argv, false, "SSPR");
|
||||
clblast::RunTests<clblast::TestXspr<double>, double, double>(argc, argv, true, "DSPR");
|
||||
return 0;
|
||||
}
|
||||
|
||||
// =================================================================================================
|
26
test/correctness/routines/level2/xspr2.cc
Normal file
26
test/correctness/routines/level2/xspr2.cc
Normal file
|
@ -0,0 +1,26 @@
|
|||
|
||||
// =================================================================================================
|
||||
// This file is part of the CLBlast project. The project is licensed under Apache Version 2.0. This
|
||||
// project loosely follows the Google C++ styleguide and uses a tab-size of two spaces and a max-
|
||||
// width of 100 characters per line.
|
||||
//
|
||||
// Author(s):
|
||||
// Cedric Nugteren <www.cedricnugteren.nl>
|
||||
//
|
||||
// =================================================================================================
|
||||
|
||||
#include "correctness/testblas.h"
|
||||
#include "routines/level2/xspr2.h"
|
||||
|
||||
// Shortcuts to the clblast namespace
|
||||
using float2 = clblast::float2;
|
||||
using double2 = clblast::double2;
|
||||
|
||||
// Main function (not within the clblast namespace)
|
||||
int main(int argc, char *argv[]) {
|
||||
clblast::RunTests<clblast::TestXspr2<float>, float, float>(argc, argv, false, "SSPR2");
|
||||
clblast::RunTests<clblast::TestXspr2<double>, double, double>(argc, argv, true, "DSPR2");
|
||||
return 0;
|
||||
}
|
||||
|
||||
// =================================================================================================
|
|
@ -7,14 +7,14 @@
|
|||
// Author(s):
|
||||
// Cedric Nugteren <www.cedricnugteren.nl>
|
||||
//
|
||||
// This file implements the tests for the Xsymv routine.
|
||||
//
|
||||
// =================================================================================================
|
||||
|
||||
#include "correctness/testblas.h"
|
||||
#include "routines/level2/xsymv.h"
|
||||
|
||||
// =================================================================================================
|
||||
// Shortcuts to the clblast namespace
|
||||
using float2 = clblast::float2;
|
||||
using double2 = clblast::double2;
|
||||
|
||||
// Main function (not within the clblast namespace)
|
||||
int main(int argc, char *argv[]) {
|
||||
|
|
26
test/correctness/routines/level2/xsyr.cc
Normal file
26
test/correctness/routines/level2/xsyr.cc
Normal file
|
@ -0,0 +1,26 @@
|
|||
|
||||
// =================================================================================================
|
||||
// This file is part of the CLBlast project. The project is licensed under Apache Version 2.0. This
|
||||
// project loosely follows the Google C++ styleguide and uses a tab-size of two spaces and a max-
|
||||
// width of 100 characters per line.
|
||||
//
|
||||
// Author(s):
|
||||
// Cedric Nugteren <www.cedricnugteren.nl>
|
||||
//
|
||||
// =================================================================================================
|
||||
|
||||
#include "correctness/testblas.h"
|
||||
#include "routines/level2/xsyr.h"
|
||||
|
||||
// Shortcuts to the clblast namespace
|
||||
using float2 = clblast::float2;
|
||||
using double2 = clblast::double2;
|
||||
|
||||
// Main function (not within the clblast namespace)
|
||||
int main(int argc, char *argv[]) {
|
||||
clblast::RunTests<clblast::TestXsyr<float>, float, float>(argc, argv, false, "SSYR");
|
||||
clblast::RunTests<clblast::TestXsyr<double>, double, double>(argc, argv, true, "DSYR");
|
||||
return 0;
|
||||
}
|
||||
|
||||
// =================================================================================================
|
26
test/correctness/routines/level2/xsyr2.cc
Normal file
26
test/correctness/routines/level2/xsyr2.cc
Normal file
|
@ -0,0 +1,26 @@
|
|||
|
||||
// =================================================================================================
|
||||
// This file is part of the CLBlast project. The project is licensed under Apache Version 2.0. This
|
||||
// project loosely follows the Google C++ styleguide and uses a tab-size of two spaces and a max-
|
||||
// width of 100 characters per line.
|
||||
//
|
||||
// Author(s):
|
||||
// Cedric Nugteren <www.cedricnugteren.nl>
|
||||
//
|
||||
// =================================================================================================
|
||||
|
||||
#include "correctness/testblas.h"
|
||||
#include "routines/level2/xsyr2.h"
|
||||
|
||||
// Shortcuts to the clblast namespace
|
||||
using float2 = clblast::float2;
|
||||
using double2 = clblast::double2;
|
||||
|
||||
// Main function (not within the clblast namespace)
|
||||
int main(int argc, char *argv[]) {
|
||||
clblast::RunTests<clblast::TestXsyr2<float>, float, float>(argc, argv, false, "SSYR2");
|
||||
clblast::RunTests<clblast::TestXsyr2<double>, double, double>(argc, argv, true, "DSYR2");
|
||||
return 0;
|
||||
}
|
||||
|
||||
// =================================================================================================
|
28
test/correctness/routines/level2/xtbmv.cc
Normal file
28
test/correctness/routines/level2/xtbmv.cc
Normal file
|
@ -0,0 +1,28 @@
|
|||
|
||||
// =================================================================================================
|
||||
// This file is part of the CLBlast project. The project is licensed under Apache Version 2.0. This
|
||||
// project loosely follows the Google C++ styleguide and uses a tab-size of two spaces and a max-
|
||||
// width of 100 characters per line.
|
||||
//
|
||||
// Author(s):
|
||||
// Cedric Nugteren <www.cedricnugteren.nl>
|
||||
//
|
||||
// =================================================================================================
|
||||
|
||||
#include "correctness/testblas.h"
|
||||
#include "routines/level2/xtbmv.h"
|
||||
|
||||
// Shortcuts to the clblast namespace
|
||||
using float2 = clblast::float2;
|
||||
using double2 = clblast::double2;
|
||||
|
||||
// Main function (not within the clblast namespace)
|
||||
int main(int argc, char *argv[]) {
|
||||
clblast::RunTests<clblast::TestXtbmv<float>, float, float>(argc, argv, false, "STBMV");
|
||||
clblast::RunTests<clblast::TestXtbmv<double>, double, double>(argc, argv, true, "DTBMV");
|
||||
clblast::RunTests<clblast::TestXtbmv<float2>, float2, float2>(argc, argv, true, "CTBMV");
|
||||
clblast::RunTests<clblast::TestXtbmv<double2>, double2, double2>(argc, argv, true, "ZTBMV");
|
||||
return 0;
|
||||
}
|
||||
|
||||
// =================================================================================================
|
28
test/correctness/routines/level2/xtbsv.cc
Normal file
28
test/correctness/routines/level2/xtbsv.cc
Normal file
|
@ -0,0 +1,28 @@
|
|||
|
||||
// =================================================================================================
|
||||
// This file is part of the CLBlast project. The project is licensed under Apache Version 2.0. This
|
||||
// project loosely follows the Google C++ styleguide and uses a tab-size of two spaces and a max-
|
||||
// width of 100 characters per line.
|
||||
//
|
||||
// Author(s):
|
||||
// Cedric Nugteren <www.cedricnugteren.nl>
|
||||
//
|
||||
// =================================================================================================
|
||||
|
||||
#include "correctness/testblas.h"
|
||||
#include "routines/level2/xtbsv.h"
|
||||
|
||||
// Shortcuts to the clblast namespace
|
||||
using float2 = clblast::float2;
|
||||
using double2 = clblast::double2;
|
||||
|
||||
// Main function (not within the clblast namespace)
|
||||
int main(int argc, char *argv[]) {
|
||||
clblast::RunTests<clblast::TestXtbsv<float>, float, float>(argc, argv, false, "STBSV");
|
||||
clblast::RunTests<clblast::TestXtbsv<double>, double, double>(argc, argv, true, "DTBSV");
|
||||
clblast::RunTests<clblast::TestXtbsv<float2>, float2, float2>(argc, argv, true, "CTBSV");
|
||||
clblast::RunTests<clblast::TestXtbsv<double2>, double2, double2>(argc, argv, true, "ZTBSV");
|
||||
return 0;
|
||||
}
|
||||
|
||||
// =================================================================================================
|
28
test/correctness/routines/level2/xtpmv.cc
Normal file
28
test/correctness/routines/level2/xtpmv.cc
Normal file
|
@ -0,0 +1,28 @@
|
|||
|
||||
// =================================================================================================
|
||||
// This file is part of the CLBlast project. The project is licensed under Apache Version 2.0. This
|
||||
// project loosely follows the Google C++ styleguide and uses a tab-size of two spaces and a max-
|
||||
// width of 100 characters per line.
|
||||
//
|
||||
// Author(s):
|
||||
// Cedric Nugteren <www.cedricnugteren.nl>
|
||||
//
|
||||
// =================================================================================================
|
||||
|
||||
#include "correctness/testblas.h"
|
||||
#include "routines/level2/xtpmv.h"
|
||||
|
||||
// Shortcuts to the clblast namespace
|
||||
using float2 = clblast::float2;
|
||||
using double2 = clblast::double2;
|
||||
|
||||
// Main function (not within the clblast namespace)
|
||||
int main(int argc, char *argv[]) {
|
||||
clblast::RunTests<clblast::TestXtpmv<float>, float, float>(argc, argv, false, "STPMV");
|
||||
clblast::RunTests<clblast::TestXtpmv<double>, double, double>(argc, argv, true, "DTPMV");
|
||||
clblast::RunTests<clblast::TestXtpmv<float2>, float2, float2>(argc, argv, true, "CTPMV");
|
||||
clblast::RunTests<clblast::TestXtpmv<double2>, double2, double2>(argc, argv, true, "ZTPMV");
|
||||
return 0;
|
||||
}
|
||||
|
||||
// =================================================================================================
|
28
test/correctness/routines/level2/xtpsv.cc
Normal file
28
test/correctness/routines/level2/xtpsv.cc
Normal file
|
@ -0,0 +1,28 @@
|
|||
|
||||
// =================================================================================================
|
||||
// This file is part of the CLBlast project. The project is licensed under Apache Version 2.0. This
|
||||
// project loosely follows the Google C++ styleguide and uses a tab-size of two spaces and a max-
|
||||
// width of 100 characters per line.
|
||||
//
|
||||
// Author(s):
|
||||
// Cedric Nugteren <www.cedricnugteren.nl>
|
||||
//
|
||||
// =================================================================================================
|
||||
|
||||
#include "correctness/testblas.h"
|
||||
#include "routines/level2/xtpsv.h"
|
||||
|
||||
// Shortcuts to the clblast namespace
|
||||
using float2 = clblast::float2;
|
||||
using double2 = clblast::double2;
|
||||
|
||||
// Main function (not within the clblast namespace)
|
||||
int main(int argc, char *argv[]) {
|
||||
clblast::RunTests<clblast::TestXtpsv<float>, float, float>(argc, argv, false, "STPSV");
|
||||
clblast::RunTests<clblast::TestXtpsv<double>, double, double>(argc, argv, true, "DTPSV");
|
||||
clblast::RunTests<clblast::TestXtpsv<float2>, float2, float2>(argc, argv, true, "CTPSV");
|
||||
clblast::RunTests<clblast::TestXtpsv<double2>, double2, double2>(argc, argv, true, "ZTPSV");
|
||||
return 0;
|
||||
}
|
||||
|
||||
// =================================================================================================
|
28
test/correctness/routines/level2/xtrmv.cc
Normal file
28
test/correctness/routines/level2/xtrmv.cc
Normal file
|
@ -0,0 +1,28 @@
|
|||
|
||||
// =================================================================================================
|
||||
// This file is part of the CLBlast project. The project is licensed under Apache Version 2.0. This
|
||||
// project loosely follows the Google C++ styleguide and uses a tab-size of two spaces and a max-
|
||||
// width of 100 characters per line.
|
||||
//
|
||||
// Author(s):
|
||||
// Cedric Nugteren <www.cedricnugteren.nl>
|
||||
//
|
||||
// =================================================================================================
|
||||
|
||||
#include "correctness/testblas.h"
|
||||
#include "routines/level2/xtrmv.h"
|
||||
|
||||
// Shortcuts to the clblast namespace
|
||||
using float2 = clblast::float2;
|
||||
using double2 = clblast::double2;
|
||||
|
||||
// Main function (not within the clblast namespace)
|
||||
int main(int argc, char *argv[]) {
|
||||
clblast::RunTests<clblast::TestXtrmv<float>, float, float>(argc, argv, false, "STRMV");
|
||||
clblast::RunTests<clblast::TestXtrmv<double>, double, double>(argc, argv, true, "DTRMV");
|
||||
clblast::RunTests<clblast::TestXtrmv<float2>, float2, float2>(argc, argv, true, "CTRMV");
|
||||
clblast::RunTests<clblast::TestXtrmv<double2>, double2, double2>(argc, argv, true, "ZTRMV");
|
||||
return 0;
|
||||
}
|
||||
|
||||
// =================================================================================================
|
28
test/correctness/routines/level2/xtrsv.cc
Normal file
28
test/correctness/routines/level2/xtrsv.cc
Normal file
|
@ -0,0 +1,28 @@
|
|||
|
||||
// =================================================================================================
|
||||
// This file is part of the CLBlast project. The project is licensed under Apache Version 2.0. This
|
||||
// project loosely follows the Google C++ styleguide and uses a tab-size of two spaces and a max-
|
||||
// width of 100 characters per line.
|
||||
//
|
||||
// Author(s):
|
||||
// Cedric Nugteren <www.cedricnugteren.nl>
|
||||
//
|
||||
// =================================================================================================
|
||||
|
||||
#include "correctness/testblas.h"
|
||||
#include "routines/level2/xtrsv.h"
|
||||
|
||||
// Shortcuts to the clblast namespace
|
||||
using float2 = clblast::float2;
|
||||
using double2 = clblast::double2;
|
||||
|
||||
// Main function (not within the clblast namespace)
|
||||
int main(int argc, char *argv[]) {
|
||||
clblast::RunTests<clblast::TestXtrsv<float>, float, float>(argc, argv, false, "STRSV");
|
||||
clblast::RunTests<clblast::TestXtrsv<double>, double, double>(argc, argv, true, "DTRSV");
|
||||
clblast::RunTests<clblast::TestXtrsv<float2>, float2, float2>(argc, argv, true, "CTRSV");
|
||||
clblast::RunTests<clblast::TestXtrsv<double2>, double2, double2>(argc, argv, true, "ZTRSV");
|
||||
return 0;
|
||||
}
|
||||
|
||||
// =================================================================================================
|
|
@ -7,15 +7,11 @@
|
|||
// Author(s):
|
||||
// Cedric Nugteren <www.cedricnugteren.nl>
|
||||
//
|
||||
// This file implements the tests for the Xgemm routine.
|
||||
//
|
||||
// =================================================================================================
|
||||
|
||||
#include "correctness/testblas.h"
|
||||
#include "routines/level3/xgemm.h"
|
||||
|
||||
// =================================================================================================
|
||||
|
||||
// Shortcuts to the clblast namespace
|
||||
using float2 = clblast::float2;
|
||||
using double2 = clblast::double2;
|
||||
|
|
|
@ -7,22 +7,18 @@
|
|||
// Author(s):
|
||||
// Cedric Nugteren <www.cedricnugteren.nl>
|
||||
//
|
||||
// This file implements the tests for the Xhemm routine.
|
||||
//
|
||||
// =================================================================================================
|
||||
|
||||
#include "correctness/testblas.h"
|
||||
#include "routines/level3/xhemm.h"
|
||||
|
||||
// =================================================================================================
|
||||
|
||||
// Shortcuts to the clblast namespace
|
||||
using float2 = clblast::float2;
|
||||
using double2 = clblast::double2;
|
||||
|
||||
// Main function (not within the clblast namespace)
|
||||
int main(int argc, char *argv[]) {
|
||||
clblast::RunTests<clblast::TestXhemm<float2>, float2, float2>(argc, argv, true, "CHEMM");
|
||||
clblast::RunTests<clblast::TestXhemm<float2>, float2, float2>(argc, argv, false, "CHEMM");
|
||||
clblast::RunTests<clblast::TestXhemm<double2>, double2, double2>(argc, argv, true, "ZHEMM");
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -7,15 +7,11 @@
|
|||
// Author(s):
|
||||
// Cedric Nugteren <www.cedricnugteren.nl>
|
||||
//
|
||||
// This file implements the tests for the Xher2k routine.
|
||||
//
|
||||
// =================================================================================================
|
||||
|
||||
#include "correctness/testblas.h"
|
||||
#include "routines/level3/xher2k.h"
|
||||
|
||||
// =================================================================================================
|
||||
|
||||
// Shortcuts to the clblast namespace
|
||||
using float2 = clblast::float2;
|
||||
using double2 = clblast::double2;
|
||||
|
|
|
@ -7,15 +7,11 @@
|
|||
// Author(s):
|
||||
// Cedric Nugteren <www.cedricnugteren.nl>
|
||||
//
|
||||
// This file implements the tests for the Xherk routine.
|
||||
//
|
||||
// =================================================================================================
|
||||
|
||||
#include "correctness/testblas.h"
|
||||
#include "routines/level3/xherk.h"
|
||||
|
||||
// =================================================================================================
|
||||
|
||||
// Shortcuts to the clblast namespace
|
||||
using float2 = clblast::float2;
|
||||
using double2 = clblast::double2;
|
||||
|
|
|
@ -7,15 +7,11 @@
|
|||
// Author(s):
|
||||
// Cedric Nugteren <www.cedricnugteren.nl>
|
||||
//
|
||||
// This file implements the tests for the Xsymm routine.
|
||||
//
|
||||
// =================================================================================================
|
||||
|
||||
#include "correctness/testblas.h"
|
||||
#include "routines/level3/xsymm.h"
|
||||
|
||||
// =================================================================================================
|
||||
|
||||
// Shortcuts to the clblast namespace
|
||||
using float2 = clblast::float2;
|
||||
using double2 = clblast::double2;
|
||||
|
|
|
@ -7,15 +7,11 @@
|
|||
// Author(s):
|
||||
// Cedric Nugteren <www.cedricnugteren.nl>
|
||||
//
|
||||
// This file implements the tests for the Xsyr2k routine.
|
||||
//
|
||||
// =================================================================================================
|
||||
|
||||
#include "correctness/testblas.h"
|
||||
#include "routines/level3/xsyr2k.h"
|
||||
|
||||
// =================================================================================================
|
||||
|
||||
// Shortcuts to the clblast namespace
|
||||
using float2 = clblast::float2;
|
||||
using double2 = clblast::double2;
|
||||
|
|
|
@ -7,15 +7,11 @@
|
|||
// Author(s):
|
||||
// Cedric Nugteren <www.cedricnugteren.nl>
|
||||
//
|
||||
// This file implements the tests for the Xsyrk routine.
|
||||
//
|
||||
// =================================================================================================
|
||||
|
||||
#include "correctness/testblas.h"
|
||||
#include "routines/level3/xsyrk.h"
|
||||
|
||||
// =================================================================================================
|
||||
|
||||
// Shortcuts to the clblast namespace
|
||||
using float2 = clblast::float2;
|
||||
using double2 = clblast::double2;
|
||||
|
|
|
@ -7,15 +7,11 @@
|
|||
// Author(s):
|
||||
// Cedric Nugteren <www.cedricnugteren.nl>
|
||||
//
|
||||
// This file implements the tests for the Xtrmm routine.
|
||||
//
|
||||
// =================================================================================================
|
||||
|
||||
#include "correctness/testblas.h"
|
||||
#include "routines/level3/xtrmm.h"
|
||||
|
||||
// =================================================================================================
|
||||
|
||||
// Shortcuts to the clblast namespace
|
||||
using float2 = clblast::float2;
|
||||
using double2 = clblast::double2;
|
||||
|
|
28
test/correctness/routines/level3/xtrsm.cc
Normal file
28
test/correctness/routines/level3/xtrsm.cc
Normal file
|
@ -0,0 +1,28 @@
|
|||
|
||||
// =================================================================================================
|
||||
// This file is part of the CLBlast project. The project is licensed under Apache Version 2.0. This
|
||||
// project loosely follows the Google C++ styleguide and uses a tab-size of two spaces and a max-
|
||||
// width of 100 characters per line.
|
||||
//
|
||||
// Author(s):
|
||||
// Cedric Nugteren <www.cedricnugteren.nl>
|
||||
//
|
||||
// =================================================================================================
|
||||
|
||||
#include "correctness/testblas.h"
|
||||
#include "routines/level3/xtrsm.h"
|
||||
|
||||
// Shortcuts to the clblast namespace
|
||||
using float2 = clblast::float2;
|
||||
using double2 = clblast::double2;
|
||||
|
||||
// Main function (not within the clblast namespace)
|
||||
int main(int argc, char *argv[]) {
|
||||
clblast::RunTests<clblast::TestXtrsm<float>, float, float>(argc, argv, false, "STRSM");
|
||||
clblast::RunTests<clblast::TestXtrsm<double>, double, double>(argc, argv, true, "DTRSM");
|
||||
clblast::RunTests<clblast::TestXtrsm<float2>, float2, float2>(argc, argv, true, "CTRSM");
|
||||
clblast::RunTests<clblast::TestXtrsm<double2>, double2, double2>(argc, argv, true, "ZTRSM");
|
||||
return 0;
|
||||
}
|
||||
|
||||
// =================================================================================================
|
|
@ -7,15 +7,11 @@
|
|||
// Author(s):
|
||||
// Cedric Nugteren <www.cedricnugteren.nl>
|
||||
//
|
||||
// This file implements the Xaxpy command-line interface performance tester.
|
||||
//
|
||||
// =================================================================================================
|
||||
|
||||
#include "performance/client.h"
|
||||
#include "routines/level1/xaxpy.h"
|
||||
|
||||
// =================================================================================================
|
||||
|
||||
// Shortcuts to the clblast namespace
|
||||
using float2 = clblast::float2;
|
||||
using double2 = clblast::double2;
|
||||
|
@ -23,8 +19,7 @@ using double2 = clblast::double2;
|
|||
// Main function (not within the clblast namespace)
|
||||
int main(int argc, char *argv[]) {
|
||||
switch(clblast::GetPrecision(argc, argv)) {
|
||||
case clblast::Precision::kHalf:
|
||||
throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kHalf: throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kSingle:
|
||||
clblast::RunClient<clblast::TestXaxpy<float>, float, float>(argc, argv); break;
|
||||
case clblast::Precision::kDouble:
|
||||
|
|
|
@ -7,15 +7,11 @@
|
|||
// Author(s):
|
||||
// Cedric Nugteren <www.cedricnugteren.nl>
|
||||
//
|
||||
// This file implements the Xcopy command-line interface performance tester.
|
||||
//
|
||||
// =================================================================================================
|
||||
|
||||
#include "performance/client.h"
|
||||
#include "routines/level1/xcopy.h"
|
||||
|
||||
// =================================================================================================
|
||||
|
||||
// Shortcuts to the clblast namespace
|
||||
using float2 = clblast::float2;
|
||||
using double2 = clblast::double2;
|
||||
|
@ -23,8 +19,7 @@ using double2 = clblast::double2;
|
|||
// Main function (not within the clblast namespace)
|
||||
int main(int argc, char *argv[]) {
|
||||
switch(clblast::GetPrecision(argc, argv)) {
|
||||
case clblast::Precision::kHalf:
|
||||
throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kHalf: throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kSingle:
|
||||
clblast::RunClient<clblast::TestXcopy<float>, float, float>(argc, argv); break;
|
||||
case clblast::Precision::kDouble:
|
||||
|
|
|
@ -7,15 +7,11 @@
|
|||
// Author(s):
|
||||
// Cedric Nugteren <www.cedricnugteren.nl>
|
||||
//
|
||||
// This file implements the Xdot command-line interface performance tester.
|
||||
//
|
||||
// =================================================================================================
|
||||
|
||||
#include "performance/client.h"
|
||||
#include "routines/level1/xdot.h"
|
||||
|
||||
// =================================================================================================
|
||||
|
||||
// Shortcuts to the clblast namespace
|
||||
using float2 = clblast::float2;
|
||||
using double2 = clblast::double2;
|
||||
|
@ -23,16 +19,13 @@ using double2 = clblast::double2;
|
|||
// Main function (not within the clblast namespace)
|
||||
int main(int argc, char *argv[]) {
|
||||
switch(clblast::GetPrecision(argc, argv)) {
|
||||
case clblast::Precision::kHalf:
|
||||
throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kHalf: throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kSingle:
|
||||
clblast::RunClient<clblast::TestXdot<float>, float, float>(argc, argv); break;
|
||||
case clblast::Precision::kDouble:
|
||||
clblast::RunClient<clblast::TestXdot<double>, double, double>(argc, argv); break;
|
||||
case clblast::Precision::kComplexSingle:
|
||||
throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kComplexDouble:
|
||||
throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kComplexSingle: throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kComplexDouble: throw std::runtime_error("Unsupported precision mode");
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -7,15 +7,11 @@
|
|||
// Author(s):
|
||||
// Cedric Nugteren <www.cedricnugteren.nl>
|
||||
//
|
||||
// This file implements the Xdotc command-line interface performance tester.
|
||||
//
|
||||
// =================================================================================================
|
||||
|
||||
#include "performance/client.h"
|
||||
#include "routines/level1/xdotc.h"
|
||||
|
||||
// =================================================================================================
|
||||
|
||||
// Shortcuts to the clblast namespace
|
||||
using float2 = clblast::float2;
|
||||
using double2 = clblast::double2;
|
||||
|
@ -23,12 +19,9 @@ using double2 = clblast::double2;
|
|||
// Main function (not within the clblast namespace)
|
||||
int main(int argc, char *argv[]) {
|
||||
switch(clblast::GetPrecision(argc, argv)) {
|
||||
case clblast::Precision::kHalf:
|
||||
throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kSingle:
|
||||
throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kDouble:
|
||||
throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kHalf: throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kSingle: throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kDouble: throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kComplexSingle:
|
||||
clblast::RunClient<clblast::TestXdotc<float2>, float2, float2>(argc, argv); break;
|
||||
case clblast::Precision::kComplexDouble:
|
||||
|
|
|
@ -7,15 +7,11 @@
|
|||
// Author(s):
|
||||
// Cedric Nugteren <www.cedricnugteren.nl>
|
||||
//
|
||||
// This file implements the Xdotu command-line interface performance tester.
|
||||
//
|
||||
// =================================================================================================
|
||||
|
||||
#include "performance/client.h"
|
||||
#include "routines/level1/xdotu.h"
|
||||
|
||||
// =================================================================================================
|
||||
|
||||
// Shortcuts to the clblast namespace
|
||||
using float2 = clblast::float2;
|
||||
using double2 = clblast::double2;
|
||||
|
@ -23,12 +19,9 @@ using double2 = clblast::double2;
|
|||
// Main function (not within the clblast namespace)
|
||||
int main(int argc, char *argv[]) {
|
||||
switch(clblast::GetPrecision(argc, argv)) {
|
||||
case clblast::Precision::kHalf:
|
||||
throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kSingle:
|
||||
throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kDouble:
|
||||
throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kHalf: throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kSingle: throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kDouble: throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kComplexSingle:
|
||||
clblast::RunClient<clblast::TestXdotu<float2>, float2, float2>(argc, argv); break;
|
||||
case clblast::Precision::kComplexDouble:
|
||||
|
|
|
@ -7,15 +7,11 @@
|
|||
// Author(s):
|
||||
// Cedric Nugteren <www.cedricnugteren.nl>
|
||||
//
|
||||
// This file implements the Xscal command-line interface performance tester.
|
||||
//
|
||||
// =================================================================================================
|
||||
|
||||
#include "performance/client.h"
|
||||
#include "routines/level1/xscal.h"
|
||||
|
||||
// =================================================================================================
|
||||
|
||||
// Shortcuts to the clblast namespace
|
||||
using float2 = clblast::float2;
|
||||
using double2 = clblast::double2;
|
||||
|
@ -23,8 +19,7 @@ using double2 = clblast::double2;
|
|||
// Main function (not within the clblast namespace)
|
||||
int main(int argc, char *argv[]) {
|
||||
switch(clblast::GetPrecision(argc, argv)) {
|
||||
case clblast::Precision::kHalf:
|
||||
throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kHalf: throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kSingle:
|
||||
clblast::RunClient<clblast::TestXscal<float>, float, float>(argc, argv); break;
|
||||
case clblast::Precision::kDouble:
|
||||
|
|
|
@ -7,15 +7,11 @@
|
|||
// Author(s):
|
||||
// Cedric Nugteren <www.cedricnugteren.nl>
|
||||
//
|
||||
// This file implements the Xswap command-line interface performance tester.
|
||||
//
|
||||
// =================================================================================================
|
||||
|
||||
#include "performance/client.h"
|
||||
#include "routines/level1/xswap.h"
|
||||
|
||||
// =================================================================================================
|
||||
|
||||
// Shortcuts to the clblast namespace
|
||||
using float2 = clblast::float2;
|
||||
using double2 = clblast::double2;
|
||||
|
@ -23,8 +19,7 @@ using double2 = clblast::double2;
|
|||
// Main function (not within the clblast namespace)
|
||||
int main(int argc, char *argv[]) {
|
||||
switch(clblast::GetPrecision(argc, argv)) {
|
||||
case clblast::Precision::kHalf:
|
||||
throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kHalf: throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kSingle:
|
||||
clblast::RunClient<clblast::TestXswap<float>, float, float>(argc, argv); break;
|
||||
case clblast::Precision::kDouble:
|
||||
|
|
35
test/performance/routines/level2/xgbmv.cc
Normal file
35
test/performance/routines/level2/xgbmv.cc
Normal file
|
@ -0,0 +1,35 @@
|
|||
|
||||
// =================================================================================================
|
||||
// This file is part of the CLBlast project. The project is licensed under Apache Version 2.0. This
|
||||
// project loosely follows the Google C++ styleguide and uses a tab-size of two spaces and a max-
|
||||
// width of 100 characters per line.
|
||||
//
|
||||
// Author(s):
|
||||
// Cedric Nugteren <www.cedricnugteren.nl>
|
||||
//
|
||||
// =================================================================================================
|
||||
|
||||
#include "performance/client.h"
|
||||
#include "routines/level2/xgbmv.h"
|
||||
|
||||
// Shortcuts to the clblast namespace
|
||||
using float2 = clblast::float2;
|
||||
using double2 = clblast::double2;
|
||||
|
||||
// Main function (not within the clblast namespace)
|
||||
int main(int argc, char *argv[]) {
|
||||
switch(clblast::GetPrecision(argc, argv)) {
|
||||
case clblast::Precision::kHalf: throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kSingle:
|
||||
clblast::RunClient<clblast::TestXgbmv<float>, float, float>(argc, argv); break;
|
||||
case clblast::Precision::kDouble:
|
||||
clblast::RunClient<clblast::TestXgbmv<double>, double, double>(argc, argv); break;
|
||||
case clblast::Precision::kComplexSingle:
|
||||
clblast::RunClient<clblast::TestXgbmv<float2>, float2, float2>(argc, argv); break;
|
||||
case clblast::Precision::kComplexDouble:
|
||||
clblast::RunClient<clblast::TestXgbmv<double2>, double2, double2>(argc, argv); break;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
// =================================================================================================
|
|
@ -7,15 +7,11 @@
|
|||
// Author(s):
|
||||
// Cedric Nugteren <www.cedricnugteren.nl>
|
||||
//
|
||||
// This file implements the Xgemv command-line interface performance tester.
|
||||
//
|
||||
// =================================================================================================
|
||||
|
||||
#include "performance/client.h"
|
||||
#include "routines/level2/xgemv.h"
|
||||
|
||||
// =================================================================================================
|
||||
|
||||
// Shortcuts to the clblast namespace
|
||||
using float2 = clblast::float2;
|
||||
using double2 = clblast::double2;
|
||||
|
@ -23,8 +19,7 @@ using double2 = clblast::double2;
|
|||
// Main function (not within the clblast namespace)
|
||||
int main(int argc, char *argv[]) {
|
||||
switch(clblast::GetPrecision(argc, argv)) {
|
||||
case clblast::Precision::kHalf:
|
||||
throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kHalf: throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kSingle:
|
||||
clblast::RunClient<clblast::TestXgemv<float>, float, float>(argc, argv); break;
|
||||
case clblast::Precision::kDouble:
|
||||
|
|
33
test/performance/routines/level2/xger.cc
Normal file
33
test/performance/routines/level2/xger.cc
Normal file
|
@ -0,0 +1,33 @@
|
|||
|
||||
// =================================================================================================
|
||||
// This file is part of the CLBlast project. The project is licensed under Apache Version 2.0. This
|
||||
// project loosely follows the Google C++ styleguide and uses a tab-size of two spaces and a max-
|
||||
// width of 100 characters per line.
|
||||
//
|
||||
// Author(s):
|
||||
// Cedric Nugteren <www.cedricnugteren.nl>
|
||||
//
|
||||
// =================================================================================================
|
||||
|
||||
#include "performance/client.h"
|
||||
#include "routines/level2/xger.h"
|
||||
|
||||
// Shortcuts to the clblast namespace
|
||||
using float2 = clblast::float2;
|
||||
using double2 = clblast::double2;
|
||||
|
||||
// Main function (not within the clblast namespace)
|
||||
int main(int argc, char *argv[]) {
|
||||
switch(clblast::GetPrecision(argc, argv)) {
|
||||
case clblast::Precision::kHalf: throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kSingle:
|
||||
clblast::RunClient<clblast::TestXger<float>, float, float>(argc, argv); break;
|
||||
case clblast::Precision::kDouble:
|
||||
clblast::RunClient<clblast::TestXger<double>, double, double>(argc, argv); break;
|
||||
case clblast::Precision::kComplexSingle: throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kComplexDouble: throw std::runtime_error("Unsupported precision mode");
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
// =================================================================================================
|
33
test/performance/routines/level2/xgerc.cc
Normal file
33
test/performance/routines/level2/xgerc.cc
Normal file
|
@ -0,0 +1,33 @@
|
|||
|
||||
// =================================================================================================
|
||||
// This file is part of the CLBlast project. The project is licensed under Apache Version 2.0. This
|
||||
// project loosely follows the Google C++ styleguide and uses a tab-size of two spaces and a max-
|
||||
// width of 100 characters per line.
|
||||
//
|
||||
// Author(s):
|
||||
// Cedric Nugteren <www.cedricnugteren.nl>
|
||||
//
|
||||
// =================================================================================================
|
||||
|
||||
#include "performance/client.h"
|
||||
#include "routines/level2/xgerc.h"
|
||||
|
||||
// Shortcuts to the clblast namespace
|
||||
using float2 = clblast::float2;
|
||||
using double2 = clblast::double2;
|
||||
|
||||
// Main function (not within the clblast namespace)
|
||||
int main(int argc, char *argv[]) {
|
||||
switch(clblast::GetPrecision(argc, argv)) {
|
||||
case clblast::Precision::kHalf: throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kSingle: throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kDouble: throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kComplexSingle:
|
||||
clblast::RunClient<clblast::TestXgerc<float2>, float2, float2>(argc, argv); break;
|
||||
case clblast::Precision::kComplexDouble:
|
||||
clblast::RunClient<clblast::TestXgerc<double2>, double2, double2>(argc, argv); break;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
// =================================================================================================
|
33
test/performance/routines/level2/xgeru.cc
Normal file
33
test/performance/routines/level2/xgeru.cc
Normal file
|
@ -0,0 +1,33 @@
|
|||
|
||||
// =================================================================================================
|
||||
// This file is part of the CLBlast project. The project is licensed under Apache Version 2.0. This
|
||||
// project loosely follows the Google C++ styleguide and uses a tab-size of two spaces and a max-
|
||||
// width of 100 characters per line.
|
||||
//
|
||||
// Author(s):
|
||||
// Cedric Nugteren <www.cedricnugteren.nl>
|
||||
//
|
||||
// =================================================================================================
|
||||
|
||||
#include "performance/client.h"
|
||||
#include "routines/level2/xgeru.h"
|
||||
|
||||
// Shortcuts to the clblast namespace
|
||||
using float2 = clblast::float2;
|
||||
using double2 = clblast::double2;
|
||||
|
||||
// Main function (not within the clblast namespace)
|
||||
int main(int argc, char *argv[]) {
|
||||
switch(clblast::GetPrecision(argc, argv)) {
|
||||
case clblast::Precision::kHalf: throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kSingle: throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kDouble: throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kComplexSingle:
|
||||
clblast::RunClient<clblast::TestXgeru<float2>, float2, float2>(argc, argv); break;
|
||||
case clblast::Precision::kComplexDouble:
|
||||
clblast::RunClient<clblast::TestXgeru<double2>, double2, double2>(argc, argv); break;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
// =================================================================================================
|
33
test/performance/routines/level2/xhbmv.cc
Normal file
33
test/performance/routines/level2/xhbmv.cc
Normal file
|
@ -0,0 +1,33 @@
|
|||
|
||||
// =================================================================================================
|
||||
// This file is part of the CLBlast project. The project is licensed under Apache Version 2.0. This
|
||||
// project loosely follows the Google C++ styleguide and uses a tab-size of two spaces and a max-
|
||||
// width of 100 characters per line.
|
||||
//
|
||||
// Author(s):
|
||||
// Cedric Nugteren <www.cedricnugteren.nl>
|
||||
//
|
||||
// =================================================================================================
|
||||
|
||||
#include "performance/client.h"
|
||||
#include "routines/level2/xhbmv.h"
|
||||
|
||||
// Shortcuts to the clblast namespace
|
||||
using float2 = clblast::float2;
|
||||
using double2 = clblast::double2;
|
||||
|
||||
// Main function (not within the clblast namespace)
|
||||
int main(int argc, char *argv[]) {
|
||||
switch(clblast::GetPrecision(argc, argv)) {
|
||||
case clblast::Precision::kHalf: throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kSingle: throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kDouble: throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kComplexSingle:
|
||||
clblast::RunClient<clblast::TestXhbmv<float2>, float2, float2>(argc, argv); break;
|
||||
case clblast::Precision::kComplexDouble:
|
||||
clblast::RunClient<clblast::TestXhbmv<double2>, double2, double2>(argc, argv); break;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
// =================================================================================================
|
|
@ -7,15 +7,11 @@
|
|||
// Author(s):
|
||||
// Cedric Nugteren <www.cedricnugteren.nl>
|
||||
//
|
||||
// This file implements the Xhemv command-line interface performance tester.
|
||||
//
|
||||
// =================================================================================================
|
||||
|
||||
#include "performance/client.h"
|
||||
#include "routines/level2/xhemv.h"
|
||||
|
||||
// =================================================================================================
|
||||
|
||||
// Shortcuts to the clblast namespace
|
||||
using float2 = clblast::float2;
|
||||
using double2 = clblast::double2;
|
||||
|
@ -23,12 +19,9 @@ using double2 = clblast::double2;
|
|||
// Main function (not within the clblast namespace)
|
||||
int main(int argc, char *argv[]) {
|
||||
switch(clblast::GetPrecision(argc, argv)) {
|
||||
case clblast::Precision::kHalf:
|
||||
throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kSingle:
|
||||
throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kDouble:
|
||||
throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kHalf: throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kSingle: throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kDouble: throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kComplexSingle:
|
||||
clblast::RunClient<clblast::TestXhemv<float2>, float2, float2>(argc, argv); break;
|
||||
case clblast::Precision::kComplexDouble:
|
||||
|
|
33
test/performance/routines/level2/xher.cc
Normal file
33
test/performance/routines/level2/xher.cc
Normal file
|
@ -0,0 +1,33 @@
|
|||
|
||||
// =================================================================================================
|
||||
// This file is part of the CLBlast project. The project is licensed under Apache Version 2.0. This
|
||||
// project loosely follows the Google C++ styleguide and uses a tab-size of two spaces and a max-
|
||||
// width of 100 characters per line.
|
||||
//
|
||||
// Author(s):
|
||||
// Cedric Nugteren <www.cedricnugteren.nl>
|
||||
//
|
||||
// =================================================================================================
|
||||
|
||||
#include "performance/client.h"
|
||||
#include "routines/level2/xher.h"
|
||||
|
||||
// Shortcuts to the clblast namespace
|
||||
using float2 = clblast::float2;
|
||||
using double2 = clblast::double2;
|
||||
|
||||
// Main function (not within the clblast namespace)
|
||||
int main(int argc, char *argv[]) {
|
||||
switch(clblast::GetPrecision(argc, argv)) {
|
||||
case clblast::Precision::kHalf: throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kSingle: throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kDouble: throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kComplexSingle:
|
||||
clblast::RunClient<clblast::TestXher<float2,float>, float2, float>(argc, argv); break;
|
||||
case clblast::Precision::kComplexDouble:
|
||||
clblast::RunClient<clblast::TestXher<double2,double>, double2, double>(argc, argv); break;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
// =================================================================================================
|
33
test/performance/routines/level2/xher2.cc
Normal file
33
test/performance/routines/level2/xher2.cc
Normal file
|
@ -0,0 +1,33 @@
|
|||
|
||||
// =================================================================================================
|
||||
// This file is part of the CLBlast project. The project is licensed under Apache Version 2.0. This
|
||||
// project loosely follows the Google C++ styleguide and uses a tab-size of two spaces and a max-
|
||||
// width of 100 characters per line.
|
||||
//
|
||||
// Author(s):
|
||||
// Cedric Nugteren <www.cedricnugteren.nl>
|
||||
//
|
||||
// =================================================================================================
|
||||
|
||||
#include "performance/client.h"
|
||||
#include "routines/level2/xher2.h"
|
||||
|
||||
// Shortcuts to the clblast namespace
|
||||
using float2 = clblast::float2;
|
||||
using double2 = clblast::double2;
|
||||
|
||||
// Main function (not within the clblast namespace)
|
||||
int main(int argc, char *argv[]) {
|
||||
switch(clblast::GetPrecision(argc, argv)) {
|
||||
case clblast::Precision::kHalf: throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kSingle: throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kDouble: throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kComplexSingle:
|
||||
clblast::RunClient<clblast::TestXher2<float2>, float2, float2>(argc, argv); break;
|
||||
case clblast::Precision::kComplexDouble:
|
||||
clblast::RunClient<clblast::TestXher2<double2>, double2, double2>(argc, argv); break;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
// =================================================================================================
|
33
test/performance/routines/level2/xhpmv.cc
Normal file
33
test/performance/routines/level2/xhpmv.cc
Normal file
|
@ -0,0 +1,33 @@
|
|||
|
||||
// =================================================================================================
|
||||
// This file is part of the CLBlast project. The project is licensed under Apache Version 2.0. This
|
||||
// project loosely follows the Google C++ styleguide and uses a tab-size of two spaces and a max-
|
||||
// width of 100 characters per line.
|
||||
//
|
||||
// Author(s):
|
||||
// Cedric Nugteren <www.cedricnugteren.nl>
|
||||
//
|
||||
// =================================================================================================
|
||||
|
||||
#include "performance/client.h"
|
||||
#include "routines/level2/xhpmv.h"
|
||||
|
||||
// Shortcuts to the clblast namespace
|
||||
using float2 = clblast::float2;
|
||||
using double2 = clblast::double2;
|
||||
|
||||
// Main function (not within the clblast namespace)
|
||||
int main(int argc, char *argv[]) {
|
||||
switch(clblast::GetPrecision(argc, argv)) {
|
||||
case clblast::Precision::kHalf: throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kSingle: throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kDouble: throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kComplexSingle:
|
||||
clblast::RunClient<clblast::TestXhpmv<float2>, float2, float2>(argc, argv); break;
|
||||
case clblast::Precision::kComplexDouble:
|
||||
clblast::RunClient<clblast::TestXhpmv<double2>, double2, double2>(argc, argv); break;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
// =================================================================================================
|
33
test/performance/routines/level2/xhpr.cc
Normal file
33
test/performance/routines/level2/xhpr.cc
Normal file
|
@ -0,0 +1,33 @@
|
|||
|
||||
// =================================================================================================
|
||||
// This file is part of the CLBlast project. The project is licensed under Apache Version 2.0. This
|
||||
// project loosely follows the Google C++ styleguide and uses a tab-size of two spaces and a max-
|
||||
// width of 100 characters per line.
|
||||
//
|
||||
// Author(s):
|
||||
// Cedric Nugteren <www.cedricnugteren.nl>
|
||||
//
|
||||
// =================================================================================================
|
||||
|
||||
#include "performance/client.h"
|
||||
#include "routines/level2/xhpr.h"
|
||||
|
||||
// Shortcuts to the clblast namespace
|
||||
using float2 = clblast::float2;
|
||||
using double2 = clblast::double2;
|
||||
|
||||
// Main function (not within the clblast namespace)
|
||||
int main(int argc, char *argv[]) {
|
||||
switch(clblast::GetPrecision(argc, argv)) {
|
||||
case clblast::Precision::kHalf: throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kSingle: throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kDouble: throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kComplexSingle:
|
||||
clblast::RunClient<clblast::TestXhpr<float2,float>, float2, float>(argc, argv); break;
|
||||
case clblast::Precision::kComplexDouble:
|
||||
clblast::RunClient<clblast::TestXhpr<double2,double>, double2, double>(argc, argv); break;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
// =================================================================================================
|
33
test/performance/routines/level2/xhpr2.cc
Normal file
33
test/performance/routines/level2/xhpr2.cc
Normal file
|
@ -0,0 +1,33 @@
|
|||
|
||||
// =================================================================================================
|
||||
// This file is part of the CLBlast project. The project is licensed under Apache Version 2.0. This
|
||||
// project loosely follows the Google C++ styleguide and uses a tab-size of two spaces and a max-
|
||||
// width of 100 characters per line.
|
||||
//
|
||||
// Author(s):
|
||||
// Cedric Nugteren <www.cedricnugteren.nl>
|
||||
//
|
||||
// =================================================================================================
|
||||
|
||||
#include "performance/client.h"
|
||||
#include "routines/level2/xhpr2.h"
|
||||
|
||||
// Shortcuts to the clblast namespace
|
||||
using float2 = clblast::float2;
|
||||
using double2 = clblast::double2;
|
||||
|
||||
// Main function (not within the clblast namespace)
|
||||
int main(int argc, char *argv[]) {
|
||||
switch(clblast::GetPrecision(argc, argv)) {
|
||||
case clblast::Precision::kHalf: throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kSingle: throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kDouble: throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kComplexSingle:
|
||||
clblast::RunClient<clblast::TestXhpr2<float2>, float2, float2>(argc, argv); break;
|
||||
case clblast::Precision::kComplexDouble:
|
||||
clblast::RunClient<clblast::TestXhpr2<double2>, double2, double2>(argc, argv); break;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
// =================================================================================================
|
33
test/performance/routines/level2/xsbmv.cc
Normal file
33
test/performance/routines/level2/xsbmv.cc
Normal file
|
@ -0,0 +1,33 @@
|
|||
|
||||
// =================================================================================================
|
||||
// This file is part of the CLBlast project. The project is licensed under Apache Version 2.0. This
|
||||
// project loosely follows the Google C++ styleguide and uses a tab-size of two spaces and a max-
|
||||
// width of 100 characters per line.
|
||||
//
|
||||
// Author(s):
|
||||
// Cedric Nugteren <www.cedricnugteren.nl>
|
||||
//
|
||||
// =================================================================================================
|
||||
|
||||
#include "performance/client.h"
|
||||
#include "routines/level2/xsbmv.h"
|
||||
|
||||
// Shortcuts to the clblast namespace
|
||||
using float2 = clblast::float2;
|
||||
using double2 = clblast::double2;
|
||||
|
||||
// Main function (not within the clblast namespace)
|
||||
int main(int argc, char *argv[]) {
|
||||
switch(clblast::GetPrecision(argc, argv)) {
|
||||
case clblast::Precision::kHalf: throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kSingle:
|
||||
clblast::RunClient<clblast::TestXsbmv<float>, float, float>(argc, argv); break;
|
||||
case clblast::Precision::kDouble:
|
||||
clblast::RunClient<clblast::TestXsbmv<double>, double, double>(argc, argv); break;
|
||||
case clblast::Precision::kComplexSingle: throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kComplexDouble: throw std::runtime_error("Unsupported precision mode");
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
// =================================================================================================
|
33
test/performance/routines/level2/xspmv.cc
Normal file
33
test/performance/routines/level2/xspmv.cc
Normal file
|
@ -0,0 +1,33 @@
|
|||
|
||||
// =================================================================================================
|
||||
// This file is part of the CLBlast project. The project is licensed under Apache Version 2.0. This
|
||||
// project loosely follows the Google C++ styleguide and uses a tab-size of two spaces and a max-
|
||||
// width of 100 characters per line.
|
||||
//
|
||||
// Author(s):
|
||||
// Cedric Nugteren <www.cedricnugteren.nl>
|
||||
//
|
||||
// =================================================================================================
|
||||
|
||||
#include "performance/client.h"
|
||||
#include "routines/level2/xspmv.h"
|
||||
|
||||
// Shortcuts to the clblast namespace
|
||||
using float2 = clblast::float2;
|
||||
using double2 = clblast::double2;
|
||||
|
||||
// Main function (not within the clblast namespace)
|
||||
int main(int argc, char *argv[]) {
|
||||
switch(clblast::GetPrecision(argc, argv)) {
|
||||
case clblast::Precision::kHalf: throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kSingle:
|
||||
clblast::RunClient<clblast::TestXspmv<float>, float, float>(argc, argv); break;
|
||||
case clblast::Precision::kDouble:
|
||||
clblast::RunClient<clblast::TestXspmv<double>, double, double>(argc, argv); break;
|
||||
case clblast::Precision::kComplexSingle: throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kComplexDouble: throw std::runtime_error("Unsupported precision mode");
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
// =================================================================================================
|
33
test/performance/routines/level2/xspr.cc
Normal file
33
test/performance/routines/level2/xspr.cc
Normal file
|
@ -0,0 +1,33 @@
|
|||
|
||||
// =================================================================================================
|
||||
// This file is part of the CLBlast project. The project is licensed under Apache Version 2.0. This
|
||||
// project loosely follows the Google C++ styleguide and uses a tab-size of two spaces and a max-
|
||||
// width of 100 characters per line.
|
||||
//
|
||||
// Author(s):
|
||||
// Cedric Nugteren <www.cedricnugteren.nl>
|
||||
//
|
||||
// =================================================================================================
|
||||
|
||||
#include "performance/client.h"
|
||||
#include "routines/level2/xspr.h"
|
||||
|
||||
// Shortcuts to the clblast namespace
|
||||
using float2 = clblast::float2;
|
||||
using double2 = clblast::double2;
|
||||
|
||||
// Main function (not within the clblast namespace)
|
||||
int main(int argc, char *argv[]) {
|
||||
switch(clblast::GetPrecision(argc, argv)) {
|
||||
case clblast::Precision::kHalf: throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kSingle:
|
||||
clblast::RunClient<clblast::TestXspr<float>, float, float>(argc, argv); break;
|
||||
case clblast::Precision::kDouble:
|
||||
clblast::RunClient<clblast::TestXspr<double>, double, double>(argc, argv); break;
|
||||
case clblast::Precision::kComplexSingle: throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kComplexDouble: throw std::runtime_error("Unsupported precision mode");
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
// =================================================================================================
|
33
test/performance/routines/level2/xspr2.cc
Normal file
33
test/performance/routines/level2/xspr2.cc
Normal file
|
@ -0,0 +1,33 @@
|
|||
|
||||
// =================================================================================================
|
||||
// This file is part of the CLBlast project. The project is licensed under Apache Version 2.0. This
|
||||
// project loosely follows the Google C++ styleguide and uses a tab-size of two spaces and a max-
|
||||
// width of 100 characters per line.
|
||||
//
|
||||
// Author(s):
|
||||
// Cedric Nugteren <www.cedricnugteren.nl>
|
||||
//
|
||||
// =================================================================================================
|
||||
|
||||
#include "performance/client.h"
|
||||
#include "routines/level2/xspr2.h"
|
||||
|
||||
// Shortcuts to the clblast namespace
|
||||
using float2 = clblast::float2;
|
||||
using double2 = clblast::double2;
|
||||
|
||||
// Main function (not within the clblast namespace)
|
||||
int main(int argc, char *argv[]) {
|
||||
switch(clblast::GetPrecision(argc, argv)) {
|
||||
case clblast::Precision::kHalf: throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kSingle:
|
||||
clblast::RunClient<clblast::TestXspr2<float>, float, float>(argc, argv); break;
|
||||
case clblast::Precision::kDouble:
|
||||
clblast::RunClient<clblast::TestXspr2<double>, double, double>(argc, argv); break;
|
||||
case clblast::Precision::kComplexSingle: throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kComplexDouble: throw std::runtime_error("Unsupported precision mode");
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
// =================================================================================================
|
|
@ -7,28 +7,25 @@
|
|||
// Author(s):
|
||||
// Cedric Nugteren <www.cedricnugteren.nl>
|
||||
//
|
||||
// This file implements the Xsymv command-line interface performance tester.
|
||||
//
|
||||
// =================================================================================================
|
||||
|
||||
#include "performance/client.h"
|
||||
#include "routines/level2/xsymv.h"
|
||||
|
||||
// =================================================================================================
|
||||
// Shortcuts to the clblast namespace
|
||||
using float2 = clblast::float2;
|
||||
using double2 = clblast::double2;
|
||||
|
||||
// Main function (not within the clblast namespace)
|
||||
int main(int argc, char *argv[]) {
|
||||
switch(clblast::GetPrecision(argc, argv)) {
|
||||
case clblast::Precision::kHalf:
|
||||
throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kHalf: throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kSingle:
|
||||
clblast::RunClient<clblast::TestXsymv<float>, float, float>(argc, argv); break;
|
||||
case clblast::Precision::kDouble:
|
||||
clblast::RunClient<clblast::TestXsymv<double>, double, double>(argc, argv); break;
|
||||
case clblast::Precision::kComplexSingle:
|
||||
throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kComplexDouble:
|
||||
throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kComplexSingle: throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kComplexDouble: throw std::runtime_error("Unsupported precision mode");
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
33
test/performance/routines/level2/xsyr.cc
Normal file
33
test/performance/routines/level2/xsyr.cc
Normal file
|
@ -0,0 +1,33 @@
|
|||
|
||||
// =================================================================================================
|
||||
// This file is part of the CLBlast project. The project is licensed under Apache Version 2.0. This
|
||||
// project loosely follows the Google C++ styleguide and uses a tab-size of two spaces and a max-
|
||||
// width of 100 characters per line.
|
||||
//
|
||||
// Author(s):
|
||||
// Cedric Nugteren <www.cedricnugteren.nl>
|
||||
//
|
||||
// =================================================================================================
|
||||
|
||||
#include "performance/client.h"
|
||||
#include "routines/level2/xsyr.h"
|
||||
|
||||
// Shortcuts to the clblast namespace
|
||||
using float2 = clblast::float2;
|
||||
using double2 = clblast::double2;
|
||||
|
||||
// Main function (not within the clblast namespace)
|
||||
int main(int argc, char *argv[]) {
|
||||
switch(clblast::GetPrecision(argc, argv)) {
|
||||
case clblast::Precision::kHalf: throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kSingle:
|
||||
clblast::RunClient<clblast::TestXsyr<float>, float, float>(argc, argv); break;
|
||||
case clblast::Precision::kDouble:
|
||||
clblast::RunClient<clblast::TestXsyr<double>, double, double>(argc, argv); break;
|
||||
case clblast::Precision::kComplexSingle: throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kComplexDouble: throw std::runtime_error("Unsupported precision mode");
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
// =================================================================================================
|
33
test/performance/routines/level2/xsyr2.cc
Normal file
33
test/performance/routines/level2/xsyr2.cc
Normal file
|
@ -0,0 +1,33 @@
|
|||
|
||||
// =================================================================================================
|
||||
// This file is part of the CLBlast project. The project is licensed under Apache Version 2.0. This
|
||||
// project loosely follows the Google C++ styleguide and uses a tab-size of two spaces and a max-
|
||||
// width of 100 characters per line.
|
||||
//
|
||||
// Author(s):
|
||||
// Cedric Nugteren <www.cedricnugteren.nl>
|
||||
//
|
||||
// =================================================================================================
|
||||
|
||||
#include "performance/client.h"
|
||||
#include "routines/level2/xsyr2.h"
|
||||
|
||||
// Shortcuts to the clblast namespace
|
||||
using float2 = clblast::float2;
|
||||
using double2 = clblast::double2;
|
||||
|
||||
// Main function (not within the clblast namespace)
|
||||
int main(int argc, char *argv[]) {
|
||||
switch(clblast::GetPrecision(argc, argv)) {
|
||||
case clblast::Precision::kHalf: throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kSingle:
|
||||
clblast::RunClient<clblast::TestXsyr2<float>, float, float>(argc, argv); break;
|
||||
case clblast::Precision::kDouble:
|
||||
clblast::RunClient<clblast::TestXsyr2<double>, double, double>(argc, argv); break;
|
||||
case clblast::Precision::kComplexSingle: throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kComplexDouble: throw std::runtime_error("Unsupported precision mode");
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
// =================================================================================================
|
35
test/performance/routines/level2/xtbmv.cc
Normal file
35
test/performance/routines/level2/xtbmv.cc
Normal file
|
@ -0,0 +1,35 @@
|
|||
|
||||
// =================================================================================================
|
||||
// This file is part of the CLBlast project. The project is licensed under Apache Version 2.0. This
|
||||
// project loosely follows the Google C++ styleguide and uses a tab-size of two spaces and a max-
|
||||
// width of 100 characters per line.
|
||||
//
|
||||
// Author(s):
|
||||
// Cedric Nugteren <www.cedricnugteren.nl>
|
||||
//
|
||||
// =================================================================================================
|
||||
|
||||
#include "performance/client.h"
|
||||
#include "routines/level2/xtbmv.h"
|
||||
|
||||
// Shortcuts to the clblast namespace
|
||||
using float2 = clblast::float2;
|
||||
using double2 = clblast::double2;
|
||||
|
||||
// Main function (not within the clblast namespace)
|
||||
int main(int argc, char *argv[]) {
|
||||
switch(clblast::GetPrecision(argc, argv)) {
|
||||
case clblast::Precision::kHalf: throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kSingle:
|
||||
clblast::RunClient<clblast::TestXtbmv<float>, float, float>(argc, argv); break;
|
||||
case clblast::Precision::kDouble:
|
||||
clblast::RunClient<clblast::TestXtbmv<double>, double, double>(argc, argv); break;
|
||||
case clblast::Precision::kComplexSingle:
|
||||
clblast::RunClient<clblast::TestXtbmv<float2>, float2, float2>(argc, argv); break;
|
||||
case clblast::Precision::kComplexDouble:
|
||||
clblast::RunClient<clblast::TestXtbmv<double2>, double2, double2>(argc, argv); break;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
// =================================================================================================
|
35
test/performance/routines/level2/xtbsv.cc
Normal file
35
test/performance/routines/level2/xtbsv.cc
Normal file
|
@ -0,0 +1,35 @@
|
|||
|
||||
// =================================================================================================
|
||||
// This file is part of the CLBlast project. The project is licensed under Apache Version 2.0. This
|
||||
// project loosely follows the Google C++ styleguide and uses a tab-size of two spaces and a max-
|
||||
// width of 100 characters per line.
|
||||
//
|
||||
// Author(s):
|
||||
// Cedric Nugteren <www.cedricnugteren.nl>
|
||||
//
|
||||
// =================================================================================================
|
||||
|
||||
#include "performance/client.h"
|
||||
#include "routines/level2/xtbsv.h"
|
||||
|
||||
// Shortcuts to the clblast namespace
|
||||
using float2 = clblast::float2;
|
||||
using double2 = clblast::double2;
|
||||
|
||||
// Main function (not within the clblast namespace)
|
||||
int main(int argc, char *argv[]) {
|
||||
switch(clblast::GetPrecision(argc, argv)) {
|
||||
case clblast::Precision::kHalf: throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kSingle:
|
||||
clblast::RunClient<clblast::TestXtbsv<float>, float, float>(argc, argv); break;
|
||||
case clblast::Precision::kDouble:
|
||||
clblast::RunClient<clblast::TestXtbsv<double>, double, double>(argc, argv); break;
|
||||
case clblast::Precision::kComplexSingle:
|
||||
clblast::RunClient<clblast::TestXtbsv<float2>, float2, float2>(argc, argv); break;
|
||||
case clblast::Precision::kComplexDouble:
|
||||
clblast::RunClient<clblast::TestXtbsv<double2>, double2, double2>(argc, argv); break;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
// =================================================================================================
|
35
test/performance/routines/level2/xtpmv.cc
Normal file
35
test/performance/routines/level2/xtpmv.cc
Normal file
|
@ -0,0 +1,35 @@
|
|||
|
||||
// =================================================================================================
|
||||
// This file is part of the CLBlast project. The project is licensed under Apache Version 2.0. This
|
||||
// project loosely follows the Google C++ styleguide and uses a tab-size of two spaces and a max-
|
||||
// width of 100 characters per line.
|
||||
//
|
||||
// Author(s):
|
||||
// Cedric Nugteren <www.cedricnugteren.nl>
|
||||
//
|
||||
// =================================================================================================
|
||||
|
||||
#include "performance/client.h"
|
||||
#include "routines/level2/xtpmv.h"
|
||||
|
||||
// Shortcuts to the clblast namespace
|
||||
using float2 = clblast::float2;
|
||||
using double2 = clblast::double2;
|
||||
|
||||
// Main function (not within the clblast namespace)
|
||||
int main(int argc, char *argv[]) {
|
||||
switch(clblast::GetPrecision(argc, argv)) {
|
||||
case clblast::Precision::kHalf: throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kSingle:
|
||||
clblast::RunClient<clblast::TestXtpmv<float>, float, float>(argc, argv); break;
|
||||
case clblast::Precision::kDouble:
|
||||
clblast::RunClient<clblast::TestXtpmv<double>, double, double>(argc, argv); break;
|
||||
case clblast::Precision::kComplexSingle:
|
||||
clblast::RunClient<clblast::TestXtpmv<float2>, float2, float2>(argc, argv); break;
|
||||
case clblast::Precision::kComplexDouble:
|
||||
clblast::RunClient<clblast::TestXtpmv<double2>, double2, double2>(argc, argv); break;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
// =================================================================================================
|
35
test/performance/routines/level2/xtpsv.cc
Normal file
35
test/performance/routines/level2/xtpsv.cc
Normal file
|
@ -0,0 +1,35 @@
|
|||
|
||||
// =================================================================================================
|
||||
// This file is part of the CLBlast project. The project is licensed under Apache Version 2.0. This
|
||||
// project loosely follows the Google C++ styleguide and uses a tab-size of two spaces and a max-
|
||||
// width of 100 characters per line.
|
||||
//
|
||||
// Author(s):
|
||||
// Cedric Nugteren <www.cedricnugteren.nl>
|
||||
//
|
||||
// =================================================================================================
|
||||
|
||||
#include "performance/client.h"
|
||||
#include "routines/level2/xtpsv.h"
|
||||
|
||||
// Shortcuts to the clblast namespace
|
||||
using float2 = clblast::float2;
|
||||
using double2 = clblast::double2;
|
||||
|
||||
// Main function (not within the clblast namespace)
|
||||
int main(int argc, char *argv[]) {
|
||||
switch(clblast::GetPrecision(argc, argv)) {
|
||||
case clblast::Precision::kHalf: throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kSingle:
|
||||
clblast::RunClient<clblast::TestXtpsv<float>, float, float>(argc, argv); break;
|
||||
case clblast::Precision::kDouble:
|
||||
clblast::RunClient<clblast::TestXtpsv<double>, double, double>(argc, argv); break;
|
||||
case clblast::Precision::kComplexSingle:
|
||||
clblast::RunClient<clblast::TestXtpsv<float2>, float2, float2>(argc, argv); break;
|
||||
case clblast::Precision::kComplexDouble:
|
||||
clblast::RunClient<clblast::TestXtpsv<double2>, double2, double2>(argc, argv); break;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
// =================================================================================================
|
35
test/performance/routines/level2/xtrmv.cc
Normal file
35
test/performance/routines/level2/xtrmv.cc
Normal file
|
@ -0,0 +1,35 @@
|
|||
|
||||
// =================================================================================================
|
||||
// This file is part of the CLBlast project. The project is licensed under Apache Version 2.0. This
|
||||
// project loosely follows the Google C++ styleguide and uses a tab-size of two spaces and a max-
|
||||
// width of 100 characters per line.
|
||||
//
|
||||
// Author(s):
|
||||
// Cedric Nugteren <www.cedricnugteren.nl>
|
||||
//
|
||||
// =================================================================================================
|
||||
|
||||
#include "performance/client.h"
|
||||
#include "routines/level2/xtrmv.h"
|
||||
|
||||
// Shortcuts to the clblast namespace
|
||||
using float2 = clblast::float2;
|
||||
using double2 = clblast::double2;
|
||||
|
||||
// Main function (not within the clblast namespace)
|
||||
int main(int argc, char *argv[]) {
|
||||
switch(clblast::GetPrecision(argc, argv)) {
|
||||
case clblast::Precision::kHalf: throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kSingle:
|
||||
clblast::RunClient<clblast::TestXtrmv<float>, float, float>(argc, argv); break;
|
||||
case clblast::Precision::kDouble:
|
||||
clblast::RunClient<clblast::TestXtrmv<double>, double, double>(argc, argv); break;
|
||||
case clblast::Precision::kComplexSingle:
|
||||
clblast::RunClient<clblast::TestXtrmv<float2>, float2, float2>(argc, argv); break;
|
||||
case clblast::Precision::kComplexDouble:
|
||||
clblast::RunClient<clblast::TestXtrmv<double2>, double2, double2>(argc, argv); break;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
// =================================================================================================
|
35
test/performance/routines/level2/xtrsv.cc
Normal file
35
test/performance/routines/level2/xtrsv.cc
Normal file
|
@ -0,0 +1,35 @@
|
|||
|
||||
// =================================================================================================
|
||||
// This file is part of the CLBlast project. The project is licensed under Apache Version 2.0. This
|
||||
// project loosely follows the Google C++ styleguide and uses a tab-size of two spaces and a max-
|
||||
// width of 100 characters per line.
|
||||
//
|
||||
// Author(s):
|
||||
// Cedric Nugteren <www.cedricnugteren.nl>
|
||||
//
|
||||
// =================================================================================================
|
||||
|
||||
#include "performance/client.h"
|
||||
#include "routines/level2/xtrsv.h"
|
||||
|
||||
// Shortcuts to the clblast namespace
|
||||
using float2 = clblast::float2;
|
||||
using double2 = clblast::double2;
|
||||
|
||||
// Main function (not within the clblast namespace)
|
||||
int main(int argc, char *argv[]) {
|
||||
switch(clblast::GetPrecision(argc, argv)) {
|
||||
case clblast::Precision::kHalf: throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kSingle:
|
||||
clblast::RunClient<clblast::TestXtrsv<float>, float, float>(argc, argv); break;
|
||||
case clblast::Precision::kDouble:
|
||||
clblast::RunClient<clblast::TestXtrsv<double>, double, double>(argc, argv); break;
|
||||
case clblast::Precision::kComplexSingle:
|
||||
clblast::RunClient<clblast::TestXtrsv<float2>, float2, float2>(argc, argv); break;
|
||||
case clblast::Precision::kComplexDouble:
|
||||
clblast::RunClient<clblast::TestXtrsv<double2>, double2, double2>(argc, argv); break;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
// =================================================================================================
|
|
@ -7,15 +7,11 @@
|
|||
// Author(s):
|
||||
// Cedric Nugteren <www.cedricnugteren.nl>
|
||||
//
|
||||
// This file implements the Xgemm command-line interface performance tester.
|
||||
//
|
||||
// =================================================================================================
|
||||
|
||||
#include "performance/client.h"
|
||||
#include "routines/level3/xgemm.h"
|
||||
|
||||
// =================================================================================================
|
||||
|
||||
// Shortcuts to the clblast namespace
|
||||
using float2 = clblast::float2;
|
||||
using double2 = clblast::double2;
|
||||
|
@ -23,8 +19,7 @@ using double2 = clblast::double2;
|
|||
// Main function (not within the clblast namespace)
|
||||
int main(int argc, char *argv[]) {
|
||||
switch(clblast::GetPrecision(argc, argv)) {
|
||||
case clblast::Precision::kHalf:
|
||||
throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kHalf: throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kSingle:
|
||||
clblast::RunClient<clblast::TestXgemm<float>, float, float>(argc, argv); break;
|
||||
case clblast::Precision::kDouble:
|
||||
|
|
|
@ -7,15 +7,11 @@
|
|||
// Author(s):
|
||||
// Cedric Nugteren <www.cedricnugteren.nl>
|
||||
//
|
||||
// This file implements the Xhemm command-line interface performance tester.
|
||||
//
|
||||
// =================================================================================================
|
||||
|
||||
#include "performance/client.h"
|
||||
#include "routines/level3/xhemm.h"
|
||||
|
||||
// =================================================================================================
|
||||
|
||||
// Shortcuts to the clblast namespace
|
||||
using float2 = clblast::float2;
|
||||
using double2 = clblast::double2;
|
||||
|
@ -23,12 +19,9 @@ using double2 = clblast::double2;
|
|||
// Main function (not within the clblast namespace)
|
||||
int main(int argc, char *argv[]) {
|
||||
switch(clblast::GetPrecision(argc, argv)) {
|
||||
case clblast::Precision::kHalf:
|
||||
throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kSingle:
|
||||
throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kDouble:
|
||||
throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kHalf: throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kSingle: throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kDouble: throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kComplexSingle:
|
||||
clblast::RunClient<clblast::TestXhemm<float2>, float2, float2>(argc, argv); break;
|
||||
case clblast::Precision::kComplexDouble:
|
||||
|
|
|
@ -7,15 +7,11 @@
|
|||
// Author(s):
|
||||
// Cedric Nugteren <www.cedricnugteren.nl>
|
||||
//
|
||||
// This file implements the Xher2k command-line interface performance tester.
|
||||
//
|
||||
// =================================================================================================
|
||||
|
||||
#include "performance/client.h"
|
||||
#include "routines/level3/xher2k.h"
|
||||
|
||||
// =================================================================================================
|
||||
|
||||
// Shortcuts to the clblast namespace
|
||||
using float2 = clblast::float2;
|
||||
using double2 = clblast::double2;
|
||||
|
@ -23,12 +19,9 @@ using double2 = clblast::double2;
|
|||
// Main function (not within the clblast namespace)
|
||||
int main(int argc, char *argv[]) {
|
||||
switch(clblast::GetPrecision(argc, argv)) {
|
||||
case clblast::Precision::kHalf:
|
||||
throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kSingle:
|
||||
throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kDouble:
|
||||
throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kHalf: throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kSingle: throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kDouble: throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kComplexSingle:
|
||||
clblast::RunClient<clblast::TestXher2k<float2,float>, float2, float>(argc, argv); break;
|
||||
case clblast::Precision::kComplexDouble:
|
||||
|
|
|
@ -7,15 +7,11 @@
|
|||
// Author(s):
|
||||
// Cedric Nugteren <www.cedricnugteren.nl>
|
||||
//
|
||||
// This file implements the Xherk command-line interface performance tester.
|
||||
//
|
||||
// =================================================================================================
|
||||
|
||||
#include "performance/client.h"
|
||||
#include "routines/level3/xherk.h"
|
||||
|
||||
// =================================================================================================
|
||||
|
||||
// Shortcuts to the clblast namespace
|
||||
using float2 = clblast::float2;
|
||||
using double2 = clblast::double2;
|
||||
|
@ -23,12 +19,9 @@ using double2 = clblast::double2;
|
|||
// Main function (not within the clblast namespace)
|
||||
int main(int argc, char *argv[]) {
|
||||
switch(clblast::GetPrecision(argc, argv)) {
|
||||
case clblast::Precision::kHalf:
|
||||
throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kSingle:
|
||||
throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kDouble:
|
||||
throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kHalf: throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kSingle: throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kDouble: throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kComplexSingle:
|
||||
clblast::RunClient<clblast::TestXherk<float2,float>, float2, float>(argc, argv); break;
|
||||
case clblast::Precision::kComplexDouble:
|
||||
|
|
|
@ -7,15 +7,11 @@
|
|||
// Author(s):
|
||||
// Cedric Nugteren <www.cedricnugteren.nl>
|
||||
//
|
||||
// This file implements the Xsymm command-line interface performance tester.
|
||||
//
|
||||
// =================================================================================================
|
||||
|
||||
#include "performance/client.h"
|
||||
#include "routines/level3/xsymm.h"
|
||||
|
||||
// =================================================================================================
|
||||
|
||||
// Shortcuts to the clblast namespace
|
||||
using float2 = clblast::float2;
|
||||
using double2 = clblast::double2;
|
||||
|
@ -23,8 +19,7 @@ using double2 = clblast::double2;
|
|||
// Main function (not within the clblast namespace)
|
||||
int main(int argc, char *argv[]) {
|
||||
switch(clblast::GetPrecision(argc, argv)) {
|
||||
case clblast::Precision::kHalf:
|
||||
throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kHalf: throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kSingle:
|
||||
clblast::RunClient<clblast::TestXsymm<float>, float, float>(argc, argv); break;
|
||||
case clblast::Precision::kDouble:
|
||||
|
|
|
@ -7,15 +7,11 @@
|
|||
// Author(s):
|
||||
// Cedric Nugteren <www.cedricnugteren.nl>
|
||||
//
|
||||
// This file implements the Xsyr2k command-line interface performance tester.
|
||||
//
|
||||
// =================================================================================================
|
||||
|
||||
#include "performance/client.h"
|
||||
#include "routines/level3/xsyr2k.h"
|
||||
|
||||
// =================================================================================================
|
||||
|
||||
// Shortcuts to the clblast namespace
|
||||
using float2 = clblast::float2;
|
||||
using double2 = clblast::double2;
|
||||
|
@ -23,8 +19,7 @@ using double2 = clblast::double2;
|
|||
// Main function (not within the clblast namespace)
|
||||
int main(int argc, char *argv[]) {
|
||||
switch(clblast::GetPrecision(argc, argv)) {
|
||||
case clblast::Precision::kHalf:
|
||||
throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kHalf: throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kSingle:
|
||||
clblast::RunClient<clblast::TestXsyr2k<float>, float, float>(argc, argv); break;
|
||||
case clblast::Precision::kDouble:
|
||||
|
|
|
@ -7,15 +7,11 @@
|
|||
// Author(s):
|
||||
// Cedric Nugteren <www.cedricnugteren.nl>
|
||||
//
|
||||
// This file implements the Xsyrk command-line interface performance tester.
|
||||
//
|
||||
// =================================================================================================
|
||||
|
||||
#include "performance/client.h"
|
||||
#include "routines/level3/xsyrk.h"
|
||||
|
||||
// =================================================================================================
|
||||
|
||||
// Shortcuts to the clblast namespace
|
||||
using float2 = clblast::float2;
|
||||
using double2 = clblast::double2;
|
||||
|
@ -23,8 +19,7 @@ using double2 = clblast::double2;
|
|||
// Main function (not within the clblast namespace)
|
||||
int main(int argc, char *argv[]) {
|
||||
switch(clblast::GetPrecision(argc, argv)) {
|
||||
case clblast::Precision::kHalf:
|
||||
throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kHalf: throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kSingle:
|
||||
clblast::RunClient<clblast::TestXsyrk<float>, float, float>(argc, argv); break;
|
||||
case clblast::Precision::kDouble:
|
||||
|
|
|
@ -7,15 +7,11 @@
|
|||
// Author(s):
|
||||
// Cedric Nugteren <www.cedricnugteren.nl>
|
||||
//
|
||||
// This file implements the Xtrmm command-line interface performance tester.
|
||||
//
|
||||
// =================================================================================================
|
||||
|
||||
#include "performance/client.h"
|
||||
#include "routines/level3/xtrmm.h"
|
||||
|
||||
// =================================================================================================
|
||||
|
||||
// Shortcuts to the clblast namespace
|
||||
using float2 = clblast::float2;
|
||||
using double2 = clblast::double2;
|
||||
|
@ -23,8 +19,7 @@ using double2 = clblast::double2;
|
|||
// Main function (not within the clblast namespace)
|
||||
int main(int argc, char *argv[]) {
|
||||
switch(clblast::GetPrecision(argc, argv)) {
|
||||
case clblast::Precision::kHalf:
|
||||
throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kHalf: throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kSingle:
|
||||
clblast::RunClient<clblast::TestXtrmm<float>, float, float>(argc, argv); break;
|
||||
case clblast::Precision::kDouble:
|
||||
|
|
35
test/performance/routines/level3/xtrsm.cc
Normal file
35
test/performance/routines/level3/xtrsm.cc
Normal file
|
@ -0,0 +1,35 @@
|
|||
|
||||
// =================================================================================================
|
||||
// This file is part of the CLBlast project. The project is licensed under Apache Version 2.0. This
|
||||
// project loosely follows the Google C++ styleguide and uses a tab-size of two spaces and a max-
|
||||
// width of 100 characters per line.
|
||||
//
|
||||
// Author(s):
|
||||
// Cedric Nugteren <www.cedricnugteren.nl>
|
||||
//
|
||||
// =================================================================================================
|
||||
|
||||
#include "performance/client.h"
|
||||
#include "routines/level3/xtrsm.h"
|
||||
|
||||
// Shortcuts to the clblast namespace
|
||||
using float2 = clblast::float2;
|
||||
using double2 = clblast::double2;
|
||||
|
||||
// Main function (not within the clblast namespace)
|
||||
int main(int argc, char *argv[]) {
|
||||
switch(clblast::GetPrecision(argc, argv)) {
|
||||
case clblast::Precision::kHalf: throw std::runtime_error("Unsupported precision mode");
|
||||
case clblast::Precision::kSingle:
|
||||
clblast::RunClient<clblast::TestXtrsm<float>, float, float>(argc, argv); break;
|
||||
case clblast::Precision::kDouble:
|
||||
clblast::RunClient<clblast::TestXtrsm<double>, double, double>(argc, argv); break;
|
||||
case clblast::Precision::kComplexSingle:
|
||||
clblast::RunClient<clblast::TestXtrsm<float2>, float2, float2>(argc, argv); break;
|
||||
case clblast::Precision::kComplexDouble:
|
||||
clblast::RunClient<clblast::TestXtrsm<double2>, double2, double2>(argc, argv); break;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
// =================================================================================================
|
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue