42#ifndef STOKHOS_SACADO_KOKKOS_MATHFUNCTIONS_HPP
43#define STOKHOS_SACADO_KOKKOS_MATHFUNCTIONS_HPP
49#include "Kokkos_Macros.hpp"
51#ifdef HAVE_STOKHOS_ENSEMBLE_SCALAR_TYPE
53#if STOKHOS_USE_MP_VECTOR_SFS_SPEC
54#define UNARYFUNC_MACRO_SFS(OP,FADOP) \
56 template <typename O, typename T, int N, typename D> \
57 class StaticFixedStorage; \
61 template <typename S> class Vector; \
62 template <typename O, typename T, int N, typename D> \
63 KOKKOS_INLINE_FUNCTION \
64 Vector< Stokhos::StaticFixedStorage<O,T,N,D> > \
65 OP (const Vector< Stokhos::StaticFixedStorage<O,T,N,D> >&); \
69#define UNARYFUNC_MACRO_SFS(OP,FADOP)
72#define UNARYFUNC_MACRO(OP,FADOP) \
73UNARYFUNC_MACRO_SFS(OP,FADOP) \
77 template <typename T> class FADOP; \
78 template <typename T> class Expr; \
80 template <typename T> \
81 KOKKOS_INLINE_FUNCTION \
83 OP (const Expr<T>&); \
89 using Sacado::MP::OP; \
113#undef UNARYFUNC_MACRO
114#undef UNARYFUNC_MACRO_SFS
116#if STOKHOS_USE_MP_VECTOR_SFS_SPEC
117#define BINARYFUNC_MACRO_SFS(OP,FADOP) \
119 template <typename O, typename T, int N, typename D> \
120 class StaticFixedStorage; \
124 template <typename S> class Vector; \
125 template <typename O, typename T, int N, typename D> \
126 KOKKOS_INLINE_FUNCTION \
127 Vector< Stokhos::StaticFixedStorage<O,T,N,D> > \
128 OP (const Vector< Stokhos::StaticFixedStorage<O,T,N,D> >&, \
129 const Vector< Stokhos::StaticFixedStorage<O,T,N,D> >&); \
131 template <typename O, typename T, int N, typename D> \
132 KOKKOS_INLINE_FUNCTION \
133 Vector< Stokhos::StaticFixedStorage<O,T,N,D> > \
134 OP (const typename Vector< Stokhos::StaticFixedStorage<O,T,N,D> >::value_type&, \
135 const Vector< Stokhos::StaticFixedStorage<O,T,N,D> >&); \
137 template <typename O, typename T, int N, typename D> \
138 KOKKOS_INLINE_FUNCTION \
139 Vector< Stokhos::StaticFixedStorage<O,T,N,D> > \
140 OP (const Vector< Stokhos::StaticFixedStorage<O,T,N,D> >&, \
141 const typename Vector< Stokhos::StaticFixedStorage<O,T,N,D> >::value_type&); \
145#define BINARYFUNC_MACRO_SFS(OP,FADOP)
148#define BINARYFUNC_MACRO(OP,FADOP) \
149BINARYFUNC_MACRO_SFS(OP,FADOP) \
153 template <typename T1, typename T2> class FADOP; \
154 template <typename T> class Expr; \
156 template <typename T1, typename T2> \
157 KOKKOS_INLINE_FUNCTION \
159 OP (const Expr<T1>&, \
162 template <typename T> \
163 KOKKOS_INLINE_FUNCTION \
164 FADOP< typename T::value_type, T > \
165 OP (const typename T::value_type&, \
168 template <typename T> \
169 KOKKOS_INLINE_FUNCTION \
170 FADOP< T, typename T::value_type > \
171 OP (const Expr<T>&, \
172 const typename T::value_type&); \
177 using Sacado::MP::OP; \
185#undef BINARYFUNC_MACRO
186#undef BINARYFUNC_MACRO_SFS
190#ifdef HAVE_STOKHOS_PCE_SCALAR_TYPE
192#define UNARYFUNC_MACRO(OP,FADOP) \
196 template <typename S> class PCE; \
197 template <typename S> \
198 KOKKOS_INLINE_FUNCTION \
199 PCE<S> OP (const PCE<S>&); \
204 using Sacado::UQ::OP; \
228#undef UNARYFUNC_MACRO
230#define BINARYFUNC_MACRO(OP) \
234 template <typename S> class PCE; \
235 template <typename S> \
236 KOKKOS_INLINE_FUNCTION \
237 PCE<S> OP (const PCE<S>&, const PCE<S>&); \
238 template <typename S> \
239 KOKKOS_INLINE_FUNCTION \
240 PCE<S> OP (const typename PCE<S>::value_type&, const PCE<S>&); \
241 template <typename S> \
242 KOKKOS_INLINE_FUNCTION \
243 PCE<S> OP (const PCE<S>&, const typename PCE<S>::value_type&); \
248 using Sacado::UQ::OP; \
254#undef BINARYFUNC_MACRO
256#define BINARYFUNC_MACRO(OP) \
260 template <typename S> class PCE; \
261 template <typename S> \
262 KOKKOS_INLINE_FUNCTION \
263 PCE<S> OP (const typename S::value_type&, const PCE<S>&); \
264 template <typename S> \
265 KOKKOS_INLINE_FUNCTION \
266 PCE<S> OP (const PCE<S>&, const typename S::value_type&); \
271 using Sacado::UQ::OP; \
277#undef BINARYFUNC_MACRO
expr2 j expr1 expr1 expr2 expr2 j expr1 c c c c MinOp
expr1 expr1 expr1 expr2 expr1 expr1 c expr2 expr1 c expr1 expr2 expr1 expr2 expr1 expr1 expr1 expr1 j expr1 expr1 expr1 expr1 j expr1 c *expr2 expr1 c expr1 c expr1 c expr1 expr1 expr1 expr1 j *expr1 expr2 expr1 expr1 j *expr1 c expr2 expr1 c expr1 expr2 expr1 expr2 expr1 Atan2Op
expr expr expr expr ExpOp
expr2 j expr1 expr1 expr2 expr2 j expr1 c c c c MaxOp
#define UNARYFUNC_MACRO(OP, FADOP)
#define BINARYFUNC_MACRO(OP, FADOP)