Exemple #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();
        }
Exemple #2
0
        void WireMemberResultFillStage(ResultFillStage stage)
        {
            var transform = stage.Transformation;

            transform.Input1 = MemberData.BestMatchDataIds;
            transform.Input2 = MemberData.Conditions;
            transform.Input3 = MemberData.CachedTraits;
            transform.Input4 = MemberData.TraitRequirements;
            transform.Input5 = MemberData.QueryMatchIds;
            transform.Output = MemberData.QueryResults;
        }
        internal ResultFillStage SetupQueryResultFill()
        {
            var dataTransform = new ResultFillTransform
            {
                WorkingIndices           = Data.DefiniteMatchAcquireIndices,
                FillRequiredTraitsAction = m_Database.FillQueryResultRequirements
            };

            var stage = new ResultFillStage(dataTransform);

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