198 references to TensorSpanHelpers
System.Numerics.Tensors (198)
System\Numerics\Tensors\netcore\ReadOnlyTensorSpan.cs (41)
77
nint linearLength =
TensorSpanHelpers
.CalculateTotalLength(lengths);
89
strides = strides.IsEmpty ? (ReadOnlySpan<nint>)
TensorSpanHelpers
.CalculateStrides(lengths, linearLength) : strides;
90
TensorSpanHelpers
.ValidateStrides(strides, lengths);
91
nint maxElements =
TensorSpanHelpers
.ComputeMaxLinearIndex(strides, lengths);
127
nint linearLength =
TensorSpanHelpers
.CalculateTotalLength(lengths);
129
strides = strides.IsEmpty ? (ReadOnlySpan<nint>)
TensorSpanHelpers
.CalculateStrides(lengths, linearLength) : strides;
130
TensorSpanHelpers
.ValidateStrides(strides, lengths);
131
nint maxElements =
TensorSpanHelpers
.ComputeMaxLinearIndex(strides, lengths);
158
nint linearLength =
TensorSpanHelpers
.CalculateTotalLength(lengths);
169
strides = strides.IsEmpty ? (ReadOnlySpan<nint>)
TensorSpanHelpers
.CalculateStrides(lengths, linearLength) : strides;
170
TensorSpanHelpers
.ValidateStrides(strides, lengths);
172
nint startOffset =
TensorSpanHelpers
.ComputeStartOffsetSystemArray(array, start);
173
nint maxElements =
TensorSpanHelpers
.ComputeMaxLinearIndex(strides, lengths);
202
nint linearLength =
TensorSpanHelpers
.CalculateTotalLength(lengths);
213
strides = strides.IsEmpty ? (ReadOnlySpan<nint>)
TensorSpanHelpers
.CalculateStrides(lengths, linearLength) : strides;
214
TensorSpanHelpers
.ValidateStrides(strides, lengths);
216
nint startOffset =
TensorSpanHelpers
.ComputeStartOffsetSystemArray(array, startIndex);
217
nint maxElements =
TensorSpanHelpers
.ComputeMaxLinearIndex(strides, lengths);
276
nint linearLength =
TensorSpanHelpers
.CalculateTotalLength(lengths);
278
strides = strides.IsEmpty ? (ReadOnlySpan<nint>)
TensorSpanHelpers
.CalculateStrides(lengths, linearLength) : strides;
279
TensorSpanHelpers
.ValidateStrides(strides, lengths);
280
nint maxElements =
TensorSpanHelpers
.ComputeMaxLinearIndex(strides, lengths);
292
nint linearLength =
TensorSpanHelpers
.CalculateTotalLength(lengths);
314
nint index =
TensorSpanHelpers
.ComputeLinearIndex(indexes, Strides, Lengths);
337
nint index =
TensorSpanHelpers
.ComputeLinearIndex(indexes, Strides, Lengths);
477
TensorSpanHelpers
.AdjustIndexes(_span.Rank - 1, 1, _curIndexes, _span.Lengths);
551
TensorSpanHelpers
.Memmove(ref Unsafe.Add(ref destinationSlice._reference,
TensorSpanHelpers
.ComputeLinearIndex(curIndexes, destinationSlice.Strides, destinationSlice.Lengths)), ref Unsafe.Add(ref srcSlice._reference,
TensorSpanHelpers
.ComputeLinearIndex(curIndexes, srcSlice.Strides, srcSlice.Lengths)), copyLength);
552
TensorSpanHelpers
.AdjustIndexes(indexToAdjust, 1, curIndexes, tempLengths);
607
TensorSpanHelpers
.Memmove(ref Unsafe.Add(ref destinationSlice._reference,
TensorSpanHelpers
.ComputeLinearIndex(curIndexes, destinationSlice.Strides, destinationSlice.Lengths)), ref Unsafe.Add(ref srcSlice._reference,
TensorSpanHelpers
.ComputeLinearIndex(curIndexes, srcSlice.Strides, srcSlice.Lengths)), copyLength);
608
TensorSpanHelpers
.AdjustIndexes(indexToAdjust, 1, curIndexes, tempLengths);
754
TensorSpanHelpers
.Memmove(destination.Slice(checked((int)copiedValues)), ref Unsafe.Add(ref _reference,
TensorSpanHelpers
.ComputeLinearIndex(curIndexes, Strides, Lengths)), Lengths[Rank - 1]);
755
TensorSpanHelpers
.AdjustIndexes(Rank - 2, 1, curIndexes, _shape.Lengths);
797
destination.Slice(checked((int)copiedValues), (int)Lengths[Rank - 1]).Fill(Unsafe.Add(ref _reference,
TensorSpanHelpers
.ComputeLinearIndex(curIndexes, Strides, Lengths)));
801
TensorSpanHelpers
.Memmove(destination.Slice(checked((int)copiedValues)), ref Unsafe.Add(ref _reference,
TensorSpanHelpers
.ComputeLinearIndex(curIndexes, Strides, Lengths)), Lengths[Rank - 1]);
803
TensorSpanHelpers
.AdjustIndexes(Rank - 2, 1, curIndexes, _shape.Lengths);
System\Numerics\Tensors\netcore\Tensor.cs (9)
69
_flattenedLength =
TensorSpanHelpers
.CalculateTotalLength(_lengths);
70
_strides = strides.IsEmpty ?
TensorSpanHelpers
.CalculateStrides(_lengths, _flattenedLength) : strides.ToArray();
71
TensorSpanHelpers
.ValidateStrides(_strides, _lengths);
72
nint maxElements =
TensorSpanHelpers
.ComputeMaxLinearIndex(_strides, _lengths);
97
nint linearLength =
TensorSpanHelpers
.CalculateTotalLength(lengths);
110
nint linearLength =
TensorSpanHelpers
.CalculateTotalLength(lengths);
122
nint linearLength =
TensorSpanHelpers
.CalculateTotalLength(lengths);
135
nint linearLength =
TensorSpanHelpers
.CalculateTotalLength(lengths);
594
TensorSpanHelpers
.AdjustIndexes(_tensor.Rank - 1, 1, ref _curIndices, _tensor.Lengths);
System\Numerics\Tensors\netcore\Tensor.Factory.cs (5)
27
nint linearLength =
TensorSpanHelpers
.CalculateTotalLength(lengths);
40
nint linearLength =
TensorSpanHelpers
.CalculateTotalLength(lengths);
115
nint linearLength =
TensorSpanHelpers
.CalculateTotalLength(lengths);
152
nint linearLength =
TensorSpanHelpers
.CalculateTotalLength(lengths);
176
nint linearLength =
TensorSpanHelpers
.CalculateTotalLength(lengths);
System\Numerics\Tensors\netcore\TensorExtensions.cs (102)
155
nint newSize =
TensorSpanHelpers
.CalculateTotalLength(shape);
198
nint newSize =
TensorSpanHelpers
.CalculateTotalLength(shape);
241
nint newSize =
TensorSpanHelpers
.CalculateTotalLength(lengths);
294
totalLength +=
TensorSpanHelpers
.CalculateTotalLength(tensors[i].Lengths);
362
totalLength +=
TensorSpanHelpers
.CalculateTotalLength(tensors[i].Lengths);
417
srcIndex =
TensorSpanHelpers
.ComputeLinearIndex(curIndex, tensors[i].Strides, tensors[i].Lengths);
420
TensorSpanHelpers
.Memmove(dstSpan, srcSpan, copyLength, valuesCopied);
423
TensorSpanHelpers
.AdjustIndexes(dimension - 1, 1, curIndex, tensors[0].Lengths);
519
TensorSpanHelpers
.AdjustIndexes(right.Rank - 1, 1, curIndex, right.Lengths);
575
TensorSpanHelpers
.AdjustIndexes(x.Rank - 1, 1, curIndex, x.Lengths);
621
TensorSpanHelpers
.AdjustIndexes(broadcastedRight.Rank - 1, 1, curIndex, broadcastedRight.Lengths);
660
TensorSpanHelpers
.AdjustIndexes(x.Rank - 1, 1, curIndex, x.Lengths);
705
TensorSpanHelpers
.AdjustIndexes(broadcastedRight.Rank - 1, 1, curIndex, broadcastedRight.Lengths);
744
TensorSpanHelpers
.AdjustIndexes(x.Rank - 1, 1, curIndex, x.Lengths);
890
TensorSpanHelpers
.AdjustIndexes(right.Rank - 1, 1, curIndex, right.Lengths);
950
TensorSpanHelpers
.AdjustIndexes(x.Rank - 1, 1, curIndex, x.Lengths);
1010
TensorSpanHelpers
.AdjustIndexes(y.Rank - 1, 1, curIndex, y.Lengths);
1099
TensorSpanHelpers
.AdjustIndexes(right.Rank - 1, 1, curIndex, right.Lengths);
1159
TensorSpanHelpers
.AdjustIndexes(x.Rank - 1, 1, curIndex, x.Lengths);
1219
TensorSpanHelpers
.AdjustIndexes(y.Rank - 1, 1, curIndex, y.Lengths);
1264
TensorSpanHelpers
.AdjustIndexes(broadcastedRight.Rank - 1, 1, curIndex, broadcastedRight.Lengths);
1303
TensorSpanHelpers
.AdjustIndexes(x.Rank - 1, 1, curIndex, x.Lengths);
1342
TensorSpanHelpers
.AdjustIndexes(y.Rank - 1, 1, curIndex, y.Lengths);
1387
TensorSpanHelpers
.AdjustIndexes(broadcastedRight.Rank - 1, 1, curIndex, broadcastedRight.Lengths);
1426
TensorSpanHelpers
.AdjustIndexes(x.Rank - 1, 1, curIndex, x.Lengths);
1465
TensorSpanHelpers
.AdjustIndexes(y.Rank - 1, 1, curIndex, y.Lengths);
1511
TensorSpanHelpers
.AdjustIndexes(broadcastedRight.Rank - 1, 1, curIndex, broadcastedRight.Lengths);
1550
TensorSpanHelpers
.AdjustIndexes(x.Rank - 1, 1, curIndex, x.Lengths);
1589
TensorSpanHelpers
.AdjustIndexes(y.Rank - 1, 1, curIndex, y.Lengths);
1635
TensorSpanHelpers
.AdjustIndexes(broadcastedRight.Rank - 1, 1, curIndex, broadcastedRight.Lengths);
1674
TensorSpanHelpers
.AdjustIndexes(x.Rank - 1, 1, curIndex, x.Lengths);
1713
TensorSpanHelpers
.AdjustIndexes(y.Rank - 1, 1, curIndex, y.Lengths);
1802
TensorSpanHelpers
.AdjustIndexes(right.Rank - 1, 1, curIndex, right.Lengths);
1862
TensorSpanHelpers
.AdjustIndexes(x.Rank - 1, 1, curIndex, x.Lengths);
1922
TensorSpanHelpers
.AdjustIndexes(y.Rank - 1, 1, curIndex, y.Lengths);
2011
TensorSpanHelpers
.AdjustIndexes(right.Rank - 1, 1, curIndex, right.Lengths);
2071
TensorSpanHelpers
.AdjustIndexes(x.Rank - 1, 1, curIndex, x.Lengths);
2131
TensorSpanHelpers
.AdjustIndexes(y.Rank - 1, 1, curIndex, y.Lengths);
2177
TensorSpanHelpers
.AdjustIndexes(broadcastedRight.Rank - 1, 1, curIndex, broadcastedRight.Lengths);
2216
TensorSpanHelpers
.AdjustIndexes(x.Rank - 1, 1, curIndex, x.Lengths);
2255
TensorSpanHelpers
.AdjustIndexes(y.Rank - 1, 1, curIndex, y.Lengths);
2301
TensorSpanHelpers
.AdjustIndexes(broadcastedRight.Rank - 1, 1, curIndex, broadcastedRight.Lengths);
2340
TensorSpanHelpers
.AdjustIndexes(x.Rank - 1, 1, curIndex, x.Lengths);
2379
TensorSpanHelpers
.AdjustIndexes(y.Rank - 1, 1, curIndex, y.Lengths);
2424
TensorSpanHelpers
.AdjustIndexes(broadcastedRight.Rank - 1, 1, curIndex, broadcastedRight.Lengths);
2463
TensorSpanHelpers
.AdjustIndexes(x.Rank - 1, 1, curIndex, x.Lengths);
2502
TensorSpanHelpers
.AdjustIndexes(y.Rank - 1, 1, curIndex, y.Lengths);
2547
TensorSpanHelpers
.AdjustIndexes(broadcastedRight.Rank - 1, 1, curIndex, broadcastedRight.Lengths);
2586
TensorSpanHelpers
.AdjustIndexes(x.Rank - 1, 1, curIndex, x.Lengths);
2625
TensorSpanHelpers
.AdjustIndexes(y.Rank - 1, 1, curIndex, y.Lengths);
2709
TensorSpanHelpers
.AdjustIndexes(outTensor.Rank - 1, 1, indexes, tensor._lengths);
2759
nint tempLinear =
TensorSpanHelpers
.CalculateTotalLength(arrLengths);
2787
strides =
TensorSpanHelpers
.CalculateStrides(arrLengths);
2827
nint tempLinear =
TensorSpanHelpers
.CalculateTotalLength(arrLengths);
2857
strides =
TensorSpanHelpers
.CalculateStrides(arrLengths);
2898
nint tempLinear =
TensorSpanHelpers
.CalculateTotalLength(arrLengths);
2926
strides =
TensorSpanHelpers
.CalculateStrides(arrLengths);
2942
nint newSize =
TensorSpanHelpers
.CalculateTotalLength(lengths);
2948
TensorSpanHelpers
.Memmove(ospan, span, tensor._values.Length);
2950
TensorSpanHelpers
.Memmove(ospan, span, newSize);
2966
TensorSpanHelpers
.Memmove(ospan, span, tensor._values.Length);
2968
TensorSpanHelpers
.Memmove(ospan, span, destination._shape._memoryLength);
2982
TensorSpanHelpers
.Memmove(ospan, span, tensor._shape._memoryLength);
2984
TensorSpanHelpers
.Memmove(ospan, span, destination._shape._memoryLength);
2998
TensorSpanHelpers
.Memmove(ospan, span, tensor._shape._memoryLength);
3000
TensorSpanHelpers
.Memmove(ospan, span, destination._shape._memoryLength);
3098
TensorSpanHelpers
.Memmove(ref Unsafe.Add(ref destination._reference,
TensorSpanHelpers
.ComputeLinearIndex(oIndices, tensor.Strides, tensor.Lengths)), ref Unsafe.Add(ref islice._reference,
TensorSpanHelpers
.ComputeLinearIndex(iIndices, islice.Strides, islice.Lengths)), copyLength);
3099
TensorSpanHelpers
.AdjustIndexes((int)dimension, 1, oIndices, tensor.Lengths);
3100
TensorSpanHelpers
.AdjustIndexesDown((int)dimension, 1, iIndices, tensor.Lengths);
3246
TensorSpanHelpers
.Memmove(ref Unsafe.Add(ref oslice._reference,
TensorSpanHelpers
.ComputeLinearIndex(oIndices, outputs[0].Strides, outputs[0].Lengths)), ref Unsafe.Add(ref islice._reference,
TensorSpanHelpers
.ComputeLinearIndex(iIndices, islice.Strides, islice.Lengths)), copyLength);
3247
TensorSpanHelpers
.AdjustIndexes((int)dimension, 1, oIndices, outputs[i]._lengths);
3248
TensorSpanHelpers
.AdjustIndexes((int)dimension - 1, 1, iIndices, tensor.Lengths);
3298
strides =
TensorSpanHelpers
.CalculateStrides(lengths);
3314
strides =
TensorSpanHelpers
.CalculateStrides(lengths);
3354
strides =
TensorSpanHelpers
.CalculateStrides(lengths);
3370
strides =
TensorSpanHelpers
.CalculateStrides(lengths);
3410
strides =
TensorSpanHelpers
.CalculateStrides(lengths);
3426
strides =
TensorSpanHelpers
.CalculateStrides(lengths);
3570
var sp = new ReadOnlyTensorSpan<T>(ref Unsafe.Add(ref tensor._reference,
TensorSpanHelpers
.ComputeLinearIndex(curIndexes, tensor.Strides, tensor.Lengths)), [tensor.Lengths[tensor.Rank - 1]], [1], tensor.Lengths[tensor.Rank - 1]);
3576
TensorSpanHelpers
.AdjustIndexes(tensor.Rank - 2, 1, curIndexes, tensor.Lengths);
4663
lspan = MemoryMarshal.CreateReadOnlySpan(ref Unsafe.Add(ref x._reference,
TensorSpanHelpers
.ComputeLinearIndex(leftIndexes, x.Strides, x.Lengths)), (int)rowLength);
4664
rspan = MemoryMarshal.CreateReadOnlySpan(ref Unsafe.Add(ref y._reference,
TensorSpanHelpers
.ComputeLinearIndex(rightIndexes, y.Strides, y.Lengths)), (int)rowLength);
6850
nint newLength =
TensorSpanHelpers
.CalculateTotalLength(newLengths);
6906
TensorSpanHelpers
.AdjustIndexes(input.Rank - 2, 1, curIndex, input.Lengths);
6958
TensorSpanHelpers
.AdjustIndexes(input.Rank - 2, 1, curIndex, input.Lengths);
7010
TensorSpanHelpers
.AdjustIndexes(input.Rank - 2, 1, curIndex, input.Lengths);
7073
ospan = MemoryMarshal.CreateSpan(ref Unsafe.Add(ref slicedDestination._reference,
TensorSpanHelpers
.ComputeLinearIndex(curIndex, slicedDestination.Strides, slicedDestination.Lengths)), (int)rowLength);
7078
TensorSpanHelpers
.AdjustIndexes(broadcastedLeft.Rank - 2, 1, curIndex, broadcastedLeft.Lengths);
7086
ospan = MemoryMarshal.CreateSpan(ref Unsafe.Add(ref slicedDestination._reference,
TensorSpanHelpers
.ComputeLinearIndex(curIndex, slicedDestination.Strides, slicedDestination.Lengths)), (int)rowLength);
7088
ispan = MemoryMarshal.CreateSpan(ref Unsafe.Add(ref broadcastedRight._reference,
TensorSpanHelpers
.ComputeLinearIndex(curIndex, broadcastedRight.Strides, broadcastedRight.Lengths)), (int)rowLength);
7091
TensorSpanHelpers
.AdjustIndexes(broadcastedLeft.Rank - 2, 1, curIndex, broadcastedLeft.Lengths);
7099
ospan = MemoryMarshal.CreateSpan(ref Unsafe.Add(ref slicedDestination._reference,
TensorSpanHelpers
.ComputeLinearIndex(curIndex, slicedDestination.Strides, slicedDestination.Lengths)), (int)rowLength);
7101
ispan = MemoryMarshal.CreateSpan(ref Unsafe.Add(ref broadcastedLeft._reference,
TensorSpanHelpers
.ComputeLinearIndex(curIndex, broadcastedLeft.Strides, broadcastedLeft.Lengths)), (int)rowLength);
7104
TensorSpanHelpers
.AdjustIndexes(broadcastedLeft.Rank - 2, 1, curIndex, broadcastedLeft.Lengths);
7113
ospan = MemoryMarshal.CreateSpan(ref Unsafe.Add(ref slicedDestination._reference,
TensorSpanHelpers
.ComputeLinearIndex(curIndex, slicedDestination.Strides, slicedDestination.Lengths)), (int)rowLength);
7114
ispan = MemoryMarshal.CreateSpan(ref Unsafe.Add(ref broadcastedLeft._reference,
TensorSpanHelpers
.ComputeLinearIndex(curIndex, broadcastedLeft.Strides, broadcastedLeft.Lengths)), (int)rowLength);
7115
rspan = MemoryMarshal.CreateSpan(ref Unsafe.Add(ref broadcastedRight._reference,
TensorSpanHelpers
.ComputeLinearIndex(curIndex, broadcastedRight.Strides, broadcastedRight.Lengths)), (int)rowLength);
7118
TensorSpanHelpers
.AdjustIndexes(broadcastedLeft.Rank - 2, 1, curIndex, broadcastedLeft.Lengths);
System\Numerics\Tensors\netcore\TensorShape.cs (1)
62
public nint FlattenedLength =>
TensorSpanHelpers
.CalculateTotalLength(Lengths);
System\Numerics\Tensors\netcore\TensorSpan.cs (40)
79
nint linearLength =
TensorSpanHelpers
.CalculateTotalLength(lengths);
91
strides = strides.IsEmpty ? (ReadOnlySpan<nint>)
TensorSpanHelpers
.CalculateStrides(lengths, linearLength) : strides;
92
TensorSpanHelpers
.ValidateStrides(strides, lengths);
93
nint maxElements =
TensorSpanHelpers
.ComputeMaxLinearIndex(strides, lengths);
129
nint linearLength =
TensorSpanHelpers
.CalculateTotalLength(lengths);
131
strides = strides.IsEmpty ? (ReadOnlySpan<nint>)
TensorSpanHelpers
.CalculateStrides(lengths, linearLength) : strides;
132
TensorSpanHelpers
.ValidateStrides(strides, lengths);
134
nint maxElements =
TensorSpanHelpers
.ComputeMaxLinearIndex(strides, lengths);
161
nint linearLength =
TensorSpanHelpers
.CalculateTotalLength(lengths);
173
strides = strides.IsEmpty ? (ReadOnlySpan<nint>)
TensorSpanHelpers
.CalculateStrides(lengths, linearLength) : strides;
174
TensorSpanHelpers
.ValidateStrides(strides, lengths);
176
nint startOffset =
TensorSpanHelpers
.ComputeStartOffsetSystemArray(array, start);
177
nint maxElements =
TensorSpanHelpers
.ComputeMaxLinearIndex(strides, lengths);
206
nint linearLength =
TensorSpanHelpers
.CalculateTotalLength(lengths);
207
strides = strides.IsEmpty ? (ReadOnlySpan<nint>)
TensorSpanHelpers
.CalculateStrides(lengths, linearLength) : strides;
208
TensorSpanHelpers
.ValidateStrides(strides, lengths);
219
nint startOffset =
TensorSpanHelpers
.ComputeStartOffsetSystemArray(array, startIndex);
220
nint maxElements =
TensorSpanHelpers
.ComputeMaxLinearIndex(strides, lengths);
279
nint linearLength =
TensorSpanHelpers
.CalculateTotalLength(lengths);
281
strides = strides.IsEmpty ? (ReadOnlySpan<nint>)
TensorSpanHelpers
.CalculateStrides(lengths, linearLength) : strides;
282
TensorSpanHelpers
.ValidateStrides(strides, lengths);
284
nint maxElements =
TensorSpanHelpers
.ComputeMaxLinearIndex(strides, lengths);
296
nint linearLength =
TensorSpanHelpers
.CalculateTotalLength(lengths);
318
nint index =
TensorSpanHelpers
.ComputeLinearIndex(indexes, Strides, Lengths);
343
nint index =
TensorSpanHelpers
.ComputeLinearIndex(indexes, Strides, Lengths);
473
TensorSpanHelpers
.AdjustIndexes(_span.Rank - 1, 1, _curIndexes, _span.Lengths);
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);
582
TensorSpanHelpers
.Memmove(ref Unsafe.Add(ref destinationSlice._reference,
TensorSpanHelpers
.ComputeLinearIndex(curIndexes, destinationSlice.Strides, destinationSlice.Lengths)), ref Unsafe.Add(ref srcSlice._reference,
TensorSpanHelpers
.ComputeLinearIndex(curIndexes, srcSlice.Strides, srcSlice.Lengths)), copyLength);
583
TensorSpanHelpers
.AdjustIndexes(indexToAdjust, 1, curIndexes, tempLengths);
636
TensorSpanHelpers
.Memmove(ref Unsafe.Add(ref destinationSlice._reference,
TensorSpanHelpers
.ComputeLinearIndex(curIndexes, destinationSlice.Strides, destinationSlice.Lengths)), ref Unsafe.Add(ref srcSlice._reference,
TensorSpanHelpers
.ComputeLinearIndex(curIndexes, srcSlice.Strides, srcSlice.Lengths)), copyLength);
637
TensorSpanHelpers
.AdjustIndexes(indexToAdjust, 1, curIndexes, tempLengths);
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);