[numkong] Update to 7.8.0 (#53425)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
xiaozhuai 2026-08-15 15:00:24 +08:00 committed by GitHub
parent 215b7b00cc
commit e55144c5a4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 36 additions and 9 deletions

View File

@ -1,8 +1,8 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b7c15176..24bfe6c3 100644
index 327b2ec..98a3f37 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -290,7 +290,7 @@ if (MSVC)
@@ -302,7 +302,7 @@ if (MSVC)
endif ()
# Enable Clang C modules for incremental compilation
@ -11,7 +11,7 @@ index b7c15176..24bfe6c3 100644
target_compile_options(
numkong INTERFACE $<$<COMPILE_LANGUAGE:C>:-fmodules> $<$<COMPILE_LANGUAGE:C>:-fimplicit-module-maps>
$<$<COMPILE_LANGUAGE:C>:-fmodules-cache-path=${CMAKE_BINARY_DIR}/module-cache>
@@ -625,7 +625,7 @@ if (NK_BUILD_SHARED)
@@ -647,7 +647,7 @@ if (NK_BUILD_SHARED)
)
add_executable(nk_shared ${NK_SOURCES} "${CMAKE_BINARY_DIR}/emscripten_stub.c")
@ -20,7 +20,7 @@ index b7c15176..24bfe6c3 100644
if (NK_WASM64_)
set_target_properties(
@@ -677,7 +677,7 @@ if (NK_BUILD_SHARED)
@@ -699,7 +699,7 @@ if (NK_BUILD_SHARED)
set_target_properties(nk_shared PROPERTIES ENABLE_EXPORTS ON)
else ()
add_library(nk_shared SHARED ${NK_SOURCES})
@ -29,8 +29,12 @@ index b7c15176..24bfe6c3 100644
set_target_properties(nk_shared PROPERTIES OUTPUT_NAME numkong)
# Hide all symbols by default; only NK_DYNAMIC-annotated API functions are exported.
@@ -735,15 +735,21 @@ if (NK_BUILD_SHARED)
@@ -753,17 +753,25 @@ if (NK_BUILD_SHARED)
# fail on unsupported OS/runtime combinations.
endif ()
+ target_compile_definitions(nk_shared PUBLIC NK_DYNAMIC_DISPATCH=1 PRIVATE NK_BUILDING_LIBRARY=1)
+
install(
TARGETS nk_shared
- ARCHIVE
@ -54,10 +58,26 @@ index b7c15176..24bfe6c3 100644
)
endif ()
@@ -827,5 +833,4 @@ if (NK_BUILD_CUDA_TEST)
@@ -852,5 +860,4 @@ if (NK_BUILD_CUDA_TEST)
add_test(NAME nk_cuda_test COMMAND nk_cuda_test)
endif ()
-install(DIRECTORY include/ DESTINATION include)
-install(DIRECTORY c/ DESTINATION share/doc/${PROJECT_NAME}/src)
+install(DIRECTORY include/ DESTINATION include FILES_MATCHING PATTERN *.h)
diff --git a/include/numkong/types.h b/include/numkong/types.h
index 6d94b2f..5d0b165 100644
--- a/include/numkong/types.h
+++ b/include/numkong/types.h
@@ -115,7 +115,11 @@
#if NK_DYNAMIC_DISPATCH
#if defined(_WIN32) || defined(__CYGWIN__)
+#if defined(NK_BUILDING_LIBRARY)
#define NK_DYNAMIC __declspec(dllexport)
+#else
+#define NK_DYNAMIC __declspec(dllimport)
+#endif
#elif defined(__GNUC__) || defined(__clang__)
#define NK_DYNAMIC __attribute__((visibility("default")))
#else

View File

@ -2,9 +2,10 @@ vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO ashvardanian/NumKong
REF "v${VERSION}"
SHA512 b64fd32302a18be57bee28ad15ccb23366daf66a3f743c42fd5a0a740741837e19efce2eefff02d97a32bd0bc0ed60d94616052df9c8b4b1b488209bc732d742
SHA512 3fde9d1631b40585e6a2fd5ef8c85132042a2d5a3d3c5f143f9ec7dec3e046803fc61491c26ef4f5eee11cf4ee75214e8fe09350542e65728ce9485ead71c7ec
HEAD_REF main
PATCHES
# https://github.com/ashvardanian/NumKong/pull/378
export-target.patch
)
@ -16,6 +17,7 @@ vcpkg_cmake_configure(
-DNK_BUILD_TEST=OFF
-DNK_BUILD_SHARED_TEST=OFF
-DNK_BUILD_BENCH=OFF
-DNK_ENABLE_ASAN=OFF
"-DNK_BUILD_SHARED=${BUILD_SHARED}"
)

View File

@ -1,6 +1,6 @@
{
"name": "numkong",
"version": "7.7.1",
"version": "7.8.0",
"description": "NumKong (previously SimSIMD) delivers mixed-precision numerics that are often faster and more accurate than standard BLAS libraries",
"homepage": "https://github.com/ashvardanian/NumKong",
"license": "Apache-2.0",

View File

@ -7233,7 +7233,7 @@
"port-version": 0
},
"numkong": {
"baseline": "7.7.1",
"baseline": "7.8.0",
"port-version": 0
},
"nuraft": {

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "06850ee7fd59b2757e389c1ced2ce62f7f42427b",
"version": "7.8.0",
"port-version": 0
},
{
"git-tree": "43010638edab976a5df08852e15f8e5b56a1ae3b",
"version": "7.7.1",