
Classes | |
| class | rmm::mr::aligned_resource_adaptor< Upstream > |
Resource that adapts Upstream memory resource to allocate memory in a specified alignment size. More... | |
| class | rmm::mr::failure_callback_resource_adaptor< Upstream, ExceptionType > |
| A device memory resource that calls a callback function when allocations throw a specified exception type. More... | |
| class | rmm::mr::limiting_resource_adaptor< Upstream > |
Resource that uses Upstream to allocate memory and limits the total allocations possible. More... | |
| class | rmm::mr::logging_resource_adaptor< Upstream > |
Resource that uses Upstream to allocate memory and logs information about the requested allocation/deallocations. More... | |
| class | rmm::mr::owning_wrapper< Resource, Upstreams > |
| Resource adaptor that maintains the lifetime of upstream resources. More... | |
| class | rmm::mr::prefetch_resource_adaptor< Upstream > |
| Resource that prefetches all memory allocations. More... | |
| class | rmm::mr::statistics_resource_adaptor< Upstream > |
Resource that uses Upstream to allocate memory and tracks statistics on memory allocations. More... | |
| class | rmm::mr::thread_safe_resource_adaptor< Upstream > |
Resource that adapts Upstream memory resource adaptor to be thread safe. More... | |
| class | rmm::mr::thrust_allocator< T > |
An allocator compatible with Thrust containers and algorithms using a device_async_resource_ref for memory (de)allocation. More... | |
| class | rmm::mr::tracking_resource_adaptor< Upstream > |
Resource that uses Upstream to allocate memory and tracks allocations. More... | |
Typedefs | |
| using | rmm::mr::failure_callback_t = std::function< bool(std::size_t, void *)> |
| Callback function type used by failure_callback_resource_adaptor. More... | |
Functions | |
| template<template< typename... > class Resource, typename... Upstreams, typename... Args> | |
| auto | rmm::mr::make_owning_wrapper (std::tuple< std::shared_ptr< Upstreams >... > upstreams, Args &&... args) |
Constructs a resource of type Resource wrapped in an owning_wrapper using upstreams as the upstream resources and args as the additional parameters for the constructor of Resource. More... | |
| template<template< typename > class Resource, typename Upstream , typename... Args> | |
| auto | rmm::mr::make_owning_wrapper (std::shared_ptr< Upstream > upstream, Args &&... args) |
Additional convenience factory for owning_wrapper when Resource has only a single upstream resource. More... | |
| using rmm::mr::failure_callback_t = typedef std::function<bool(std::size_t, void*)> |
Callback function type used by failure_callback_resource_adaptor.
The resource adaptor calls this function when a memory allocation throws a specified exception type. The function decides whether the resource adaptor should try to allocate the memory again or re-throw the exception.
The callback function signature is: bool failure_callback_t(std::size_t bytes, void* callback_arg)
The callback function is passed two parameters: bytes is the size of the failed memory allocation and arg is the extra argument passed to the constructor of the failure_callback_resource_adaptor. The callback function returns a Boolean where true means to retry the memory allocation and false means to re-throw the exception.
| auto rmm::mr::make_owning_wrapper | ( | std::shared_ptr< Upstream > | upstream, |
| Args &&... | args | ||
| ) |
Additional convenience factory for owning_wrapper when Resource has only a single upstream resource.
When a resource has only a single upstream, it can be inconvenient to construct a std::tuple of the upstream resource. This factory allows specifying the single upstream as just a std::shared_ptr.
| Resource | Type of the wrapped resource to construct |
| Upstream | Type of the single upstream resource |
| Args | Types of the arguments used in Resources constructor |
| upstream | std::shared_ptr to the upstream resource |
| args | Function parameter pack of arguments to forward to the wrapped resource's constructor |
owning_wrapper wrapping a newly construct Resource<Upstream> and upstream. | auto rmm::mr::make_owning_wrapper | ( | std::tuple< std::shared_ptr< Upstreams >... > | upstreams, |
| Args &&... | args | ||
| ) |
Constructs a resource of type Resource wrapped in an owning_wrapper using upstreams as the upstream resources and args as the additional parameters for the constructor of Resource.
| Resource | Template template parameter specifying the type of the wrapped resource to construct |
| Upstreams | Types of the upstream resources |
| Args | Types of the arguments used in Resources constructor |
| upstreams | Tuple of std::shared_ptrs to the upstreams used by the wrapped resource, in the same order as expected by Resources constructor. |
| args | Function parameter pack of arguments to forward to the wrapped resource's constructor |
owning_wrapper wrapping a newly constructed Resource<Upstreams...> and upstreams.