summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Binkert <nate@binkert.org>2008-10-09 22:19:38 -0700
committerNathan Binkert <nate@binkert.org>2008-10-09 22:19:38 -0700
commit4ecc5d53a302c5e494df5853a314a61e8bba3a50 (patch)
tree772a89802ae8b078600ad13a8acad3be97837082
parent6ccf28c896f358d18cd942ab0f8d24fde96e153e (diff)
downloadgem5-4ecc5d53a302c5e494df5853a314a61e8bba3a50.tar.xz
range_map: Add a method to find which range a single value falls into.
-rw-r--r--src/base/range_map.hh7
1 files changed, 7 insertions, 0 deletions
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
@@ -70,6 +70,13 @@ class range_map
}
template <class U>
+ const iterator
+ find(const U &r)
+ {
+ return find(RangeSize(r, 1));
+ }
+
+ template <class U>
bool
intersect(const Range<U> &r)
{