diff options
author | Francisco Jerez <[email protected]> | 2013-09-16 21:13:47 -0700 |
---|---|---|
committer | Francisco Jerez <[email protected]> | 2013-10-21 10:47:03 -0700 |
commit | e5fc61fa3f4ef7e00d66003b7f0298f7e20b2cc3 (patch) | |
tree | 68c8a777b0e8ca499306ee76a333e553ef34764e /src/gallium/state_trackers/clover/api/util.hpp | |
parent | 04d0ab9f6456229df1a83b0b1c133e1c458aedd2 (diff) |
clover: Add property list helpers with a syntax consistent with other API objects.
Tested-by: Tom Stellard <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/clover/api/util.hpp')
-rw-r--r-- | src/gallium/state_trackers/clover/api/util.hpp | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/src/gallium/state_trackers/clover/api/util.hpp b/src/gallium/state_trackers/clover/api/util.hpp index c8f786e96a2..88f6548f23f 100644 --- a/src/gallium/state_trackers/clover/api/util.hpp +++ b/src/gallium/state_trackers/clover/api/util.hpp @@ -31,44 +31,6 @@ namespace clover { /// - /// Convert a NULL-terminated property list into an std::map. - /// - template<typename T> - std::map<T, T> - property_map(const T *props) { - std::map<T, T> m; - - while (props && *props) { - T key = *props++; - T value = *props++; - - if (m.count(key)) - throw clover::error(CL_INVALID_PROPERTY); - - m.insert({ key, value }); - } - - return m; - } - - /// - /// Convert an std::map into a NULL-terminated property list. - /// - template<typename T> - std::vector<T> - property_vector(const std::map<T, T> &m) { - std::vector<T> v; - - for (auto &p : m) { - v.push_back(p.first); - v.push_back(p.second); - } - - v.push_back(0); - return v; - } - - /// /// Return an error code in \a p if non-zero. /// inline void |