Dev

Based on Manuel's request, I created a clean pull request that only includes cpu kernel optimization and some necessary changes in CMakeLists.txt. Please review it.

Thanks

Sheng