mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 06:09:01 +00:00
Fix for out of bounds access (#2105)
Rounding up the clusters_results size to avoid out of bounds access when subgroup_size is not a multiple of cluster_size.
This commit is contained in:
@@ -103,7 +103,8 @@ template <typename Ty, ArithmeticOp operation> struct RED_CLU
|
||||
int ii = j * ns;
|
||||
int n = ii + ns > nw ? nw - ii : ns;
|
||||
std::vector<Ty> clusters_results;
|
||||
int clusters_counter = ns / test_params.cluster_size;
|
||||
int clusters_counter = (ns + test_params.cluster_size - 1)
|
||||
/ test_params.cluster_size;
|
||||
clusters_results.resize(clusters_counter);
|
||||
|
||||
// Compute target
|
||||
|
||||
Reference in New Issue
Block a user