diff options
| author | Tauwni <102470988+Tauwni@users.noreply.github.com> | 2026-11-26 12:19:12 +0100 |
|---|---|---|
| committer | Tauwni <102470988+Tauwni@users.noreply.github.com> | 2026-11-26 12:19:12 +0100 |
| commit | beffaa9a476ca1b3dfd9cfa55e39eafbb1f5eec6 (patch) | |
| tree | 32877805bf4eb46d9a89d5753db6b5a2b06dc845 /runtime/src/buffer_va_index.h | |
| parent | f29ca7bacae9507f83e8c56abdb604bd4efb4cf1 (diff) | |
| parent | a73a57e1339be072baf5522351c8ec7f1482b56b (diff) | |
Merge main into fix/null-descriptor-generated-dir
Diffstat (limited to 'runtime/src/buffer_va_index.h')
| -rw-r--r-- | runtime/src/buffer_va_index.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/runtime/src/buffer_va_index.h b/runtime/src/buffer_va_index.h index 6fbba5b05..3ab8edf82 100644 --- a/runtime/src/buffer_va_index.h +++ b/runtime/src/buffer_va_index.h | |||
| @@ -91,6 +91,11 @@ public: | |||
| 91 | 91 | ||
| 92 | std::size_t size() const { return ranges_.size(); } | 92 | std::size_t size() const { return ranges_.size(); } |
| 93 | std::uint64_t longest() const { return longest_; } | 93 | std::uint64_t longest() const { return longest_; } |
| 94 | // f(first VA, bytes) for every range, in VA order. | ||
| 95 | template <class F> | ||
| 96 | void for_each(F&& f) const { | ||
| 97 | for (const auto& [key, bytes] : ranges_) f(key.first, bytes); | ||
| 98 | } | ||
| 94 | 99 | ||
| 95 | private: | 100 | private: |
| 96 | static constexpr Id max_id() { return ~Id(0); } | 101 | static constexpr Id max_id() { return ~Id(0); } |