129 references to OrdinalIndexState
System.Linq.Parallel (129)
System\Linq\Parallel\Merging\MergeExecutor.cs (1)
60if (options != ParallelMergeOptions.FullyBuffered && !partitions.OrdinalIndexState.IsWorseThan(OrdinalIndexState.Increasing))
System\Linq\Parallel\Partitioning\HashRepartitionStream.cs (1)
47: base(partitionsCount, orderKeyComparer, OrdinalIndexState.Shuffled)
System\Linq\Parallel\Partitioning\PartitionedDataSource.cs (2)
56source is IList<T> ? OrdinalIndexState.Indexable : OrdinalIndexState.Correct)
System\Linq\Parallel\Partitioning\PartitionedStream.cs (3)
36private readonly OrdinalIndexState _indexState; // State of the order keys. 38internal PartitionedStream(int partitionCount, IComparer<TKey> keyComparer, OrdinalIndexState indexState) 96internal OrdinalIndexState OrdinalIndexState
System\Linq\Parallel\QueryOperators\AssociativeAggregationOperator.cs (1)
187partitionCount, Util.GetDefaultComparer<int>(), OrdinalIndexState.Correct);
System\Linq\Parallel\QueryOperators\Binary\ConcatQueryOperator.cs (8)
46_prematureMergeLeft = LeftChild.OrdinalIndexState.IsWorseThan(OrdinalIndexState.Increasing); 47_prematureMergeRight = RightChild.OrdinalIndexState.IsWorseThan(OrdinalIndexState.Increasing); 49if ((LeftChild.OrdinalIndexState == OrdinalIndexState.Indexable) 50&& (RightChild.OrdinalIndexState == OrdinalIndexState.Indexable)) 52SetOrdinalIndex(OrdinalIndexState.Indexable); 57ExchangeUtilities.Worse(OrdinalIndexState.Increasing, 90Debug.Assert(!ExchangeUtilities.IsWorseThan(leftStream.OrdinalIndexState, OrdinalIndexState.Increasing)); 109Debug.Assert(!ExchangeUtilities.IsWorseThan(rightStream.OrdinalIndexState, OrdinalIndexState.Increasing));
System\Linq\Parallel\QueryOperators\Binary\ExceptQueryOperator.cs (2)
37SetOrdinalIndex(OrdinalIndexState.Shuffled); 90new PartitionedStream<TInputOutput, TLeftKey>(partitionCount, leftHashStream.KeyComparer, OrdinalIndexState.Shuffled);
System\Linq\Parallel\QueryOperators\Binary\GroupJoinQueryOperator.cs (1)
55SetOrdinalIndex(OrdinalIndexState.Shuffled);
System\Linq\Parallel\QueryOperators\Binary\IntersectQueryOperator.cs (2)
38SetOrdinalIndex(OrdinalIndexState.Shuffled); 92new PartitionedStream<TInputOutput, TLeftKey>(partitionCount, leftHashStream.KeyComparer, OrdinalIndexState.Shuffled);
System\Linq\Parallel\QueryOperators\Binary\JoinQueryOperator.cs (2)
71SetOrdinalIndex(OrdinalIndexState.Shuffled); 82if (ExchangeUtilities.IsWorseThan(LeftChild.OrdinalIndexState, OrdinalIndexState.Increasing))
System\Linq\Parallel\QueryOperators\Binary\UnionQueryOperator.cs (2)
129new PartitionedStream<TInputOutput, ConcatKey<TLeftKey, TRightKey>>(partitionCount, compoundKeyComparer, OrdinalIndexState.Shuffled); 143new PartitionedStream<TInputOutput, int>(partitionCount, Util.GetDefaultComparer<int>(), OrdinalIndexState.Shuffled);
System\Linq\Parallel\QueryOperators\Binary\ZipQueryOperator.cs (8)
67OrdinalIndexState leftIndexState = _leftChild.OrdinalIndexState; 68OrdinalIndexState rightIndexState = _rightChild.OrdinalIndexState; 70_prematureMergeLeft = leftIndexState != OrdinalIndexState.Indexable; 71_prematureMergeRight = rightIndexState != OrdinalIndexState.Indexable; 73(_prematureMergeLeft && leftIndexState != OrdinalIndexState.Shuffled) 74|| (_prematureMergeRight && rightIndexState != OrdinalIndexState.Shuffled); 136internal override OrdinalIndexState OrdinalIndexState 140return OrdinalIndexState.Indexable;
System\Linq\Parallel\QueryOperators\BinaryQueryOperator.cs (5)
28private OrdinalIndexState _indexState = OrdinalIndexState.Shuffled; 57internal sealed override OrdinalIndexState OrdinalIndexState 62protected void SetOrdinalIndex(OrdinalIndexState indexState) 105Debug.Assert(IsIndexible == (_op.OrdinalIndexState == OrdinalIndexState.Indexable));
System\Linq\Parallel\QueryOperators\Inlined\InlinedAggregationOperator.cs (1)
125partitionCount, Util.GetDefaultComparer<int>(), OrdinalIndexState.Correct);
System\Linq\Parallel\QueryOperators\Options\OrderingQueryOperator.cs (2)
23private readonly OrdinalIndexState _ordinalIndexState; 66internal override OrdinalIndexState OrdinalIndexState
System\Linq\Parallel\QueryOperators\Options\QueryExecutionOption.cs (2)
22private readonly OrdinalIndexState _indexState; 45internal override OrdinalIndexState OrdinalIndexState
System\Linq\Parallel\QueryOperators\PartitionerQueryOperator.cs (8)
67internal override OrdinalIndexState OrdinalIndexState 75internal static OrdinalIndexState GetOrdinalIndexState(Partitioner<TElement> partitioner) 81return OrdinalIndexState.Shuffled; 88return OrdinalIndexState.Correct; 92return OrdinalIndexState.Increasing; 97return OrdinalIndexState.Shuffled; 137OrdinalIndexState indexState = (orderablePartitioner != null) 139: OrdinalIndexState.Shuffled;
System\Linq\Parallel\QueryOperators\QueryOperator.cs (1)
272internal abstract OrdinalIndexState OrdinalIndexState { get; }
System\Linq\Parallel\QueryOperators\ScanQueryOperator.cs (3)
96internal override OrdinalIndexState OrdinalIndexState 101? OrdinalIndexState.Indexable 102: OrdinalIndexState.Correct;
System\Linq\Parallel\QueryOperators\Unary\AnyAllSearchOperator.cs (1)
110partitionCount, Util.GetDefaultComparer<int>(), OrdinalIndexState.Correct);
System\Linq\Parallel\QueryOperators\Unary\ContainsSearchOperator.cs (1)
87PartitionedStream<bool, int> outputStream = new PartitionedStream<bool, int>(partitionCount, Util.GetDefaultComparer<int>(), OrdinalIndexState.Correct);
System\Linq\Parallel\QueryOperators\Unary\DefaultIfEmptyQueryOperator.cs (1)
42SetOrdinalIndexState(ExchangeUtilities.Worse(Child.OrdinalIndexState, OrdinalIndexState.Correct));
System\Linq\Parallel\QueryOperators\Unary\DistinctQueryOperator.cs (2)
36SetOrdinalIndexState(OrdinalIndexState.Shuffled); 84new PartitionedStream<TInputOutput, TKey>(partitionCount, hashStream.KeyComparer, OrdinalIndexState.Shuffled);
System\Linq\Parallel\QueryOperators\Unary\ElementAtQueryOperator.cs (5)
44OrdinalIndexState childIndexState = Child.OrdinalIndexState; 45if (ExchangeUtilities.IsWorseThan(childIndexState, OrdinalIndexState.Correct)) 48_limitsParallelism = childIndexState != OrdinalIndexState.Shuffled; 75Debug.Assert(intKeyStream.OrdinalIndexState == OrdinalIndexState.Indexable); 86partitionCount, Util.GetDefaultComparer<int>(), OrdinalIndexState.Correct);
System\Linq\Parallel\QueryOperators\Unary\FirstQueryOperator.cs (2)
41_prematureMergeNeeded = Child.OrdinalIndexState.IsWorseThan(OrdinalIndexState.Increasing); 83partitionCount, Util.GetDefaultComparer<int>(), OrdinalIndexState.Shuffled);
System\Linq\Parallel\QueryOperators\Unary\ForAllOperator.cs (1)
88partitionCount, Util.GetDefaultComparer<int>(), OrdinalIndexState.Correct);
System\Linq\Parallel\QueryOperators\Unary\GroupByQueryOperator.cs (3)
65SetOrdinalIndexState(OrdinalIndexState.Shuffled); 105new PartitionedStream<IGrouping<TGroupKey, TElement>, TKey>(partitionCount, hashStream.KeyComparer, OrdinalIndexState.Shuffled); 143new PartitionedStream<IGrouping<TGroupKey, TElement>, TKey>(partitionCount, hashStream.KeyComparer, OrdinalIndexState.Shuffled);
System\Linq\Parallel\QueryOperators\Unary\IndexedSelectQueryOperator.cs (6)
61OrdinalIndexState childIndexState = Child.OrdinalIndexState; 62OrdinalIndexState indexState = childIndexState; 64if (ExchangeUtilities.IsWorseThan(childIndexState, OrdinalIndexState.Correct)) 67_limitsParallelism = childIndexState != OrdinalIndexState.Shuffled; 68indexState = OrdinalIndexState.Correct; 71Debug.Assert(!ExchangeUtilities.IsWorseThan(indexState, OrdinalIndexState.Correct));
System\Linq\Parallel\QueryOperators\Unary\IndexedWhereQueryOperator.cs (4)
60OrdinalIndexState childIndexState = Child.OrdinalIndexState; 61if (ExchangeUtilities.IsWorseThan(childIndexState, OrdinalIndexState.Correct)) 64_limitsParallelism = childIndexState != OrdinalIndexState.Shuffled; 67SetOrdinalIndexState(OrdinalIndexState.Increasing);
System\Linq\Parallel\QueryOperators\Unary\LastQueryOperator.cs (2)
42_prematureMergeNeeded = Child.OrdinalIndexState.IsWorseThan(OrdinalIndexState.Increasing); 83new PartitionedStream<TSource, int>(partitionCount, Util.GetDefaultComparer<int>(), OrdinalIndexState.Shuffled);
System\Linq\Parallel\QueryOperators\Unary\ReverseQueryOperator.cs (5)
43if (Child.OrdinalIndexState == OrdinalIndexState.Indexable) 45SetOrdinalIndexState(OrdinalIndexState.Indexable); 49SetOrdinalIndexState(OrdinalIndexState.Shuffled); 56Debug.Assert(Child.OrdinalIndexState != OrdinalIndexState.Indexable, "Don't take this code path if the child is indexable."); 60partitionCount, new ReverseComparer<TKey>(inputStream.KeyComparer), OrdinalIndexState.Shuffled);
System\Linq\Parallel\QueryOperators\Unary\SelectManyQueryOperator.cs (5)
79OrdinalIndexState childIndexState = Child.OrdinalIndexState; 86_prematureMerge = ExchangeUtilities.IsWorseThan(childIndexState, OrdinalIndexState.Correct); 87_limitsParallelism = _prematureMerge && childIndexState != OrdinalIndexState.Shuffled; 96_prematureMerge = ExchangeUtilities.IsWorseThan(childIndexState, OrdinalIndexState.Increasing); 100SetOrdinalIndexState(OrdinalIndexState.Increasing);
System\Linq\Parallel\QueryOperators\Unary\SingleQueryOperator.cs (1)
60partitionCount, Util.GetDefaultComparer<int>(), OrdinalIndexState.Shuffled);
System\Linq\Parallel\QueryOperators\Unary\SortQueryOperator.cs (1)
47SetOrdinalIndexState(OrdinalIndexState.Shuffled);
System\Linq\Parallel\QueryOperators\Unary\TakeOrSkipQueryOperator.cs (9)
62private OrdinalIndexState OutputOrdinalIndexState() 64OrdinalIndexState indexState = Child.OrdinalIndexState; 66if (indexState == OrdinalIndexState.Indexable) 68return OrdinalIndexState.Indexable; 71if (indexState.IsWorseThan(OrdinalIndexState.Increasing)) 74indexState = OrdinalIndexState.Correct; 78if (!_take && indexState == OrdinalIndexState.Correct) 80indexState = OrdinalIndexState.Increasing; 89Debug.Assert(Child.OrdinalIndexState != OrdinalIndexState.Indexable, "Don't take this code path if the child is indexable.");
System\Linq\Parallel\QueryOperators\Unary\TakeOrSkipWhileQueryOperator.cs (8)
89OrdinalIndexState requiredIndexState = OrdinalIndexState.Increasing; 90OrdinalIndexState childIndexState = Child.OrdinalIndexState; 93requiredIndexState = OrdinalIndexState.Correct; 94_limitsParallelism = childIndexState == OrdinalIndexState.Increasing; 97OrdinalIndexState indexState = ExchangeUtilities.Worse(childIndexState, OrdinalIndexState.Correct); 106indexState = indexState.Worse(OrdinalIndexState.Increasing);
System\Linq\Parallel\QueryOperators\Unary\WhereQueryOperator.cs (1)
45ExchangeUtilities.Worse(Child.OrdinalIndexState, OrdinalIndexState.Increasing));
System\Linq\Parallel\QueryOperators\UnaryQueryOperator.cs (5)
28private OrdinalIndexState _indexState = OrdinalIndexState.Shuffled; 65internal sealed override OrdinalIndexState OrdinalIndexState 70protected void SetOrdinalIndexState(OrdinalIndexState indexState) 110Debug.Assert(IsIndexible == (_op.OrdinalIndexState == OrdinalIndexState.Indexable));
System\Linq\Parallel\Utils\ExchangeUtilities.cs (6)
53new PartitionedStream<T, int>(partitionCount, Util.GetDefaultComparer<int>(), OrdinalIndexState.Correct); 111internal static OrdinalIndexState Worse(this OrdinalIndexState state1, OrdinalIndexState state2) 116internal static bool IsWorseThan(this OrdinalIndexState state1, OrdinalIndexState state2)
System\Linq\Parallel\Utils\Sorting.cs (4)
47private readonly OrdinalIndexState _indexState; // State of the order index 59OrdinalIndexState indexState, IComparer<TKey> keyComparer, 265private void QuickSortIndicesInPlace(GrowingArray<TKey> keys, List<TInputOutput> values, OrdinalIndexState ordinalIndexState) 280&& ordinalIndexState.IsWorseThan(OrdinalIndexState.Increasing))
System\Linq\ParallelEnumerable.cs (1)
4858if (asOperator.OrdinalIndexState == OrdinalIndexState.Indexable && asOperator.OutputOrdered)