Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ GenerateSortHelpers()

static SortHelper< TInputOutput, TKey >[] System.Linq.Parallel.SortHelper< TInputOutput, TKey >.GenerateSortHelpers ( PartitionedStream< TInputOutput, TKey > partitions,
QueryTaskGroupState groupState )
inlinestaticpackage

Definition at line 46 of file SortHelper.cs.

47 {
48 int partitionCount = partitions.PartitionCount;
50 int num = 1;
51 int num2 = 0;
52 while (num < partitionCount)
53 {
54 num2++;
55 num <<= 1;
56 }
57 int[][] sharedIndices = new int[partitionCount][];
61 if (partitionCount > 1)
62 {
63 int num3 = 1;
64 for (int i = 0; i < array2.Length; i++)
65 {
66 for (int j = 0; j < array2[i].Length; j++)
67 {
68 if (j % num3 == 0)
69 {
70 array2[i][j] = new Barrier(2);
71 }
72 }
73 num3 *= 2;
74 }
75 }
76 for (int k = 0; k < partitionCount; k++)
77 {
79 }
80 return array;
81 }

References System.array.

Referenced by System.Linq.Parallel.OrderPreservingSpoolingTask< TInputOutput, TKey >.Spool().