コード例 #1
0
        private void Start()
        {
            CreateMatrices();
            SpawnBoids();
            parallelAddToDictFunc = ParallelAddToDict;
            parallelSteeringFunc  = ParallelSteering;

            ConcurrencyLevel    = SystemInfo.processorCount;
            boidsDictConcurrent = new ConcurrentDictOfLists <Boid>(ConcurrencyLevel);
            parallelOpts.MaxDegreeOfParallelism = ConcurrencyLevel;
            Debug.Log("System has " + SystemInfo.processorCount + " hardware threads, setting concurrency level...");
        }
コード例 #2
0
        private void Start()
        {
            CreateMatrices();
            SpawnBoids();

            parallelAddToDictFunc = ParallelAddToDict;
            parallelSteeringFunc  = ParallelSteering;

            ConcurrencyLevel    = SystemInfo.processorCount;
            boidsDictConcurrent = new ConcurrentDictOfLists <Boid>(ConcurrencyLevel);
            parallelOpts.MaxDegreeOfParallelism = ConcurrencyLevel;
            Debug.Log("System has " + SystemInfo.processorCount + " hardware threads, setting concurrency level...");

            guiStyle                  = new GUIStyle();
            guiStyle.fontSize         = 27;
            guiStyle.normal.textColor = Color.white;
            boidsSampler              = CustomSampler.Create("BoidsSimulation");
        }