Skip to content

Commit

Permalink
[enhancement](crc&bitshuffle) use cpu instruction crc by armv8-a+crc …
Browse files Browse the repository at this point in the history
…and thirdparty bshuf_untrans_bit_elem_scal func in arm
  • Loading branch information
丁犇 committed Sep 5, 2023
1 parent a3f1548 commit eae05e4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions be/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,11 @@ if (USE_BTHREAD_SCANNER)
set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -DUSE_BTHREAD_SCANNER")
endif()

if ("${CMAKE_BUILD_TARGET_ARCH}" STREQUAL "aarch64")
message(STATUS "Add armv8-a+crc compile option for aarch64")
set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -march=armv8-a+crc")
endif()

if (ENABLE_STACKTRACE)
add_compile_options(-DENABLE_STACKTRACE)
endif()
Expand Down
6 changes: 6 additions & 0 deletions thirdparty/build-thirdparty.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1056,6 +1056,12 @@ build_bitshuffle() {
cd "${TP_SOURCE_DIR}/${BITSHUFFLE_SOURCE}"
PREFIX="${TP_INSTALL_DIR}"

echo "Before change NEON to scal:"
grep -n "count = bshuf_untrans_bit_elem_NEON\|count = bshuf_untrans_bit_elem_scal" src/bitshuffle_core.c
sed -i 's/count = bshuf_untrans_bit_elem_NEON/count = bshuf_untrans_bit_elem_scal/g' src/bitshuffle_core.c
echo "After change NEON to scal:"
grep -n "count = bshuf_untrans_bit_elem_NEON\|count = bshuf_untrans_bit_elem_scal" src/bitshuffle_core.c

# This library has significant optimizations when built with AVX2/AVX512. However,
# we still need to support non-AVX2-capable hardware. So, we build it three times,
# with the flag AVX2, AVX512 each and once without, and use some linker tricks to
Expand Down

0 comments on commit eae05e4

Please sign in to comment.