SetSize

Description

Sets the memory size of the tensor data.

Prototype

void SetSize(const size_t size)

Parameters

Parameter

Input/Output

Description

size

Input

Memory size occupied by a tensor, in bytes.

Returns

None.

Restrictions

None

Example

auto addr = reinterpret_cast<void *>(0x10);
TensorData td(addr, HostAddrManager, 100U, kOnHost);
td.SetSize(10U);