Get storage location from TensorImpl
Reference to a storage location is backend-dependent and cannot generally be shared between different backends.
For instance, even though CUDA uses pointer type to describe a storage location, the "address" stored has no meaning for the CPU, it can be used only by CUDA functions.
As actual type used to hold a storage location can be anything, I propose the following API to retrieve the TensorImpl location:
/// @brief gets a handle on the storage managed by the TensorImpl.
/// @param i_Storage reference to a _any object that will hold the storage handle.
/// @note If no storage is available, i_Storage content is undefined on return.
/// @return true if a storage is actually available, false otherwise.
virtual bool GetStorageLocation(_any& i_Storage) = 0;
NB: so far nothing is proposed to copy from a backend to another one (in fix/TensorImpl, such operation now fails on assert in debug configuration).
Edited by laurent soulier