GetPlacement

Description

Obtains the placement of a tensor, that is, the location of the device where the tensor data is located.

Prototype

TensorPlacement GetPlacement() const

Parameters

None

Returns

Tensor placement. For details about the definition of the TensorPlacement type, see TensorPlacement.

Restrictions

None

Example

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