diff options
author | Nathan Binkert <nate@binkert.org> | 2008-10-09 22:19:38 -0700 |
---|---|---|
committer | Nathan Binkert <nate@binkert.org> | 2008-10-09 22:19:38 -0700 |
commit | 4ecc5d53a302c5e494df5853a314a61e8bba3a50 (patch) | |
tree | 772a89802ae8b078600ad13a8acad3be97837082 /src | |
parent | 6ccf28c896f358d18cd942ab0f8d24fde96e153e (diff) | |
download | gem5-4ecc5d53a302c5e494df5853a314a61e8bba3a50.tar.xz |
range_map: Add a method to find which range a single value falls into.
Diffstat (limited to 'src')
-rw-r--r-- | src/base/range_map.hh | 7 |
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) { |