Rheolef  7.2
an efficient C++ finite element environment
Loading...
Searching...
No Matches
distributor

memory distribution table

Description

Given an array size, this class decides which process will own which part of a distributed memory array such as disarray.

Example

    distributor ownership (100);

TODO

Ambiguous use of size() and dis_size(). Here size() refers to n_process(), while size(iproc) and dis_size() refer to the size of the index ranges. Then, size() should be avoided, and we should use n_process() instead.

Implementation

This documentation has been generated from file linalg/lib/distributor.h

class distributor : public Vector<std::allocator<int>::size_type> {
public:
// typedefs:
typedef std::allocator<int>::size_type size_type;
typedef int tag_type;
typedef communicator communicator_type;
// constants:
static const size_type decide = size_type(-1);
// allocators/deallocators:
size_type loc_size = decide);
void resize(
size_type loc_size = decide);
// accessors:
const communicator_type& comm() const;
size_type dis_size () const;
size_type process () const;
size_type n_process () const;
size_type size (size_type iproc) const;
size_type size () const;
bool is_owned (size_type dis_i, size_type iproc) const;
// the same with ip=current process
bool is_owned (size_type dis_i) const;
// comparators:
bool operator== (const distributor&) const;
bool operator!= (const distributor&) const;
};