changed the opencl edge function for better performance, still some work to do with the clBuildProgram