目录

SetAddr

Function Description

Sets the tensor address.

Function 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.

Return Value

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

Calling Example

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