ryujin 2.1.1 revision 0348cbb53a3e4b1da2a4c037e81f88f2d21ce219
|
#include <source/sparse_matrix_simd.h>
Public Member Functions | |
SparsityPatternSIMD () | |
SparsityPatternSIMD (const unsigned int n_internal_dofs, const dealii::DynamicSparsityPattern &sparsity, const std::shared_ptr< const dealii::Utilities::MPI::Partitioner > &partitioner) | |
void | reinit (const unsigned int n_internal_dofs, const dealii::DynamicSparsityPattern &sparsity, const std::shared_ptr< const dealii::Utilities::MPI::Partitioner > &partitioner) |
unsigned int | stride_of_row (const unsigned int row) const |
const unsigned int * | columns (const unsigned int row) const |
unsigned int | row_length (const unsigned int row) const |
unsigned int | n_rows () const |
std::size_t | n_nonzero_elements () const |
Protected Attributes | |
unsigned int | n_internal_dofs |
unsigned int | n_locally_owned_dofs |
std::shared_ptr< const dealii::Utilities::MPI::Partitioner > | partitioner |
dealii::AlignedVector< std::size_t > | row_starts |
dealii::AlignedVector< unsigned int > | column_indices |
dealii::AlignedVector< unsigned int > | indices_transposed |
std::vector< std::pair< unsigned int, unsigned int > > | entries_to_be_sent |
std::vector< std::pair< unsigned int, unsigned int > > | send_targets |
std::vector< std::pair< unsigned int, unsigned int > > | receive_targets |
MPI_Comm | mpi_communicator |
Friends | |
template<typename , int , int > | |
class | SparseMatrixSIMD |
A specialized sparsity pattern for efficient vectorized SIMD access.
In the vectorized row index region [0, n_internal_dofs) we store data as an array-of-struct-of-array type as follows:
For the non-vectorized row index region [n_internal_dofs, n_locally_relevant_dofs) we store the matrix in CSR format (equivalent to the static dealii::SparsityPattern).
Definition at line 63 of file sparse_matrix_simd.h.
ryujin::SparsityPatternSIMD< simd_length >::SparsityPatternSIMD |
Default constructor.
Definition at line 17 of file sparse_matrix_simd.template.h.
ryujin::SparsityPatternSIMD< simd_length >::SparsityPatternSIMD | ( | const unsigned int | n_internal_dofs, |
const dealii::DynamicSparsityPattern & | sparsity, | ||
const std::shared_ptr< const dealii::Utilities::MPI::Partitioner > & | partitioner | ||
) |
Constructor taking a sparsity pattern template, an MPI partitioner and the number of (regular) internal dofs as an argument. The constructor calls SparsityPatternSIMD::reinit() internally.
Definition at line 26 of file sparse_matrix_simd.template.h.
References ryujin::SparsityPatternSIMD< simd_length >::n_internal_dofs, ryujin::SparsityPatternSIMD< simd_length >::partitioner, and ryujin::SparsityPatternSIMD< simd_length >::reinit().
void ryujin::SparsityPatternSIMD< simd_length >::reinit | ( | const unsigned int | n_internal_dofs, |
const dealii::DynamicSparsityPattern & | sparsity, | ||
const std::shared_ptr< const dealii::Utilities::MPI::Partitioner > & | partitioner | ||
) |
Reinit function that reinitializes the SIMD sparsity pattern for a given sparsity pattern template, an MPI partitioner and the number of (regular) internal dofs.
Definition at line 39 of file sparse_matrix_simd.template.h.
Referenced by ryujin::SparsityPatternSIMD< simd_length >::SparsityPatternSIMD().
|
inline |
Return the "stride size" of a given row index. The function returns simd_length for all indices in the range [0, n_internal_dofs) and 1 otherwise.
Definition at line 313 of file sparse_matrix_simd.h.
|
inline |
Definition at line 326 of file sparse_matrix_simd.h.
|
inline |
Definition at line 340 of file sparse_matrix_simd.h.
|
inline |
Definition at line 355 of file sparse_matrix_simd.h.
|
inline |
Definition at line 363 of file sparse_matrix_simd.h.
Referenced by ryujin::SparseMatrixSIMD< Number, n_components, simd_length >::reinit().
Definition at line 147 of file sparse_matrix_simd.h.
|
protected |
Definition at line 109 of file sparse_matrix_simd.h.
Referenced by ryujin::SparsityPatternSIMD< simd_length >::SparsityPatternSIMD().
|
protected |
Definition at line 110 of file sparse_matrix_simd.h.
|
protected |
Definition at line 111 of file sparse_matrix_simd.h.
Referenced by ryujin::SparsityPatternSIMD< simd_length >::SparsityPatternSIMD().
|
protected |
Definition at line 113 of file sparse_matrix_simd.h.
|
protected |
Definition at line 114 of file sparse_matrix_simd.h.
|
protected |
Definition at line 115 of file sparse_matrix_simd.h.
|
protected |
Array listing all (locally owned) entries as a pair {row, position_within_column}, potentially duplicated, and arranged consecutively by send targets.
Definition at line 122 of file sparse_matrix_simd.h.
|
protected |
All send targets stored as a pair consisting of an MPI rank (first entry) and a corresponding index range into entries_to_be_sent given by the half open range [send_targets[p-1].second, send_targets[p])
Definition at line 129 of file sparse_matrix_simd.h.
|
protected |
All receive targets are stored as a pair consisting of an MPI rank (first entry) and a corresponding index range into the (serial) data array given by the half open range [receive_targets[p-1].second, receive_targets[p].second).
Note, that indices into the data array start with the "locally relevant", or "ghost range" offset by n_locally_owned_dofs and multiplied by the number of components stored by the (vector valued) matrix.
Definition at line 142 of file sparse_matrix_simd.h.
|
protected |
Definition at line 144 of file sparse_matrix_simd.h.