block_interleaved_storage_scheme< IndexType > Struct Template Reference

block_interleaved_storage_scheme&lt; IndexType &gt; Struct Template Reference#

Reference API: gko::preconditioner::block_interleaved_storage_scheme< IndexType > Struct Template Reference
Reference API
gko::preconditioner::block_interleaved_storage_scheme< IndexType > Struct Template Reference

#include <ginkgo/core/preconditioner/jacobi.hpp>

Inheritance diagram for gko::preconditioner::block_interleaved_storage_scheme< IndexType >:
[legend]

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

template<typename IndexType>
struct gko::preconditioner::block_interleaved_storage_scheme< IndexType >

Defines the parameters of the interleaved block storage scheme used by block-Jacobi blocks.

Template Parameters
IndexTypetype used for storing indices of the matrix

Member Function Documentation

◆ compute_storage_space()

template<typename IndexType >
size_type gko::preconditioner::block_interleaved_storage_scheme< IndexType >::compute_storage_space ( size_type  num_blocks) const
inlinenoexcept

Computes the storage space required for the requested number of blocks.

Parameters
num_blocksthe 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{} - 1 the method returns 0 to 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()

template<typename IndexType >
IndexType gko::preconditioner::block_interleaved_storage_scheme< IndexType >::get_block_offset ( IndexType  block_id) const
inlinenoexcept

Returns the offset of the block with the given ID within its group.

Parameters
block_idthe ID of the block
Returns
the offset of the block with ID block_id within 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()

template<typename IndexType >
IndexType gko::preconditioner::block_interleaved_storage_scheme< IndexType >::get_global_block_offset ( IndexType  block_id) const
inlinenoexcept

Returns the offset of the block with the given ID.

Parameters
block_idthe 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()

template<typename IndexType >
IndexType gko::preconditioner::block_interleaved_storage_scheme< IndexType >::get_group_offset ( IndexType  block_id) const
inlinenoexcept

Returns the offset of the group belonging to the block with the given ID.

Parameters
block_idthe 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()

template<typename IndexType >
IndexType gko::preconditioner::block_interleaved_storage_scheme< IndexType >::get_group_size ( ) const
inlinenoexcept

◆ get_stride()

template<typename IndexType >
IndexType gko::preconditioner::block_interleaved_storage_scheme< IndexType >::get_stride ( ) const
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

template<typename IndexType >
IndexType gko::preconditioner::block_interleaved_storage_scheme< IndexType >::block_offset

◆ group_offset

◆ group_power


The documentation for this struct was generated from the following file: