33 #include "Kokkos_Macros.hpp"
37 #ifdef KOKKOS_ENABLE_HIP
38 #define SACADO_TEST_DFAD 0
40 #define SACADO_TEST_DFAD 1
52 const int StaticDim = 64;
53 const int Stride = 32;
54 const int LocalDim = 2;
57 typedef Kokkos::HIP Device;
58 typedef Kokkos::View<FadType*,Layout,Device> ViewType;
60 typedef typename ViewType::traits TraitsType;
61 typedef Kokkos::Impl::ViewMapping< TraitsType , typename TraitsType::specialize > MappingType;
62 const int view_static_dim = MappingType::FadStaticDimension;
65 typedef typename Kokkos::ThreadLocalScalarType<ViewType>::type local_fad_type;
71 const size_t num_rows = 11;
72 const size_t fad_size = StaticDim;
74 ViewType v(
"v", num_rows, fad_size+1);
75 const size_t span = v.span();
81 const int StaticDim = 50;
82 const int Stride = 32;
83 const int LocalDim = 0;
86 typedef Kokkos::HIP Device;
87 typedef Kokkos::View<FadType*,Layout,Device> ViewType;
89 typedef typename ViewType::traits TraitsType;
90 typedef Kokkos::Impl::ViewMapping< TraitsType , typename TraitsType::specialize > MappingType;
91 const int view_static_dim = MappingType::FadStaticDimension;
94 typedef typename Kokkos::ThreadLocalScalarType<ViewType>::type local_fad_type;
100 const size_t num_rows = 11;
101 const size_t fad_size = StaticDim;
103 ViewType v(
"v", num_rows, fad_size+1);
104 const size_t span = v.span();
108 int main(
int argc,
char* argv[] ) {
112 Kokkos::InitializationSettings init_args;
113 init_args.set_device_id(0);
114 Kokkos::initialize( init_args );
115 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)