Compile structure

Cmake structure to compile the code
Fast algorithm