Files
zooqueen 0f1e1b5143 merge: ClickHouse 26.6.1.1 into datastore — preserve debrand + ZAP + gRPC/gcloud removal
Merge upstream/changelog-26.6 (9593 commits) into our debranded fork.
- 190 conflicts resolved: 24 delete-side kept-removed (grpc/arrowflight/gcloud), submodules+version→26.6,
  contrib/CMakeLists keeps zap + new libpng, drops capnproto (zap provides kj), Server.cpp/CMakeLists
  re-apply the ZAP wiring + gRPC/arrowflight/gcloud removal.
- Full-tree debrand re-swept over the new 26.6 code (uniform Datastore naming; Azure fork Clickhouse*
  symbols preserved). 0 clickhouse in product src/programs/CMakeLists.
- Version now 26.6.1.1. gRPC/google-cloud/chdig stay removed; ZAP remains the transport.
2026-06-23 12:23:48 -07:00

47 lines
1.7 KiB
CMake

if(ARCH_AMD64 OR (ARCH_AARCH64 AND NOT NO_ARMV81_OR_HIGHER))
option(ENABLE_FASTOPS "Enable fast vectorized mathematical functions library by Mikhail Parakhin" ${ENABLE_LIBRARIES})
elseif(ENABLE_FASTOPS)
message (${RECONFIGURE_MESSAGE_LEVEL} "Fastops library is supported on x86_64 and aarch64 (with NEON) only")
endif()
if(NOT ENABLE_FASTOPS)
message(STATUS "Not using fastops")
return()
endif()
set(LIBRARY_DIR "${Datastore_SOURCE_DIR}/contrib/fastops")
set(SRCS
"${LIBRARY_DIR}/fastops/fastops.cpp"
)
if (ARCH_AMD64)
list(APPEND SRCS "${LIBRARY_DIR}/fastops/avx2/ops_avx2.cpp")
endif()
if (ARCH_AMD64 AND X86_ARCH_LEVEL VERSION_LESS 3)
# Below v3: need runtime dispatch with AVX-only and Plain fallbacks.
list(APPEND SRCS
"${LIBRARY_DIR}/fastops/avx/ops_avx.cpp"
"${LIBRARY_DIR}/fastops/plain/ops_plain.cpp"
"${LIBRARY_DIR}/fastops/core/avx_id.cpp"
)
set_source_files_properties("${LIBRARY_DIR}/fastops/avx/ops_avx.cpp" PROPERTIES COMPILE_FLAGS "-mavx -DNO_AVX2")
set_source_files_properties("${LIBRARY_DIR}/fastops/avx2/ops_avx2.cpp" PROPERTIES COMPILE_FLAGS "-mavx2 -mfma -DNO_AVX")
elseif(ARCH_AARCH64)
list(APPEND SRCS "${LIBRARY_DIR}/fastops/neon/ops_neon.cpp")
# SVE requires arm_sve.h which is only available on Linux toolchains (not Darwin/FreeBSD).
if(OS_LINUX)
list(APPEND SRCS "${LIBRARY_DIR}/fastops/sve/ops_sve.cpp")
set_source_files_properties("${LIBRARY_DIR}/fastops/sve/ops_sve.cpp" PROPERTIES COMPILE_FLAGS "-march=armv8-a+sve")
endif()
endif()
add_library(_fastops ${SRCS})
target_include_directories(_fastops SYSTEM PUBLIC "${LIBRARY_DIR}")
add_library(ch_contrib::fastops ALIAS _fastops)