New proposal for handling tensor views
Compare changes
This is a new proposal for handling views in Tensor.
Compared to !13 (closed), this proposal does not change the interface of TensorImpl
and does not require low level Extract()
implementation. It also adds missing essential facilities, such as isContiguous()
, makeContiguous()
and refContiguous()
.
mImpl
is now shared_ptr
instead of unique_ptr
, with removed dependence to Tensor
in TensorImpl
;mImplOffset
parameter for data offset of the current Tensor w.r.t. shared implementation;mStrides
parameter to Tensor;clone()
function for deep copy;extract()
functions for extracting a sub-tensor;makeContiguous()
function to make memory contiguous (and refContiguous()
on the same model as refCastFrom()
).resize()
behavior currently is to throw if one tries to change de size with a shared implementation.
Copyright © Eclipse Foundation, Inc. All Rights Reserved. Privacy Policy | Terms of Use | Copyright Agent