15 #ifdef ETL_EGBLAS_MODE 17 #include "etl/impl/cublas/cuda.hpp" 25 #ifdef EGBLAS_HAS_SAXDY 26 static constexpr
bool has_saxdy =
true;
28 static constexpr
bool has_saxdy =
false;
40 inline void axdy([[maybe_unused]]
size_t n, [[maybe_unused]]
float alpha, [[maybe_unused]]
const float* A, [[maybe_unused]]
size_t lda, [[maybe_unused]]
float* B, [[maybe_unused]]
size_t ldb) {
41 #ifdef EGBLAS_HAS_SAXDY 43 egblas_saxdy(n, alpha, A, lda, B, ldb);
45 cpp_unreachable(
"Invalid call to egblas::axdy");
49 #ifdef EGBLAS_HAS_DAXDY 50 static constexpr
bool has_daxdy =
true;
52 static constexpr
bool has_daxdy =
false;
64 inline void axdy([[maybe_unused]]
size_t n, [[maybe_unused]]
double alpha, [[maybe_unused]]
const double* A, [[maybe_unused]]
size_t lda, [[maybe_unused]]
double* B, [[maybe_unused]]
size_t ldb) {
65 #ifdef EGBLAS_HAS_DAXDY 67 egblas_daxdy(n, alpha, A, lda, B, ldb);
69 cpp_unreachable(
"Invalid call to egblas::axdy");
73 #ifdef EGBLAS_HAS_CAXDY 74 static constexpr
bool has_caxdy =
true;
76 static constexpr
bool has_caxdy =
false;
88 inline void axdy([[maybe_unused]]
size_t n, [[maybe_unused]] std::complex<float> alpha, [[maybe_unused]]
const std::complex<float>* A, [[maybe_unused]]
size_t lda, [[maybe_unused]] std::complex<float>* B, [[maybe_unused]]
size_t ldb) {
89 #ifdef EGBLAS_HAS_CAXDY 91 egblas_caxdy(n, complex_cast(alpha), reinterpret_cast<cuComplex*>(A), lda, reinterpret_cast<cuComplex*>(B), ldb);
93 cpp_unreachable(
"Invalid call to egblas::axdy");
107 #ifdef EGBLAS_HAS_CAXDY 109 egblas_caxdy(n, complex_cast(alpha), reinterpret_cast<cuComplex*>(A), lda, reinterpret_cast<cuComplex*>(B), ldb);
111 cpp_unreachable(
"Invalid call to egblas::axdy");
115 #ifdef EGBLAS_HAS_ZAXDY 116 static constexpr
bool has_zaxdy =
true;
118 static constexpr
bool has_zaxdy =
false;
130 inline void axdy([[maybe_unused]]
size_t n, [[maybe_unused]] std::complex<double> alpha, [[maybe_unused]]
const std::complex<double>* A, [[maybe_unused]]
size_t lda, [[maybe_unused]] std::complex<double>* B, [[maybe_unused]]
size_t ldb) {
131 #ifdef EGBLAS_HAS_ZAXDY 133 egblas_zaxdy(n, complex_cast(alpha), reinterpret_cast<cuDoubleComplex*>(A), lda, reinterpret_cast<cuDoubleComplex*>(B), ldb);
135 cpp_unreachable(
"Invalid call to egblas::axdy");
149 #ifdef EGBLAS_HAS_ZAXDY 151 egblas_zaxdy(n, complex_cast(alpha), reinterpret_cast<cuDoubleComplex*>(A), lda, reinterpret_cast<cuDoubleComplex*>(B), ldb);
153 cpp_unreachable(
"Invalid call to egblas::axdy");
Complex number implementation.
Definition: complex.hpp:31
void axdy([[maybe_unused]] size_t n, [[maybe_unused]] float alpha, [[maybe_unused]] const float *A, [[maybe_unused]] size_t lda, [[maybe_unused]] float *B, [[maybe_unused]] size_t ldb)
Wrappers for single-precision egblas axdy operation.
Definition: axdy.hpp:40
void inc_counter([[maybe_unused]] const char *name)
Increase the given counter.
Definition: counters.hpp:25