I've realized that sometimes clEnqueueNDRangeKernel returns CL_OUT_OF_RESOURCES.
I've a kernel with a lot of operations in double loops. If the loops have small limits all runs ok, but if I change the limits to others biggers it returns CL_OUT_OF_RESOURCES.

Anyone know the reason? Is it possible a time out relationship?
Any help will be sincerely appreciated.