VTK-m  2.2
DeviceAdapterMemoryManagerKokkos.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_DeviceAdapterMemoryManagerKokkos_h
11 #define vtk_m_cont_kokkos_internal_DeviceAdapterMemoryManagerKokkos_h
12 
14 
16 
17 namespace vtkm
18 {
19 namespace cont
20 {
21 namespace internal
22 {
23 
24 template <>
25 class VTKM_CONT_EXPORT DeviceAdapterMemoryManager<vtkm::cont::DeviceAdapterTagKokkos>
26  : public DeviceAdapterMemoryManagerBase
27 {
28 public:
29  VTKM_CONT vtkm::cont::internal::BufferInfo Allocate(vtkm::BufferSizeType size) const override;
30 
31  VTKM_CONT vtkm::cont::DeviceAdapterId GetDevice() const override;
32 
33  VTKM_CONT vtkm::cont::internal::BufferInfo CopyHostToDevice(
34  const vtkm::cont::internal::BufferInfo& src) const override;
35 
36  VTKM_CONT virtual void CopyHostToDevice(
37  const vtkm::cont::internal::BufferInfo& src,
38  const vtkm::cont::internal::BufferInfo& dest) const override;
39 
40  VTKM_CONT vtkm::cont::internal::BufferInfo CopyDeviceToHost(
41  const vtkm::cont::internal::BufferInfo& src) const override;
42 
43  VTKM_CONT virtual void CopyDeviceToHost(
44  const vtkm::cont::internal::BufferInfo& src,
45  const vtkm::cont::internal::BufferInfo& dest) const override;
46 
47  VTKM_CONT vtkm::cont::internal::BufferInfo CopyDeviceToDevice(
48  const vtkm::cont::internal::BufferInfo& src) const override;
49 
50  VTKM_CONT virtual void CopyDeviceToDevice(
51  const vtkm::cont::internal::BufferInfo& src,
52  const vtkm::cont::internal::BufferInfo& dest) const override;
53 
54  VTKM_CONT void* AllocateRawPointer(vtkm::BufferSizeType size) const override;
55  VTKM_CONT void CopyDeviceToDeviceRawPointer(const void* src,
56  void* dest,
57  vtkm::BufferSizeType size) const override;
58  VTKM_CONT void DeleteRawPointer(void* mem) const override;
59 };
60 }
61 }
62 } // namespace vtkm::cont::internal
63 
64 #endif // vtk_m_cont_kokkos_internal_DeviceAdapterMemoryManagerKokkos_h
vtkm
Groups connected points that have the same field value.
Definition: Atomic.h:19
DeviceAdapterTagKokkos.h
vtkm::BufferSizeType
vtkm::Int64 BufferSizeType
Definition: DeviceAdapterMemoryManager.h:27
DeviceAdapterMemoryManager.h
VTKM_CONT_EXPORT
#define VTKM_CONT_EXPORT
Definition: vtkm_cont_export.h:44
VTKM_CONT
#define VTKM_CONT
Definition: ExportMacros.h:57
vtkm::cont::DeviceAdapterId
An object used to specify a device.
Definition: DeviceAdapterTag.h:58