19 constexpr
int ensemble_size = 8;
25 scalar a = (scalar) 1.;
28 scalar b = (scalar) 2.;
31 std::cout << std::endl;
32 std::cout << a << std::endl;
33 std::cout << b << std::endl;
34 std::cout << m1 << std::endl;
39 for (
auto i=3; i<ensemble_size; ++i)
47 constexpr
int ensemble_size = 16;
53 scalar a = (scalar) 1.;
56 scalar b = (scalar) 2.;
59 std::cout << std::endl;
60 std::cout << a << std::endl;
61 std::cout << b << std::endl;
62 std::cout << m1 << std::endl;
67 for (
auto i=3; i<ensemble_size; ++i)
75 constexpr
int ensemble_size = 8;
81 scalar a = (scalar) 1.;
84 scalar b = (scalar) 2.;
88 std::cout << m1 << std::endl;
89 std::cout << m2 << std::endl;
90 for (
auto i=0; i<ensemble_size; ++i)
96 constexpr
int ensemble_size = 8;
102 scalar a = (scalar) 1.;
105 scalar b = (scalar) 2.;
113 std::cout << m1 << std::endl;
114 std::cout << mul << std::endl;
116 std::cout << mul2 << std::endl;
117 std::cout << mul3 << std::endl;
122 for (
auto i=3; i<ensemble_size; ++i)
130 constexpr
int ensemble_size = 16;
136 scalar a = (scalar) 1.;
139 scalar b = (scalar) 2.;
143 std::cout << m1 << std::endl;
144 std::cout << mul << std::endl;
149 for (
auto i=3; i<ensemble_size; ++i)
155 constexpr
int ensemble_size = 8;
161 scalar a = (scalar) 1.;
164 scalar b = (scalar) 2.;
167 scalar mul = m1*a + !m1*b;
168 scalar mul2 = a*m1 + !m1*b;
169 std::cout << m1 << std::endl;
170 std::cout << mul << std::endl;
171 std::cout << mul2 << std::endl;
176 for (
auto i=3; i<ensemble_size; ++i)
184 constexpr
int ensemble_size = 8;
190 using namespace MaskLogic;
192 scalar a = (scalar) 1.;
195 scalar b = (scalar) 2.;
198 auto m2 = a>(scalar) 0.;
201 std::cout << m1 << std::endl;
202 std::cout << m2 << std::endl;
203 std::cout << m3<< std::endl;
204 std::cout << m4<< std::endl;
228 constexpr
int ensemble_size = 8;
234 using namespace MaskLogic;
236 scalar a = (scalar) 1.;
239 scalar b = (scalar) 2.;
243 std::cout << m1 << std::endl;
244 std::cout << m2 << std::endl;
257 constexpr
int ensemble_size = 8;
263 using namespace MaskLogic;
265 scalar a = (scalar) 1.;
268 scalar b = (scalar) 2.;
272 std::cout << m1 << std::endl;
273 std::cout << m2 << std::endl;
286 constexpr
int ensemble_size = 8;
292 using namespace MaskLogic;
294 scalar a = (scalar) 1.;
296 scalar b = (scalar) 2.;
300 std::cout << m1 << std::endl;
301 std::cout << m2 << std::endl;
314 constexpr
int ensemble_size = 8;
320 scalar a = (scalar) 1.;
322 scalar b = (scalar) 2.;
327 std::cout << m1 << std::endl;
328 std::cout << m2 << std::endl;
356 constexpr
int ensemble_size = 8;
362 scalar a = (scalar) 1.;
364 scalar b = (scalar) 2.;
370 std::cout << m1 << std::endl;
371 std::cout << m2 << std::endl;
372 std::cout << m3 << std::endl;
378 constexpr
int ensemble_size = 8;
384 scalar a = (scalar) 1.;
386 scalar b = (scalar) 2.;
392 std::cout << m1 << std::endl;
393 std::cout << m2 << std::endl;
394 std::cout << m3 << std::endl;
400 constexpr
int ensemble_size = 8;
406 scalar a = (scalar) 1.;
408 scalar b = (scalar) 2.;
410 std::cout << a << std::endl;
411 std::cout << b << std::endl;
419 std::cout << m3 << std::endl;
425 constexpr
int ensemble_size = 8;
431 scalar a = (scalar) 1.;
433 scalar b = (scalar) 2.;
437 std::cout << m1 << std::endl;
438 std::cout << m2 << std::endl;
439 auto m3 = (a>0.) - (a>b);
440 std::cout << m3 << std::endl;
446 constexpr
int ensemble_size = 8;
453 scalar a = (scalar) 1.;
464 constexpr
int ensemble_size = 8;
470 scalar a = (scalar) 1.;
473 scalar b = (scalar) 2.;
477 std::cout << std::endl;
478 std::cout << a << std::endl;
479 std::cout << b << std::endl;
481 std::cout << a << std::endl;
482 std::cout << b << std::endl;
488 constexpr
int ensemble_size = 8;
494 scalar a = (scalar) 1.;
515 constexpr
int ensemble_size = 8;
521 scalar a = (scalar) 1.;
533 constexpr
int ensemble_size = 8;
539 scalar a2 = {0.,2.,2.,2.,2.,2.,2.,2.};
540 std::cout << a2 << std::endl;
542 scalar a = (scalar) 1.;
544 auto m = (a>(scalar) 0.);
545 std::cout <<
"m is computed" << std::endl;
546 std::cout << m << std::endl;
548 std::cout <<
"m is computed" << std::endl;
549 std::cout << m << std::endl;
551 std::cout << a << std::endl;
552 std::cout << m << std::endl;
553 std::cout << (a>=(scalar) 0. )<< std::endl;
554 std::cout << (a> 0. )<< std::endl;
555 std::cout << (a>= 0.) << std::endl;
556 std::cout << (0.<a )<< std::endl;
557 std::cout << (0.<=a) << std::endl;
559 mask_assign<scalar>(m,a) /= {a, 2.,-1.};
571 mask_assign<scalar>(m,a) /= {4.,2.,-1.};
KOKKOS_INLINE_FUNCTION Vector< S > copysign(const Vector< S > &a1, const Vector< S > &a2)
Stokhos::StandardStorage< int, double > storage_type
Statically allocated storage class.
Kokkos::DefaultExecutionSpace execution_space
KOKKOS_INLINE_FUNCTION bool OR(Mask< T > m)
KOKKOS_INLINE_FUNCTION MaskedAssign< scalar > mask_assign(bool b, scalar *s)
KOKKOS_INLINE_FUNCTION bool AND(Mask< T > m)
KOKKOS_INLINE_FUNCTION bool XOR(Mask< T > m)
#define TEST_EQUALITY(v1, v2)
KOKKOS_INLINE_FUNCTION Mask< Sacado::MP::Vector< S > > signbit_v(const Sacado::MP::Vector< S > &a1)