Public Member Functions | Friends | List of all members
rapidsmpf::MemoryReservation Class Reference

Represents a reservation for future memory allocation. More...

#include <memory_reservation.hpp>

Public Member Functions

 ~MemoryReservation () noexcept
 Destructor for the memory reservation. More...
 
void clear () noexcept
 Clear the remaining size of the reservation.
 
 MemoryReservation (MemoryReservation &&o)
 Move constructor for MemoryReservation. More...
 
MemoryReservationoperator= (MemoryReservation &&o) noexcept
 Move assignment operator for MemoryReservation. More...
 
 MemoryReservation (MemoryReservation const &)=delete
 A memory reservation is not copyable.
 
MemoryReservationoperator= (MemoryReservation const &)=delete
 
constexpr std::size_t size () const noexcept
 Get the remaining size of the reserved memory. More...
 
constexpr MemoryType mem_type () const noexcept
 Get the type of memory associated with this reservation. More...
 
constexpr BufferResourcebr () const noexcept
 Get the buffer resource associated with this reservation. More...
 

Friends

class BufferResource
 

Detailed Description

Represents a reservation for future memory allocation.

A reservation is returned by BufferResource::reserve and must be used when allocating buffers through the BufferResource.

Definition at line 23 of file memory_reservation.hpp.

Constructor & Destructor Documentation

◆ ~MemoryReservation()

rapidsmpf::MemoryReservation::~MemoryReservation ( )
noexcept

Destructor for the memory reservation.

Cleans up resources associated with the reservation.

◆ MemoryReservation()

rapidsmpf::MemoryReservation::MemoryReservation ( MemoryReservation &&  o)

Move constructor for MemoryReservation.

Parameters
oThe memory reservation to move from.

Member Function Documentation

◆ br()

constexpr BufferResource* rapidsmpf::MemoryReservation::br ( ) const
inlineconstexprnoexcept

Get the buffer resource associated with this reservation.

Returns
The buffer resource associated with this reservation.

Definition at line 81 of file memory_reservation.hpp.

◆ mem_type()

constexpr MemoryType rapidsmpf::MemoryReservation::mem_type ( ) const
inlineconstexprnoexcept

Get the type of memory associated with this reservation.

Returns
The type of memory associated with this reservation.

Definition at line 72 of file memory_reservation.hpp.

◆ operator=()

MemoryReservation& rapidsmpf::MemoryReservation::operator= ( MemoryReservation &&  o)
noexcept

Move assignment operator for MemoryReservation.

Parameters
oThe memory reservation to move from.
Returns
A reference to the updated MemoryReservation.

◆ size()

constexpr std::size_t rapidsmpf::MemoryReservation::size ( ) const
inlineconstexprnoexcept

Get the remaining size of the reserved memory.

Returns
The size of the reserved memory in bytes.

Definition at line 63 of file memory_reservation.hpp.


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