CoDiPack  3.1.3
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), RPTU University 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, RPTU University 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, RPTU University 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_HasCpp20
84 #include "codi/traits/concepts.hpp"
85#endif
86
87#if CODI_EnableMPI
88 #include "codi/tools/mpi/codiMpiTypes.hpp"
89#endif
90
91#if CODI_EnableEigen
92 #include "codi/tools/helpers/linearSystem/eigenLinearSystem.hpp"
93 #include "codi/tools/lowlevelFunctions/linearAlgebra/matrixMatrixMultiplication.hpp"
94 #include "codi/traits/eigenTraits.hpp"
95#endif
96
97#if CODI_EnableEnzyme
98 #include "codi/tools/helpers/enzymeExternalFunctionHelper.hpp"
99#endif
100
102namespace codi {
103
104#define CODI_MAJOR_VERSION 3
105#define CODI_MINOR_VERSION 1
106#define CODI_BUILD_VERSION 3
107#define CODI_VERSION "3.1.3"
108
111 template<typename Real, typename Gradient = Real>
113
117
120 template<size_t dim>
122
127 template<typename Real, typename Gradient = Real, typename Index = int>
130
133
135 template<size_t dim>
137
144 template<typename Real, typename Gradient = Real, typename Index = int>
147
150
155 template<typename Real, typename Gradient = Real, typename IndexManager = MultiUseIndexManager<int>>
158
161
163 template<size_t dim>
165
172 template<typename Real, typename Gradient = Real, typename IndexManager = MultiUseIndexManager<int>>
175
178
183 template<typename Real, typename Gradient = Real, typename Index = int,
184 typename StatementEvaluator = InnerStatementEvaluator>
187
190
192 template<size_t dim>
194
201 template<typename Real, typename Gradient = Real, typename Index = int,
202 typename StatementEvaluator = InnerStatementEvaluator>
205
208
213 template<typename Real, typename Gradient = Real, typename IndexManager = MultiUseIndexManager<int>,
214 typename StatementEvaluator = InnerStatementEvaluator>
217
220
222 template<size_t dim>
224
231 template<typename Real, typename Gradient = Real, typename IndexManager = MultiUseIndexManager<int>,
232 typename StatementEvaluator = InnerStatementEvaluator>
235
238
243
250
255
262
266
270}
271
272#include "codi/tools/cuda/codiCUDA.hpp"
273#include "codi/tools/helpers/evaluationHelper.hpp"
274
275#if CODI_EnableOpenMP
276 #include "codi/tools/parallel/openmp/codiOpenMP.hpp"
277#endif
278
279#if CODI_EnableOpDiLib
280 #include "codi/tools/parallel/openmp/codiOpDiLibTool.hpp"
281#endif
CoDiPack - Code Differentiation Package.
Definition codi.hpp:102
RealReversePrimalIndexGen< double, Direction< double, dim > > RealReversePrimalIndexVec
Definition codi.hpp:223
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:242
RealReverseGen< double, Direction< double, dim > > RealReverseVec
Definition codi.hpp:136
ActiveType< ForwardEvaluation< Real, Gradient > > RealForwardGen
Definition codi.hpp:112
ActiveType< PrimalValueReuseTape< PrimalValueTapeTypes< Real, Gradient, IndexManager, StatementEvaluator, DefaultChunkedData > > > RealReversePrimalIndexGen
Definition codi.hpp:215
RealReversePrimalUncheckedGen< double > RealReversePrimalUnchecked
Definition codi.hpp:207
RealForwardGen< double, Direction< double, dim > > RealForwardVec
Definition codi.hpp:121
ActiveType< PrimalValueLinearTape< PrimalValueTapeTypes< Real, Gradient, LinearIndexManager< Index >, StatementEvaluator, DefaultChunkedData > > > RealReversePrimalGen
Definition codi.hpp:185
RealReversePrimalIndexUncheckedGen< double > RealReversePrimalIndexUnchecked
Definition codi.hpp:237
ActiveType< JacobianReuseTape< JacobianTapeTypes< Real, Gradient, IndexManager, DefaultChunkedData > > > RealReverseIndexGen
Definition codi.hpp:156
RealReverseUncheckedGen< double > RealReverseUnchecked
Definition codi.hpp:149
ActiveType< JacobianLinearTape< JacobianTapeTypes< Real, Gradient, LinearIndexManager< Index >, DefaultBlockData > > > RealReverseUncheckedGen
Definition codi.hpp:145
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:249
RealReverseIndexVec< 4 > JacobianComputationType
A regular CoDiPack type that can be used for Jacobian computations in the TapeHelper.
Definition codi.hpp:254
RealReversePrimalGen< double > RealReversePrimal
Definition codi.hpp:189
RealReverseIndex JacobianComputationScalarType
A regular CoDiPack type that can be used for Jacobian computations in the TapeHelper.
Definition codi.hpp:261
RealReverseIndexGen< double > RealReverseIndex
Definition codi.hpp:160
ActiveType< TagTapeReverse< double, int > > RealReverseTag
Definition codi.hpp:265
ActiveType< PrimalValueLinearTape< PrimalValueTapeTypes< Real, Gradient, LinearIndexManager< Index >, StatementEvaluator, DefaultChunkedData > > > RealReversePrimalUncheckedGen
Definition codi.hpp:203
ChunkedData< Chunk, NestedData > DefaultChunkedData
ChunkData DataInterface used in all regular tapes.
Definition chunkedData.hpp:520
ActiveType< JacobianReuseTape< JacobianTapeTypes< Real, Gradient, IndexManager, DefaultChunkedData > > > RealReverseIndexUncheckedGen
Definition codi.hpp:173
ActiveType< JacobianLinearTape< JacobianTapeTypes< Real, Gradient, LinearIndexManager< Index >, DefaultChunkedData > > > RealReverseGen
Definition codi.hpp:128
RealReverseIndexUncheckedGen< double > RealReverseIndexUnchecked
Definition codi.hpp:177
RealReverseIndexGen< double, Direction< double, dim > > RealReverseIndexVec
Definition codi.hpp:164
RealReversePrimalGen< double, Direction< double, dim > > RealReversePrimalVec
Definition codi.hpp:193
RealReverseGen< double > RealReverse
Definition codi.hpp:132
RealForwardGen< double, double > RealForward
Definition codi.hpp:116
ActiveType< PrimalValueReuseTape< PrimalValueTapeTypes< Real, Gradient, IndexManager, StatementEvaluator, DefaultChunkedData > > > RealReversePrimalIndexUncheckedGen
Definition codi.hpp:233
ActiveType< TagTapeForward< double, int > > RealForwardTag
Definition codi.hpp:269
RealReversePrimalIndexGen< double > RealReversePrimalIndex
Definition codi.hpp:219
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