8 #include <rmm/detail/export.hpp>
10 #include <cuda/memory_resource>
11 #include <cuda/stream_ref>
12 #include <cuda_runtime_api.h>
16 namespace RMM_NAMESPACE {
70 void* allocate(cuda::stream_ref stream,
83 void deallocate(cuda::stream_ref stream,
104 void deallocate_sync(
void* ptr,
129 cuda::mr::device_accessible) noexcept
134 cudaMemPool_t cuda_pool_handle_{};
138 static_assert(cuda::mr::synchronous_resource<cuda_async_view_memory_resource>);
139 static_assert(cuda::mr::resource<cuda_async_view_memory_resource>);
140 static_assert(cuda::mr::synchronous_resource_with<cuda_async_view_memory_resource,
141 cuda::mr::device_accessible>);
143 cuda::mr::resource_with<cuda_async_view_memory_resource, cuda::mr::device_accessible>);
Memory resource that uses cudaMallocAsync/cudaFreeAsync for allocation/deallocation.
Definition: cuda_async_view_memory_resource.hpp:28
cudaMemPool_t pool_handle() const noexcept
Returns the underlying native handle to the CUDA pool.
cuda_async_view_memory_resource(cudaMemPool_t pool_handle)
Constructs a cuda_async_view_memory_resource which uses an existing CUDA memory pool....
static constexpr std::size_t CUDA_ALLOCATION_ALIGNMENT
Default alignment used for CUDA memory allocation.
Definition: aligned.hpp:25
RAPIDS Memory Manager - The top-level namespace for all RMM functionality.