Updated kernel.cpp to use CPU only