Ejemplo n.º 1
0
        /// <summary>
        /// Schedules execution of the merge itself.
        /// </summary>
        public void Execute()
        {
            ParallelQuery <int> query = ParallelEnumerable.Range(0, _queryResults.Count);

            query = new QueryExecutionOption <int>(QueryOperator <int> .AsQueryOperator(query), _settings);
            query.ForAll(ToArrayElement);
        }
Ejemplo n.º 2
0
        private readonly bool _limitsParallelism   = false; // Whether this operator limits parallelism

        //---------------------------------------------------------------------------------------
        // Initializes a new zip operator.
        //
        // Arguments:
        //    leftChild     - the left data source from which to pull data.
        //    rightChild    - the right data source from which to pull data.
        //

        internal ZipQueryOperator(
            ParallelQuery <TLeftInput> leftChildSource, IEnumerable <TRightInput> rightChildSource,
            Func <TLeftInput, TRightInput, TOutput> resultSelector)
            : this(
                QueryOperator <TLeftInput> .AsQueryOperator(leftChildSource),
                QueryOperator <TRightInput> .AsQueryOperator(rightChildSource),
                resultSelector)
        {
        }
Ejemplo n.º 3
0
        //---------------------------------------------------------------------------------------
        // Stores a set of child operators on this query node.
        //

        internal BinaryQueryOperator(ParallelQuery <TLeftInput> leftChild, ParallelQuery <TRightInput> rightChild)
            : this(QueryOperator <TLeftInput> .AsQueryOperator(leftChild), QueryOperator <TRightInput> .AsQueryOperator(rightChild))
        {
        }
 internal UnaryQueryOperator(IEnumerable <TInput> child, bool outputOrdered)
     : this(QueryOperator <TInput> .AsQueryOperator(child), outputOrdered)
 {
 }
        //---------------------------------------------------------------------------------------
        // Constructors
        //

        internal UnaryQueryOperator(IEnumerable <TInput> child)
            : this(QueryOperator <TInput> .AsQueryOperator(child))
        {
        }
 public void Execute()
 {
     new QueryExecutionOption <int>(QueryOperator <int> .AsQueryOperator(ParallelEnumerable.Range(0, this.m_queryResults.Count)), this.m_settings).ForAll <int>(new Action <int>(this.ToArrayElement));
 }