目录

SetPlacement

Function Description

Sets the placement of a tensor.

Function Prototype

void SetPlacement(const TensorPlacement placement)

Parameters

Parameter Input/Output Description
placement Input

Tensor placement.

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

Return Value

None

Restrictions

None

Calling Example

auto addr = reinterpret_cast<void *>(0x10);
TensorData td(addr, nullptr);
auto td_place = td.SetPlacement(kOnHost);