42 #ifndef STOKHOS_BLOCKCRSMATRIX_HPP 43 #define STOKHOS_BLOCKCRSMATRIX_HPP 48 #include "Kokkos_Core.hpp" 49 #include "Kokkos_StaticCrsGraph.hpp" 63 template <
typename BlockSpec,
typename ValueType,
class Device>
68 typedef typename execution_space::size_type
size_type;
71 typedef Kokkos::StaticCrsGraph< size_type , execution_space >
graph_type;
72 typedef Kokkos::View< value_type**, Kokkos::LayoutLeft, execution_space >
block_vector_type ;
79 template <
typename BlockSpec,
84 Kokkos::View< VectorValue**, Kokkos::LayoutLeft, Device >,
85 Kokkos::View< VectorValue**, Kokkos::LayoutLeft, Device > >
112 KOKKOS_INLINE_FUNCTION
117 VectorValue *
const y = & m_y(0,iBlockRow);
125 for (
size_type iEntry = iEntryBegin ; iEntry < iEntryEnd ; ++iEntry ) {
126 const VectorValue *
const x = & m_x( 0 , m_A.
graph.entries(iEntry) );
127 const MatrixValue *
const a = & m_A.
values( 0 , iEntry );
138 const size_t row_count = A.
graph.row_map.extent(0) - 1;
139 Kokkos::parallel_for( row_count ,
Multiply(A,
x,
y) );
BlockCrsMatrix< BlockSpec, MatrixValue, Device > matrix_type
BlockSpec::size_type size_type
execution_space::size_type size_type
Kokkos::View< VectorValue **, Kokkos::LayoutLeft, Device > block_vector_type
const IndexType const IndexType const IndexType const IndexType const ValueType const ValueType * x
Multiply(const matrix_type &A, const block_vector_type &x, block_vector_type &y)
Kokkos::View< value_type **, Kokkos::LayoutLeft, execution_space > block_vector_type
Top-level namespace for Stokhos classes and functions.
Kokkos::StaticCrsGraph< size_type, execution_space > graph_type
CRS matrix of dense blocks.
const block_vector_type m_x
static void apply(const matrix_type &A, const block_vector_type &x, block_vector_type &y)
KOKKOS_INLINE_FUNCTION void operator()(const size_type iBlockRow) const
const IndexType const IndexType const IndexType const IndexType const ValueType const ValueType ValueType * y