diff options
author | Francisco Jerez <[email protected]> | 2014-02-18 14:52:25 +0100 |
---|---|---|
committer | Francisco Jerez <[email protected]> | 2014-02-21 12:51:22 +0100 |
commit | d82b39ce382e035b946b3f961c7afd356f55f4f0 (patch) | |
tree | 29c8ce727593ee2ca0af1941eebf61f094d32c45 /src/gallium/state_trackers | |
parent | 1b9fb2fd9129f834f041efe7f96e83998477c78b (diff) |
clover: Allow storing a range into a container of different (but compatible) element type.
Tested-by: Tom Stellard <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers')
-rw-r--r-- | src/gallium/state_trackers/clover/util/range.hpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/gallium/state_trackers/clover/util/range.hpp b/src/gallium/state_trackers/clover/util/range.hpp index afa5f7730bf..b082359ee86 100644 --- a/src/gallium/state_trackers/clover/util/range.hpp +++ b/src/gallium/state_trackers/clover/util/range.hpp @@ -38,25 +38,25 @@ namespace clover { template<typename T, typename V> struct range_store_traits; - template<typename T> - struct range_store_traits<T, std::vector<T>> { + template<typename T, typename S> + struct range_store_traits<T, std::vector<S>> { typedef void enable; template<typename R> - static std::vector<T> + static std::vector<S> create(const R &r) { return { r.begin(), r.end() }; } }; - template<typename T, std::size_t N> - struct range_store_traits<T, std::array<T, N>> { + template<typename T, typename S, std::size_t N> + struct range_store_traits<T, std::array<S, N>> { typedef void enable; template<typename R> - static std::array<T, N> + static std::array<S, N> create(const R &r) { - std::array<T, N> v; + std::array<S, N> v; assert(r.size() == v.size()); copy(r, v.begin()); return v; |