SetSize
Function Usage
Sets the memory size of the tensor data.
Prototype
1 | void SetSize(const size_t size) |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
size |
Input |
Memory size occupied by a tensor, in bytes. |
Returns
None.
Constraints
None
Examples
1 2 3 | auto addr = reinterpret_cast<void *>(0x10); TensorData td(addr, HostAddrManager, 100U, kOnHost); td.SetSize(10U); |
Parent topic: TensorData