Public Member Functions | List of all members
kvikio::BounceBufferPool< Allocator >::Buffer Class Reference

RAII wrapper for a host bounce buffer allocation. More...

#include <bounce_buffer.hpp>

Public Member Functions

 Buffer (BounceBufferPool< Allocator > *pool, void *buffer, std::size_t size)
 
 Buffer (Buffer const &)=delete
 
Bufferoperator= (Buffer const &)=delete
 
 Buffer (Buffer &&o) noexcept
 
Bufferoperator= (Buffer &&o) noexcept
 
void * get () const noexcept
 
void * get (std::ptrdiff_t offset) const noexcept
 
std::size_t size () const noexcept
 

Detailed Description

template<typename Allocator = CudaPinnedAllocator>
class kvikio::BounceBufferPool< Allocator >::Buffer

RAII wrapper for a host bounce buffer allocation.

Automatically returns the buffer to the pool when destroyed (RAII pattern). Provides access to the underlying memory and its size.

Note
Non-copyable but movable to allow transfer of ownership while maintaining RAII

Definition at line 136 of file bounce_buffer.hpp.


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