OpenCL seems to work fine here, and for some reason that comparison was giving compilation error on OpenCL here. Better to compile OpenCL kernel than to be fully robust to weird corner cases.