OCL: rewrote and generalized ocl::threshold