source: stable/2.4/ADOL-C/src/taping_p.h @ 397

Last change on this file since 397 was 370, checked in by kulshres, 7 years ago

Merge branch '2.3.x_ISSM' into svn

This introduces the new externally differentiated functions API

From: Jean Utke <utke@…>

Please see comments in ADOL-C/include/adolc/externfcts.h for details

Signed-off-by: Kshitij Kulshreshtha <kshitij@…>

  • Property svn:keywords set to Author Date Id Revision
File size: 20.4 KB
Line 
1/*----------------------------------------------------------------------------
2 ADOL-C -- Automatic Differentiation by Overloading in C++
3 File:     taping_p.h
4 Revision: $Id: taping_p.h 370 2012-11-22 13:18:52Z kulshres $
5 Contents: declarations for used by taping routines
6 
7 Copyright (c) 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#if !defined(ADOLC_TAPING_P_H)
15#define ADOLC_TAPING_P_H 1
16
17#include <adolc/common.h>
18#include <adolc/taping.h>
19#include <errno.h>
20#ifdef __cplusplus
21#include "storemanager.h"
22#endif
23
24BEGIN_C_DECLS
25
26enum WORKMODES {
27    ADOLC_NO_MODE,
28
29    ADOLC_FORWARD,
30    ADOLC_ZOS_FORWARD,
31    ADOLC_FOS_FORWARD,
32    ADOLC_FOV_FORWARD,
33    ADOLC_HOS_FORWARD,
34    ADOLC_HOV_FORWARD,
35
36    ADOLC_REVERSE,
37    ADOLC_FOS_REVERSE,
38    ADOLC_FOV_REVERSE,
39    ADOLC_HOS_REVERSE,
40    ADOLC_HOV_REVERSE
41};
42
43/****************************************************************************/
44/* Tape identification (ADOLC & version check)                              */
45/****************************************************************************/
46typedef struct {
47    short adolc_ver;
48    short adolc_sub;
49    short adolc_lvl;
50    short locint_size;
51    short revreal_size;
52    short address_size;
53}
54ADOLC_ID;
55
56extern ADOLC_ID adolc_id;
57
58/****************************************************************************/
59/* tape types => used for file name generation                              */
60/****************************************************************************/
61enum TAPENAMES {
62    LOCATIONS_TAPE,
63    VALUES_TAPE,
64    OPERATIONS_TAPE,
65    TAYLORS_TAPE
66};
67
68/****************************************************************************/
69/* Errors handled by fail(...)                                              */
70/****************************************************************************/
71enum ADOLC_ERRORS {
72    ADOLC_MALLOC_FAILED,
73    ADOLC_INTEGER_TAPE_FOPEN_FAILED,
74    ADOLC_INTEGER_TAPE_FREAD_FAILED,
75    ADOLC_TAPE_TO_OLD,
76    ADOLC_WRONG_LOCINT_SIZE,
77    ADOLC_MORE_STAT_SPACE_REQUIRED,
78
79    ADOLC_TAPING_BUFFER_ALLOCATION_FAILED,
80    ADOLC_TAPING_TBUFFER_ALLOCATION_FAILED,
81    ADOLC_TAPING_READ_ERROR_IN_TAYLOR_CLOSE,
82    ADOLC_TAPING_TO_MANY_TAYLOR_BUFFERS,
83    ADOLC_TAPING_TO_MANY_LOCINTS,
84    ADOLC_TAPING_STORE_REALLOC_FAILED,
85    ADOLC_TAPING_FATAL_IO_ERROR,
86    ADOLC_TAPING_TAPE_STILL_IN_USE,
87    ADOLC_TAPING_TAYLOR_OPEN_FAILED,
88
89    ADOLC_EVAL_SEEK_VALUE_STACK,
90    ADOLC_EVAL_OP_TAPE_READ_FAILED,
91    ADOLC_EVAL_VAL_TAPE_READ_FAILED,
92    ADOLC_EVAL_LOC_TAPE_READ_FAILED,
93    ADOLC_EVAL_TAY_TAPE_READ_FAILED,
94
95    ADOLC_REVERSE_NO_TAYLOR_STACK,
96    ADOLC_REVERSE_COUNTS_MISMATCH,
97    ADOLC_REVERSE_TAYLOR_COUNTS_MISMATCH,
98
99    ADOLC_BUFFER_NULLPOINTER_FUNCTION,
100    ADOLC_BUFFER_INDEX_TO_LARGE,
101
102    ADOLC_EXT_DIFF_NULLPOINTER_STRUCT,
103    ADOLC_EXT_DIFF_WRONG_TAPESTATS,
104    ADOLC_EXT_DIFF_NULLPOINTER_FUNCTION,
105    ADOLC_EXT_DIFF_NULLPOINTER_DIFFFUNC,
106    ADOLC_EXT_DIFF_NULLPOINTER_ARGUMENT,
107    ADOLC_EXT_DIFF_WRONG_FUNCTION_INDEX,
108    ADOLC_EXT_DIFF_LOCATIONGAP,
109
110    ADOLC_CHECKPOINTING_CPINFOS_NULLPOINTER,
111    ADOLC_CHECKPOINTING_NULLPOINTER_ARGUMENT,
112    ADOLC_CHECKPOINTING_NULLPOINTER_FUNCTION,
113    ADOLC_CHECKPOINTING_NULLPOINTER_FUNCTION_DOUBLE,
114    ADOLC_CHECKPOINTING_REVOLVE_IRREGULAR_TERMINATED,
115    ADOLC_CHECKPOINTING_UNEXPECTED_REVOLVE_ACTION,
116    ADOLC_WRONG_PLATFORM_32,
117    ADOLC_WRONG_PLATFORM_64
118};
119/* additional infos fail can work with */
120extern int failAdditionalInfo1;
121extern int failAdditionalInfo2;
122extern locint failAdditionalInfo3;
123extern locint failAdditionalInfo4;
124extern void *failAdditionalInfo5;
125extern void *failAdditionalInfo6;
126
127/****************************************************************************/
128/* tape information                                                         */
129/****************************************************************************/
130
131#ifdef SPARSE
132typedef struct SparseJacInfos {
133  void *g;
134  void *jr1d;
135
136  double *y;
137  double **Seed;
138  double **B;
139
140  unsigned int **JP;
141
142  int depen, nnz_in, seed_clms, seed_rows;
143} SparseJacInfos;
144
145typedef struct SparseHessInfos {
146    void *g;
147    void *hr;
148
149    double **Hcomp;
150    double*** Xppp;
151    double*** Yppp;
152    double*** Zppp;
153    double**  Upp;
154 
155    unsigned int **HP;
156
157  int nnz_in, indep, p;
158} SparseHessInfos;
159#endif
160
161typedef struct PersistantTapeInfos { /* survive tape re-usage */
162    int forodec_nax, forodec_dax;
163    double *forodec_y, *forodec_z, **forodec_Z;
164    double **jacSolv_J;
165    double **jacSolv_I;
166    double *jacSolv_xold;
167    int *jacSolv_ri;
168    int *jacSolv_ci;
169    int jacSolv_nax, jacSolv_modeold, jacSolv_cgd;
170
171#ifdef SPARSE
172    /* sparse derivative matrices */
173
174    int inJacSparseUse;
175    int inHessSparseUse;
176
177    /* sparse Jacobian matrices */
178
179    SparseJacInfos sJinfos;
180
181    /* sparse Hessian matrices */
182
183    SparseHessInfos sHinfos;
184#endif
185
186    /* file names */
187
188    char *op_fileName;
189    char *loc_fileName;
190    char *val_fileName;
191    char *tay_fileName;
192
193    int keepTape; /* - remember if tapes shall be written out to disk
194                     - this information can only be given at taping time and
195                       must survive all other actions on the tape */
196} PersistantTapeInfos;
197
198typedef struct TapeInfos {
199    short tapeID;
200    int inUse;
201    uint numInds;
202    uint numDeps;
203    int keepTaylors;             /* == 1 - write taylor stack in taping mode */
204    size_t stats[STAT_SIZE];
205    int traceFlag;
206    char tapingComplete;
207
208    /* operations tape */
209    FILE *op_file;              /* file descriptor */
210    unsigned char *opBuffer;    /* pointer to the current tape buffer */
211    unsigned char *currOp;      /* pointer to the current opcode */
212    unsigned char *lastOpP1;    /* pointer to element following the buffer */
213    size_t numOps_Tape;           /* overall number of opcodes */
214    size_t num_eq_prod;           /* overall number of eq_*_prod for nlf */
215
216    /* values (real) tape */
217    FILE *val_file;
218    double *valBuffer;
219    double *currVal;
220    double *lastValP1;
221    size_t numVals_Tape;
222
223    /* locations tape */
224    FILE *loc_file;
225    locint *locBuffer;
226    locint *currLoc;
227    locint *lastLocP1;
228    size_t numLocs_Tape;
229
230    /* taylor stack tape */
231    FILE *tay_file;
232    revreal *tayBuffer;
233    revreal *currTay;
234    revreal *lastTayP1;
235    size_t numTays_Tape;
236    int nextBufferNumber;                   /* the next Buffer to read back */
237    char lastTayBlockInCore;      /* == 1 if last taylor buffer is still in
238                                            in core (first call of reverse) */
239    double **T_for;                          /* derivative buffer - forward */
240    uint deg_save;                 /* degree to save and saved respectively */
241    uint tay_numInds;             /* # of independents for the taylor stack */
242    uint tay_numDeps;               /* # of dependents for the taylor stack */
243
244    /* checkpointing */
245    locint lowestXLoc_for;     /* location of the first ind. - forward mode */
246    locint lowestYLoc_for;     /* location of the first dep. - forward mode */
247    locint lowestXLoc_rev;     /* location of the first ind. - reverse mode */
248    locint lowestYLoc_rev;     /* location of the first dep. - reverse mode */
249    locint cpIndex;               /* index of the curr. cp function <- tape */
250    int numDirs_rev;     /* # of directions for **v_reverse (checkpointing) */
251
252    /* evaluation forward */
253    double *dp_T0;
254    double **dpp_T;
255
256    /* evaluation reverse */
257    revreal *rp_T;
258    revreal **rpp_T;
259    revreal *rp_A;
260    revreal **rpp_A;
261    unsigned long int **upp_A;
262
263    /* extern diff. fcts */
264    locint ext_diff_fct_index;    /* set by forward and reverse (from tape) */
265
266    PersistantTapeInfos pTapeInfos;
267
268#if defined(__cplusplus)
269    TapeInfos();
270    TapeInfos(short tapeID);
271#endif
272}
273TapeInfos;
274
275typedef struct GlobalTapeVarsCL {
276    double* store;              /* double store for calc. while taping */
277    size_t storeSize;
278    size_t numLives;
279    locint maxLoc;
280
281    locint operationBufferSize; /* Defaults to the value specified in */
282    locint locationBufferSize;  /* usrparms.h. May be overwritten by values */
283    locint valueBufferSize;     /* in a local config file .adolcrc. */
284    locint taylorBufferSize;
285    int maxNumberTaylorBuffers;
286
287    char inParallelRegion;       /* set to 1 if in an OpenMP parallel region */
288    char newTape;               /* signals: at least one tape created (0/1) */
289    char branchSwitchWarning;
290    TapeInfos *currentTapeInfosPtr;
291#ifdef __cplusplus
292    StoreManager *storeManagerPtr;
293    GlobalTapeVarsCL();
294    ~GlobalTapeVarsCL();
295    const GlobalTapeVarsCL& operator=(const GlobalTapeVarsCL&);
296#else
297    void *storeManagerPtr;
298#endif
299}
300GlobalTapeVars;
301
302#if defined(_OPENMP)
303
304extern int isParallel();
305
306#define ADOLC_TAPE_INFOS_BUFFER_DECL *tapeInfosBuffer
307#define ADOLC_TAPE_STACK_DECL *tapeStack
308#define ADOLC_CURRENT_TAPE_INFOS_DECL *currentTapeInfos
309#define ADOLC_CURRENT_TAPE_INFOS_FALLBACK_DECL *currentTapeInfos_fallBack
310#define ADOLC_GLOBAL_TAPE_VARS_DECL *globalTapeVars
311#define ADOLC_EXT_DIFF_FCTS_BUFFER_DECL *ADOLC_extDiffFctsBuffer
312#define ADOLC_CHECKPOINTS_STACK_DECL *ADOLC_checkpointsStack
313
314#define ADOLC_OPENMP_THREAD_NUMBER int ADOLC_threadNumber
315#if defined(ADOLC_THREADSAVE_ERRNO)
316#define ADOLC_OPENMP_GET_THREAD_NUMBER ADOLC_threadNumber = errno
317#define ADOLC_OPENMP_RESTORE_THREAD_NUMBER errno = ADOLC_threadNumber
318#else
319#define ADOLC_OPENMP_GET_THREAD_NUMBER ADOLC_threadNumber = omp_get_thread_num()
320#define ADOLC_OPENMP_RESTORE_THREAD_NUMBER
321#endif
322
323#define ADOLC_TAPE_INFOS_BUFFER tapeInfosBuffer[ADOLC_threadNumber]
324#define ADOLC_TAPE_STACK tapeStack[ADOLC_threadNumber]
325#define ADOLC_CURRENT_TAPE_INFOS currentTapeInfos[ADOLC_threadNumber]
326#define ADOLC_CURRENT_TAPE_INFOS_FALLBACK currentTapeInfos_fallBack[ADOLC_threadNumber]
327#define ADOLC_GLOBAL_TAPE_VARS globalTapeVars[ADOLC_threadNumber]
328#define ADOLC_EXT_DIFF_FCTS_BUFFER ADOLC_extDiffFctsBuffer[ADOLC_threadNumber]
329#define ADOLC_CHECKPOINTS_STACK ADOLC_checkpointsStack[ADOLC_threadNumber]
330#define REVOLVE_NUMBERS revolve_numbers[ADOLC_threadNumber]
331
332#else
333
334#define ADOLC_TAPE_INFOS_BUFFER_DECL tapeInfosBuffer
335#define ADOLC_TAPE_STACK_DECL tapeStack
336#define ADOLC_CURRENT_TAPE_INFOS_DECL currentTapeInfos
337#define ADOLC_CURRENT_TAPE_INFOS_FALLBACK_DECL currentTapeInfos_fallBack
338#define ADOLC_GLOBAL_TAPE_VARS_DECL globalTapeVars
339#define ADOLC_EXT_DIFF_FCTS_BUFFER_DECL ADOLC_extDiffFctsBuffer
340#define ADOLC_CHECKPOINTS_STACK_DECL ADOLC_checkpointsStack
341
342#define ADOLC_OPENMP_THREAD_NUMBER
343#define ADOLC_OPENMP_GET_THREAD_NUMBER
344#define ADOLC_OPENMP_RESTORE_THREAD_NUMBER
345
346#define ADOLC_TAPE_INFOS_BUFFER tapeInfosBuffer
347#define ADOLC_TAPE_STACK tapeStack
348#define ADOLC_CURRENT_TAPE_INFOS currentTapeInfos
349#define ADOLC_CURRENT_TAPE_INFOS_FALLBACK currentTapeInfos_fallBack
350#define ADOLC_GLOBAL_TAPE_VARS globalTapeVars
351#define ADOLC_EXT_DIFF_FCTS_BUFFER ADOLC_extDiffFctsBuffer
352#define ADOLC_CHECKPOINTS_STACK ADOLC_checkpointsStack
353#define REVOLVE_NUMBERS revolve_numbers
354
355#endif /* _OPENMP */
356
357extern TapeInfos ADOLC_CURRENT_TAPE_INFOS_DECL;
358extern TapeInfos ADOLC_CURRENT_TAPE_INFOS_FALLBACK_DECL;
359extern GlobalTapeVars ADOLC_GLOBAL_TAPE_VARS_DECL;
360
361/****************************************************************************/
362/* C Function interfaces                                                    */
363/****************************************************************************/
364
365int initNewTape(short tapeID);
366/* initializes a new tape
367 * - returns 0 on success
368 * - returns 1 in case tapeID is already/still in use */
369
370void openTape(short tapeID, char mode);
371/* opens an existing tape or creates a new one */
372
373void releaseTape();
374/* release the current tape and give control to the previous one
375 * if keepVS is not zero (keep value stack for reverse) => belonging TapeInfos
376 * are kept marked as being in use */
377
378TapeInfos *getTapeInfos(short tapeID);
379/* updates the tape infos for the given ID - a tapeInfos struct is created
380 * and registered if non is found but its state will remain "not in use" */
381
382#ifdef SPARSE
383void setTapeInfoJacSparse(short tapeID, SparseJacInfos sJinfos);
384/* updates the tape infos on sparse Jac for the given ID */
385
386void setTapeInfoHessSparse(short tapeID, SparseHessInfos sHinfos);
387/* updates the tape infos n sparse Hess for the given ID */
388#endif
389
390void take_stock();
391/* record all existing adoubles on the tape
392 * - intended to be used in start_trace only */
393
394locint keep_stock();
395/* record all remaining live variables on the value stack tape
396 * - turns off trace_flag
397 * - intended to be used in stop_trace only */
398
399void updateLocs();
400
401locint next_loc();
402/* returns the next free location in "adouble" memory */
403
404void free_loc(locint loc);
405/* frees the specified location in "adouble" memory */
406
407void taylor_begin(uint bufferSize, double **Tg, int degreeSave);
408/* set up statics for writing taylor data */
409
410void taylor_close(uint buffer);
411/* close taylor file if necessary and refill buffer if possible */
412
413void taylor_back(short tag, int* dep, int* ind, int* degree);
414/* initializes a reverse sweep */
415
416void write_taylor(locint loc, int keep);
417/* writes the block of size depth of taylor coefficients from point loc to
418 * the taylor buffer, if the buffer is filled, then it is written to the
419 * taylor tape */
420
421void write_taylors(locint loc, int keep, int degree, int numDir);
422/* writes the block of size depth of taylor coefficients from point loc to
423 * the taylor buffer, if the buffer is filled, then it is written to the
424 * taylor tape */
425
426#define ADOLC_WRITE_SCAYLOR(X) \
427    {\
428        if (ADOLC_CURRENT_TAPE_INFOS.currTay == ADOLC_CURRENT_TAPE_INFOS.lastTayP1)\
429            put_tay_block(ADOLC_CURRENT_TAPE_INFOS.lastTayP1);\
430        *ADOLC_CURRENT_TAPE_INFOS.currTay = (X);\
431        ++ADOLC_CURRENT_TAPE_INFOS.currTay;\
432    }
433/* writes a single element (x) to the taylor buffer and writes the buffer to
434 * disk if necessary */
435
436void write_scaylors(revreal *x, uint size);
437/* write_scaylors writes # size elements from x to the taylor buffer */
438
439#define ADOLC_OVERWRITE_SCAYLOR(X,Y) \
440    {\
441        *Y = *(ADOLC_CURRENT_TAPE_INFOS.currTay - 1);\
442        *(ADOLC_CURRENT_TAPE_INFOS.currTay - 1) = X;\
443    }
444/* overwrites the last (single) element (x) of the taylor buffer */
445
446#define ADOLC_DELETE_SCAYLOR(X) \
447    {\
448        --ADOLC_CURRENT_TAPE_INFOS.currTay;\
449        *X = *ADOLC_CURRENT_TAPE_INFOS.currTay;\
450    }
451/* deletes the last (single) element (x) of the taylor buffer */
452
453void put_tay_block(revreal *lastValP1);
454/* writes the taylor stack buffer onto hard disk */
455
456#define ADOLC_GET_TAYLOR(X) \
457    {\
458        if (ADOLC_CURRENT_TAPE_INFOS.currTay == ADOLC_CURRENT_TAPE_INFOS.tayBuffer)\
459            get_tay_block_r();\
460        --ADOLC_CURRENT_TAPE_INFOS.currTay;\
461        ADOLC_CURRENT_TAPE_INFOS.rp_T[X] = *ADOLC_CURRENT_TAPE_INFOS.currTay;\
462    }
463/* puts a taylor value from the value stack buffer to the taylor buffer */
464
465void get_taylors(locint loc, int degree);
466/* puts a block of taylor coefficients from the value stack buffer to the
467 * taylor buffer --- Higher Order Scalar */
468
469void get_taylors_p(locint loc, int degree, int numDir);
470/* puts a block of taylor coefficients from the value stack buffer to the
471 * taylor buffer --- Higher Order Vector */
472
473void get_tay_block_r();
474/* gets the next (previous block) of the value stack */
475
476
477
478void initTapeBuffers();
479/* free/allocate memory for buffers, initialize pointers */
480
481void start_trace();
482/* initialization for the taping process -> buffer allocation, sets
483 * files names, and calls appropriate setup routines */
484
485void stop_trace(int flag);
486/* stop Tracing, clean up, and turn off trace_flag */
487
488void close_tape(int flag);
489/* close open tapes, update stats and clean up */
490
491void freeTapeResources(TapeInfos *tapeInfos);
492/* free all resources used by a tape before overwriting the tape */
493
494void read_tape_stats(TapeInfos *tapeInfos);
495/* does the actual reading from the hard disk into the stats buffer */
496
497void init_for_sweep(short tag);
498/* initialize a forward sweep, get stats, open tapes, fill buffers, ... */
499
500void init_rev_sweep(short tag);
501/* initialize a reverse sweep, get stats, open tapes, fill buffers, ... */
502
503void end_sweep();
504/* finish a forward or reverse sweep */
505
506
507
508void fail(int error);
509/* outputs an appropriate error message using DIAG_OUT and exits the running
510 * program */
511
512/* print an error message describing the error number */
513void printError();
514
515char *createFileName(short tapeID, int tapeType);
516/* create file name depending on tape type and number */
517
518
519
520void put_op(unsigned char op);
521/* puts an operation into the operation buffer, ensures that location buffer
522 * and constants buffer are prepared to take the belonging stuff */
523
524void put_op_block(unsigned char *lastOpP1);
525/* writes a block of operations onto hard disk and handles file creation,
526 * removal, ... */
527
528void get_op_block_f();
529/* reads the next operations block into the internal buffer */
530
531void get_op_block_r();
532/* reads the previous block of operations into the internal buffer */
533
534#define ADOLC_PUT_LOCINT(X) \
535    {\
536        *ADOLC_CURRENT_TAPE_INFOS.currLoc = X;\
537        ++ADOLC_CURRENT_TAPE_INFOS.currLoc;\
538    }
539/* puts a single locations into the location buffer, no disk access */
540
541void put_loc_block(locint *lastLocP1);
542/* writes a block of locations onto hard disk and handles file creation,
543 * removal, ... */
544
545void get_loc_block_f();
546/* reads the next block of locations into the internal buffer */
547
548void get_loc_block_r();
549/* reads the previous block of locations into the internal buffer */
550
551#define ADOLC_PUT_VAL(X) \
552    {\
553        *ADOLC_CURRENT_TAPE_INFOS.currVal = X;\
554        ++ADOLC_CURRENT_TAPE_INFOS.currVal;\
555    }
556/* puts a single constant into the location buffer, no disk access */
557
558void put_vals_writeBlock(double *reals, locint numReals);
559/* fill the constants buffer and write it to disk */
560
561void put_vals_notWriteBlock(double *reals, locint numReals);
562/* write some constants to the buffer without disk access */
563
564void put_val_block(double *lastValP1);
565/* writes a block of constants (real) onto hard disk and handles file
566 * creation, removal, ... */
567
568void get_val_block_f();
569/* reads the next block of constants into the internal buffer */
570
571void get_val_block_r();
572/* reads the previous block of constants into the internal buffer */
573
574locint get_val_space(void);
575/* returns the number of free constants in the real tape, ensures that it
576 * is at least 5 */
577
578double *get_val_v_f(locint size);
579/* return a pointer to the first element of a constants vector
580 * -- Forward Mode -- */
581
582double *get_val_v_r(locint size);
583/* return a pointer to the first element of a constants vector
584 * -- Reverse Mode -- */
585
586
587
588/* suspicious function, maybe for vector class - kept for compatibility */
589void reset_val_r();
590
591/* updates */
592int upd_resloc(locint temp, locint lhs);
593
594int upd_resloc_inc_prod(locint temp, locint newlhs, unsigned char newop);
595
596/* special IEEE values */
597double make_nan();
598
599double make_inf();
600
601
602
603#if !defined(ADOLC_HARDDEBUG)
604/*--------------------------------------------------------------------------*/
605/*                                                        MACRO or FUNCTION */
606#define get_op_f() *ADOLC_CURRENT_TAPE_INFOS.currOp++
607#define get_op_r() *--ADOLC_CURRENT_TAPE_INFOS.currOp
608
609#define get_locint_f() *ADOLC_CURRENT_TAPE_INFOS.currLoc++
610#define get_locint_r() *--ADOLC_CURRENT_TAPE_INFOS.currLoc
611
612#define get_val_f() *ADOLC_CURRENT_TAPE_INFOS.currVal++
613#define get_val_r() *--ADOLC_CURRENT_TAPE_INFOS.currVal
614#else /* HARDDEBUG */
615unsigned char get_op_f();
616unsigned char get_op_r();
617
618locint get_locint_f();
619locint get_locint_r();
620
621double get_val_f();
622double get_val_r();
623#endif
624
625/* tries to read a local config file containing, e.g., buffer sizes */
626void readConfigFile();
627
628/* clear the tapeBaseNames that were alocated above in readConfigFile() */
629void clearTapeBaseNames();
630
631/****************************************************************************/
632/* This function sets the flag "newTape" if either a taylor buffer has been */
633/* created or a taping process has been performed. Calling the function is  */
634/* also useful to "convince" the linker of including the cleaner part into  */
635/* the binary when linking statically!                                      */
636/****************************************************************************/
637void markNewTape();
638
639END_C_DECLS
640
641/****************************************************************************/
642/* That's all                                                               */
643/****************************************************************************/
644
645#endif /* ADOLC_TAPING_P_H */
646
647
Note: See TracBrowser for help on using the repository browser.