11#ifndef TLAPACK_STARPU_BLAS_CPU_HH
12#define TLAPACK_STARPU_BLAS_CPU_HH
14#include <starpu_cublas_v2.h>
15#include <starpu_cusolver.h>
17#include "tlapack/legacy_api/blas.hpp"
34 constexpr void gemm(
void**
buffers,
void*
args)
noexcept
36 using args_t = std::tuple<Op, Op, alpha_t, beta_t>;
61 if constexpr (
mode == 0) {
68 else if constexpr (
mode == 1) {
103 static_assert(
sizeof(T) == 0,
104 "Type not supported in cuBLAS");
111 static_assert(
mode == 0 ||
mode == 1,
"Invalid mode");
120 constexpr void symm(
void**
buffers,
void*
args)
noexcept
122 using args_t = std::tuple<Side, Uplo, alpha_t, beta_t>;
156 constexpr void hemm(
void**
buffers,
void*
args)
noexcept
158 using args_t = std::tuple<Side, Uplo, alpha_t, beta_t>;
186 template <
class TA,
class TC,
class alpha_t,
class beta_t,
int mode = 0>
187 constexpr void syrk(
void**
buffers,
void*
args)
noexcept
189 using args_t = std::tuple<Uplo, Op, alpha_t, beta_t>;
216 template <
class TA,
class TC,
class alpha_t,
class beta_t,
int mode = 0>
217 constexpr void herk(
void**
buffers,
void*
args)
noexcept
219 using args_t = std::tuple<Uplo, Op, alpha_t, beta_t>;
241 if constexpr (
mode == 0) {
246#ifdef STARPU_USE_CUDA
247 else if constexpr (
mode == 1) {
277 static_assert(
sizeof(T) == 0,
278 "Type not supported in cuBLAS");
285 static_assert(
mode == 0 ||
mode == 1,
"Invalid mode");
294 constexpr void syr2k(
void**
buffers,
void*
args)
noexcept
296 using args_t = std::tuple<Uplo, Op, alpha_t, beta_t>;
331 constexpr void her2k(
void**
buffers,
void*
args)
noexcept
333 using args_t = std::tuple<Uplo, Op, alpha_t, beta_t>;
362 template <
class TA,
class TB,
class alpha_t,
int mode = 0>
363 constexpr void trmm(
void**
buffers,
void*
args)
noexcept
365 using args_t = std::tuple<Side, Uplo, Op, Diag, alpha_t>;
390 template <
class TA,
class TB,
class alpha_t,
int mode = 0>
391 constexpr void trsm(
void**
buffers,
void*
args)
noexcept
393 using args_t = std::tuple<Side, Uplo, Op, Diag, alpha_t>;
414 if constexpr (
mode == 0)
417#ifdef STARPU_USE_CUDA
418 else if constexpr (
mode == 1) {
432 (
const float*)
A,
lda, (
float*)
B,
ldb);
437 (
const double*)
A,
lda, (
double*)
B,
ldb);
450 static_assert(
sizeof(T) == 0,
451 "Type not supported in cuBLAS");
458 static_assert(
mode == 0 ||
mode == 1,
"Invalid mode");
464 template <
class uplo_t,
class T,
bool has_info,
int mode = 0>
467 using args_t = std::tuple<uplo_t>;
485 if constexpr (
mode == 0) {
491#ifdef STARPU_HAVE_LIBCUSOLVER
492 if constexpr (
mode == 1) {
495 const size_t&
lwork =
521 static_assert(
sizeof(T) == 0,
522 "Type not supported in cuSolver");
529 static_assert(
mode == 0,
"Invalid mode");
void herk(Layout layout, Uplo uplo, Op trans, idx_t n, idx_t k, real_type< TA, TC > alpha, TA const *A, idx_t lda, real_type< TA, TC > beta, TC *C, idx_t ldc)
Hermitian rank-k update:
Definition herk.hpp:87
void syrk(Layout layout, Uplo uplo, Op trans, idx_t n, idx_t k, scalar_type< TA, TC > alpha, TA const *A, idx_t lda, scalar_type< TA, TC > beta, TC *C, idx_t ldc)
Symmetric rank-k update:
Definition syrk.hpp:89
void hemm(Layout layout, Side side, Uplo uplo, idx_t m, idx_t n, scalar_type< TA, TB, TC > alpha, TA const *A, idx_t lda, TB const *B, idx_t ldb, scalar_type< TA, TB, TC > beta, TC *C, idx_t ldc)
Hermitian matrix-matrix multiply:
Definition hemm.hpp:90
void gemm(Layout layout, Op transA, Op transB, idx_t m, idx_t n, idx_t k, scalar_type< TA, TB, TC > alpha, TA const *A, idx_t lda, TB const *B, idx_t ldb, scalar_type< TA, TB, TC > beta, TC *C, idx_t ldc)
General matrix-matrix multiply:
Definition gemm.hpp:103
void syr2k(Layout layout, Uplo uplo, Op trans, idx_t n, idx_t k, scalar_type< TA, TB, TC > alpha, TA const *A, idx_t lda, TB const *B, idx_t ldb, scalar_type< TA, TB, TC > beta, TC *C, idx_t ldc)
Symmetric rank-k update:
Definition syr2k.hpp:101
void her2k(Layout layout, Uplo uplo, Op trans, idx_t n, idx_t k, scalar_type< TA, TB, TC > alpha, TA const *A, idx_t lda, TB const *B, idx_t ldb, real_type< TA, TB, TC > beta, TC *C, idx_t ldc)
Hermitian rank-k update:
Definition her2k.hpp:100
void symm(Layout layout, Side side, Uplo uplo, idx_t m, idx_t n, scalar_type< TA, TB, TC > alpha, TA const *A, idx_t lda, TB const *B, idx_t ldb, scalar_type< TA, TB, TC > beta, TC *C, idx_t ldc)
Symmetric matrix-matrix multiply:
Definition symm.hpp:84
void trsm(Layout layout, Side side, Uplo uplo, Op trans, Diag diag, idx_t m, idx_t n, scalar_type< TA, TB > alpha, TA const *A, idx_t lda, TB *B, idx_t ldb)
Solve the triangular matrix-vector equation.
Definition trsm.hpp:102
void trmm(Layout layout, Side side, Uplo uplo, Op trans, Diag diag, idx_t m, idx_t n, scalar_type< TA, TB > alpha, TA const *A, idx_t lda, TB *B, idx_t ldb)
Triangular matrix-matrix multiply:
Definition trmm.hpp:98
int potrf(uplo_t uplo, idx_t n, T *A, idx_t lda)
Computes the Cholesky factorization of a Hermitian positive definite matrix A using a blocked algorit...
Definition potrf.hpp:26
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.
Sort the numbers in D in increasing order (if ID = 'I') or in decreasing order (if ID = 'D' ).
Definition arrayTraits.hpp:15
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
constexpr auto diag(T &A, int diagIdx=0) noexcept
Get the Diagonal of an Eigen Matrix.
Definition eigen.hpp:576
@ ColMajor
Column-major layout.