cuda::shared_device_memory_pool#

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

Shared device memory pool#

shared_device_memory_pool provides shared ownership of a device 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>#

Public Functions

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

Constructs an empty shared device memory pool.

inline explicit shared_device_memory_pool(
::cuda::device_ref __device_id,
memory_pool_properties __properties = {}
)#

Constructs a shared device memory pool.

Parameters:
  • __device_id – The device the pool is constructed on.

  • __properties – Optional pool creation properties.

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

Public Static Functions

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

Constructs a shared device 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_device_memory_pool&,
::cuda::mr::device_accessible
) noexcept#