source: CIVL/examples/compare/provesa/runtime_dense_reverse/ad_grad.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: 901 bytes
RevLine 
[4d61ad0]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#include "ad_grad.h"
7
8
9int __adic_grad_size = 0;
10int __adic_total_grad_size = 0;
11int __adic_grad_size_shadow = 0;
12int __adic_mode = -1;
13
14void ADIC_Init()
15{
16 __adic_grad_size_shadow = 0;
17 __adic_grad_size = 0;
18}
19
20void ADIC_Finalize()
21{
22}
23
24int __ADIC_IncrShadowVar()
25{
26 return __adic_grad_size_shadow++;
27}
28
29void __ADIC_CommitShadowVar()
30{
31 __adic_grad_size = __adic_grad_size_shadow;
32}
33
34void __ADIC_ResetShadowVar()
35{
36 __adic_grad_size_shadow = 0;
37}
38
39void ADIC_SetForwardMode()
40{
41 __adic_mode = 0;
42}
43
44void ADIC_SetReverseMode()
45{
46 __adic_mode = 1;
47}
48
49int ADIC_GetMode()
50{
51 return __adic_mode;
52}
Note: See TracBrowser for help on using the repository browser.