void WireMarkUsedStage(MarkUsedStage stage)
        {
            var transform = stage.Transformation;

            transform.Input1 = Data.BestMatchDataIds;
            transform.Input2 = Data.QueryMatchIds;
            transform.Output = Data.Exclusivities;
        }
        internal MarkUsedStage SetupMarkUsedStage()
        {
            var transform = new MarkDataUsedTransform
            {
                Process        = m_Database.MarkDataUsedAction,
                WorkingIndices = Data.DefiniteMatchAcquireIndices,
            };

            var stage = new MarkUsedStage(transform);

            WireMarkUsedStage(stage);
            return(stage);
        }
        internal void SetupData()
        {
            configuration  = QueryPipelineConfiguration.instance;
            Data           = new ParallelQueryData(MARSMemoryOptions.instance.QueryDataCapacity);
            Data.OnResize += WireStages;

            CacheTraitReferencesStage = SetupTraitCacheStage();
            ConditionRatingStage      = SetupMatchRating();
            FindMatchProposalsStage   = SetupMatchIntersection();
            DataAvailabilityStage     = SetupAvailabilityCheckStage();
            TraitFilterStage          = SetupTraitFilterStage();
            MatchReductionStage       = SetupMatchReduction();
            BestStandaloneMatchStage  = SetupBestStandaloneMatchStage();
            ResultFillStage           = SetupQueryResultFill();
            MarkUsedStage             = SetupMarkUsedStage();
            AcquireHandlingStage      = SetupAcquireHandlingStage();
        }