Specifies distribution of a contiguous array into non-overlapping chunks.
More...
#include <Distribution.h>
template<typename Ind = size_t>
class molpro::linalg::array::util::Distribution< Ind >
Specifies distribution of a contiguous array into non-overlapping chunks.
- Template Parameters
-
- Examples
- LinearEigensystemDistrArrayExample.cpp, and OptimizeDistrArrayExample.cpp.
|
std::vector< index_type > | m_chunk_borders |
| list of starting indices for each chunk with past the end index as last element. e.g. {|0,1,2,3|,4,5|,6,7,8|9} -> {0,4,6,9,10} More...
|
|
◆ index_type
template<typename Ind = size_t>
◆ Distribution() [1/4]
template<typename Ind = size_t>
◆ Distribution() [2/4]
template<typename Ind = size_t>
◆ Distribution() [3/4]
template<typename Ind = size_t>
◆ ~Distribution()
template<typename Ind = size_t>
◆ Distribution() [4/4]
template<typename Ind = size_t>
Construct a contiguous distribution list using vector of start indices.
- Parameters
-
indices | list of starting indices for each chunk with last element storing past the end index |
◆ border()
template<typename Ind = size_t>
- Returns
- [start, end) indices of the distribution
◆ chunk_borders()
template<typename Ind = size_t>
◆ compatible()
template<typename Ind = size_t>
Checks that other distribution is the same.
◆ cover() [1/2]
template<typename Ind = size_t>
- Returns
- index of chunk containing ind if it is within border or size() otherwise.
- Parameters
-
◆ cover() [2/2]
template<typename Ind = size_t>
Maps first and last index in the array to a pair of chunks encapsulating the corresponding range.
- Parameters
-
lo | first index of range |
hi | past-the-end index of range |
- Returns
- pair of first and last chunk indices encapsulating this range, or size() if range is outside of border()
◆ operator=() [1/2]
template<typename Ind = size_t>
◆ operator=() [2/2]
template<typename Ind = size_t>
◆ range()
template<typename Ind = size_t>
Returns [fist, end) indices for section of array assigned to chunk.
◆ size()
template<typename Ind = size_t>
Number of chunks in the distribution.
◆ swap
template<typename Ind = size_t>
◆ m_chunk_borders
template<typename Ind = size_t>
list of starting indices for each chunk with past the end index as last element. e.g. {|0,1,2,3|,4,5|,6,7,8|9} -> {0,4,6,9,10}