From 401118f1b6146cd1b191771fb65016e000cad58e Mon Sep 17 00:00:00 2001 From: "xissburg@xissburg.com" Date: Sun, 8 Dec 2024 11:21:10 -0500 Subject: [PATCH] Use explicit types. --- src/edyn/context/task.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/edyn/context/task.cpp b/src/edyn/context/task.cpp index efea61da..2cfe6217 100644 --- a/src/edyn/context/task.cpp +++ b/src/edyn/context/task.cpp @@ -160,8 +160,8 @@ void enqueue_task_default(task_delegate_t task, unsigned size, task_completion_d auto num_workers = dispatcher.num_workers(); // Size of chunk that will be processed per job iteration. - auto count_per_worker_ceil = size / num_workers + (size % num_workers != 0); - auto chunk_size = std::max(count_per_worker_ceil, 1ul); + unsigned count_per_worker_ceil = size / num_workers + (size % num_workers != 0); + auto chunk_size = std::max(count_per_worker_ceil, 1u); // Number of jobs that will be dispatched. Must not be greater than number // of workers. @@ -186,9 +186,9 @@ void enqueue_task_default(task_delegate_t task, unsigned size, task_completion_d void enqueue_task_wait_default(task_delegate_t task, unsigned size) { auto &dispatcher = job_dispatcher::global(); - auto num_workers = dispatcher.num_workers(); - auto chunk_size = std::max(size / (num_workers + 1), 1ul); - auto num_jobs = std::min(num_workers, size - 1ul); + unsigned num_workers = dispatcher.num_workers(); + unsigned chunk_size = std::max(size / (num_workers + 1), 1u); + unsigned num_jobs = std::min(num_workers, size - 1u); auto context = parallel_for_context{0u, size, 1u, chunk_size, num_jobs, task}; auto child_job = job();