Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
IntSumAggregationOperator.cs
Go to the documentation of this file.
3
5
6internal sealed class IntSumAggregationOperator : InlinedAggregationOperator<int, int, int>
7{
9 {
11
17
18 protected override bool MoveNextCore(ref int currentElement)
19 {
20 int currentElement2 = 0;
21 TKey currentKey = default(TKey);
23 if (source.MoveNext(ref currentElement2, ref currentKey))
24 {
25 int num = 0;
26 int num2 = 0;
27 do
28 {
29 if ((num2++ & 0x3F) == 0)
30 {
32 }
33 num = checked(num + currentElement2);
34 }
35 while (source.MoveNext(ref currentElement2, ref currentKey));
36 currentElement = num;
37 return true;
38 }
39 return false;
40 }
41
42 protected override void Dispose(bool disposing)
43 {
45 }
46 }
47
49 : base(child)
50 {
51 }
52
54 {
55 using IEnumerator<int> enumerator = GetEnumerator(ParallelMergeOptions.FullyBuffered, suppressOrderPreservation: true);
56 int num = 0;
57 while (enumerator.MoveNext())
58 {
59 num = checked(num + enumerator.Current);
60 }
61 return num;
62 }
63
68}
IntSumAggregationOperatorEnumerator(QueryOperatorEnumerator< int, TKey > source, int partitionIndex, CancellationToken cancellationToken)
override QueryOperatorEnumerator< int, int > CreateEnumerator< TKey >(int index, int count, QueryOperatorEnumerator< int, TKey > source, object sharedData, CancellationToken cancellationToken)
override int InternalAggregate(ref Exception singularExceptionToThrow)