File tree Expand file tree Collapse file tree 4 files changed +34
-5
lines changed Expand file tree Collapse file tree 4 files changed +34
-5
lines changed Original file line number Diff line number Diff line change @@ -381,6 +381,23 @@ typedef enum {
381381 ECSACT_SYS_NOTIFY_ONREMOVE,
382382} ecsact_system_notify_setting;
383383
384+ typedef enum ecsact_parallel_execution {
385+ /* *
386+ * Let implementation decide parallel execution.
387+ */
388+ ECSACT_PAR_EXEC_AUTO = 0 ,
389+
390+ /* *
391+ * Hint to implementation that parallel execution is preferred.
392+ */
393+ ECSACT_PAR_EXEC_PREFERRED = 1 ,
394+
395+ /* *
396+ * Disallow implementation to use parallel execution.
397+ */
398+ ECSACT_PAR_EXEC_DENY = 2 ,
399+ } ecsact_parallel_execution;
400+
384401/* *
385402 * Flags for generates component set
386403 */
Original file line number Diff line number Diff line change @@ -474,13 +474,13 @@ ECSACT_DYNAMIC_API_FN(void, ecsact_set_entity_execution_status)
474474);
475475
476476/**
477- * Set a _hint_ that the system may process entities in parallel. This is
478- * only a _hint_. The runtime implementation may choose to not run in parallel.
477+ * Sets the systems parallel execution setting.
478+ * @SEE: ecsact_parallel_execution
479479 */
480480ECSACT_DYNAMIC_API_FN (void , ecsact_set_system_parallel_execution )
481481( //
482- ecsact_system_like_id system_like_id ,
483- bool parallel_execution
482+ ecsact_system_like_id system_like_id ,
483+ ecsact_parallel_execution parallel_execution
484484);
485485
486486/**
Original file line number Diff line number Diff line change @@ -477,7 +477,10 @@ ECSACT_META_API_FN(int32_t, ecsact_meta_get_lazy_iteration_rate)
477477 * Check if a system/action can run on multiple entities in parallel. This is
478478 * only a _hint_. The runtime implementation may choose to not run in parallel.
479479 */
480- ECSACT_META_API_FN (bool , ecsact_meta_get_system_parallel_execution )
480+ ECSACT_META_API_FN (
481+ ecsact_parallel_execution ,
482+ ecsact_meta_get_system_parallel_execution
483+ )
481484( //
482485 ecsact_system_like_id system_like_id
483486);
Original file line number Diff line number Diff line change @@ -641,4 +641,13 @@ ECSACT_ALWAYS_INLINE auto main_package() -> std::optional<ecsact_package_id> {
641641 return main_pkg_id;
642642}
643643
644+ template <typename SystemLikeID>
645+ ECSACT_ALWAYS_INLINE auto get_system_parallel_execution ( //
646+ SystemLikeID id
647+ ) -> ecsact_parallel_execution {
648+ return ecsact_meta_get_system_parallel_execution (
649+ ecsact_id_cast<ecsact_system_like_id>(id)
650+ );
651+ }
652+
644653} // namespace ecsact::meta
You can’t perform that action at this time.
0 commit comments