block_interleaved_storage_scheme< IndexType > Struct Template Reference#
|
Reference API
|
#include <ginkgo/core/preconditioner/jacobi.hpp>
Public Member Functions | |
| block_interleaved_storage_scheme (IndexType block_offset, IndexType group_offset, uint32 group_power) | |
| IndexType | get_group_size () const noexcept |
| size_type | compute_storage_space (size_type num_blocks) const noexcept |
| IndexType | get_group_offset (IndexType block_id) const noexcept |
| IndexType | get_block_offset (IndexType block_id) const noexcept |
| IndexType | get_global_block_offset (IndexType block_id) const noexcept |
| IndexType | get_stride () const noexcept |
Public Attributes | |
| IndexType | block_offset |
| IndexType | group_offset |
| uint32 | group_power |
Detailed Description
struct gko::preconditioner::block_interleaved_storage_scheme< IndexType >
Defines the parameters of the interleaved block storage scheme used by block-Jacobi blocks.
- Template Parameters
-
IndexType type used for storing indices of the matrix
Member Function Documentation
◆ compute_storage_space()
|
inlinenoexcept |
Computes the storage space required for the requested number of blocks.
- Parameters
-
num_blocks the total number of blocks that needs to be stored
- Returns
- the total memory (as the number of elements) that need to be allocated for the scheme
- Note
- To simplify using the method in situations where the number of blocks is not known, for a special input
size_type{} - 1the method returns0to avoid overallocation of memory.
References gko::ceildiv(), gko::preconditioner::block_interleaved_storage_scheme< IndexType >::get_group_size(), and gko::preconditioner::block_interleaved_storage_scheme< IndexType >::group_offset.
◆ get_block_offset()
|
inlinenoexcept |
Returns the offset of the block with the given ID within its group.
- Parameters
-
block_id the ID of the block
- Returns
- the offset of the block with ID
block_idwithin its group
References gko::preconditioner::block_interleaved_storage_scheme< IndexType >::block_offset, and gko::preconditioner::block_interleaved_storage_scheme< IndexType >::get_group_size().
Referenced by gko::preconditioner::block_interleaved_storage_scheme< IndexType >::get_global_block_offset().
◆ get_global_block_offset()
|
inlinenoexcept |
Returns the offset of the block with the given ID.
- Parameters
-
block_id the ID of the block
- Returns
- the offset of the block with ID
block_id
References gko::preconditioner::block_interleaved_storage_scheme< IndexType >::get_block_offset(), and gko::preconditioner::block_interleaved_storage_scheme< IndexType >::get_group_offset().
◆ get_group_offset()
|
inlinenoexcept |
Returns the offset of the group belonging to the block with the given ID.
- Parameters
-
block_id the ID of the block
- Returns
- the offset of the group belonging to block with ID
block_id
References gko::preconditioner::block_interleaved_storage_scheme< IndexType >::group_offset, and gko::preconditioner::block_interleaved_storage_scheme< IndexType >::group_power.
Referenced by gko::preconditioner::block_interleaved_storage_scheme< IndexType >::get_global_block_offset().
◆ get_group_size()
|
inlinenoexcept |
Returns the number of elements in the group.
- Returns
- the number of elements in the group
References gko::preconditioner::block_interleaved_storage_scheme< IndexType >::group_power.
Referenced by gko::preconditioner::block_interleaved_storage_scheme< IndexType >::compute_storage_space(), and gko::preconditioner::block_interleaved_storage_scheme< IndexType >::get_block_offset().
◆ get_stride()
|
inlinenoexcept |
Returns the stride between columns of the block.
- Returns
- stride between columns of the block
References gko::preconditioner::block_interleaved_storage_scheme< IndexType >::block_offset, and gko::preconditioner::block_interleaved_storage_scheme< IndexType >::group_power.
Member Data Documentation
◆ block_offset
| IndexType gko::preconditioner::block_interleaved_storage_scheme< IndexType >::block_offset |
The offset between consecutive blocks within the group.
Referenced by gko::preconditioner::block_interleaved_storage_scheme< IndexType >::get_block_offset(), and gko::preconditioner::block_interleaved_storage_scheme< IndexType >::get_stride().
◆ group_offset
| IndexType gko::preconditioner::block_interleaved_storage_scheme< IndexType >::group_offset |
The offset between two block groups.
Referenced by gko::preconditioner::block_interleaved_storage_scheme< IndexType >::compute_storage_space(), and gko::preconditioner::block_interleaved_storage_scheme< IndexType >::get_group_offset().
◆ group_power
| uint32 gko::preconditioner::block_interleaved_storage_scheme< IndexType >::group_power |
Then base 2 power of the group.
I.e. the group contains 1 << group_power elements.
Referenced by gko::preconditioner::block_interleaved_storage_scheme< IndexType >::get_group_offset(), gko::preconditioner::block_interleaved_storage_scheme< IndexType >::get_group_size(), and gko::preconditioner::block_interleaved_storage_scheme< IndexType >::get_stride().
The documentation for this struct was generated from the following file:
- ginkgo/core/preconditioner/jacobi.hpp
Generated by