avoid out-of-bounds issue for some OpenCL kernel, hanging Mac OSX (should not happen, need to check why)
split kernel for debugging