diff options
author | Francisco Jerez <[email protected]> | 2013-11-12 11:14:20 -0800 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2013-11-15 13:39:38 -0800 |
commit | c702f5eeade9c1cb2417c4b546407bb101d35d2d (patch) | |
tree | 515e7afecf2c9c5808b52a60e56968e0fb006ef7 /src/gallium | |
parent | c4cc166abc038fc7ac4b4c1514fa462f0bfb1d26 (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]>
(cherry picked from commit 99d447cc5dafa3a36b970068961989cced62e3b6)
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 |