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