42#ifndef STOKHOS_BLOCKCRSMATRIX_HPP
43#define STOKHOS_BLOCKCRSMATRIX_HPP
45#include "Kokkos_Core.hpp"
46#include "Kokkos_StaticCrsGraph.hpp"
60template <
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 ;
76template <
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.extent(0) - 1;
136 Kokkos::parallel_for( row_count ,
Multiply(A,x,y) );
CRS matrix of dense blocks.
Kokkos::View< value_type **, Kokkos::LayoutLeft, execution_space > block_vector_type
Kokkos::StaticCrsGraph< size_type, execution_space > graph_type
execution_space::size_type size_type
BlockSpec::size_type size_type
const block_vector_type m_x
BlockCrsMatrix< BlockSpec, MatrixValue, Device > matrix_type
static void apply(const matrix_type &A, const block_vector_type &x, block_vector_type &y)
Multiply(const matrix_type &A, const block_vector_type &x, block_vector_type &y)
KOKKOS_INLINE_FUNCTION void operator()(const size_type iBlockRow) const
Kokkos::View< VectorValue **, Kokkos::LayoutLeft, Device > block_vector_type
Top-level namespace for Stokhos classes and functions.