15 #ifdef ETL_EGBLAS_MODE 17 #include "etl/impl/cublas/cuda.hpp" 28 #ifdef EGBLAS_HAS_SLOG10 29 static constexpr
bool has_slog10 =
true;
31 static constexpr
bool has_slog10 =
false;
43 inline void log10([[maybe_unused]]
size_t n,
44 [[maybe_unused]]
float alpha,
45 [[maybe_unused]]
float* A,
46 [[maybe_unused]]
size_t lda,
47 [[maybe_unused]]
float* B,
48 [[maybe_unused]]
size_t ldb) {
49 #ifdef EGBLAS_HAS_SLOG10 51 egblas_slog10(n, alpha, A, lda, B, ldb);
53 cpp_unreachable(
"Invalid call to egblas::log10");
60 #ifdef EGBLAS_HAS_DLOG10 61 static constexpr
bool has_dlog10 =
true;
63 static constexpr
bool has_dlog10 =
false;
75 inline void log10([[maybe_unused]]
size_t n,
76 [[maybe_unused]]
double alpha,
77 [[maybe_unused]]
double* A,
78 [[maybe_unused]]
size_t lda,
79 [[maybe_unused]]
double* B,
80 [[maybe_unused]]
size_t ldb) {
81 #ifdef EGBLAS_HAS_DLOG10 83 egblas_dlog10(n, alpha, A, lda, B, ldb);
85 cpp_unreachable(
"Invalid call to egblas::log10");
92 #ifdef EGBLAS_HAS_CLOG10 93 static constexpr
bool has_clog10 =
true;
95 static constexpr
bool has_clog10 =
false;
107 inline void log10([[maybe_unused]]
size_t n,
108 [[maybe_unused]] std::complex<float> alpha,
109 [[maybe_unused]] std::complex<float>* A,
110 [[maybe_unused]]
size_t lda,
111 [[maybe_unused]] std::complex<float>* B,
112 [[maybe_unused]]
size_t ldb) {
113 #ifdef EGBLAS_HAS_CLOG10 115 egblas_clog10(n, complex_cast(alpha), reinterpret_cast<cuComplex*>(A), lda, reinterpret_cast<cuComplex*>(B), ldb);
117 cpp_unreachable(
"Invalid call to egblas::log10");
130 inline void log10([[maybe_unused]]
size_t n,
133 [[maybe_unused]]
size_t lda,
135 [[maybe_unused]]
size_t ldb) {
136 #ifdef EGBLAS_HAS_CLOG10 138 egblas_clog10(n, complex_cast(alpha), reinterpret_cast<cuComplex*>(A), lda, reinterpret_cast<cuComplex*>(B), ldb);
140 cpp_unreachable(
"Invalid call to egblas::log10");
147 #ifdef EGBLAS_HAS_ZLOG10 148 static constexpr
bool has_zlog10 =
true;
150 static constexpr
bool has_zlog10 =
false;
162 inline void log10([[maybe_unused]]
size_t n,
163 [[maybe_unused]] std::complex<double> alpha,
164 [[maybe_unused]] std::complex<double>* A,
165 [[maybe_unused]]
size_t lda,
166 [[maybe_unused]] std::complex<double>* B,
167 [[maybe_unused]]
size_t ldb) {
168 #ifdef EGBLAS_HAS_ZLOG10 170 egblas_zlog10(n, complex_cast(alpha), reinterpret_cast<cuDoubleComplex*>(A), lda, reinterpret_cast<cuDoubleComplex*>(B), ldb);
172 cpp_unreachable(
"Invalid call to egblas::log10");
185 inline void log10([[maybe_unused]]
size_t n,
188 [[maybe_unused]]
size_t lda,
190 [[maybe_unused]]
size_t ldb) {
191 #ifdef EGBLAS_HAS_ZLOG10 193 egblas_zlog10(n, complex_cast(alpha), reinterpret_cast<cuDoubleComplex*>(A), lda, reinterpret_cast<cuDoubleComplex*>(B), ldb);
195 cpp_unreachable(
"Invalid call to egblas::log10");
Complex number implementation.
Definition: complex.hpp:31
auto log10(E &&value) -> detail::unary_helper< E, log10_unary_op >
Apply logarithm (base 10) on each value of the given expression.
Definition: function_expression_builder.hpp:84
void inc_counter([[maybe_unused]] const char *name)
Increase the given counter.
Definition: counters.hpp:25