42 #include "Sacado_cmath.hpp" 46 #include <math_functions.h> 49 #define OPNAME operator+ 55 #define OPNAME operator- 141 #define OPNAME operator+ 147 #define OPNAME operator- 153 #define OPNAME operator* 159 #define OPNAME operator/ 191 #define MP_RELOP_MACRO(OP) \ 195 template <typename O, typename T, int N, typename D> \ 196 KOKKOS_INLINE_FUNCTION \ 198 operator OP (const Vector< Stokhos::StaticFixedStorage<O,T,N,D> >& a, \ 199 const Vector< Stokhos::StaticFixedStorage<O,T,N,D> >& b) \ 201 return a.val() OP b.val(); \ 204 template <typename O, typename T, int N, typename D> \ 205 KOKKOS_INLINE_FUNCTION \ 207 operator OP (const typename Vector< Stokhos::StaticFixedStorage<O,T,N,D> >::value_type& a, \ 208 const Vector< Stokhos::StaticFixedStorage<O,T,N,D> >& b) \ 210 return a OP b.val(); \ 213 template <typename O, typename T, int N, typename D> \ 214 KOKKOS_INLINE_FUNCTION \ 216 operator OP (const Vector< Stokhos::StaticFixedStorage<O,T,N,D> >& a, \ 217 const typename Vector< Stokhos::StaticFixedStorage<O,T,N,D> >::value_type& b) \ 219 return a.val() OP b; \ 235 #undef MP_RELOP_MACRO 241 template <
typename O,
typename T,
int N,
typename D>
242 KOKKOS_INLINE_FUNCTION
258 template <
typename O,
typename T,
int N,
typename D>
259 KOKKOS_INLINE_FUNCTION
262 for (
int i=0; i<
x.size(); i++)
263 is_zero = is_zero && (
x.coeff(i) == 0.0);
271 #define PCE_BOOL_MACRO(OP) \ 275 template <typename O, typename T, int N, typename D> \ 276 KOKKOS_INLINE_FUNCTION \ 278 operator OP (const Vector< Stokhos::StaticFixedStorage<O,T,N,D> >& a, \ 279 const Vector< Stokhos::StaticFixedStorage<O,T,N,D> >& b) \ 281 return toBool(a) OP toBool(b); \ 284 template <typename O, typename T, int N, typename D> \ 285 KOKKOS_INLINE_FUNCTION \ 287 operator OP (const typename Vector< Stokhos::StaticFixedStorage<O,T,N,D> >::value_type& a, \ 288 const Vector< Stokhos::StaticFixedStorage<O,T,N,D> >& b) \ 290 return a OP toBool(b); \ 293 template <typename O, typename T, int N, typename D> \ 294 KOKKOS_INLINE_FUNCTION \ 296 operator OP (const Vector< Stokhos::StaticFixedStorage<O,T,N,D> >& a, \ 297 const typename Vector< Stokhos::StaticFixedStorage<O,T,N,D> >::value_type& b) \ 299 return toBool(a) OP b; \ 307 #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)
const IndexType const IndexType const IndexType const IndexType const ValueType const ValueType * x
#define MP_RELOP_MACRO(OP)
#define PCE_BOOL_MACRO(OP)