CoDiPack  2.2.0
A Code Differentiation Package
SciComp TU Kaiserslautern
Loading...
Searching...
No Matches
codi::AtomicInterface< T_Type, T_Impl > Struct Template Reference

Provides a data type on which operations are performed atomically. More...

#include <atomicInterface.hpp>

Inheritance diagram for codi::AtomicInterface< T_Type, T_Impl >:

Public Types

using Impl = T_Impl
 See AtomicInterface.
 
using Type = T_Type
 See AtomicInterface.
 

Public Member Functions

 AtomicInterface ()
 Constructor.
 
 AtomicInterface (AtomicInterface const &)
 Constructor.
 
 AtomicInterface (Type const &)
 Constructor.
 
 operator Type () const
 Implicit cast to underlying type for rhs access.
 
Type operator++ ()
 Pre-increment operator.
 
Type operator++ (int)
 Post-increment operator.
 
Type operator+= (Impl const &other)
 Incremental update with implementing type as rhs.
 
Type operator+= (Type const &other)
 Incremental update with underlying type as rhs.
 
Type operator-- ()
 Pre-decrement operator.
 
Type operator-- (int)
 Post-decrement operator.
 
Imploperator= (Impl const &other)
 Assignment operator with implementing type as rhs.
 
Imploperator= (Type const &other)
 Assignment operator with underlying type as rhs.
 
 ~AtomicInterface ()
 Destructor.
 

Detailed Description

template<typename T_Type, typename T_Impl>
struct codi::AtomicInterface< T_Type, T_Impl >

Provides a data type on which operations are performed atomically.

If used with an underlying floating point type or an active CoDiPack type, this data type is suitable as an adjoint variable type. Provides also increment and decrement operators for the use case of an underlying integer type. The increment and decrement operators don't have to be implemented for underlying non-integer types.

Implementations likely require template specializations with respect to the underlying type, especially if it is an active CoDiPack type.

Template Parameters
T_TypeThe underlying data type.
T_ImplImplementing class.

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