Previous Main to evaluate the Hadamard product |
Parent Optimisation of Hadamard product |
Outline | Next Get the performances |
Let's write the CMakeLists.txt file.
So, we will compile the same code (main.cpp) several times to compare the different execution performances :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
project(HadamardProduct) cmake_minimum_required(VERSION 3.0) add_executable(hadamard_product_O0 main.cpp) set_property(TARGET hadamard_product_O0 PROPERTY COMPILE_FLAGS "-O0") target_link_libraries(hadamard_product_O0 asterics_hpc) runExample(hadamard_product_O0) add_executable(hadamard_product_O1 main.cpp) set_property(TARGET hadamard_product_O1 PROPERTY COMPILE_FLAGS "-O1") target_link_libraries(hadamard_product_O1 asterics_hpc) runExample(hadamard_product_O1) add_executable(hadamard_product_O2 main.cpp) set_property(TARGET hadamard_product_O2 PROPERTY COMPILE_FLAGS "-O2") target_link_libraries(hadamard_product_O2 asterics_hpc) runExample(hadamard_product_O2) add_executable(hadamard_product_O3 main.cpp) set_property(TARGET hadamard_product_O3 PROPERTY COMPILE_FLAGS "-O3") target_link_libraries(hadamard_product_O3 asterics_hpc) runExample(hadamard_product_O3) add_executable(hadamard_product_Ofast main.cpp) set_property(TARGET hadamard_product_Ofast PROPERTY COMPILE_FLAGS "-Ofast") target_link_libraries(hadamard_product_Ofast asterics_hpc) runExample(hadamard_product_Ofast) |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
project(HadamardProduct) cmake_minimum_required(VERSION 3.0) add_executable(hadamard_product_O0 main.cpp) set_property(TARGET hadamard_product_O0 PROPERTY COMPILE_FLAGS "-O0") target_link_libraries(hadamard_product_O0 asterics_hpc) runExample(hadamard_product_O0) add_executable(hadamard_product_O1 main.cpp) set_property(TARGET hadamard_product_O1 PROPERTY COMPILE_FLAGS "-O1") target_link_libraries(hadamard_product_O1 asterics_hpc) runExample(hadamard_product_O1) add_executable(hadamard_product_O2 main.cpp) set_property(TARGET hadamard_product_O2 PROPERTY COMPILE_FLAGS "-O2") target_link_libraries(hadamard_product_O2 asterics_hpc) runExample(hadamard_product_O2) add_executable(hadamard_product_O3 main.cpp) set_property(TARGET hadamard_product_O3 PROPERTY COMPILE_FLAGS "-O3") target_link_libraries(hadamard_product_O3 asterics_hpc) runExample(hadamard_product_O3) add_executable(hadamard_product_Ofast main.cpp) set_property(TARGET hadamard_product_Ofast PROPERTY COMPILE_FLAGS "-Ofast") target_link_libraries(hadamard_product_Ofast asterics_hpc) runExample(hadamard_product_Ofast) plotPerf("hadamardBase" hadamard_product_O0 hadamard_product_O1 hadamard_product_O2 hadamard_product_O3 hadamard_product_Ofast) |
Previous Main to evaluate the Hadamard product |
Parent Optimisation of Hadamard product |
Outline | Next Get the performances |