AlignedBuffer class
A container used to allocate 32-byte aligned buffers.
Contents
This is a highly simplified version of std::vector< dip::uint8 > for the purposes of allocating
a buffer with a 32-byte alignment. The buffer is not initialized.
Constructors, destructors, assignment and conversion operators
- AlignedBuffer() defaulted
- A default-initialized buffer is empty.
- AlignedBuffer(dip::uint size) explicit
- A buffer of size
size, uninitialized.
Functions
- void clear() noexcept
- Free the buffer’s memory.
- auto data() -> dip::uint8* noexcept
- Returns a pointer to the first byte of the buffer.
- auto data() const -> dip::uint8 const* noexcept
- Returns a pointer to the first byte of the buffer.
- auto empty() const -> bool noexcept
- True if the buffer is empty (its size is zero).
- void resize(dip::uint newsz)
- Change the size of the buffer to
size. Data is not preserved. - auto size() const -> dip::uint noexcept
- Returns the size of the buffer.
Function documentation
AlignedBuffer( ) defaulted
A default-initialized buffer is empty.
AlignedBuffer( dip::uint size) explicit
A buffer of size size, uninitialized.
void clear( ) noexcept
Free the buffer’s memory.
bool empty( ) const noexcept
True if the buffer is empty (its size is zero).
dip::uint8* data( ) noexcept
Returns a pointer to the first byte of the buffer.
dip::uint8 const* data( ) const noexcept
Returns a pointer to the first byte of the buffer.