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

Configuration options for CoDiPack. More...

Variables

General compiler attributes.
bool constexpr HasCpp20 = __cplusplus >= 202002L
 If CoDiPack is compiled with C++20.
 
Compile time flags
bool constexpr CheckExpressionArguments = false
 Check for invalid arguments to expressions like division by zero.
 
const bool CheckEmptyStatements = true
 Tapes push statements only if at least one Jacobian was pushed.
 
bool constexpr CheckJacobianIsZero = true
 Ignore Jacobians that are zero in Jacobian based tapes.
 
bool constexpr CheckTapeActivity = true
 Makes it possible to ignore certain code parts. If turned of everything will be recorded.
 
bool constexpr CheckZeroIndex = true
 Ignore active types that are not dependent on any input value in Jacobian tapes.
 
bool constexpr CopyOptimization = true
 Do not store copy statements like a = b; if the identity handler allows it.
 
bool constexpr ImplicitConversion = false
 
bool constexpr ImplicitConversionWarning = true
 Warn about implicit conversions in the code.
 
bool constexpr ImplicitTagConversion = false
 Enables the implicit conversion of tag data to its tag.
 
bool constexpr IgnoreIntelNoInlineWarning = false
 Disables warnings of the sort: warning #2196: routine is both "inline" and "noinline".
 
bool constexpr RemoveDuplicateJacobianArguments = 0
 Extra pass in Jacobian tapes that combines arguments with the same identifier.
 
bool constexpr IgnoreInvalidJacobians = false
 Ignore invalid Jacobians like NaN or Inf.
 
bool constexpr OverflowCheck = true
 Check in the index manager if an overflow occurred.
 
bool constexpr SkipZeroAdjointEvaluation = true
 Do not perform a reverse evaluation of a statement if the seeding adjoint is zero.
 
bool constexpr SortIndicesOnReset = true
 Reuse index tapes will sort their indices on a reset.
 
bool constexpr VariableAdjointInterfaceInPrimalTapes = 0
 Allow custom adjoint vector in primal values tapes.
 
bool constexpr ReversalZeroesAdjoints = true
 With a linear index management, control if adjoints are set to zero during reversal.
 
Event system
bool constexpr ADWorkflowEvents = true
 Enable AD workflow events, also known as Tape* events. Enabled by default.
 
bool constexpr PreaccEvents = false
 Enable preaccumulation events. Disabled by default.
 
bool constexpr StatementEvents = false
 Enable statement events. Disabled by default.
 
bool constexpr IndexEvents = false
 Enable index management events. Disabled by default.
 
Relations to other libraries
bool constexpr EnableEigen = 1
 Enable Eigen specific implementations.
 
bool constexpr EnableEnzyme = false
 Add Enzyme specific functionality.
 
bool constexpr EnableMPI = false
 Add MPI and MeDiPack specific headers.
 
bool constexpr EnableOpenMP = false
 Add OpenMP specific headers.
 
bool constexpr EnableOpDiLib = false
 Add OpDiLib specific headers. Requires codi::Config::EnableOpenMP == true.
 
Macro definitions
bool constexpr AnnotateBranchLikelihood = __cplusplus >= 202002L
 Annotate branches with likely or unlikely, e.g., for if and else.
 
bool constexpr AvoidedInlines = 0
 Do not inline functions like evaluate().
 
bool constexpr EnableAssert = false
 Enables asserts in CoDiPack for consistency checking.
 
bool constexpr ForcedInlines = 0
 Force inlining instead of using the heuristics from the compiler.
 

Type and compile time value declarations

using LowLevelFunctionDataSize = uint16_t
 Size store type for a low level function.
 
using LowLevelFunctionToken = uint16_t
 Token type for low level functions in the tapes.
 
using ArgumentSize = uint8_t
 Type for the number of arguments in statements.
 
size_t constexpr ByteDataChunkSize = 4194304
 Default size of byte chunks used in ChunkedData in reverse tape implementations.
 
size_t constexpr ChunkSize = 2097152
 Default size of chunks (ChunkBase) used in ChunkedData in reverse tape implementations.
 
size_t constexpr LowLevelFunctionDataSizeMax = std::numeric_limits<LowLevelFunctionDataSize>::max()
 Maximum data size of a low level function.
 
size_t constexpr LowLevelFunctionTokenMaxSize = std::numeric_limits<LowLevelFunctionToken>::max()
 Maximum number of low level functions.
 
size_t constexpr LowLevelFunctionTokenInvalid = std::numeric_limits<LowLevelFunctionToken>::max()
 Invalid low level function token.
 
size_t constexpr MaxArgumentSize = 253
 Maximum number of arguments in a statement.
 
size_t constexpr StatementInputTag = 255
 Tag for statements that are inputs. Used in linear index management context.
 
size_t constexpr StatementLowLevelFunctionTag = 254
 Statement tag for low level functions.
 
size_t constexpr SmallChunkSize = 32768
 Default smaller size of chunks (ChunkBase) used in ChunkedData in reverse tape implementations.
 

Detailed Description

Configuration options for CoDiPack.

Variable Documentation

◆ ImplicitConversion

bool constexpr codi::Config::ImplicitConversion = false
constexpr

Enables the implicit conversion operator to the primal value in the active types. This will give a warning every time an implicit conversion is instantiated. This warning can be disabled with the compiler flag -DCODI_ImplicitConversionWarning=0.