UCX++
Public Member Functions | Static Public Member Functions | List of all members
ucxpp::local_memory_handle Class Reference

Represents a registered local memory region. More...

#include <ucxpp/memory.h>

Inheritance diagram for ucxpp::local_memory_handle:
Inheritance graph
[legend]
Collaboration diagram for ucxpp::local_memory_handle:
Collaboration graph
[legend]

Public Member Functions

 local_memory_handle (std::shared_ptr< context > ctx, ucp_mem_h mem)
 Construct a new local memory handle object. More...
 
 local_memory_handle (local_memory_handle &&other)
 Construct a new local memory handle object. More...
 
ucp_mem_h handle () const
 Get the native UCX memory handle. More...
 
packed_memory_rkey pack_rkey () const
 Pack the information needed for remote access to the memory region. It is intended to be sent to the remote peer. More...
 
 ~local_memory_handle ()
 Destroy the local memory handle object. The memory region will be deregistered.
 
- Public Member Functions inherited from ucxpp::noncopyable
 noncopyable (noncopyable &&)=default
 
 noncopyable (noncopyable const &)=delete
 
noncopyableoperator= (noncopyable const &)=delete
 
noncopyableoperator= (noncopyable &&)=default
 

Static Public Member Functions

static std::pair< void *, local_memory_handleallocate_mem (std::shared_ptr< context > ctx, size_t length)
 Allocate and register a local memory region. More...
 
static local_memory_handle register_mem (std::shared_ptr< context > ctx, void *address, size_t length)
 

Detailed Description

Represents a registered local memory region.

Examples
helloworld.cc.

Constructor & Destructor Documentation

◆ local_memory_handle() [1/2]

ucxpp::local_memory_handle::local_memory_handle ( std::shared_ptr< context ctx,
ucp_mem_h  mem 
)

Construct a new local memory handle object.

Parameters
ctxUCX context
memUCX memory handle

◆ local_memory_handle() [2/2]

ucxpp::local_memory_handle::local_memory_handle ( local_memory_handle &&  other)

Construct a new local memory handle object.

Parameters
otherAnother local memory handle to move from

Member Function Documentation

◆ allocate_mem()

std::pair< void *, local_memory_handle > ucxpp::local_memory_handle::allocate_mem ( std::shared_ptr< context ctx,
size_t  length 
)
static

Allocate and register a local memory region.

Parameters
ctxUCX context
lengthDesired length of the memory region
Returns
std::pair<void *, local_memory_handle> A pair of pointer to the allocated memory region and the local memory handle

◆ handle()

ucp_mem_h ucxpp::local_memory_handle::handle ( ) const

Get the native UCX memory handle.

Returns
ucp_mem_h

◆ pack_rkey()

packed_memory_rkey ucxpp::local_memory_handle::pack_rkey ( ) const

Pack the information needed for remote access to the memory region. It is intended to be sent to the remote peer.

Returns
packed_memory_rkey The packed memory handle
Examples
helloworld.cc.

The documentation for this class was generated from the following files: