Implemented interface member:
method
AsTensorSpan
System.Numerics.Tensors.ITensor<TSelf, T>.AsTensorSpan()
22 references to AsTensorSpan
System.Numerics.Tensors (22)
System\Numerics\Tensors\netcore\Tensor.cs (17)
205public ref T this[params scoped ReadOnlySpan<nint> indexes] => ref AsTensorSpan()[indexes]; 215public ref T this[params scoped ReadOnlySpan<NIndex> indexes] => ref AsTensorSpan()[indexes]; 241srcSpan = AsTensorSpan().Slice(Lengths); 244srcSpan = AsTensorSpan().Slice(ranges); 249value.AsTensorSpan().CopyTo(srcSpan); 397public TensorSpan<T> AsTensorSpan(params scoped ReadOnlySpan<NRange> start) => AsTensorSpan().Slice(start); 411public TensorSpan<T> AsTensorSpan(params scoped ReadOnlySpan<NIndex> startIndex) => AsTensorSpan().Slice(startIndex); 424public ReadOnlyTensorSpan<T> AsReadOnlyTensorSpan(params scoped ReadOnlySpan<NRange> start) => AsTensorSpan().Slice(start); 438public ReadOnlyTensorSpan<T> AsReadOnlyTensorSpan(params scoped ReadOnlySpan<NIndex> startIndex) => AsTensorSpan().Slice(startIndex); 445public ref T GetPinnableReference() => ref AsTensorSpan().GetPinnableReference(); 508public unsafe void Clear() => AsTensorSpan().Clear(); 520public void CopyTo(TensorSpan<T> destination) => AsTensorSpan().CopyTo(destination); 526public void Fill(T value) => AsTensorSpan().Fill(value); 536public bool TryCopyTo(TensorSpan<T> destination) => AsTensorSpan().TryCopyTo(destination); 542public void FlattenTo(Span<T> destination) => AsTensorSpan().FlattenTo(destination); 548public bool TryFlattenTo(Span<T> destination) => AsTensorSpan().TryFlattenTo(destination); 679sb.Append(AsTensorSpan().ToString(maximumLengths));
System\Numerics\Tensors\netcore\TensorExtensions.cs (5)
2680ospan = outTensor.AsTensorSpan(); 2681ispan = tensor.AsTensorSpan(); 2945ReadOnlySpan<T> span = MemoryMarshal.CreateSpan(ref tensor.AsTensorSpan()._reference, (int)tensor._values.Length); 2946Span<T> ospan = MemoryMarshal.CreateSpan(ref output.AsTensorSpan()._reference, (int)output.FlattenedLength); 3241TensorSpan<T> oslice = outputs[i].AsTensorSpan().Slice(outputs[i]._lengths);