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 typedef typename ViewType::traits TraitsType;
42 typedef Kokkos::Impl::ViewMapping< TraitsType , typename TraitsType::specialize > MappingType;
43 const int view_static_dim = MappingType::FadStaticDimension;
46 typedef typename Kokkos::ThreadLocalScalarType<ViewType>::type local_fad_type;
52 const size_t num_rows = 11;
53 const size_t fad_size = StaticDim;
55 ViewType v(
"v", num_rows, fad_size+1);
56 const size_t span = v.span();
62 const int StaticDim = 50;
63 const int Stride = 32;
64 const int LocalDim = 0;
67 typedef Kokkos::HIP Device;
68 typedef Kokkos::View<FadType*,Layout,Device> ViewType;
70 typedef typename ViewType::traits TraitsType;
71 typedef Kokkos::Impl::ViewMapping< TraitsType , typename TraitsType::specialize > MappingType;
72 const int view_static_dim = MappingType::FadStaticDimension;
75 typedef typename Kokkos::ThreadLocalScalarType<ViewType>::type local_fad_type;
81 const size_t num_rows = 11;
82 const size_t fad_size = StaticDim;
84 ViewType v(
"v", num_rows, fad_size+1);
85 const size_t span = v.span();
89 int main(
int argc,
char* argv[] ) {
93 Kokkos::InitializationSettings init_args;
94 init_args.set_device_id(0);
95 Kokkos::initialize( init_args );
96 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)