usearch 1.1.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/prerelease.yml +3 -3
- package/.github/workflows/release.yml +3 -3
- package/.github/workflows/update_version.sh +1 -1
- package/.gitmodules +1 -4
- package/Cargo.toml +1 -1
- package/Package.swift +2 -1
- package/README.md +129 -46
- package/binding.gyp +16 -12
- package/build.gradle +1 -1
- package/build.rs +0 -1
- package/c/CMakeLists.txt +11 -7
- package/c/lib.cpp +36 -24
- package/c/usearch.h +42 -12
- package/cluster.ipynb +167 -0
- package/conanfile.py +1 -1
- package/cpp/CMakeLists.txt +8 -3
- package/cpp/bench.cpp +2 -2
- package/cpp/test.cpp +42 -25
- package/docs/benchmarks.md +8 -0
- package/docs/compilation.md +7 -7
- package/docs/conf.py +27 -24
- package/docs/javascript/reference.rst +3 -0
- package/docs/wolfram/index.rst +6 -0
- package/golang/README.md +31 -7
- package/golang/lib.go +1 -1
- package/include/usearch/index.hpp +348 -69
- package/include/usearch/index_dense.hpp +587 -179
- package/include/usearch/index_plugins.hpp +194 -16
- package/java/cloud/unum/usearch/Index.java +13 -0
- package/java/cloud/unum/usearch/cloud_unum_usearch_Index.cpp +40 -9
- package/java/cloud/unum/usearch/cloud_unum_usearch_Index.h +16 -0
- package/javascript/docs.js +111 -0
- package/javascript/lib.cpp +29 -9
- package/javascript/usearch.d.ts +9 -1
- package/objc/USearchObjective.mm +11 -11
- package/package.json +2 -2
- package/pyproject.toml +1 -1
- package/python/lib.cpp +492 -159
- package/python/scripts/index_faiss.py +3 -3
- package/python/scripts/join.py +6 -6
- package/python/scripts/test_index.py +219 -0
- package/python/scripts/test_sparse.py +21 -21
- package/python/scripts/test_tooling.py +111 -0
- package/python/usearch/eval.py +9 -5
- package/python/usearch/index.py +491 -216
- package/rust/lib.cpp +6 -24
- package/rust/lib.hpp +1 -3
- package/rust/lib.rs +89 -0
- package/setup.py +5 -6
- package/wasm/CMakeLists.txt +0 -1
- package/wasmer.toml +1 -1
- package/python/scripts/test.py +0 -364
- package/robin-map/.codecov.yml +0 -5
- package/robin-map/.github/workflows/ci.yml +0 -136
- package/robin-map/CMakeLists.txt +0 -86
- package/robin-map/LICENSE +0 -21
- package/robin-map/README.md +0 -483
- package/robin-map/cmake/tsl-robin-mapConfig.cmake.in +0 -9
- package/robin-map/doxygen.conf +0 -2483
- package/robin-map/include/tsl/robin_growth_policy.h +0 -406
- package/robin-map/include/tsl/robin_hash.h +0 -1639
- package/robin-map/include/tsl/robin_map.h +0 -807
- package/robin-map/include/tsl/robin_set.h +0 -660
- package/robin-map/tests/CMakeLists.txt +0 -26
- package/robin-map/tests/custom_allocator_tests.cpp +0 -138
- package/robin-map/tests/main.cpp +0 -26
- package/robin-map/tests/policy_tests.cpp +0 -97
- package/robin-map/tests/robin_map_tests.cpp +0 -1451
- package/robin-map/tests/robin_set_tests.cpp +0 -164
- package/robin-map/tests/utils.h +0 -443
- package/robin-map/tsl-robin-map.natvis +0 -78
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
name: CI
|
|
2
|
-
|
|
3
|
-
on: [push, pull_request, release]
|
|
4
|
-
|
|
5
|
-
jobs:
|
|
6
|
-
build:
|
|
7
|
-
strategy:
|
|
8
|
-
fail-fast: false
|
|
9
|
-
matrix:
|
|
10
|
-
config:
|
|
11
|
-
- {
|
|
12
|
-
name: linux-x64-gcc-7,
|
|
13
|
-
os: ubuntu-18.04,
|
|
14
|
-
cxx: g++-7,
|
|
15
|
-
cmake-build-type: Release
|
|
16
|
-
}
|
|
17
|
-
- {
|
|
18
|
-
name: linux-x64-gcc-7-no-exceptions,
|
|
19
|
-
os: ubuntu-18.04,
|
|
20
|
-
cxx: g++-7,
|
|
21
|
-
cxx-flags: -fno-exceptions,
|
|
22
|
-
cmake-build-type: Release
|
|
23
|
-
}
|
|
24
|
-
- {
|
|
25
|
-
name: linux-x64-clang-9,
|
|
26
|
-
os: ubuntu-18.04,
|
|
27
|
-
cxx: clang++-9,
|
|
28
|
-
cmake-build-type: Release
|
|
29
|
-
}
|
|
30
|
-
- {
|
|
31
|
-
name: macos-x64-gcc,
|
|
32
|
-
os: macos-10.15,
|
|
33
|
-
cxx: g++,
|
|
34
|
-
cmake-build-type: Release
|
|
35
|
-
}
|
|
36
|
-
- {
|
|
37
|
-
name: macos-x64-clang,
|
|
38
|
-
os: macos-10.15,
|
|
39
|
-
cxx: clang++,
|
|
40
|
-
cmake-build-type: Release
|
|
41
|
-
}
|
|
42
|
-
- {
|
|
43
|
-
name: linux-x64-clang-12-sanitize,
|
|
44
|
-
os: ubuntu-20.04,
|
|
45
|
-
cxx: clang++-12,
|
|
46
|
-
cxx-flags: "-fsanitize=address,undefined",
|
|
47
|
-
cmake-build-type: Release
|
|
48
|
-
}
|
|
49
|
-
- {
|
|
50
|
-
name: linux-x64-gcc-10-coverage,
|
|
51
|
-
os: ubuntu-20.04,
|
|
52
|
-
cxx: g++-10,
|
|
53
|
-
cxx-flags: --coverage,
|
|
54
|
-
gcov-tool: gcov-10,
|
|
55
|
-
cmake-build-type: Debug
|
|
56
|
-
}
|
|
57
|
-
- {
|
|
58
|
-
name: windows-x64-vs-2019,
|
|
59
|
-
os: windows-2019,
|
|
60
|
-
cmake-build-type: Release,
|
|
61
|
-
cmake-generator: Visual Studio 16 2019,
|
|
62
|
-
cmake-platform: x64,
|
|
63
|
-
vcpkg-triplet: x64-windows-static-md
|
|
64
|
-
}
|
|
65
|
-
- {
|
|
66
|
-
name: windows-x86-vs-2019,
|
|
67
|
-
os: windows-2019,
|
|
68
|
-
cmake-build-type: Release,
|
|
69
|
-
cmake-generator: Visual Studio 16 2019,
|
|
70
|
-
cmake-platform: Win32,
|
|
71
|
-
vcpkg-triplet: x86-windows-static-md
|
|
72
|
-
}
|
|
73
|
-
- {
|
|
74
|
-
name: windows-x64-vs-2022,
|
|
75
|
-
os: windows-2022,
|
|
76
|
-
cmake-build-type: Release,
|
|
77
|
-
cmake-generator: Visual Studio 17 2022,
|
|
78
|
-
cmake-platform: x64,
|
|
79
|
-
vcpkg-triplet: x64-windows-static-md
|
|
80
|
-
}
|
|
81
|
-
- {
|
|
82
|
-
name: windows-x86-vs-2022,
|
|
83
|
-
os: windows-2022,
|
|
84
|
-
cmake-build-type: Release,
|
|
85
|
-
cmake-generator: Visual Studio 17 2022,
|
|
86
|
-
cmake-platform: Win32,
|
|
87
|
-
vcpkg-triplet: x86-windows-static-md
|
|
88
|
-
}
|
|
89
|
-
name: ${{matrix.config.name}}
|
|
90
|
-
runs-on: ${{matrix.config.os}}
|
|
91
|
-
steps:
|
|
92
|
-
- uses: actions/checkout@v2
|
|
93
|
-
|
|
94
|
-
# Windows
|
|
95
|
-
- name: Install boost (Windows)
|
|
96
|
-
run: vcpkg install boost-test:${{matrix.config.vcpkg-triplet}}
|
|
97
|
-
if: runner.os == 'Windows'
|
|
98
|
-
|
|
99
|
-
- name: Configure CMake (Windows)
|
|
100
|
-
run: cmake -G "${{matrix.config.cmake-generator}}" -A ${{matrix.config.cmake-platform}} -DCMAKE_BUILD_TYPE=${{matrix.config.cmake-build-type}} -DCMAKE_TOOLCHAIN_FILE="$env:VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=${{matrix.config.vcpkg-triplet}} -S ${{github.workspace}}/tests -B ${{github.workspace}}/build
|
|
101
|
-
if: runner.os == 'Windows'
|
|
102
|
-
|
|
103
|
-
- name: Build (Windows)
|
|
104
|
-
run: cmake --build ${{github.workspace}}/build --config ${{matrix.config.cmake-build-type}} --verbose
|
|
105
|
-
if: runner.os == 'Windows'
|
|
106
|
-
|
|
107
|
-
- name: Test (Windows)
|
|
108
|
-
run: ${{github.workspace}}/build/${{matrix.config.cmake-build-type}}/tsl_robin_map_tests.exe
|
|
109
|
-
if: runner.os == 'Windows'
|
|
110
|
-
|
|
111
|
-
# Linux or macOS
|
|
112
|
-
- name: Install boost (Linux or macOS)
|
|
113
|
-
run: vcpkg install boost-test
|
|
114
|
-
if: runner.os == 'Linux' || runner.os == 'macOS'
|
|
115
|
-
|
|
116
|
-
- name: Configure CMake (Linux or macOS)
|
|
117
|
-
run: cmake -DCMAKE_BUILD_TYPE=${{matrix.config.cmake-build-type}} -DCMAKE_TOOLCHAIN_FILE="$VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake" -S ${{github.workspace}}/tests -B ${{github.workspace}}/build
|
|
118
|
-
env:
|
|
119
|
-
CXX: ${{matrix.config.cxx}}
|
|
120
|
-
CXXFLAGS: ${{matrix.config.cxx-flags}}
|
|
121
|
-
if: runner.os == 'Linux' || runner.os == 'macOS'
|
|
122
|
-
|
|
123
|
-
- name: Build (Linux or macOS)
|
|
124
|
-
run: cmake --build ${{github.workspace}}/build --verbose
|
|
125
|
-
if: runner.os == 'Linux' || runner.os == 'macOS'
|
|
126
|
-
|
|
127
|
-
- name: Test (Linux or macOS)
|
|
128
|
-
run: ${{github.workspace}}/build/tsl_robin_map_tests
|
|
129
|
-
if: runner.os == 'Linux' || runner.os == 'macOS'
|
|
130
|
-
|
|
131
|
-
- name: Coverage
|
|
132
|
-
run: |
|
|
133
|
-
sudo apt-get install -y lcov
|
|
134
|
-
lcov -c -b ${{github.workspace}}/include -d ${{github.workspace}}/build -o ${{github.workspace}}/coverage.info --no-external --gcov-tool ${{matrix.config.gcov-tool}}
|
|
135
|
-
bash <(curl -s https://codecov.io/bash) -f ${{github.workspace}}/coverage.info
|
|
136
|
-
if: ${{matrix.config.name == 'linux-x64-gcc-10-coverage'}}
|
package/robin-map/CMakeLists.txt
DELETED
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
cmake_minimum_required(VERSION 3.3)
|
|
2
|
-
|
|
3
|
-
project(tsl-robin-map VERSION 1.2.1 LANGUAGES CXX)
|
|
4
|
-
|
|
5
|
-
include(GNUInstallDirs)
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
add_library(robin_map INTERFACE)
|
|
9
|
-
# Use tsl::robin_map as target, more consistent with other libraries conventions (Boost, Qt, ...)
|
|
10
|
-
add_library(tsl::robin_map ALIAS robin_map)
|
|
11
|
-
|
|
12
|
-
target_include_directories(robin_map INTERFACE
|
|
13
|
-
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
|
|
14
|
-
"$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>")
|
|
15
|
-
|
|
16
|
-
list(APPEND headers "${CMAKE_CURRENT_SOURCE_DIR}/include/tsl/robin_growth_policy.h"
|
|
17
|
-
"${CMAKE_CURRENT_SOURCE_DIR}/include/tsl/robin_hash.h"
|
|
18
|
-
"${CMAKE_CURRENT_SOURCE_DIR}/include/tsl/robin_map.h"
|
|
19
|
-
"${CMAKE_CURRENT_SOURCE_DIR}/include/tsl/robin_set.h")
|
|
20
|
-
target_sources(robin_map INTERFACE "$<BUILD_INTERFACE:${headers}>")
|
|
21
|
-
|
|
22
|
-
if(MSVC)
|
|
23
|
-
target_sources(robin_map INTERFACE
|
|
24
|
-
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/tsl-robin-map.natvis>"
|
|
25
|
-
"$<INSTALL_INTERFACE:${CMAKE_INSTALL_DATAROOTDIR}/tsl-robin-map.natvis>")
|
|
26
|
-
endif()
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
set(IS_SUBPROJECT TRUE)
|
|
32
|
-
if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
|
|
33
|
-
set(IS_SUBPROJECT FALSE)
|
|
34
|
-
endif()
|
|
35
|
-
|
|
36
|
-
# Installation
|
|
37
|
-
if(NOT IS_SUBPROJECT)
|
|
38
|
-
include(CMakePackageConfigHelpers)
|
|
39
|
-
|
|
40
|
-
## Install include directory and potential natvis file
|
|
41
|
-
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/include/tsl"
|
|
42
|
-
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
|
|
43
|
-
|
|
44
|
-
if(MSVC)
|
|
45
|
-
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/tsl-robin-map.natvis"
|
|
46
|
-
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}")
|
|
47
|
-
endif()
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
## Create and install tsl-robin-mapConfig.cmake
|
|
52
|
-
configure_package_config_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake/tsl-robin-mapConfig.cmake.in"
|
|
53
|
-
"${CMAKE_CURRENT_BINARY_DIR}/tsl-robin-mapConfig.cmake"
|
|
54
|
-
INSTALL_DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/cmake/tsl-robin-map")
|
|
55
|
-
|
|
56
|
-
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/tsl-robin-mapConfig.cmake"
|
|
57
|
-
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/cmake/tsl-robin-map")
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
## Create local tsl-robin-mapTargets.cmake
|
|
61
|
-
export(TARGETS robin_map NAMESPACE tsl:: FILE "${CMAKE_CURRENT_BINARY_DIR}/tsl-robin-mapTargets.cmake")
|
|
62
|
-
|
|
63
|
-
## Create and install global tsl-robin-mapTargets.cmake
|
|
64
|
-
install(TARGETS robin_map
|
|
65
|
-
EXPORT tsl-robin-mapTargets)
|
|
66
|
-
|
|
67
|
-
install(EXPORT tsl-robin-mapTargets
|
|
68
|
-
NAMESPACE tsl::
|
|
69
|
-
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/cmake/tsl-robin-map")
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
## Create and install tsl-robin-mapConfigVersion.cmake
|
|
74
|
-
# tsl-robin-map is header-only and does not depend on the architecture.
|
|
75
|
-
# Remove CMAKE_SIZEOF_VOID_P from tsl-robin-mapConfigVersion.cmake so that a
|
|
76
|
-
# tsl-robin-mapConfig.cmake generated for a 64 bit target can be used for 32 bit
|
|
77
|
-
# targets and vice versa.
|
|
78
|
-
set(CMAKE_SIZEOF_VOID_P_BACKUP ${CMAKE_SIZEOF_VOID_P})
|
|
79
|
-
unset(CMAKE_SIZEOF_VOID_P)
|
|
80
|
-
write_basic_package_version_file("${CMAKE_CURRENT_BINARY_DIR}/tsl-robin-mapConfigVersion.cmake"
|
|
81
|
-
COMPATIBILITY SameMajorVersion)
|
|
82
|
-
set(CMAKE_SIZEOF_VOID_P ${CMAKE_SIZEOF_VOID_P_BACKUP})
|
|
83
|
-
|
|
84
|
-
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/tsl-robin-mapConfigVersion.cmake"
|
|
85
|
-
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/cmake/tsl-robin-map")
|
|
86
|
-
endif()
|
package/robin-map/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2017 Thibaut Goetghebuer-Planchon <tessil@gmx.com>
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|