35 references to Rank
System.Numerics.Tensors (35)
System\Numerics\Tensors\netcore\TensorExtensions.cs (5)
2839
if (lengthOffset < tensor.
Rank
&& arrLengths[i] == tensor.Lengths[lengthOffset])
2845
if (lengthOffset == tensor.
Rank
)
3336
if (dimension >= tensor.
Rank
)
3721
dimension = tensor.
Rank
- dimension;
3733
if (dimension == tensor.
Rank
)
System\Numerics\Tensors\netcore\TensorSpan.cs (30)
330
if (indexes.Length !=
Rank
)
355
if (indexes.Length !=
Rank
)
427
left.
Rank
== right.
Rank
&&
479
_curIndexes = new nint[_span.
Rank
];
481
_curIndexes[_span.
Rank
- 1] = -1;
488
TensorSpanHelpers.AdjustIndexes(_span.
Rank
- 1, 1, _curIndexes, _span.Lengths);
525
if (
Rank
> TensorShape.MaxInlineRank)
527
curIndexesArray = ArrayPool<nint>.Shared.Rent(
Rank
);
528
curIndexes = curIndexesArray.AsSpan(0,
Rank
);
533
curIndexes = stackalloc nint[
Rank
];
540
TensorSpanHelpers.Clear(ref Unsafe.Add(ref _reference, TensorSpanHelpers.ComputeLinearIndex(curIndexes, Strides, Lengths)), (nuint)Lengths[
Rank
- 1]);
541
TensorSpanHelpers.AdjustIndexes(
Rank
- 2, 1, curIndexes, _shape.Lengths);
542
clearedValues += Lengths[
Rank
- 1];
575
if (
Rank
> TensorShape.MaxInlineRank)
629
if (
Rank
> TensorShape.MaxInlineRank)
730
if (
Rank
> TensorShape.MaxInlineRank)
732
lengthsArray = ArrayPool<nint>.Shared.Rent(
Rank
);
733
lengths = lengthsArray.AsSpan(0,
Rank
);
735
offsetsArray = ArrayPool<nint>.Shared.Rent(
Rank
);
736
offsets = offsetsArray.AsSpan(0,
Rank
);
740
lengths = stackalloc nint[
Rank
];
741
offsets = stackalloc nint[
Rank
];
809
if (
Rank
> TensorShape.MaxInlineRank)
811
curIndexesArray = ArrayPool<nint>.Shared.Rent(
Rank
);
812
curIndexes = curIndexesArray.AsSpan(0,
Rank
);
817
curIndexes = stackalloc nint[
Rank
];
824
TensorSpanHelpers.Memmove(destination.Slice(checked((int)copiedValues)), ref Unsafe.Add(ref _reference, TensorSpanHelpers.ComputeLinearIndex(curIndexes, Strides, Lengths)), Lengths[
Rank
- 1]);
825
TensorSpanHelpers.AdjustIndexes(
Rank
- 2, 1, curIndexes, _shape.Lengths);
826
copiedValues += Lengths[
Rank
- 1];