SetAddr

Function Usage

Sets the tensor address.

Prototype

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

Parameters

Parameter

Input/Output

Description

addr

Input

Tensor address.

1
using ConstTensorAddressPtr = const void *;

manager

Input

Tensor management function.

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

Constraints

None

Examples

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