Skip to content

Commit

Permalink
snappy intrinsics
Browse files Browse the repository at this point in the history
  • Loading branch information
lnkuiper committed Sep 13, 2024
1 parent 9af117f commit fc1cb80
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,7 @@ if(NOT MSVC)
set(CMAKE_CXX_FLAGS_DEBUG
"${CMAKE_CXX_FLAGS_DEBUG} -g -O0 -DDEBUG -Wall ${M32_FLAG} ${CXX_EXTRA}")
set(CMAKE_CXX_FLAGS_RELEASE
"${CMAKE_CXX_FLAGS_RELEASE} -O3 -DNDEBUG ${M32_FLAG} ${CXX_EXTRA}")
"${CMAKE_CXX_FLAGS_RELEASE} -O3 -msse3 -DNDEBUG ${M32_FLAG} ${CXX_EXTRA}")
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND CMAKE_LTO)
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -flto=${CMAKE_LTO}")
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_LTO)
Expand Down
8 changes: 8 additions & 0 deletions third_party/snappy/snappy-stubs-internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,14 @@
#define HAVE_BUILTIN_PREFETCH 1
#endif

#if defined(__aarch64__) || defined(__ARM_ARCH)
#define SNAPPY_HAVE_NEON 1
#define SNAPPY_HAVE_NEON_CRC32 1
#else
#define SNAPPY_HAVE_SSSE3 1
#define SNAPPY_HAVE_X86_CRC32 1
#define SNAPPY_HAVE_BMI2 1
#endif

#if HAVE_SYS_MMAN_H
#include <sys/mman.h>
Expand Down

0 comments on commit fc1cb80

Please sign in to comment.