15 #ifdef ETL_EGBLAS_MODE 17 #include "etl/impl/cublas/cuda.hpp" 28 #ifdef EGBLAS_HAS_SHUFFLE 29 static constexpr
bool has_shuffle =
true;
31 static constexpr
bool has_shuffle =
false;
40 inline void shuffle([[maybe_unused]]
size_t n, [[maybe_unused]]
void* x, [[maybe_unused]]
size_t incx) {
41 #ifdef EGBLAS_HAS_SHUFFLE 43 egblas_shuffle(n, x, incx);
45 cpp_unreachable(
"Invalid call to egblas::shuffle");
52 #ifdef EGBLAS_HAS_SHUFFLE_SEED 53 static constexpr
bool has_shuffle_seed =
true;
55 static constexpr
bool has_shuffle_seed =
false;
65 inline void shuffle_seed([[maybe_unused]]
size_t n, [[maybe_unused]]
void* x, [[maybe_unused]]
size_t incx, [[maybe_unused]]
size_t seed) {
66 #ifdef EGBLAS_HAS_SHUFFLE_SEED 68 egblas_shuffle_seed(n, x, incx, seed);
70 cpp_unreachable(
"Invalid call to egblas::shuffle_seed");
77 #ifdef EGBLAS_HAS_PAR_SHUFFLE 78 static constexpr
bool has_par_shuffle =
true;
80 static constexpr
bool has_par_shuffle =
false;
92 [[maybe_unused]]
size_t n, [[maybe_unused]]
void* x, [[maybe_unused]]
size_t incx, [[maybe_unused]]
void* y, [[maybe_unused]]
size_t incy) {
93 #ifdef EGBLAS_HAS_PAR_SHUFFLE 95 egblas_par_shuffle(n, x, incx, y, incy);
97 cpp_unreachable(
"Invalid call to egblas::par_shuffle");
104 #ifdef EGBLAS_HAS_PAR_SHUFFLE_SEED 105 static constexpr
bool has_par_shuffle_seed =
true;
107 static constexpr
bool has_par_shuffle_seed =
false;
120 [[maybe_unused]]
void* x,
121 [[maybe_unused]]
size_t incx,
122 [[maybe_unused]]
void* y,
123 [[maybe_unused]]
size_t incy,
124 [[maybe_unused]]
size_t seed) {
125 #ifdef EGBLAS_HAS_PAR_SHUFFLE_SEED 127 egblas_par_shuffle_seed(n, x, incx, y, incy, seed);
129 cpp_unreachable(
"Invalid call to egblas::par_shuffle");
void par_shuffle_seed([[maybe_unused]] size_t n, [[maybe_unused]] void *x, [[maybe_unused]] size_t incx, [[maybe_unused]] void *y, [[maybe_unused]] size_t incy, [[maybe_unused]] size_t seed)
Wrappers for egblas par_shuffle_seed operation.
Definition: shuffle.hpp:119
void shuffle(T &vector)
Shuffle all the elements of an ETL vector.
Definition: globals.hpp:480
void shuffle_seed([[maybe_unused]] size_t n, [[maybe_unused]] void *x, [[maybe_unused]] size_t incx, [[maybe_unused]] size_t seed)
Wrappers for egblas shuffle_seed operation.
Definition: shuffle.hpp:65
void inc_counter([[maybe_unused]] const char *name)
Increase the given counter.
Definition: counters.hpp:25
void par_shuffle([[maybe_unused]] size_t n, [[maybe_unused]] void *x, [[maybe_unused]] size_t incx, [[maybe_unused]] void *y, [[maybe_unused]] size_t incy)
Wrappers for egblas par_shuffle operation.
Definition: shuffle.hpp:91