BLAS2 – KokkosKernels blas2 interfaces

gemv

template<class ExecutionSpace, class AViewType, class XViewType, class YViewType>
void KokkosBlas::gemv(const ExecutionSpace &space, const char trans[], typename AViewType::const_value_type &alpha, const AViewType &A, const XViewType &x, typename YViewType::const_value_type &beta, const YViewType &y)

Dense matrix-vector multiply: y = beta*y + alpha*A*x.

Template Parameters:
  • AViewType – Input matrix, as a 2-D Kokkos::View

  • XViewType – Input vector, as a 1-D Kokkos::View

  • YViewType – Output vector, as a nonconst 1-D Kokkos::View

  • AlphaCoeffType – Type of input coefficient alpha

  • BetaCoeffType – Type of input coefficient beta

Parameters:
  • space – [in] execution space instance on which to run the kernel. This may contain information about which stream to run on.

  • trans – [in] “N” for non-transpose, “T” for transpose, “C” for conjugate transpose. All characters after the first are ignored. This works just like the BLAS routines.

  • alpha – [in] Input coefficient of A*x

  • A – [in] Input matrix, as a 2-D Kokkos::View

  • x – [in] Input vector, as a 1-D Kokkos::View

  • beta – [in] Input coefficient of y

  • y – [in/out] Output vector, as a nonconst 1-D Kokkos::View

template<class AViewType, class XViewType, class YViewType>
void KokkosBlas::gemv(const char trans[], typename AViewType::const_value_type &alpha, const AViewType &A, const XViewType &x, typename YViewType::const_value_type &beta, const YViewType &y)

Dense matrix-vector multiply: y = beta*y + alpha*A*x.

Template Parameters:
  • AViewType – Input matrix, as a 2-D Kokkos::View

  • XViewType – Input vector, as a 1-D Kokkos::View

  • YViewType – Output vector, as a nonconst 1-D Kokkos::View

  • AlphaCoeffType – Type of input coefficient alpha

  • BetaCoeffType – Type of input coefficient beta

Parameters:
  • trans – [in] “N” for non-transpose, “T” for transpose, “C” for conjugate transpose. All characters after the first are ignored. This works just like the BLAS routines.

  • alpha – [in] Input coefficient of A*x

  • A – [in] Input matrix, as a 2-D Kokkos::View

  • x – [in] Input vector, as a 1-D Kokkos::View

  • beta – [in] Input coefficient of y

  • y – [in/out] Output vector, as a nonconst 1-D Kokkos::View

ger

template<class ExecutionSpace, class XViewType, class YViewType, class AViewType>
void KokkosBlas::ger(const ExecutionSpace &space, const char trans[], const typename AViewType::const_value_type &alpha, const XViewType &x, const YViewType &y, const AViewType &A)

Rank-1 update of a general matrix: A = A + alpha * x * y^{T,H}.

Template Parameters:
  • ExecutionSpace – The type of execution space

  • XViewType – Input vector, as a 1-D Kokkos::View

  • YViewType – Input vector, as a 1-D Kokkos::View

  • AViewType – Input/Output matrix, as a 2-D Kokkos::View

Parameters:
  • space – [in] Execution space instance on which to run the kernel. This may contain information about which stream to run on.

  • trans – [in] “T” or “t” for transpose, “H” or “h” for Hermitian. Only the first character is taken into account.

  • alpha – [in] Input coefficient of x * y^{T,H}

  • x – [in] Input vector, as a 1-D Kokkos::View

  • y – [in] Input vector, as a 1-D Kokkos::View

  • A – [in/out] Output matrix, as a nonconst 2-D Kokkos::View

template<class XViewType, class YViewType, class AViewType>
void KokkosBlas::ger(const char trans[], const typename AViewType::const_value_type &alpha, const XViewType &x, const YViewType &y, const AViewType &A)

Rank-1 update of a general matrix: A = A + alpha * x * y^{T,H}.

Template Parameters:
  • XViewType – Input vector, as a 1-D Kokkos::View

  • YViewType – Input vector, as a 1-D Kokkos::View

  • AViewType – Input/Output matrix, as a 2-D Kokkos::View

Parameters:
  • trans – [in] “T” or “t” for transpose, “H” or “h” for Hermitian. Only the first character is taken into account.

  • alpha – [in] Input coefficient of x * y^{T,H}

  • x – [in] Input vector, as a 1-D Kokkos::View

  • y – [in] Input vector, as a 1-D Kokkos::View

  • A – [in/out] Output matrix, as a nonconst 2-D Kokkos::View

syr

template<class ExecutionSpace, class XViewType, class AViewType>
void KokkosBlas::syr(const ExecutionSpace &space, const char trans[], const char uplo[], const typename AViewType::const_value_type &alpha, const XViewType &x, const AViewType &A)

Rank-1 update (just lower portion or just upper portion) of a symmetric/Hermitian matrix: A = A + alpha * x * x^{T,H}.

Important note 1: this routine encapsulates the syr() and her() routines specified in BLAS documentations. It has the purpose of updating a symmetric (or Hermitian) matrix A in such a way that it continues to be symmetric (or Hermitian). Therefore, in Hermitian cases, the parameter alpha must be real.

Important note 2: however, this routine will honor all parameters passed to it, even if A is not symmetric or not Hermitian, and even if a complex alpha is supplied in Hermitian cases. Moreover, this routine will always compute either the lower portion or the upper portion (per user’s request) of the final matrix A. So, in order to obtain meaningful results, the user must make sure to follow the conditions specified in the “important note 1” above.

Important note 3: if TPL is enabled, this routine will call the third party library BLAS routines whenever the parameters passed are consistent with the parameters expected by the corresponding TPL routine. If not, then this routine will route the execution to the kokkos-kernels implementation, thus honoring all parameters passed, as stated in the “important note 2” above.

Template Parameters:
  • ExecutionSpace – The type of execution space

  • XViewType – Input vector, as a 1-D Kokkos::View

  • AViewType – Input/Output matrix, as a 2-D Kokkos::View

Parameters:
  • space – [in] Execution space instance on which to run the kernel. This may contain information about which stream to run on.

  • trans – [in] “T” or “t” for transpose, “H” or “h” for Hermitian. Only the first character is taken into account.

  • uplo – [in] “U” or “u” for upper portion, “L” or “l” for lower portion. Only the first character is taken into account.

  • alpha – [in] Input coefficient of x * x^{T,H}

  • x – [in] Input vector, as a 1-D Kokkos::View

  • A – [in/out] Output matrix, as a nonconst 2-D Kokkos::View

template<class XViewType, class AViewType>
void KokkosBlas::syr(const char trans[], const char uplo[], const typename AViewType::const_value_type &alpha, const XViewType &x, const AViewType &A)

Rank-1 update (just lower portion or just upper portion) of a symmetric/Hermitian matrix: A = A + alpha * x * x^{T,H}.

Important note 1: this routine encapsulates the syr() and her() routines specified in BLAS documentations. It has the purpose of updating a symmetric (or Hermitian) matrix A in such a way that it continues to be symmetric (or Hermitian). Therefore, in Hermitian cases, the parameter alpha must be real.

Important note 2: however, this routine will honor all parameters passed to it, even if A is not symmetric or not Hermitian, and even if a complex alpha is supplied in Hermitian cases. Moreover, this routine will always compute either the lower portion or the upper portion (per user’s request) of the final matrix A. So, in order to obtain meaningful results, the user must make sure to follow the conditions specified in the “important note 1” above.

Important note 3: if TPL is enabled, this routine will call the third party library BLAS routines whenever the parameters passed are consistent with the parameters expected by the corresponding TPL routine. If not, then this routine will route the execution to the kokkos-kernels implementation, thus honoring all parameters passed, as stated in the “important note 2” above.

Template Parameters:
  • XViewType – Input vector, as a 1-D Kokkos::View

  • AViewType – Input/Output matrix, as a 2-D Kokkos::View

Parameters:
  • trans – [in] “T” or “t” for transpose, “H” or “h” for Hermitian. Only the first character is taken into account.

  • uplo – [in] “U” or “u” for upper portion, “L” or “l” for lower portion. Only the first character is taken into account.

  • alpha – [in] Input coefficient of x * x^{T,H}

  • x – [in] Input vector, as a 1-D Kokkos::View

  • A – [in/out] Output matrix, as a nonconst 2-D Kokkos::View