42 #ifndef STOKHOS_BLOCKCRSMATRIX_HPP 43 #define STOKHOS_BLOCKCRSMATRIX_HPP 45 #include "Kokkos_Core.hpp" 46 #include "Kokkos_StaticCrsGraph.hpp" 60 template <
typename BlockSpec,
typename ValueType,
class Device>
65 typedef typename execution_space::size_type
size_type;
68 typedef Kokkos::StaticCrsGraph< size_type , execution_space >
graph_type;
69 typedef Kokkos::View< value_type**, Kokkos::LayoutLeft, execution_space >
block_vector_type ;
76 template <
typename BlockSpec,
81 Kokkos::View< VectorValue**, Kokkos::LayoutLeft, Device >,
82 Kokkos::View< VectorValue**, Kokkos::LayoutLeft, Device > >
109 KOKKOS_INLINE_FUNCTION
114 VectorValue *
const y = & m_y(0,iBlockRow);
122 for (
size_type iEntry = iEntryBegin ; iEntry < iEntryEnd ; ++iEntry ) {
123 const VectorValue *
const x = & m_x( 0 , m_A.
graph.entries(iEntry) );
124 const MatrixValue *
const a = & m_A.
values( 0 , iEntry );
135 const size_t row_count = A.
graph.row_map.dimension_0() - 1;
136 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