Implemented a second algorithm for the CPU. This algorithm matches the
OpenCL implementation.
Adding missing OpenMP pragma.