Ejemplo n.º 1
0
        internal void SetupData()
        {
            Configuration = QueryPipelineConfiguration.instance;

            var memoryOptions = MARSMemoryOptions.instance;

            Data = new ParallelGroupData(memoryOptions.QueryDataCapacity);
            // make sure that we refresh references to arrays when they have been resized behind the scenes
            Data.OnResize += WireStages;

            var memberCapacityMultiplier = memoryOptions.SetMemberCapacityMultiplier;

            MemberData           = new ParallelGroupMemberData(memoryOptions.QueryDataCapacity * memberCapacityMultiplier);
            MemberData.OnResize += WireStages;

            // insert a blank stage to represent the idle part of the cycle
            Stages.Add(null);

            MemberTraitCacheStage        = SetupMemberTraitCacheStage();
            RelationTraitCacheStage      = SetupRelationTraitCacheStage();
            MemberConditionRatingStage   = SetupMemberMatchRating();
            IncompleteGroupFilterStage   = SetupIncompleteGroupFilter();
            MemberMatchIntersectionStage = SetupMatchIntersection();
            MemberTraitRequirementStage  = SetupTraitFilterStage();
            MemberDataAvailabilityStage  = SetupAvailabilityCheckStage();
            MemberMatchReductionStage    = SetupMatchReduction();
            GroupRelationRatingStage     = SetupRelationRatingStage();
            FilterRelationMembersStage   = SetupFilterRelationMembersStage();
            MatchSearchStage             = SetupMatchSearchStage();
            MarkDataUsedStage            = SetupMarkUsedStage();
            MemberResultFillStage        = SetupQueryResultFill();
            GroupResultFillStage         = SetupSetQueryResultFill();

            AcquireHandlingStage = SetupAcquireHandlingStage();
        }
Ejemplo n.º 2
0
        void WireMatchReductionStage(MatchReductionStage stage)
        {
            var transform = stage.Transformation;

            transform.Input1 = MemberData.ConditionRatings;
            transform.Input2 = MemberData.ConditionMatchSets;
            transform.Output = MemberData.ReducedConditionRatings;
        }
        internal MatchReductionStage SetupMatchReduction()
        {
            var dataTransform = new MatchReductionTransform
            {
                WorkingIndices = Data.PotentialMatchAcquiringIndices,
            };

            var stage = new MatchReductionStage(dataTransform);

            WireMatchReductionStage(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();
        }