Skip to content

Commit

Permalink
updated everything
Browse files Browse the repository at this point in the history
  • Loading branch information
floyd committed Mar 10, 2024
1 parent 27f4e2d commit 9bb2585
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 14 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ build/
compile_commands.json
.vimspector.json
main.h
config.h

# Created by .ignore support plugin (hsz.mobi)
### C++ template
Expand Down
14 changes: 7 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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()
Expand All @@ -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)
Expand Down
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
========================================

Expand Down
2 changes: 1 addition & 1 deletion shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@ stdenv.mkDerivation {
pprof
valgrind
massif-visualizer
cudatoolkit
#TODO cudatoolkit
]));
}
11 changes: 5 additions & 6 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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)
Expand All @@ -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)

0 comments on commit 9bb2585

Please sign in to comment.