31#if defined( MXLIB_MKL )
35#elif defined( MXLIB_OPENBLAS )
41#include <gsl/gsl_cblas.h>
46#ifndef math_templateBLAS_hpp
47#define math_templateBLAS_hpp
60template <
typename dataT>
61void scal(
const int N,
const dataT &alpha, dataT *X,
const int incX )
61void scal(
const int N,
const dataT &alpha, dataT *X,
const int incX ) {
…}
68void scal<float>(
const int N,
const float &alpha,
float *X,
const int incX );
71void scal<double>(
const int N,
const double &alpha,
double *X,
const int incX );
78 const std::complex<double> &alpha,
79 std::complex<double> *X,
96template <
typename dataT>
103 for(
int i = 0;
i <
N;
i++ )
123template <
typename dataT>
124void hadp(
const int N, dataT *Y, dataT *X )
124void hadp(
const int N, dataT *Y, dataT *X ) {
…}
143template <
typename dataT>
144void hadd_impl(
const int N,
const dataT alpha,
const dataT *Y,
const int incY, dataT *X,
const int incX )
146#pragma omp parallel for
147 for(
int i = 0;
i <
N; ++
i )
144void hadd_impl(
const int N,
const dataT alpha,
const dataT *Y,
const int incY, dataT *X,
const int incX ) {
…}
167template <
typename dataT>
168void hadd(
const int N,
const dataT alpha,
const dataT *Y,
const int incY, dataT *X,
const int incX )
168void hadd(
const int N,
const dataT alpha,
const dataT *Y,
const int incY, dataT *X,
const int incX ) {
…}
178template <
typename dataT>
237 const std::complex<float> &alpha,
238 const std::complex<float> *A,
240 const std::complex<float> *
B,
242 const std::complex<float> &beta,
243 std::complex<float> *
C,
253 const std::complex<double> &alpha,
254 const std::complex<double> *A,
256 const std::complex<double> *
B,
258 const std::complex<double> &beta,
259 std::complex<double> *
C,
267template <
typename dataT>
320 const std::complex<float> &alpha,
321 const std::complex<float> *A,
323 const std::complex<float> &beta,
324 std::complex<float> *
C,
333 const std::complex<double> &alpha,
334 const std::complex<double> *A,
336 const std::complex<double> &beta,
337 std::complex<double> *
C,
constexpr floatT six_fifths()
Return 6/5 in the specified precision.
void hadp(const int N, dataT *Y, dataT *X)
Template wrapper for cblas-extension xHADP.
void syrk(const CBLAS_ORDER Order, const CBLAS_UPLO Uplo, const CBLAS_TRANSPOSE Trans, const int N, const int K, const dataT &alpha, const dataT *A, const int lda, const dataT &beta, dataT *C, const int ldc)
Template Wrapper for cblas xSYRK.
void scal(const int N, const dataT &alpha, dataT *X, const int incX)
Template wrapper for cblas xSCAL.
void hadd(const int N, const dataT alpha, const dataT *Y, const int incY, dataT *X, const int incX)
Template wrapper for cblas-extension xHADD.
void hadp_impl(const int N, dataT *__restrict__ Y, dataT *__restrict__ X)
Implementation of the Hadamard (element-wise) product of two vectors.
void hadd_impl(const int N, const dataT alpha, const dataT *Y, const int incY, dataT *X, const int incX)
Implementation of the Hadamard (element-wise) division of two vectors.
void gemm(const CBLAS_ORDER Order, const CBLAS_TRANSPOSE TransA, const CBLAS_TRANSPOSE TransB, const int M, const int N, const int K, const dataT &alpha, const dataT *A, const int lda, const dataT *B, const int ldb, const dataT &beta, dataT *C, const int ldc)
Template Wrapper for cblas xGEMM.