legate::mapping::ProcessorRange#
-
class ProcessorRange#
A class to represent a range of processors.
ProcessorRange
s are half-open intervals of logical processors IDs.Public Functions
-
std::uint32_t count() const noexcept#
Returns the number of processors in the range.
- Returns:
Processor count
-
bool empty() const noexcept#
Checks if the processor range is empty.
- Returns:
true The range is empty
- Returns:
false The range is not empty
-
ProcessorRange slice(std::uint32_t from, std::uint32_t to) const#
Slices the processor range for a given sub-range.
- Parameters:
from – Starting index
to – End index
- Returns:
Sliced processor range
-
NodeRange get_node_range() const#
Computes a range of node IDs for this processor range.
- Returns:
Node range in a pair
-
std::string to_string() const#
Converts the range to a human-readable string.
- Returns:
Processor range in a string
-
constexpr ProcessorRange() = default#
Creates an empty processor range.
- constexpr ProcessorRange(
- std::uint32_t low_id,
- std::uint32_t high_id,
- std::uint32_t per_node_proc_count
Creates a processor range.
- Parameters:
low_id – Starting processor ID
high_id – End processor ID
per_node_proc_count – Number of per-node processors
-
std::uint32_t count() const noexcept#