CoDiPack  2.2.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-2024 Chair for Scientific Computing (SciComp), University of Kaiserslautern-Landau
5 * Homepage: http://www.scicomp.uni-kl.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://www.scicomp.uni-kl.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/immutableActiveType.hpp"
42#include "codi/expressions/real/allOperators.hpp"
43#include "codi/expressions/referenceActiveType.hpp"
44#include "codi/misc/enumBitset.hpp"
45#include "codi/tapes/data/blockData.hpp"
46#include "codi/tapes/data/chunkedData.hpp"
47#include "codi/tapes/forwardEvaluation.hpp"
48#include "codi/tapes/indices/linearIndexManager.hpp"
49#include "codi/tapes/indices/multiUseIndexManager.hpp"
50#include "codi/tapes/jacobianLinearTape.hpp"
51#include "codi/tapes/jacobianReuseTape.hpp"
52#include "codi/tapes/primalValueLinearTape.hpp"
53#include "codi/tapes/primalValueReuseTape.hpp"
54#include "codi/tapes/statementEvaluators/directStatementEvaluator.hpp"
55#include "codi/tapes/statementEvaluators/innerStatementEvaluator.hpp"
56#include "codi/tapes/statementEvaluators/reverseStatementEvaluator.hpp"
57#include "codi/tapes/tagging/tagTapeForward.hpp"
58#include "codi/tapes/tagging/tagTapeReverse.hpp"
59#include "codi/tools/data/aggregatedTypeVectorAccessWrapper.hpp"
60#include "codi/tools/data/direction.hpp"
61#include "codi/tools/data/externalFunctionUserData.hpp"
62#include "codi/tools/data/jacobian.hpp"
63#include "codi/tools/derivativeAccess.hpp"
64#include "codi/tools/helpers/customAdjointVectorHelper.hpp"
65#include "codi/tools/helpers/externalFunctionHelper.hpp"
66// #include "codi/tools/helpers/evaluationHelper.hpp" // Included at the end of this file.
67#include "codi/tools/helpers/linearSystem/linearSystemHandler.hpp"
68#include "codi/tools/helpers/preaccumulationHelper.hpp"
69#include "codi/tools/helpers/statementPushHelper.hpp"
70#include "codi/tools/helpers/tapeHelper.hpp"
71#include "codi/tools/lowlevelFunctions/lowLevelFunctionCreationUtilities.hpp"
72#include "codi/traits/computationTraits.hpp"
73#include "codi/traits/numericLimits.hpp"
74#include "codi/traits/tapeTraits.hpp"
75
76#if CODI_EnableMPI
77 #include "codi/tools/mpi/codiMpiTypes.hpp"
78#endif
79
80#if CODI_EnableEigen
81 #include "codi/tools/helpers/linearSystem/eigenLinearSystem.hpp"
82 #include "codi/tools/lowlevelFunctions/linearAlgebra/matrixMatrixMultiplication.hpp"
83#endif
84
85#if CODI_EnableEnzyme
86 #include "codi/tools/helpers/enzymeExternalFunctionHelper.hpp"
87#endif
88
90namespace codi {
91
92#define CODI_MAJOR_VERSION 2
93#define CODI_MINOR_VERSION 2
94#define CODI_BUILD_VERSION 0
95#define CODI_VERSION "2.2.0"
96
99 template<typename Real, typename Gradient = Real>
101
105
108 template<size_t dim>
110
115 template<typename Real, typename Gradient = Real, typename Index = int>
118
121
123 template<size_t dim>
125
132 template<typename Real, typename Gradient = Real, typename Index = int>
135
138
143 template<typename Real, typename Gradient = Real, typename IndexManager = MultiUseIndexManager<int>>
146
149
151 template<size_t dim>
153
160 template<typename Real, typename Gradient = Real, typename IndexManager = MultiUseIndexManager<int>>
163
166
171 template<typename Real, typename Gradient = Real, typename Index = int,
172 template<typename> class StatementEvaluator = InnerStatementEvaluator>
175
178
180 template<size_t dim>
182
189 template<typename Real, typename Gradient = Real, typename Index = int,
190 template<typename> class StatementEvaluator = InnerStatementEvaluator>
193
196
201 template<typename Real, typename Gradient = Real, typename IndexManager = MultiUseIndexManager<int>,
202 template<typename> class StatementEvaluator = InnerStatementEvaluator>
205
208
210 template<size_t dim>
212
219 template<typename Real, typename Gradient = Real, typename IndexManager = MultiUseIndexManager<int>,
220 template<typename> class StatementEvaluator = InnerStatementEvaluator>
223
226
231
238
243
250
254
258}
259
260#include "codi/tools/cuda/codiCUDA.hpp"
261#include "codi/tools/helpers/evaluationHelper.hpp"
262
263#if CODI_EnableOpenMP
264 #include "codi/tools/parallel/openmp/codiOpenMP.hpp"
265#endif
266
267#if CODI_EnableOpDiLib
268 #include "codi/tools/parallel/openmp/codiOpDiLibTool.hpp"
269#endif
CoDiPack - Code Differentiation Package.
Definition: codi.hpp:90
RealReverseIndexGen< double > RealReverseIndex
Definition: codi.hpp:148
Represents a concrete lvalue in the CoDiPack expression tree.
Definition: activeType.hpp:52
Data is stored in one contiguous block in this DataInterface implementation.
Definition: blockData.hpp:64
Data is stored chunk-wise in this DataInterface implementation. If a chunk runs out of space,...
Definition: chunkedData.hpp:64
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:102
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:77