cuda::shared_pinned_memory_pool#

class shared_pinned_memory_pool : public cuda::__shared_memory_pool_base<shared_pinned_memory_pool>#

Shared pinned memory pool#

shared_pinned_memory_pool provides shared ownership of a pinned memory pool. It is copyable and each copy shares the same underlying cudaMemPool_t via reference counting. This makes it usable with any_resource and other contexts that require copyable resources.

Public Types

using default_queries = ::cuda::mr::properties_list<::cuda::mr::device_accessible, ::cuda::mr::host_accessible>#

Public Functions

inline shared_pinned_memory_pool(
const shared_pinned_memory_pool &__other
) noexcept#
inline shared_pinned_memory_pool(
shared_pinned_memory_pool &&__other
) noexcept#
shared_pinned_memory_pool &operator=(
const shared_pinned_memory_pool&
) = default#
shared_pinned_memory_pool &operator=(
shared_pinned_memory_pool&&
) = default#
inline explicit shared_pinned_memory_pool(no_init_t) noexcept#

Constructs an empty shared pinned memory pool.

inline explicit shared_pinned_memory_pool(
memory_pool_properties __properties = {}
)#

Constructs a shared pinned memory pool.

Parameters:

__properties – Optional pool creation properties.

inline explicit shared_pinned_memory_pool(
int __numa_id,
memory_pool_properties __properties = {}
)#

Constructs a shared pinned memory pool on a specific NUMA node.

Parameters:
  • __numa_id – The NUMA node id.

  • __properties – Optional pool creation properties.

inline constexpr const _Derived &query(
const __get_memory_resource_t&
) const noexcept#

Public Static Functions

static inline shared_pinned_memory_pool from_native_handle(
::cudaMemPool_t __pool
) noexcept#

Constructs a shared pinned memory pool from an existing native handle.

Parameters:

__pool – The cudaMemPool_t to take shared ownership of.

Friends

inline friend constexpr void get_property(
const shared_pinned_memory_pool&,
::cuda::mr::device_accessible
) noexcept#
inline friend constexpr void get_property(
const shared_pinned_memory_pool&,
::cuda::mr::host_accessible
) noexcept#