目录

GetSize

Function Description

Obtains the memory size of the tensor data.

Function Prototype

size_t GetSize() const

Parameters

None

Return Value

Memory size occupied by a tensor, in bytes.

Restrictions

None

Calling Example

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