From: Nathan Binkert Date: Fri, 10 Oct 2008 05:19:38 +0000 (-0700) Subject: range_map: Add a method to find which range a single value falls into. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4ecc5d53a302c5e494df5853a314a61e8bba3a50;p=gem5.git range_map: Add a method to find which range a single value falls into. --- diff --git a/src/base/range_map.hh b/src/base/range_map.hh index 1c121925d..0ffc28ed9 100644 --- a/src/base/range_map.hh +++ b/src/base/range_map.hh @@ -69,6 +69,13 @@ class range_map return tree.end(); } + template + const iterator + find(const U &r) + { + return find(RangeSize(r, 1)); + } + template bool intersect(const Range &r)