41 references to SegmentedArrayHelper
Microsoft.Build.Framework (41)
ArraySortHelper.cs (8)
147if (partitionSize <= SegmentedArrayHelper.IntrosortSizeThreshold) 185Debug.Assert(keys.Length >= SegmentedArrayHelper.IntrosortSizeThreshold); 425if (partitionSize <= SegmentedArrayHelper.IntrosortSizeThreshold) 466Debug.Assert(keys.Length >= SegmentedArrayHelper.IntrosortSizeThreshold); 741if (partitionSize <= SegmentedArrayHelper.IntrosortSizeThreshold) 779Debug.Assert(keys.Length >= SegmentedArrayHelper.IntrosortSizeThreshold); 982if (partitionSize <= SegmentedArrayHelper.IntrosortSizeThreshold) 1020Debug.Assert(keys.Length >= SegmentedArrayHelper.IntrosortSizeThreshold);
SegmentedArray.cs (23)
480var initialFirstSegment = _firstOffset >> SegmentedArrayHelper.GetSegmentShift<T>(); 481var initialSecondSegment = _secondOffset >> SegmentedArrayHelper.GetSegmentShift<T>(); 482var offset = _firstOffset & SegmentedArrayHelper.GetOffsetMask<T>(); 483Debug.Assert(offset == (_secondOffset & SegmentedArrayHelper.GetOffsetMask<T>()), "Aligned views must start at the same segment offset"); 495var firstSegment = _firstSegments[(_completed + _firstOffset) >> SegmentedArrayHelper.GetSegmentShift<T>()]; 496var secondSegment = _secondSegments[(_completed + _secondOffset) >> SegmentedArrayHelper.GetSegmentShift<T>()]; 497var currentSegmentLength = Math.Min(SegmentedArrayHelper.GetSegmentSize<T>(), _length - _completed); 583var initialFirstSegment = (_completed + _firstOffset) >> SegmentedArrayHelper.GetSegmentShift<T>(); 584var initialSecondSegment = (_completed + _secondOffset) >> SegmentedArrayHelper.GetSegmentShift<T>(); 585var firstOffset = (_completed + _firstOffset) & SegmentedArrayHelper.GetOffsetMask<T>(); 586var secondOffset = (_completed + _secondOffset) & SegmentedArrayHelper.GetOffsetMask<T>(); 631var initialFirstSegment = (_firstOffset + _length - _completed - 1) >> SegmentedArrayHelper.GetSegmentShift<T>(); 632var initialSecondSegment = (_secondOffset + _length - _completed - 1) >> SegmentedArrayHelper.GetSegmentShift<T>(); 633var firstOffset = (_firstOffset + _length - _completed - 1) & SegmentedArrayHelper.GetOffsetMask<T>(); 634var secondOffset = (_secondOffset + _length - _completed - 1) & SegmentedArrayHelper.GetOffsetMask<T>(); 725var firstSegment = _offset >> SegmentedArrayHelper.GetSegmentShift<T>(); 726var offset = _offset & SegmentedArrayHelper.GetOffsetMask<T>(); 736var segment = _segments[(_completed + _offset) >> SegmentedArrayHelper.GetSegmentShift<T>()]; 737_current = segment.AsMemory().Slice(0, Math.Min(SegmentedArrayHelper.GetSegmentSize<T>(), _length - _completed)); 774var firstSegment = _offset >> SegmentedArrayHelper.GetSegmentShift<T>(); 775var offset = _offset & SegmentedArrayHelper.GetOffsetMask<T>(); 785var segment = _segments[(_completed + _offset) >> SegmentedArrayHelper.GetSegmentShift<T>()]; 786_current = segment.AsMemory().Slice(0, Math.Min(SegmentedArrayHelper.GetSegmentSize<T>(), _length - _completed));
SegmentedArray`1.cs (7)
35[MethodImpl(SegmentedArrayHelper.FastPathMethodImplOptions)] 38return SegmentedArrayHelper.GetSegmentSize<T>(); 47[MethodImpl(SegmentedArrayHelper.FastPathMethodImplOptions)] 50return SegmentedArrayHelper.GetSegmentShift<T>(); 59[MethodImpl(SegmentedArrayHelper.FastPathMethodImplOptions)] 62return SegmentedArrayHelper.GetOffsetMask<T>(); 118[MethodImpl(SegmentedArrayHelper.FastPathMethodImplOptions)]
SegmentedArrayHelper.cs (3)
127=> SegmentedArrayHelper.CalculateSegmentSize(elementSize); 130=> SegmentedArrayHelper.CalculateSegmentShift(elementSize); 133=> SegmentedArrayHelper.CalculateOffsetMask(elementSize);