15 #ifdef ETL_EGBLAS_MODE 17 #include "etl/impl/cublas/cuda.hpp" 28 #ifdef EGBLAS_HAS_Cimag 29 static constexpr
bool has_cimag =
true;
31 static constexpr
bool has_cimag =
false;
43 inline void imag([[maybe_unused]]
size_t n,
44 [[maybe_unused]]
float alpha,
45 [[maybe_unused]] std::complex<float>* A,
46 [[maybe_unused]]
size_t lda,
47 [[maybe_unused]]
float* B,
48 [[maybe_unused]]
size_t ldb) {
49 #ifdef EGBLAS_HAS_Cimag 51 egblas_cimag(n, alpha, reinterpret_cast<cuComplex*>(A), lda, (B), ldb);
53 cpp_unreachable(
"Invalid call to egblas::imag");
66 inline void imag([[maybe_unused]]
size_t n,
67 [[maybe_unused]]
float alpha,
69 [[maybe_unused]]
size_t lda,
70 [[maybe_unused]]
float* B,
71 [[maybe_unused]]
size_t ldb) {
72 #ifdef EGBLAS_HAS_Cimag 74 egblas_cimag(n, alpha, reinterpret_cast<cuComplex*>(A), lda, (B), ldb);
76 cpp_unreachable(
"Invalid call to egblas::imag");
83 #ifdef EGBLAS_HAS_Zimag 84 static constexpr
bool has_zimag =
true;
86 static constexpr
bool has_zimag =
false;
98 inline void imag([[maybe_unused]]
size_t n,
99 [[maybe_unused]]
double alpha,
100 [[maybe_unused]] std::complex<double>* A,
101 [[maybe_unused]]
size_t lda,
102 [[maybe_unused]]
double* B,
103 [[maybe_unused]]
size_t ldb) {
104 #ifdef EGBLAS_HAS_Zimag 106 egblas_zimag(n, alpha, reinterpret_cast<cuDoubleComplex*>(A), lda, (B), ldb);
108 cpp_unreachable(
"Invalid call to egblas::imag");
121 inline void imag([[maybe_unused]]
size_t n,
122 [[maybe_unused]]
double alpha,
124 [[maybe_unused]]
size_t lda,
125 [[maybe_unused]]
double* B,
126 [[maybe_unused]]
size_t ldb) {
127 #ifdef EGBLAS_HAS_Zimag 129 egblas_zimag(n, alpha, reinterpret_cast<cuDoubleComplex*>(A), lda, (B), ldb);
131 cpp_unreachable(
"Invalid call to egblas::imag");
Complex number implementation.
Definition: complex.hpp:31
auto imag(E &&value)
Extract the imag part of each complex value of the given expression.
Definition: expression_builder.hpp:196
void inc_counter([[maybe_unused]] const char *name)
Increase the given counter.
Definition: counters.hpp:25