15 #ifdef ETL_EGBLAS_MODE 17 #include "etl/impl/cublas/cuda.hpp" 25 #ifdef EGBLAS_HAS_SAXDBPY_3 26 static constexpr
bool has_saxdbpy_3 =
true;
28 static constexpr
bool has_saxdbpy_3 =
false;
40 inline void axdbpy_3([[maybe_unused]]
size_t n,
41 [[maybe_unused]]
float alpha,
42 [[maybe_unused]]
float* A,
43 [[maybe_unused]]
size_t lda,
44 [[maybe_unused]]
float beta,
45 [[maybe_unused]]
float* B,
46 [[maybe_unused]]
size_t ldb,
47 [[maybe_unused]]
float* C,
48 [[maybe_unused]]
size_t ldc) {
49 #ifdef EGBLAS_HAS_SAXDBPY_3 51 egblas_saxdbpy_3(n, alpha, A, lda, beta, B, ldb, C, ldc);
53 cpp_unreachable(
"Invalid call to egblas::axdbpy_3");
57 #ifdef EGBLAS_HAS_DAXDBPY_3 58 static constexpr
bool has_daxdbpy_3 =
true;
60 static constexpr
bool has_daxdbpy_3 =
false;
72 inline void axdbpy_3([[maybe_unused]]
size_t n,
73 [[maybe_unused]]
double alpha,
74 [[maybe_unused]]
double* A,
75 [[maybe_unused]]
size_t lda,
76 [[maybe_unused]]
double beta,
77 [[maybe_unused]]
double* B,
78 [[maybe_unused]]
size_t ldb,
79 [[maybe_unused]]
double* C,
80 [[maybe_unused]]
size_t ldc) {
81 #ifdef EGBLAS_HAS_DAXDBPY_3 83 egblas_daxdbpy_3(n, alpha, A, lda, beta, B, ldb, C, ldc);
85 cpp_unreachable(
"Invalid call to egblas::axdbpy_3");
89 #ifdef EGBLAS_HAS_CAXDBPY_3 90 static constexpr
bool has_caxdbpy_3 =
true;
92 static constexpr
bool has_caxdbpy_3 =
false;
105 [[maybe_unused]] std::complex<float> alpha,
106 [[maybe_unused]] std::complex<float>* A,
107 [[maybe_unused]]
size_t lda,
108 [[maybe_unused]] std::complex<float> beta,
109 [[maybe_unused]] std::complex<float>* B,
110 [[maybe_unused]]
size_t ldb,
111 [[maybe_unused]] std::complex<float>* C,
112 [[maybe_unused]]
size_t ldc) {
113 #ifdef EGBLAS_HAS_CAXDBPY_3 115 egblas_caxdbpy_3(n, complex_cast(alpha), reinterpret_cast<cuComplex*>(A), lda, complex_cast(beta), reinterpret_cast<cuComplex*>(B), ldb,
116 reinterpret_cast<cuComplex*>(C), ldc);
118 cpp_unreachable(
"Invalid call to egblas::axdbpy_3");
134 [[maybe_unused]]
size_t lda,
137 [[maybe_unused]]
size_t ldb,
139 [[maybe_unused]]
size_t ldc) {
140 #ifdef EGBLAS_HAS_CAXDBPY_3 142 egblas_caxdbpy_3(n, complex_cast(alpha), reinterpret_cast<cuComplex*>(A), lda, complex_cast(beta), reinterpret_cast<cuComplex*>(B), ldb,
143 reinterpret_cast<cuComplex*>(C), ldc);
145 cpp_unreachable(
"Invalid call to egblas::axdbpy");
149 #ifdef EGBLAS_HAS_ZAXDBPY_3 150 static constexpr
bool has_zaxdbpy_3 =
true;
152 static constexpr
bool has_zaxdbpy_3 =
false;
165 [[maybe_unused]] std::complex<double> alpha,
166 [[maybe_unused]] std::complex<double>* A,
167 [[maybe_unused]]
size_t lda,
168 [[maybe_unused]] std::complex<double> beta,
169 [[maybe_unused]] std::complex<double>* B,
170 [[maybe_unused]]
size_t ldb,
171 [[maybe_unused]] std::complex<double>* C,
172 [[maybe_unused]]
size_t ldc) {
173 #ifdef EGBLAS_HAS_ZAXDBPY_3 175 egblas_zaxdbpy_3(n, complex_cast(alpha), reinterpret_cast<cuDoubleComplex*>(A), lda, complex_cast(beta), reinterpret_cast<cuDoubleComplex*>(B), ldb,
176 reinterpret_cast<cuDoubleComplex*>(C), ldc);
178 cpp_unreachable(
"Invalid call to egblas::axdbpy_3");
194 [[maybe_unused]]
size_t lda,
197 [[maybe_unused]]
size_t ldb,
199 [[maybe_unused]]
size_t ldc) {
200 #ifdef EGBLAS_HAS_ZAXDBPY_3 202 egblas_zaxdbpy_3(n, complex_cast(alpha), reinterpret_cast<cuDoubleComplex*>(A), lda, complex_cast(beta), reinterpret_cast<cuDoubleComplex*>(B), ldb,
203 reinterpret_cast<cuDoubleComplex*>(C), ldc);
205 cpp_unreachable(
"Invalid call to egblas::axdbpy_3");
Complex number implementation.
Definition: complex.hpp:31
void axdbpy_3([[maybe_unused]] size_t n, [[maybe_unused]] float alpha, [[maybe_unused]] float *A, [[maybe_unused]] size_t lda, [[maybe_unused]] float beta, [[maybe_unused]] float *B, [[maybe_unused]] size_t ldb, [[maybe_unused]] float *C, [[maybe_unused]] size_t ldc)
Wrappers for single-precision egblas axdbpy operation.
Definition: axdbpy_3.hpp:40
void inc_counter([[maybe_unused]] const char *name)
Increase the given counter.
Definition: counters.hpp:25