QUDA  v1.1.0
A library for QCD on GPUs
Functions
quda::blas_lapack::native Namespace Reference

Functions

void init ()
 Create the BLAS context. More...
 
void destroy ()
 Destroy the BLAS context. More...
 
long long BatchInvertMatrix (void *Ainv, void *A, const int n, const uint64_t batch, QudaPrecision precision, QudaFieldLocation location)
 Batch inversion the matrix field using an LU decomposition method. More...
 
long long stridedBatchGEMM (void *A, void *B, void *C, QudaBLASParam blas_param, QudaFieldLocation location)
 Strided Batch GEMM. This function performs N GEMM type operations in a strided batched fashion. If the user passes. More...
 

Detailed Description

The native namespace is where we can deploy target specific blas/lapack operations, using vendor-specific libraries. In the case of CUDA, this corresponds to the use of cuBLAS.

Function Documentation

◆ BatchInvertMatrix()

long long quda::blas_lapack::native::BatchInvertMatrix ( void *  Ainv,
void *  A,
const int  n,
const uint64_t  batch,
QudaPrecision  precision,
QudaFieldLocation  location 
)

Batch inversion the matrix field using an LU decomposition method.

Parameters
[out]AinvMatrix field containing the inverse matrices
[in]AMatrix field containing the input matrices
[in]nDimension each matrix
[in]batchProblem batch size
[in]precisionPrecision of the input/output data
[in]Locationof the input/output data
Returns
Number of flops done in this computation

Definition at line 76 of file blas_lapack_cublas.cpp.

◆ destroy()

void quda::blas_lapack::native::destroy ( )

Destroy the BLAS context.

Definition at line 42 of file blas_lapack_cublas.cpp.

◆ init()

void quda::blas_lapack::native::init ( )

Create the BLAS context.

Definition at line 28 of file blas_lapack_cublas.cpp.

◆ stridedBatchGEMM()

long long quda::blas_lapack::native::stridedBatchGEMM ( void *  A,
void *  B,
void *  C,
QudaBLASParam  blas_param,
QudaFieldLocation  location 
)

Strided Batch GEMM. This function performs N GEMM type operations in a strided batched fashion. If the user passes.

stride<A,B,C> = -1

it deduces the strides for the A, B, and C arrays from the matrix dimensions, leading dims, etc, and will behave identically to the batched GEMM. If any of the stride<A,B,C> values passed in the parameter structure are greater than or equal to 0, the routine accepts the user's values instead.

Example: If the user passes

a_stride = 0

the routine will use only the first matrix in the A array and compute

C_{n} <- a * A_{0} * B_{n} + b * C_{n}

where n is the batch index.

Parameters
[in]AMatrix field containing the A input matrices
[in]BMatrix field containing the B input matrices
[in/out]C Matrix field containing the result, and matrix to be added
[in]cublas_paramParameter structure defining the GEMM type
[in]Locationof the input/output data
Returns
Number of flops done in this computation

Definition at line 193 of file blas_lapack_cublas.cpp.