11#ifndef _CU_BASIC_ALGEBRA_CUBLAS_API_H_
12#define _CU_BASIC_ALGEBRA_CUBLAS_API_H_
21 #pragma warning(push, 0)
22 #include <cublas_v2.h>
24#elif defined(__INTEL_LLVM_COMPILER) || defined(__INTEL_COMPILER)
25 #pragma warning(push, 0)
26 #include <cublas_v2.h>
28#elif defined(__GNUC__) || defined(__clang__)
29 #pragma GCC diagnostic push
30 #pragma GCC diagnostic ignored "-Wswitch-enum"
31 #include <cublas_v2.h>
32 #pragma GCC diagnostic pop
34 #include <cublas_v2.h>
43 #define RESTRICT __restrict
44#elif defined(__INTEL_COMPILER)
45 #define RESTRICT __restrict
46#elif defined(__CUDA__) || defined(__GNUC__) || defined(__clang__)
47 #define RESTRICT __restrict__
64 template <
typename DataType>
66 cublasHandle_t handle,
67 cublasOperation_t trans,
80 template <
typename DataType>
82 cublasHandle_t handle,
90 template <
typename DataType>
92 cublasHandle_t handle,
101 template <
typename DataType>
103 cublasHandle_t handle,
112 template <
typename DataType>
114 cublasHandle_t handle,
121 template <
typename DataType>
123 cublasHandle_t handle,
A collection of templates to wrapper cublas functions.
cublasStatus_t cublasXaxpy(cublasHandle_t handle, int n, const DataType *RESTRICT alpha, const DataType *RESTRICT x, int incx, DataType *RESTRICT y, int incy)
cublasStatus_t cublasXnrm2(cublasHandle_t handle, int n, const DataType *RESTRICT x, int incx, DataType *RESTRICT result)
cublasStatus_t cublasXscal(cublasHandle_t handle, int n, const DataType *RESTRICT alpha, DataType *RESTRICT x, int incx)
cublasStatus_t cublasXcopy(cublasHandle_t handle, int n, const DataType *RESTRICT x, int incx, DataType *RESTRICT y, int incy)
cublasStatus_t cublasXgemv(cublasHandle_t handle, cublasOperation_t trans, int m, int n, const DataType *RESTRICT alpha, const DataType *RESTRICT A, int lda, const DataType *RESTRICT x, int incx, const DataType *RESTRICT beta, DataType *RESTRICT y, int incy)
cublasStatus_t cublasXdot(cublasHandle_t handle, int n, const DataType *RESTRICT x, int incx, const DataType *RESTRICT y, int incy, DataType *RESTRICT result)