42 #ifndef KOKKOSBLAS3_GEMM_MP_VECTOR_HPP 43 #define KOKKOSBLAS3_GEMM_MP_VECTOR_HPP 45 #include <type_traits> 46 #include "Sacado_ConfigDefs.h" 52 #include "KokkosBlas.hpp" 56 template <
typename DA,
typename... PA,
57 typename DB,
typename... PB,
58 typename DC,
typename... PC>
64 typename Kokkos::View<DA, PA...>::const_value_type &alpha,
65 const Kokkos::View<DA, PA...> &A,
66 const Kokkos::View<DB, PB...> &B,
67 typename Kokkos::View<DC, PC...>::const_value_type &beta,
68 const Kokkos::View<DC, PC...> &C)
71 static_assert(Kokkos::View<DA, PA...>::rank == 2,
"GEMM: A must have rank 2 (be a matrix).");
72 static_assert(Kokkos::View<DB, PB...>::rank == 2,
"GEMM: B must have rank 2 (be a matrix).");
73 static_assert(Kokkos::View<DC, PC...>::rank == 2,
"GEMM: C must have rank 2 (be a matrix).");
75 if (B.extent(1) == 1 && C.extent(1) == 1)
77 auto x = Kokkos::subview(B, Kokkos::ALL, 0);
78 auto y = Kokkos::subview(C, Kokkos::ALL, 0);
82 TEUCHOS_TEST_FOR_EXCEPTION(
true, std::logic_error,
"GEMM: Not implemented for Sacado::MP::Vector scalar type!");
std::enable_if< Kokkos::is_view_mp_vector< Kokkos::View< DA, PA... > >::value &&Kokkos::is_view_mp_vector< Kokkos::View< DB, PB... > >::value &&Kokkos::is_view_mp_vector< Kokkos::View< DC, PC... > >::value >::type gemm(const char transA[], const char transB[], typename Kokkos::View< DA, PA... >::const_value_type &alpha, const Kokkos::View< DA, PA... > &A, const Kokkos::View< DB, PB... > &B, typename Kokkos::View< DC, PC... >::const_value_type &beta, const Kokkos::View< DC, PC... > &C)
const IndexType const IndexType const IndexType const IndexType const ValueType const ValueType * x
const IndexType const IndexType const IndexType const IndexType const ValueType const ValueType ValueType * y
std::enable_if< Kokkos::is_view_mp_vector< Kokkos::View< DA, PA... > >::value &&Kokkos::is_view_mp_vector< Kokkos::View< DX, PX... > >::value &&Kokkos::is_view_mp_vector< Kokkos::View< DY, PY... > >::value >::type gemv(const char trans[], typename Kokkos::View< DA, PA... >::const_value_type &alpha, const Kokkos::View< DA, PA... > &A, const Kokkos::View< DX, PX... > &x, typename Kokkos::View< DY, PY... >::const_value_type &beta, const Kokkos::View< DY, PY... > &y)