60 references to Lengths
System.Numerics.Tensors (60)
System\Numerics\Tensors\netcore\ReadOnlyTensorSpan_1.cs (1)
291public ReadOnlySpan<nint> Lengths => _shape.Lengths;
System\Numerics\Tensors\netcore\Tensor_1.cs (1)
118public ReadOnlySpan<nint> Lengths => _shape.Lengths;
System\Numerics\Tensors\netcore\Tensor.cs (16)
149tensor = CreateConcatenationResult<T>(shape.Lengths, dimension, sumOfAxis); 207ValidateConcatenationDestination(dimension, shape.Lengths, sumOfAxis, destination); 231ReadOnlySpan<nint> destinationLengths = TensorShape.Normalize(destination._shape).Lengths; 344ReadOnlySpan<nint> lengths = shape.Lengths; 349ReadOnlySpan<nint> sourceLengths = TensorShape.Normalize(tensors[i]._shape).Lengths; 1747GetReshapeStrides(shape.Lengths, shape.Strides, shape.IsDense, newLengths, strides); 1779GetReshapeStrides(shape.Lengths, shape.Strides, shape.IsDense, newLengths, strides); 2409ReadOnlySpan<nint> lengths = shape.Lengths; 2712shape.Lengths[..dimension].CopyTo(lengths); 2714shape.Lengths[dimension..].CopyTo(lengths[(dimension + 1)..]); 2745shape.Lengths[..dimension].CopyTo(lengths); 2747shape.Lengths[dimension..].CopyTo(lengths[(dimension + 1)..]); 2764ReadOnlySpan<nint> lengths = shape.Lengths; 2767if (!TensorShape.AreLengthsEquivalent(lengths, TensorShape.Normalize(tensors[i]._shape).Lengths)) 3102ReadOnlySpan<nint> lengths = shape.Lengths; 3147ReadOnlySpan<nint> lengths = shape.Lengths;
System\Numerics\Tensors\netcore\TensorOperation.cs (12)
420TensorShape shape = TensorShape.Create(in source._reference, source._shape.LinearLength, destination.Lengths, strides, source.IsPinned); 433ReadOnlySpan<nint> lengths = destination.Lengths; 435Debug.Assert(source.Lengths.SequenceEqual(lengths)); 436Debug.Assert(!hasOther || other.Lengths.SequenceEqual(lengths)); 696ReadOnlyTensorSpan<TArg> optimizedX = x.Lengths.SequenceEqual(destinationShape.Lengths) ? x : BroadcastSource(x, destinationShape); 697ReadOnlyTensorSpan<TArg> optimizedY = y.Lengths.SequenceEqual(destinationShape.Lengths) ? y : BroadcastSource(y, destinationShape); 759ReadOnlySpan<nint> xLengths = x.Lengths; 760ReadOnlySpan<nint> yLengths = y.Lengths; 1241ReadOnlyTensorSpan<TArg> optimizedX = x.Lengths.SequenceEqual(destinationShape.Lengths) ? x : BroadcastSource(x, destinationShape); 1242ReadOnlyTensorSpan<TArg> optimizedY = y.Lengths.SequenceEqual(destinationShape.Lengths) ? y : BroadcastSource(y, destinationShape); 1497ReadOnlySpan<nint> xLengths = xShape.Lengths; 1498ReadOnlySpan<nint> yLengths = yShape.Lengths;
System\Numerics\Tensors\netcore\TensorShape.cs (29)
375ReadOnlySpan<nint> lengths = Lengths; 470ReadOnlySpan<nint> leftLengths = left.Lengths; 473ReadOnlySpan<nint> rightLengths = right.Lengths; 499ReadOnlySpan<nint> lengths = Lengths; 502ReadOnlySpan<nint> destinationLengths = destinationShape.Lengths; 507int destinationRankIndex = destinationShape.Lengths.Length - (i + 1); 564ReadOnlySpan<nint> lengths = Lengths; 567ReadOnlySpan<nint> destinationLengths = destinationShape.Lengths; 572int destinationRankIndex = destinationShape.Lengths.Length - (i + 1); 660if (shape2.Lengths[..sourceOffset].ContainsAnyExcept((nint)1)) 680ReadOnlySpan<nint> lengths1 = shape1.Lengths[rankDelta..]; 681ReadOnlySpan<nint> lengths2 = shape2.Lengths[sourceOffset..]; 735ReadOnlySpan<nint> lengths1 = shape1Lengths.IsEmpty ? s_empty.Lengths : shape1Lengths; 744if (shape2.Lengths[..sourceOffset].ContainsAnyExcept((nint)1)) 755ReadOnlySpan<nint> lengths2 = shape2.Lengths[sourceOffset..]; 796lengths1 = lengths1.IsEmpty ? s_empty.Lengths : lengths1; 797lengths2 = lengths2.IsEmpty ? s_empty.Lengths : lengths2; 855Debug.Assert(!shape.Lengths[..offset].ContainsAnyExcept((nint)1)); 856return offset == 0 ? shape : CreateForView(shape.LinearLength, shape.Lengths[offset..], shape.Strides[offset..], shape.IsPinned); 863shape.Lengths.CopyTo(lengths[-offset..]); 881ReadOnlySpan<nint> lengths1 = shape1.Lengths; 882ReadOnlySpan<nint> lengths2 = shape2.Lengths; 895return AreLengthsTheSame(shape1.Lengths, shape2.Lengths); 1210Debug.Assert(HasAnyDenseDimensions == CalculateHasAnyDenseDimensions(Lengths, Strides)); 1218ReadOnlySpan<nint> lengths = Lengths; 1244ReadOnlySpan<nint> lengths = Lengths; 1285ReadOnlySpan<nint> lengths = Lengths; 1388ReadOnlySpan<nint> previousLengths = Lengths;
System\Numerics\Tensors\netcore\TensorSpan_1.cs (1)
186public ReadOnlySpan<nint> Lengths => _shape.Lengths;