![]() |
ryujin 2.1.1 revision ee5cbcbf2346c1299c942d0e1f13b46449973c18
|
#include <source/sparsity_pattern.h>
Public Member Functions | |
Constructor and initialization | |
| SparsityPatternView ()=default | |
| SparsityPatternView (const SparsityPattern< warp_size > &sparsity_pattern) | |
| void | reinit (const SparsityPattern< warp_size > &sparsity_pattern) |
General information about the sparsity pattern | |
| DEAL_II_HOST_DEVICE unsigned int | n_internal_dofs () const |
| DEAL_II_HOST_DEVICE unsigned int | n_locally_owned_dofs () const |
| DEAL_II_HOST_DEVICE unsigned int | n_rows () const |
| DEAL_II_HOST_DEVICE unsigned int | n_nonzero_elements () const |
Properties of a row | |
| DEAL_II_HOST_DEVICE unsigned int | stride_of_row (const unsigned int row) const |
| DEAL_II_HOST_DEVICE const unsigned int * | columns (const unsigned int row) const |
| DEAL_II_HOST_DEVICE unsigned int | row_length (const unsigned int row) const |
| DEAL_II_HOST_DEVICE unsigned int | column_index (const unsigned int row, const unsigned int column) const |
Offset calculation | |
| template<unsigned int n_components = 1> | |
| DEAL_II_HOST_DEVICE unsigned int | offset (const unsigned int row, const unsigned int column_index, const unsigned int component=0) const |
| template<unsigned int n_components = 1> | |
| DEAL_II_HOST_DEVICE unsigned int | offset_internal (const unsigned int row, const unsigned int column_index) const |
| template<unsigned int n_components = 1> | |
| DEAL_II_HOST_DEVICE unsigned int | transposed_offset (const unsigned int row, const unsigned int column_index, const unsigned int component=0) const |
| template<unsigned int n_components = 1> | |
| DEAL_II_HOST_DEVICE const unsigned int * | transposed_offset_internal (const unsigned int row, const unsigned int column_index) const |
| template<unsigned int n_components = 1> | |
| DEAL_II_HOST_DEVICE unsigned int | ghost_offset () const |
This class models a "view" of the sparsity pattern that lives in the host or device memory space. It provides a number of methods for iterating over the sparsity pattern and offset computation.
Definition at line 216 of file sparsity_pattern.h.
|
default |
| ryujin::SparsityPatternView< warp_size, MemorySpace >::SparsityPatternView | ( | const SparsityPattern< warp_size > & | sparsity_pattern | ) |
| void ryujin::SparsityPatternView< warp_size, MemorySpace >::reinit | ( | const SparsityPattern< warp_size > & | sparsity_pattern | ) |
| DEAL_II_HOST_DEVICE unsigned int ryujin::SparsityPatternView< warp_size, MemorySpace >::n_internal_dofs | ( | ) | const |
The number of locally internal rows of the sparsity pattern that are stored in optimized "array-of-struct-of-array" format.
| DEAL_II_HOST_DEVICE unsigned int ryujin::SparsityPatternView< warp_size, MemorySpace >::n_locally_owned_dofs | ( | ) | const |
The number of locally owned rows of the sparsity pattern.
| DEAL_II_HOST_DEVICE unsigned int ryujin::SparsityPatternView< warp_size, MemorySpace >::n_rows | ( | ) | const |
The total number of rows of the given sparsity pattern. This number comprises all locally owned rows and the ghost row range and is equal to n_locally_relevant.
| DEAL_II_HOST_DEVICE unsigned int ryujin::SparsityPatternView< warp_size, MemorySpace >::n_nonzero_elements | ( | ) | const |
The total number of nonzero elements of the given sparsity pattern.
| DEAL_II_HOST_DEVICE unsigned int ryujin::SparsityPatternView< warp_size, MemorySpace >::stride_of_row | ( | const unsigned int | row | ) | const |
Return the "stride size" of a given row index, i.e., the distance in memory between two consecutive column entries of the row. The function returns warp_size for all indices in the range [0, n_internal_dofs) and 1 otherwise.
| DEAL_II_HOST_DEVICE const unsigned int * ryujin::SparsityPatternView< warp_size, MemorySpace >::columns | ( | const unsigned int | row | ) | const |
Return a pointer to the array of column indices for the given row, i.e., for a given row index i:
is a pointer to the column index j (or column indices *js when SIMD vectorized).
| DEAL_II_HOST_DEVICE unsigned int ryujin::SparsityPatternView< warp_size, MemorySpace >::row_length | ( | const unsigned int | row | ) | const |
Return the row length of a given row index.
| DEAL_II_HOST_DEVICE unsigned int ryujin::SparsityPatternView< warp_size, MemorySpace >::column_index | ( | const unsigned int | row, |
| const unsigned int | column | ||
| ) | const |
Given a row index row and a column index column return the corresponding column index, i.e., the position of the column in the stencil of nonzero row entries.
| DEAL_II_HOST_DEVICE unsigned int ryujin::SparsityPatternView< warp_size, MemorySpace >::offset | ( | const unsigned int | row, |
| const unsigned int | column_index, | ||
| const unsigned int | component = 0 |
||
| ) | const |
Given a row index, an index for the column (within [0, row_length(row)), and a component index return the position of the matrix entry in the data array.
| DEAL_II_HOST_DEVICE unsigned int ryujin::SparsityPatternView< warp_size, MemorySpace >::offset_internal | ( | const unsigned int | row, |
| const unsigned int | column_index | ||
| ) | const |
Specialized version of the function above that computes the offset only for the internal part and pointing to component 0. This variant avoids a number of index computations and an if statement.
| DEAL_II_HOST_DEVICE unsigned int ryujin::SparsityPatternView< warp_size, MemorySpace >::transposed_offset | ( | const unsigned int | row, |
| const unsigned int | column_index, | ||
| const unsigned int | component = 0 |
||
| ) | const |
Given a row index, an index for the column (within [0, row_length(row)), and a component index return the position of the transposed matrix entry in the data array.
| DEAL_II_HOST_DEVICE const unsigned int * ryujin::SparsityPatternView< warp_size, MemorySpace >::transposed_offset_internal | ( | const unsigned int | row, |
| const unsigned int | column_index | ||
| ) | const |
Specialized version of the function above that computes the offset only for the internal part and pointing to component 0. This variant avoids a number of index computations and an if statement.
| DEAL_II_HOST_DEVICE unsigned int ryujin::SparsityPatternView< warp_size, MemorySpace >::ghost_offset | ( | ) | const |
Return an offset pointing to the first element of the ghost range, i.e., the value corresponding to offset(sparsity_->n_locally_owned_dofs(), 0, 0).