System\Numerics\Tensors\netcore\TensorExtensions.cs (9)
2736if (!TensorHelpers.IsContiguousAndDense<T>(tensor) && !tensor.Strides.Contains(0))
2766if (tensor.Strides.Contains(0))
2768List<nint> origStrides = new List<nint>(tensor.Strides.ToArray());
2777origStrides.Add(tensor.Strides[lengthOffset - 1]);
2779origStrides.Insert(i, tensor.Strides[i] * tensor.Lengths[i]);
3246TensorSpanHelpers.Memmove(ref Unsafe.Add(ref oslice._reference, TensorSpanHelpers.ComputeLinearIndex(oIndices, outputs[0].Strides, outputs[0].Lengths)), ref Unsafe.Add(ref islice._reference, TensorSpanHelpers.ComputeLinearIndex(iIndices, islice.Strides, islice.Lengths)), copyLength);
3672List<nint> tempStrides = tensor.Strides.ToArray().ToList();
3674tempStrides.Add(tensor.Strides[dimension - 1]);
3676tempStrides.Insert(dimension, tensor.Strides[dimension] * tensor.Lengths[dimension]);