22 references to Strides
System.Numerics.Tensors (22)
System\Numerics\Tensors\netcore\ReadOnlyTensorSpan.cs (2)
551TensorSpanHelpers.Memmove(ref Unsafe.Add(ref destinationSlice._reference, TensorSpanHelpers.ComputeLinearIndex(curIndexes, destinationSlice.Strides, destinationSlice.Lengths)), ref Unsafe.Add(ref srcSlice._reference, TensorSpanHelpers.ComputeLinearIndex(curIndexes, srcSlice.Strides, srcSlice.Lengths)), copyLength); 607TensorSpanHelpers.Memmove(ref Unsafe.Add(ref destinationSlice._reference, TensorSpanHelpers.ComputeLinearIndex(curIndexes, destinationSlice.Strides, destinationSlice.Lengths)), ref Unsafe.Add(ref srcSlice._reference, TensorSpanHelpers.ComputeLinearIndex(curIndexes, srcSlice.Strides, srcSlice.Lengths)), copyLength);
System\Numerics\Tensors\netcore\TensorExtensions.cs (13)
150return new TensorSpan<T>(ref input._reference, shape, input.Strides, input._shape._memoryLength); 2798if (!TensorHelpers.IsContiguousAndDense<T>(tensor) && !tensor.Strides.Contains(0)) 2828if (tensor.Strides.Contains(0)) 2830List<nint> origStrides = new List<nint>(tensor.Strides.ToArray()); 2841origStrides.Add(tensor.Strides[lengthOffset - 1]); 2843origStrides.Insert(i, tensor.Strides[i] * tensor.Lengths[i]); 3690List<nint> tempStrides = tensor.Strides.ToArray().ToList(); 3692tempStrides.Add(tensor.Strides[dimension - 1]); 3694tempStrides.Insert(dimension, tensor.Strides[dimension] * tensor.Lengths[dimension]); 7067ospan = MemoryMarshal.CreateSpan(ref Unsafe.Add(ref slicedDestination._reference, TensorSpanHelpers.ComputeLinearIndex(curIndex, slicedDestination.Strides, slicedDestination.Lengths)), (int)rowLength); 7080ospan = MemoryMarshal.CreateSpan(ref Unsafe.Add(ref slicedDestination._reference, TensorSpanHelpers.ComputeLinearIndex(curIndex, slicedDestination.Strides, slicedDestination.Lengths)), (int)rowLength); 7093ospan = MemoryMarshal.CreateSpan(ref Unsafe.Add(ref slicedDestination._reference, TensorSpanHelpers.ComputeLinearIndex(curIndex, slicedDestination.Strides, slicedDestination.Lengths)), (int)rowLength); 7107ospan = MemoryMarshal.CreateSpan(ref Unsafe.Add(ref slicedDestination._reference, TensorSpanHelpers.ComputeLinearIndex(curIndex, slicedDestination.Strides, slicedDestination.Lengths)), (int)rowLength);
System\Numerics\Tensors\netcore\TensorSpan.cs (7)
318nint index = TensorSpanHelpers.ComputeLinearIndex(indexes, Strides, Lengths); 343nint index = TensorSpanHelpers.ComputeLinearIndex(indexes, Strides, Lengths); 525TensorSpanHelpers.Clear(ref Unsafe.Add(ref _reference, TensorSpanHelpers.ComputeLinearIndex(curIndexes, Strides, Lengths)), (nuint)Lengths[Rank - 1]); 582TensorSpanHelpers.Memmove(ref Unsafe.Add(ref destinationSlice._reference, TensorSpanHelpers.ComputeLinearIndex(curIndexes, destinationSlice.Strides, destinationSlice.Lengths)), ref Unsafe.Add(ref srcSlice._reference, TensorSpanHelpers.ComputeLinearIndex(curIndexes, srcSlice.Strides, srcSlice.Lengths)), copyLength); 636TensorSpanHelpers.Memmove(ref Unsafe.Add(ref destinationSlice._reference, TensorSpanHelpers.ComputeLinearIndex(curIndexes, destinationSlice.Strides, destinationSlice.Lengths)), ref Unsafe.Add(ref srcSlice._reference, TensorSpanHelpers.ComputeLinearIndex(curIndexes, srcSlice.Strides, srcSlice.Lengths)), copyLength); 748index += Strides[i] * (offsets[i]); 809TensorSpanHelpers.Memmove(destination.Slice(checked((int)copiedValues)), ref Unsafe.Add(ref _reference, TensorSpanHelpers.ComputeLinearIndex(curIndexes, Strides, Lengths)), Lengths[Rank - 1]);