8 #include <rmm/detail/export.hpp>
9 #include <rmm/mr/detail/aligned_resource_adaptor_impl.hpp>
12 #include <cuda/memory_resource>
16 namespace RMM_NAMESPACE {
34 :
public cuda::mr::shared_resource<detail::aligned_resource_adaptor_impl> {
35 using shared_base = cuda::mr::shared_resource<detail::aligned_resource_adaptor_impl>;
42 cuda::mr::device_accessible) noexcept
49 static constexpr std::size_t default_alignment_threshold =
50 detail::aligned_resource_adaptor_impl::default_alignment_threshold;
65 std::size_t alignment_threshold = default_alignment_threshold);
Resource that adapts an upstream resource to allocate memory with a specified alignment.
Definition: aligned_resource_adaptor.hpp:34
device_async_resource_ref get_upstream_resource() const noexcept
rmm::device_async_resource_ref to the upstream resource
friend void get_property(aligned_resource_adaptor const &, cuda::mr::device_accessible) noexcept
Enables the cuda::mr::device_accessible property.
Definition: aligned_resource_adaptor.hpp:41
aligned_resource_adaptor(cuda::mr::any_resource< cuda::mr::device_accessible > upstream, std::size_t alignment=rmm::CUDA_ALLOCATION_ALIGNMENT, std::size_t alignment_threshold=default_alignment_threshold)
Construct an aligned resource adaptor using upstream to satisfy allocation requests.
cuda::mr::resource_ref< cuda::mr::device_accessible > device_async_resource_ref
Alias for a cuda::mr::resource_ref with the property cuda::mr::device_accessible.
Definition: resource_ref.hpp:30
static constexpr std::size_t CUDA_ALLOCATION_ALIGNMENT
Default alignment used for CUDA memory allocation.
Definition: aligned.hpp:25