Release
Function Usage
Releases the ownership of TensorAddress. After this API is called, the object does not manage TensorAddress and TensorAddress is not released. Therefore, the caller is responsible for releasing TensorAddress through manager.
Prototype
1 | TensorAddress Release(TensorAddrManager &manager) |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
manager |
Output |
Tensor management function. It is used to manage the returned TensorAddress. If the object does not have the ownership, manager is set to nullptr. |
Returns
TensorAddress pointer held by the object. If the object does not hold any pointer, nullptr is returned.
Constraints
None
Examples
1 2 3 4 | auto addr = reinterpret_cast<void *>(0x10); TensorData td(addr, HostAddrManager, 100U, kOnHost); TensorAddrManager NewHostAddrManager = nullptr; TensorAddress ta = td.Release(NewHostAddrManager); |
Parent topic: TensorData