41 references to SegmentedArrayHelper
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (41)
src\Dependencies\Collections\Internal\ArraySortHelper.cs (8)
152
if (partitionSize <=
SegmentedArrayHelper
.IntrosortSizeThreshold)
190
Debug.Assert(keys.Length >=
SegmentedArrayHelper
.IntrosortSizeThreshold);
431
if (partitionSize <=
SegmentedArrayHelper
.IntrosortSizeThreshold)
472
Debug.Assert(keys.Length >=
SegmentedArrayHelper
.IntrosortSizeThreshold);
743
if (partitionSize <=
SegmentedArrayHelper
.IntrosortSizeThreshold)
781
Debug.Assert(keys.Length >=
SegmentedArrayHelper
.IntrosortSizeThreshold);
982
if (partitionSize <=
SegmentedArrayHelper
.IntrosortSizeThreshold)
1020
Debug.Assert(keys.Length >=
SegmentedArrayHelper
.IntrosortSizeThreshold);
src\Dependencies\Collections\Internal\SegmentedArrayHelper.cs (3)
177
=>
SegmentedArrayHelper
.CalculateSegmentSize(elementSize);
180
=>
SegmentedArrayHelper
.CalculateSegmentShift(segmentSize);
183
=>
SegmentedArrayHelper
.CalculateOffsetMask(segmentSize);
src\Dependencies\Collections\SegmentedArray.cs (23)
486
var initialFirstSegment = _firstOffset >>
SegmentedArrayHelper
.GetSegmentShift<T>();
487
var initialSecondSegment = _secondOffset >>
SegmentedArrayHelper
.GetSegmentShift<T>();
488
var offset = _firstOffset &
SegmentedArrayHelper
.GetOffsetMask<T>();
489
Debug.Assert(offset == (_secondOffset &
SegmentedArrayHelper
.GetOffsetMask<T>()), "Aligned views must start at the same segment offset");
501
var firstSegment = _firstSegments[(_completed + _firstOffset) >>
SegmentedArrayHelper
.GetSegmentShift<T>()];
502
var secondSegment = _secondSegments[(_completed + _secondOffset) >>
SegmentedArrayHelper
.GetSegmentShift<T>()];
503
var currentSegmentLength = Math.Min(
SegmentedArrayHelper
.GetSegmentSize<T>(), _length - _completed);
589
var initialFirstSegment = (_completed + _firstOffset) >>
SegmentedArrayHelper
.GetSegmentShift<T>();
590
var initialSecondSegment = (_completed + _secondOffset) >>
SegmentedArrayHelper
.GetSegmentShift<T>();
591
var firstOffset = (_completed + _firstOffset) &
SegmentedArrayHelper
.GetOffsetMask<T>();
592
var secondOffset = (_completed + _secondOffset) &
SegmentedArrayHelper
.GetOffsetMask<T>();
637
var initialFirstSegment = (_firstOffset + _length - _completed - 1) >>
SegmentedArrayHelper
.GetSegmentShift<T>();
638
var initialSecondSegment = (_secondOffset + _length - _completed - 1) >>
SegmentedArrayHelper
.GetSegmentShift<T>();
639
var firstOffset = (_firstOffset + _length - _completed - 1) &
SegmentedArrayHelper
.GetOffsetMask<T>();
640
var secondOffset = (_secondOffset + _length - _completed - 1) &
SegmentedArrayHelper
.GetOffsetMask<T>();
731
var firstSegment = _offset >>
SegmentedArrayHelper
.GetSegmentShift<T>();
732
var offset = _offset &
SegmentedArrayHelper
.GetOffsetMask<T>();
742
var segment = _segments[(_completed + _offset) >>
SegmentedArrayHelper
.GetSegmentShift<T>()];
743
_current = segment.AsMemory().Slice(0, Math.Min(
SegmentedArrayHelper
.GetSegmentSize<T>(), _length - _completed));
780
var firstSegment = _offset >>
SegmentedArrayHelper
.GetSegmentShift<T>();
781
var offset = _offset &
SegmentedArrayHelper
.GetOffsetMask<T>();
791
var segment = _segments[(_completed + _offset) >>
SegmentedArrayHelper
.GetSegmentShift<T>()];
792
_current = segment.AsMemory().Slice(0, Math.Min(
SegmentedArrayHelper
.GetSegmentSize<T>(), _length - _completed));
src\Dependencies\Collections\SegmentedArray`1.cs (3)
37
return
SegmentedArrayHelper
.GetSegmentSize<T>();
48
return
SegmentedArrayHelper
.GetSegmentShift<T>();
59
return
SegmentedArrayHelper
.GetOffsetMask<T>();
src\Dependencies\Collections\SegmentedList`1.cs (4)
154
var newSegmentCount = (value +
SegmentedArrayHelper
.GetSegmentSize<T>() - 1) >>
SegmentedArrayHelper
.GetSegmentShift<T>();
162
Array.Resize(ref segments[i],
SegmentedArrayHelper
.GetSegmentSize<T>());
165
var lastSegmentSize = value - ((newSegmentCount - 1) <<
SegmentedArrayHelper
.GetSegmentShift<T>());