Viskores  1.0
KokkosTypes.h
Go to the documentation of this file.
1 //============================================================================
2 // The contents of this file are covered by the Viskores license. See
3 // LICENSE.txt for details.
4 //
5 // By contributing to this file, all contributors agree to the Developer
6 // Certificate of Origin Version 1.1 (DCO 1.1) as stated in DCO.txt.
7 //============================================================================
8 
9 //============================================================================
10 // Copyright (c) Kitware, Inc.
11 // All rights reserved.
12 // See LICENSE.txt for details.
13 //
14 // This software is distributed WITHOUT ANY WARRANTY; without even
15 // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
16 // PURPOSE. See the above copyright notice for more information.
17 //============================================================================
18 #ifndef viskores_cont_kokkos_internal_KokkosTypes_h
19 #define viskores_cont_kokkos_internal_KokkosTypes_h
20 
23 
25 #include <Kokkos_Core.hpp>
27 
28 namespace viskores
29 {
30 namespace cont
31 {
32 namespace kokkos
33 {
34 namespace internal
35 {
36 
37 using ExecutionSpace = Kokkos::DefaultExecutionSpace;
38 
39 VISKORES_CONT_EXPORT const ExecutionSpace& GetExecutionSpaceInstance();
40 
41 template <typename ValueType>
42 using KokkosViewCont = Kokkos::
43  View<ValueType*, Kokkos::LayoutRight, Kokkos::HostSpace, Kokkos::MemoryTraits<Kokkos::Unmanaged>>;
44 
45 template <typename ValueType>
46 using KokkosViewExec =
47  decltype(Kokkos::create_mirror(ExecutionSpace{}, KokkosViewCont<ValueType>{}));
48 
49 template <typename ValueType>
50 using KokkosViewConstCont = typename KokkosViewCont<ValueType>::const_type;
51 
52 template <typename ValueType>
53 using KokkosViewConstExec = typename KokkosViewExec<ValueType>::const_type;
54 }
55 }
56 }
57 } // viskores::cont::kokkos::internal
58 
59 #endif // viskores_cont_kokkos_internal_KokkosTypes_h
VISKORES_THIRDPARTY_POST_INCLUDE
#define VISKORES_THIRDPARTY_POST_INCLUDE
Definition: Configure.h:200
viskores
Groups connected points that have the same field value.
Definition: Atomic.h:27
Configure.h
VISKORES_THIRDPARTY_PRE_INCLUDE
#define VISKORES_THIRDPARTY_PRE_INCLUDE
Definition: Configure.h:199
viskores_cont_export.h