ShareFrom
Description
Enables the current TensorData object to share the memory and memory management function of another object.
Prototype
ge::graphStatus ShareFrom(const TensorData &other)
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
other |
Input |
Another TensorData object |
Returns
ge::GRAPH_SUCCESS on success.
Restrictions
None
Example
auto addr = reinterpret_cast<void *>(0x10); TensorData td1(addr, HostAddrManager, 100U, kOnHost); TensorData td2(addr, nullptr); td2.ShareFrom(td1);
Parent topic: TensorData