3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2026-02-14 21:01:50 +00:00

Add unit-tests for ParallelDispatchThread and friends

This commit is contained in:
Robert O'Callahan 2026-02-02 23:04:34 +00:00
parent a1aa9ab4aa
commit f34c6fec19
3 changed files with 169 additions and 2 deletions

View file

@ -172,6 +172,9 @@ struct IntRange {
};
Int begin() const { return {start_}; }
Int end() const { return {end_}; }
bool operator==(const IntRange &other) const { return start_ == other.start_ && end_ == other.end_; }
bool operator!=(const IntRange &other) const { return !(*this == other); }
};
// Divides some number of items into `num_threads` subranges and returns the
// `thread_num`'th subrange. If `num_threads` is zero, returns the whole range.