OpenCL, CUDA: Options for scalars are now set composed in a common implementation.

The repetitive bit-shifting has now been moved to a single implementation for CUDA and one for OpenCL.
Also, minor CUDA warnings fixed along the way.