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

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

#include <resource.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 33 of file resource.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)
inline

Move constructor for MemoryReservation.

Parameters
oThe memory reservation to move from.

Definition at line 54 of file resource.hpp.

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 100 of file resource.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 91 of file resource.hpp.

◆ operator=()

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

Move assignment operator for MemoryReservation.

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

Definition at line 65 of file resource.hpp.

◆ 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 82 of file resource.hpp.


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