BLAS and LAPACK interface for MArrays
[Multidimensional Dynamic Arrays]

Classes


Detailed Description

Interface to call BLAS and LAPACK functions on MArrays of dimensions one and two.


Function Documentation

template<typename T >
blas_dot_dispatch<T>::value_type blas_dot ( const MArray< T, 1 > &  x,
const MArray< T, 1 > &  y 
) [inline]

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.

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 
) [inline]

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.

template<typename T >
void blas_axpy ( const MArray< T, 1 > &  x,
const T  alpha,
MArray< T, 1 > &  y 
) [inline]

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.

template<typename T >
void blas_gemv ( const T  alpha,
const MArray< T, 2 > &  A,
const MArray< T, 1 > &  x,
const T  beta,
MArray< T, 1 > &  y,
const bool  transA = false 
) [inline]

The Xgemv() routine compute a matrix-vector product for of either a general matrix or its transpose: y = alpha*Ax + beta*y y = alpha*transp(A)*x + beta*y

The MArrays x and y may have strides unequal 1, hence they may be views, slices, or subarrays of higher-dimensional MArrays. The matrix A needs to have contiguous storage.

The vector y is overwritted with the result of the calculation. If transA==false, the length of y has to be M, otherwise N.

template<typename T >
MArray<T,1> blas_gemv ( const MArray< T, 2 > &  A,
const MArray< T, 1 > &  x,
const bool  transA = false 
) [inline]

The Xgemv() routine compute a matrix-vector product for double-precision data of either a general matrix or its transpose: y = Ax y = transp(A)*x

The MArrays x may have strides unequal 1, hence it may be a view, slice, or subarray of a higher-dimensional MArray The matrix A needs to have contiguous storage.

The result of the calculation is returned in a newly allocated MArray.


Generated on 19 Feb 2015 for LTL by  doxygen 1.6.1