VTK-m  2.2
KokkosTypes.h
Go to the documentation of this file.
1 //============================================================================
2 // Copyright (c) Kitware, Inc.
3 // All rights reserved.
4 // See LICENSE.txt for details.
5 //
6 // This software is distributed WITHOUT ANY WARRANTY; without even
7 // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
8 // PURPOSE. See the above copyright notice for more information.
9 //============================================================================
10 #ifndef vtk_m_cont_kokkos_internal_KokkosTypes_h
11 #define vtk_m_cont_kokkos_internal_KokkosTypes_h
12 
15 
17 #include <Kokkos_Core.hpp>
19 
20 namespace vtkm
21 {
22 namespace cont
23 {
24 namespace kokkos
25 {
26 namespace internal
27 {
28 
29 using ExecutionSpace = Kokkos::DefaultExecutionSpace;
30 
31 VTKM_CONT_EXPORT const ExecutionSpace& GetExecutionSpaceInstance();
32 
33 template <typename ValueType>
34 using KokkosViewCont = Kokkos::
35  View<ValueType*, Kokkos::LayoutRight, Kokkos::HostSpace, Kokkos::MemoryTraits<Kokkos::Unmanaged>>;
36 
37 template <typename ValueType>
38 using KokkosViewExec =
39  decltype(Kokkos::create_mirror(ExecutionSpace{}, KokkosViewCont<ValueType>{}));
40 
41 template <typename ValueType>
42 using KokkosViewConstCont = typename KokkosViewCont<ValueType>::const_type;
43 
44 template <typename ValueType>
45 using KokkosViewConstExec = typename KokkosViewExec<ValueType>::const_type;
46 }
47 }
48 }
49 } // vtkm::cont::kokkos::internal
50 
51 #endif // vtk_m_cont_kokkos_internal_KokkosTypes_h
VTKM_THIRDPARTY_POST_INCLUDE
#define VTKM_THIRDPARTY_POST_INCLUDE
Definition: Configure.h:192
vtkm
Groups connected points that have the same field value.
Definition: Atomic.h:19
VTKM_CONT_EXPORT
#define VTKM_CONT_EXPORT
Definition: vtkm_cont_export.h:44
Configure.h
vtkm_cont_export.h
VTKM_THIRDPARTY_PRE_INCLUDE
#define VTKM_THIRDPARTY_PRE_INCLUDE
Definition: Configure.h:191