14 #include "Kokkos_Macros.hpp"
18 #ifdef KOKKOS_ENABLE_HIP
19 #define SACADO_TEST_DFAD 0
21 #define SACADO_TEST_DFAD 1
33 const int StaticDim = 64;
34 const int Stride = 32;
35 const int LocalDim = 2;
38 typedef Kokkos::HIP Device;
39 typedef Kokkos::View<FadType*,Layout,Device> ViewType;
41 #ifndef SACADO_HAS_NEW_KOKKOS_VIEW_IMPL
42 typedef typename ViewType::traits TraitsType;
43 typedef Kokkos::Impl::ViewMapping< TraitsType , typename TraitsType::specialize > MappingType;
44 const int view_static_dim = MappingType::FadStaticDimension;
48 typedef typename Kokkos::ThreadLocalScalarType<ViewType>::type local_fad_type;
54 const size_t num_rows = 11;
55 const size_t fad_size = StaticDim;
57 ViewType v(
"v", num_rows, fad_size+1);
58 const size_t span = v.span();
60 #ifndef SACADO_HAS_NEW_KOKKOS_VIEW_IMPL
69 const int StaticDim = 50;
70 const int Stride = 32;
71 const int LocalDim = 0;
74 typedef Kokkos::HIP Device;
75 typedef Kokkos::View<FadType*,Layout,Device> ViewType;
77 #ifndef SACADO_HAS_NEW_KOKKOS_VIEW_IMPL
78 typedef typename ViewType::traits TraitsType;
79 typedef Kokkos::Impl::ViewMapping< TraitsType , typename TraitsType::specialize > MappingType;
80 const int view_static_dim = MappingType::FadStaticDimension;
84 typedef typename Kokkos::ThreadLocalScalarType<ViewType>::type local_fad_type;
90 const size_t num_rows = 11;
91 const size_t fad_size = StaticDim;
93 ViewType v(
"v", num_rows, fad_size+1);
94 const size_t span = v.span();
96 #ifndef SACADO_HAS_NEW_KOKKOS_VIEW_IMPL
103 int main(
int argc,
char* argv[] ) {
107 Kokkos::InitializationSettings init_args;
108 init_args.set_device_id(0);
109 Kokkos::initialize( init_args );
110 Kokkos::print_configuration(std::cout);
Sacado::Fad::DFad< double > FadType
Base template specification for static size.
TEUCHOS_UNIT_TEST(Conversion, IsConvertible)
static int runUnitTestsFromMain(int argc, char *argv[])
#define TEUCHOS_TEST_EQUALITY(v1, v2, out, success)
#define VIEW_FAD_TESTS_D(D)