Viskores  1.0
DeviceAdapterMemoryManagerCuda.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_cuda_internal_DeviceAdapterMemoryManagerCuda_h
19 #define viskores_cont_cuda_internal_DeviceAdapterMemoryManagerCuda_h
20 
22 
24 
25 namespace viskores
26 {
27 namespace cont
28 {
29 namespace internal
30 {
31 
32 template <>
33 class VISKORES_CONT_EXPORT DeviceAdapterMemoryManager<viskores::cont::DeviceAdapterTagCuda>
34  : public DeviceAdapterMemoryManagerBase
35 {
36 public:
37  VISKORES_CONT viskores::cont::internal::BufferInfo Allocate(
38  viskores::BufferSizeType size) const override;
39 
40  VISKORES_CONT viskores::cont::DeviceAdapterId GetDevice() const override;
41 
42  VISKORES_CONT viskores::cont::internal::BufferInfo CopyHostToDevice(
43  const viskores::cont::internal::BufferInfo& src) const override;
44 
45  VISKORES_CONT virtual void CopyHostToDevice(
46  const viskores::cont::internal::BufferInfo& src,
47  const viskores::cont::internal::BufferInfo& dest) const override;
48 
49  VISKORES_CONT viskores::cont::internal::BufferInfo CopyDeviceToHost(
50  const viskores::cont::internal::BufferInfo& src) const override;
51 
52  VISKORES_CONT virtual void CopyDeviceToHost(
53  const viskores::cont::internal::BufferInfo& src,
54  const viskores::cont::internal::BufferInfo& dest) const override;
55 
56  VISKORES_CONT viskores::cont::internal::BufferInfo CopyDeviceToDevice(
57  const viskores::cont::internal::BufferInfo& src) const override;
58 
59  VISKORES_CONT virtual void CopyDeviceToDevice(
60  const viskores::cont::internal::BufferInfo& src,
61  const viskores::cont::internal::BufferInfo& dest) const override;
62 
63  VISKORES_CONT virtual void DeleteRawPointer(void* mem) const override;
64 };
65 }
66 }
67 } // namespace viskores::cont::internal
68 
69 #endif //viskores_cont_cuda_internal_DeviceAdapterMemoryManagerCuda_h
DeviceAdapterTagCuda.h
DeviceAdapterMemoryManager.h
VISKORES_CONT
#define VISKORES_CONT
Definition: ExportMacros.h:65
viskores
Groups connected points that have the same field value.
Definition: Atomic.h:27
viskores::BufferSizeType
viskores::Int64 BufferSizeType
Definition: DeviceAdapterMemoryManager.h:35
viskores::cont::DeviceAdapterId
An object used to specify a device.
Definition: DeviceAdapterTag.h:66