Non-owning references to the memory resources used by a cuDF operation. More...
#include <cudf/utilities/memory_resource.hpp>
Public Member Functions | |
| template<typename Resource > | |
| memory_resources (Resource &&output_mr) | |
| Construct with an explicit output resource and capture the current resource for temporaries. More... | |
| template<typename OutputResource , typename TemporaryResource > | |
| memory_resources (OutputResource &&output_mr, TemporaryResource &&temporary_mr) | |
| Construct with explicit output and temporary resources. More... | |
| rmm::device_async_resource_ref | get_output_mr () const noexcept |
| Return the resource used for allocations returned to the caller. More... | |
| rmm::device_async_resource_ref | get_temporary_mr () const noexcept |
| Return the resource used for intermediate allocations. More... | |
Non-owning references to the memory resources used by a cuDF operation.
The output resource allocates memory returned to the caller. The temporary resource allocates intermediate memory that is released before the operation returns. If allocations are made from a resource ref, callers must construct an owning resource from the resource ref, keep that owning resource alive for the allocation's lifetime, and use it for deallocation.
Definition at line 47 of file memory_resource.hpp.
|
inline |
Construct with an explicit output resource and capture the current resource for temporaries.
This constructor is intentionally implicit so an existing resource object or resource ref can be passed directly to an API accepting memory_resources.
| Resource | Type that can construct a device asynchronous resource ref |
| output_mr | Resource used for returned allocations |
Definition at line 60 of file memory_resource.hpp.
|
inline |
Construct with explicit output and temporary resources.
This constructor does not query the current device resource.
| OutputResource | Type that can construct the output resource ref |
| TemporaryResource | Type that can construct the temporary resource ref |
| output_mr | Resource used for returned allocations |
| temporary_mr | Resource used for intermediate allocations |
Definition at line 80 of file memory_resource.hpp.
|
inlinenoexcept |
Return the resource used for allocations returned to the caller.
Definition at line 95 of file memory_resource.hpp.
|
inlinenoexcept |
Return the resource used for intermediate allocations.
Definition at line 102 of file memory_resource.hpp.