aboutsummaryrefslogtreecommitdiff
path: root/src/core/CL/DefaultLWSHeuristics.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/CL/DefaultLWSHeuristics.cpp')
-rw-r--r--src/core/CL/DefaultLWSHeuristics.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/core/CL/DefaultLWSHeuristics.cpp b/src/core/CL/DefaultLWSHeuristics.cpp
index c739b9dc03..a53fdbbab6 100644
--- a/src/core/CL/DefaultLWSHeuristics.cpp
+++ b/src/core/CL/DefaultLWSHeuristics.cpp
@@ -61,7 +61,14 @@ cl::NDRange get_direct_lws(size_t gws_x, size_t gws_y, size_t gws_z)
if(gws_x < gws_y)
{
- return cl::NDRange(4, 16, 1);
+ if(gws_x < 4)
+ {
+ return cl::NDRange(std::min(gws_x, static_cast<size_t>(2u)), 32, 1);
+ }
+ else
+ {
+ return cl::NDRange(std::min(gws_x, static_cast<size_t>(4u)), 8, 1);
+ }
}
else
{