Class VartTensorBuffer¶
Defined in File vart_tensor_buffer.hpp
Inheritance Relationships¶
Base Type¶
public amdinfer::Buffer
(Class Buffer)
Class Documentation¶
-
class VartTensorBuffer : public amdinfer::Buffer¶
VartTensorBuffer uses vart::CpuFlatTensorBufferOwned for storing data.
Public Functions
-
VartTensorBuffer(const std::string &name, std::vector<int32_t> &shape, xir::DataType data_type)¶
-
VartTensorBuffer(const char *name, std::vector<int32_t> &shape, xir::DataType data_type)¶
-
virtual void *data(size_t offset) override¶
Returns a pointer to the underlying data.
- Parameters
index – Used to index to the correct tensor in the batch
- Returns
void*
-
virtual void reset() override¶
Perform any cleanup before returning the buffer to the pool.
-
vart::TensorBuffer *getTensorBuffer()¶
Get a pointer to the underlying TensorBuffer.
-
VartTensorBuffer(const std::string &name, std::vector<int32_t> &shape, xir::DataType data_type)¶