12 instantiations of SegmentedArray
Microsoft.CodeAnalysis.Collections.Package (12)
SegmentedArray`1.cs (1)
150
return new
SegmentedArray
<T>(Length, items);
SegmentedArray`1+PrivateMarshal.cs (1)
19
=> new
SegmentedArray
<T>(length, segments);
SegmentedDictionary`2.cs (3)
493
var buckets = new
SegmentedArray
<int>(size);
494
var entries = new
SegmentedArray
<Entry>(size);
655
_buckets = new
SegmentedArray
<int>(newSize);
SegmentedHashSet`1.cs (3)
908
_buckets = new
SegmentedArray
<int>(newSize);
999
var buckets = new
SegmentedArray
<int>(size);
1000
var entries = new
SegmentedArray
<Entry>(size);
SegmentedList`1.cs (4)
42
private static readonly SegmentedArray<T> s_emptyArray =
new
(0);
66
_items = new
SegmentedArray
<T>(capacity);
95
_items = new
SegmentedArray
<T>(count);
146
_items = new
SegmentedArray
<T>(value);
131 references to SegmentedArray
Microsoft.CodeAnalysis.Collections.Package (131)
Internal\ArraySortHelper.cs (4)
49
public static int BinarySearch(
SegmentedArray
<T> array, int index, int length, T value, IComparer<T>? comparer)
82
internal static int InternalBinarySearch(
SegmentedArray
<T> array, int index, int length, T value, IComparer<T> comparer)
339
public static int BinarySearch(
SegmentedArray
<T> array, int index, int length, T value, IComparer<T>? comparer)
364
private static int BinarySearch(
SegmentedArray
<T> array, int index, int length, T value)
Internal\SegmentedArraySegment`1.cs (2)
9
public
SegmentedArray
<T> Array { get; }
13
public SegmentedArraySegment(
SegmentedArray
<T> array, int start, int length)
SegmentedArray.cs (50)
19
internal static void Clear<T>(
SegmentedArray
<T> array)
23
internal static void Clear<T>(
SegmentedArray
<T> array, int index, int length)
32
internal static void Copy<T>(
SegmentedArray
<T> sourceArray,
SegmentedArray
<T> destinationArray, int length)
50
public static void Copy<T>(
SegmentedArray
<T> sourceArray, Array destinationArray, int length)
77
public static void Copy<T>(
SegmentedArray
<T> sourceArray, int sourceIndex,
SegmentedArray
<T> destinationArray, int destinationIndex, int length)
110
private static void CopyOverlapped<T>(
SegmentedArray
<T> array, int sourceIndex, int destinationIndex, int length)
136
public static void Copy<T>(
SegmentedArray
<T> sourceArray, int sourceIndex, Array destinationArray, int destinationIndex, int length)
172
public static int BinarySearch<T>(
SegmentedArray
<T> array, T value)
177
public static int BinarySearch<T>(
SegmentedArray
<T> array, T value, IComparer<T>? comparer)
182
public static int BinarySearch<T>(
SegmentedArray
<T> array, int index, int length, T value)
187
public static int BinarySearch<T>(
SegmentedArray
<T> array, int index, int length, T value, IComparer<T>? comparer)
199
public static int IndexOf<T>(
SegmentedArray
<T> array, T value)
204
public static int IndexOf<T>(
SegmentedArray
<T> array, T value, int startIndex)
209
public static int IndexOf<T>(
SegmentedArray
<T> array, T value, int startIndex, int count)
214
public static int IndexOf<T>(
SegmentedArray
<T> array, T value, int startIndex, int count, IEqualityComparer<T>? comparer)
264
public static int LastIndexOf<T>(
SegmentedArray
<T> array, T value)
269
public static int LastIndexOf<T>(
SegmentedArray
<T> array, T value, int startIndex)
274
public static int LastIndexOf<T>(
SegmentedArray
<T> array, T value, int startIndex, int count)
279
public static int LastIndexOf<T>(
SegmentedArray
<T> array, T value, int startIndex, int count, IEqualityComparer<T>? comparer)
333
public static void Reverse<T>(
SegmentedArray
<T> array)
338
public static void Reverse<T>(
SegmentedArray
<T> array, int index, int length)
362
public static void Sort<T>(
SegmentedArray
<T> array)
371
public static void Sort<T>(
SegmentedArray
<T> array, int index, int length)
376
public static void Sort<T>(
SegmentedArray
<T> array, IComparer<T>? comparer)
381
public static void Sort<T>(
SegmentedArray
<T> array, int index, int length, IComparer<T>? comparer)
397
public static void Sort<T>(
SegmentedArray
<T> array, Comparison<T> comparison)
411
private static SegmentEnumerable<T> GetSegments<T>(this
SegmentedArray
<T> array, int offset, int length)
414
private static AlignedSegmentEnumerable<T> GetSegments<T>(
SegmentedArray
<T> first,
SegmentedArray
<T> second, int length)
418
private static AlignedSegmentEnumerable<T> GetSegmentsAligned<T>(
SegmentedArray
<T> first, int firstOffset,
SegmentedArray
<T> second, int secondOffset, int length)
422
private static UnalignedSegmentEnumerable<T> GetSegmentsUnaligned<T>(
SegmentedArray
<T> first, int firstOffset,
SegmentedArray
<T> second, int secondOffset, int length)
427
private readonly
SegmentedArray
<T> _first;
429
private readonly
SegmentedArray
<T> _second;
433
public AlignedSegmentEnumerable(
SegmentedArray
<T> first,
SegmentedArray
<T> second, int length)
438
public AlignedSegmentEnumerable(
SegmentedArray
<T> first, int firstOffset,
SegmentedArray
<T> second, int secondOffset, int length)
513
private readonly
SegmentedArray
<T> _first;
515
private readonly
SegmentedArray
<T> _second;
519
public UnalignedSegmentEnumerable(
SegmentedArray
<T> first,
SegmentedArray
<T> second, int length)
524
public UnalignedSegmentEnumerable(
SegmentedArray
<T> first, int firstOffset,
SegmentedArray
<T> second, int secondOffset, int length)
656
private readonly
SegmentedArray
<T> _array;
660
public SegmentEnumerable(
SegmentedArray
<T> array)
667
public SegmentEnumerable(
SegmentedArray
<T> array, int offset, int length)
SegmentedArray`1.cs (7)
20
internal readonly partial struct SegmentedArray<T> : ICloneable, IList, IStructuralComparable, IStructuralEquatable, IList<T>, IReadOnlyList<T>, IEquatable<
SegmentedArray
<T>>
175
return obj is
SegmentedArray
<T> other
184
public bool Equals(
SegmentedArray
<T> other)
310
if (other is not
SegmentedArray
<T> o
331
if (other is not
SegmentedArray
<T> o)
375
public Enumerator(
SegmentedArray
<T> array)
421
public static int SegmentSize =>
SegmentedArray
<T>.SegmentSize;
SegmentedArray`1+PrivateMarshal.cs (3)
14
/// <inheritdoc cref="SegmentedCollectionsMarshal.AsSegments{T}(
SegmentedArray
{T})"/>
15
public static T[][] AsSegments(
SegmentedArray
<T> array)
18
public static
SegmentedArray
<T> AsSegmentedArray(int length, T[][] segments)
SegmentedCollectionsMarshal.cs (11)
16
/// Gets the backing storage array for a <see cref="
SegmentedArray
{T}"/>.
21
/// value will invalidate the <see cref="
SegmentedArray
{T}"/> data structure.</returns>
22
public static T[][] AsSegments<T>(
SegmentedArray
<T> array)
23
=>
SegmentedArray
<T>.PrivateMarshal.AsSegments(array);
26
/// Gets a <see cref="
SegmentedArray
{T}"/> value wrapping the input T[][].
30
/// <param name="segments">The input array to wrap in the returned <see cref="
SegmentedArray
{T}"/> value.</param>
31
/// <returns>A <see cref="
SegmentedArray
{T}"/> value wrapping <paramref name="segments"/>.</returns>
35
/// array, and that it won't be modified once the returned <see cref="
SegmentedArray
{T}"/> value starts
37
/// <see cref="
SegmentedArray
{T}"/> values to change outside their control.
41
public static
SegmentedArray
<T> AsSegmentedArray<T>(int length, T[][] segments)
42
=>
SegmentedArray
<T>.PrivateMarshal.AsSegmentedArray(length, segments);
SegmentedDictionary`2.cs (25)
46
private
SegmentedArray
<int> _buckets;
47
private
SegmentedArray
<Entry> _entries;
169
var
oldEntries = source._entries;
316
var
entries = _entries;
374
var
entries = _entries;
414
var
entries = _entries;
448
var
entries = _entries;
493
var
buckets = new SegmentedArray<int>(size);
494
var
entries = new SegmentedArray<Entry>(size);
518
var
entries = _entries;
652
var
entries = CreateNewSegmentedArrayReusingOldSegments(_entries, newSize);
670
private static
SegmentedArray
<Entry> CreateNewSegmentedArrayReusingOldSegments(
SegmentedArray
<Entry> oldArray, int newSize)
713
var
entries = _entries;
790
var
entries = _entries;
906
var
entries = _entries;
926
var
entries = _entries;
1003
var
oldEntries = _entries;
1017
private void CopyEntries(
SegmentedArray
<Entry> entries, int count)
1019
var
newEntries = _entries;
1153
var
buckets = _buckets;
1329
var
entries = _dictionary._entries;
1408
var
entries = _dictionary._entries;
1537
var
entries = _dictionary._entries;
1616
var
entries = _dictionary._entries;
SegmentedHashSet`1.cs (20)
53
private
SegmentedArray
<int> _buckets;
54
private
SegmentedArray
<Entry> _entries;
165
_buckets = (
SegmentedArray
<int>)source._buckets.Clone();
166
_entries = (
SegmentedArray
<Entry>)source._entries.Clone();
176
var
entries = source._entries;
221
var
buckets = _buckets;
224
var
entries = _entries;
285
var
buckets = _buckets;
293
var
entries = _entries;
819
var
entries = _entries;
839
var
entries = _entries;
905
var
entries = CreateNewSegmentedArrayReusingOldSegments(_entries, newSize);
924
private static
SegmentedArray
<Entry> CreateNewSegmentedArrayReusingOldSegments(
SegmentedArray
<Entry> oldArray, int newSize)
955
var
oldEntries = _entries;
965
var
entries = _entries;
999
var
buckets = new SegmentedArray<int>(size);
1000
var
entries = new SegmentedArray<Entry>(size);
1023
var
entries = _entries;
1147
var
entries = _entries;
SegmentedList`1.cs (9)
38
internal
SegmentedArray
<T> _items;
42
private static readonly
SegmentedArray
<T> s_emptyArray = new(0);
80
_items = (
SegmentedArray
<T>)segmentedList._items.Clone();
156
private static
SegmentedArray
<T> CreateNewSegmentedArrayReusingOldSegments(
SegmentedArray
<T> oldArray, int newSize)
251
var
array = _items;
316
else if (c is
SegmentedArray
<T> array)
928
else if (c is
SegmentedArray
<T> array)
1392
public ref
SegmentedArray
<T> Items => ref instance._items;