Optimize the integral size

OCL needs to transfer buffer, so the size need to be minimum.This patch will save much time.