CoDiPack  2.2.0
A Code Differentiation Package
SciComp TU Kaiserslautern
Loading...
Searching...
No Matches
codi Namespace Reference

CoDiPack - Code Differentiation Package. More...

Namespaces

namespace  AtomicTraits
 Traits for atomic types.
 
namespace  Config
 Configuration options for CoDiPack.
 
namespace  EventHints
 
namespace  ExpressionTraits
 Traits for everything that can be an expression e.g. codi::RealReverse, a + b, etc..
 
namespace  GradientTraits
 
namespace  RealTraits
 Traits for values that can be used as real values e.g. double, float, codi::RealReverse etc..
 
namespace  TapeTraits
 

Classes

struct  ActiveArgumentPointerStore
 Declares all variables that may be needed to store/restore an active argument which has a pointer type. More...
 
struct  ActiveArgumentStoreInterface
 Interface for restored data for an argument. The functions should return a compatible type that can be forwarded to the primal evaluation and the gradient computation. More...
 
struct  ActiveArgumentStoreTraits
 Traits for storing active arguments in byte streams. More...
 
struct  ActiveArgumentValueStore
 Declares all variables that may be needed to store/restore an active argument which has a value type. More...
 
struct  ActiveType
 Represents a concrete lvalue in the CoDiPack expression tree. More...
 
struct  ActiveTypeBase
 Represents the base implementation concrete lvalue in the CoDiPack expression tree. More...
 
struct  ActiveTypeStatelessTape
 Represents a concrete lvalue in the CoDiPack expression tree. More...
 
struct  ActiveTypeWrapper
 Creates a pseudo active type from data references. Can be used to overlay existing data with active types. More...
 
struct  AdjointVectorAccess
 Implementation of VectorAccessInterface for adjoint vectors. More...
 
struct  AggregatedTypeVectorAccessWrapper
 Generalized wrapper of the VectorAccessInterface for aggregated data types, e.g. std::complex<codi::RealReverse>. More...
 
struct  AggregatedTypeVectorAccessWrapperBase
 Implements all methods from AggregatedTypeVectorAccessWrapper, that can be implemented with combinations of other methods. More...
 
struct  AggregatedTypeVectorAccessWrapperFactory
 Factory for the creation of AggregatedTypeVectorAccessWrapper instances. More...
 
struct  Algorithms
 Basic algorithms for tape evaluation in CoDiPack. More...
 
struct  ArrayPosition
 Position with one index for e.g. array access. More...
 
struct  AssignmentOperators
 Implementation of assignment operators for LhsExpressionInterface implementations. More...
 
struct  AtomicInterface
 Provides a data type on which operations are performed atomically. More...
 
struct  BinaryExpression
 Represents an operator with two arguments in the expression tree. More...
 
struct  BinaryOperation
 Interface for implementing the logic for a BinaryExpression. More...
 
struct  BlockData
 Data is stored in one contiguous block in this DataInterface implementation. More...
 
struct  ByteDataView
 
struct  Chunk1
 
struct  Chunk2
 
struct  Chunk3
 
struct  Chunk4
 
struct  ChunkBase
 A chunk stores a contiguous block of data in CoDiPack. More...
 
struct  ChunkedData
 Data is stored chunk-wise in this DataInterface implementation. If a chunk runs out of space, a new chunk is allocated. More...
 
struct  ChunkPosition
 Position with two indices for e.g. chunked data access. More...
 
struct  CODI_UNION< First >
 Creates a union of interface definitions. More...
 
struct  CoDiMpiTypes
 MPI datatype implementation for CoDipack types in the type wrapper of MeDiPack. More...
 
struct  CommonTapeImplementation
 Implementation of all common tape functionality. More...
 
struct  CommonTapeTypes
 Declares all types used in the CommonTapeImplementation. More...
 
struct  CompileTimeLoop
 Compile time loop evaluation. More...
 
struct  CompileTimeLoop< 0 >
 Termination of loop evaluation. More...
 
struct  CompileTimeTraversalLogic
 Traversal of CoDiPack expressions during compile time. More...
 
struct  ConstantDataConversion
 
struct  ConstantExpression
 Represents constant values in the expression tree. More...
 
struct  ConstructStaticContextLogic
 Helper class for the construction of an expression in a different context. More...
 
struct  ConstructVectorImpl
 
struct  ConstructVectorImpl< std::array< T_T, T_n > >
 
struct  CustomAdjointVectorEvaluationTapeInterface
 Allows user defined vectors for the forward and adjoint evaluation. More...
 
struct  CustomAdjointVectorHelper
 Allows for an arbitrary adjoint evaluation of a recorded tape. More...
 
struct  CustomAdjointVectorInterface
 General interface for an arbitrary adjoint evaluation. More...
 
struct  DataInterface
 Data stream interface for tape data. Encapsulates data that is written e.g. for each statement or argument. More...
 
struct  DataManagementTapeInterface
 Provides file IO, information about internal tape vectors and allows to clear tape data. More...
 
struct  DefaultSynchronization
 Default implementation of SynchronizationInterface for serial applications. More...
 
struct  DefaultThreadInformation
 Default implementation of ThreadInformationInterface for serial applications. More...
 
struct  DerivativeAccess
 A helper class for the access of the various derivatives in higher order AD types. More...
 
struct  Direction
 Fixed size vector mode implementation. More...
 
struct  DirectStatementEvaluator
 Full evaluation of the expression in the function handle. Storing in static context. More...
 
struct  DirectStatementEvaluatorStaticStore
 
struct  DummyHessian
 Dummy Hessian. Has size zero and no logic in any call. More...
 
struct  DummyJacobian
 Dummy Jacobian. Has size zero and no logic in any call. More...
 
struct  DummyValue
 Dummy value that can be assigned. More...
 
struct  DummyVector
 Dummy vector that provides a dummy element access and size function. More...
 
struct  DuplicateJacobianRemover
 Combines entries of Jacobians with the same identifier. More...
 
struct  EditingTapeInterface
 Edit tapes after they have been recorded. More...
 
struct  EigenLinearSystem
 
struct  EigenLinearSystemTypes
 Eigen definition for the LinearSystemInterfaceTypes. More...
 
struct  EmptyData
 No data is stored in this DataInterface implementation. It is used to terminate the recursive nature of the DataInterface design. More...
 
struct  EmptyPosition
 Empty Position with no nested data. More...
 
struct  EnumBitset
 A bitset with enum items as flags. More...
 
struct  EnzymeExternalFunctionHelper
 Helper class for the implementation of an external function with Enzyme in CoDiPack. More...
 
struct  EvaluationHandle
 See EvaluationHandleBase. More...
 
struct  EvaluationHandle< T_Func, T_Type, T_InputStore, T_OutputStore, TapeTraits::EnableIfForwardTape< typename T_Type::Tape > >
 See EvaluationHandleForward. More...
 
struct  EvaluationHandle< T_Func, T_Type, T_InputStore, T_OutputStore, TapeTraits::EnableIfJacobianTape< typename T_Type::Tape > >
 See EvaluationHandleReverseJacobianTapes. More...
 
struct  EvaluationHandle< T_Func, T_Type, T_InputStore, T_OutputStore, TapeTraits::EnableIfPrimalValueTape< typename T_Type::Tape > >
 See EvaluationHandleReversePrimalValueTapes. More...
 
struct  EvaluationHandleBase
 Basic interface and data storage for all EvaluationHandle implementations. More...
 
struct  EvaluationHandleForward
 
struct  EvaluationHandleReverseBase
 Implementation for reverse mode CoDiPack types of EvaluationHandleBase. More...
 
struct  EvaluationHandleReverseJacobianTapes
 Implementation for Jacobian reverse mode CoDiPack types of EvaluationHandleBase. More...
 
struct  EvaluationHandleReversePrimalValueTapes
 Implementation of EvaluationHandleBase for primal value reverse mode CoDiPack types. More...
 
struct  EvaluationHelper
 Evaluate the primal, Jacobian and Hessian of function objects. More...
 
struct  EventSystem
 Full EventSystem implementation for reverse tapes. More...
 
struct  EventSystem< ForwardEvaluation< Real, Gradient > >
 Specialization for ForwardEvaluation. More...
 
struct  EventSystemBase
 Base class for the CoDiPack event system. More...
 
struct  ExpressionInterface
 Base class for all CoDiPack expressions. More...
 
struct  ExternalFunction
 User-defined evaluation functions for the taping process. More...
 
struct  ExternalFunctionHelper
 Helper class for the implementation of an external function in CoDiPack. More...
 
struct  ExternalFunctionInternalData
 Internal untyped data for an external function. More...
 
struct  ExternalFunctionLowLevelEntryMapper
 Low level function entry implementation for external functions. More...
 
struct  ExternalFunctionTapeInterface
 Add user defined functions to the tape evaluation. More...
 
struct  ExternalFunctionUserData
 Ease of access structure for user-provided data on the tape for external functions. See ExternalFunctionTapeInterface. More...
 
struct  ExtFunc_matrixMatrixMultiplication
 Low level function generation for matrixMatrixMultiplication. More...
 
struct  FileIo
 Helper structure for writing binary data. More...
 
struct  ForEachLeafLogic
 Implement logic for leaf nodes only. More...
 
struct  ForwardEvaluation
 Implementation of a tape-free forward AD mode through the internal expression interfaces. More...
 
struct  ForwardEvaluationTapeInterface
 Forward AD evaluation of a recorded tape. More...
 
struct  FullTapeInterface
 Full tape interface that supports all features of CoDiPack. More...
 
struct  GradientAccessTapeInterface
 Allow for a direct access to the gradient information computed by the tape. More...
 
struct  Hessian
 Default implementation of the Hessian interface. More...
 
struct  HessianInterface
 General interface for Hessian access in CoDiPack. More...
 
struct  IdentifierInformationTapeInterface
 General information about the identifiers and checks if variables are active. More...
 
struct  ImmutableActiveType
 Creates a pseudo active type from a data value. Can be used to overlay existing data with immutable active types. More...
 
struct  IncrementOperators
 Implementation of increment operators for LhsExpressionInterface implementations. More...
 
struct  IndexManagerInterface
 Indices enable the mapping of primal values to their adjoint counterparts. More...
 
struct  InnerPrimalTapeStatementData
 Additional data required by an InnerStatementEvaluator. More...
 
struct  InnerStatementEvaluator
 Expression evaluation in the inner function. Data loading in the compilation context of the tape. Storing in static context. More...
 
struct  InnerStatementEvaluatorStaticStore
 
struct  InternalAdjointsInterface
 Abstracts the internal set of adjoint variables provided as part of the tape. More...
 
struct  InternalStatementRecordingTapeInterface
 Internal tape interface that is used by active types to trigger the storing of an expression. More...
 
struct  IoException
 IoException for CoDiPack. More...
 
struct  Jacobian
 Default implementation of the Jacobian interface. More...
 
struct  JacobianBaseTape
 Base class for all standard Jacobian tape implementations. More...
 
struct  JacobianComputationLogic
 
struct  JacobianConvertWrapper
 Wrapper for JacboianInterfaces that requires a passive value conversion. More...
 
struct  JacobianCountNonZerosRow
 Adds counting of nonzero entries. More...
 
struct  JacobianDelayAccessor
 
struct  JacobianExpression
 Specialized for NumberOfActiveTypeArguments and NumberOfConstantTypeArguments. More...
 
struct  JacobianInterface
 General interface for Jacobian access in CoDiPack. More...
 
struct  JacobianLinearTape
 Final implementation for a Jacobian tape with a linear index management. More...
 
struct  JacobianReuseTape
 Final implementation for a Jacobian tape with a reuse index management. More...
 
struct  JacobianTapeTypes
 Type definitions for the Jacobian tapes. More...
 
struct  LhsExpressionInterface
 Base class for all CoDiPack lvalue expression. More...
 
struct  LinearIndexManager
 Identifiers are created in a linear fashion. Each assign creates a new index which is counted up. More...
 
struct  LinearSystemInterface
 
struct  LinearSystemInterfaceTypes
 
struct  LinearSystemSolverHandler
 
struct  LinearSystemSpecializationDetection
 
struct  LocalAdjoints
 Adjoint variables owned by a tape instance. More...
 
struct  Lock
 RAII mutex locking. More...
 
struct  LockForRead
 RAII lock for read. ´ More...
 
struct  LockForWrite
 RAII lock for write. More...
 
struct  LowLevelFunctionCreationUtilities
 Helper structure for storing low level functions and their arguments on a tape. More...
 
struct  LowLevelFunctionEntry
 Low level function entry on the tape. See LowLevelFunctionTapeInterface for details. More...
 
struct  LowLevelFunctionTapeInterface
 Add functions with custom derivatives to the tape. Can, e.g, be used to optimize small recurring functions like matrix matrix multiplication. More...
 
struct  ManualStatementPushTapeInterface
 Add derivative information for custom operations to the tape. More...
 
struct  MemberStore
 Defines a member that can either be static or local to the struct. More...
 
struct  MemberStore< T_Type, T_Parent, true >
 Defines a member that can either be static or local to the struct. More...
 
struct  MultiUseIndexManager
 Extends the ReuseIndexManager with a copy optimization. More...
 
struct  MutexInterface
 Abstracts a mutex. More...
 
struct  Namespace
 CoDiPack - Code Differentiation Package.
 
struct  NodeInterface
 Node side interface for the traversal of expressions. More...
 
struct  OpenMPAtomicImpl
 Atomic implementation for OpenMP. More...
 
struct  OpenMPMutex
 Mutex implementation for OpenMP. More...
 
struct  OpenMPStaticThreadLocalPointer
 Static thread-local pointers for OpenMP. More...
 
struct  OpenMPSynchronization
 OpenMP synchronization facilities. More...
 
struct  OpenMPThreadInformation
 Thread information for OpenMP. More...
 
struct  OperationAbs
 UnaryOperation implementation for abs. More...
 
struct  OperationAcos
 UnaryOperation implementation for acos. More...
 
struct  OperationAdd
 BinaryOperation implementation for operator +. More...
 
struct  OperationAsin
 UnaryOperation implementation for asin. More...
 
struct  OperationAtan
 UnaryOperation implementation for atan. More...
 
struct  OperationAtan2
 BinaryOperation implementation for atan2. More...
 
struct  OperationAtanh
 UnaryOperation implementation for atanh. More...
 
struct  OperationCbrt
 UnaryOperation implementation for cbrt. More...
 
struct  OperationCopysign
 BinaryOperation implementation for copysign. More...
 
struct  OperationCos
 UnaryOperation implementation for cos. More...
 
struct  OperationCosh
 UnaryOperation implementation for cosh. More...
 
struct  OperationDivide
 BinaryOperation implementation for operator /. More...
 
struct  OperationErf
 UnaryOperation implementation for erf. More...
 
struct  OperationErfc
 UnaryOperation implementation for erfc. More...
 
struct  OperationExp
 UnaryOperation implementation for exp. More...
 
struct  OperationFmod
 BinaryOperation implementation for fmod. More...
 
struct  OperationFrexp
 BinaryOperation implementation for frexp. More...
 
struct  OperationHypot
 BinaryOperation implementation for hypot. More...
 
struct  OperationLdexp
 BinaryOperation implementation for ldexp. More...
 
struct  OperationLog
 UnaryOperation implementation for log. More...
 
struct  OperationLog10
 UnaryOperation implementation for log10. More...
 
struct  OperationMax
 BinaryOperation implementation for max. More...
 
struct  OperationMin
 BinaryOperation implementation for min. More...
 
struct  OperationMultiply
 BinaryOperation implementation for operator *. More...
 
struct  OperationPow
 BinaryOperation implementation for pow. More...
 
struct  OperationRemainder
 
struct  OperationSin
 UnaryOperation implementation for sin. More...
 
struct  OperationSinh
 UnaryOperation implementation for sinh. More...
 
struct  OperationSqrt
 UnaryOperation implementation for sqrt. More...
 
struct  OperationSubstract
 BinaryOperation implementation for operator -. More...
 
struct  OperationTan
 UnaryOperation implementation for tan. More...
 
struct  OperationTanh
 UnaryOperation implementation for tanh. More...
 
struct  OperationTgamma
 UnaryOperation implementation for tgamma. More...
 
struct  OperationUnaryMinus
 UnaryOperation implementation for operator -. More...
 
struct  ParallelActiveType
 Represents a concrete lvalue in the CoDiPack expression tree. More...
 
struct  ParallelReuseIndexManager
 Reuse index manager with a one-to-one relation between tapes and index manager. More...
 
struct  ParallelToolbox
 Collects parallel programming facilties required to make CoDiPack applicable in a shared memory parallel environment. More...
 
struct  PassiveArgumentStoreTraits
 Traits for storing passive arguments in byte streams. More...
 
struct  PointerStore
 Inserts data pointers at the back of all arguments in the nested call hierarchy. More...
 
struct  PointerStore< Chunk1< T_Data1 > >
 Pointer store for Chunk1 data. More...
 
struct  PointerStore< Chunk2< T_Data1, T_Data2 > >
 Pointer store for Chunk2 data. More...
 
struct  PointerStore< Chunk3< T_Data1, T_Data2, T_Data3 > >
 Pointer store for Chunk3 data. More...
 
struct  PointerStore< Chunk4< T_Data1, T_Data2, T_Data3, T_Data4 > >
 Pointer store for Chunk4 data. More...
 
struct  PositionalEvaluationTapeInterface
 Reverse AD evaluation for parts of a recorded tape. More...
 
struct  PreaccumulationEvaluationTapeInterface
 Perform tape evaluations but ensure that the state prior to evaluation equals the state after evaluation. More...
 
struct  PreaccumulationHelper
 Stores the Jacobian matrix for a code section. More...
 
struct  PrimalAdjointVectorAccess
 Implementation of VectorAccessInterface for adjoint and primal vectors. More...
 
struct  PrimalEvaluationTapeInterface
 Perform a primal reevaluation of the tape. More...
 
struct  PrimalTapeStatementFunctions
 Data required for all possible handle calls. More...
 
struct  PrimalValueBaseTape
 Base class for all standard Primal value tape implementations. More...
 
struct  PrimalValueLinearTape
 Final implementation for a primal value tape with a linear index management. More...
 
struct  PrimalValueReuseTape
 Final implementation for a primal value tape with a reuse index management. More...
 
struct  PrimalValueTapeTypes
 Type definitions for the primal value tapes. More...
 
struct  ReadWriteMutex
 Mutex construct that distinguishes between lock for read and lock for write. More...
 
struct  ReferenceActiveType
 Holds a reference to an ActiveType for manual optimization of common arguments. More...
 
struct  ReuseIndexManager
 Reuse index manager with a many-to-one relation between tapes and index manager. More...
 
struct  ReuseIndexManagerBase
 Identifiers are reused. Freed identifiers are assigned to new variables. Variables keep their indices as long as they are active. More...
 
struct  ReverseStatementEvaluator
 Only stores the function handle for the reverse evaluation. More...
 
struct  ReverseTapeInterface
 Minimum tape interface for a working reverse tape implementation. More...
 
struct  SparseEigenLinearSystem
 
struct  StatementEvaluatorInnerTapeInterface
 Tape side interface for StatementEvaluatorInterface. More...
 
struct  StatementEvaluatorInterface
 Creation of handles for the evaluation of expressions in a context where the expression type is not available. More...
 
struct  StatementEvaluatorTapeInterface
 Tape side interface for StatementEvaluatorInterface. More...
 
struct  StatementPushHelper
 Add statements to the tape where the Jacobians are computed manually. More...
 
struct  StatementPushHelperBase
 Base class for manual statement pushes on the tape. More...
 
struct  StaticContextActiveType
 Replacement type of LhsExpressionInterface types in ConstructStaticContext. More...
 
struct  StaticDummy
 Static dummy objects for e.g. default reference arguments. More...
 
struct  StaticThreadLocalPointerInterface
 Abstracts a static thread-local pointer. More...
 
struct  SynchronizationInterface
 Provides basic synchronization facilities. More...
 
struct  TagData
 Data for a tag. More...
 
struct  TagTapeBase
 Base implementation for tagging tapes. More...
 
struct  TagTapeForward
 Tape for tagging variables and find errors in the AD workflow. More...
 
struct  TagTapeReverse
 Tape for tagging variables and find errors in the AD workflow. More...
 
struct  TapeHelper
 See TapeHelperBase. More...
 
struct  TapeHelperBase
 A helper class that allows for a simpler access and management of a CoDiPack tape. More...
 
struct  TapeHelperJacobi
 
struct  TapeHelperNoImpl
 
struct  TapeHelperPrimal
 
struct  TapeTypesInterface
 Interface for the definition of tape types. More...
 
struct  TapeValues
 Tape information that can be printed in a pretty print format or a table format. More...
 
struct  TemporaryMemory
 Allocator for temporary used memory. More...
 
struct  TerminatingPointerStore
 
struct  ThreadInformationInterface
 Provides information on threads. More...
 
struct  ThreadSafeGlobalAdjoints
 Provides global adjoint variables owned by a tape type. Thread-safe for use in parallel taping. More...
 
struct  TraversalLogic
 Traversal of CoDiPack expressions. More...
 
struct  UnaryExpression
 Represents an operator with one argument in the expression tree. More...
 
struct  UnaryOperation
 Interface for implementing the logic for a UnaryExpression. More...
 
struct  ValidationIndicator
 Helper class for statement validation. More...
 
struct  VectorAccessInterface
 Unified access to the adjoint vector and primal vector in a tape evaluation. More...
 
struct  Warning
 

Typedefs

template<typename Chunk , typename NestedData = EmptyData>
using DefaultBlockData = BlockData< Chunk, NestedData >
 BlockData DataInterface used in all unchecked tapes.
 
template<typename Chunk , typename NestedData = EmptyData>
using DefaultChunkedData = ChunkedData< Chunk, NestedData >
 ChunkData DataInterface used in all regular tapes.
 
template<typename Base , typename Impl , typename R = void>
using enable_if_base_of = std::enable_if< std::is_base_of< Base, Impl >::value, R >
 Enable if abbreviation for std::is_base_of.
 
template<typename T1 , typename T2 , typename R = void>
using enable_if_not_same = std::enable_if<!std::is_same< T1, T2 >::value, R >
 Enable if abbreviation for "!std::is_same".
 
template<typename T1 , typename T2 , typename R = void>
using enable_if_same = std::enable_if< std::is_same< T1, T2 >::value, R >
 Enable if abbreviation for "std::is_same".
 
using HessianComputationScalarType = RealReversePrimalIndexGen< RealForward >
 A regular CoDiPack type that can be used for Hessian computations in the TapeHelper.
 
using HessianComputationType = RealReversePrimalIndexGen< RealForwardVec< 4 >, Direction< RealForwardVec< 4 >, 4 > >
 A regular CoDiPack type that can be used for Hessian computations in the TapeHelper.
 
using JacobianComputationScalarType = RealReverseIndex
 A regular CoDiPack type that can be used for Jacobian computations in the TapeHelper.
 
using JacobianComputationType = RealReverseIndexVec< 4 >
 A regular CoDiPack type that can be used for Jacobian computations in the TapeHelper.
 
using LinearSystemSolverHints = EnumBitset< LinearSystemSolverFlags >
 All hints for the LinearSystemSolverHelper.
 
template<typename T , Eigen::StorageOptions store>
using MapEigenMatrix = Eigen::Map< Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic, store > >
 Abbreviation for a mapped Eigen matrix.
 
template<typename T , Eigen::StorageOptions store>
using MapEigenMatrixConst = Eigen::Map< Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic, store > const >
 Abbreviation for a constant mapped Eigen matrix.
 
template<typename T >
using MapEigenVector = Eigen::Map< Eigen::Matrix< T, Eigen::Dynamic, 1 > >
 Abbreviation for a mapped Eigen vector.
 
template<typename T >
using MapEigenVectorConst = Eigen::Map< Eigen::Matrix< T, Eigen::Dynamic, 1 > const >
 Abbreviation for a constant mapped Eigen vector.
 
template<typename Type >
using OpenMPAtomic = OpenMPAtomicImpl< Type >
 
template<typename Type >
using OpenMPExternalFunctionHelper = ExternalFunctionHelper< Type, OpenMPSynchronization, OpenMPThreadInformation >
 Thread-safe external function helper for external functions jointly worked on by multiple OpenMP threads.
 
template<typename Gradient , typename Identifier , typename Tape >
using OpenMPGlobalAdjoints = ThreadSafeGlobalAdjoints< Gradient, Identifier, Tape, OpenMPToolbox >
 Thread-safe global adjoints for OpenMP.
 
using OpenMPToolbox = ParallelToolbox< OpenMPThreadInformation, OpenMPAtomic, OpenMPMutex, OpenMPStaticThreadLocalPointer, OpenMPSynchronization >
 Parallel toolbox for OpenMP.
 
using RealForward = RealForwardGen< double, double >
 
using RealForwardCUDA = RealForwardCUDAGen< double, double >
 Forward AD type for CUDA kernels. See Forward AD Equation for a forward mode AD explanation.
 
template<typename Real , typename Gradient = Real>
using RealForwardCUDAGen = ActiveTypeStatelessTape< ForwardEvaluation< Real, Gradient > >
 Forward AD type for CUDA kernels. See Forward AD Equation for a forward mode AD explanation.
 
template<size_t dim>
using RealForwardCUDAVec = RealForwardCUDAGen< double, Direction< double, dim > >
 Vector forward AD type for CUDA kernels. See Forward AD Equation for a forward mode AD explanation.
 
template<typename Real , typename Gradient = Real>
using RealForwardGen = ActiveType< ForwardEvaluation< Real, Gradient > >
 
using RealForwardTag = ActiveType< TagTapeForward< double, int > >
 
template<size_t dim>
using RealForwardVec = RealForwardGen< double, Direction< double, dim > >
 
using RealReverse = RealReverseGen< double >
 
template<typename Real , typename Gradient = Real, typename Index = int>
using RealReverseGen = ActiveType< JacobianLinearTape< JacobianTapeTypes< Real, Gradient, LinearIndexManager< Index >, DefaultChunkedData > > >
 
using RealReverseIndex = RealReverseIndexGen< double >
 
template<typename Real , typename Gradient = Real, typename IndexManager = MultiUseIndexManager<int>>
using RealReverseIndexGen = ActiveType< JacobianReuseTape< JacobianTapeTypes< Real, Gradient, IndexManager, DefaultChunkedData > > >
 
using RealReverseIndexOpenMP = RealReverseIndexOpenMPGen< double >
 


 
template<typename Real , typename Gradient = OpenMPAtomic<Real>, typename IndexManager = ParallelReuseIndexManager<int, OpenMPToolbox>>
using RealReverseIndexOpenMPGen = ParallelActiveType< JacobianReuseTape< JacobianTapeTypes< Real, Gradient, IndexManager, DefaultChunkedData, OpenMPGlobalAdjoints > >, OpenMPToolbox >
 


 
using RealReverseIndexUnchecked = RealReverseIndexUncheckedGen< double >
 
template<typename Real , typename Gradient = Real, typename IndexManager = MultiUseIndexManager<int>>
using RealReverseIndexUncheckedGen = ActiveType< JacobianReuseTape< JacobianTapeTypes< Real, Gradient, IndexManager, DefaultChunkedData > > >
 
template<size_t dim>
using RealReverseIndexVec = RealReverseIndexGen< double, Direction< double, dim > >
 
template<size_t dim>
using RealReverseIndexVecOpenMP = RealReverseIndexOpenMPGen< double, Direction< OpenMPAtomic< double >, dim > >
 


 
using RealReversePrimal = RealReversePrimalGen< double >
 
template<typename Real , typename Gradient = Real, typename Index = int, template< typename > class StatementEvaluator = InnerStatementEvaluator>
using RealReversePrimalGen = ActiveType< PrimalValueLinearTape< PrimalValueTapeTypes< Real, Gradient, LinearIndexManager< Index >, StatementEvaluator, DefaultChunkedData > > >
 
using RealReversePrimalIndex = RealReversePrimalIndexGen< double >
 
template<typename Real , typename Gradient = Real, typename IndexManager = MultiUseIndexManager<int>, template< typename > class StatementEvaluator = InnerStatementEvaluator>
using RealReversePrimalIndexGen = ActiveType< PrimalValueReuseTape< PrimalValueTapeTypes< Real, Gradient, IndexManager, StatementEvaluator, DefaultChunkedData > > >
 
using RealReversePrimalIndexUnchecked = RealReversePrimalIndexUncheckedGen< double >
 
template<typename Real , typename Gradient = Real, typename IndexManager = MultiUseIndexManager<int>, template< typename > class StatementEvaluator = InnerStatementEvaluator>
using RealReversePrimalIndexUncheckedGen = ActiveType< PrimalValueReuseTape< PrimalValueTapeTypes< Real, Gradient, IndexManager, StatementEvaluator, DefaultChunkedData > > >
 
template<size_t dim>
using RealReversePrimalIndexVec = RealReversePrimalIndexGen< double, Direction< double, dim > >
 
using RealReversePrimalUnchecked = RealReversePrimalUncheckedGen< double >
 
template<typename Real , typename Gradient = Real, typename Index = int, template< typename > class StatementEvaluator = InnerStatementEvaluator>
using RealReversePrimalUncheckedGen = ActiveType< PrimalValueLinearTape< PrimalValueTapeTypes< Real, Gradient, LinearIndexManager< Index >, StatementEvaluator, DefaultChunkedData > > >
 
template<size_t dim>
using RealReversePrimalVec = RealReversePrimalGen< double, Direction< double, dim > >
 
using RealReverseTag = ActiveType< TagTapeReverse< double, int > >
 
using RealReverseUnchecked = RealReverseUncheckedGen< double >
 
template<typename Real , typename Gradient = Real, typename Index = int>
using RealReverseUncheckedGen = ActiveType< JacobianLinearTape< JacobianTapeTypes< Real, Gradient, LinearIndexManager< Index >, DefaultBlockData > > >
 
template<size_t dim>
using RealReverseVec = RealReverseGen< double, Direction< double, dim > >
 
using RestoreActions = EnumBitset< RestoreAction >
 Action set for a variable during a store. See Restore actions for a detailed description.
 
using StoreActions = EnumBitset< StoreAction >
 Action set for a variable during a store. See Store actions for a detailed description.
 

Enumerations

enum class  AdjointsManagement { Manual , Automatic }
 Policies for management of the tape's interal adjoints. More...
 
enum class  EnumInterface { MaxElement }
 Default interface for enums.
 
enum struct  IoError { Mode , Open , Write , Read }
 Possible IO errors.
 
enum class  LinearSystemSolverFlags {
  ReverseEvaluation = 0 , ForwardEvaluation , PrimalEvaluation , ProvidePrimalSolution ,
  RecomputePrimalInForwardEvaluation , MaxElement
}
 Flags for the linear system solver. See LinearSystemInterface for a description of the flags.
 
enum class  LowLevelFunctionEntryCallKind {
  Forward , Reverse , Primal , Delete ,
  MaxElement
}
 All possible call types for a low level function entry.
 
enum class  RestoreAction {
  PrimalCreate , PrimalRestore , InputIdentifierRestore , OutputIdentifierRestore ,
  InputGradientCreate , OutputGradientCreate , MaxElement
}
 Action flags for activities during a restore. See Restore actions for a detailed description.
 
enum class  StoreAction {
  PrimalCreateOnTape , PrimalExtract , InputIdentifierCreateAndStore , OutputIdentifierCreate ,
  MaxElement
}
 Action flags for activities during a store. See Store actions for a detailed description.
 
enum class  TagFlags { DoNotChange , DoNotWrite , DoNotUse , MaxElement }
 Properties for values. More...
 
enum class  TapeParameters {
  AdjointSize , ConstantValuesSize , ExternalFunctionsSize , JacobianSize ,
  LargestIdentifier , PassiveValuesSize , PrimalSize , RhsIdentifiersSize ,
  StatementSize , LLFInfoDataSize , LLFByteDataSize
}
 Configuration options for a tape. More...
 

Functions

size_t constexpr binomial (size_t n, size_t k)
 Binomial coefficient computation.
 
void checkAndOutputAssert (bool const condition, char const *conditionString, char const *function, char const *file, int line)
 Checks the assert statement and aborts the program if the statement is false.
 
template<typename... Args>
void CODI_UNUSED (Args const &...)
 Disable unused warnings for an arbitrary number of arguments.
 
template<typename V >
constructVector (size_t const size)
 Helper for the construction of vector types provided by the user.
 
template<typename IntegralType >
IntegralType getNextMultiple (IntegralType const &targetSize, IntegralType const &chunkSize)
 Helper function for overallocation in multiples of a given chunk size.
 
template<Eigen::StorageOptions store, typename T >
MapEigenMatrix< T, store > mapEigen (T *p, int rows, int cols)
 Create a mapped Eigen matrix with specified storing option.
 
template<typename T >
MapEigenVector< T > mapEigen (T *p, int size)
 Create a mapped Eigen vector.
 
template<Eigen::StorageOptions store, typename T >
MapEigenMatrixConst< T, store > mapEigen (T const *p, int rows, int cols)
 Create a mapped Eigen matrix with specified storing option.
 
template<typename T >
MapEigenVectorConst< T > mapEigen (T const *p, int size)
 Create a constant mapped Eigen vector.
 
template<typename T >
MapEigenMatrix< T, Eigen::StorageOptions::ColMajor > mapEigenColMajor (T *p, int rows, int cols)
 Create a mapped Eigen matrix with a column major data layout.
 
template<typename T >
MapEigenMatrixConst< T, Eigen::StorageOptions::ColMajor > mapEigenColMajor (T const *p, int rows, int cols)
 Create a constant mapped Eigen matrix with a column major data layout.
 
template<typename T >
MapEigenMatrix< T, Eigen::StorageOptions::RowMajor > mapEigenRowMajor (T *p, int rows, int cols)
 Create a mapped Eigen matrix with a row major data layout.
 
template<typename T >
MapEigenMatrixConst< T, Eigen::StorageOptions::RowMajor > mapEigenRowMajor (T const *p, int rows, int cols)
 Create a constant mapped Eigen matrix with a row major data layout.
 
template<Eigen::StorageOptions eigenStore, typename Type >
void matrixMatrixMultiplication (Type const *A, Type const *B, Type *R, int n, int k, int m)
 
template<typename Type >
void matrixMatrixMultiplicationColMajor (Type const *A, Type const *B, Type *R, int n, int k, int m)
 
template<typename Type >
void matrixMatrixMultiplicationRowMajor (Type const *A, Type const *B, Type *R, int n, int k, int m)
 
template<typename A , typename Real , size_t dim>
bool operator!= (A const &s, Direction< Real, dim > const &v)
 Component-wise test for inequality with scalar. True if at least one component differs.
 
template<typename A , typename Real , size_t dim>
bool operator!= (Direction< Real, dim > const &v, A const &s)
 Component-wise test for inequality with scalar. True if at least one component differs.
 
template<typename Real , size_t dim>
bool operator!= (Direction< Real, dim > const &v1, Direction< Real, dim > const &v2)
 Component-wise test for inequality. True if at least one component differs.
 
template<typename Enum >
bool operator!= (Enum a, EnumBitset< Enum > const &b)
 Not equal comparison for an enum and a bitset.
 
template<typename Tag >
bool operator!= (TagData< Tag > const &a, TagData< Tag > const &b)
 Not equal comparison of two tag data objects.
 
template<typename Enum >
EnumBitset< Enum > operator& (Enum a, EnumBitset< Enum > const &b)
 And operation of the bitset and an enum.
 
template<typename Enum >
EnumBitset< Enum > operator& (EnumBitset< Enum > const &a, Enum b)
 And operation of the bitset and an enum.
 
template<typename Enum >
EnumBitset< Enum > operator& (EnumBitset< Enum > const &a, EnumBitset< Enum > const &b)
 And operation of two bitsets.
 
template<typename Real , size_t dim, typename = AtomicTraits::EnableIfAtomic<Real>>
Direction< Real, dim > operator* (AtomicTraits::RemoveAtomic< Real > const &s, Direction< Real, dim > const &v)
 Multiplication of a non-atomic scalar with a direction that has atomic reals.
 
template<typename Real , size_t dim, typename = AtomicTraits::EnableIfAtomic<Real>>
Direction< Real, dim > operator* (Direction< Real, dim > const &v, AtomicTraits::RemoveAtomic< Real > const &s)
 Multiplication of a non-atomic scalar with a direction that has atomic reals.
 
template<typename Real , size_t dim>
Direction< Real, dim > operator* (Direction< Real, dim > const &v, Real const &s)
 Multiplication with a scalar.
 
template<typename Real , size_t dim, typename = RealTraits::EnableIfNotPassiveReal<Real>>
Direction< Real, dim > operator* (Direction< Real, dim > const &v, RealTraits::PassiveReal< Real > const &s)
 Multiplication with passive a scalar.
 
template<typename Real , size_t dim>
Direction< Real, dim > operator* (Real const &s, Direction< Real, dim > const &v)
 Multiplication with a scalar.
 
template<typename Real , size_t dim, typename = RealTraits::EnableIfNotPassiveReal<Real>>
Direction< Real, dim > operator* (RealTraits::PassiveReal< Real > const &s, Direction< Real, dim > const &v)
 Multiplication with a passive scalar.
 
template<typename Real , size_t dim>
Direction< Real, dim > operator+ (Direction< Real, dim > const &v1, Direction< Real, dim > const &v2)
 Summation of two vectors.
 
template<typename Real , size_t dim>
Direction< Real, dim > operator- (Direction< Real, dim > const &v)
 Negation.
 
template<typename Real , size_t dim>
Direction< Real, dim > operator- (Direction< Real, dim > const &v1, Direction< Real, dim > const &v2)
 Subtraction of two vectors.
 
template<typename Real , size_t dim, typename = AtomicTraits::EnableIfAtomic<Real>>
Direction< Real, dim > operator/ (Direction< Real, dim > const &v, AtomicTraits::RemoveAtomic< Real > const &s)
 Division of a direction with atomic reals by a non-atomic scalar.
 
template<typename Real , size_t dim>
Direction< Real, dim > operator/ (Direction< Real, dim > const &v, Real const &s)
 Division by a scalar.
 
template<typename Real , size_t dim, typename = RealTraits::EnableIfNotPassiveReal<Real>>
Direction< Real, dim > operator/ (Direction< Real, dim > const &v, RealTraits::PassiveReal< Real > const &s)
 Division by a passive scalar.
 
template<typename Out , typename Enum >
Out & operator<< (Out &out, EnumBitset< Enum > const &b)
 Stream output.
 
template<typename Real , size_t dim>
std::ostream & operator<< (std::ostream &os, Direction< Real, dim > const &v)
 Output stream operator.
 
template<typename Expr >
ExpressionTraits::EnableIfExpression< Expr, std::ostream > & operator<< (std::ostream &out, Expr const &v)
 Write the primal value to the stream.
 
template<typename Stream , typename Jac , typename = enable_if_base_of<Jac, JacobianInterface<typename Jac::T>>>
Stream & operator<< (Stream &out, Jac const &jacobian)
 Output a Jacobian on the data stream.
 
template<typename A , typename Real , size_t dim>
bool operator== (A const &s, Direction< Real, dim > const &v)
 Component-wise test for equality with scalar. True if all components match.
 
template<typename A , typename Real , size_t dim>
bool operator== (Direction< Real, dim > const &v, A const &s)
 Component-wise test for equality with scalar. True if all components match.
 
template<typename Real , size_t dim>
bool operator== (Direction< Real, dim > const &v1, Direction< Real, dim > const &v2)
 Component-wise test for equality. True if all components match.
 
template<typename Enum >
bool operator== (Enum a, EnumBitset< Enum > const &b)
 Equal comparison for an enum and a bitset.
 
template<typename Tag >
bool operator== (TagData< Tag > const &a, TagData< Tag > const &b)
 Equal comparison of two tag data objects.
 
template<typename Expr >
ExpressionTraits::EnableIfLhsExpression< Expr, std::istream > & operator>> (std::istream &stream, Expr &v)
 Read the primal value from a stream.
 
template<typename Enum >
EnumBitset< Enum > operator| (Enum a, EnumBitset< Enum > const &b)
 Or operation of the bitset and an enum.
 
template<typename Enum >
EnumBitset< Enum > operator| (EnumBitset< Enum > const &a, Enum b)
 Or operation of the bitset and an enum.
 
template<typename Enum >
EnumBitset< Enum > operator| (EnumBitset< Enum > const &a, EnumBitset< Enum > const &b)
 Or operation of two bitsets.
 
LinearSystemSolverHints operator| (LinearSystemSolverFlags a, LinearSystemSolverFlags b)
 Return a hints structure when to enums are ored.
 
void outputExceptionOrWarning (char const function[], char const file[], int const line, bool warning, char const *message,...)
 Prints the positions and the message of the exception.
 
template<typename LSInterface >
void solveLinearSystem (LSInterface lsi, typename LSInterface::Matrix &A, typename LSInterface::Vector &b, typename LSInterface::Vector &x, LinearSystemSolverHints hints=LinearSystemSolverHints::ALL())
 
template<typename T >
T const toConst (T &&v)
 Constant cast function that works with CUDA.
 
template<typename T >
T const & toConst (T &v)
 Constant cast function that works with CUDA.
 
Additional standard library binary operators

/‍*******************************************************************************‍/

template<typename Real , typename Gradient , typename Tape , typename Impl >
void swap (LhsExpressionInterface< Real, Gradient, Tape, Impl > &lhs, LhsExpressionInterface< Real, Gradient, Tape, Impl > &rhs)
 Optimized swap for lhs expressions that does not call the copy constructor.
 
Builtin unary operators
template<typename Real , typename Arg >
ExpressionInterface< Real, Arg > const & operator+ (ExpressionInterface< Real, Arg > const &arg)
 Function overload for operator +.
 
Standard math library unary operators
template<typename Real , typename Arg >
RealTraits::PassiveReal< Realceil (ExpressionInterface< Real, Arg > const &arg)
 Function overload for ceil.
 
template<typename Real , typename Arg >
RealTraits::PassiveReal< Realceilf (ExpressionInterface< Real, Arg > const &arg)
 Function overload for ceilf.
 
template<typename Real , typename Arg >
RealTraits::PassiveReal< Realceill (ExpressionInterface< Real, Arg > const &arg)
 Function overload for ceill.
 
template<typename Real , typename Arg >
RealTraits::PassiveReal< Realfloor (ExpressionInterface< Real, Arg > const &arg)
 Function overload for floor.
 
template<typename Real , typename Arg >
RealTraits::PassiveReal< Realfloorf (ExpressionInterface< Real, Arg > const &arg)
 Function overload for floorf.
 
template<typename Real , typename Arg >
RealTraits::PassiveReal< Realfloorl (ExpressionInterface< Real, Arg > const &arg)
 Function overload for floorl.
 
template<typename Real , typename Arg >
bool isfinite (ExpressionInterface< Real, Arg > const &arg)
 Function overload for isfinite.
 
template<typename Real , typename Arg >
bool isinf (ExpressionInterface< Real, Arg > const &arg)
 Function overload for isinf.
 
template<typename Real , typename Arg >
bool isnan (ExpressionInterface< Real, Arg > const &arg)
 Function overload for isnan.
 
template<typename Real , typename Arg >
bool isnormal (ExpressionInterface< Real, Arg > const &arg)
 Function overload for isnormal.
 
template<typename Real , typename Arg >
RealTraits::PassiveReal< Realround (ExpressionInterface< Real, Arg > const &arg)
 Function overload for round.
 
template<typename Real , typename Arg >
RealTraits::PassiveReal< Realroundf (ExpressionInterface< Real, Arg > const &arg)
 Function overload for roundf.
 
template<typename Real , typename Arg >
RealTraits::PassiveReal< Realroundl (ExpressionInterface< Real, Arg > const &arg)
 Function overload for roundl.
 
Additional standard library unary operators
template<typename Real , typename Arg >
std::string to_string (ExpressionInterface< Real, Arg > const &arg)
 Function overload for to_string.
 

Detailed Description

Typedef Documentation

◆ HessianComputationScalarType

A regular CoDiPack type that can be used for Hessian computations in the TapeHelper.

This is the scalar version which does not use a vector mode.

◆ JacobianComputationScalarType

A regular CoDiPack type that can be used for Jacobian computations in the TapeHelper.

This is the scalar version which does not use a vector mode.

◆ OpenMPAtomic

template<typename Type >
using codi::OpenMPAtomic = typedef OpenMPAtomicImpl<Type>

Wrapper for atomics for OpenMP.

Template Parameters
TypeAn arithmetic type or CoDiPack forward type.

◆ RealForward

using codi::RealForward = typedef RealForwardGen<double, double>

Default forward AD type. See Forward AD Equation for a forward mode AD explanation or Active type definitions for a list of all types.

◆ RealForwardGen

template<typename Real , typename Gradient = Real>
using codi::RealForwardGen = typedef ActiveType<ForwardEvaluation<Real, Gradient> >

General forward AD type. See Forward AD Equation for a forward mode AD explanation or Active type definitions for a list of all types.

◆ RealForwardTag

using codi::RealForwardTag = typedef ActiveType<TagTapeForward<double, int> >

Type for checking errors of the application with respect to other CoDiPack types. Resembles a CoDiPack forward type.

◆ RealForwardVec

template<size_t dim>
using codi::RealForwardVec = typedef RealForwardGen<double, Direction<double, dim> >

General vector forward AD type. See Forward AD Equation for a forward mode AD explanation or Active type definitions for a list of all types.

◆ RealReverse

using codi::RealReverse = typedef RealReverseGen<double>

General reverse AD type. See Reverse AD Equation for a reverse mode AD explanation or Active type definitions for a list of all types.

Jacobian taping approach with linear index handling.

◆ RealReverseGen

template<typename Real , typename Gradient = Real, typename Index = int>
using codi::RealReverseGen = typedef ActiveType<JacobianLinearTape<JacobianTapeTypes<Real, Gradient, LinearIndexManager<Index>, DefaultChunkedData> >>

General reverse AD type. See Reverse AD Equation for a reverse mode AD explanation or Active type definitions for a list of all types.

Jacobian taping approach with linear index handling.

◆ RealReverseIndex

General reverse AD type. See Reverse AD Equation for a reverse mode AD explanation or Active type definitions for a list of all types.

Jacobian taping approach with reuse index handling.

◆ RealReverseIndexGen

template<typename Real , typename Gradient = Real, typename IndexManager = MultiUseIndexManager<int>>
using codi::RealReverseIndexGen = typedef ActiveType<JacobianReuseTape<JacobianTapeTypes<Real, Gradient, IndexManager, DefaultChunkedData> >>

General reverse AD type. See Reverse AD Equation for a reverse mode AD explanation or Active type definitions for a list of all types.

Jacobian taping approach with reuse index handling.

◆ RealReverseIndexOpenMP



General reverse AD type. See Reverse AD Equation for a reverse mode AD explanation or Active type definitions for a list of all types.

Jacobian taping approach with reuse index handling.

This a thread-safe implementation for use with OpenMP. See Example 23 - OpenMP Parallel Codes for an example.

◆ RealReverseIndexOpenMPGen

template<typename Real , typename Gradient = OpenMPAtomic<Real>, typename IndexManager = ParallelReuseIndexManager<int, OpenMPToolbox>>
using codi::RealReverseIndexOpenMPGen = typedef ParallelActiveType< JacobianReuseTape<JacobianTapeTypes<Real, Gradient, IndexManager, DefaultChunkedData, OpenMPGlobalAdjoints> >, OpenMPToolbox>



General reverse AD type. See Reverse AD Equation for a reverse mode AD explanation or Active type definitions for a list of all types.

Jacobian taping approach with reuse index handling.

This a thread-safe implementation for use with OpenMP. See Example 23 - OpenMP Parallel Codes for an example.

◆ RealReverseIndexUnchecked

General unchecked reverse AD type. See Reverse AD Equation for a reverse mode AD explanation or Active type definitions for a list of all types.

Requires preallocation of data. See DataManagementTapeInterface.

Jacobian taping approach with reuse index handling.

◆ RealReverseIndexUncheckedGen

template<typename Real , typename Gradient = Real, typename IndexManager = MultiUseIndexManager<int>>
using codi::RealReverseIndexUncheckedGen = typedef ActiveType<JacobianReuseTape<JacobianTapeTypes<Real, Gradient, IndexManager, DefaultChunkedData> >>

General unchecked reverse AD type. See Reverse AD Equation for a reverse mode AD explanation or Active type definitions for a list of all types.

Requires preallocation of data. See DataManagementTapeInterface.

Jacobian taping approach with reuse index handling.

◆ RealReverseIndexVec

template<size_t dim>
using codi::RealReverseIndexVec = typedef RealReverseIndexGen<double, Direction<double, dim> >

General reverse AD type. See Reverse AD Equation for a reverse mode AD explanation or Active type definitions for a list of all types.

Jacobian taping approach with reuse index handling.

◆ RealReverseIndexVecOpenMP

template<size_t dim>
using codi::RealReverseIndexVecOpenMP = typedef RealReverseIndexOpenMPGen<double, Direction<OpenMPAtomic<double>, dim> >



General reverse AD type. See Reverse AD Equation for a reverse mode AD explanation or Active type definitions for a list of all types.

Jacobian taping approach with reuse index handling.

This a thread-safe implementation for use with OpenMP. See Example 23 - OpenMP Parallel Codes for an example.

◆ RealReversePrimal

General reverse AD type. See Reverse AD Equation for a reverse mode AD explanation or Active type definitions for a list of all types.

Primal value taping approach with linear index handling.

◆ RealReversePrimalGen

template<typename Real , typename Gradient = Real, typename Index = int, template< typename > class StatementEvaluator = InnerStatementEvaluator>
using codi::RealReversePrimalGen = typedef ActiveType<PrimalValueLinearTape< PrimalValueTapeTypes<Real, Gradient, LinearIndexManager<Index>, StatementEvaluator, DefaultChunkedData> >>

General reverse AD type. See Reverse AD Equation for a reverse mode AD explanation or Active type definitions for a list of all types.

Primal value taping approach with linear index handling.

◆ RealReversePrimalIndex

General reverse AD type. See Reverse AD Equation for a reverse mode AD explanation or Active type definitions for a list of all types.

Primal value taping approach with reuse index handling.

◆ RealReversePrimalIndexGen

template<typename Real , typename Gradient = Real, typename IndexManager = MultiUseIndexManager<int>, template< typename > class StatementEvaluator = InnerStatementEvaluator>
using codi::RealReversePrimalIndexGen = typedef ActiveType< PrimalValueReuseTape<PrimalValueTapeTypes<Real, Gradient, IndexManager, StatementEvaluator, DefaultChunkedData> >>

General reverse AD type. See Reverse AD Equation for a reverse mode AD explanation or Active type definitions for a list of all types.

Primal value taping approach with reuse index handling.

◆ RealReversePrimalIndexUnchecked

General unchecked reverse AD type. See Reverse AD Equation for a reverse mode AD explanation or Active type definitions for a list of all types.

Requires preallocation of data. See DataManagementTapeInterface.

Primal value taping approach with reuse index handling.

◆ RealReversePrimalIndexUncheckedGen

template<typename Real , typename Gradient = Real, typename IndexManager = MultiUseIndexManager<int>, template< typename > class StatementEvaluator = InnerStatementEvaluator>
using codi::RealReversePrimalIndexUncheckedGen = typedef ActiveType< PrimalValueReuseTape<PrimalValueTapeTypes<Real, Gradient, IndexManager, StatementEvaluator, DefaultChunkedData> >>

General unchecked reverse AD type. See Reverse AD Equation for a reverse mode AD explanation or Active type definitions for a list of all types.

Requires preallocation of data. See DataManagementTapeInterface.

Primal value taping approach with reuse index handling.

◆ RealReversePrimalIndexVec

template<size_t dim>
using codi::RealReversePrimalIndexVec = typedef RealReversePrimalIndexGen<double, Direction<double, dim> >

General reverse AD type. See Reverse AD Equation for a reverse mode AD explanation or Active type definitions for a list of all types.

Primal value taping approach with reuse index handling.

◆ RealReversePrimalUnchecked

General unchecked reverse AD type. See Reverse AD Equation for a reverse mode AD explanation or Active type definitions for a list of all types.

Requires preallocation of data. See DataManagementTapeInterface.

Primal value taping approach with linear index handling.

◆ RealReversePrimalUncheckedGen

template<typename Real , typename Gradient = Real, typename Index = int, template< typename > class StatementEvaluator = InnerStatementEvaluator>
using codi::RealReversePrimalUncheckedGen = typedef ActiveType<PrimalValueLinearTape< PrimalValueTapeTypes<Real, Gradient, LinearIndexManager<Index>, StatementEvaluator, DefaultChunkedData> >>

General unchecked reverse AD type. See Reverse AD Equation for a reverse mode AD explanation or Active type definitions for a list of all types.

Requires preallocation of data. See DataManagementTapeInterface.

Primal value taping approach with linear index handling.

◆ RealReversePrimalVec

template<size_t dim>
using codi::RealReversePrimalVec = typedef RealReversePrimalGen<double, Direction<double, dim> >

General reverse AD type. See Reverse AD Equation for a reverse mode AD explanation or Active type definitions for a list of all types.

Primal value taping approach with linear index handling.

◆ RealReverseTag

using codi::RealReverseTag = typedef ActiveType<TagTapeReverse<double, int> >

Type for checking errors of the application with respect to other CoDiPack types. Resembles a CoDiPack reverse type.

◆ RealReverseUnchecked

General unchecked reverse AD type. See Reverse AD Equation for a reverse mode AD explanation or Active type definitions for a list of all types.

Requires preallocation of data. See DataManagementTapeInterface.

Jacobian taping approach with linear index handling.

◆ RealReverseUncheckedGen

template<typename Real , typename Gradient = Real, typename Index = int>
using codi::RealReverseUncheckedGen = typedef ActiveType<JacobianLinearTape<JacobianTapeTypes<Real, Gradient, LinearIndexManager<Index>, DefaultBlockData> >>

General unchecked reverse AD type. See Reverse AD Equation for a reverse mode AD explanation or Active type definitions for a list of all types.

Requires preallocation of data. See DataManagementTapeInterface.

Jacobian taping approach with linear index handling.

◆ RealReverseVec

template<size_t dim>
using codi::RealReverseVec = typedef RealReverseGen<double, Direction<double, dim> >

General reverse AD type. See Reverse AD Equation for a reverse mode AD explanation or Active type definitions for a list of all types.

Jacobian taping approach with linear index handling.

Enumeration Type Documentation

◆ AdjointsManagement

enum class codi::AdjointsManagement
strong

Policies for management of the tape's interal adjoints.

For the convenience of the user, tapes manage their internal adjoints automatically, which involves multiple tasks. AdjointsManagement::Manual indicates that non of these tasks is performed - they are the responsibility of the caller instead. Functions that take an AdjointsManagement parameter default to AdjointsManagement::Automatic and document the individual effects of AdjointsManagement::Manual. An overview over all possible effects is given below.

Bounds checking. The function accesses the adjoints. In the automatic mode, it checks whether the adjoints are sufficiently large. If they are not, they might be resized or the function might work on or return dummy values. To optimize the memory usage and/or reduce the number of reallocations, AdjointsManagement::Manual can be used to skip bounds checking and resizing. It is the responsibility of the caller to ensure sufficient adjoints size, for example by calls to DataManagementTapeInterface::resizeAdjointVector.

Declaration of adjoints usage (locking). If a tape implements it adjoints against InternalAdjointsInterface, it keeps track of whether the adjoint vector is in use, which is for example the case during tape evaluations. This is to ensure mutual exclusion with reallocations, this is particularly important in shared-memory parallel taping, see also ThreadSafeGlobalAdjoints. Declaration of usage involves setting a lock, which can become a bottleneck if it is done frequently. To optimize the performance, multiple operations can be grouped into a single usage declaration, by surrounding them by manual DataManagementTapeInterface::beginUseAdjoints and DataManagementTapeInterface::endUseAdjoints calls and invoking them with AdjointsManagement::Manual. Note that any method that results in adjoint vector resizing must be called outside usage declarations, otherwise there would be a deadlock.

Enumerator
Manual 

Do not perform any bounds checking, locking, or resizing.

Automatic 

Manage internal adjoints automatically, including locking, bounds checking, and resizing.

◆ TagFlags

enum class codi::TagFlags
strong

Properties for values.

Enumerator
DoNotChange 

DoNotChange: Value can be assigned, but it should not change.

DoNotWrite 

DoNotWrite: Value can not be assigned.

DoNotUse 

DoNotUse: Value should not be used. That is, it should not be used on the right hand side of an assignment. (Is removed after the value has been overwritten.)

MaxElement 

Maximum number of elements.

◆ TapeParameters

enum class codi::TapeParameters
strong

Configuration options for a tape.

See DataManagementTapeInterface for details.

Access is defined by [A: "access"]. Options are:

  • R read only access (getParameter)
  • W write only access (setParameter)
  • RW read and write access (getParameter and setParameters)
Enumerator
AdjointSize 

[A: RW] Current number of adjoint vector entries, not the maximum possible size. See LargestIdentifier.

ConstantValuesSize 

[A: RW] Allocated number of entries in the constant value vector in primal value tapes.

ExternalFunctionsSize 

[A: RW] (Deprecated, will be removed on 31.12.2024) Allocated number of entries in the external function vector.

JacobianSize 

[A: RW] Allocated number of entries in the argument Jacobian vector in Jacobian tapes.

LargestIdentifier 

[A: R] Largest identifier distributed by the index manger.

PassiveValuesSize 

[A: RW] Allocated number of entries in the passive value vector in primal value tapes.

PrimalSize 

[A: RW] Number of primal vector entries in primal value tapes.

RhsIdentifiersSize 

[A: RW] Allocated number of entries in the right hand side identifiers vector in primal value tapes.

StatementSize 

[A: RW] Allocated number of entries in the statement vector in all tapes.

LLFInfoDataSize 

[A: RW] Allocated number of entries in the low level function info vector in all tapes.

LLFByteDataSize 

[A: RW] Allocated number of entries in the the byte data vecotor of low level functions in all tapes.

Function Documentation

◆ binomial()

size_t constexpr codi::binomial ( size_t  n,
size_t  k 
)
inlineconstexpr

Binomial coefficient computation.

Recursive implementation of

\[
 \binom{n}{k} = \frac{n!}{k!(n-k)!} = \binom{n-1}{k} + \binom{n-1}{k-1}
\]

Parameters
[in]nNumber of choices.
[in]kNumber of draws.
Returns
Binomial coefficient.

◆ checkAndOutputAssert()

void codi::checkAndOutputAssert ( bool const  condition,
char const *  conditionString,
char const *  function,
char const *  file,
int  line 
)
inline

Checks the assert statement and aborts the program if the statement is false.

The method prints an error message that contains the failed expression, the function name, the file, and the line. This method is usually accessed via the codiAssert macro, see codi::Config::EnableAssert.

Parameters
[in]conditionThe evaluated value of the condition.
[in]conditionStringThe condition as a string value.
[in]functionThe name of the function that caused the assert.
[in]fileThe file were the function is defined.
[in]lineThe line in the file were the assert is defined.

◆ getNextMultiple()

template<typename IntegralType >
IntegralType codi::getNextMultiple ( IntegralType const &  targetSize,
IntegralType const &  chunkSize 
)

Helper function for overallocation in multiples of a given chunk size.

Template Parameters
IntegralTypeAn integral type, usually size_t.
Parameters
targetSizeMinimum returned size.
chunkSizeReturned size is a multiple of chunkSize.
Returns
Next multiple of chunkSize larger or equal to targetSize.

◆ matrixMatrixMultiplication()

template<Eigen::StorageOptions eigenStore, typename Type >
void codi::matrixMatrixMultiplication ( Type const *  A,
Type const *  B,
Type *  R,
int  n,
int  k,
int  m 
)

Low level function for $R = A * B$ with

  • $ R \in \R^{n \times m} $
  • $ A \in \R^{n \times k} $
  • $ B \in \R^{k \times m} $
Template Parameters
eigenStoreOne of Eigen::StorageOptions.

◆ matrixMatrixMultiplicationColMajor()

template<typename Type >
void codi::matrixMatrixMultiplicationColMajor ( Type const *  A,
Type const *  B,
Type *  R,
int  n,
int  k,
int  m 
)

Low level function for $R = A * B$ with

  • $ R \in \R^{n \times m} $
  • $ A \in \R^{n \times k} $
  • $ B \in \R^{k \times m} $

◆ matrixMatrixMultiplicationRowMajor()

template<typename Type >
void codi::matrixMatrixMultiplicationRowMajor ( Type const *  A,
Type const *  B,
Type *  R,
int  n,
int  k,
int  m 
)

Low level function for $R = A * B$ with

  • $ R \in \R^{n \times m} $
  • $ A \in \R^{n \times k} $
  • $ B \in \R^{k \times m} $

◆ operator<<()

template<typename Stream , typename Jac , typename = enable_if_base_of<Jac, JacobianInterface<typename Jac::T>>>
Stream & codi::operator<< ( Stream &  out,
Jac const &  jacobian 
)

Output a Jacobian on the data stream.

The format is (Matlab): [1, 2, 3; 4, 5, 6; 7, 8, 8]

◆ outputExceptionOrWarning()

void codi::outputExceptionOrWarning ( char const  function[],
char const  file[],
int const  line,
bool  warning,
char const *  message,
  ... 
)
inline

Prints the positions and the message of the exception.

The position and function where the exceptions occurred are printed. The message will be handled and formatted by a printf like function.

Parameters
[in]functionName of the function from which the exception is generated.
[in]fileFile where the exception was generated.
[in]lineLine inside the file where the exception was generated.
[in]warningIf this is a warning or an exception.
[in]messageThe exception message and the arguments for the formatting in the message.

◆ solveLinearSystem()

template<typename LSInterface >
void codi::solveLinearSystem ( LSInterface  lsi,
typename LSInterface::Matrix &  A,
typename LSInterface::Vector &  b,
typename LSInterface::Vector &  x,
LinearSystemSolverHints  hints = LinearSystemSolverHints::ALL() 
)

Solve Ax=b and add an external function to the tape such that the appropriate AD modes are also solved.

Parameters
lsiThe implementation of LinearSystemInterface which defines the linear system solution algorithm.
AThe matrix.
bThe right hand side.
xThe solution.
hintsHints for the AD algorithm. See function description.