Class Buffer¶
Defined in File buffer.hpp
Inheritance Relationships¶
Derived Types¶
public amdinfer::VartTensorBuffer
(Class VartTensorBuffer)public amdinfer::VectorBuffer
(Class VectorBuffer)
Class Documentation¶
-
class Buffer¶
The base buffer class. Buffer implementations should extend this class and override the methods.
Subclassed by amdinfer::VartTensorBuffer, amdinfer::VectorBuffer
Public Functions
-
virtual void *data(size_t offset) = 0¶
Get a pointer to the underlying data of the buffer.
- Parameters
offset – For non-contiguous buffers, an offset may be needed to choose which pointer to return. Buffer implementations may ignore this value if unneeded.
- Returns
void*
-
virtual void reset() = 0¶
Reset the buffer. This should be called prior to returning the buffer to its buffer pool.
-
virtual size_t write(void *data, size_t offset, size_t size)¶
Write arbitrary data from an address into this buffer.
- Parameters
data – pointer to data
offset – offset to start writing the data
size – size of the data to write in bytes
- Returns
size_t number of bytes actually written
-
virtual void *data(size_t offset) = 0¶