23#ifndef PER_THREAD_BOOL_INDICATOR_H
24#define PER_THREAD_BOOL_INDICATOR_H
143 void initialize(
const size_t num_threads,
const bool status );
A wrapper class for an integer that is only allowed to take the values 0 and 1.
Definition per_thread_bool_indicator.h:46
static constexpr std::uint_fast64_t true_uint64
Definition per_thread_bool_indicator.h:61
void logical_and(const bool status)
Definition per_thread_bool_indicator.h:92
std::uint_fast64_t status_
Definition per_thread_bool_indicator.h:63
bool is_false() const
Definition per_thread_bool_indicator.h:74
void set_true()
Definition per_thread_bool_indicator.h:80
BoolIndicatorUInt64()
Definition per_thread_bool_indicator.cpp:32
void set_false()
Definition per_thread_bool_indicator.h:86
static constexpr std::uint_fast64_t false_uint64
Definition per_thread_bool_indicator.h:62
bool is_true() const
Definition per_thread_bool_indicator.h:68
A thread-safe vector to keep track of the status across threads, for example during gather operations...
Definition per_thread_bool_indicator.h:104
bool all_false() const
Waits for all threads and returns whether all elements are false.
Definition per_thread_bool_indicator.cpp:66
void set_false(const size_t tid)
Definition per_thread_bool_indicator.h:121
std::vector< BoolIndicatorUInt64 > per_thread_status_
Definition per_thread_bool_indicator.h:166
bool all_true() const
Waits for all threads and returns whether all elements are true.
Definition per_thread_bool_indicator.cpp:82
int size_
Definition per_thread_bool_indicator.h:167
std::atomic< int > are_true_
Number of per-thread indicators currently true.
Definition per_thread_bool_indicator.h:175
BoolIndicatorUInt64 & operator[](const size_t tid)
Definition per_thread_bool_indicator.cpp:43
PerThreadBoolIndicator()
Definition per_thread_bool_indicator.h:106
bool any_true() const
Waits for all threads and returns whether any elements are true.
Definition per_thread_bool_indicator.cpp:105
void initialize(const size_t num_threads, const bool status)
Resize to the given number of threads and set all elements to false.
Definition per_thread_bool_indicator.cpp:49
void set_true(const size_t tid)
Definition per_thread_bool_indicator.h:111
void logical_and(const size_t tid, const bool status)
Definition per_thread_bool_indicator.h:131
bool any_false() const
Waits for all threads and returns whether any elements are false.
Definition per_thread_bool_indicator.cpp:93
Namespace for the NEST simulation kernel.
Definition beta_normalization_factor.h:33