1 #ifndef CNTR_DISTRIBUTED_ARRAY_DECL_H 2 #define CNTR_DISTRIBUTED_ARRAY_DECL_H 45 T*
data(
void)
const {
return data_;}
46 int n(
void)
const {
return n_;}
50 int maxlen(
void)
const {
return maxlen_;}
51 std::vector<int>
tid_map(
void)
const {
return tid_map_;}
52 int tid(
void)
const {
return tid_;}
53 int ntasks(
void)
const {
return ntasks_;}
62 #else // CNTR_USE_MPI==1 67 #endif // CNTR_USE_MPI 73 std::vector<int> tid_map_;
std::vector< int > tid_map(void) const
int firstblock_rank(void)
Return first blocks on rank.
void clear(void)
Clear all data
void mpi_bcast_block(int j)
MPI broadcast of j-th block
distributed_array & operator=(const distributed_array &g)
T * block(int j)
Returns the pointer to block j.
Auxiliary data structure for handling set of data blocks and includes usual MPI processes on them...
void mpi_bcast_all(void)
MPI Allgather equivalent for the distributed array
int numblock_rank(void)
Return number of blocks on rank.
int blocksize(void) const
bool rank_owns(int k) const
void reset_blocksize(int blocksize)
Reset the block size for each block.
void mpi_send_block(int j, int dest)
Sends the j-th block to the MPI rank dest