Revision 692 branches/merge-trunk-davef/src/linad99/fvar.hpp

fvar.hpp (revision 692)
2 2
 * $Id$
3 3
 *
4 4
 * Author: David Fournier
5
 * Copyright (c) 2008-2012 Regents of the University of California
5
 * Copyright (c) 2008-2011 Regents of the University of California
6
 * 
7
 * License:
6 8
 *
7 9
 * ADModelbuilder and associated libraries and documentations are
8 10
 * provided under the general terms of the "New BSD" license
9 11
 * 
10
 * License:
11
 * 
12 12
 * Redistribution and use in source and binary forms, with or without
13 13
 * modification, are permitted provided that the following conditions are
14 14
 * met:
......
38 38
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
39 39
 *
40 40
 */
41
#ifndef FVAR_HPP
42
#define FVAR_HPP
43 41
/** \file fvar.hpp
44 42
AUTODIF classes.
45
Class definitions for reverse mode automatic differentiation.
46
Function prototypes for math functions.
47
Macro definitions.
43
A more detailed description might someday be written.
48 44
*/
49 45

  
50
#include <math.h>
51 46
// Borrow definition of M_PI from GCC
52 47
#ifndef M_PI
53
#   define M_PI 3.14159265358979323846
48
  #define M_PI 3.14159265358979323846
54 49
#endif
55 50
#ifndef PI
56
#   define PI 3.14159265358979323846
51
  #define PI 3.14159265358979323846
57 52
#endif
58 53

  
54
#if defined(__MSVC32__) || defined(__MINGW32__) || defined(__MINGW64__)
55
#  define sleep(n) Sleep(1000 * n)
56
#endif
57

  
59 58
#if defined(__GNUDOS__)
60
#   if defined(__GNUC__)
61
#      if (__GNUC__ < 3)
62
#         pragma interface
63
#      endif
64
#   else
65
#      pragma interface
66
#   endif
59
  #if defined(__GNUC__)
60
    #if (__GNUC__ < 3)
61
      #pragma interface
62
    #endif
63
  #else
64
    #pragma interface
65
  #endif
67 66
#endif
68 67

  
69 68

  
70
#if defined(_MSC_VER)
71
#   if defined(__MSVC32__)
72
#      undef __MSVC32__
73
#   endif
74
#   if (_MSC_VER>=1200  && _MSC_VER<1300)
69
#if defined(_MSC_VER) 
70
#  if defined(__MSVC32__)
71
#    undef __MSVC32__
72
#  endif
73
#  if (_MSC_VER>=1200  && _MSC_VER<1300)
75 74
#      define __MSVC32__ 6
76
#   endif
77
#   if (_MSC_VER>=1300  && _MSC_VER<1400)
75
#  endif
76
#  if (_MSC_VER>=1300  && _MSC_VER<1400)
78 77
#      define __MSVC32__ 7
79
#   endif
80
#   if (_MSC_VER>=1400)
78
#  endif
79
#  if (_MSC_VER>=1400) 
81 80
#      define __MSVC32__ 8
82
#   endif
83
#   if (__MSVC32__>=7)
84
#      define __MSC_NEWER__
85
#   endif
81
#  endif
86 82
#endif
87 83

  
84

  
85
//#define USE_DDOUBLE
86
//#define THREAD_EXPERIMENT
88 87
#if defined(THREAD_EXPERIMENT)
89
#   define THREAD_SAFE
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff