Sacado Package Browser (Single Doxygen Collection)
Version of the Day
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
src
Sacado_Fad_Ops_Fwd.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
// ***********************************************************************
9
//
10
// The forward-mode AD classes in Sacado are a derivative work of the
11
// expression template classes in the Fad package by Nicolas Di Cesare.
12
// The following banner is included in the original Fad source code:
13
//
14
// ************ DO NOT REMOVE THIS BANNER ****************
15
//
16
// Nicolas Di Cesare <Nicolas.Dicesare@ann.jussieu.fr>
17
// http://www.ann.jussieu.fr/~dicesare
18
//
19
// CEMRACS 98 : C++ courses,
20
// templates : new C++ techniques
21
// for scientific computing
22
//
23
//********************************************************
24
//
25
// A short implementation ( not all operators and
26
// functions are overloaded ) of 1st order Automatic
27
// Differentiation in forward mode (FAD) using
28
// EXPRESSION TEMPLATES.
29
//
30
//********************************************************
31
// @HEADER
32
33
#ifndef SACADO_FAD_OPS_FWD_HPP
34
#define SACADO_FAD_OPS_FWD_HPP
35
36
#include <type_traits>
37
38
namespace
Sacado {
39
40
template
<
typename
T>
struct
IsSimdType;
41
template
<
typename
T>
struct
IsFad;
42
template
<
typename
T>
struct
ValueType;
43
44
namespace
Fad {
45
46
template
<
typename
ExprT>
class
UnaryPlusOp
;
47
template
<
typename
ExprT>
class
UnaryMinusOp
;
48
template
<
typename
ExprT>
class
ExpOp
;
49
template
<
typename
ExprT>
class
LogOp
;
50
template
<
typename
ExprT>
class
Log10Op
;
51
template
<
typename
ExprT>
class
SqrtOp
;
52
template
<
typename
ExprT>
class
CosOp
;
53
template
<
typename
ExprT>
class
SinOp
;
54
template
<
typename
ExprT>
class
TanOp
;
55
template
<
typename
ExprT>
class
ACosOp
;
56
template
<
typename
ExprT>
class
ASinOp
;
57
template
<
typename
ExprT>
class
ATanOp
;
58
template
<
typename
ExprT>
class
CoshOp
;
59
template
<
typename
ExprT>
class
SinhOp
;
60
template
<
typename
ExprT>
class
TanhOp
;
61
template
<
typename
ExprT>
class
ACoshOp
;
62
template
<
typename
ExprT>
class
ASinhOp
;
63
template
<
typename
ExprT>
class
ATanhOp
;
64
template
<
typename
ExprT>
class
AbsOp
;
65
template
<
typename
ExprT>
class
FAbsOp
;
66
template
<
typename
ExprT>
class
CbrtOp
;
67
template <typename ExprT, bool is_simd = IsSimdType<ExprT>::value
>
68
class
SafeSqrtOp
;
69
70
template
<
typename
ExprT1,
typename
ExprT2>
class
AdditionOp
;
71
template
<
typename
ExprT1,
typename
ExprT2>
class
SubtractionOp
;
72
template
<
typename
ExprT1,
typename
ExprT2>
class
Multiplicationp
;
73
template
<
typename
ExprT1,
typename
ExprT2>
class
DivisionOp
;
74
template
<
typename
ExprT1,
typename
ExprT2>
class
Atan2Op
;
75
template
<
typename
ExprT1,
typename
ExprT2>
class
MaxOp
;
76
template
<
typename
ExprT1,
typename
ExprT2>
class
MinOp
;
77
78
namespace
PowerImpl {
79
struct
Simd
{};
80
struct
Nested
{};
81
struct
NestedSimd
{};
82
struct
Scalar
{};
83
84
template
<
typename
T1,
typename
T2>
85
struct
Selector
{
86
static
constexpr
bool
is_simd
=
87
IsSimdType<T1>::value
||
IsSimdType<T2>::value
;
88
static
constexpr
bool
is_fad
=
89
IsFad< typename Sacado::ValueType<T1>::type
>
::value
||
90
IsFad< typename Sacado::ValueType<T2>::type
>
::value
;
91
typedef
typename
std::conditional<
92
is_simd
&&
is_fad
,
93
NestedSimd
,
94
typename
std::conditional<
95
is_simd
,
96
Simd
,
97
typename
std::conditional<
98
is_fad
,
99
Nested
,
100
Scalar
>
::type
101
>
::type
102
>
::type
type
;
103
};
104
}
105
template
<
typename
ExprT1,
typename
ExprT2,
106
typename
Impl =
typename
PowerImpl::Selector<ExprT1,ExprT2>::type
>
107
class
PowerOp
;
108
109
}
// namespace Fad
110
111
}
// namespace Sacado
112
113
#endif // SACADO_FAD_EXPRESSION_HPP
Sacado::Fad::FAbsOp
Definition:
Sacado_Fad_Ops_Fwd.hpp:65
Sacado::Fad::ACosOp
Definition:
Sacado_Fad_Ops_Fwd.hpp:55
Sacado::Fad::SafeSqrtOp
Definition:
Sacado_Fad_Ops_Fwd.hpp:68
Sacado::Fad::ASinOp
Definition:
Sacado_Fad_Ops_Fwd.hpp:56
Sacado::Fad::ExpOp
Definition:
Sacado_Fad_Ops_Fwd.hpp:48
Sacado::IsFad
Base template specification for whether a type is a Fad type.
Definition:
Sacado_Fad_Exp_Ops_Fwd.hpp:18
Sacado::Fad::TanhOp
Definition:
Sacado_Fad_Ops_Fwd.hpp:60
Sacado::Fad::PowerImpl::Selector::is_fad
static constexpr bool is_fad
Definition:
Sacado_Fad_Ops_Fwd.hpp:88
Sacado::Fad::CosOp
Definition:
Sacado_Fad_Ops_Fwd.hpp:52
Sacado::Fad::Atan2Op
Definition:
Sacado_Fad_Ops_Fwd.hpp:74
Sacado::Fad::ACoshOp
Definition:
Sacado_Fad_Ops_Fwd.hpp:61
Sacado::Fad::PowerImpl::NestedSimd
Definition:
Sacado_Fad_Ops_Fwd.hpp:81
Sacado::Fad::DivisionOp
Definition:
Sacado_Fad_Ops_Fwd.hpp:73
Sacado::Fad::PowerImpl::Nested
Definition:
Sacado_Fad_Ops_Fwd.hpp:80
Sacado::Fad::UnaryPlusOp
Definition:
Sacado_Fad_Ops_Fwd.hpp:46
Sacado::Fad::SqrtOp
Definition:
Sacado_Fad_Ops_Fwd.hpp:51
Sacado::Fad::TanOp
Definition:
Sacado_Fad_Ops_Fwd.hpp:54
Sacado::IsSimdType
Base template specification for IsSimdType.
Definition:
Sacado_Fad_Exp_Ops_Fwd.hpp:17
Sacado::Fad::MinOp
Definition:
Sacado_Fad_Ops_Fwd.hpp:76
Sacado::Fad::AbsOp
Definition:
Sacado_Fad_Ops_Fwd.hpp:64
Sacado::Fad::SinhOp
Definition:
Sacado_Fad_Ops_Fwd.hpp:59
Sacado::Fad::CoshOp
Definition:
Sacado_Fad_Ops_Fwd.hpp:58
Sacado::Fad::PowerImpl::Scalar
Definition:
Sacado_Fad_Ops_Fwd.hpp:82
Sacado::Fad::PowerImpl::Selector::is_simd
static constexpr bool is_simd
Definition:
Sacado_Fad_Ops_Fwd.hpp:86
Sacado::Fad::CbrtOp
Definition:
Sacado_Fad_Ops_Fwd.hpp:66
Sacado::Fad::MaxOp
Definition:
Sacado_Fad_Ops_Fwd.hpp:75
Sacado::Fad::AdditionOp
Definition:
Sacado_Fad_Ops_Fwd.hpp:70
Sacado::Fad::ASinhOp
Definition:
Sacado_Fad_Ops_Fwd.hpp:62
Sacado::Fad::UnaryMinusOp
Definition:
Sacado_Fad_Ops_Fwd.hpp:47
Sacado::Fad::LogOp
Definition:
Sacado_Fad_Ops_Fwd.hpp:49
Sacado::Fad::Multiplicationp
Definition:
Sacado_Fad_Ops_Fwd.hpp:72
Sacado::Fad::Log10Op
Definition:
Sacado_Fad_Ops_Fwd.hpp:50
Sacado::Fad::PowerImpl::Selector
Definition:
Sacado_Fad_Ops_Fwd.hpp:85
value
int value
Definition:
gmock-matchers_test.cc:664
Sacado::Fad::ATanOp
Definition:
Sacado_Fad_Ops_Fwd.hpp:57
Sacado::Fad::SubtractionOp
Definition:
Sacado_Fad_Ops_Fwd.hpp:71
Sacado::Fad::ATanhOp
Definition:
Sacado_Fad_Ops_Fwd.hpp:63
Sacado::Fad::PowerImpl::Selector::type
std::conditional< is_simd &&is_fad, NestedSimd, typename std::conditional< is_simd, Simd, typename std::conditional< is_fad, Nested, Scalar >::type >::type >::type type
Definition:
Sacado_Fad_Ops_Fwd.hpp:102
Sacado::Fad::PowerImpl::Simd
Definition:
Sacado_Fad_Ops_Fwd.hpp:79
Sacado::Fad::SinOp
Definition:
Sacado_Fad_Ops_Fwd.hpp:53
Sacado::Fad::PowerOp
Definition:
Sacado_Fad_Ops.hpp:1127
Generated on Fri Dec 20 2024 09:23:41 for Sacado Package Browser (Single Doxygen Collection) by
1.8.5