SetAddr

Description

Sets the tensor address.

Prototype

ge::graphStatus SetAddr(const ConstTensorAddressPtr addr, TensorAddrManager manager)

Parameters

Parameter

Input/Output

Description

addr

Input

Tensor address.

using ConstTensorAddressPtr = const void *;

manager

Input

Tensor management function.

using TensorAddrManager = ge::graphStatus (*)(TensorAddress addr, TensorOperateType operate_type, void **out);

Returns

If the operation is successful, ge::GRAPH_SUCCESS is returned. If the operation fails, an error code defined in the manager function is returned.

Restrictions

None

Example

auto addr = reinterpret_cast<void *>(0x10);
TensorData td(addr, nullptr);
td.SetAddr(addr, HostAddrManager);