10 #include "Sacado_cmath.hpp"
14 #include <cuda_runtime_api.h>
17 #if CUDART_VERSION < 10000
18 #include <math_functions.h>
22 #define OPNAME operator+
28 #define OPNAME operator-
114 #define OPNAME operator+
120 #define OPNAME operator-
126 #define OPNAME operator*
132 #define OPNAME operator/
164 #define MP_RELOP_MACRO(OP) \
168 template <typename O, typename T, int N, typename D> \
169 KOKKOS_INLINE_FUNCTION \
171 operator OP (const Vector< Stokhos::StaticFixedStorage<O,T,N,D> >& a, \
172 const Vector< Stokhos::StaticFixedStorage<O,T,N,D> >& b) \
174 return a.val() OP b.val(); \
177 template <typename O, typename T, int N, typename D> \
178 KOKKOS_INLINE_FUNCTION \
180 operator OP (const typename Vector< Stokhos::StaticFixedStorage<O,T,N,D> >::value_type& a, \
181 const Vector< Stokhos::StaticFixedStorage<O,T,N,D> >& b) \
183 return a OP b.val(); \
186 template <typename O, typename T, int N, typename D> \
187 KOKKOS_INLINE_FUNCTION \
189 operator OP (const Vector< Stokhos::StaticFixedStorage<O,T,N,D> >& a, \
190 const typename Vector< Stokhos::StaticFixedStorage<O,T,N,D> >::value_type& b) \
192 return a.val() OP b; \
208 #undef MP_RELOP_MACRO
214 template <
typename O,
typename T,
int N,
typename D>
215 KOKKOS_INLINE_FUNCTION
231 template <
typename O,
typename T,
int N,
typename D>
232 KOKKOS_INLINE_FUNCTION
235 for (
int i=0; i<x.size(); i++)
236 is_zero = is_zero && (x.coeff(i) == 0.0);
244 #define PCE_BOOL_MACRO(OP) \
248 template <typename O, typename T, int N, typename D> \
249 KOKKOS_INLINE_FUNCTION \
251 operator OP (const Vector< Stokhos::StaticFixedStorage<O,T,N,D> >& a, \
252 const Vector< Stokhos::StaticFixedStorage<O,T,N,D> >& b) \
254 return toBool(a) OP toBool(b); \
257 template <typename O, typename T, int N, typename D> \
258 KOKKOS_INLINE_FUNCTION \
260 operator OP (const typename Vector< Stokhos::StaticFixedStorage<O,T,N,D> >::value_type& a, \
261 const Vector< Stokhos::StaticFixedStorage<O,T,N,D> >& b) \
263 return a OP toBool(b); \
266 template <typename O, typename T, int N, typename D> \
267 KOKKOS_INLINE_FUNCTION \
269 operator OP (const Vector< Stokhos::StaticFixedStorage<O,T,N,D> >& a, \
270 const typename Vector< Stokhos::StaticFixedStorage<O,T,N,D> >::value_type& b) \
272 return toBool(a) OP b; \
280 #undef PCE_BOOL_MACRO
Statically allocated storage class.
KOKKOS_INLINE_FUNCTION bool toBool(const Expr< T > &xx)
KOKKOS_INLINE_FUNCTION bool operator!(const Expr< T > &expr)
#define MP_RELOP_MACRO(OP)
#define PCE_BOOL_MACRO(OP)