Class template Dune::XT::Common::UnsafePerThreadValue¶
Inherits from boost::noncopyable.
-
template<class ValueImp>
class Dune::XT::Common::UnsafePerThreadValue<ValueImp> : public boost::noncopyable¶ 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.
Method Dune::XT::Common::UnsafePerThreadValue::operator=¶
-
template<class ValueImp>
ThisType &Dune::XT::Common::UnsafePerThreadValue<ValueImp>::operator=(ConstValueType &&value)¶ No documentation provided.
Method Dune::XT::Common::UnsafePerThreadValue::operator*¶
-
template<class ValueImp>
ValueType &Dune::XT::Common::UnsafePerThreadValue<ValueImp>::operator*()¶ No documentation provided.
Method Dune::XT::Common::UnsafePerThreadValue::operator*¶
-
template<class ValueImp>
ConstValueType &Dune::XT::Common::UnsafePerThreadValue<ValueImp>::operator*() const¶ No documentation provided.
Method Dune::XT::Common::UnsafePerThreadValue::operator->¶
-
template<class ValueImp>
ValueType *Dune::XT::Common::UnsafePerThreadValue<ValueImp>::operator->()¶ No documentation provided.
Method Dune::XT::Common::UnsafePerThreadValue::operator->¶
-
template<class ValueImp>
ConstValueType *Dune::XT::Common::UnsafePerThreadValue<ValueImp>::operator->() const¶ No documentation provided.
Method Dune::XT::Common::UnsafePerThreadValue::get_pointer¶
-
template<class ValueImp>
auto &Dune::XT::Common::UnsafePerThreadValue<ValueImp>::get_pointer()¶ No documentation provided.
Method Dune::XT::Common::UnsafePerThreadValue::sum¶
-
template<class ValueImp>
ValueType Dune::XT::Common::UnsafePerThreadValue<ValueImp>::sum() const¶ No documentation provided.
Method Dune::XT::Common::UnsafePerThreadValue::begin¶
-
template<class ValueImp>
int Dune::XT::Common::UnsafePerThreadValue<ValueImp>::begin()¶ No documentation provided.
Method Dune::XT::Common::UnsafePerThreadValue::end¶
-
template<class ValueImp>
int Dune::XT::Common::UnsafePerThreadValue<ValueImp>::end()¶ No documentation provided.
Method Dune::XT::Common::UnsafePerThreadValue::begin¶
-
template<class ValueImp>
int Dune::XT::Common::UnsafePerThreadValue<ValueImp>::begin() const¶ No documentation provided.
Method Dune::XT::Common::UnsafePerThreadValue::end¶
-
template<class ValueImp>
int Dune::XT::Common::UnsafePerThreadValue<ValueImp>::end() const¶ No documentation provided.
Constructor Dune::XT::Common::UnsafePerThreadValue::UnsafePerThreadValue<ValueImp>¶
Field Dune::XT::Common::UnsafePerThreadValue::values_¶
-
int Dune::XT::Common::UnsafePerThreadValue::values_¶
No documentation provided.
Type alias Dune::XT::Common::UnsafePerThreadValue::ValueType¶
-
type Dune::XT::Common::UnsafePerThreadValue::ValueType¶
No documentation provided.
Type alias Dune::XT::Common::UnsafePerThreadValue::ConstValueType¶
-
type Dune::XT::Common::UnsafePerThreadValue::ConstValueType¶
No documentation provided.
Type alias Dune::XT::Common::UnsafePerThreadValue::ThisType¶
-
type Dune::XT::Common::UnsafePerThreadValue::ThisType¶
No documentation provided.
Function template Dune::XT::Common::UnsafePerThreadValue::UnsafePerThreadValue<ValueImp>¶
-
template<class ValueImp>
template<class ...InitTypes, typename>
explicit Dune::XT::Common::UnsafePerThreadValue<ValueImp>::UnsafePerThreadValue<ValueImp>(InitTypes&&... ctor_args)¶ Initialization by in-place construction ValueType with
:param ctor_args:
Function template Dune::XT::Common::UnsafePerThreadValue::accumulate¶
-
template<class ValueImp>
template<class BinaryOperation>
ValueType Dune::XT::Common::UnsafePerThreadValue<ValueImp>::accumulate(ValueType init, BinaryOperation op) const¶ No documentation provided.