LTL
2.0.x
|
Classes | |
struct | blas_gbmv_dispatch< T > |
struct | lapack_syev_dispatch< T > |
template<typename T > | |
blas_dot_dispatch< T >::value_type | blas_dot (const MArray< T, 1 > &x, const MArray< T, 1 > &y) |
template<typename T > | |
void | blas_axpy (const MArray< T, 1 > &x, const T alpha, MArray< T, 1 > &y) |
template<typename T > | |
void | blas_gemm (const T alpha, const MArray< T, 2 > &A, const MArray< T, 2 > &B, const T beta, MArray< T, 2 > &C, const bool transA=false, const bool transB=false) |
Interface to call BLAS and LAPACK functions on MArrays of dimensions one and two.
blas_dot_dispatch<T>::value_type blas_dot | ( | const MArray< T, 1 > & | x, |
const MArray< T, 1 > & | y | ||
) |
BLAS Level 1 functions
Compute the dot product of two n-element vectors x and y: x dot y = SUM(i=1...n,x(i)y(i)) = x(1)y(1) + x(2)y(2) + ... + x(n)y(n)
The MArrays
x and y may have strides unequal 1, hence they may be views, slices, or subarrays of higher-dimensional MArrays
The order of operations is different from the order in a sequential evalua- tion of the dot product. The final result can differ from the result of a sequential evaluation. Returns the value in double-precision.
void blas_gemm | ( | const T | alpha, |
const MArray< T, 2 > & | A, | ||
const MArray< T, 2 > & | B, | ||
const T | beta, | ||
MArray< T, 2 > & | C, | ||
const bool | transA = false , |
||
const bool | transB = false |
||
) |
BLAS Level 3 functions
This routine performs the following operation: C = alpha(op)A(op)B + beta*C where (op)(X) = X, transp(X), alpha and beta are scalars, and A, B, and C are matrices.
(op)A is an m by k matrix, (op)B is a k by n matrix, and C is an m by n matrix. The matrices need to have contiguous storage.
A and B are unchanged on exit, C is overwritten with A dot B.
void blas_axpy | ( | const MArray< T, 1 > & | x, |
const T | alpha, | ||
MArray< T, 1 > & | y | ||
) |
The _AXPY functions compute the following scalar-vector product and sum: y = alpha*x+y where alpha is a scalar, and x and y are single-precision vectors.
If any element of x or the scalar alpha share a memory location with an element of y, the results are unpredictable.
The MArrays
x and y may have strides unequal 1, hence they may be views, slices, or subarrays of higher-dimensional MArrays
The vector y is overwritted with the result of the calculation.