ryujin 2.1.1 revision d0a94ad2ccc0c4c2e8c2485c52b06b90e2fc9853
Public Member Functions | Friends | List of all members
ryujin::SparsityPatternSIMD< simd_length > Class Template Reference

#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
 

Friends

template<typename , int , int >
class SparseMatrixSIMD
 

Detailed Description

template<int simd_length>
class ryujin::SparsityPatternSIMD< simd_length >

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.

Constructor & Destructor Documentation

◆ SparsityPatternSIMD() [1/2]

template<int simd_length>
ryujin::SparsityPatternSIMD< simd_length >::SparsityPatternSIMD

Default constructor.

Definition at line 17 of file sparse_matrix_simd.template.h.

◆ SparsityPatternSIMD() [2/2]

template<int simd_length>
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 >::reinit().

Member Function Documentation

◆ reinit()

template<int simd_length>
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().

◆ stride_of_row()

template<int simd_length>
DEAL_II_ALWAYS_INLINE unsigned int ryujin::SparsityPatternSIMD< simd_length >::stride_of_row ( const unsigned int  row) const
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 308 of file sparse_matrix_simd.h.

◆ columns()

template<int simd_length>
DEAL_II_ALWAYS_INLINE const unsigned int * ryujin::SparsityPatternSIMD< simd_length >::columns ( const unsigned int  row) const
inline

Definition at line 321 of file sparse_matrix_simd.h.

◆ row_length()

template<int simd_length>
DEAL_II_ALWAYS_INLINE unsigned int ryujin::SparsityPatternSIMD< simd_length >::row_length ( const unsigned int  row) const
inline

Definition at line 335 of file sparse_matrix_simd.h.

◆ n_rows()

template<int simd_length>
DEAL_II_ALWAYS_INLINE unsigned int ryujin::SparsityPatternSIMD< simd_length >::n_rows
inline

Definition at line 350 of file sparse_matrix_simd.h.

◆ n_nonzero_elements()

template<int simd_length>
DEAL_II_ALWAYS_INLINE std::size_t ryujin::SparsityPatternSIMD< simd_length >::n_nonzero_elements
inline

Friends And Related Function Documentation

◆ SparseMatrixSIMD

template<int simd_length>
template<typename , int , int >
friend class SparseMatrixSIMD
friend

Definition at line 142 of file sparse_matrix_simd.h.


The documentation for this class was generated from the following files: