dune-fem  2.4.1-rc
Public Types | Public Member Functions | List of all members
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 </local/tomalk/somewhere/tmp/dune-fem/dune/fem/misc/threads/threadsafevalue.hh>

Inheritance diagram for Dune::Fem::ThreadSafeValue< T >:
Inheritance graph

Public Types

typedef T ValueType
 type of value to be thread safe More...
 

Public Member Functions

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

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.

Member Typedef Documentation

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

type of value to be thread safe

Constructor & Destructor Documentation

template<class T>
template<class... Args>
Dune::Fem::ThreadSafeValue< T >::ThreadSafeValue ( Args &&...  args)
inline

constructor initializing values for all threads given a init value

template<class T>
Dune::Fem::ThreadSafeValue< T >::ThreadSafeValue ( )
inline

default constructor

Member Function Documentation

template<class T>
Dune::Fem::ThreadSafeValue< T >::operator const ValueType & ( ) const
inline
template<class T>
Dune::Fem::ThreadSafeValue< T >::operator ValueType & ( )
inline
template<class T>
ValueType& Dune::Fem::ThreadSafeValue< T >::operator* ( )
inline

return reference to thread private value

template<class T>
const ValueType& Dune::Fem::ThreadSafeValue< T >::operator* ( ) const
inline

return reference to thread private value

template<class T>
ValueType& Dune::Fem::ThreadSafeValue< T >::operator[] ( const unsigned int  thread)
inline
template<class T>
const ValueType& Dune::Fem::ThreadSafeValue< T >::operator[] ( const unsigned int  thread) const
inline

return reference to private value for given thread number

template<class T>
size_t Dune::Fem::ThreadSafeValue< T >::size ( ) const
inline

The documentation for this class was generated from the following file: