選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

34 行
982 B

  1. #pragma once
  2. #include <ecs/config.h>
  3. beg_namespace_ecs_core_parallelism
  4. {
  5. template<typename T_parameters>
  6. struct fixed_threshold
  7. {
  8. using parameters_type = T_parameters;
  9. using strategy_lower_type = typename parameters_type::strategy_lower_type;
  10. using strategy_greater_type = typename parameters_type::strategy_greater_type;
  11. strategy_lower_type _strategy_lower;
  12. strategy_greater_type _strategy_greater;
  13. template<typename T_instance, typename... T_args>
  14. inline void operator()(T_instance& instance, T_args&&... args) const
  15. {
  16. bool threshold_reached = false; // TODO
  17. if (!threshold_reached)
  18. {
  19. _strategy_lower(instance, std::forward<T_args>(args)...);
  20. }
  21. else
  22. {
  23. _strategy_greater(instance, std::forward<T_args>(args)...);
  24. }
  25. }
  26. };
  27. }
  28. end_namespace_ecs_core_parallelism