diff options
author | Francisco Jerez <[email protected]> | 2013-11-12 11:14:20 -0800 |
---|---|---|
committer | Francisco Jerez <[email protected]> | 2013-11-12 11:52:47 -0800 |
commit | 99d447cc5dafa3a36b970068961989cced62e3b6 (patch) | |
tree | 49f1a96a0b43ae68a7e856392d996a70f9e8aa10 /src/gallium | |
parent | 50f19e3a668b1b589bf00613d33c7c7c4e6a4954 (diff) |
clover: Fix the const variant of adaptor_range::end to deal with mismatching range sizes.
Fixes infinite loop in find_grid_optimal_factor() in cases where the
user specifies a grid size with less dimensions than the device
supports.
Reported-by: Tom Stellard <[email protected]>
Cc: "10.0" <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/state_trackers/clover/util/range.hpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/state_trackers/clover/util/range.hpp b/src/gallium/state_trackers/clover/util/range.hpp index cefa5b5ad17..afa5f7730bf 100644 --- a/src/gallium/state_trackers/clover/util/range.hpp +++ b/src/gallium/state_trackers/clover/util/range.hpp @@ -269,7 +269,8 @@ namespace clover { typename super::const_iterator end() const { - return { f, tuple::map(ends(), os) }; + return { f, tuple::map(advances_by(size()), + tuple::map(begins(), os)) }; } typename super::size_type |