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.

19 wiersze
457B

  1. using System;
  2. namespace Svelto.ECS
  3. {
  4. public static class ProcessorCount
  5. {
  6. public static readonly int processorCount = Environment.ProcessorCount;
  7. public static int BatchSize(uint totalIterations)
  8. {
  9. var iterationsPerBatch = totalIterations / processorCount;
  10. if (iterationsPerBatch < 64)
  11. return 64;
  12. return (int) iterationsPerBatch;
  13. }
  14. }
  15. }