VTK-m  2.0
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 
13 #include <vtkm/cont/vtkm_cont_export.h>
14 #include <vtkm/internal/Configure.h>
15 
16 VTKM_THIRDPARTY_PRE_INCLUDE
17 #include <Kokkos_Core.hpp>
18 VTKM_THIRDPARTY_POST_INCLUDE
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
Groups connected points that have the same field value.
Definition: Atomic.h:19