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