Loading...
Searching...
No Matches
opennn::device::PinnedBuffer Class Reference

#include <opennn/core/device_backend.h>

Public Member Functions

 PinnedBuffer ()=default
 
 PinnedBuffer (Index byte_count)
 
 PinnedBuffer (const PinnedBuffer &)=delete
 
PinnedBuffer & operator= (const PinnedBuffer &)=delete
 
 PinnedBuffer (PinnedBuffer &&) noexcept
 
PinnedBuffer & operator= (PinnedBuffer &&) noexcept
 
 ~PinnedBuffer () noexcept
 
void resize_bytes (Index)
 
void grow_to (Index)
 
void * data () noexcept
 
const void * data () const noexcept
 
template<typename T>
T * as () noexcept
 
template<typename T>
const T * as () const noexcept
 
Index byte_size () const noexcept
 
bool empty () const noexcept
 
 operator bool () const noexcept
 

Constructor & Destructor Documentation

◆ PinnedBuffer() [1/4]

opennn::device::PinnedBuffer::PinnedBuffer ( )
default

◆ PinnedBuffer() [2/4]

opennn::device::PinnedBuffer::PinnedBuffer ( Index byte_count)
explicit

◆ PinnedBuffer() [3/4]

opennn::device::PinnedBuffer::PinnedBuffer ( const PinnedBuffer & )
delete

◆ PinnedBuffer() [4/4]

opennn::device::PinnedBuffer::PinnedBuffer ( PinnedBuffer && )
noexcept

◆ ~PinnedBuffer()

opennn::device::PinnedBuffer::~PinnedBuffer ( )
noexcept

Member Function Documentation

◆ as() [1/2]

template<typename T>
const T * opennn::device::PinnedBuffer::as ( ) const
inlinenoexcept

◆ as() [2/2]

template<typename T>
T * opennn::device::PinnedBuffer::as ( )
inlinenoexcept

◆ byte_size()

Index opennn::device::PinnedBuffer::byte_size ( ) const
inlinenoexcept

◆ data() [1/2]

const void * opennn::device::PinnedBuffer::data ( ) const
inlinenoexcept

◆ data() [2/2]

void * opennn::device::PinnedBuffer::data ( )
inlinenoexcept

◆ empty()

bool opennn::device::PinnedBuffer::empty ( ) const
inlinenoexcept

◆ grow_to()

void opennn::device::PinnedBuffer::grow_to ( Index )

◆ operator bool()

opennn::device::PinnedBuffer::operator bool ( ) const
inlineexplicitnoexcept

◆ operator=() [1/2]

PinnedBuffer & opennn::device::PinnedBuffer::operator= ( const PinnedBuffer & )
delete

◆ operator=() [2/2]

PinnedBuffer & opennn::device::PinnedBuffer::operator= ( PinnedBuffer && )
noexcept

◆ resize_bytes()

void opennn::device::PinnedBuffer::resize_bytes ( Index )