/*! \file
 *
 *  \brief This file is for testing all pieces and all steps
 *
 *   \authors Boyana Norris, Beata Winnicka, Paul Hovland
 *    \version $Id: ad_vec_types.h 286 2006-06-23 15:44:31Z norris $
 *
 *     Copyright (c) 2006, Argonne National Laboratory <br>
 *      All rights reserved. <br>
 *       See $ADIC_DIR/share/ADIC_Copyright.txt for details. <br>
 *
 *        */

#include "ad_grad.h"
#include "ad_types.h"
#include "stdlib.h"
#include "stdio.h"

int __adic_grad_size = 0;
int __adic_total_grad_size = 0;
int __adic_grad_size_shadow = 0;
int __adic_mode = -1;

void ADIC_Init(void)
{
  __adic_grad_size_shadow = 0;
  __adic_grad_size = 0;
}

void ADIC_Finalize(void)
{
}

int __ADIC_IncrShadowVar(void)
{
  int tmp =  __adic_grad_size_shadow;

  __adic_grad_size_shadow++;
  return tmp;
}

void __ADIC_CommitShadowVar(void)
{
  __adic_grad_size = __adic_grad_size_shadow;
}

void __ADIC_ResetShadowVar(void)
{
  __adic_grad_size_shadow = 0;
}

int __ADIC_GradSize(void)
{
  return __adic_grad_size;
}

void ADIC_SetForwardMode(void)
{
  __adic_mode = 0;
}

void ADIC_SetReverseMode(void)
{
  __adic_mode = 1;
}

int ADIC_GetMode(void)
{
  return __adic_mode;
}


