25#ifndef __LINALG_SPLA_HPP__
26#define __LINALG_SPLA_HPP__
29#include <spla/spla.hpp>
37get_spla_operation(
char c)
46 return SPLA_OP_TRANSPOSE;
50 return SPLA_OP_CONJ_TRANSPOSE;
53 throw std::runtime_error(
"get_spla_operation(): wrong operation");
59std::shared_ptr<::spla::Context>& get_handle_ptr();
62set_handle_ptr(std::shared_ptr<::spla::Context> ptr)
64 get_handle_ptr() = std::move(ptr);
68reset_handle(SplaProcessingUnit op = SPLA_PU_HOST)
70 get_handle_ptr().reset(new ::spla::Context{op});
74sgemm(
char transa,
char transb, ftn_int m, ftn_int n, ftn_int k, ftn_single
const* alpha, ftn_single
const* A,
75 ftn_int lda, ftn_single
const* B, ftn_int ldb, ftn_single
const* beta, ftn_single* C, ftn_int ldc)
77 ::spla::gemm(get_spla_operation(transa), get_spla_operation(transb), m, n, k, *alpha, A, lda, B, ldb, *beta, C, ldc,
82dgemm(
char transa,
char transb, ftn_int m, ftn_int n, ftn_int k, ftn_double
const* alpha, ftn_double
const* A,
83 ftn_int lda, ftn_double
const* B, ftn_int ldb, ftn_double
const* beta, ftn_double* C, ftn_int ldc)
85 ::spla::gemm(get_spla_operation(transa), get_spla_operation(transb), m, n, k, *alpha, A, lda, B, ldb, *beta, C, ldc,
90cgemm(
char transa,
char transb, ftn_int m, ftn_int n, ftn_int k, ftn_complex
const* alpha, ftn_complex
const* A,
91 ftn_int lda, ftn_complex
const* B, ftn_int ldb, ftn_complex
const* beta, ftn_complex* C, ftn_int ldc)
93 ::spla::gemm(get_spla_operation(transa), get_spla_operation(transb), m, n, k, *alpha, A, lda, B, ldb, *beta, C, ldc,
98zgemm(
char transa,
char transb, ftn_int m, ftn_int n, ftn_int k, ftn_double_complex
const* alpha,
99 ftn_double_complex
const* A, ftn_int lda, ftn_double_complex
const* B, ftn_int ldb,
100 ftn_double_complex
const* beta, ftn_double_complex* C, ftn_int ldc)
102 ::spla::gemm(get_spla_operation(transa), get_spla_operation(transb), m, n, k, *alpha, A, lda, B, ldb, *beta, C, ldc,
Interface to some BLAS/LAPACK functions.
Namespace of the SIRIUS library.