this is what I do. Besides, we should take care of the case when localsize is NULL (which will be often situation in the new code). In this case globalize should also be made divisible by 16 or so, so that OpenCL runtime could choose the proper localsize, not {1,1}.