15 #ifdef ETL_EGBLAS_MODE 17 #include "etl/impl/cublas/cuda.hpp" 28 #ifdef EGBLAS_HAS_CREAL 29 static constexpr
bool has_creal =
true;
31 static constexpr
bool has_creal =
false;
43 inline void real([[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_CREAL 51 egblas_creal(n, alpha, reinterpret_cast<cuComplex*>(A), lda, (B), ldb);
53 cpp_unreachable(
"Invalid call to egblas::real");
66 inline void real([[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_CREAL 74 egblas_creal(n, alpha, reinterpret_cast<cuComplex*>(A), lda, (B), ldb);
76 cpp_unreachable(
"Invalid call to egblas::real");
83 #ifdef EGBLAS_HAS_ZREAL 84 static constexpr
bool has_zreal =
true;
86 static constexpr
bool has_zreal =
false;
98 inline void real([[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_ZREAL 106 egblas_zreal(n, alpha, reinterpret_cast<cuDoubleComplex*>(A), lda, (B), ldb);
108 cpp_unreachable(
"Invalid call to egblas::real");
121 inline void real([[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_ZREAL 129 egblas_zreal(n, alpha, reinterpret_cast<cuDoubleComplex*>(A), lda, (B), ldb);
131 cpp_unreachable(
"Invalid call to egblas::real");
Complex number implementation.
Definition: complex.hpp:31
auto real(E &&value)
Extract the real part of each complex value of the given expression.
Definition: expression_builder.hpp:186
void inc_counter([[maybe_unused]] const char *name)
Increase the given counter.
Definition: counters.hpp:25