Sacado Package Browser (Single Doxygen Collection)
Version of the Day
Toggle main menu visibility
Loading...
Searching...
No Matches
test
performance
fad_expr_funcs.hpp
Go to the documentation of this file.
1
// @HEADER
2
// ***********************************************************************
3
//
4
// Sacado Package
5
// Copyright (2006) Sandia Corporation
6
//
7
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
8
// the U.S. Government retains certain rights in this software.
9
//
10
// This library is free software; you can redistribute it and/or modify
11
// it under the terms of the GNU Lesser General Public License as
12
// published by the Free Software Foundation; either version 2.1 of the
13
// License, or (at your option) any later version.
14
//
15
// This library is distributed in the hope that it will be useful, but
16
// WITHOUT ANY WARRANTY; without even the implied warranty of
17
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18
// Lesser General Public License for more details.
19
//
20
// You should have received a copy of the GNU Lesser General Public
21
// License along with this library; if not, write to the Free Software
22
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
23
// USA
24
// Questions? Contact David M. Gay (dmgay@sandia.gov) or Eric T. Phipps
25
// (etphipp@sandia.gov).
26
//
27
// ***********************************************************************
28
// @HEADER
29
30
#ifndef FAD_EXPR_FUNCS_HPP
31
#define FAD_EXPR_FUNCS_HPP
32
33
#include "
Sacado.hpp
"
34
#include "
Sacado_Fad_SimpleFad.hpp
"
35
36
// ADOL-C includes
37
#ifdef HAVE_ADOLC
38
#ifdef PACKAGE
39
#undef PACKAGE
40
#endif
41
#ifdef PACKAGE_NAME
42
#undef PACKAGE_NAME
43
#endif
44
#ifdef PACKAGE_BUGREPORT
45
#undef PACKAGE_BUGREPORT
46
#endif
47
#ifdef PACKAGE_STRING
48
#undef PACKAGE_STRING
49
#endif
50
#ifdef PACKAGE_TARNAME
51
#undef PACKAGE_TARNAME
52
#endif
53
#ifdef PACKAGE_VERSION
54
#undef PACKAGE_VERSION
55
#endif
56
#ifdef VERSION
57
#undef VERSION
58
#endif
59
//#define ADOLC_TAPELESS
60
#define NUMBER_DIRECTIONS 100
61
#include "adolc/adouble.h"
62
#include "adolc/drivers/drivers.h"
63
#include "adolc/interfaces.h"
64
#include "adolc/taping.h"
65
#endif
66
67
struct
ExprFuncs
{
68
static
const
int
nfunc
= 8;
69
static
const
char
*
mult_names
[
nfunc
];
70
static
const
char
*
nest_names
[
nfunc
];
71
static
const
char
*
add_names
[
nfunc
];
72
static
const
int
nx_max
= 21;
73
74
template
<
typename
T,
int
N>
struct
mult
{};
75
template
<
typename
T,
int
N>
struct
mult_base
{
static
const
int
n
=
N
+1; };
76
77
template
<
typename
T,
int
N>
struct
add
{};
78
template
<
typename
T,
int
N>
struct
add_base
{
static
const
int
n
=
N
+1; };
79
80
template
<
typename
T,
int
N>
struct
nest
{};
81
template
<
typename
T,
int
N>
struct
nest_base
{
static
const
int
n
= 1; };
82
};
83
84
template
<
typename
T>
struct
ExprFuncs::mult
<
T
,1> :
public
mult_base
<T,1> {
85
void
operator()
(
const
T
x[],
T
& y)
const
; };
86
template
<
typename
T>
struct
ExprFuncs::mult
<
T
,2> :
public
mult_base
<T,2> {
87
void
operator()
(
const
T
x[],
T
& y)
const
; };
88
template
<
typename
T>
struct
ExprFuncs::mult
<
T
,3> :
public
mult_base
<T,3> {
89
void
operator()
(
const
T
x[],
T
& y)
const
; };
90
template
<
typename
T>
struct
ExprFuncs::mult
<
T
,4> :
public
mult_base
<T,4> {
91
void
operator()
(
const
T
x[],
T
& y)
const
; };
92
template
<
typename
T>
struct
ExprFuncs::mult
<
T
,5> :
public
mult_base
<T,5> {
93
void
operator()
(
const
T
x[],
T
& y)
const
; };
94
template
<
typename
T>
struct
ExprFuncs::mult
<
T
,10> :
public
mult_base
<T,10> {
95
void
operator()
(
const
T
x[],
T
& y)
const
; };
96
template
<
typename
T>
struct
ExprFuncs::mult
<
T
,15> :
public
mult_base
<T,15> {
97
void
operator()
(
const
T
x[],
T
& y)
const
; };
98
template
<
typename
T>
struct
ExprFuncs::mult
<
T
,20> :
public
mult_base
<T,20> {
99
void
operator()
(
const
T
x[],
T
& y)
const
; };
100
101
template
<
typename
T>
struct
ExprFuncs::add
<
T
,1> :
public
add_base
<T,1> {
102
void
operator()
(
const
T
x[],
T
& y)
const
; };
103
template
<
typename
T>
struct
ExprFuncs::add
<
T
,2> :
public
add_base
<T,2> {
104
void
operator()
(
const
T
x[],
T
& y)
const
; };
105
template
<
typename
T>
struct
ExprFuncs::add
<
T
,3> :
public
add_base
<T,3> {
106
void
operator()
(
const
T
x[],
T
& y)
const
; };
107
template
<
typename
T>
struct
ExprFuncs::add
<
T
,4> :
public
add_base
<T,4> {
108
void
operator()
(
const
T
x[],
T
& y)
const
; };
109
template
<
typename
T>
struct
ExprFuncs::add
<
T
,5> :
public
add_base
<T,5> {
110
void
operator()
(
const
T
x[],
T
& y)
const
; };
111
template
<
typename
T>
struct
ExprFuncs::add
<
T
,10> :
public
add_base
<T,10> {
112
void
operator()
(
const
T
x[],
T
& y)
const
; };
113
template
<
typename
T>
struct
ExprFuncs::add
<
T
,15> :
public
add_base
<T,15> {
114
void
operator()
(
const
T
x[],
T
& y)
const
; };
115
template
<
typename
T>
struct
ExprFuncs::add
<
T
,20> :
public
add_base
<T,20> {
116
void
operator()
(
const
T
x[],
T
& y)
const
; };
117
118
119
template
<
typename
T>
struct
ExprFuncs::nest
<
T
,1> :
public
nest_base
<T,1> {
120
void
operator()
(
const
T
x[],
T
& y)
const
; };
121
template
<
typename
T>
struct
ExprFuncs::nest
<
T
,2> :
public
nest_base
<T,2> {
122
void
operator()
(
const
T
x[],
T
& y)
const
; };
123
template
<
typename
T>
struct
ExprFuncs::nest
<
T
,3> :
public
nest_base
<T,3> {
124
void
operator()
(
const
T
x[],
T
& y)
const
; };
125
template
<
typename
T>
struct
ExprFuncs::nest
<
T
,4> :
public
nest_base
<T,4> {
126
void
operator()
(
const
T
x[],
T
& y)
const
; };
127
template
<
typename
T>
struct
ExprFuncs::nest
<
T
,5> :
public
nest_base
<T,5> {
128
void
operator()
(
const
T
x[],
T
& y)
const
; };
129
template
<
typename
T>
struct
ExprFuncs::nest
<
T
,10> :
public
nest_base
<T,10> {
130
void
operator()
(
const
T
x[],
T
& y)
const
; };
131
template
<
typename
T>
struct
ExprFuncs::nest
<
T
,15> :
public
nest_base
<T,15> {
132
void
operator()
(
const
T
x[],
T
& y)
const
; };
133
template
<
typename
T>
struct
ExprFuncs::nest
<
T
,20> :
public
nest_base
<T,20> {
134
void
operator()
(
const
T
x[],
T
& y)
const
; };
135
136
#endif
Sacado.hpp
Sacado_Fad_SimpleFad.hpp
T
#define T
Definition
Sacado_rad.hpp:573
N
const int N
Definition
SafeSqrtTests.cpp:37
ExprFuncs::add< T, 10 >::operator()
void operator()(const T x[], T &y) const
Definition
fad_expr_funcs.cpp:163
ExprFuncs::add< T, 15 >::operator()
void operator()(const T x[], T &y) const
Definition
fad_expr_funcs.cpp:170
ExprFuncs::add< T, 1 >::operator()
void operator()(const T x[], T &y) const
Definition
fad_expr_funcs.cpp:133
ExprFuncs::add< T, 20 >::operator()
void operator()(const T x[], T &y) const
Definition
fad_expr_funcs.cpp:177
ExprFuncs::add< T, 2 >::operator()
void operator()(const T x[], T &y) const
Definition
fad_expr_funcs.cpp:139
ExprFuncs::add< T, 3 >::operator()
void operator()(const T x[], T &y) const
Definition
fad_expr_funcs.cpp:145
ExprFuncs::add< T, 4 >::operator()
void operator()(const T x[], T &y) const
Definition
fad_expr_funcs.cpp:151
ExprFuncs::add< T, 5 >::operator()
void operator()(const T x[], T &y) const
Definition
fad_expr_funcs.cpp:157
ExprFuncs::add_base
Definition
fad_expr_funcs.hpp:78
ExprFuncs::add_base::n
static const int n
Definition
fad_expr_funcs.hpp:78
ExprFuncs::add
Definition
fad_expr_funcs.hpp:77
ExprFuncs::mult< T, 10 >::operator()
void operator()(const T x[], T &y) const
Definition
fad_expr_funcs.cpp:65
ExprFuncs::mult< T, 15 >::operator()
void operator()(const T x[], T &y) const
Definition
fad_expr_funcs.cpp:72
ExprFuncs::mult< T, 1 >::operator()
void operator()(const T x[], T &y) const
Definition
fad_expr_funcs.cpp:35
ExprFuncs::mult< T, 20 >::operator()
void operator()(const T x[], T &y) const
Definition
fad_expr_funcs.cpp:79
ExprFuncs::mult< T, 2 >::operator()
void operator()(const T x[], T &y) const
Definition
fad_expr_funcs.cpp:41
ExprFuncs::mult< T, 3 >::operator()
void operator()(const T x[], T &y) const
Definition
fad_expr_funcs.cpp:47
ExprFuncs::mult< T, 4 >::operator()
void operator()(const T x[], T &y) const
Definition
fad_expr_funcs.cpp:53
ExprFuncs::mult< T, 5 >::operator()
void operator()(const T x[], T &y) const
Definition
fad_expr_funcs.cpp:59
ExprFuncs::mult_base
Definition
fad_expr_funcs.hpp:75
ExprFuncs::mult_base::n
static const int n
Definition
fad_expr_funcs.hpp:75
ExprFuncs::mult
Definition
fad_expr_funcs.hpp:74
ExprFuncs::nest< T, 10 >::operator()
void operator()(const T x[], T &y) const
Definition
fad_expr_funcs.cpp:112
ExprFuncs::nest< T, 15 >::operator()
void operator()(const T x[], T &y) const
Definition
fad_expr_funcs.cpp:118
ExprFuncs::nest< T, 1 >::operator()
void operator()(const T x[], T &y) const
Definition
fad_expr_funcs.cpp:87
ExprFuncs::nest< T, 20 >::operator()
void operator()(const T x[], T &y) const
Definition
fad_expr_funcs.cpp:125
ExprFuncs::nest< T, 2 >::operator()
void operator()(const T x[], T &y) const
Definition
fad_expr_funcs.cpp:92
ExprFuncs::nest< T, 3 >::operator()
void operator()(const T x[], T &y) const
Definition
fad_expr_funcs.cpp:97
ExprFuncs::nest< T, 4 >::operator()
void operator()(const T x[], T &y) const
Definition
fad_expr_funcs.cpp:102
ExprFuncs::nest< T, 5 >::operator()
void operator()(const T x[], T &y) const
Definition
fad_expr_funcs.cpp:107
ExprFuncs::nest_base
Definition
fad_expr_funcs.hpp:81
ExprFuncs::nest_base::n
static const int n
Definition
fad_expr_funcs.hpp:81
ExprFuncs::nest
Definition
fad_expr_funcs.hpp:80
ExprFuncs
Definition
fad_expr_funcs.hpp:67
ExprFuncs::nfunc
static const int nfunc
Definition
fad_expr_funcs.hpp:68
ExprFuncs::nest_names
static const char * nest_names[nfunc]
Definition
fad_expr_funcs.hpp:195
ExprFuncs::add_names
static const char * add_names[nfunc]
Definition
fad_expr_funcs.hpp:206
ExprFuncs::nx_max
static const int nx_max
Definition
fad_expr_funcs.hpp:72
ExprFuncs::mult_names
static const char * mult_names[nfunc]
Definition
fad_expr_funcs.hpp:184
Generated by
1.17.0