QMCPACK
BLAS Namespace Reference

Interfaces to blas library. More...

Functions

static void axpy (int n, double x, const double *a, double *b)
 
static void axpy (int n, double x, const double *a, int incx, double *b, int incy)
 
static void axpy (int n, const double *a, double *b)
 
static void axpy (int n, float x, const float *a, int incx, float *b, int incy)
 
static void axpy (int n, float x, const float *a, float *b)
 
static void axpy (int n, const std::complex< float > x, const std::complex< float > *a, int incx, std::complex< float > *b, int incy)
 
static void axpy (int n, const std::complex< double > x, const std::complex< double > *a, int incx, std::complex< double > *b, int incy)
 
static float norm2 (int n, const float *a, int incx=1)
 
static float norm2 (int n, const std::complex< float > *a, int incx=1)
 
static double norm2 (int n, const double *a, int incx=1)
 
static double norm2 (int n, const std::complex< double > *a, int incx=1)
 
static void scal (int n, float alpha, float *x, int incx=1)
 
static void scal (int n, std::complex< float > alpha, std::complex< float > *x, int incx=1)
 
static void scal (int n, double alpha, double *x, int incx=1)
 
static void scal (int n, std::complex< double > alpha, std::complex< double > *x, int incx=1)
 
static void scal (int n, double alpha, std::complex< double > *x, int incx=1)
 
static void scal (int n, float alpha, std::complex< float > *x, int incx=1)
 
static void gemv (int n, int m, const double *restrict amat, const double *restrict x, double *restrict y)
 
static void gemv (int n, int m, const float *restrict amat, const float *restrict x, float *restrict y)
 
static void gemv (int n, int m, const std::complex< double > *restrict amat, const std::complex< double > *restrict x, std::complex< double > *restrict y)
 
static void gemv (int n, int m, const std::complex< float > *restrict amat, const std::complex< float > *restrict x, std::complex< float > *restrict y)
 
static void gemv_trans (int n, int m, const double *restrict amat, const double *restrict x, double *restrict y)
 
static void gemv_trans (int n, int m, const float *restrict amat, const float *restrict x, float *restrict y)
 
static void gemv_trans (int n, int m, const std::complex< double > *restrict amat, const std::complex< double > *restrict x, std::complex< double > *restrict y)
 
static void gemv_trans (int n, int m, const std::complex< float > *restrict amat, const std::complex< float > *restrict x, std::complex< float > *restrict y)
 
static void gemv (char trans_in, int n, int m, double alpha, const double *restrict amat, int lda, const double *x, int incx, double beta, double *y, int incy)
 
static void gemv (char trans_in, int n, int m, float alpha, const float *restrict amat, int lda, const float *x, int incx, float beta, float *y, int incy)
 
static void gemv (char trans_in, int n, int m, const std::complex< double > &alpha, const std::complex< double > *restrict amat, int lda, const std::complex< double > *restrict x, int incx, const std::complex< double > &beta, std::complex< double > *y, int incy)
 
static void gemv (char trans_in, int n, int m, const std::complex< float > &alpha, const std::complex< float > *restrict amat, int lda, const std::complex< float > *restrict x, int incx, const std::complex< float > &beta, std::complex< float > *y, int incy)
 
static void gemm (char Atrans, char Btrans, int M, int N, int K, double alpha, const double *A, int lda, const double *restrict B, int ldb, double beta, double *restrict C, int ldc)
 
static void gemm (char Atrans, char Btrans, int M, int N, int K, float alpha, const float *A, int lda, const float *restrict B, int ldb, float beta, float *restrict C, int ldc)
 
static void gemm (char Atrans, char Btrans, int M, int N, int K, std::complex< double > alpha, const std::complex< double > *A, int lda, const std::complex< double > *restrict B, int ldb, std::complex< double > beta, std::complex< double > *restrict C, int ldc)
 
static void gemm (char Atrans, char Btrans, int M, int N, int K, std::complex< float > alpha, const std::complex< float > *A, int lda, const std::complex< float > *restrict B, int ldb, std::complex< float > beta, std::complex< float > *restrict C, int ldc)
 
template<typename T >
static T dot (int n, const T *restrict a, const T *restrict b)
 
template<typename T >
static std::complex< T > dot (int n, const std::complex< T > *restrict a, const T *restrict b)
 
template<typename T >
static std::complex< T > dot (int n, const std::complex< T > *restrict a, const std::complex< T > *restrict b)
 
template<typename T >
static std::complex< T > dot (int n, const T *restrict a, const std::complex< T > *restrict b)
 
template<typename T >
static T dot (int n, const T *restrict a, int incx, const T *restrict b, int incy)
 
template<typename T >
static std::complex< T > dot (int n, const std::complex< T > *restrict a, int incx, const T *restrict b, int incy)
 
template<typename T >
static std::complex< T > dot (int n, const T *restrict a, int incx, const std::complex< T > *restrict b, int incy)
 
template<typename T >
static std::complex< T > dot (int n, const std::complex< T > *restrict a, int incx, const std::complex< T > *restrict b, int incy)
 
template<typename T >
static void copy (int n, const T *restrict a, T *restrict b)
 
template<typename T >
static void copy (T *restrict target, const T *restrict source, int n)
 copy using memcpy(target,source,size) More...
 
template<typename T >
static void copy (int n, const std::complex< T > *restrict a, T *restrict b)
 
template<typename T >
static void copy (int n, const T *restrict a, std::complex< T > *restrict b)
 
template<typename T >
static void copy (int n, const T *restrict x, int incx, T *restrict y, int incy)
 
static void ger (int m, int n, double alpha, const double *x, int incx, const double *y, int incy, double *a, int lda)
 
static void ger (int m, int n, float alpha, const float *x, int incx, const float *y, int incy, float *a, int lda)
 
static void ger (int m, int n, const std::complex< double > &alpha, const std::complex< double > *x, int incx, const std::complex< double > *y, int incy, std::complex< double > *a, int lda)
 
static void ger (int m, int n, const std::complex< float > &alpha, const std::complex< float > *x, int incx, const std::complex< float > *y, int incy, std::complex< float > *a, int lda)
 

Variables

constexpr int INCX = 1
 
constexpr int INCY = 1
 
constexpr char UPLO = 'L'
 
constexpr char TRANS = 'T'
 
constexpr char NOTRANS = 'N'
 
constexpr float sone = 1.0e0
 
constexpr float szero = 0.0e0
 
constexpr double done = 1.0e0
 
constexpr double dzero = 0.0e0
 
constexpr std::complex< float > cone = 1.0e0
 
constexpr std::complex< float > czero = 0.0e0
 
constexpr std::complex< double > zone = 1.0e0
 
constexpr std::complex< double > zzero = 0.0e0
 

Detailed Description

Interfaces to blas library.

static data members to facilitate /Fortran blas interface static member functions to use blas functions

  • inline static void axpy
  • inline static double norm2
  • inline static float norm2
  • inline static void symv
  • inline static double dot
  • inline static float dot

Arguments (float/double/complex<float>/complex<double>) determine which BLAS routines are actually used. Note that symv can be call in many ways.

Function Documentation

◆ axpy() [1/7]

static void BLAS::axpy ( int  n,
double  x,
const double *  a,
double *  b 
)
inlinestatic

Definition at line 55 of file BLAS.hpp.

References daxpy(), INCX, INCY, and qmcplusplus::n.

Referenced by RotatedSPOs::table_method_eval(), and RotatedSPOs::table_method_evalWF().

55 { daxpy(n, x, a, INCX, b, INCY); }
constexpr int INCY
Definition: BLAS.hpp:41
constexpr int INCX
Definition: BLAS.hpp:40
void daxpy(const int &n, const double &da, const double *dx, const int &incx, double *dy, const int &incy)

◆ axpy() [2/7]

static void BLAS::axpy ( int  n,
double  x,
const double *  a,
int  incx,
double *  b,
int  incy 
)
inlinestatic

Definition at line 57 of file BLAS.hpp.

References daxpy(), and qmcplusplus::n.

58  {
59  daxpy(n, x, a, incx, b, incy);
60  }
void daxpy(const int &n, const double &da, const double *dx, const int &incx, double *dy, const int &incy)

◆ axpy() [3/7]

static void BLAS::axpy ( int  n,
const double *  a,
double *  b 
)
inlinestatic

Definition at line 62 of file BLAS.hpp.

References daxpy(), done, INCX, INCY, and qmcplusplus::n.

62 { daxpy(n, done, a, INCX, b, INCY); }
constexpr int INCY
Definition: BLAS.hpp:41
constexpr int INCX
Definition: BLAS.hpp:40
constexpr double done
Definition: BLAS.hpp:48
void daxpy(const int &n, const double &da, const double *dx, const int &incx, double *dy, const int &incy)

◆ axpy() [4/7]

static void BLAS::axpy ( int  n,
float  x,
const float *  a,
int  incx,
float *  b,
int  incy 
)
inlinestatic

Definition at line 64 of file BLAS.hpp.

References qmcplusplus::n, and saxpy().

65  {
66  saxpy(n, x, a, incx, b, incy);
67  }
void saxpy(const int &n, const float &da, const float *dx, const int &incx, float *dy, const int &incy)

◆ axpy() [5/7]

static void BLAS::axpy ( int  n,
float  x,
const float *  a,
float *  b 
)
inlinestatic

Definition at line 69 of file BLAS.hpp.

References INCX, INCY, qmcplusplus::n, and saxpy().

69 { saxpy(n, x, a, INCX, b, INCY); }
constexpr int INCY
Definition: BLAS.hpp:41
void saxpy(const int &n, const float &da, const float *dx, const int &incx, float *dy, const int &incy)
constexpr int INCX
Definition: BLAS.hpp:40

◆ axpy() [6/7]

static void BLAS::axpy ( int  n,
const std::complex< float >  x,
const std::complex< float > *  a,
int  incx,
std::complex< float > *  b,
int  incy 
)
inlinestatic

Definition at line 71 of file BLAS.hpp.

References caxpy(), and qmcplusplus::n.

77  {
78  caxpy(n, x, a, incx, b, incy);
79  }
void caxpy(const int &n, const std::complex< float > &da, const std::complex< float > *dx, const int &incx, std::complex< float > *dy, const int &incy)

◆ axpy() [7/7]

static void BLAS::axpy ( int  n,
const std::complex< double >  x,
const std::complex< double > *  a,
int  incx,
std::complex< double > *  b,
int  incy 
)
inlinestatic

Definition at line 81 of file BLAS.hpp.

References qmcplusplus::n, and zaxpy().

87  {
88  zaxpy(n, x, a, incx, b, incy);
89  }
void zaxpy(const int &n, const std::complex< double > &da, const std::complex< double > *dx, const int &incx, std::complex< double > *dy, const int &incy)

◆ copy() [1/5]

static void BLAS::copy ( int  n,
const T *restrict  a,
T *restrict  b 
)
inlinestatic

Definition at line 381 of file BLAS.hpp.

References qmcplusplus::n.

Referenced by qmcplusplus::det_col_update(), LCAOrbitalSet::mw_evaluateVGL(), RotatedSPOs::table_method_eval(), and RotatedSPOs::table_method_evalWF().

382  {
383  memcpy(b, a, sizeof(T) * n);
384  }

◆ copy() [2/5]

static void BLAS::copy ( T *restrict  target,
const T *restrict  source,
int  n 
)
inlinestatic

copy using memcpy(target,source,size)

Parameters
targetstarting address of the targe
sourcestarting address of the source
numberof elements to copy

Definition at line 392 of file BLAS.hpp.

References qmcplusplus::n.

393  {
394  memcpy(target, source, sizeof(T) * n);
395  }

◆ copy() [3/5]

static void BLAS::copy ( int  n,
const std::complex< T > *restrict  a,
T *restrict  b 
)
inlinestatic

Definition at line 398 of file BLAS.hpp.

References qmcplusplus::n.

399  {
400  for (int i = 0; i < n; ++i)
401  b[i] = a[i].real();
402  }
QMCTraits::RealType real

◆ copy() [4/5]

static void BLAS::copy ( int  n,
const T *restrict  a,
std::complex< T > *restrict  b 
)
inlinestatic

Definition at line 405 of file BLAS.hpp.

References qmcplusplus::n.

406  {
407  for (int i = 0; i < n; ++i)
408  b[i] = a[i];
409  }

◆ copy() [5/5]

static void BLAS::copy ( int  n,
const T *restrict  x,
int  incx,
T *restrict  y,
int  incy 
)
inlinestatic

Definition at line 412 of file BLAS.hpp.

References qmcplusplus::n.

413  {
414  const int xmax = incx * n;
415  for (int ic = 0, jc = 0; ic < xmax; ic += incx, jc += incy)
416  y[jc] = x[ic];
417  }

◆ dot() [1/8]

static T BLAS::dot ( int  n,
const T *restrict  a,
const T *restrict  b 
)
inlinestatic

Definition at line 304 of file BLAS.hpp.

References qmcplusplus::n.

Referenced by PWOrbitalSet::evaluate(), PWRealOrbitalSet::evaluate(), qmcplusplus::getRatioByColSubstitution(), qmcplusplus::getRatiosByRowSubstitution(), and qmcplusplus::getRatiosByRowSubstitution_dummy().

305  {
306  T res = T(0);
307  for (int i = 0; i < n; ++i)
308  res += a[i] * b[i];
309  return res;
310  }

◆ dot() [2/8]

static std::complex<T> BLAS::dot ( int  n,
const std::complex< T > *restrict  a,
const T *restrict  b 
)
inlinestatic

Definition at line 313 of file BLAS.hpp.

References qmcplusplus::n.

314  {
315  std::complex<T> res = T(0);
316  for (int i = 0; i < n; ++i)
317  res += a[i] * b[i];
318  return res;
319  }

◆ dot() [3/8]

static std::complex<T> BLAS::dot ( int  n,
const std::complex< T > *restrict  a,
const std::complex< T > *restrict  b 
)
inlinestatic

Definition at line 322 of file BLAS.hpp.

References qmcplusplus::n.

323  {
324  std::complex<T> res = 0.0;
325  for (int i = 0; i < n; ++i)
326  res += a[i] * b[i];
327  return res;
328  }

◆ dot() [4/8]

static std::complex<T> BLAS::dot ( int  n,
const T *restrict  a,
const std::complex< T > *restrict  b 
)
inlinestatic

Definition at line 332 of file BLAS.hpp.

References qmcplusplus::n.

333  {
334  std::complex<T> res = 0.0;
335  for (int i = 0; i < n; ++i)
336  res += a[i] * b[i];
337  return res;
338  }

◆ dot() [5/8]

static T BLAS::dot ( int  n,
const T *restrict  a,
int  incx,
const T *restrict  b,
int  incy 
)
inlinestatic

Definition at line 341 of file BLAS.hpp.

References qmcplusplus::n.

342  {
343  T res = T(0);
344  for (int i = 0, ia = 0, ib = 0; i < n; ++i, ia += incx, ib += incy)
345  res += a[ia] * b[ib];
346  return res;
347  }

◆ dot() [6/8]

static std::complex<T> BLAS::dot ( int  n,
const std::complex< T > *restrict  a,
int  incx,
const T *restrict  b,
int  incy 
)
inlinestatic

Definition at line 350 of file BLAS.hpp.

References qmcplusplus::n.

351  {
352  std::complex<T> res = T(0);
353  for (int i = 0, ia = 0, ib = 0; i < n; ++i, ia += incx, ib += incy)
354  res += a[ia] * b[ib];
355  return res;
356  }

◆ dot() [7/8]

static std::complex<T> BLAS::dot ( int  n,
const T *restrict  a,
int  incx,
const std::complex< T > *restrict  b,
int  incy 
)
inlinestatic

Definition at line 359 of file BLAS.hpp.

References qmcplusplus::n.

360  {
361  std::complex<T> res = T(0);
362  for (int i = 0, ia = 0, ib = 0; i < n; ++i, ia += incx, ib += incy)
363  res += a[ia] * b[ib];
364  return res;
365  }

◆ dot() [8/8]

static std::complex<T> BLAS::dot ( int  n,
const std::complex< T > *restrict  a,
int  incx,
const std::complex< T > *restrict  b,
int  incy 
)
inlinestatic

Definition at line 368 of file BLAS.hpp.

References qmcplusplus::n.

373  {
374  std::complex<T> res = T(0);
375  for (int i = 0, ia = 0, ib = 0; i < n; ++i, ia += incx, ib += incy)
376  res += a[ia] * b[ib];
377  return res;
378  }

◆ gemm() [1/4]

static void BLAS::gemm ( char  Atrans,
char  Btrans,
int  M,
int  N,
int  K,
double  alpha,
const double *  A,
int  lda,
const double *restrict  B,
int  ldb,
double  beta,
double *restrict  C,
int  ldc 
)
inlinestatic

Definition at line 235 of file BLAS.hpp.

References qmcplusplus::Units::distance::A, B(), qmcplusplus::Units::charge::C, dgemm(), qmcplusplus::Units::energy::K, qmcplusplus::lda, and qmcplusplus::Units::force::N.

Referenced by LCAOrbitalSet::applyRotation(), SplineR2R< ST >::applyRotation(), SplineC2C< ST >::applyRotation(), RotatedSPOs::constructDeltaRotation(), RotatedSPOs::evaluateDerivatives(), RotatedSPOs::evaluateDerivativesWF(), RotatedSPOs::evaluateDerivRatios(), RotatedSPOs::exponentiate_antisym_matrix(), RotatedSPOs::log_antisym_matrix(), qmcplusplus::testing::makeRngSpdMatrix(), LCAOrbitalSet::mw_evaluateValueImplGEMM(), LCAOrbitalSet::mw_evaluateValueVPsImplGEMM(), LCAOrbitalSet::mw_evaluateVGLImplGEMM(), qmcplusplus::MatrixOperators::product(), qmcplusplus::MatrixOperators::product_ABt(), qmcplusplus::Product_ABt(), qmcplusplus::MatrixOperators::product_AtB(), RotatedSPOs::table_method_eval(), RotatedSPOs::table_method_evalWF(), qmcplusplus::test_gemm(), qmcplusplus::test_one_gemm(), and DelayedUpdate< T, T_FP >::updateInvMat().

248  {
249  dgemm(Atrans, Btrans, M, N, K, alpha, A, lda, B, ldb, beta, C, ldc);
250  }
void dgemm(const char &, const char &, const int &, const int &, const int &, const double &, const double *, const int &, const double *, const int &, const double &, double *, const int &)
double B(double x, int k, int i, const std::vector< double > &t)

◆ gemm() [2/4]

static void BLAS::gemm ( char  Atrans,
char  Btrans,
int  M,
int  N,
int  K,
float  alpha,
const float *  A,
int  lda,
const float *restrict  B,
int  ldb,
float  beta,
float *restrict  C,
int  ldc 
)
inlinestatic

Definition at line 252 of file BLAS.hpp.

References qmcplusplus::Units::distance::A, B(), qmcplusplus::Units::charge::C, qmcplusplus::Units::energy::K, qmcplusplus::lda, qmcplusplus::Units::force::N, and sgemm().

265  {
266  sgemm(Atrans, Btrans, M, N, K, alpha, A, lda, B, ldb, beta, C, ldc);
267  }
void sgemm(const char &, const char &, const int &, const int &, const int &, const float &, const float *, const int &, const float *, const int &, const float &, float *, const int &)
double B(double x, int k, int i, const std::vector< double > &t)

◆ gemm() [3/4]

static void BLAS::gemm ( char  Atrans,
char  Btrans,
int  M,
int  N,
int  K,
std::complex< double >  alpha,
const std::complex< double > *  A,
int  lda,
const std::complex< double > *restrict  B,
int  ldb,
std::complex< double >  beta,
std::complex< double > *restrict  C,
int  ldc 
)
inlinestatic

Definition at line 269 of file BLAS.hpp.

References qmcplusplus::Units::distance::A, B(), qmcplusplus::Units::charge::C, qmcplusplus::Units::energy::K, qmcplusplus::lda, qmcplusplus::Units::force::N, and zgemm().

282  {
283  zgemm(Atrans, Btrans, M, N, K, alpha, A, lda, B, ldb, beta, C, ldc);
284  }
void zgemm(const char &, const char &, const int &, const int &, const int &, const std::complex< double > &, const std::complex< double > *, const int &, const std::complex< double > *, const int &, const std::complex< double > &, std::complex< double > *, const int &)
double B(double x, int k, int i, const std::vector< double > &t)

◆ gemm() [4/4]

static void BLAS::gemm ( char  Atrans,
char  Btrans,
int  M,
int  N,
int  K,
std::complex< float >  alpha,
const std::complex< float > *  A,
int  lda,
const std::complex< float > *restrict  B,
int  ldb,
std::complex< float >  beta,
std::complex< float > *restrict  C,
int  ldc 
)
inlinestatic

Definition at line 286 of file BLAS.hpp.

References qmcplusplus::Units::distance::A, B(), qmcplusplus::Units::charge::C, cgemm(), qmcplusplus::Units::energy::K, qmcplusplus::lda, and qmcplusplus::Units::force::N.

299  {
300  cgemm(Atrans, Btrans, M, N, K, alpha, A, lda, B, ldb, beta, C, ldc);
301  }
void cgemm(const char &, const char &, const int &, const int &, const int &, const std::complex< float > &, const std::complex< float > *, const int &, const std::complex< float > *, const int &, const std::complex< float > &, std::complex< float > *, const int &)
double B(double x, int k, int i, const std::vector< double > &t)

◆ gemv() [1/8]

static void BLAS::gemv ( int  n,
int  m,
const double *restrict  amat,
const double *restrict  x,
double *restrict  y 
)
inlinestatic

Definition at line 118 of file BLAS.hpp.

References dgemv(), done, dzero, INCX, INCY, qmcplusplus::Units::distance::m, qmcplusplus::n, and NOTRANS.

Referenced by DelayedUpdate< T, T_FP >::acceptRow(), DelayedUpdateSYCL< T, T_FP >::acceptRow(), DelayedUpdateCUDA< T, T_FP >::acceptRow(), qmcplusplus::det_col_update(), qmcplusplus::det_row_update(), SOECPComponent::evaluateValueAndDerivatives(), NonLocalECPComponent::evaluateValueAndDerivatives(), DelayedUpdate< T, T_FP >::getInvRow(), DelayedUpdateSYCL< T, T_FP >::getInvRow(), DelayedUpdateCUDA< T, T_FP >::getInvRow(), qmcplusplus::getRatiosByRowSubstitution(), qmcplusplus::MatrixOperators::product(), qmcplusplus::MatrixOperators::product_Atx(), qmcplusplus::test_gemv(), qmcplusplus::test_gemv_batched(), qmcplusplus::test_one_gemv(), and DelayedUpdate< T, T_FP >::updateInvMat().

119  {
120  dgemv(NOTRANS, m, n, done, amat, m, x, INCX, dzero, y, INCY);
121  }
constexpr int INCY
Definition: BLAS.hpp:41
constexpr double dzero
Definition: BLAS.hpp:49
constexpr int INCX
Definition: BLAS.hpp:40
constexpr double done
Definition: BLAS.hpp:48
constexpr char NOTRANS
Definition: BLAS.hpp:44
void dgemv(const char &trans, const int &nr, const int &nc, const double &alpha, const double *amat, const int &lda, const double *bv, const int &incx, const double &beta, double *cv, const int &incy)

◆ gemv() [2/8]

static void BLAS::gemv ( int  n,
int  m,
const float *restrict  amat,
const float *restrict  x,
float *restrict  y 
)
inlinestatic

Definition at line 123 of file BLAS.hpp.

References done, dzero, INCX, INCY, qmcplusplus::Units::distance::m, qmcplusplus::n, NOTRANS, and sgemv().

124  {
125  sgemv(NOTRANS, m, n, done, amat, m, x, INCX, dzero, y, INCY);
126  }
constexpr int INCY
Definition: BLAS.hpp:41
constexpr double dzero
Definition: BLAS.hpp:49
constexpr int INCX
Definition: BLAS.hpp:40
constexpr double done
Definition: BLAS.hpp:48
constexpr char NOTRANS
Definition: BLAS.hpp:44
void sgemv(const char &trans, const int &nr, const int &nc, const float &alpha, const float *amat, const int &lda, const float *bv, const int &incx, const float &beta, float *cv, const int &incy)

◆ gemv() [3/8]

static void BLAS::gemv ( int  n,
int  m,
const std::complex< double > *restrict  amat,
const std::complex< double > *restrict  x,
std::complex< double > *restrict  y 
)
inlinestatic

Definition at line 128 of file BLAS.hpp.

References INCX, INCY, qmcplusplus::Units::distance::m, qmcplusplus::n, NOTRANS, zgemv(), zone, and zzero.

133  {
134  zgemv(NOTRANS, m, n, zone, amat, m, x, INCX, zzero, y, INCY);
135  }
constexpr int INCY
Definition: BLAS.hpp:41
constexpr int INCX
Definition: BLAS.hpp:40
constexpr std::complex< double > zone
Definition: BLAS.hpp:52
void zgemv(const char &trans, const int &nr, const int &nc, const std::complex< double > &alpha, const std::complex< double > *amat, const int &lda, const std::complex< double > *bv, const int &incx, const std::complex< double > &beta, std::complex< double > *cv, const int &incy)
constexpr std::complex< double > zzero
Definition: BLAS.hpp:53
constexpr char NOTRANS
Definition: BLAS.hpp:44

◆ gemv() [4/8]

static void BLAS::gemv ( int  n,
int  m,
const std::complex< float > *restrict  amat,
const std::complex< float > *restrict  x,
std::complex< float > *restrict  y 
)
inlinestatic

Definition at line 137 of file BLAS.hpp.

References cgemv(), cone, czero, INCX, INCY, qmcplusplus::Units::distance::m, qmcplusplus::n, and NOTRANS.

142  {
143  cgemv(NOTRANS, m, n, cone, amat, m, x, INCX, czero, y, INCY);
144  }
constexpr int INCY
Definition: BLAS.hpp:41
constexpr std::complex< float > czero
Definition: BLAS.hpp:51
constexpr std::complex< float > cone
Definition: BLAS.hpp:50
constexpr int INCX
Definition: BLAS.hpp:40
void cgemv(const char &trans, const int &nr, const int &nc, const std::complex< float > &alpha, const std::complex< float > *amat, const int &lda, const std::complex< float > *bv, const int &incx, const std::complex< float > &beta, std::complex< float > *cv, const int &incy)
constexpr char NOTRANS
Definition: BLAS.hpp:44

◆ gemv() [5/8]

static void BLAS::gemv ( char  trans_in,
int  n,
int  m,
double  alpha,
const double *restrict  amat,
int  lda,
const double *  x,
int  incx,
double  beta,
double *  y,
int  incy 
)
inlinestatic

Definition at line 175 of file BLAS.hpp.

References dgemv(), qmcplusplus::lda, qmcplusplus::Units::distance::m, and qmcplusplus::n.

186  {
187  dgemv(trans_in, n, m, alpha, amat, lda, x, incx, beta, y, incy);
188  }
void dgemv(const char &trans, const int &nr, const int &nc, const double &alpha, const double *amat, const int &lda, const double *bv, const int &incx, const double &beta, double *cv, const int &incy)

◆ gemv() [6/8]

static void BLAS::gemv ( char  trans_in,
int  n,
int  m,
float  alpha,
const float *restrict  amat,
int  lda,
const float *  x,
int  incx,
float  beta,
float *  y,
int  incy 
)
inlinestatic

Definition at line 190 of file BLAS.hpp.

References qmcplusplus::lda, qmcplusplus::Units::distance::m, qmcplusplus::n, and sgemv().

201  {
202  sgemv(trans_in, n, m, alpha, amat, lda, x, incx, beta, y, incy);
203  }
void sgemv(const char &trans, const int &nr, const int &nc, const float &alpha, const float *amat, const int &lda, const float *bv, const int &incx, const float &beta, float *cv, const int &incy)

◆ gemv() [7/8]

static void BLAS::gemv ( char  trans_in,
int  n,
int  m,
const std::complex< double > &  alpha,
const std::complex< double > *restrict  amat,
int  lda,
const std::complex< double > *restrict  x,
int  incx,
const std::complex< double > &  beta,
std::complex< double > *  y,
int  incy 
)
inlinestatic

Definition at line 205 of file BLAS.hpp.

References qmcplusplus::lda, qmcplusplus::Units::distance::m, qmcplusplus::n, and zgemv().

216  {
217  zgemv(trans_in, n, m, alpha, amat, lda, x, incx, beta, y, incy);
218  }
void zgemv(const char &trans, const int &nr, const int &nc, const std::complex< double > &alpha, const std::complex< double > *amat, const int &lda, const std::complex< double > *bv, const int &incx, const std::complex< double > &beta, std::complex< double > *cv, const int &incy)

◆ gemv() [8/8]

static void BLAS::gemv ( char  trans_in,
int  n,
int  m,
const std::complex< float > &  alpha,
const std::complex< float > *restrict  amat,
int  lda,
const std::complex< float > *restrict  x,
int  incx,
const std::complex< float > &  beta,
std::complex< float > *  y,
int  incy 
)
inlinestatic

Definition at line 220 of file BLAS.hpp.

References cgemv(), qmcplusplus::lda, qmcplusplus::Units::distance::m, and qmcplusplus::n.

231  {
232  cgemv(trans_in, n, m, alpha, amat, lda, x, incx, beta, y, incy);
233  }
void cgemv(const char &trans, const int &nr, const int &nc, const std::complex< float > &alpha, const std::complex< float > *amat, const int &lda, const std::complex< float > *bv, const int &incx, const std::complex< float > &beta, std::complex< float > *cv, const int &incy)

◆ gemv_trans() [1/4]

static void BLAS::gemv_trans ( int  n,
int  m,
const double *restrict  amat,
const double *restrict  x,
double *restrict  y 
)
inlinestatic

Definition at line 147 of file BLAS.hpp.

References dgemv(), done, dzero, INCX, INCY, qmcplusplus::Units::distance::m, qmcplusplus::n, and TRANS.

Referenced by qmcplusplus::test_gemv(), qmcplusplus::test_gemv_batched(), and qmcplusplus::test_one_gemv().

148  {
149  dgemv(TRANS, m, n, done, amat, m, x, INCX, dzero, y, INCY);
150  }
constexpr int INCY
Definition: BLAS.hpp:41
constexpr double dzero
Definition: BLAS.hpp:49
constexpr int INCX
Definition: BLAS.hpp:40
constexpr double done
Definition: BLAS.hpp:48
constexpr char TRANS
Definition: BLAS.hpp:43
void dgemv(const char &trans, const int &nr, const int &nc, const double &alpha, const double *amat, const int &lda, const double *bv, const int &incx, const double &beta, double *cv, const int &incy)

◆ gemv_trans() [2/4]

static void BLAS::gemv_trans ( int  n,
int  m,
const float *restrict  amat,
const float *restrict  x,
float *restrict  y 
)
inlinestatic

Definition at line 152 of file BLAS.hpp.

References done, dzero, INCX, INCY, qmcplusplus::Units::distance::m, qmcplusplus::n, sgemv(), and TRANS.

153  {
154  sgemv(TRANS, m, n, done, amat, m, x, INCX, dzero, y, INCY);
155  }
constexpr int INCY
Definition: BLAS.hpp:41
constexpr double dzero
Definition: BLAS.hpp:49
constexpr int INCX
Definition: BLAS.hpp:40
constexpr double done
Definition: BLAS.hpp:48
constexpr char TRANS
Definition: BLAS.hpp:43
void sgemv(const char &trans, const int &nr, const int &nc, const float &alpha, const float *amat, const int &lda, const float *bv, const int &incx, const float &beta, float *cv, const int &incy)

◆ gemv_trans() [3/4]

static void BLAS::gemv_trans ( int  n,
int  m,
const std::complex< double > *restrict  amat,
const std::complex< double > *restrict  x,
std::complex< double > *restrict  y 
)
inlinestatic

Definition at line 157 of file BLAS.hpp.

References done, dzero, INCX, INCY, qmcplusplus::Units::distance::m, qmcplusplus::n, TRANS, and zgemv().

162  {
163  zgemv(TRANS, m, n, done, amat, m, x, INCX, dzero, y, INCY);
164  }
constexpr int INCY
Definition: BLAS.hpp:41
constexpr double dzero
Definition: BLAS.hpp:49
constexpr int INCX
Definition: BLAS.hpp:40
void zgemv(const char &trans, const int &nr, const int &nc, const std::complex< double > &alpha, const std::complex< double > *amat, const int &lda, const std::complex< double > *bv, const int &incx, const std::complex< double > &beta, std::complex< double > *cv, const int &incy)
constexpr double done
Definition: BLAS.hpp:48
constexpr char TRANS
Definition: BLAS.hpp:43

◆ gemv_trans() [4/4]

static void BLAS::gemv_trans ( int  n,
int  m,
const std::complex< float > *restrict  amat,
const std::complex< float > *restrict  x,
std::complex< float > *restrict  y 
)
inlinestatic

Definition at line 166 of file BLAS.hpp.

References cgemv(), done, dzero, INCX, INCY, qmcplusplus::Units::distance::m, qmcplusplus::n, and TRANS.

171  {
172  cgemv(TRANS, m, n, done, amat, m, x, INCX, dzero, y, INCY);
173  }
constexpr int INCY
Definition: BLAS.hpp:41
constexpr double dzero
Definition: BLAS.hpp:49
constexpr int INCX
Definition: BLAS.hpp:40
void cgemv(const char &trans, const int &nr, const int &nc, const std::complex< float > &alpha, const std::complex< float > *amat, const int &lda, const std::complex< float > *bv, const int &incx, const std::complex< float > &beta, std::complex< float > *cv, const int &incy)
constexpr double done
Definition: BLAS.hpp:48
constexpr char TRANS
Definition: BLAS.hpp:43

◆ ger() [1/4]

static void BLAS::ger ( int  m,
int  n,
double  alpha,
const double *  x,
int  incx,
const double *  y,
int  incy,
double *  a,
int  lda 
)
inlinestatic

Definition at line 437 of file BLAS.hpp.

References dger(), qmcplusplus::lda, qmcplusplus::Units::distance::m, and qmcplusplus::n.

Referenced by DelayedUpdate< T, T_FP >::acceptRow(), DelayedUpdateSYCL< T, T_FP >::acceptRow(), DelayedUpdateCUDA< T, T_FP >::acceptRow(), qmcplusplus::det_col_update(), qmcplusplus::det_row_update(), qmcplusplus::test_ger(), qmcplusplus::test_ger_batched(), qmcplusplus::test_one_ger(), and DelayedUpdate< T, T_FP >::updateInvMat().

446  {
447  dger(&m, &n, &alpha, x, &incx, y, &incy, a, &lda);
448  }
void dger(const int *m, const int *n, const double *alpha, const double *x, const int *incx, const double *y, const int *incy, double *a, const int *lda)

◆ ger() [2/4]

static void BLAS::ger ( int  m,
int  n,
float  alpha,
const float *  x,
int  incx,
const float *  y,
int  incy,
float *  a,
int  lda 
)
inlinestatic

Definition at line 450 of file BLAS.hpp.

References qmcplusplus::lda, qmcplusplus::Units::distance::m, qmcplusplus::n, and sger().

459  {
460  sger(&m, &n, &alpha, x, &incx, y, &incy, a, &lda);
461  }
void sger(const int *m, const int *n, const float *alpha, const float *x, const int *incx, const float *y, const int *incy, float *a, const int *lda)

◆ ger() [3/4]

static void BLAS::ger ( int  m,
int  n,
const std::complex< double > &  alpha,
const std::complex< double > *  x,
int  incx,
const std::complex< double > *  y,
int  incy,
std::complex< double > *  a,
int  lda 
)
inlinestatic

Definition at line 463 of file BLAS.hpp.

References qmcplusplus::lda, qmcplusplus::Units::distance::m, qmcplusplus::n, and zgeru().

472  {
473  zgeru(&m, &n, &alpha, x, &incx, y, &incy, a, &lda);
474  }
void zgeru(const int *m, const int *n, const std::complex< double > *alpha, const std::complex< double > *x, const int *incx, const std::complex< double > *y, const int *incy, std::complex< double > *a, const int *lda)

◆ ger() [4/4]

static void BLAS::ger ( int  m,
int  n,
const std::complex< float > &  alpha,
const std::complex< float > *  x,
int  incx,
const std::complex< float > *  y,
int  incy,
std::complex< float > *  a,
int  lda 
)
inlinestatic

Definition at line 476 of file BLAS.hpp.

References cgeru(), qmcplusplus::lda, qmcplusplus::Units::distance::m, and qmcplusplus::n.

485  {
486  cgeru(&m, &n, &alpha, x, &incx, y, &incy, a, &lda);
487  }
void cgeru(const int *m, const int *n, const std::complex< float > *alpha, const std::complex< float > *x, const int *incx, const std::complex< float > *y, const int *incy, std::complex< float > *a, const int *lda)

◆ norm2() [1/4]

static float BLAS::norm2 ( int  n,
const float *  a,
int  incx = 1 
)
inlinestatic

Definition at line 91 of file BLAS.hpp.

References qmcplusplus::n, and snrm2().

91 { return snrm2(n, a, incx); }
float snrm2(const int &n, const float *dx, const int &incx)

◆ norm2() [2/4]

static float BLAS::norm2 ( int  n,
const std::complex< float > *  a,
int  incx = 1 
)
inlinestatic

Definition at line 93 of file BLAS.hpp.

References qmcplusplus::n, and scnrm2().

93 { return scnrm2(n, a, incx); }
float scnrm2(const int &n, const std::complex< float > *dx, const int &incx)

◆ norm2() [3/4]

static double BLAS::norm2 ( int  n,
const double *  a,
int  incx = 1 
)
inlinestatic

Definition at line 95 of file BLAS.hpp.

References dnrm2(), and qmcplusplus::n.

95 { return dnrm2(n, a, incx); }
double dnrm2(const int &n, const double *dx, const int &incx)

◆ norm2() [4/4]

static double BLAS::norm2 ( int  n,
const std::complex< double > *  a,
int  incx = 1 
)
inlinestatic

Definition at line 97 of file BLAS.hpp.

References dznrm2(), and qmcplusplus::n.

97 { return dznrm2(n, a, incx); }
double dznrm2(const int &n, const std::complex< double > *dx, const int &incx)

◆ scal() [1/6]

static void BLAS::scal ( int  n,
float  alpha,
float *  x,
int  incx = 1 
)
inlinestatic

Definition at line 99 of file BLAS.hpp.

References qmcplusplus::n, and sscal().

99 { sscal(n, alpha, x, incx); }
void sscal(const int &n, const float &, float *x, const int &)

◆ scal() [2/6]

static void BLAS::scal ( int  n,
std::complex< float >  alpha,
std::complex< float > *  x,
int  incx = 1 
)
inlinestatic

Definition at line 101 of file BLAS.hpp.

References cscal(), and qmcplusplus::n.

102  {
103  cscal(n, alpha, x, incx);
104  }
void cscal(const int &n, const std::complex< float > &, std::complex< float > *x, const int &)

◆ scal() [3/6]

static void BLAS::scal ( int  n,
double  alpha,
double *  x,
int  incx = 1 
)
inlinestatic

Definition at line 106 of file BLAS.hpp.

References dscal(), and qmcplusplus::n.

106 { dscal(n, alpha, x, incx); }
void dscal(const int &n, const double &, double *x, const int &)

◆ scal() [4/6]

static void BLAS::scal ( int  n,
std::complex< double >  alpha,
std::complex< double > *  x,
int  incx = 1 
)
inlinestatic

Definition at line 108 of file BLAS.hpp.

References qmcplusplus::n, and zscal().

109  {
110  zscal(n, alpha, x, incx);
111  }
void zscal(const int &n, const std::complex< double > &, std::complex< double > *x, const int &)

◆ scal() [5/6]

static void BLAS::scal ( int  n,
double  alpha,
std::complex< double > *  x,
int  incx = 1 
)
inlinestatic

Definition at line 113 of file BLAS.hpp.

References qmcplusplus::n, and zdscal().

113 { zdscal(n, alpha, x, incx); }
void zdscal(const int &n, const double &, std::complex< double > *x, const int &)

◆ scal() [6/6]

static void BLAS::scal ( int  n,
float  alpha,
std::complex< float > *  x,
int  incx = 1 
)
inlinestatic

Definition at line 115 of file BLAS.hpp.

References csscal(), and qmcplusplus::n.

115 { csscal(n, alpha, x, incx); }
void csscal(const int &n, const float &, std::complex< float > *x, const int &)

Variable Documentation

◆ cone

constexpr std::complex<float> cone = 1.0e0

Definition at line 50 of file BLAS.hpp.

Referenced by DelayedUpdate< T, T_FP >::acceptRow(), DelayedUpdateSYCL< T, T_FP >::acceptRow(), DelayedUpdateCUDA< T, T_FP >::acceptRow(), qmcplusplus::bessel_steed_array_cpu(), NonLocalECPComponent::calculateProjector(), JeeIOrbitalSoA< FT >::computeU3_engine(), qmcplusplus::det_col_update(), MPC::evalSR(), PolynomialFunctor3D::evaluate(), SoaSphericalTensor< ST >::evaluate_bare(), AtomicOrbitals< ST >::evaluate_vgl(), PolynomialFunctor3D::evaluateDerivatives(), JeeIOrbitalSoA< FT >::evaluateDerivatives(), J1Spin< FT >::evaluateDerivativesWF(), TwoBodyJastrow< FT >::evaluateDerivativesWF(), J1OrbitalSoA< FT >::evaluateDerivativesWF(), JeeIOrbitalSoA< FT >::evaluateDerivativesWF(), NonLocalECPComponent::evaluateOneBodyOpMatrixContribution(), NonLocalECPComponent::evaluateOneBodyOpMatrixdRContribution(), NonLocalECPComponent::evaluateOneWithForces(), PolynomialFunctor3D::evaluateV(), SoaAtomicBasisSet< ROT, SH >::evaluateVGH(), SoaAtomicBasisSet< ROT, SH >::evaluateVGHGH(), SoaAtomicBasisSet< ROT, SH >::evaluateVGL(), PolynomialFunctor3D::evaluateVGL(), gemv(), DelayedUpdate< T, T_FP >::getInvRow(), DelayedUpdateSYCL< T, T_FP >::getInvRow(), DelayedUpdateCUDA< T, T_FP >::getInvRow(), HybridRepCenterOrbitals< SPLINEBASE::DataType >::interpolate_buffer_v(), HybridRepCenterOrbitals< SPLINEBASE::DataType >::interpolate_buffer_vgl(), SoaAtomicBasisSet< ROT, SH >::mw_evaluateVGL(), MultiDiracDeterminant::mw_InverseUpdateByColumn(), HybridRepCenterOrbitals< SPLINEBASE::DataType >::selectRegionAndComputeSmoothing(), QMCUpdateBase::setMultiplicity(), qmcplusplus::smoothing(), SoaSphericalTensor< ST >::SoaSphericalTensor(), DelayedUpdate< T, T_FP >::updateInvMat(), DelayedUpdateSYCL< T, T_FP >::updateInvMat(), and DelayedUpdateBatched< PL, VALUE >::updateRow().

◆ czero

constexpr std::complex<float> czero = 0.0e0

Definition at line 51 of file BLAS.hpp.

Referenced by DelayedUpdate< T, T_FP >::acceptRow(), DelayedUpdateSYCL< T, T_FP >::acceptRow(), DelayedUpdateCUDA< T, T_FP >::acceptRow(), SoaCartesianTensor< T >::batched_evaluateVGL(), NonLocalECPComponent::calculateProjector(), TwoBodyJastrow< FT >::computeU3(), J1OrbitalSoA< FT >::computeU3(), J1Spin< FT >::computeU3(), JeeIOrbitalSoA< FT >::computeU3(), JeeIOrbitalSoA< FT >::computeU3_engine(), CoulombPBCAB::evalSR(), CoulombPBCAB::evalSRwithForces(), PolynomialFunctor3D::evaluate(), SoaSphericalTensor< ST >::evaluate_bare(), AtomicOrbitals< ST >::evaluate_v(), AtomicOrbitals< ST >::evaluate_vgl(), MultiSlaterDetTableMethod::evaluate_vgl_impl(), CoulombPotential< T >::evaluateAB(), PolynomialFunctor3D::evaluateDerivatives(), JeeIOrbitalSoA< FT >::evaluateDerivatives(), JeeIOrbitalSoA< FT >::evaluateDerivativesWF(), JeeIOrbitalSoA< FT >::evaluateDerivRatios(), NonLocalECPComponent::evaluateOneBodyOpMatrixContribution(), NonLocalECPComponent::evaluateOneBodyOpMatrixdRContribution(), NonLocalECPComponent::evaluateOneWithForces(), PolynomialFunctor3D::evaluateV(), AtomicOrbitals< ST >::evaluateValues(), SoaCartesianTensor< T >::evaluateVGH(), SoaCartesianTensor< T >::evaluateVGHGH(), SoaCartesianTensor< T >::evaluateVGL(), PolynomialFunctor3D::evaluateVGL(), SoaSphericalTensor< ST >::evaluateVGL_impl(), gemv(), DelayedUpdate< T, T_FP >::getInvRow(), DelayedUpdateSYCL< T, T_FP >::getInvRow(), DelayedUpdateCUDA< T, T_FP >::getInvRow(), SlaterDet::mw_accept_rejectMove(), TrialWaveFunction::mw_evaluateDeltaLog(), TrialWaveFunction::mw_evaluateDeltaLogSetup(), SlaterDet::mw_evaluateGL(), TrialWaveFunction::mw_evaluateGL(), SlaterDet::mw_evaluateLog(), TrialWaveFunction::mw_evaluateLog(), SoaSphericalTensor< ST >::SoaSphericalTensor(), DelayedUpdate< T, T_FP >::updateInvMat(), DelayedUpdateSYCL< T, T_FP >::updateInvMat(), and DelayedUpdateBatched< PL, VALUE >::updateRow().

◆ done

◆ dzero

constexpr double dzero = 0.0e0

Definition at line 49 of file BLAS.hpp.

Referenced by gemv(), and gemv_trans().

◆ INCX

constexpr int INCX = 1

Definition at line 40 of file BLAS.hpp.

Referenced by axpy(), gemv(), and gemv_trans().

◆ INCY

constexpr int INCY = 1

Definition at line 41 of file BLAS.hpp.

Referenced by axpy(), gemv(), and gemv_trans().

◆ NOTRANS

constexpr char NOTRANS = 'N'

Definition at line 44 of file BLAS.hpp.

Referenced by gemv().

◆ sone

constexpr float sone = 1.0e0

Definition at line 46 of file BLAS.hpp.

◆ szero

constexpr float szero = 0.0e0

Definition at line 47 of file BLAS.hpp.

◆ TRANS

constexpr char TRANS = 'T'

Definition at line 43 of file BLAS.hpp.

Referenced by gemv_trans().

◆ UPLO

constexpr char UPLO = 'L'

Definition at line 42 of file BLAS.hpp.

Referenced by RotatedSPOs::exponentiate_antisym_matrix(), LAPACK::hevr(), and LAPACK::potrf().

◆ zone

constexpr std::complex<double> zone = 1.0e0

Definition at line 52 of file BLAS.hpp.

Referenced by gemv(), qmcplusplus::MatrixOperators::product(), and qmcplusplus::Product_ABt().

◆ zzero

constexpr std::complex<double> zzero = 0.0e0

Definition at line 53 of file BLAS.hpp.

Referenced by gemv().