Increase thread granule for var\avg SAT gen
@@ -535,15 +535,16 @@ void compute_averages_and_variances(
while (true)
{
unsigned int count;
- unsigned int base = ctx.manage_avg_var.get_task_assignment(1, count);
+ unsigned int base = ctx.manage_avg_var.get_task_assignment(16, count);
if (!count)
{
break;
}
- assert(count == 1);
- int z = (base / (y_tasks)) * step_z;
- int y = (base - (z * y_tasks)) * step_xy;
+ for (unsigned int i = base; i < base + count; i++)
+ {
+ int z = (i / (y_tasks)) * step_z;
+ int y = (i - (z * y_tasks)) * step_xy;
arg.size_z = astc::min(step_z, size_z - z);
arg.offset_z = z;
@@ -557,6 +558,7 @@ void compute_averages_and_variances(
arg.offset_x = x;
compute_pixel_region_variance(ctx, &arg);
}
+ }
ctx.manage_avg_var.complete_task_assignment(count);
}
