35 references to Rank
System.Numerics.Tensors (35)
System\Numerics\Tensors\netcore\TensorExtensions.cs (5)
2840
if (lengthOffset < tensor.
Rank
&& arrLengths[i] == tensor.Lengths[lengthOffset])
2846
if (lengthOffset == tensor.
Rank
)
3337
if (dimension >= tensor.
Rank
)
3691
dimension = tensor.
Rank
- dimension;
3697
if (dimension == tensor.
Rank
)
System\Numerics\Tensors\netcore\TensorSpan.cs (30)
315
if (indexes.Length !=
Rank
)
340
if (indexes.Length !=
Rank
)
412
left.
Rank
== right.
Rank
&&
464
_curIndexes = new nint[_span.
Rank
];
466
_curIndexes[_span.
Rank
- 1] = -1;
473
TensorSpanHelpers.AdjustIndexes(_span.
Rank
- 1, 1, _curIndexes, _span.Lengths);
510
if (
Rank
> TensorShape.MaxInlineRank)
512
curIndexesArray = ArrayPool<nint>.Shared.Rent(
Rank
);
513
curIndexes = curIndexesArray.AsSpan(0,
Rank
);
518
curIndexes = stackalloc nint[
Rank
];
525
TensorSpanHelpers.Clear(ref Unsafe.Add(ref _reference, TensorSpanHelpers.ComputeLinearIndex(curIndexes, Strides, Lengths)), (nuint)Lengths[
Rank
- 1]);
526
TensorSpanHelpers.AdjustIndexes(
Rank
- 2, 1, curIndexes, _shape.Lengths);
527
clearedValues += Lengths[
Rank
- 1];
560
if (
Rank
> TensorShape.MaxInlineRank)
614
if (
Rank
> TensorShape.MaxInlineRank)
715
if (
Rank
> TensorShape.MaxInlineRank)
717
lengthsArray = ArrayPool<nint>.Shared.Rent(
Rank
);
718
lengths = lengthsArray.AsSpan(0,
Rank
);
720
offsetsArray = ArrayPool<nint>.Shared.Rent(
Rank
);
721
offsets = offsetsArray.AsSpan(0,
Rank
);
725
lengths = stackalloc nint[
Rank
];
726
offsets = stackalloc nint[
Rank
];
794
if (
Rank
> TensorShape.MaxInlineRank)
796
curIndexesArray = ArrayPool<nint>.Shared.Rent(
Rank
);
797
curIndexes = curIndexesArray.AsSpan(0,
Rank
);
802
curIndexes = stackalloc nint[
Rank
];
809
TensorSpanHelpers.Memmove(destination.Slice(checked((int)copiedValues)), ref Unsafe.Add(ref _reference, TensorSpanHelpers.ComputeLinearIndex(curIndexes, Strides, Lengths)), Lengths[
Rank
- 1]);
810
TensorSpanHelpers.AdjustIndexes(
Rank
- 2, 1, curIndexes, _shape.Lengths);
811
copiedValues += Lengths[
Rank
- 1];