mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 00:22:29 +00:00
Enable dynamic dispatch in SimSIMD
This commit is contained in:
parent
9d0f256dfe
commit
3a042c0804
@ -1,6 +1,8 @@
|
|||||||
# See contrib/usearch-cmake/CMakeLists.txt, why only enabled on x86
|
# See contrib/usearch-cmake/CMakeLists.txt, why only enabled on x86
|
||||||
if (ARCH_AMD64)
|
if (ARCH_AMD64)
|
||||||
set(SIMSIMD_PROJECT_DIR "${ClickHouse_SOURCE_DIR}/contrib/SimSIMD")
|
set(SIMSIMD_PROJECT_DIR "${ClickHouse_SOURCE_DIR}/contrib/SimSIMD")
|
||||||
add_library(_simsimd INTERFACE)
|
set(SIMSIMD_SRCS ${SIMSIMD_PROJECT_DIR}/c/lib.c)
|
||||||
target_include_directories(_simsimd SYSTEM INTERFACE "${SIMSIMD_PROJECT_DIR}/include")
|
add_library(_simsimd ${SIMSIMD_SRCS})
|
||||||
|
target_include_directories(_simsimd SYSTEM PUBLIC "${SIMSIMD_PROJECT_DIR}/include")
|
||||||
|
target_compile_definitions(_simsimd PUBLIC SIMSIMD_DYNAMIC_DISPATCH)
|
||||||
endif()
|
endif()
|
||||||
|
@ -118,6 +118,8 @@ USearchIndexWithSerialization::USearchIndexWithSerialization(
|
|||||||
if (!result)
|
if (!result)
|
||||||
throw Exception(ErrorCodes::INCORRECT_DATA, "Could not create vector similarity index. Error: {}", String(result.error.release()));
|
throw Exception(ErrorCodes::INCORRECT_DATA, "Could not create vector similarity index. Error: {}", String(result.error.release()));
|
||||||
swap(result.index);
|
swap(result.index);
|
||||||
|
|
||||||
|
/// LOG_TRACE(getLogger("XXX"), "{}", simsimd_uses_dynamic_dispatch());
|
||||||
}
|
}
|
||||||
|
|
||||||
void USearchIndexWithSerialization::serialize(WriteBuffer & ostr) const
|
void USearchIndexWithSerialization::serialize(WriteBuffer & ostr) const
|
||||||
|
Loading…
Reference in New Issue
Block a user