Skip to content

Commit

Permalink
BLAS - trmm: check for valid execution space type.
Browse files Browse the repository at this point in the history
Signed-off-by: Luc Berger-Vergiat <lberge@sandia.gov>
  • Loading branch information
lucbv committed Dec 17, 2024
1 parent 32b3dd8 commit 999fc66
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions blas/src/KokkosBlas3_trmm.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,11 @@ namespace KokkosBlas {
template <class execution_space, class AViewType, class BViewType>
void trmm(const execution_space& space, const char side[], const char uplo[], const char trans[], const char diag[],
typename BViewType::const_value_type& alpha, const AViewType& A, const BViewType& B) {
static_assert(Kokkos::is_view<AViewType>::value, "AViewType must be a Kokkos::View.");
static_assert(Kokkos::is_view<BViewType>::value, "BViewType must be a Kokkos::View.");
static_assert(static_cast<int>(AViewType::rank) == 2, "AViewType must have rank 2.");
static_assert(static_cast<int>(BViewType::rank) == 2, "BViewType must have rank 2.");
static_assert(Kokkos::is_execution_space_v<execution_space>, "trmm: execution_space must be a Kokkos::execution_space.")
static_assert(Kokkos::is_view_v<AViewType>, "trmm: AViewType must be a Kokkos::View.");
static_assert(Kokkos::is_view_v<BViewType>, "trmm: BViewType must be a Kokkos::View.");
static_assert(static_cast<int>(AViewType::rank) == 2, "trmm: AViewType must have rank 2.");
static_assert(static_cast<int>(BViewType::rank) == 2, "trmm: BViewType must have rank 2.");

// Check validity of indicator argument
bool valid_side = (side[0] == 'L') || (side[0] == 'l') || (side[0] == 'R') || (side[0] == 'r');
Expand Down

0 comments on commit 999fc66

Please sign in to comment.