Statistics
| Revision:

root / trunk / src / linad99 / gradchk.cpp @ 348

History | View | Annotate | Download (782 Bytes)

1
/*
2
 * $Id: gradchk.cpp 348 2012-03-21 23:07:07Z johnoel $
3
 *
4
 * Author: David Fournier
5
 * Copyright (c) 2008-2011 Regents of the University of California 
6
 */
7
/**
8
 * \file
9
 * Description not yet available.
10
 */
11
#include <fvar.hpp>
12

    
13
/**
14
 * Description not yet available.
15
 * \param
16
 */
17
void grad_chk(void)
18
{
19

    
20
  if(gradient_structure::GRAD_STACK1->ptr
21
       <= gradient_structure::GRAD_STACK1->ptr_first)
22
  {
23
    cout << " 0 offset in gradstack " << endl;
24
  }    // current is one past the end so -- it
25
  else
26
  {
27
#if defined(__x86_64)
28
    cout << intptr_t(gradient_structure::GRAD_STACK1->ptr)
29
            - intptr_t(gradient_structure::GRAD_STACK1->ptr_first)
30
#else
31
    cout << int(gradient_structure::GRAD_STACK1->ptr)
32
       -int(gradient_structure::GRAD_STACK1->ptr_first)
33
#endif
34
     << " offset in gradstack " << endl;
35
  }
36
}