diff --git a/Core/Simulation/ISimulation.cpp b/Core/Simulation/ISimulation.cpp index dc8dad4ee5e4faedf8e7c9e7ec67249d0765c53e..f0ed66e8fb511c1627e3701cbecf5e76e6464de2 100644 --- a/Core/Simulation/ISimulation.cpp +++ b/Core/Simulation/ISimulation.cpp @@ -27,7 +27,7 @@ namespace { -size_t getIndexStep(size_t total_size, size_t n_handlers) +size_t indexStep(size_t total_size, size_t n_handlers) { ASSERT(total_size > 0); ASSERT(n_handlers > 0); @@ -35,9 +35,9 @@ size_t getIndexStep(size_t total_size, size_t n_handlers) return total_size % n_handlers ? ++result : result; } -size_t getStartIndex(size_t n_handlers, size_t current_handler, size_t n_elements) +size_t startIndex(size_t n_handlers, size_t current_handler, size_t n_elements) { - const size_t handler_size = getIndexStep(n_elements, n_handlers); + const size_t handler_size = indexStep(n_elements, n_handlers); const size_t start_index = current_handler * handler_size; if (start_index >= n_elements) return n_elements; @@ -46,7 +46,7 @@ size_t getStartIndex(size_t n_handlers, size_t current_handler, size_t n_element size_t batchSize(size_t n_handlers, size_t current_handler, size_t n_elements) { - const size_t handler_size = getIndexStep(n_elements, n_handlers); + const size_t handler_size = indexStep(n_elements, n_handlers); const size_t start_index = current_handler * handler_size; if (start_index >= n_elements) return 0; @@ -172,7 +172,7 @@ void ISimulation::runSimulation() const size_t n_batches = m_options.getNumberOfBatches(); const size_t current_batch = m_options.getCurrentBatch(); - const size_t batch_start = getStartIndex(n_batches, current_batch, total_size); + const size_t batch_start = startIndex(n_batches, current_batch, total_size); const size_t batch_size = batchSize(n_batches, current_batch, total_size); if (batch_size == 0) return; @@ -299,7 +299,7 @@ void ISimulation::runSingleSimulation(const ProcessedSample& re_sample, size_t b for (size_t i_thread = 0; i_thread < n_threads; ++i_thread) { - const size_t thread_start = batch_start + getStartIndex(n_threads, i_thread, batch_size); + const size_t thread_start = batch_start + startIndex(n_threads, i_thread, batch_size); const size_t thread_size = batchSize(n_threads, i_thread, batch_size); if (thread_size == 0) break;