14 #include "Kokkos_Macros.hpp"
16 #define SACADO_TEST_DFAD 1
26 const int StaticDim = 64;
27 const int Stride = 32;
28 const int LocalDim = 2;
31 typedef Kokkos::Cuda Device;
32 typedef Kokkos::View<FadType*,Layout,Device> ViewType;
34 #ifndef SACADO_HAS_NEW_KOKKOS_VIEW_IMPL
35 typedef typename ViewType::traits TraitsType;
36 typedef Kokkos::Impl::ViewMapping< TraitsType , typename TraitsType::specialize > MappingType;
37 const int view_static_dim = MappingType::FadStaticDimension;
41 typedef typename Kokkos::ThreadLocalScalarType<ViewType>::type local_fad_type;
47 const size_t num_rows = 11;
48 const size_t fad_size = StaticDim;
50 ViewType v(
"v", num_rows, fad_size+1);
51 const size_t span = v.span();
53 #ifdef KOKKOS_ENABLE_IMPL_VIEW_LEGACY
62 const int StaticDim = 50;
63 const int Stride = 32;
64 const int LocalDim = 0;
67 typedef Kokkos::Cuda Device;
68 typedef Kokkos::View<FadType*,Layout,Device> ViewType;
70 #ifndef SACADO_HAS_NEW_KOKKOS_VIEW_IMPL
71 typedef typename ViewType::traits TraitsType;
72 typedef Kokkos::Impl::ViewMapping< TraitsType , typename TraitsType::specialize > MappingType;
73 const int view_static_dim = MappingType::FadStaticDimension;
77 typedef typename Kokkos::ThreadLocalScalarType<ViewType>::type local_fad_type;
83 const size_t num_rows = 11;
84 const size_t fad_size = StaticDim;
86 ViewType v(
"v", num_rows, fad_size+1);
87 const size_t span = v.span();
89 #ifdef KOKKOS_ENABLE_IMPL_VIEW_LEGACY
96 int main(
int argc,
char* argv[] ) {
100 Kokkos::InitializationSettings init_args;
101 init_args.set_device_id(0);
102 Kokkos::initialize( init_args );
103 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)