Sacado Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
fad_expr_funcs.hpp
Go to the documentation of this file.
1 // @HEADER
2 // *****************************************************************************
3 // Sacado Package
4 //
5 // Copyright 2006 NTESS and the Sacado contributors.
6 // SPDX-License-Identifier: LGPL-2.1-or-later
7 // *****************************************************************************
8 // @HEADER
9 
10 #ifndef FAD_EXPR_FUNCS_HPP
11 #define FAD_EXPR_FUNCS_HPP
12 
13 #include "Sacado.hpp"
14 #include "Sacado_Fad_SimpleFad.hpp"
15 
16 // ADOL-C includes
17 #ifdef HAVE_ADOLC
18 #ifdef PACKAGE
19 #undef PACKAGE
20 #endif
21 #ifdef PACKAGE_NAME
22 #undef PACKAGE_NAME
23 #endif
24 #ifdef PACKAGE_BUGREPORT
25 #undef PACKAGE_BUGREPORT
26 #endif
27 #ifdef PACKAGE_STRING
28 #undef PACKAGE_STRING
29 #endif
30 #ifdef PACKAGE_TARNAME
31 #undef PACKAGE_TARNAME
32 #endif
33 #ifdef PACKAGE_VERSION
34 #undef PACKAGE_VERSION
35 #endif
36 #ifdef VERSION
37 #undef VERSION
38 #endif
39 //#define ADOLC_TAPELESS
40 #define NUMBER_DIRECTIONS 100
41 #include "adolc/adouble.h"
42 #include "adolc/drivers/drivers.h"
43 #include "adolc/interfaces.h"
44 #include "adolc/taping.h"
45 #endif
46 
47 struct ExprFuncs {
48  static const int nfunc = 8;
49  static const char* mult_names[nfunc];
50  static const char* nest_names[nfunc];
51  static const char* add_names[nfunc];
52  static const int nx_max = 21;
53 
54  template <typename T, int N> struct mult {};
55  template <typename T, int N> struct mult_base { static const int n = N+1; };
56 
57  template <typename T, int N> struct add {};
58  template <typename T, int N> struct add_base { static const int n = N+1; };
59 
60  template <typename T, int N> struct nest {};
61  template <typename T, int N> struct nest_base { static const int n = 1; };
62 };
63 
64 template <typename T> struct ExprFuncs::mult<T,1> : public mult_base<T,1> {
65  void operator()(const T x[], T& y) const; };
66 template <typename T> struct ExprFuncs::mult<T,2> : public mult_base<T,2> {
67  void operator()(const T x[], T& y) const; };
68 template <typename T> struct ExprFuncs::mult<T,3> : public mult_base<T,3> {
69  void operator()(const T x[], T& y) const; };
70 template <typename T> struct ExprFuncs::mult<T,4> : public mult_base<T,4> {
71  void operator()(const T x[], T& y) const; };
72 template <typename T> struct ExprFuncs::mult<T,5> : public mult_base<T,5> {
73  void operator()(const T x[], T& y) const; };
74 template <typename T> struct ExprFuncs::mult<T,10> : public mult_base<T,10> {
75  void operator()(const T x[], T& y) const; };
76 template <typename T> struct ExprFuncs::mult<T,15> : public mult_base<T,15> {
77  void operator()(const T x[], T& y) const; };
78 template <typename T> struct ExprFuncs::mult<T,20> : public mult_base<T,20> {
79  void operator()(const T x[], T& y) const; };
80 
81 template <typename T> struct ExprFuncs::add<T,1> : public add_base<T,1> {
82  void operator()(const T x[], T& y) const; };
83 template <typename T> struct ExprFuncs::add<T,2> : public add_base<T,2> {
84  void operator()(const T x[], T& y) const; };
85 template <typename T> struct ExprFuncs::add<T,3> : public add_base<T,3> {
86  void operator()(const T x[], T& y) const; };
87 template <typename T> struct ExprFuncs::add<T,4> : public add_base<T,4> {
88  void operator()(const T x[], T& y) const; };
89 template <typename T> struct ExprFuncs::add<T,5> : public add_base<T,5> {
90  void operator()(const T x[], T& y) const; };
91 template <typename T> struct ExprFuncs::add<T,10> : public add_base<T,10> {
92  void operator()(const T x[], T& y) const; };
93 template <typename T> struct ExprFuncs::add<T,15> : public add_base<T,15> {
94  void operator()(const T x[], T& y) const; };
95 template <typename T> struct ExprFuncs::add<T,20> : public add_base<T,20> {
96  void operator()(const T x[], T& y) const; };
97 
98 
99 template <typename T> struct ExprFuncs::nest<T,1> : public nest_base<T,1> {
100  void operator()(const T x[], T& y) const; };
101 template <typename T> struct ExprFuncs::nest<T,2> : public nest_base<T,2> {
102  void operator()(const T x[], T& y) const; };
103 template <typename T> struct ExprFuncs::nest<T,3> : public nest_base<T,3> {
104  void operator()(const T x[], T& y) const; };
105 template <typename T> struct ExprFuncs::nest<T,4> : public nest_base<T,4> {
106  void operator()(const T x[], T& y) const; };
107 template <typename T> struct ExprFuncs::nest<T,5> : public nest_base<T,5> {
108  void operator()(const T x[], T& y) const; };
109 template <typename T> struct ExprFuncs::nest<T,10> : public nest_base<T,10> {
110  void operator()(const T x[], T& y) const; };
111 template <typename T> struct ExprFuncs::nest<T,15> : public nest_base<T,15> {
112  void operator()(const T x[], T& y) const; };
113 template <typename T> struct ExprFuncs::nest<T,20> : public nest_base<T,20> {
114  void operator()(const T x[], T& y) const; };
115 
116 #endif
static const int nx_max
#define T
Definition: Sacado_rad.hpp:553
static const char * mult_names[nfunc]
static const int n
static const char * add_names[nfunc]
const int N
static const int n
static const int nfunc
static const int n
static const char * nest_names[nfunc]
const double y