Class template Dune::XT::Common::UnsafePerThreadValue<ValueImp>¶
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.
To do
Either fix TimingData and remove this class or fix this class.
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 type-parameter-0-0¶
operator ValueType() 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::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>
typename ContainerType::iterator Dune::XT::Common::UnsafePerThreadValue<ValueImp>::begin()¶ No documentation provided.
Method Dune::XT::Common::UnsafePerThreadValue::end¶
-
template<class ValueImp>
typename ContainerType::iterator Dune::XT::Common::UnsafePerThreadValue<ValueImp>::end()¶ No documentation provided.
Method Dune::XT::Common::UnsafePerThreadValue::begin¶
-
template<class ValueImp>
typename ContainerType::const_iterator Dune::XT::Common::UnsafePerThreadValue<ValueImp>::begin() const¶ No documentation provided.
Method Dune::XT::Common::UnsafePerThreadValue::end¶
-
template<class ValueImp>
typename ContainerType::const_iterator Dune::XT::Common::UnsafePerThreadValue<ValueImp>::end() const¶ No documentation provided.
Constructor Dune::XT::Common::UnsafePerThreadValue::UnsafePerThreadValue¶
-
template<class ValueImp>
explicit Dune::XT::Common::UnsafePerThreadValue<ValueImp>::UnsafePerThreadValue(ConstValueType &value)¶ Initialization by copy construction of ValueType
Field Dune::XT::Common::UnsafePerThreadValue::values_¶
-
template<class ValueImp>
ContainerType Dune::XT::Common::UnsafePerThreadValue<ValueImp>::values_¶ No documentation provided.
Type alias Dune::XT::Common::UnsafePerThreadValue::ValueType¶
-
template<class ValueImp>
using Dune::XT::Common::UnsafePerThreadValue<ValueImp>::ValueType = ValueImp¶ No documentation provided.
Type alias Dune::XT::Common::UnsafePerThreadValue::ConstValueType¶
Type alias Dune::XT::Common::UnsafePerThreadValue::ThisType¶
-
template<class ValueImp>
using Dune::XT::Common::UnsafePerThreadValue<ValueImp>::ThisType = UnsafePerThreadValue<ValueImp>¶ No documentation provided.
Type alias Dune::XT::Common::UnsafePerThreadValue::ContainerType¶
-
template<class ValueImp>
using Dune::XT::Common::UnsafePerThreadValue<ValueImp>::ContainerType = std::deque<std::unique_ptr<ValueType>>¶ No documentation provided.
Function template Dune::XT::Common::UnsafePerThreadValue::UnsafePerThreadValue¶
-
template<class ValueImp>
template<class ...InitTypes, typename = require_not_self_t<UnsafePerThreadValue<ValueImp>, InitTypes...>>
explicit Dune::XT::Common::UnsafePerThreadValue<ValueImp>::UnsafePerThreadValue(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.