A host_memory_resource that uses cudaMallocHost to allocate pinned/page-locked host memory.
More...
#include <pinned_memory_resource.hpp>
|
|
| pinned_memory_resource (pinned_memory_resource const &)=default |
| | Default copy constructor.
|
| |
|
| pinned_memory_resource (pinned_memory_resource &&)=default |
| | Default move constructor.
|
| |
| pinned_memory_resource & | operator= (pinned_memory_resource const &)=default |
| | Default copy assignment operator. More...
|
| |
| pinned_memory_resource & | operator= (pinned_memory_resource &&)=default |
| | Default move assignment operator. More...
|
| |
| void * | allocate_async (std::size_t bytes, std::size_t alignment, cuda_stream_view) |
| | Pretend to support the allocate_async interface, falling back to stream 0. More...
|
| |
| void * | allocate_async (std::size_t bytes, cuda_stream_view) |
| | Pretend to support the allocate_async interface, falling back to stream 0. More...
|
| |
| void | deallocate_async (void *ptr, std::size_t bytes, std::size_t alignment, cuda_stream_view) |
| | Pretend to support the deallocate_async interface, falling back to stream 0. More...
|
| |
|
| host_memory_resource (host_memory_resource const &)=default |
| | Default copy constructor.
|
| |
|
| host_memory_resource (host_memory_resource &&) noexcept=default |
| | Default move constructor.
|
| |
| host_memory_resource & | operator= (host_memory_resource const &)=default |
| | Default copy assignment operator. More...
|
| |
| host_memory_resource & | operator= (host_memory_resource &&) noexcept=default |
| | Default move assignment operator. More...
|
| |
| void * | allocate (std::size_t bytes, std::size_t alignment=alignof(std::max_align_t)) |
| | Allocates memory on the host of size at least bytes bytes. More...
|
| |
| void | deallocate (void *ptr, std::size_t bytes, std::size_t alignment=alignof(std::max_align_t)) |
| | Deallocate memory pointed to by ptr. More...
|
| |
| bool | is_equal (host_memory_resource const &other) const noexcept |
| | Compare this resource to another. More...
|
| |
| bool | operator== (host_memory_resource const &other) const noexcept |
| | Comparison operator with another host_memory_resource. More...
|
| |
| bool | operator!= (host_memory_resource const &other) const noexcept |
| | Comparison operator with another host_memory_resource. More...
|
| |
◆ allocate_async() [1/2]
| void* rmm::mr::pinned_memory_resource::allocate_async |
( |
std::size_t |
bytes, |
|
|
cuda_stream_view |
|
|
) |
| |
|
inline |
Pretend to support the allocate_async interface, falling back to stream 0.
- Exceptions
-
| rmm::bad_alloc | When the requested bytes cannot be allocated on the specified stream. |
- Parameters
-
| bytes | The size of the allocation |
- Returns
- void* Pointer to the newly allocated memory
◆ allocate_async() [2/2]
| void* rmm::mr::pinned_memory_resource::allocate_async |
( |
std::size_t |
bytes, |
|
|
std::size_t |
alignment, |
|
|
cuda_stream_view |
|
|
) |
| |
|
inline |
Pretend to support the allocate_async interface, falling back to stream 0.
- Exceptions
-
| rmm::bad_alloc | When the requested bytes cannot be allocated on the specified stream. |
- Parameters
-
| bytes | The size of the allocation |
| alignment | The expected alignment of the allocation |
- Returns
- void* Pointer to the newly allocated memory
◆ deallocate_async()
| void rmm::mr::pinned_memory_resource::deallocate_async |
( |
void * |
ptr, |
|
|
std::size_t |
bytes, |
|
|
std::size_t |
alignment, |
|
|
cuda_stream_view |
|
|
) |
| |
|
inline |
Pretend to support the deallocate_async interface, falling back to stream 0.
- Parameters
-
| ptr | Pointer to be deallocated |
| bytes | The size in bytes of the allocation. This must be equal to the value of bytes that was passed to the allocate call that returned p. |
| alignment | The alignment that was passed to the allocate call that returned p |
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ get_property
Enables the cuda::mr::device_accessible property.
This property declares that a pinned_memory_resource provides device accessible memory
The documentation for this class was generated from the following file: