diff options
-rw-r--r-- | src/gallium/state_trackers/clover/util/functional.hpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/clover/util/functional.hpp b/src/gallium/state_trackers/clover/util/functional.hpp index 98bbdff4bd1..fc281c5c79a 100644 --- a/src/gallium/state_trackers/clover/util/functional.hpp +++ b/src/gallium/state_trackers/clover/util/functional.hpp @@ -347,6 +347,21 @@ namespace clover { const std::string &name; }; + class id_equals { + public: + id_equals(const uint32_t id) : id(id) { + } + + template<typename T> + bool + operator()(const T &x) const { + return x.id == id; + } + + private: + const uint32_t id; + }; + template<typename T> class key_equals_t { public: |