nk 1.0.0
C++ Numerical Computing Runtime
Loading...
Searching...
No Matches
nk::DataBuffer Class Reference

Classes

struct  ViewTag

Public Member Functions

 DataBuffer (size_t bytes, std::pmr::memory_resource *mr)
 DataBuffer (ViewTag, void *external, size_t bytes) noexcept
 Non-owning ctor: wraps external for bytes bytes.
 DataBuffer (const DataBuffer &)=delete
DataBuffer & operator= (const DataBuffer &)=delete
void * data ()
const void * data () const
size_t bytes () const
std::pmr::memory_resource * resource () const
bool owns () const
void addRef ()
bool release ()
int refCount () const

Detailed Description

Definition at line 25 of file data_buffer.hpp.

Constructor & Destructor Documentation

◆ DataBuffer()

nk::DataBuffer::DataBuffer ( ViewTag ,
void * external,
size_t bytes )
noexcept

Non-owning ctor: wraps external for bytes bytes.

Destructor will not free; caller manages lifetime.

Member Function Documentation

◆ bytes()

size_t nk::DataBuffer::bytes ( ) const
inline

Definition at line 41 of file data_buffer.hpp.

◆ data() [1/2]

void * nk::DataBuffer::data ( )
inline

Definition at line 39 of file data_buffer.hpp.

◆ data() [2/2]

const void * nk::DataBuffer::data ( ) const
inline

Definition at line 40 of file data_buffer.hpp.

◆ owns()

bool nk::DataBuffer::owns ( ) const
inline

Definition at line 43 of file data_buffer.hpp.

◆ resource()

std::pmr::memory_resource * nk::DataBuffer::resource ( ) const
inline

Definition at line 42 of file data_buffer.hpp.


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