1 /*---------------------------------------------------------------------------- 2 ADOL-C -- Automatic Differentiation by Overloading in C++ 3 File: revolve.h 4 Revision: $Id: revolve.h 537 2014-08-15 14:10:48Z kulshres $ 5 Contents: optimal binomial checkpointing adapted for ADOL-C 6 7 Copyright (c) Andrea Walther, Andreas Griewank, Andreas Kowarz 8 9 This file is part of ADOL-C. This software is provided as open source. 10 Any use, reproduction, or distribution of the software constitutes 11 recipient's acceptance of the terms of the accompanying license file. 12 13 ---------------------------------------------------------------------------*/ 14 15 #if !defined(ADOLC_REVOLVE_H) 16 #define ADOLC_REVOLVE_H 1 17 18 #include <adolc/internal/common.h> 19 20 BEGIN_C_DECLS 21 22 typedef struct { 23 int advances; 24 int takeshots; 25 int commands; 26 int turn; 27 int reps; 28 int range; 29 int ch[ADOLC_CHECKUP]; 30 int oldsnaps; 31 int oldfine; 32 } revolve_nums; 33 34 #ifndef _OPENMP 35 extern revolve_nums revolve_numbers; 36 #else 37 #include <omp.h> 38 extern revolve_nums *revolve_numbers; 39 #endif 40 41 enum revolve_action { 42 revolve_advance, 43 revolve_takeshot, 44 revolve_restore, 45 revolve_firsturn, 46 revolve_youturn, 47 revolve_terminate, 48 revolve_error 49 }; 50 51 int maxrange(int ss, int tt); 52 53 int adjustsize(int* steps, int* snaps, int* reps); 54 55 enum revolve_action revolve(int* check,int* capo,int* fine,int snaps,int* info); 56 57 END_C_DECLS 58 59 #endif /* ADOLC_REVOLVE_H */ 60 61