-
-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from danielealbano/refactor_hashtable_use_line…
…ar_probing Refactor hashtable use linear probing
- Loading branch information
Showing
58 changed files
with
2,243 additions
and
1,149 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
.idea | ||
cmake-build-*/* | ||
|
||
/src/cmake_config.c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,37 @@ | ||
# Build t1ha2 | ||
add_library( | ||
t1ha2 | ||
t1ha/src/t1ha2.c | ||
) | ||
file(GLOB SRC_FILES_T1HA "t1ha/src/*.c") | ||
list(FILTER SRC_FILES_T1HA EXCLUDE REGEX ".*t1ha0_ia32aes_[a-z0-9]+\\.c$") | ||
|
||
if(ARCH_IS_X86_64) | ||
message(STATUS "Enabling accelerated t1ha0 -- aes-ni + avx2") | ||
list(APPEND SRC_FILES_T1HA "${CMAKE_CURRENT_SOURCE_DIR}/t1ha/src/t1ha0_ia32aes_avx2.c") | ||
set_source_files_properties( | ||
"t1ha/src/t1ha0_ia32aes_avx2.c" | ||
PROPERTIES COMPILE_FLAGS | ||
"-mno-avx256-split-unaligned-load -mavx2 -mbmi -maes") | ||
|
||
target_include_directories( | ||
t1ha2 | ||
PUBLIC | ||
t1ha/ | ||
t1ha/src | ||
) | ||
message(STATUS "Enabling accelerated t1ha0 -- aes-ni + avx") | ||
list(APPEND SRC_FILES_T1HA "${CMAKE_CURRENT_SOURCE_DIR}/t1ha/src/t1ha0_ia32aes_avx.c") | ||
set_source_files_properties( | ||
"t1ha/src/t1ha0_ia32aes_avx.c" | ||
PROPERTIES COMPILE_FLAGS | ||
"-mno-avx256-split-unaligned-load -mno-avx2 -mavx -mbmi -maes") | ||
|
||
target_compile_options( | ||
t1ha2 | ||
PUBLIC | ||
-ffunction-sections -std=c99 -O3 -DNDEBUG -D_DEFAULT_SOURCE -fno-stack-protector -mtune=native -fvisibility=hidden -Dt1ha_EXPORTS | ||
) | ||
message(STATUS "Enabling accelerated t1ha0 -- aes-ni w/o avx w/o avx2") | ||
list(APPEND SRC_FILES_T1HA "${CMAKE_CURRENT_SOURCE_DIR}/t1ha/src/t1ha0_ia32aes_noavx.c") | ||
set_source_files_properties( | ||
"t1ha/src/t1ha0_ia32aes_noavx.c" | ||
PROPERTIES COMPILE_FLAGS | ||
"-mno-avx256-split-unaligned-load -mno-avx2 -mno-avx -maes") | ||
elseif(ARCH_IS_AARCH64) | ||
# TODO | ||
else() | ||
message(FATAL_ERROR "Unsupported architecture") | ||
endif() | ||
|
||
add_library( | ||
t1ha | ||
${SRC_FILES_T1HA} | ||
) | ||
target_compile_definitions(t1ha PUBLIC -DT1HA0_RUNTIME_SELECT=1 -DT1HA_USE_INDIRECT_FUNCTIONS=1) | ||
target_compile_options(t1ha PUBLIC -ffunction-sections -std=c99 -O3 -mtune=native -DNDEBUG -D_DEFAULT_SOURCE -fno-stack-protector -fvisibility=hidden -Dt1ha_EXPORTS) | ||
target_include_directories(t1ha PUBLIC t1ha/ t1ha/src) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,16 @@ | ||
cmake_minimum_required(VERSION 3.13) | ||
project(cachegrand LANGUAGES C CXX) | ||
|
||
set(CMAKE_C_STANDARD 11) | ||
set(CMAKE_CXX_STANDARD 11) | ||
|
||
if (NOT CMAKE_BUILD_TYPE MATCHES Debug) | ||
add_definitions(-DNDEBUG) | ||
else() | ||
add_definitions(-DDEBUG) | ||
endif() | ||
|
||
message("-- Check if ccache is available") | ||
find_program(CCACHE_FOUND_PATH ccache) | ||
if(CCACHE_FOUND_PATH) | ||
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ${CCACHE_FOUND_PATH}) | ||
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ${CCACHE_FOUND_PATH}) | ||
message(" Found, cache dir set to ($ENV{CCACHE_DIR})") | ||
endif(CCACHE_FOUND_PATH) | ||
include(tools/cmake/config.cmake) | ||
|
||
add_subdirectory(3rdparty) | ||
add_subdirectory(src) | ||
|
||
if (BUILD_TESTS) | ||
if (CACHEGRAND_BUILD_TESTS) | ||
enable_testing() | ||
add_subdirectory(tests) | ||
endif() | ||
|
||
if (BUILD_BENCHES) | ||
if (CACHEGRAND_BUILD_BENCHES) | ||
add_subdirectory(benches) | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.