示例#1
0
        void WireMemberTraitCacheStage(CacheTraitReferencesStage stage)
        {
            var transform = stage.Transformation;

            transform.Input2 = MemberData.Conditions;
            transform.Output = MemberData.CachedTraits;
        }
示例#2
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();
        }
        internal CacheTraitReferencesStage SetupTraitCacheStage()
        {
            var dataTransform = new TraitRefTransform(m_Database.CacheTraitReferences)
            {
                WorkingIndices = Data.AcquiringIndices,
                Input1         = Data.FilteredAcquiringIndices,
            };

            var stage = new CacheTraitReferencesStage(dataTransform);

            WireTraitCacheStage(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();
        }
 void WireTraitCacheStage(CacheTraitReferencesStage stage)
 {
     stage.Transformation.Input2 = Data.Conditions;
     stage.Transformation.Output = Data.CachedTraits;
 }