Writing least squares for OpenCL