Class template Dune::XT::Common::UnsafePerThreadValue¶
-
template<class ValueImp>
class Dune::XT::Common::UnsafePerThreadValue¶ Previous implementation of PerThreadValue. This implementation suffers from the fact that it is not possible (or at least we did not find a way yet) to set a hard upper limit on the number of threads TBB uses. Setting max_threads via tbb::global_control apparently only sets a soft limit on the number of threads. In addition, even if TBB uses only N threads at a time, it might be possible that a thread is destroyed and later in the program another thread with a different id replaces it, which will then get a number greater than or equal to N in our implementation (see ThreadManager::thread()). This occasionally leads to segfaults. We keep this implementation around as it is currently used by TimingData (see dune/xt/common/timings.hh) and the new implementation can’t replace it in that context, as the new implementation based on tbb::enumerable_thread_specific lazily initalizes the values in each thread.
-
ThisType &Dune::XT::Common::UnsafePerThreadValue::operator=(ConstValueType &&value)¶
No documentation provided.
-
ValueType &Dune::XT::Common::UnsafePerThreadValue::operator*()¶
No documentation provided.
-
ConstValueType &Dune::XT::Common::UnsafePerThreadValue::operator*() const¶
No documentation provided.
-
ValueType *Dune::XT::Common::UnsafePerThreadValue::operator->()¶
No documentation provided.
-
ConstValueType *Dune::XT::Common::UnsafePerThreadValue::operator->() const¶
No documentation provided.
-
auto &Dune::XT::Common::UnsafePerThreadValue::get_pointer()¶
No documentation provided.
-
ValueType Dune::XT::Common::UnsafePerThreadValue::sum() const¶
No documentation provided.
-
int Dune::XT::Common::UnsafePerThreadValue::begin()¶
No documentation provided.
-
int Dune::XT::Common::UnsafePerThreadValue::end()¶
No documentation provided.
-
int Dune::XT::Common::UnsafePerThreadValue::begin() const¶
No documentation provided.
-
int Dune::XT::Common::UnsafePerThreadValue::end() const¶
No documentation provided.
-
template<>
explicit Dune::XT::Common::UnsafePerThreadValue::UnsafePerThreadValue<ValueImp>(ConstValueType &value)¶ Initialization by copy construction of ValueType
-
int Dune::XT::Common::UnsafePerThreadValue::values_¶
No documentation provided.
-
type Dune::XT::Common::UnsafePerThreadValue::ValueType¶
No documentation provided.
-
type Dune::XT::Common::UnsafePerThreadValue::ConstValueType¶
No documentation provided.
-
type Dune::XT::Common::UnsafePerThreadValue::ThisType¶
No documentation provided.
-
template<class ...InitTypes, typename>
explicit Dune::XT::Common::UnsafePerThreadValue::UnsafePerThreadValue<ValueImp>(InitTypes&&... ctor_args)¶ Initialization by in-place construction ValueType with
:param ctor_args:
-
template<class BinaryOperation>
ValueType Dune::XT::Common::UnsafePerThreadValue::accumulate(ValueType init, BinaryOperation op) const¶ No documentation provided.