Exemplo 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();
        }
Exemplo n.º 2
0
        void WireMatchSearchStage(GroupMatchSearchStage stage)
        {
            var transform = stage.Transformation;

            transform.SetMatchIds        = Data.QueryMatchIds;
            transform.AllGroupPriorities = Data.Priorities;
            transform.Input2             = Data.MemberIndices;
            transform.Input3             = Data.LocalRelationIndexPairs;
            transform.Input4             = Data.RelationRatings;
            transform.Input5             = Data.OrderWeights;
            transform.Input6             = Data.SearchData;
            transform.Input7             = MemberData.RelationMemberships;
            transform.Input8             = MemberData.Exclusivities;
            transform.Input9             = MemberData.ReducedConditionRatings;
            transform.Output             = MemberData.BestMatchDataIds;
        }
Exemplo n.º 3
0
        internal GroupMatchSearchStage SetupMatchSearchStage()
        {
            var transform = new GroupMatchSearchTransform()
            {
                SearchSpacePortionCurve = QueryPipelineConfiguration.instance.SearchSpacePortionCurve,
                SetMatchIds             = Data.QueryMatchIds,
                PreviousMatches         = m_Database.SetDataUsedByQueries,
                WorkingIndices          = Data.PotentialMatchAcquiringIndices,
                Input1 = Data.DefiniteMatchAcquireIndices,
            };

            var stage = new GroupMatchSearchStage(transform);

            WireMatchSearchStage(stage);
            Stages.Add(stage);
            return(stage);
        }