source: CIVL/examples/compare/provesa/runtime_dense_reverse/ad_tape.c

main
Last change on this file was ea777aa, checked in by Alex Wilton <awilton@…>, 3 years ago

Moved examples, include, build_default.properties, common.xml, and README out from dev.civl.com into the root of the repo.

git-svn-id: svn://vsl.cis.udel.edu/civl/trunk@5704 fb995dde-84ed-4084-dfe6-e5aef3e2452c

  • Property mode set to 100644
File size: 1.5 KB
Line 
1/*!#########################################################
2! This file is part of OpenAD released under the LGPL. #
3! The full COPYRIGHT notice can be found in the top #
4! level directory of the OpenAD distribution #
5!#########################################################
6*/
7
8#include <stdio.h>
9#include "ad_tape.h"
10
11/* Globals */
12double __ADIC_double_tape[max_double_tape_size] = {0};
13int __ADIC_integer_tape[max_integer_tape_size] = {0};
14int __ADIC_logical_tape[max_logical_tape_size] = {0};
15char* __ADIC_character_tape[max_character_tape_size] = {0};
16int __ADIC_stringlength_tape[max_stringlength_tape_size] = {0};
17
18 int __ADIC_double_tape_pointer= 0, __ADIC_integer_tape_pointer = 0 , __ADIC_logical_tape_pointer = 0, __ADIC_character_tape_pointer = 0, __ADIC_stringlength_tape_pointer =0;
19
20
21 void __ADIC_TapeInit()
22 {
23 __ADIC_double_tape_pointer = 0;
24 __ADIC_integer_tape_pointer = 0;
25 __ADIC_logical_tape_pointer = 0;
26 __ADIC_character_tape_pointer = 0;
27 __ADIC_stringlength_tape_pointer = 0;
28 }
29
30
31
32 void __ADIC_TapeDump()
33 {
34 int i;
35 printf("\n double tape");
36 for (i=0; i < __ADIC_double_tape_pointer; i++)
37 printf("\n %lf", __ADIC_double_tape[i]);
38
39 printf("\n integer tape");
40 for(i=0; i < __ADIC_integer_tape_pointer; i++)
41 printf("\n %d", __ADIC_integer_tape[i]);
42
43 printf("\n logical tape");
44 for(i=0; i < __ADIC_logical_tape_pointer; i++)
45 printf("\n %d", __ADIC_logical_tape[i]);
46
47 }
48
49
50
Note: See TracBrowser for help on using the repository browser.