Commit 307c2024 authored by Paul's avatar Paul
Browse files

Dont set global as multiple of local

parent 864e1b8d
...@@ -138,7 +138,7 @@ compute_global_for(context& ctx, std::size_t n, std::size_t over) ...@@ -138,7 +138,7 @@ compute_global_for(context& ctx, std::size_t n, std::size_t over)
std::size_t groups = (n + local - 1) / local; std::size_t groups = (n + local - 1) / local;
std::size_t max_blocks = max_global / local; std::size_t max_blocks = max_global / local;
std::size_t nglobal = std::min(max_blocks * over, groups) * local; std::size_t nglobal = std::min(max_blocks * over, groups) * local;
return nglobal; return std::min(nglobal, n);
}; };
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment