internal OrderedPipeliningMergeEnumerator(OrderPreservingPipeliningMergeHelper <TOutput> mergeHelper) : base(mergeHelper.m_taskGroupState)
            {
                int partitionCount = mergeHelper.m_partitions.PartitionCount;

                this.m_mergeHelper         = mergeHelper;
                this.m_producerHeap        = new FixedMaxHeap <OrderPreservingPipeliningMergeHelper <TOutput> .Producer>(partitionCount, OrderPreservingPipeliningMergeHelper <TOutput> .s_producerComparer);
                this.m_privateBuffer       = new Queue <Pair <int, TOutput> > [partitionCount];
                this.m_producerNextElement = new TOutput[partitionCount];
            }
Esempio n. 2
0
            /// <summary>
            /// Constructor
            /// </summary>
            internal OrderedPipeliningMergeEnumerator(OrderPreservingPipeliningMergeHelper <TOutput, TKey> mergeHelper, IComparer <Producer <TKey> > producerComparer)
                : base(mergeHelper._taskGroupState)
            {
                int partitionCount = mergeHelper._partitions.PartitionCount;

                _mergeHelper         = mergeHelper;
                _producerHeap        = new FixedMaxHeap <Producer <TKey> >(partitionCount, producerComparer);
                _privateBuffer       = new Queue <Pair <TKey, TOutput> > [partitionCount];
                _producerNextElement = new TOutput[partitionCount];
            }
 public int Compare(OrderPreservingPipeliningMergeHelper <TOutput> .Producer x, OrderPreservingPipeliningMergeHelper <TOutput> .Producer y)
 {
     return(y.MaxKey - x.MaxKey);
 }