Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
shamcomm::CommunicationBuffer Class Reference

Shamrock communication buffers. More...

#include <shambackends/include/shambackends/comm/CommunicationBuffer.hpp>

Public Member Functions

 CommunicationBuffer (u64 bytelen, sham::DeviceScheduler_ptr dev_sched)
 
 CommunicationBuffer (sham::DeviceBuffer< u8 > &&bytebuf, sham::DeviceScheduler_ptr dev_sched)
 
 CommunicationBuffer (const sham::DeviceBuffer< u8 > &bytebuf, sham::DeviceScheduler_ptr dev_sched)
 
u64 get_size ()
 Gets the size of the buffer (here in bytes)
 
u8get_ptr ()
 
CommunicationBuffer duplicate ()
 duplicate the comm buffer and return a unique ptr to the copy
 
std::unique_ptr< CommunicationBufferduplicate_to_ptr ()
 duplicate the comm buffer and return a unique ptr to the copy
 

Static Public Member Functions

static sham::DeviceBuffer< u8convert_usm (CommunicationBuffer &&buf)
 destroy the buffer and recover the held object
 

Detailed Description

Shamrock communication buffers.

Todo:
try reducing compile time by type erasing impl

Definition at line 42 of file CommunicationBuffer.hpp.

Constructor & Destructor Documentation

◆ CommunicationBuffer() [1/3]

shamcomm::CommunicationBuffer::CommunicationBuffer ( u64  bytelen,
sham::DeviceScheduler_ptr  dev_sched 
)
inline

Definition at line 57 of file CommunicationBuffer.hpp.

◆ CommunicationBuffer() [2/3]

shamcomm::CommunicationBuffer::CommunicationBuffer ( sham::DeviceBuffer< u8 > &&  bytebuf,
sham::DeviceScheduler_ptr  dev_sched 
)
inline

Definition at line 71 of file CommunicationBuffer.hpp.

◆ CommunicationBuffer() [3/3]

shamcomm::CommunicationBuffer::CommunicationBuffer ( const sham::DeviceBuffer< u8 > &  bytebuf,
sham::DeviceScheduler_ptr  dev_sched 
)
inline

Definition at line 86 of file CommunicationBuffer.hpp.

Member Function Documentation

◆ convert_usm()

static sham::DeviceBuffer< u8 > shamcomm::CommunicationBuffer::convert_usm ( CommunicationBuffer &&  buf)
inlinestatic

destroy the buffer and recover the held object

Parameters
buf
Returns
T

Definition at line 151 of file CommunicationBuffer.hpp.

◆ duplicate()

CommunicationBuffer shamcomm::CommunicationBuffer::duplicate ( )
inline

duplicate the comm buffer and return a unique ptr to the copy

Returns
CommBuffer

Definition at line 125 of file CommunicationBuffer.hpp.

◆ duplicate_to_ptr()

std::unique_ptr< CommunicationBuffer > shamcomm::CommunicationBuffer::duplicate_to_ptr ( )
inline

duplicate the comm buffer and return a unique ptr to the copy

Returns
CommBuffer

Definition at line 141 of file CommunicationBuffer.hpp.

+ Here is the call graph for this function:

◆ get_ptr()

u8 * shamcomm::CommunicationBuffer::get_ptr ( )
inline

Definition at line 112 of file CommunicationBuffer.hpp.

◆ get_size()

u64 shamcomm::CommunicationBuffer::get_size ( )
inline

Gets the size of the buffer (here in bytes)

Definition at line 104 of file CommunicationBuffer.hpp.


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