10#ifndef TLAPACK_CUDA_UTILS_HH
11#define TLAPACK_CUDA_UTILS_HH
20using std::enable_if_t;
27 template <
class... Ts>
29 static constexpr bool value =
false;
33 template <
class...
Ts>
37 template <
class...
Ts>
39#ifdef STARPU_HAVE_LIBCUSOLVER
51 static constexpr bool value =
true;
56 static constexpr bool value =
true;
59 template <
class T1,
class T2,
class...
Ts>
60 struct is_cublas<
T1,
T2,
Ts...> {
62 static constexpr bool value = is_cublas<T1, int>::value &&
63 is_cublas<
T2,
Ts...>::value &&
64 std::is_constructible_v<T, T1>;
67 inline cublasOperation_t op2cublas(
Op op)
noexcept
77 return CUBLAS_OP_CONJG;
79 return cublasOperation_t(-1);
83 inline cublasFillMode_t uplo2cublas(
Uplo uplo)
noexcept
87 return CUBLAS_FILL_MODE_UPPER;
89 return CUBLAS_FILL_MODE_LOWER;
91 return cublasFillMode_t(-1);
95 inline cublasDiagType_t diag2cublas(
Diag diag)
noexcept
99 return CUBLAS_DIAG_NON_UNIT;
101 return CUBLAS_DIAG_UNIT;
103 return cublasDiagType_t(-1);
107 inline cublasSideMode_t side2cublas(
Side side)
noexcept
111 return CUBLAS_SIDE_LEFT;
113 return CUBLAS_SIDE_RIGHT;
115 return cublasSideMode_t(-1);
Concept for types that represent tlapack::Diag.
Concept for types that represent tlapack::Op.
Concept for types that represent tlapack::Side.
Concept for types that represent tlapack::Uplo.
typename traits::real_type_traits< Types..., int >::type real_type
The common real type of the list of types.
Definition scalar_type_traits.hpp:113
typename traits::scalar_type_traits< Types..., int >::type scalar_type
The common scalar type of the list of types.
Definition scalar_type_traits.hpp:250
constexpr bool is_cublas_v
Alias for is_cublas<>::value.
Definition utils.hpp:34
constexpr bool is_cusolver_v
True if a type is supported by cuSOLVER.
Definition utils.hpp:38
Strong zero type.
Definition StrongZero.hpp:43
Check if a type is supported by cuBLAS.
Definition utils.hpp:28