SIRIUS 7.5.0
Electronic structure library and applications
Public Types | Public Member Functions | Private Attributes | List of all members
sirius::splindex_block< Index_t > Class Template Reference

Inherits sirius::splindex< basic_index_t< int > >.

Public Types

using value_type = typename splindex< Index_t >::value_type
 
- Public Types inherited from sirius::splindex< basic_index_t< int > >
using value_type = typename Index_t::value_type
 

Public Member Functions

 splindex_block (value_type size__, n_blocks n_blocks__, block_id block_id__)
 Constructor. More...
 
value_type local_size (block_id block_id__) const
 Return local size of the split index for a given block. More...
 
splindex< Index_t >::location_t location (typename Index_t::global idx__) const
 Return "local index, rank" pair for a global index. More...
 
Index_t::global global_index (typename Index_t::local idxloc__, block_id block_id__) const
 Return global index of an element by local index and block id. More...
 
auto global_offset () const
 
auto global_offset (block_id iblock__) const
 
auto counts () const
 
- Public Member Functions inherited from sirius::splindex< basic_index_t< int > >
 splindex ()
 Default constructor. More...
 
 splindex (value_type size__, n_blocks n_blocks__, block_id block_id__)
 Constructor. More...
 
virtual value_type local_size (block_id block_id__) const=0
 Return local size of the split index for a given block. More...
 
value_type local_size () const
 Return local size for the current block. More...
 
virtual location_t location (typename Index_t::global idx__) const=0
 Return location (block_id and local offset) of the global index. More...
 
virtual Index_t::global global_index (typename Index_t::local idxloc__, block_id block_id__) const=0
 Return global index by block id and local index. More...
 
auto global_index (typename splindex< basic_index_t< int > >::location_t loc__) const
 Return global index of an element by local index and block id. More...
 
auto global_index (typename Index_t::local idxloc__) const
 
auto size () const noexcept
 Return total length of the index (global number of elements). More...
 

Private Attributes

value_type block_size_
 Local index size of a given block. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from sirius::splindex< basic_index_t< int > >
static auto block_size (value_type size__, n_blocks n_blocks__)
 Compute size of the block from global index size and number of blocks. More...
 
- Protected Attributes inherited from sirius::splindex< basic_index_t< int > >
n_blocks n_blocks_
 Number of blocks over which the global index is distributed. More...
 
block_id block_id_
 Index of the block with local fraction of the global index. More...
 
value_type size_
 Size (aka length) of the global index. More...
 

Detailed Description

template<typename Index_t = basic_index_t<int>>
class sirius::splindex_block< Index_t >

Definition at line 281 of file splindex.hpp.

Member Typedef Documentation

◆ value_type

template<typename Index_t = basic_index_t<int>>
using sirius::splindex_block< Index_t >::value_type = typename splindex<Index_t>::value_type

Definition at line 284 of file splindex.hpp.

Constructor & Destructor Documentation

◆ splindex_block() [1/2]

template<typename Index_t = basic_index_t<int>>
sirius::splindex_block< Index_t >::splindex_block ( )
inline

Definition at line 289 of file splindex.hpp.

◆ splindex_block() [2/2]

template<typename Index_t = basic_index_t<int>>
sirius::splindex_block< Index_t >::splindex_block ( value_type  size__,
n_blocks  n_blocks__,
block_id  block_id__ 
)
inline

Constructor.

Definition at line 293 of file splindex.hpp.

Member Function Documentation

◆ local_size()

template<typename Index_t = basic_index_t<int>>
value_type sirius::splindex_block< Index_t >::local_size ( block_id  block_id__) const
inlinevirtual

Return local size of the split index for a given block.

Implements sirius::splindex< basic_index_t< int > >.

Definition at line 302 of file splindex.hpp.

◆ location()

template<typename Index_t = basic_index_t<int>>
splindex< Index_t >::location_t sirius::splindex_block< Index_t >::location ( typename Index_t::global  idx__) const
inlinevirtual

Return "local index, rank" pair for a global index.

Implements sirius::splindex< basic_index_t< int > >.

Definition at line 319 of file splindex.hpp.

◆ global_index()

template<typename Index_t = basic_index_t<int>>
Index_t::global sirius::splindex_block< Index_t >::global_index ( typename Index_t::local  idxloc__,
block_id  block_id__ 
) const
inlinevirtual

Return global index of an element by local index and block id.

Implements sirius::splindex< basic_index_t< int > >.

Definition at line 332 of file splindex.hpp.

◆ global_offset() [1/2]

template<typename Index_t = basic_index_t<int>>
auto sirius::splindex_block< Index_t >::global_offset ( ) const
inline

Definition at line 345 of file splindex.hpp.

◆ global_offset() [2/2]

template<typename Index_t = basic_index_t<int>>
auto sirius::splindex_block< Index_t >::global_offset ( block_id  iblock__) const
inline

Definition at line 350 of file splindex.hpp.

◆ counts()

template<typename Index_t = basic_index_t<int>>
auto sirius::splindex_block< Index_t >::counts ( ) const
inline

Definition at line 355 of file splindex.hpp.

Member Data Documentation

◆ block_size_

template<typename Index_t = basic_index_t<int>>
value_type sirius::splindex_block< Index_t >::block_size_
private

Local index size of a given block.

Definition at line 287 of file splindex.hpp.


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