You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 rivejä
1.4 KiB

  1. #pragma once
  2. #include <ecs/config.h>
  3. #include <ecs/core/system/parallelism/composer/fixed_threshold.h>
  4. beg_namespace_ecs_signature_system_parallelism
  5. {
  6. namespace __impl
  7. {
  8. template<typename T_threshold, typename T_lower_strategy, typename T_greater_strategy>
  9. struct fixed_threshold_builder_t
  10. {
  11. struct parameters
  12. {
  13. using threshold_type = T_threshold;
  14. using lower_strategy_type = T_lower_strategy;
  15. using greater_strategy_type = T_greater_strategy;
  16. static constexpr decltype(auto) get_threshold() noexcept
  17. { return threshold_type::value; }
  18. };
  19. constexpr decltype(auto) operator()() const noexcept
  20. { return ::ecs::core::system::parallelism::fixed_threshold<parameters> { }; }
  21. };
  22. struct fixed_threshold_t
  23. {
  24. template<typename T_threshold, typename T_lower_strategy, typename T_greater_strategy>
  25. constexpr decltype(auto) operator()(T_threshold, T_lower_strategy, T_greater_strategy) const noexcept
  26. { return fixed_threshold_builder_t<T_threshold, T_lower_strategy, T_greater_strategy> { }; }
  27. };
  28. }
  29. constexpr decltype(auto) fixed_threshold = __impl::fixed_threshold_t { };
  30. }
  31. end_namespace_ecs_signature_system_parallelism