1 #ifndef HeterogeneousCore_CUDAUtilities_interface_device_unique_ptr_h
2 #define HeterogeneousCore_CUDAUtilities_interface_device_unique_ptr_h
33 using unique_ptr = std::unique_ptr<T, impl::DeviceDeleter>;
44 template <
typename T,
size_t N>
46 struct bounded_array {};
54 "Allocating with non-trivial constructor on the device memory is not supported");
66 "Allocating with non-trivial constructor on the device memory is not supported");
73 template <
typename T,
typename... Args>
74 typename device::impl::make_device_unique_selector<T>::bounded_array
make_device_unique(Args &&...) =
delete;
88 size_t n, cudaStream_t
stream) {
96 template <
typename T,
typename... Args>
cms::cuda::device::unique_ptr< T > non_array
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type * mem
cms::cuda::device::unique_ptr< T[]> unbounded_array
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type cudaStream_t stream
std::unique_ptr< T, impl::DeviceDeleter > unique_ptr
void operator()(void *ptr)
device::impl::make_device_unique_selector< T >::non_array make_device_unique_uninitialized(cudaStream_t stream)
void free_device(int device, void *ptr)
DeviceDeleter(int device)
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type cudaStream_t Func __host__ __device__ V int n
void * allocate_device(int dev, size_t nbytes, cudaStream_t stream)
device::impl::make_device_unique_selector< T >::non_array make_device_unique(cudaStream_t stream)