![]() |
fpmas 1.4
|
#include <random.h>


Public Member Functions | |
| DistributedIndex (const Index< int > &index) | |
| DistributedIndex (Index< int > &&index) | |
| DistributedIndex & | operator= (const Index< int > &index) |
| DistributedIndex & | operator= (Index< int > &&index) |
Public Member Functions inherited from fpmas::random::Index< int > | |
| Index (const std::map< int, std::size_t > &item_counts, int key, std::size_t offset) | |
| Index (const Index< int > &index) | |
| Index (Index< int > &&index) | |
| Index< int > & | operator= (const Index< int > &index) |
| Index< int > & | operator= (Index< int > &&index) |
| int | key () const |
| std::size_t | offset () const |
| Index & | operator++ () |
| Index | operator++ (int) |
| Index | operator+ (std::size_t n) const |
| bool | operator== (const Index &index) const |
| bool | operator!= (const Index &index) const |
| bool | operator< (const Index &index) const |
Static Public Member Functions | |
| static DistributedIndex | begin (const std::vector< std::size_t > &item_counts) |
| static DistributedIndex | end (const std::vector< std::size_t > &item_counts) |
Static Public Member Functions inherited from fpmas::random::Index< int > | |
| static Index | begin (const std::map< int, std::size_t > &item_counts) |
| static Index | end (const std::map< int, std::size_t > &item_counts) |
| static std::size_t | distance (const Index &i1, const Index &i2) |
Represents a continuous index distributed across processes.
A distributed index is represented as a (process, local_offset) pair. Processes are indexed from 0 to p-1. Each process is assigned to a given number of items n_p.
The sequence of values iterated by the index is as all processes items were iterated in a single sequence, from process 0 to p-1:
The interest of this structure is that local offsets associated to a process p can for exemple be used as indexes in a vector hosted by the process p.
|
inline |
Builds a distributed index from the corresponding Index.
|
inline |
Builds a distributed index from the corresponding Index.
|
inline |
Assigns the specified Index to this DistributedIndex.
|
inline |
Assigns the specified Index to this DistributedIndex.
|
static |
Begin of the distributed index associated to item_counts, i.e. (p0, 0) where p0 is the first process that owns at least one item.
|
static |
End of the distributed index associated to item_counts, i.e. (p, 0).