ARTS  2.3.1285(git:92a29ea9-dirty)
blas.h File Reference

Interface for BLAS library. More...

#include <complex>

Go to the source code of this file.

Functions

void dgemm_ (char *transa, char *transb, int *m, int *n, int *k, double *alpha, double *A, int *lda, double *B, int *ldb, double *beta, double *C, int *ldc)
 BLAS matrix multiplication. More...
 
void zgemm_ (char *transa, char *transb, int *m, int *n, int *k, std::complex< double > *alpha, std::complex< double > *A, int *lda, std::complex< double > *B, int *ldb, std::complex< double > *beta, std::complex< double > *C, int *ldc)
 
void dgemv_ (char *trans, int *m, int *n, double *alpha, double *A, int *LDA, double *x, int *incx, double *beta, double *y, int *incy)
 Matrix-Vector Multiplication. More...
 
void zgemv_ (char *trans, int *m, int *n, std::complex< double > *alpha, std::complex< double > *A, int *LDA, std::complex< double > *x, int *incx, std::complex< double > *beta, std::complex< double > *y, int *incy)
 

Detailed Description

Interface for BLAS library.

Author
simon <simon>
Date
Thu May 7 22:41:17 2015

Contains declarations for BLAS functions.

Definition in file blas.h.

Function Documentation

◆ dgemm_()

void dgemm_ ( char *  transa,
char *  transb,
int *  m,
int *  n,
int *  k,
double *  alpha,
double *  A,
int *  lda,
double *  B,
int *  ldb,
double *  beta,
double *  C,
int *  ldc 
)

BLAS matrix multiplication.

Performs the operation C = alpha * (transa(A) * transb(B)) + beta * C where transa(A) is either A or A^T and trans(B) either B or B^T.

Note the difference in memory layout between arts and BLAS. arts matrices using row-major order whereas BLAS uses column major order. Therefore, passing the raw-data of the arts matrices A, B, C to BLAS will compute

C = (A^T * B^T)^T = B * A

It is therefore necessary to pass the factors to dgemm_ in reverse order.

Parameters
[in]transaIf transa points to char 'T', the matrix A is transposed for the multiplication. Otherwise the untransposed matrix A is used.
[in]transbIf transb points to char 'T', the matrix B is transposed for the multiplication. Otherwise the untransposed matrix B is used.
[in]mPointer to an int variable containing the number of rows of A.
[in]nPointer to an int variable containing the number of columns of B.
[in]kPointer to an int variable containing the number of columns of A / rows of B the matrix is to be performed over.
[in]alphaPointer to the factor alpha.
[in]APointer to the double array containing A.
[in]ldaPointer to an int variable containing the number of colums of A.
[in]BPointer to the double array containing B.
[in]ldbPointer to an int variabl containing the number of rows of B.
[in]betaPointer to the factor beta
[in,out]CPointer to the double array containing the matrix C.
[in]ldcPointer to an int variable containing the number rows of C.

◆ dgemv_()

void dgemv_ ( char *  trans,
int *  m,
int *  n,
double *  alpha,
double *  A,
int *  LDA,
double *  x,
int *  incx,
double *  beta,
double *  y,
int *  incy 
)

Matrix-Vector Multiplication.

Perform one of the matrix-vector operations

y = alpha * (A x) + beta * y
y = alpha * (A^T x) + beta * y

where * denotes multiplication by a scalar and A x matrix-vector multiplication.

Parameters
transIf trans points to the char 'N' or 'n', the standard matrix-vector product (A x) is computed. If trans points to 'C','c','T' or 't', the matrix-vector product (A^T x) is computed.
mNumber of rows of the matrix A.
nNumber of columns of the matrix A.
alphaThe scalar alpha.
APointer to the matrix A.
LDAThe leading dimension of A.
xPointer to the vector x.
incxThe stride of the vector x.
betaThe scalar beta.
yPointer to the vector y.
incyThe stride of the vector y.

Referenced by mult().

◆ zgemm_()

void zgemm_ ( char *  transa,
char *  transb,
int *  m,
int *  n,
int *  k,
std::complex< double > *  alpha,
std::complex< double > *  A,
int *  lda,
std::complex< double > *  B,
int *  ldb,
std::complex< double > *  beta,
std::complex< double > *  C,
int *  ldc 
)

◆ zgemv_()

void zgemv_ ( char *  trans,
int *  m,
int *  n,
std::complex< double > *  alpha,
std::complex< double > *  A,
int *  LDA,
std::complex< double > *  x,
int *  incx,
std::complex< double > *  beta,
std::complex< double > *  y,
int *  incy 
)