MeDiPack  1.4.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-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 (SciComp, University of Kaiserslautern-Landau)
9 *
10 * This file is part of MeDiPack (http://scicomp.rptu.de/software/medi).
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#include "debugInformation.hpp"
33
37namespace medi {
38
44
45 using CallbackFunc = void (*)(void* id, void* userData);
46
47 struct HandleBase;
51 typedef void (*IterateIdsFunction)(HandleBase* h, CallbackFunc func, void* userData);
52 typedef int (*ContinueFunction)(HandleBase* h);
53 typedef void (*PreAdjointOperation)(void* adjoints, void* primals, int count, int dim);
54 typedef void (*PostAdjointOperation)(void* adjoints, void* primals, void* rootPrimals, int count, int dim);
55 typedef void (*CustomFunction)(void* data);
56
84
85 // structures for the passive types
86
87 template <typename T>
88 struct PairWithInt {
89 T a;
90 int b;
91 };
92
99
100}
Definition adjointInterface.hpp:40
#define MEDI_DebugInformation
Definition debugInformation.hpp:39
Global namespace for MeDiPack - Message Differentiation Package.
Definition adjointInterface.hpp:37
ManualDeleteType
Definition typeDefinitions.h:39
@ Wait
Definition typeDefinitions.h:42
@ Async
Definition typeDefinitions.h:41
@ Normal
Definition typeDefinitions.h:40
void(* PrimalFunction)(HandleBase *h, AdjointInterface *a)
Definition typeDefinitions.h:50
void(* CustomFunction)(void *data)
Definition typeDefinitions.h:55
PairWithInt< int > IntIntPair
Definition typeDefinitions.h:96
void(* ForwardFunction)(HandleBase *h, AdjointInterface *a)
Definition typeDefinitions.h:49
PairWithInt< long > LongIntPair
Definition typeDefinitions.h:95
void(*)(void *id, void *userData) CallbackFunc
Definition typeDefinitions.h:45
void(* PreAdjointOperation)(void *adjoints, void *primals, int count, int dim)
Definition typeDefinitions.h:53
void(* IterateIdsFunction)(HandleBase *h, CallbackFunc func, void *userData)
Definition typeDefinitions.h:51
std::string getDebugInformation()
Definition debugInformation.cpp:59
int(* ContinueFunction)(HandleBase *h)
Definition typeDefinitions.h:52
PairWithInt< float > FloatIntPair
Definition typeDefinitions.h:93
PairWithInt< double > DoubleIntPair
Definition typeDefinitions.h:94
PairWithInt< short > ShortIntPair
Definition typeDefinitions.h:97
void(* PostAdjointOperation)(void *adjoints, void *primals, void *rootPrimals, int count, int dim)
Definition typeDefinitions.h:54
void(* ReverseFunction)(HandleBase *h, AdjointInterface *a)
Definition typeDefinitions.h:48
PairWithInt< long double > LongDoubleIntPair
Definition typeDefinitions.h:98
Definition typeDefinitions.h:57
PrimalFunction funcPrimal
Definition typeDefinitions.h:64
IterateIdsFunction funcIterateOutputIds
Definition typeDefinitions.h:67
ManualDeleteType deleteType
Definition typeDefinitions.h:65
IterateIdsFunction funcIterateInputIds
Definition typeDefinitions.h:66
virtual ~HandleBase()
Definition typeDefinitions.h:82
ReverseFunction funcReverse
Definition typeDefinitions.h:62
HandleBase()
Definition typeDefinitions.h:69
ForwardFunction funcForward
Definition typeDefinitions.h:63
Definition typeDefinitions.h:88
int b
Definition typeDefinitions.h:90
float a
Definition typeDefinitions.h:89