Mirror of Svelto.ECS because we're a fan of it
Nie możesz wybrać więcej, niż 25 tematów
Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
|
- using System;
-
- namespace Svelto.ECS
- {
- public static class ProcessorCount
- {
- public static readonly int processorCount = Environment.ProcessorCount;
-
- public static int BatchSize(uint totalIterations)
- {
- var iterationsPerBatch = totalIterations / processorCount;
-
- if (iterationsPerBatch < 64)
- return 64;
-
- return (int) iterationsPerBatch;
- }
- }
- }
|