CoDiPack  3.1.0
A Code Differentiation Package
SciComp TU Kaiserslautern
Loading...
Searching...
No Matches
codi.hpp
1/*
2 * CoDiPack, a Code Differentiation Package
3 *
4 * Copyright (C) 2015-2026 Chair for Scientific Computing (SciComp), University of Kaiserslautern-Landau
5 * Homepage: http://scicomp.rptu.de
6 * Contact: Prof. Nicolas R. Gauger (codi@scicomp.uni-kl.de)
7 *
8 * Lead developers: Max Sagebaum, Johannes Blühdorn (SciComp, University of Kaiserslautern-Landau)
9 *
10 * This file is part of CoDiPack (http://scicomp.rptu.de/software/codi).
11 *
12 * CoDiPack is free software: you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation, either version 3 of the
15 * License, or (at your option) any later version.
16 *
17 * CoDiPack is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty
19 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
20 *
21 * See the GNU General Public License for more details.
22 * You should have received a copy of the GNU
23 * General Public License along with CoDiPack.
24 * If not, see <http://www.gnu.org/licenses/>.
25 *
26 * For other licensing options please contact us.
27 *
28 * Authors:
29 * - SciComp, University of Kaiserslautern-Landau:
30 * - Max Sagebaum
31 * - Johannes Blühdorn
32 * - Former members:
33 * - Tim Albring
34 */
35#pragma once
36
37#include "codi/config.h"
38#include "codi/expressions/activeType.hpp"
39#include "codi/expressions/activeTypeStatelessTape.hpp"
40#include "codi/expressions/activeTypeWrapper.hpp"
41#include "codi/expressions/complex/allOperators.hpp"
42#include "codi/expressions/complex/stdComplex.hpp"
43#include "codi/expressions/immutableActiveType.hpp"
44#include "codi/expressions/real/allOperators.hpp"
45#include "codi/expressions/referenceActiveType.hpp"
46#include "codi/expressions/static/staticContextAggregatedActiveType.hpp"
47#include "codi/misc/enumBitset.hpp"
48#include "codi/tapes/data/blockData.hpp"
49#include "codi/tapes/data/chunkedData.hpp"
50#include "codi/tapes/forwardEvaluation.hpp"
51#include "codi/tapes/indices/debugMultiUseIndexManager.hpp"
52#include "codi/tapes/indices/linearIndexManager.hpp"
53#include "codi/tapes/indices/multiUseIndexManager.hpp"
54#include "codi/tapes/jacobianLinearTape.hpp"
55#include "codi/tapes/jacobianReuseTape.hpp"
56#include "codi/tapes/primalValueLinearTape.hpp"
57#include "codi/tapes/primalValueReuseTape.hpp"
58#include "codi/tapes/statementEvaluators/directStatementEvaluator.hpp"
59#include "codi/tapes/statementEvaluators/innerStatementEvaluator.hpp"
60#include "codi/tapes/statementEvaluators/reverseStatementEvaluator.hpp"
61#include "codi/tapes/tagging/tagTapeForward.hpp"
62#include "codi/tapes/tagging/tagTapeReverse.hpp"
63#include "codi/tools/data/aggregatedTypeVectorAccessWrapper.hpp"
64#include "codi/tools/data/direction.hpp"
65#include "codi/tools/data/externalFunctionUserData.hpp"
66#include "codi/tools/data/jacobian.hpp"
67#include "codi/tools/derivativeAccess.hpp"
68#include "codi/tools/helpers/customAdjointVectorHelper.hpp"
69#include "codi/tools/helpers/externalFunctionHelper.hpp"
70// #include "codi/tools/helpers/evaluationHelper.hpp" // Included at the end of this file.
71#include "codi/tapes/io/readerWriterHelpers.hpp"
72#include "codi/tools/helpers/linearSystem/linearSystemHandler.hpp"
73#include "codi/tools/helpers/preaccumulationHelper.hpp"
74#include "codi/tools/helpers/statementPushHelper.hpp"
75#include "codi/tools/helpers/tapeHelper.hpp"
76#include "codi/tools/identifierCacheOptimizer.hpp"
77#include "codi/tools/io/writeConnectivityData.hpp"
78#include "codi/tools/lowlevelFunctions/lowLevelFunctionCreationUtilities.hpp"
79#include "codi/traits/computationTraits.hpp"
80#include "codi/traits/numericLimits.hpp"
81#include "codi/traits/tapeTraits.hpp"
82
83#if CODI_EnableMPI
84 #include "codi/tools/mpi/codiMpiTypes.hpp"
85#endif
86
87#if CODI_EnableEigen
88 #include "codi/tools/helpers/linearSystem/eigenLinearSystem.hpp"
89 #include "codi/tools/lowlevelFunctions/linearAlgebra/matrixMatrixMultiplication.hpp"
90#endif
91
92#if CODI_EnableEnzyme
93 #include "codi/tools/helpers/enzymeExternalFunctionHelper.hpp"
94#endif
95
97namespace codi {
98
99#define CODI_MAJOR_VERSION 3
100#define CODI_MINOR_VERSION 1
101#define CODI_BUILD_VERSION 0
102#define CODI_VERSION "3.1.0"
103
106 template<typename Real, typename Gradient = Real>
108
112
115 template<size_t dim>
117
122 template<typename Real, typename Gradient = Real, typename Index = int>
125
128
130 template<size_t dim>
132
139 template<typename Real, typename Gradient = Real, typename Index = int>
142
145
150 template<typename Real, typename Gradient = Real, typename IndexManager = MultiUseIndexManager<int>>
153
156
158 template<size_t dim>
160
167 template<typename Real, typename Gradient = Real, typename IndexManager = MultiUseIndexManager<int>>
170
173
178 template<typename Real, typename Gradient = Real, typename Index = int,
179 typename StatementEvaluator = InnerStatementEvaluator>
182
185
187 template<size_t dim>
189
196 template<typename Real, typename Gradient = Real, typename Index = int,
197 typename StatementEvaluator = InnerStatementEvaluator>
200
203
208 template<typename Real, typename Gradient = Real, typename IndexManager = MultiUseIndexManager<int>,
209 typename StatementEvaluator = InnerStatementEvaluator>
212
215
217 template<size_t dim>
219
226 template<typename Real, typename Gradient = Real, typename IndexManager = MultiUseIndexManager<int>,
227 typename StatementEvaluator = InnerStatementEvaluator>
230
233
238
245
250
257
261
265}
266
267#include "codi/tools/cuda/codiCUDA.hpp"
268#include "codi/tools/helpers/evaluationHelper.hpp"
269
270#if CODI_EnableOpenMP
271 #include "codi/tools/parallel/openmp/codiOpenMP.hpp"
272#endif
273
274#if CODI_EnableOpDiLib
275 #include "codi/tools/parallel/openmp/codiOpDiLibTool.hpp"
276#endif
CoDiPack - Code Differentiation Package.
Definition codi.hpp:97
RealReversePrimalIndexGen< double, Direction< double, dim > > RealReversePrimalIndexVec
Definition codi.hpp:218
RealReversePrimalIndexGen< RealForwardVec< 4 >, Direction< RealForwardVec< 4 >, 4 > > HessianComputationType
A regular CoDiPack type that can be used for Hessian computations in the TapeHelper.
Definition codi.hpp:237
RealReverseGen< double, Direction< double, dim > > RealReverseVec
Definition codi.hpp:131
ActiveType< PrimalValueReuseTape< PrimalValueTapeTypes< Real, Gradient, IndexManager, StatementEvaluator, DefaultChunkedData > > > RealReversePrimalIndexGen
Definition codi.hpp:210
ActiveType< ForwardEvaluation< Real, Gradient > > RealForwardGen
Definition codi.hpp:107
ActiveType< JacobianReuseTape< JacobianTapeTypes< Real, Gradient, IndexManager, DefaultChunkedData > > > RealReverseIndexUncheckedGen
Definition codi.hpp:168
ActiveType< JacobianReuseTape< JacobianTapeTypes< Real, Gradient, IndexManager, DefaultChunkedData > > > RealReverseIndexGen
Definition codi.hpp:151
RealReversePrimalUncheckedGen< double > RealReversePrimalUnchecked
Definition codi.hpp:202
ActiveType< PrimalValueLinearTape< PrimalValueTapeTypes< Real, Gradient, LinearIndexManager< Index >, StatementEvaluator, DefaultChunkedData > > > RealReversePrimalGen
Definition codi.hpp:180
ActiveType< JacobianLinearTape< JacobianTapeTypes< Real, Gradient, LinearIndexManager< Index >, DefaultChunkedData > > > RealReverseGen
Definition codi.hpp:123
ActiveType< PrimalValueLinearTape< PrimalValueTapeTypes< Real, Gradient, LinearIndexManager< Index >, StatementEvaluator, DefaultChunkedData > > > RealReversePrimalUncheckedGen
Definition codi.hpp:198
RealForwardGen< double, Direction< double, dim > > RealForwardVec
Definition codi.hpp:116
RealReversePrimalIndexUncheckedGen< double > RealReversePrimalIndexUnchecked
Definition codi.hpp:232
RealReverseUncheckedGen< double > RealReverseUnchecked
Definition codi.hpp:144
ActiveType< JacobianLinearTape< JacobianTapeTypes< Real, Gradient, LinearIndexManager< Index >, DefaultBlockData > > > RealReverseUncheckedGen
Definition codi.hpp:140
BlockData< Chunk, NestedData > DefaultBlockData
BlockData DataInterface used in all unchecked tapes.
Definition blockData.hpp:318
RealReversePrimalIndexGen< RealForward > HessianComputationScalarType
A regular CoDiPack type that can be used for Hessian computations in the TapeHelper.
Definition codi.hpp:244
RealReverseIndexVec< 4 > JacobianComputationType
A regular CoDiPack type that can be used for Jacobian computations in the TapeHelper.
Definition codi.hpp:249
RealReversePrimalGen< double > RealReversePrimal
Definition codi.hpp:184
ActiveType< PrimalValueReuseTape< PrimalValueTapeTypes< Real, Gradient, IndexManager, StatementEvaluator, DefaultChunkedData > > > RealReversePrimalIndexUncheckedGen
Definition codi.hpp:228
RealReverseIndex JacobianComputationScalarType
A regular CoDiPack type that can be used for Jacobian computations in the TapeHelper.
Definition codi.hpp:256
RealReverseIndexGen< double > RealReverseIndex
Definition codi.hpp:155
ActiveType< TagTapeReverse< double, int > > RealReverseTag
Definition codi.hpp:260
ChunkedData< Chunk, NestedData > DefaultChunkedData
ChunkData DataInterface used in all regular tapes.
Definition chunkedData.hpp:520
RealReverseIndexUncheckedGen< double > RealReverseIndexUnchecked
Definition codi.hpp:172
RealReverseIndexGen< double, Direction< double, dim > > RealReverseIndexVec
Definition codi.hpp:159
RealReversePrimalGen< double, Direction< double, dim > > RealReversePrimalVec
Definition codi.hpp:188
RealReverseGen< double > RealReverse
Definition codi.hpp:127
RealForwardGen< double, double > RealForward
Definition codi.hpp:111
ActiveType< TagTapeForward< double, int > > RealForwardTag
Definition codi.hpp:264
RealReversePrimalIndexGen< double > RealReversePrimalIndex
Definition codi.hpp:214
Represents a concrete lvalue in the CoDiPack expression tree.
Definition activeType.hpp:52
Fixed size vector mode implementation.
Definition direction.hpp:57
Expression evaluation in the inner function. Data loading in the compilation context of the tape....
Definition innerStatementEvaluator.hpp:104
Final implementation for a primal value tape with a linear index management.
Definition primalValueLinearTape.hpp:64
Final implementation for a primal value tape with a reuse index management.
Definition primalValueReuseTape.hpp:64
Type definitions for the primal value tapes.
Definition primalValueBaseTape.hpp:82