From 9bb2585948ae0a8b57382f3d59dc43fba65d4bb7 Mon Sep 17 00:00:00 2001 From: floyd Date: Sun, 10 Mar 2024 19:29:01 +0100 Subject: [PATCH] updated everything --- .gitignore | 1 + CMakeLists.txt | 14 +++++++------- README.md | 13 +++++++++++++ shell.nix | 2 +- tests/CMakeLists.txt | 11 +++++------ 5 files changed, 27 insertions(+), 14 deletions(-) diff --git a/.gitignore b/.gitignore index 2165619..fdb8521 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,7 @@ build/ compile_commands.json .vimspector.json main.h +config.h # Created by .ignore support plugin (hsz.mobi) ### C++ template diff --git a/CMakeLists.txt b/CMakeLists.txt index dd8527f..fb5443d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -48,7 +48,7 @@ ExternalProject_Add(cryptanalysislib_project ) -include("deps/cmake_optimize_for_architecture/HostOptimizations.cmake") +include("deps/cryptanalysislib/deps/cmake_optimize_for_architecture/HostOptimizations.cmake") check_cxx_compiler_flag(-march=native COMPILER_SUPPORTS_MARCH_NATIVE) check_cxx_compiler_flag(-fno-inline COMPILER_SUPPORTS_NO_INLINE) @@ -252,9 +252,10 @@ link_directories("deps/cryptanalysislib/build") link_directories("deps/cryptanalysislib/deps/m4ri/.libs") link_directories("/usr/local/lib") -if (benchmark_FOUND) - add_subdirectory(bench) -endif() +#TODO +# if (benchmark_FOUND) +# add_subdirectory(bench) +# endif() if (GTest_FOUND) add_subdirectory(tests) endif() @@ -272,10 +273,9 @@ add_custom_target ( # add the main target running our main algorithm -add_executable(main main.cpp) -target_link_libraries(main ${LINK_TEST_FLAGS}) +#TODO add_executable(main main.cpp) +# target_link_libraries(main ${LINK_TEST_FLAGS}) -set(USE_PROFILE "0") if(USE_PROFILE) add_executable(main_analysis1 main.cpp) target_link_libraries(main_analysis1 ${LINK_TEST_FLAGS} -fprofile-instr-generate=code.profraw) diff --git a/README.md b/README.md index b734ccd..2c521ad 100644 --- a/README.md +++ b/README.md @@ -80,6 +80,19 @@ or just run: pip install -r requirements.txt ``` +Build: +======= + +```bash +git clone --recurse-submodules https://github.com/FloydZ/decoding +mkdir build +cd build +cmake ../ +make -j8 +``` + + + Reproduction of Results EC'22 and EC'23: ======================================== diff --git a/shell.nix b/shell.nix index 8d8716f..564ca50 100644 --- a/shell.nix +++ b/shell.nix @@ -33,6 +33,6 @@ stdenv.mkDerivation { pprof valgrind massif-visualizer - cudatoolkit + #TODO cudatoolkit ])); } diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 2e23b8f..164dfb0 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,11 +1,10 @@ -#TESTS Flags file(GLOB TEST_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp) foreach(testfile ${TEST_SOURCES}) file(RELATIVE_PATH filename ${CMAKE_CURRENT_SOURCE_DIR} ${testfile}) string(REPLACE ".cpp" "" file ${filename}) add_executable(${file} ${testfile}) - target_link_libraries(${file} ${LINK_TEST_FLAGS}) - add_test(AllTests ${file}) + target_link_libraries(${file} ${LINK_TEST_FLAGS}) + add_test(AllTests ${file}) endforeach(testfile ${TEST_SOURCES}) if(USE_CUDA) @@ -16,9 +15,9 @@ if(USE_CUDA) endif() -#TODO add_subdirectory(decoding) -add_subdirectory(mceliece) +# TODO add_subdirectory(decoding) +#add_subdirectory(mceliece) # TODO not implemented add_subdirectory(quasicyclic) -#TODO add_subdirectory(lowweight) +# TODO add_subdirectory(lowweight) # TODO currently not implemented add_subdirectory(ternary) # TODO add_subdirectory(fq)