Fixed problem with compilation without HAVE_OPENCL

When compiling without OpenCL, some classes from its namespace are still used in code.
Fixed trailing whitespace
Merge pull request #2556 from DeanF:master