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