Partitioner
Generated from engine/collision/partitioner.h at 862e08b. The text under each declaration is the header's own comment, word for word. About the reference says how these pages are made.
#include "engine/collision/partitioner.h" · namespace labrador
class Partitioner
Section titled “class Partitioner”Partitioner
Section titled “Partitioner”partition
Section titled “partition”std::vector<std::pair<int, int>> partition(int num_elements, int num_partitions) const;Splits [0, num_elements) into at most num_partitions contiguous half-open ranges, [first, second), covering every element exactly once. The remainder is spread one element at a time over the leading ranges rather than piled onto the last, so no range is more than one element longer than any other.
Fewer ranges than asked for when there are fewer elements than partitions: an empty range is work for a worker that has none, so num_elements == 0 returns no ranges at all.
Preconditions, checked: num_partitions >= 1 and num_elements >= 0. num_partitions is a divisor on the first line, and it arrives from ApplicationOptions::max_threads by way of ThreadPool, and unchecked anywhere on that route a zero in a config file is an integer divide-by-zero on the first frame of the first match.
partition
Section titled “partition”std::vector<std::pair<int, int>> partition(size_t num_elements, int num_partitions) const;In the samples and tests
Section titled “In the samples and tests”The files that include this header directly. A file can also reach it through another header.
tests/collision/partitioner_tests.cpptests/local_multiplayer/draw_tests.cpptests/scene/fanout_tests.cpp
Development documentation (unreleased). Built from Labrador 862e08b of 2026-10-08.