IReadOnlyTensor<TSelf,T>.TryFlattenTo(Span<T>) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Attempts to flatten the contents of this tensor into a destination span and returns a value to indicate whether or not the operation succeeded.
public:
bool TryFlattenTo(Span<T> destination);
public bool TryFlattenTo(scoped Span<T> destination);
abstract member TryFlattenTo : Span<'T> -> bool
Public Function TryFlattenTo (destination As Span(Of T)) As Boolean
Parameters
- destination
- Span<T>
The target of the copy operation.
Returns
true
if the copy operation succeeded; otherwise, false
.
Remarks
If the source and destination
overlap, the entirety of the source is handled as if it was flattened to a temporary location before it is copied to destination
.
If the destination
length is shorter than the source, no items are copied and the method returns false
.