ryujin 2.1.1 revision 955e869188d49b3c97ca7b1cf4fd9ceb0e6f46ef
|
#include <source/sparse_matrix_simd.h>
Public Types | |
using | VectorizedArray = dealii::VectorizedArray< Number, simd_length > |
template<typename Number2 > | |
using | EntryType = typename ryujin::EntryType< Number2, n_components >::type |
Public Member Functions | |
SparseMatrixSIMD () | |
SparseMatrixSIMD (const SparsityPatternSIMD< simd_length > &sparsity) | |
void | reinit (const SparsityPatternSIMD< simd_length > &sparsity) |
template<typename SparseMatrix > | |
void | read_in (const std::array< SparseMatrix, n_components > &sparse_matrix, bool locally_indexed=true) |
template<typename SparseMatrix > | |
void | read_in (const SparseMatrix &sparse_matrix, bool locally_indexed=true) |
template<typename Number2 = Number> | |
EntryType< Number2 > | get_entry (const unsigned int row, const unsigned int position_within_column) const |
template<typename Number2 = Number> | |
dealii::Tensor< 1, n_components, Number2 > | get_tensor (const unsigned int row, const unsigned int position_within_column) const |
template<typename Number2 = Number> | |
EntryType< Number2 > | get_transposed_entry (const unsigned int row, const unsigned int position_within_column) const |
template<typename Number2 = Number> | |
dealii::Tensor< 1, n_components, Number2 > | get_transposed_tensor (const unsigned int row, const unsigned int position_within_column) const |
template<typename Number2 = Number> | |
void | write_entry (const Number2 entry, const unsigned int row, const unsigned int position_within_column, const bool do_streaming_store=false) |
template<typename Number2 = Number> | |
void | write_entry (const dealii::Tensor< 1, n_components, Number2 > &entry, const unsigned int row, const unsigned int position_within_column, const bool do_streaming_store=false) |
void | update_ghost_rows_start (const unsigned int communication_channel=0) |
void | update_ghost_rows_finish () |
void | update_ghost_rows () |
template<typename Number2 > | |
DEAL_II_ALWAYS_INLINE auto | get_entry (const unsigned int row, const unsigned int position_within_column) const -> EntryType< Number2 > |
template<typename Number2 > | |
DEAL_II_ALWAYS_INLINE dealii::Tensor< 1, n_components, Number2 > | get_tensor (const unsigned int row, const unsigned int position_within_column) const |
template<typename Number2 > | |
DEAL_II_ALWAYS_INLINE auto | get_transposed_entry (const unsigned int row, const unsigned int position_within_column) const -> EntryType< Number2 > |
template<typename Number2 > | |
DEAL_II_ALWAYS_INLINE dealii::Tensor< 1, n_components, Number2 > | get_transposed_tensor (const unsigned int row, const unsigned int position_within_column) const |
template<typename Number2 > | |
DEAL_II_ALWAYS_INLINE void | write_entry (const Number2 entry, const unsigned int row, const unsigned int position_within_column, const bool do_streaming_store) |
template<typename Number2 > | |
DEAL_II_ALWAYS_INLINE void | write_entry (const dealii::Tensor< 1, n_components, Number2 > &entry, const unsigned int row, const unsigned int position_within_column, const bool do_streaming_store) |
Protected Attributes | |
const SparsityPatternSIMD< simd_length > * | sparsity |
dealii::AlignedVector< Number > | data |
dealii::AlignedVector< Number > | exchange_buffer |
std::vector< MPI_Request > | requests |
A specialized sparse matrix 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 (see the documentation of class SparsityPatternSIMD for details). 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 161 of file sparse_matrix_simd.h.
using ryujin::SparseMatrixSIMD< Number, n_components, simd_length >::VectorizedArray = dealii::VectorizedArray<Number, simd_length> |
Definition at line 178 of file sparse_matrix_simd.h.
using ryujin::SparseMatrixSIMD< Number, n_components, simd_length >::EntryType = typename ryujin::EntryType<Number2, n_components>::type |
The return type of get_entry and get_transposed_entry: If n_components
is equal to one then EntryType
reduces to Number2
, otherwise the type is set to dealii::tensor<1, n_components, Number2>
Definition at line 187 of file sparse_matrix_simd.h.
ryujin::SparseMatrixSIMD< Number, n_components, simd_length >::SparseMatrixSIMD |
Definition at line 272 of file sparse_matrix_simd.template.h.
ryujin::SparseMatrixSIMD< Number, n_components, simd_length >::SparseMatrixSIMD | ( | const SparsityPatternSIMD< simd_length > & | sparsity | ) |
Definition at line 279 of file sparse_matrix_simd.template.h.
References ryujin::SparseMatrixSIMD< Number, n_components, simd_length >::data, and ryujin::SparseMatrixSIMD< Number, n_components, simd_length >::sparsity.
void ryujin::SparseMatrixSIMD< Number, n_components, simd_length >::reinit | ( | const SparsityPatternSIMD< simd_length > & | sparsity | ) |
Definition at line 288 of file sparse_matrix_simd.template.h.
References ryujin::SparsityPatternSIMD< simd_length >::n_nonzero_elements().
void ryujin::SparseMatrixSIMD< Number, n_components, simd_length >::read_in | ( | const std::array< SparseMatrix, n_components > & | sparse_matrix, |
bool | locally_indexed = true |
||
) |
Definition at line 298 of file sparse_matrix_simd.template.h.
References RYUJIN_OMP_FOR, RYUJIN_PARALLEL_REGION_BEGIN, RYUJIN_PARALLEL_REGION_END, and ryujin::write_entry().
void ryujin::SparseMatrixSIMD< Number, n_components, simd_length >::read_in | ( | const SparseMatrix & | sparse_matrix, |
bool | locally_indexed = true |
||
) |
Definition at line 360 of file sparse_matrix_simd.template.h.
References RYUJIN_OMP_FOR, RYUJIN_PARALLEL_REGION_BEGIN, RYUJIN_PARALLEL_REGION_END, and ryujin::write_entry().
EntryType< Number2 > ryujin::SparseMatrixSIMD< Number, n_components, simd_length >::get_entry | ( | const unsigned int | row, |
const unsigned int | position_within_column | ||
) | const |
Return the entry indexed by row
and position_within_column
. The return type will either be scalar if n_components
is equal to 1, or a tensor if n_components
is greater than 1.
row
must be within the interval [0, n_internal_dofs) and must be divisible by simd_length. dealii::Tensor< 1, n_components, Number2 > ryujin::SparseMatrixSIMD< Number, n_components, simd_length >::get_tensor | ( | const unsigned int | row, |
const unsigned int | position_within_column | ||
) | const |
Return the tensor-valued entry indexed by row
and position_within_column
. This function performs the same operation as get_entry() except that it always returns the entry as a tensor (even if it is effectively a scalar entry).
row
must be within the interval [0, n_internal_dofs) and must be divisible by simd_length. EntryType< Number2 > ryujin::SparseMatrixSIMD< Number, n_components, simd_length >::get_transposed_entry | ( | const unsigned int | row, |
const unsigned int | position_within_column | ||
) | const |
Return the transposed entry indexed by row
and position_within_column
. The return type will either be scalar if n_components
is equal to 1, or a tensor if n_components
is greater than 1.
row
must be within the interval [0, n_internal_dofs) and must be divisible by simd_length. dealii::Tensor< 1, n_components, Number2 > ryujin::SparseMatrixSIMD< Number, n_components, simd_length >::get_transposed_tensor | ( | const unsigned int | row, |
const unsigned int | position_within_column | ||
) | const |
Return the transposed tensor-valued entry indexed by row
and position_within_column. This function performs the same operation as get_entry() except that it always returns the entry as a tensor (even if it is effectively a scalar entry).
row
must be within the interval [0, n_internal_dofs) and must be divisible by simd_length. void ryujin::SparseMatrixSIMD< Number, n_components, simd_length >::write_entry | ( | const Number2 | entry, |
const unsigned int | row, | ||
const unsigned int | position_within_column, | ||
const bool | do_streaming_store = false |
||
) |
Write a (scalar valued) entry
to the matrix indexed by row
and position_within_column
.
row
must be within the interval [0, n_internal_dofs) and must be divisible by simd_length.n_components
is equal to 1. void ryujin::SparseMatrixSIMD< Number, n_components, simd_length >::write_entry | ( | const dealii::Tensor< 1, n_components, Number2 > & | entry, |
const unsigned int | row, | ||
const unsigned int | position_within_column, | ||
const bool | do_streaming_store = false |
||
) |
Write a tensor-valued entry
to the matrix indexed by row
and position_within_column
.
row
must be within the interval [0, n_internal_dofs) and must be divisible by simd_length.
|
inline |
Definition at line 651 of file sparse_matrix_simd.h.
|
inline |
Definition at line 755 of file sparse_matrix_simd.h.
|
inline |
Definition at line 768 of file sparse_matrix_simd.h.
|
inline |
Definition at line 374 of file sparse_matrix_simd.h.
|
inline |
Definition at line 389 of file sparse_matrix_simd.h.
|
inline |
Definition at line 454 of file sparse_matrix_simd.h.
|
inline |
Definition at line 470 of file sparse_matrix_simd.h.
|
inline |
Definition at line 560 of file sparse_matrix_simd.h.
|
inline |
Definition at line 585 of file sparse_matrix_simd.h.
|
protected |
Definition at line 300 of file sparse_matrix_simd.h.
Referenced by ryujin::SparseMatrixSIMD< Number, n_components, simd_length >::SparseMatrixSIMD().
|
protected |
Definition at line 301 of file sparse_matrix_simd.h.
Referenced by ryujin::SparseMatrixSIMD< Number, n_components, simd_length >::SparseMatrixSIMD().
|
protected |
Definition at line 302 of file sparse_matrix_simd.h.
|
protected |
Definition at line 303 of file sparse_matrix_simd.h.