![]() |
ryujin 2.1.1 revision ee5cbcbf2346c1299c942d0e1f13b46449973c18
|
#include <source/sparse_matrix.h>


Public Member Functions | |
Constructor and initialization | |
| SparseMatrix ()=default | |
| SparseMatrix (const SparsityPattern< warp_size > &sparsity, const TransferPolicy transfer_policy=TransferPolicy::explicit_transfers) | |
| void | reinit (const SparsityPattern< warp_size > &sparsity, const TransferPolicy transfer_policy=TransferPolicy::explicit_transfers) |
| ACCESSOR_READ_ONLY (sparsity_pattern) | |
Memory space access and synchronization | |
| template<typename MemorySpace = dealii::MemorySpace::Host> | |
| SparseMatrixView< Number, n_comp, warp_size, simd_length, MemorySpace, true > | view () |
| template<typename MemorySpace = dealii::MemorySpace::Host> | |
| SparseMatrixView< Number, n_comp, warp_size, simd_length, MemorySpace, false > | view () const |
MPI synchronization | |
| template<typename MemorySpace > | |
| void | zero_out_ghost_rows_on_memory_space () |
| template<typename MemorySpace > | |
| void | update_ghost_rows_on_memory_space () |
| template<typename MemorySpace > | |
| void | compress_on_memory_space (dealii::VectorOperation::values operation) |
| template<typename MemorySpace > | |
| void | populate_exchange_buffer_on_memory_space () |
Public Member Functions inherited from ryujin::MirroredStorage< Derived > | |
| template<typename MemorySpace > | |
| bool | is_resident () const |
| template<typename MemorySpace > | |
| bool | is_pinned () const |
| template<typename MemorySpace > | |
| void | copy_to_memory_space () const |
| template<typename MemorySpace > | |
| void | move_to_memory_space () |
| TransferPolicy | transfer_policy () const |
| void | set_transfer_policy (const TransferPolicy transfer_policy) |
Internal fields, methods, and friends | |
| class | MirroredStorage< SparseMatrix< Number, n_comp, warp_size, simd_length > > |
| template<typename , int , int , int , typename , bool > | |
| class | SparseMatrixView |
Additional Inherited Members | |
Protected Member Functions inherited from ryujin::MirroredStorage< Derived > | |
| MirroredStorage ()=default | |
| template<typename MemorySpace > | |
| void | prepare_read_access () const |
| template<typename MemorySpace > | |
| void | prepare_write_access () |
| void | reset_residency (const bool host_resident, const bool default_resident) |
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 SparsityPattern 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).
The two template parameters warp_size and simd_length describe two different concepts: warp_size is the number of rows that the underlying SparsityPattern groups together in the internal index range, whereas simd_length is the number of packed doubles/floats that the access operators of this class read and write at once. The warp size has to be an integer multiple of the SIMD length.
Definition at line 58 of file sparse_matrix.h.
|
default |
Default constructor.
| ryujin::SparseMatrix< Number, n_comp, warp_size, simd_length >::SparseMatrix | ( | const SparsityPattern< warp_size > & | sparsity, |
| const TransferPolicy | transfer_policy = TransferPolicy::explicit_transfers |
||
| ) |
Constructor taking a SIMD sparsity pattern as an argument.
| void ryujin::SparseMatrix< Number, n_comp, warp_size, simd_length >::reinit | ( | const SparsityPattern< warp_size > & | sparsity, |
| const TransferPolicy | transfer_policy = TransferPolicy::explicit_transfers |
||
| ) |
Reinit function reinitializes the matrix with the given SIMD sparsity pattern. The locally owned and ghost ranges are zeroed.
transfer_policy for this function. | ryujin::SparseMatrix< Number, n_comp, warp_size, simd_length >::ACCESSOR_READ_ONLY | ( | sparsity_pattern | ) |
Return the underlying sparsity pattern.
| SparseMatrixView< Number, n_comp, warp_size, simd_length, MemorySpace, true > ryujin::SparseMatrix< Number, n_comp, warp_size, simd_length >::view | ( | ) |
Return a writable view on the sparse matrix for the selected memory space. Depending on the selected TransferPolicy the method either asserts that the memory space is resident (TransferPolicy::explicit_transfers), or performs an implicit move_to_memory_space() invalidating the other memory space (TransferPolicy::implicit_transfers).
| SparseMatrixView< Number, n_comp, warp_size, simd_length, MemorySpace, false > ryujin::SparseMatrix< Number, n_comp, warp_size, simd_length >::view | ( | ) | const |
Return a read-only view on the sparse matrix for the selected memory space. Depending on the selected TransferPolicy the method either asserts that the memory space is resident (TransferPolicy::explicit_transfers), or performs an implicit copy_to_memory_space() (TransferPolicy::implicit_transfers).
| void ryujin::SparseMatrix< Number, n_comp, warp_size, simd_length >::zero_out_ghost_rows_on_memory_space | ( | ) |
MPI synchronization: Zero out all ghost rows.
| void ryujin::SparseMatrix< Number, n_comp, warp_size, simd_length >::update_ghost_rows_on_memory_space | ( | ) |
MPI synchronization: Import all ghost rows from neighboring MPI ranks on the templated memory space.
| void ryujin::SparseMatrix< Number, n_comp, warp_size, simd_length >::compress_on_memory_space | ( | dealii::VectorOperation::values | operation | ) |
MPI synchronization: Copy the data that has accumulated in the ghost range to the owning processor. This function operates on the templated memory space.
| void ryujin::SparseMatrix< Number, n_comp, warp_size, simd_length >::populate_exchange_buffer_on_memory_space | ( | ) |
Gather all entries that have to be sent to neighboring MPI ranks into the exchange buffer of the selected memory space.
Note: This function is an implementation detail of compress_on_memory_space(). It is public because nvcc does not allow an extended host device lambda in a member function with private or protected access.
|
friend |
Definition at line 225 of file sparse_matrix.h.
|
friend |
Definition at line 232 of file sparse_matrix.h.