RAII wrapper for xvecBufferTag.
More...
#include <xvec_buffer.hpp>
RAII wrapper for xvecBufferTag.
Manages the lifetime of a device buffer. The buffer is created in the constructor and destroyed in the destructor. Supports move semantics but not copying.
Definition at line 50 of file xvec_buffer.hpp.
◆ Buffer() [1/3]
| xvec::Buffer::Buffer |
( |
xvecExecutionContextTag * |
context, |
|
|
size_t |
size |
|
) |
| |
Create a buffer.
- Parameters
-
| context | Execution context handle (not owned). |
| size | Size of the buffer in bytes. |
- Exceptions
-
◆ ~Buffer()
| virtual xvec::Buffer::~Buffer |
( |
| ) |
|
|
virtual |
◆ Buffer() [2/3]
| xvec::Buffer::Buffer |
( |
Buffer && |
other | ) |
|
|
noexcept |
◆ Buffer() [3/3]
| xvec::Buffer::Buffer |
( |
const Buffer & |
| ) |
|
|
delete |
◆ data() [1/2]
| void* xvec::Buffer::data |
( |
| ) |
const |
Get the raw data pointer.
- Exceptions
-
◆ data() [2/2]
template<typename T >
| T* xvec::Buffer::data |
( |
| ) |
const |
|
inline |
Get the data pointer cast to a specific type.
- Template Parameters
-
Definition at line 85 of file xvec_buffer.hpp.
◆ handle()
| xvecBufferTag* xvec::Buffer::handle |
( |
| ) |
const |
|
noexcept |
Get the underlying C API handle.
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ size()
| size_t xvec::Buffer::size |
( |
| ) |
const |
Get the buffer size in bytes.
- Exceptions
-
The documentation for this class was generated from the following file: