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 resize(dip::uint newsz)
- Change the size of the buffer to
size
. Data is not preserved. - void clear() noexcept
- Free the buffer’s memory.
- auto empty() const -> bool noexcept
- True if the buffer is empty (its size is zero).
- auto size() const -> dip::uint noexcept
- Returns the size of the buffer.
- 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.