legate::mapping::ProcessorRange#

class ProcessorRange#

A class to represent a range of processors.

ProcessorRanges 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
) noexcept#

Creates a processor range.

Parameters:
  • low_id – Starting processor ID

  • high_id – End processor ID

  • per_node_proc_count – Number of per-node processors

Public Members

std::uint32_t low = {0}#

Starting processor ID.

std::uint32_t high = {0}#

End processor ID.

std::uint32_t per_node_count = {1}#

Number of per-node processors.