Ginkgo  Generated from pipelines/1478841010 branch based on develop. Ginkgo version 1.9.0
A numerical linear algebra library targeting many-core architectures
Public Member Functions | Public Attributes | List of all members
gko::preconditioner::block_interleaved_storage_scheme< IndexType > Struct Template Reference

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

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

Inheritance diagram for gko::preconditioner::block_interleaved_storage_scheme< IndexType >:
[legend]
Collaboration 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
 Returns the number of elements in the group. More...
 
size_type compute_storage_space (size_type num_blocks) const noexcept
 Computes the storage space required for the requested number of blocks. More...
 
IndexType get_group_offset (IndexType block_id) const noexcept
 Returns the offset of the group belonging to the block with the given ID. More...
 
IndexType get_block_offset (IndexType block_id) const noexcept
 Returns the offset of the block with the given ID within its group. More...
 
IndexType get_global_block_offset (IndexType block_id) const noexcept
 Returns the offset of the block with the given ID. More...
 
IndexType get_stride () const noexcept
 Returns the stride between columns of the block. More...
 

Public Attributes

IndexType block_offset
 The offset between consecutive blocks within the group.
 
IndexType group_offset
 The offset between two block groups.
 
uint32 group_power
 Then base 2 power of the group. More...
 

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.

◆ 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

Referenced by gko::preconditioner::block_interleaved_storage_scheme< index_type >::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

◆ 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

Referenced by gko::preconditioner::block_interleaved_storage_scheme< index_type >::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

Member Data Documentation

◆ group_power

template<typename IndexType>
uint32 gko::preconditioner::block_interleaved_storage_scheme< IndexType >::group_power

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