TensorBuffer
Function Usage
TensorBuffer constructor, which is used to create a TensorBuffer object. Different constructors can be selected based on the input parameters.
Prototype
TensorBuffer();
TensorBuffer(uint32_t size, MemoryData::MemoryType type, int32_t deviceId);
TensorBuffer(uint32_t size, int32_t deviceId);
TensorBuffer(uint32_t size);
TensorBuffer(void *ptr, uint32_t size, MemoryData::MemoryType type = MemoryData::MemoryType::MEMORY_HOST_NEW, int32_t deviceId = -1);
Parameter Description
Parameter |
Input/Output |
Description |
|---|---|---|
ptr |
Input |
Memory pointer. |
size |
Input |
Memory size. |
type |
Input |
Memory type used to construct the TensorBuffer object. |
deviceId |
Input |
Device ID of the int type, which is used to construct the TensorBuffer object. |
Parent topic: TensorBuffer