SIRIUS 7.5.0
Electronic structure library and applications
|
Base class for split index. More...
#include <splindex.hpp>
Classes | |
struct | location_t |
Pair of <local index, block_id> describing the location of a global index element. More... | |
Public Types | |
using | value_type = typename Index_t::value_type |
Public Member Functions | |
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... | |
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... | |
value_type | local_size () const |
Return local size for the current block. More... | |
auto | global_index (typename splindex< Index_t >::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... | |
Static Public Member Functions | |
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 | |
n_blocks | n_blocks_ {-1} |
Number of blocks over which the global index is distributed. More... | |
block_id | block_id_ {-1} |
Index of the block with local fraction of the global index. More... | |
value_type | size_ {-1} |
Size (aka length) of the global index. More... | |
Base class for split index.
Definition at line 120 of file splindex.hpp.
using sirius::splindex< Index_t >::value_type = typename Index_t::value_type |
Definition at line 123 of file splindex.hpp.
|
inline |
Default constructor.
Definition at line 152 of file splindex.hpp.
|
inline |
Constructor.
Check and set index size, number of blocks and block id.
Definition at line 158 of file splindex.hpp.
|
inlinevirtual |
Definition at line 182 of file splindex.hpp.
|
pure virtual |
Return local size of the split index for a given block.
Implemented in sirius::splindex_block< Index_t >, sirius::splindex_block< sirius::atom_index_t >, sirius::splindex_block< I >, sirius::splindex_block< sirius::paw_atom_index_t >, sirius::splindex_block< sirius::atom_symmetry_class_index_t >, sirius::splindex_block_cyclic< Index_t >, sirius::splindex_chunk< Index_t >, and sirius::splindex_chunk< sirius::kp_index_t >.
|
pure virtual |
Return location (block_id and local offset) of the global index.
Implemented in sirius::splindex_block< Index_t >, sirius::splindex_block< sirius::atom_index_t >, sirius::splindex_block< I >, sirius::splindex_block< sirius::paw_atom_index_t >, sirius::splindex_block< sirius::atom_symmetry_class_index_t >, sirius::splindex_block_cyclic< Index_t >, sirius::splindex_chunk< Index_t >, and sirius::splindex_chunk< sirius::kp_index_t >.
|
pure virtual |
Return global index by block id and local index.
Implemented in sirius::splindex_block< Index_t >, sirius::splindex_block< sirius::atom_index_t >, sirius::splindex_block< I >, sirius::splindex_block< sirius::paw_atom_index_t >, sirius::splindex_block< sirius::atom_symmetry_class_index_t >, sirius::splindex_block_cyclic< Index_t >, sirius::splindex_chunk< Index_t >, and sirius::splindex_chunk< sirius::kp_index_t >.
|
inline |
Return local size for the current block.
Definition at line 196 of file splindex.hpp.
|
inline |
Return global index of an element by local index and block id.
Definition at line 202 of file splindex.hpp.
|
inline |
Definition at line 207 of file splindex.hpp.
|
inlinenoexcept |
Return total length of the index (global number of elements).
Definition at line 213 of file splindex.hpp.
|
inlinestatic |
Compute size of the block from global index size and number of blocks.
Definition at line 219 of file splindex.hpp.
|
protected |
Number of blocks over which the global index is distributed.
Definition at line 126 of file splindex.hpp.
|
protected |
Index of the block with local fraction of the global index.
Definition at line 129 of file splindex.hpp.
|
protected |
Size (aka length) of the global index.
Definition at line 132 of file splindex.hpp.