26 #ifndef TILEDARRAY_PMAP_BLOCKED_PMAP_H__INCLUDED 27 #define TILEDARRAY_PMAP_BLOCKED_PMAP_H__INCLUDED 52 const size_type block_size_plus_1_times_remainder_;
67 block_size_plus_1_(block_size_ + 1),
68 block_size_plus_1_times_remainder_(remainder_ * block_size_plus_1_),
72 local_.reserve(local_last_ - local_first_);
76 for(
size_type first = local_first_; first < local_last_; ++first) {
90 return (tile < block_size_plus_1_times_remainder_ ?
91 tile / block_size_plus_1_ :
92 ((tile - block_size_plus_1_times_remainder_) / block_size_) + remainder_);
101 return ((tile >= local_first_) && (tile < local_last_));
109 #endif // TILEDARRAY_PMAP_BLOCKED_PMAP_H__INCLUDED size_type size() const
Size accessor.
decltype(auto) min(const Tile< Arg > &arg)
Minimum element of a tile.
const size_type procs_
The number of processes.
const size_type rank_
The rank of this process.
virtual bool is_local(const size_type tile) const
Check that the tile is owned by this process.
virtual size_type owner(const size_type tile) const
Maps tile to the processor that owns it.
Pmap::size_type size_type
Key type.
const size_type size_
The number of tiles mapped among all processes.
std::size_t size_type
Size type.
std::vector< size_type > local_
A list of local tiles.
BlockedPmap(World &world, size_type size)
Construct Blocked map.