![]() |
Shamrock 2025.10.0
Astrophysical Code
|
A parallel generator that will spit the same sequence regardless of the number of ranks. More...
#include <shamalgs/include/shamalgs/collective/InvariantParallelGenerator.hpp>
Public Member Functions | |
| InvariantParallelGenerator (Engine eng, u64 nval_max=u64_max) | |
| InvariantParallelGenerator (u64 seed, u64 nval_max=u64_max) | |
| std::vector< u64 > | next_n (u64 val_count, bool sequential=false) |
Generate the next val_count values. | |
| bool | is_done () |
| quite explicit isn't it ? | |
| bool | all_ranks_are_in_sync () |
| check if all ranks have the same generator state | |
A parallel generator that will spit the same sequence regardless of the number of ranks.
Definition at line 28 of file InvariantParallelGenerator.hpp.
|
inline |
Definition at line 94 of file InvariantParallelGenerator.hpp.
|
inline |
Definition at line 101 of file InvariantParallelGenerator.hpp.
|
inline |
check if all ranks have the same generator state
Definition at line 132 of file InvariantParallelGenerator.hpp.
Here is the call graph for this function:
|
inline |
quite explicit isn't it ?
Definition at line 129 of file InvariantParallelGenerator.hpp.
|
inline |
Generate the next val_count values.
| val_count | the number of values to generate |
| sequential | if true, the values are generated sequentially on all ranks, otherwise in parallel on all ranks |
If sequential is true, the values are generated sequentially on all ranks. If sequential is false, the values are generated in parallel on all ranks.
Definition at line 119 of file InvariantParallelGenerator.hpp.