Kokkos Node API and Local Linear Algebra Kernels Version of the Day
Static Public Member Functions
Kokkos::Mkl::RawSparseKernels< Scalar, Ordinal > Class Template Reference

Thin wrapper around Intel MKL's sparse kernels. More...

#include <Kokkos_Mkl_RawSparseKernels.hpp>

List of all members.

Static Public Member Functions

static void csrmv (const char *const transa, const Ordinal m, const Ordinal k, const Scalar &alpha, const char *const matdescra, const Scalar *const val, const Ordinal *const ind, const Ordinal *const ptrBegin, const Ordinal *const ptrEnd, const Scalar *const x, const Scalar &beta, Scalar *const y)
 Sparse matrix-vector multiply (one vector): y = beta*y + alpha*A*x.
static void csrmm (const char *const transa, const Ordinal m, const Ordinal n, const Ordinal k, const Scalar &alpha, const char *const matdescra, const Scalar *const val, const Ordinal *const ind, const Ordinal *const ptrBegin, const Ordinal *const ptrEnd, const Scalar *const B, const Ordinal LDB, const Scalar &beta, Scalar *const C, const Ordinal LDC)
 Sparse matrix-multivector multiply: C = alpha*A*B + beta*C.
static void csrsv (const char *const transa, const Ordinal m, const Scalar &alpha, const char *const matdescra, const Scalar *const val, const Ordinal *const ind, const Ordinal *const ptrBegin, const Ordinal *const ptrEnd, const Scalar *const x, Scalar *const y)
 Sparse triangular solve (one vector): y = alpha*inv(op(A))*x.
static void csrsm (const char *const transa, const Ordinal m, const Ordinal n, const Scalar &alpha, const char *const matdescra, const Scalar *const val, const Ordinal *const ind, const Ordinal *const ptrBegin, const Ordinal *const ptrEnd, const Scalar *const B, const Ordinal LDB, Scalar *const C, const Ordinal LDC)
 Sparse triangular solve (multiple vectors): C = alpha*inv(op(A))*B.

Detailed Description

template<class Scalar, class Ordinal>
class Kokkos::Mkl::RawSparseKernels< Scalar, Ordinal >

Thin wrapper around Intel MKL's sparse kernels.

Note:
This class is not meant for end users. We use it in the implementation of MklSparseOps.

Intel's Math Kernel Library (MKL) implements sparse matrix-(multi)vector multiply and sparse triangular solve. The MKL only defines sparse matrix kernels for a limited set of Scalar types, which correspond to LAPACK's four data types: float, double, std::complex<float>, and std::complex<double>. We only give you access to the complex types if Trilinos was build with complex arithmetic support (i.e., if the Teuchos_ENABLE_COMPLEX CMake configure option was set to ON).

MKL only defines sparse kernels for one index (Ordinal) type. The Ordinal type depends on the MKL library with which you link. You can test the Ordinal type by #including mkl.h and checking whether MKL_ILP64 is #defined. If it is, then the only valid Ordinal type is a 64-bit signed integer type (int64_t in C99 terms; long long in C++ terms); otherwise, Ordinal is a 32-bit signed integer type (int, or int32_t in C99 terms).

Note:
We have only tested linking these interfaces to MKL version 10.3. If you have trouble linking to future versions of MKL, please let us Trilinos developers know and we will fix the interfaces.
Template Parameters:
ScalarThe type of entries in the sparse matrix and dense (multi)vectors. MKL requires that the entries in the matrix and (multi)vectors all have the same type.
OrdinalThe integer index type (MKL_INT) used by MKL. MKL uses the same type for both row offsets and column indices.
Warning:
MKL only defines the sparse kernels for one Ordinal type, which is either a 32-bit signed integer, or a 64-bit signed integer. Which one depends on link options and may even be dependent on run-time choices made outside Trilinos.
Note:
For zero-based indexing (matdescra[3] == 'C', rather than 'F'), the multivector inputs and outputs must be in row-major order. This means if you would normally use column-major multivectors, then you have to convert ind, ptrBegin, and ptrEnd to use one-based indices.

Definition at line 104 of file Kokkos_Mkl_RawSparseKernels.hpp.


Member Function Documentation

template<class Scalar , class Ordinal >
static void Kokkos::Mkl::RawSparseKernels< Scalar, Ordinal >::csrmv ( const char *const  transa,
const Ordinal  m,
const Ordinal  k,
const Scalar &  alpha,
const char *const  matdescra,
const Scalar *const  val,
const Ordinal *const  ind,
const Ordinal *const  ptrBegin,
const Ordinal *const  ptrEnd,
const Scalar *const  x,
const Scalar &  beta,
Scalar *const  y 
) [static]

Sparse matrix-vector multiply (one vector): y = beta*y + alpha*A*x.

template<class Scalar , class Ordinal >
static void Kokkos::Mkl::RawSparseKernels< Scalar, Ordinal >::csrmm ( const char *const  transa,
const Ordinal  m,
const Ordinal  n,
const Ordinal  k,
const Scalar &  alpha,
const char *const  matdescra,
const Scalar *const  val,
const Ordinal *const  ind,
const Ordinal *const  ptrBegin,
const Ordinal *const  ptrEnd,
const Scalar *const  B,
const Ordinal  LDB,
const Scalar &  beta,
Scalar *const  C,
const Ordinal  LDC 
) [static]

Sparse matrix-multivector multiply: C = alpha*A*B + beta*C.

template<class Scalar , class Ordinal >
static void Kokkos::Mkl::RawSparseKernels< Scalar, Ordinal >::csrsv ( const char *const  transa,
const Ordinal  m,
const Scalar &  alpha,
const char *const  matdescra,
const Scalar *const  val,
const Ordinal *const  ind,
const Ordinal *const  ptrBegin,
const Ordinal *const  ptrEnd,
const Scalar *const  x,
Scalar *const  y 
) [static]

Sparse triangular solve (one vector): y = alpha*inv(op(A))*x.

template<class Scalar , class Ordinal >
static void Kokkos::Mkl::RawSparseKernels< Scalar, Ordinal >::csrsm ( const char *const  transa,
const Ordinal  m,
const Ordinal  n,
const Scalar &  alpha,
const char *const  matdescra,
const Scalar *const  val,
const Ordinal *const  ind,
const Ordinal *const  ptrBegin,
const Ordinal *const  ptrEnd,
const Scalar *const  B,
const Ordinal  LDB,
Scalar *const  C,
const Ordinal  LDC 
) [static]

Sparse triangular solve (multiple vectors): C = alpha*inv(op(A))*B.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends