ARTS
2.4.0(git:4fb77825)
|
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) |
Interface for BLAS library.
Contains declarations for BLAS functions.
Definition in file blas.h.
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.
[in] | transa | If transa points to char 'T', the matrix A is transposed for the multiplication. Otherwise the untransposed matrix A is used. |
[in] | transb | If transb points to char 'T', the matrix B is transposed for the multiplication. Otherwise the untransposed matrix B is used. |
[in] | m | Pointer to an int variable containing the number of rows of A. |
[in] | n | Pointer to an int variable containing the number of columns of B. |
[in] | k | Pointer to an int variable containing the number of columns of A / rows of B the matrix is to be performed over. |
[in] | alpha | Pointer to the factor alpha. |
[in] | A | Pointer to the double array containing A. |
[in] | lda | Pointer to an int variable containing the number of colums of A. |
[in] | B | Pointer to the double array containing B. |
[in] | ldb | Pointer to an int variabl containing the number of rows of B. |
[in] | beta | Pointer to the factor beta |
[in,out] | C | Pointer to the double array containing the matrix C. |
[in] | ldc | Pointer to an int variable containing the number rows of C. |
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.
trans | If 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. |
m | Number of rows of the matrix A. |
n | Number of columns of the matrix A. |
alpha | The scalar alpha. |
A | Pointer to the matrix A. |
LDA | The leading dimension of A. |
x | Pointer to the vector x. |
incx | The stride of the vector x. |
beta | The scalar beta. |
y | Pointer to the vector y. |
incy | The stride of the vector y. |
Referenced by mult().
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 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 | ||
) |