DUNE-FEM (unstable)

Dune::Fem::ThreadSafeValue< T > Class Template Reference

ThreadSafeValue realizes thread safety for a given variable by creating an instance of this variable for each thread. More...

#include <dune/fem/misc/threads/threadsafevalue.hh>

Public Types

typedef T ValueType
 type of value to be thread safe
 

Public Member Functions

template<class ... Args>
 ThreadSafeValue (Args &&...args)
 constructor initializing values for all threads given a init value
 
 ThreadSafeValue ()
 default constructor
 
size_t size () const
 return number of threads
 
ValueTypeoperator* ()
 return reference to thread private value
 
const ValueTypeoperator* () const
 return reference to thread private value
 
ValueTypeoperator[] (const unsigned int thread)
 return reference to private value for given thread number
 
const ValueTypeoperator[] (const unsigned int thread) const
 return reference to private value for given thread number
 

Detailed Description

template<class T>
class Dune::Fem::ThreadSafeValue< T >

ThreadSafeValue realizes thread safety for a given variable by creating an instance of this variable for each thread.


The documentation for this class was generated from the following file:
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Jul 27, 22:29, 2024)