Stokhos Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Stokhos_SacadoMPVectorUnitTest.cpp
Go to the documentation of this file.
1 // @HEADER
2 // ***********************************************************************
3 //
4 // Stokhos Package
5 // Copyright (2009) Sandia Corporation
6 //
7 // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
8 // license for use of this work by or on behalf of the U.S. Government.
9 //
10 // Redistribution and use in source and binary forms, with or without
11 // modification, are permitted provided that the following conditions are
12 // met:
13 //
14 // 1. Redistributions of source code must retain the above copyright
15 // notice, this list of conditions and the following disclaimer.
16 //
17 // 2. Redistributions in binary form must reproduce the above copyright
18 // notice, this list of conditions and the following disclaimer in the
19 // documentation and/or other materials provided with the distribution.
20 //
21 // 3. Neither the name of the Corporation nor the names of the
22 // contributors may be used to endorse or promote products derived from
23 // this software without specific prior written permission.
24 //
25 // THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
26 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
28 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
29 // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
30 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
31 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
32 // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
33 // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
34 // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
35 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36 //
37 // Questions? Contact Eric T. Phipps (etphipp@sandia.gov).
38 //
39 // ***********************************************************************
40 // @HEADER
41 
46 
49 
50 #include <Kokkos_Core.hpp>
51 
52 //
53 // Currently this doesn't test:
54 // * the device
55 // * threaded storage (needs the device)
56 // * strided storage with non-trivial stride
57 //
58 
59 // Common setup for unit tests
60 template <typename VectorType>
61 struct UnitTestSetup {
62 
63  typedef VectorType vec_type;
64 
65  double rtol, atol;
66  double crtol, catol;
67  int sz;
69  double a;
70 
72  rtol = 1e-4;
73  atol = 1e-5;
74  crtol = 1e-12;
75  catol = 1e-12;
76  a = 3.1;
77  sz = 8;
78 
79  // Create vector
80  x.reset(sz);
81  y.reset(sz);
82  cx.reset(1);
83  cx = a;
84  for (int i=0; i<sz; i++) {
85  x.fastAccessCoeff(i) = 0.1*i;
86  y.fastAccessCoeff(i) = 0.25*i;
87  }
88  }
89 };
90 
91 #define UNARY_UNIT_TEST(VEC, OP, OPNAME) \
92  TEUCHOS_UNIT_TEST( VEC, OPNAME) { \
93  UTS setup; \
94  UTS::vec_type u = OP(setup.x); \
95  UTS::vec_type v(setup.sz, 0.0); \
96  for (int i=0; i<setup.sz; i++) \
97  v.fastAccessCoeff(i) = OP(setup.x.fastAccessCoeff(i)); \
98  success = compareVecs(u, "u",v, "v", \
99  setup.rtol, setup.atol, out); \
100  } \
101  TEUCHOS_UNIT_TEST( VEC, OPNAME##_const) { \
102  UTS setup; \
103  UTS::vec_type u = OP(setup.cx); \
104  UTS::vec_type v(1, 0.0); \
105  for (int i=0; i<v.size(); i++) \
106  v.fastAccessCoeff(i) = OP(setup.cx.fastAccessCoeff(0)); \
107  success = compareVecs(u, "u",v, "v", \
108  setup.rtol, setup.atol, out); \
109  } \
110  TEUCHOS_UNIT_TEST( VEC, OPNAME##_resize) { \
111  UTS setup; \
112  UTS::vec_type u; \
113  u = OP(setup.x); \
114  UTS::vec_type v(setup.sz, 0.0); \
115  for (int i=0; i<setup.sz; i++) \
116  v.fastAccessCoeff(i) = OP(setup.x.fastAccessCoeff(i)); \
117  success = compareVecs(u, "u",v, "v", \
118  setup.rtol, setup.atol, out); \
119  }
120 
121 #define BINARY_UNIT_TEST(VEC, OP, OPNAME) \
122  TEUCHOS_UNIT_TEST( VEC, OPNAME) { \
123  UTS setup; \
124  UTS::vec_type u = setup.x OP setup.y; \
125  UTS::vec_type v(setup.sz, 0.0); \
126  for (int i=0; i<setup.sz; i++) \
127  v.fastAccessCoeff(i) = setup.x.fastAccessCoeff(i) OP \
128  setup.y.fastAccessCoeff(i); \
129  success = compareVecs(u, "u",v, "v", \
130  setup.rtol, setup.atol, out); \
131  } \
132  TEUCHOS_UNIT_TEST( VEC, OPNAME##_left_const) { \
133  UTS setup; \
134  UTS::vec_type u = setup.a OP setup.y; \
135  UTS::vec_type v(setup.sz, 0.0); \
136  for (int i=0; i<setup.sz; i++) \
137  v.fastAccessCoeff(i) = setup.a OP setup.y.fastAccessCoeff(i); \
138  success = compareVecs(u, "u",v, "v", \
139  setup.rtol, setup.atol, out); \
140  } \
141  TEUCHOS_UNIT_TEST( VEC, OPNAME##_right_const) { \
142  UTS setup; \
143  UTS::vec_type u = setup.x OP setup.a ; \
144  UTS::vec_type v(setup.sz, 0.0); \
145  for (int i=0; i<setup.sz; i++) \
146  v.fastAccessCoeff(i) = setup.x.fastAccessCoeff(i) OP \
147  setup.a; \
148  success = compareVecs(u, "u",v, "v", \
149  setup.rtol, setup.atol, out); \
150  } \
151  TEUCHOS_UNIT_TEST( VEC, OPNAME##_both_const) { \
152  UTS setup; \
153  UTS::vec_type u = setup.cx OP setup.cx; \
154  UTS::vec_type v(1, 0.0); \
155  for (int i=0; i<v.size(); i++) \
156  v.fastAccessCoeff(i) = setup.cx.fastAccessCoeff(0) OP \
157  setup.cx.fastAccessCoeff(0); \
158  success = compareVecs(u, "u",v, "v", \
159  setup.rtol, setup.atol, out); \
160  } \
161  TEUCHOS_UNIT_TEST( VEC, OPNAME##_left_const2) { \
162  UTS setup; \
163  UTS::vec_type u = setup.cx OP setup.x; \
164  UTS::vec_type v(setup.sz, 0.0); \
165  for (int i=0; i<setup.sz; i++) \
166  v.fastAccessCoeff(i) = setup.cx.fastAccessCoeff(0) OP \
167  setup.x.fastAccessCoeff(i); \
168  success = compareVecs(u, "u",v, "v", \
169  setup.rtol, setup.atol, out); \
170  } \
171  TEUCHOS_UNIT_TEST( VEC, OPNAME##_right_const2) { \
172  UTS setup; \
173  UTS::vec_type u = setup.x OP setup.cx; \
174  UTS::vec_type v(setup.sz, 0.0); \
175  for (int i=0; i<setup.sz; i++) \
176  v.fastAccessCoeff(i) = setup.x.fastAccessCoeff(i) OP \
177  setup.cx.fastAccessCoeff(0); \
178  success = compareVecs(u, "u",v, "v", \
179  setup.rtol, setup.atol, out); \
180  } \
181  TEUCHOS_UNIT_TEST( VEC, OPNAME##_resize) { \
182  UTS setup; \
183  UTS::vec_type u; \
184  u = setup.x OP setup.y; \
185  UTS::vec_type v(setup.sz, 0.0); \
186  for (int i=0; i<setup.sz; i++) \
187  v.fastAccessCoeff(i) = setup.x.fastAccessCoeff(i) OP \
188  setup.y.fastAccessCoeff(i); \
189  success = compareVecs(u, "u",v, "v", \
190  setup.rtol, setup.atol, out); \
191  } \
192  TEUCHOS_UNIT_TEST( VEC, OPNAME##_left_const_resize) { \
193  UTS setup; \
194  UTS::vec_type u; \
195  u = setup.a OP setup.y; \
196  UTS::vec_type v(setup.sz, 0.0); \
197  for (int i=0; i<setup.sz; i++) \
198  v.fastAccessCoeff(i) = setup.a OP \
199  setup.y.fastAccessCoeff(i); \
200  success = compareVecs(u, "u",v, "v", \
201  setup.rtol, setup.atol, out); \
202  } \
203  TEUCHOS_UNIT_TEST( VEC, OPNAME##_right_const_resize) { \
204  UTS setup; \
205  UTS::vec_type u; \
206  u = setup.x OP setup.a; \
207  UTS::vec_type v(setup.sz, 0.0); \
208  for (int i=0; i<setup.sz; i++) \
209  v.fastAccessCoeff(i) = setup.x.fastAccessCoeff(i) OP \
210  setup.a; \
211  success = compareVecs(u, "u",v, "v", \
212  setup.rtol, setup.atol, out); \
213  }
214 
215 #define BINARYFUNC_UNIT_TEST(VEC, OP, SOP, OPNAME) \
216  TEUCHOS_UNIT_TEST( VEC, OPNAME) { \
217  UTS setup; \
218  UTS::vec_type u = OP(setup.x,setup.y); \
219  UTS::vec_type v(setup.sz, 0.0); \
220  for (int i=0; i<setup.sz; i++) \
221  v.fastAccessCoeff(i) = SOP(setup.x.fastAccessCoeff(i), \
222  setup.y.fastAccessCoeff(i)); \
223  success = compareVecs(u, "u",v, "v", \
224  setup.rtol, setup.atol, out); \
225  } \
226  TEUCHOS_UNIT_TEST( VEC, OPNAME##_left_const) { \
227  UTS setup; \
228  UTS::vec_type u = OP(setup.a,setup.y); \
229  UTS::vec_type v(setup.sz, 0.0); \
230  for (int i=0; i<setup.sz; i++) \
231  v.fastAccessCoeff(i) = SOP(setup.a, \
232  setup.y.fastAccessCoeff(i)); \
233  success = compareVecs(u, "u",v, "v", \
234  setup.rtol, setup.atol, out); \
235  } \
236  TEUCHOS_UNIT_TEST( VEC, OPNAME##_right_const) { \
237  UTS setup; \
238  UTS::vec_type u = OP(setup.x,setup.a); \
239  UTS::vec_type v(setup.sz, 0.0); \
240  for (int i=0; i<setup.sz; i++) \
241  v.fastAccessCoeff(i) = SOP(setup.x.fastAccessCoeff(i), \
242  setup.a); \
243  success = compareVecs(u, "u",v, "v", \
244  setup.rtol, setup.atol, out); \
245  } \
246  TEUCHOS_UNIT_TEST( VEC, OPNAME##_both_const) { \
247  UTS setup; \
248  UTS::vec_type u = OP(setup.cx,setup.cx); \
249  UTS::vec_type v(1, 0.0); \
250  for (int i=0; i<v.size(); i++) \
251  v.fastAccessCoeff(i) = SOP(setup.cx.fastAccessCoeff(0), \
252  setup.cx.fastAccessCoeff(0)); \
253  success = compareVecs(u, "u",v, "v", \
254  setup.rtol, setup.atol, out); \
255  } \
256  TEUCHOS_UNIT_TEST( VEC, OPNAME##_left_const2) { \
257  UTS setup; \
258  UTS::vec_type u = OP(setup.cx,setup.x); \
259  UTS::vec_type v(setup.sz, 0.0); \
260  for (int i=0; i<setup.sz; i++) \
261  v.fastAccessCoeff(i) = SOP(setup.cx.fastAccessCoeff(0), \
262  setup.x.fastAccessCoeff(i)); \
263  success = compareVecs(u, "u",v, "v", \
264  setup.rtol, setup.atol, out); \
265  } \
266  TEUCHOS_UNIT_TEST( VEC, OPNAME##_right_const2) { \
267  UTS setup; \
268  UTS::vec_type u = OP(setup.x,setup.cx); \
269  UTS::vec_type v(setup.sz, 0.0); \
270  for (int i=0; i<setup.sz; i++) \
271  v.fastAccessCoeff(i) = SOP(setup.x.fastAccessCoeff(i), \
272  setup.cx.fastAccessCoeff(0)); \
273  success = compareVecs(u, "u",v, "v", \
274  setup.rtol, setup.atol, out); \
275  } \
276  TEUCHOS_UNIT_TEST( VEC, OPNAME##_resize) { \
277  UTS setup; \
278  UTS::vec_type u; \
279  u = OP(setup.x,setup.y); \
280  UTS::vec_type v(setup.sz, 0.0); \
281  for (int i=0; i<setup.sz; i++) \
282  v.fastAccessCoeff(i) = SOP(setup.x.fastAccessCoeff(i), \
283  setup.y.fastAccessCoeff(i)); \
284  success = compareVecs(u, "u",v, "v", \
285  setup.rtol, setup.atol, out); \
286  } \
287  TEUCHOS_UNIT_TEST( VEC, OPNAME##_left_const_resize) { \
288  UTS setup; \
289  UTS::vec_type u; \
290  u = OP(setup.a,setup.y); \
291  UTS::vec_type v(setup.sz, 0.0); \
292  for (int i=0; i<setup.sz; i++) \
293  v.fastAccessCoeff(i) = SOP(setup.a, \
294  setup.y.fastAccessCoeff(i)); \
295  success = compareVecs(u, "u",v, "v", \
296  setup.rtol, setup.atol, out); \
297  } \
298  TEUCHOS_UNIT_TEST( VEC, OPNAME##_right_const_resize) { \
299  UTS setup; \
300  UTS::vec_type u; \
301  u = OP(setup.x,setup.a); \
302  UTS::vec_type v(setup.sz, 0.0); \
303  for (int i=0; i<setup.sz; i++) \
304  v.fastAccessCoeff(i) = SOP(setup.x.fastAccessCoeff(i), \
305  setup.a); \
306  success = compareVecs(u, "u",v, "v", \
307  setup.rtol, setup.atol, out); \
308  }
309 
310 #define OPASSIGN_UNIT_TEST(VEC, OP, OPNAME) \
311  TEUCHOS_UNIT_TEST( VEC, OPNAME) { \
312  UTS setup; \
313  UTS::vec_type u = std::sin(setup.x); \
314  UTS::vec_type v = std::sin(setup.x); \
315  u OP setup.x; \
316  for (int i=0; i<setup.sz; i++) \
317  v.fastAccessCoeff(i) OP setup.x.fastAccessCoeff(i); \
318  success = compareVecs(u, "u",v, "v", \
319  setup.rtol, setup.atol, out); \
320  } \
321  TEUCHOS_UNIT_TEST( VEC, OPNAME##_const) { \
322  UTS setup; \
323  UTS::vec_type u = std::sin(setup.x); \
324  UTS::vec_type v = std::sin(setup.x); \
325  u OP setup.a; \
326  for (int i=0; i<setup.sz; i++) \
327  v.fastAccessCoeff(i) OP setup.a; \
328  success = compareVecs(u, "u",v, "v", \
329  setup.rtol, setup.atol, out); \
330  } \
331  TEUCHOS_UNIT_TEST( VEC, OPNAME##_const2) { \
332  UTS setup; \
333  UTS::vec_type u = std::sin(setup.x); \
334  UTS::vec_type v = std::sin(setup.x); \
335  u OP setup.cx; \
336  for (int i=0; i<setup.sz; i++) \
337  v.fastAccessCoeff(i) OP setup.cx.fastAccessCoeff(0); \
338  success = compareVecs(u, "u",v, "v", \
339  setup.rtol, setup.atol, out); \
340  } \
341  TEUCHOS_UNIT_TEST( VEC, OPNAME##_resize) { \
342  UTS setup; \
343  UTS::vec_type u = setup.a; \
344  UTS::vec_type v(setup.sz, 0.0); \
345  u OP setup.x; \
346  for (int i=0; i<setup.sz; i++) { \
347  v.fastAccessCoeff(i) = setup.a; \
348  v.fastAccessCoeff(i) OP setup.x.fastAccessCoeff(i); \
349  } \
350  success = compareVecs(u, "u",v, "v", \
351  setup.rtol, setup.atol, out); \
352  }
353 
354 #define SAXPY_UNIT_TEST(VEC) \
355  TEUCHOS_UNIT_TEST( VEC, saxpy) { \
356  UTS setup; \
357  UTS::vec_type u = std::sin(setup.x); \
358  UTS::vec_type v = std::sin(setup.x); \
359  u += setup.x*setup.y; \
360  for (int i=0; i<setup.sz; i++) \
361  v.fastAccessCoeff(i) += \
362  setup.x.fastAccessCoeff(i)*setup.y.fastAccessCoeff(i); \
363  success = compareVecs(u, "u",v, "v", \
364  setup.rtol, setup.atol, out); \
365  } \
366  TEUCHOS_UNIT_TEST( VEC, saxpy_resize) { \
367  UTS setup; \
368  UTS::vec_type u = setup.cx; \
369  UTS::vec_type v(setup.sz, 0.0); \
370  u += setup.x*setup.y; \
371  for (int i=0; i<setup.sz; i++) \
372  v.fastAccessCoeff(i) = setup.cx.fastAccessCoeff(0) + \
373  setup.x.fastAccessCoeff(i)*setup.y.fastAccessCoeff(i); \
374  success = compareVecs(u, "u",v, "v", \
375  setup.rtol, setup.atol, out); \
376  } \
377  TEUCHOS_UNIT_TEST( VEC, saxpy_const) { \
378  UTS setup; \
379  UTS::vec_type u = std::sin(setup.x); \
380  UTS::vec_type v = std::sin(setup.x); \
381  u += setup.a*setup.y; \
382  for (int i=0; i<setup.sz; i++) \
383  v.fastAccessCoeff(i) += \
384  setup.a*setup.y.fastAccessCoeff(i); \
385  success = compareVecs(u, "u",v, "v", \
386  setup.rtol, setup.atol, out); \
387  } \
388  TEUCHOS_UNIT_TEST( VEC, saxpy_const2) { \
389  UTS setup; \
390  UTS::vec_type u = std::sin(setup.x); \
391  UTS::vec_type v = std::sin(setup.x); \
392  u += setup.cx*setup.y; \
393  for (int i=0; i<setup.sz; i++) \
394  v.fastAccessCoeff(i) += \
395  setup.cx.fastAccessCoeff(0)*setup.y.fastAccessCoeff(i); \
396  success = compareVecs(u, "u",v, "v", \
397  setup.rtol, setup.atol, out); \
398  }
399 
400 #define VECTOR_UNIT_TESTS(VEC) \
401  UNARY_UNIT_TEST(VEC, +, UnaryPlus) \
402  UNARY_UNIT_TEST(VEC, -, UnaryMinus) \
403  UNARY_UNIT_TEST(VEC, std::exp, Exp) \
404  UNARY_UNIT_TEST(VEC, std::log, Log) \
405  UNARY_UNIT_TEST(VEC, std::log10, Log10) \
406  UNARY_UNIT_TEST(VEC, std::sqrt, Sqrt) \
407  UNARY_UNIT_TEST(VEC, std::cbrt, Cbrt) \
408  UNARY_UNIT_TEST(VEC, std::sin, Sin) \
409  UNARY_UNIT_TEST(VEC, std::cos, Cos) \
410  UNARY_UNIT_TEST(VEC, std::tan, Tan) \
411  UNARY_UNIT_TEST(VEC, std::sinh, Sinh) \
412  UNARY_UNIT_TEST(VEC, std::cosh, Cosh) \
413  UNARY_UNIT_TEST(VEC, std::tanh, Tanh) \
414  UNARY_UNIT_TEST(VEC, std::asin, ASin) \
415  UNARY_UNIT_TEST(VEC, std::acos, ACos) \
416  UNARY_UNIT_TEST(VEC, std::atan, ATan) \
417  UNARY_UNIT_TEST(VEC, std::asinh, ASinh) \
418  UNARY_UNIT_TEST(VEC, std::acosh, ACosh) \
419  UNARY_UNIT_TEST(VEC, std::atanh, ATanh) \
420  \
421  BINARY_UNIT_TEST(VEC, +, Plus) \
422  BINARY_UNIT_TEST(VEC, -, Minus) \
423  BINARY_UNIT_TEST(VEC, *, Times) \
424  BINARY_UNIT_TEST(VEC, /, Divide) \
425  \
426  BINARYFUNC_UNIT_TEST(VEC, atan2, std::atan2, ATan2) \
427  BINARYFUNC_UNIT_TEST(VEC, pow, std::pow, Pow) \
428  BINARYFUNC_UNIT_TEST(VEC, max, std::max, Max) \
429  BINARYFUNC_UNIT_TEST(VEC, min, std::min, Min) \
430  \
431  OPASSIGN_UNIT_TEST(VEC, +=, PlusEqual) \
432  OPASSIGN_UNIT_TEST(VEC, -=, MinusEqual) \
433  OPASSIGN_UNIT_TEST(VEC, *=, TimesEqual) \
434  OPASSIGN_UNIT_TEST(VEC, /=, DivideEqual) \
435  \
436  SAXPY_UNIT_TEST(VEC) \
437  \
438  TEUCHOS_UNIT_TEST( VEC, initializer_list_copy ) { \
439  UTS setup; \
440  UTS::vec_type u = { 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 }; \
441  UTS::vec_type v(setup.sz, 0.0); \
442  for (int i=0; i<setup.sz; i++) \
443  v.fastAccessCoeff(i) = i+1; \
444  success = compareVecs(u, "u", v, "v", \
445  setup.rtol, setup.atol, out); \
446  } \
447  TEUCHOS_UNIT_TEST( VEC, initializer_list_assign ) { \
448  UTS setup; \
449  UTS::vec_type u; \
450  u = { 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 }; \
451  UTS::vec_type v(setup.sz, 0.0); \
452  for (int i=0; i<setup.sz; i++) \
453  v.fastAccessCoeff(i) = i+1; \
454  success = compareVecs(u, "u", v, "v", \
455  setup.rtol, setup.atol, out); \
456  } \
457  TEUCHOS_UNIT_TEST( VEC, range_based_for ) { \
458  UTS setup; \
459  UTS::vec_type u(setup.sz, 0.0); \
460  for (auto& z : u) { z = 3.0; } \
461  UTS::vec_type v(setup.sz, 3.0); \
462  success = compareVecs(u, "u", v, "v", \
463  setup.rtol, setup.atol, out); \
464  }
465 
466 namespace DynamicVecTest {
467  typedef Kokkos::DefaultExecutionSpace execution_space;
471  VECTOR_UNIT_TESTS(DynamicVector)
472 }
473 
474 namespace DynamicStridedVecTest {
475  typedef Kokkos::DefaultExecutionSpace execution_space;
479  VECTOR_UNIT_TESTS(DynamicStridedVector)
480 }
481 
482 namespace StaticVecTest {
483  typedef Kokkos::DefaultExecutionSpace execution_space;
487  VECTOR_UNIT_TESTS(StaticVector)
488 }
489 
490 namespace StaticFixedVecTest {
491  typedef Kokkos::DefaultExecutionSpace execution_space;
495  VECTOR_UNIT_TESTS(StaticFixedVector)
496 }
497 
498 int main( int argc, char* argv[] ) {
499  Teuchos::GlobalMPISession mpiSession(&argc, &argv);
500 
501  Kokkos::initialize();
502 // Kokkos::HostSpace::execution_space::initialize();
503 // if (!Kokkos::DefaultExecutionSpace::is_initialized())
504 // Kokkos::DefaultExecutionSpace::initialize();
505 
507 
508  Kokkos::finalize();
509 // Kokkos::HostSpace::execution_space::finalize();
510 // if (Kokkos::DefaultExecutionSpace::is_initialized())
511 // Kokkos::DefaultExecutionSpace::finalize();
512 
513  return res;
514 }
Stokhos::StaticFixedStorage< int, double, 8, execution_space > storage_type
Kokkos::DefaultExecutionSpace execution_space
Statically allocated storage class.
Kokkos::DefaultExecutionSpace execution_space
UnitTestSetup< vec_type > UTS
Stokhos::DynamicStorage< int, double, execution_space > storage_type
Stokhos::DynamicStridedStorage< int, double, execution_space > storage_type
Stokhos::StaticStorage< int, double, 8, execution_space > storage_type
Sacado::MP::Vector< storage_type > vec_type
static int runUnitTestsFromMain(int argc, char *argv[])
UnitTestSetup< vec_type > UTS
#define VECTOR_UNIT_TESTS(VEC)
Kokkos::DefaultExecutionSpace execution_space
int main(int argc, char **argv)
Kokkos::DefaultExecutionSpace execution_space
Sacado::MP::Vector< storage_type > vec_type
Sacado::MP::Vector< storage_type > vec_type
Sacado::MP::Vector< storage_type > vec_type
Statically allocated storage class.
UnitTestSetup< vec_type > UTS