MeDiPack  1.3.0
A Message Differentiation Package
SciComp TU Kaiserslautern
Loading...
Searching...
No Matches
typeDefinitions.h
Go to the documentation of this file.
1/*
2 * MeDiPack, a Message Differentiation Package
3 *
4 * Copyright (C) 2015-2024 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 (SciComp, University of Kaiserslautern-Landau)
9 *
10 * This file is part of MeDiPack (http://scicomp.rptu.de/software/codi).
11 *
12 * MeDiPack is free software: you can redistribute it and/or
13 * modify it under the terms of the GNU Lesser General Public
14 * License as published by the Free Software Foundation, either
15 * version 3 of the License, or (at your option) any later version.
16 *
17 * MeDiPack is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
20 *
21 * See the GNU Lesser General Public License for more details.
22 * You should have received a copy of the GNU
23 * Lesser General Public License along with MeDiPack.
24 * If not, see <http://www.gnu.org/licenses/>.
25 *
26 * Authors: Max Sagebaum, Tim Albring (SciComp, University of Kaiserslautern-Landau)
27 */
28
29#pragma once
30
31#include "adjointInterface.hpp"
32
36namespace medi {
37
38 enum class ManualDeleteType {
39 Normal,
40 Async,
41 Wait
42 };
43
44 struct HandleBase;
48 typedef int (*ContinueFunction)(HandleBase* h);
49 typedef void (*PreAdjointOperation)(void* adjoints, void* primals, int count, int dim);
50 typedef void (*PostAdjointOperation)(void* adjoints, void* primals, void* rootPrimals, int count, int dim);
51 typedef void (*CustomFunction)(void* data);
52
68
69 // structures for the passive types
70
71 template <typename T>
72 struct PairWithInt {
73 T a;
74 int b;
75 };
76
83
84}
Definition adjointInterface.hpp:40
Global namespace for MeDiPack - Message Differentiation Package.
Definition adjointInterface.hpp:37
ManualDeleteType
Definition typeDefinitions.h:38
void(* PrimalFunction)(HandleBase *h, AdjointInterface *a)
Definition typeDefinitions.h:47
void(* CustomFunction)(void *data)
Definition typeDefinitions.h:51
PairWithInt< int > IntIntPair
Definition typeDefinitions.h:80
void(* ForwardFunction)(HandleBase *h, AdjointInterface *a)
Definition typeDefinitions.h:46
PairWithInt< long > LongIntPair
Definition typeDefinitions.h:79
void(* PreAdjointOperation)(void *adjoints, void *primals, int count, int dim)
Definition typeDefinitions.h:49
int(* ContinueFunction)(HandleBase *h)
Definition typeDefinitions.h:48
PairWithInt< float > FloatIntPair
Definition typeDefinitions.h:77
PairWithInt< double > DoubleIntPair
Definition typeDefinitions.h:78
PairWithInt< short > ShortIntPair
Definition typeDefinitions.h:81
void(* PostAdjointOperation)(void *adjoints, void *primals, void *rootPrimals, int count, int dim)
Definition typeDefinitions.h:50
void(* ReverseFunction)(HandleBase *h, AdjointInterface *a)
Definition typeDefinitions.h:45
PairWithInt< long double > LongDoubleIntPair
Definition typeDefinitions.h:82
Definition typeDefinitions.h:53
PrimalFunction funcPrimal
Definition typeDefinitions.h:56
ManualDeleteType deleteType
Definition typeDefinitions.h:57
virtual ~HandleBase()
Definition typeDefinitions.h:66
ReverseFunction funcReverse
Definition typeDefinitions.h:54
HandleBase()
Definition typeDefinitions.h:59
ForwardFunction funcForward
Definition typeDefinitions.h:55
Definition typeDefinitions.h:72
int b
Definition typeDefinitions.h:74
T a
Definition typeDefinitions.h:73