usearch 2.8.2 → 2.8.4
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/release.yml +1 -1
- package/.vscode/settings.json +1 -0
- package/CITATION.cff +1 -1
- package/CONTRIBUTING.md +258 -6
- package/Cargo.toml +1 -1
- package/README.md +57 -53
- package/conanfile.py +1 -1
- package/cpp/README.md +89 -21
- package/csharp/DEV_SETUP.md +1 -1
- package/csharp/nuget/nuget-package.props +1 -1
- package/docs/{compilation.rst → contributing.rst} +2 -2
- package/docs/index.rst +1 -1
- package/include/usearch/index.hpp +7 -6
- package/include/usearch/index_dense.hpp +11 -7
- package/javascript/usearch.js +4 -4
- package/javascript/usearch.test.js +22 -0
- package/package-ci.json +10 -0
- package/package.json +1 -5
- package/python/README.md +1 -1
- package/simsimd/CMakeLists.txt +1 -1
- package/simsimd/README.md +7 -1
- package/simsimd/include/simsimd/probability.h +24 -24
- package/simsimd/include/simsimd/types.h +8 -0
- package/simsimd/javascript/{test.js → test/simsimd.test.js} +15 -15
- package/simsimd/package.json +4 -8
- package/simsimd/setup.py +3 -0
- package/wasmer.toml +1 -1
- package/docs/compilation.md +0 -215
- package/simsimd/.clang-format +0 -10
- package/simsimd/.github/workflows/prerelease.yml +0 -89
- package/simsimd/.github/workflows/release.yml +0 -141
- package/simsimd/.github/workflows/update_version.sh +0 -5
- package/simsimd/.vscode/launch.json +0 -53
- package/simsimd/.vscode/settings.json +0 -114
- package/simsimd/.vscode/tasks.json +0 -23
- package/simsimd/go.mod +0 -3
- package/simsimd/golang/bench_test.go +0 -40
- package/simsimd/golang/simsimd.go +0 -47
- package/simsimd/golang/unit_test.go +0 -40
- package/simsimd/pyproject.toml +0 -42
- package/simsimd/python/bench.ipynb +0 -187
- package/simsimd/python/bench.py +0 -268
- package/simsimd/python/lib.c +0 -492
- package/simsimd/python/test.py +0 -195
package/simsimd/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "simsimd",
|
|
3
|
-
"version": "3.3
|
|
3
|
+
"version": "3.5.3",
|
|
4
4
|
"description": "Vector Similarity Functions 3x-200x Faster than SciPy and NumPy",
|
|
5
5
|
"author": "Ash Vardanian",
|
|
6
6
|
"license": "Apache 2.0",
|
|
7
7
|
"main": "javascript/simsimd.js",
|
|
8
8
|
"type": "module",
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
"
|
|
9
|
+
"scripts": {
|
|
10
|
+
"test": "node --test ./javascript/test",
|
|
11
|
+
"bench": "node ./javascript/bench.js"
|
|
12
12
|
},
|
|
13
13
|
"gypfile": true,
|
|
14
14
|
"engines": {
|
|
@@ -19,10 +19,6 @@
|
|
|
19
19
|
"bindings": "~1.2.1",
|
|
20
20
|
"node-addon-api": "^3.0.0"
|
|
21
21
|
},
|
|
22
|
-
"scripts": {
|
|
23
|
-
"test": "node --test ./javascript/test.js",
|
|
24
|
-
"bench": "node ./javascript/bench.js"
|
|
25
|
-
},
|
|
26
22
|
"devDependencies": {
|
|
27
23
|
"benchmark": "^2.1.4",
|
|
28
24
|
"mathjs": "^11.11.2",
|
package/simsimd/setup.py
CHANGED
|
@@ -27,6 +27,9 @@ if sys.platform == "linux":
|
|
|
27
27
|
compile_args.append("-fopenmp")
|
|
28
28
|
link_args.append("-lgomp")
|
|
29
29
|
|
|
30
|
+
# Add vectorized `logf` implementation from the `glibc`
|
|
31
|
+
link_args.append("-lm")
|
|
32
|
+
|
|
30
33
|
if sys.platform == "darwin":
|
|
31
34
|
compile_args.append("-std=c11")
|
|
32
35
|
compile_args.append("-O3")
|
package/wasmer.toml
CHANGED
package/docs/compilation.md
DELETED
|
@@ -1,215 +0,0 @@
|
|
|
1
|
-
# Compiling USearch
|
|
2
|
-
|
|
3
|
-
This document describes the workflow for advanced USearch users and enthusiasts willing to contribute to the project.
|
|
4
|
-
Before building the first time, please pull submodules.
|
|
5
|
-
|
|
6
|
-
```sh
|
|
7
|
-
git submodule update --init --recursive
|
|
8
|
-
```
|
|
9
|
-
|
|
10
|
-
## C++11
|
|
11
|
-
|
|
12
|
-
Linux:
|
|
13
|
-
|
|
14
|
-
```sh
|
|
15
|
-
sudo apt-get update
|
|
16
|
-
sudo apt-get install cmake build-essential libjemalloc-dev
|
|
17
|
-
cmake -B ./build_release \
|
|
18
|
-
-DCMAKE_BUILD_TYPE=Release \
|
|
19
|
-
-DUSEARCH_USE_OPENMP=1 \
|
|
20
|
-
-DUSEARCH_USE_SIMSIMD=1 \
|
|
21
|
-
-DUSEARCH_USE_JEMALLOC=1 \
|
|
22
|
-
-DUSEARCH_BUILD_TEST_CPP=1 \
|
|
23
|
-
-DUSEARCH_BUILD_BENCH_CPP=1 \
|
|
24
|
-
-DUSEARCH_BUILD_LIB_C=1 \
|
|
25
|
-
-DUSEARCH_BUILD_TEST_C=1 \
|
|
26
|
-
-DUSEARCH_USE_NATIVE_F16=1 \
|
|
27
|
-
&& \
|
|
28
|
-
make -C ./build_release -j
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
MacOS:
|
|
32
|
-
|
|
33
|
-
```sh
|
|
34
|
-
brew install libomp llvm
|
|
35
|
-
cmake -B ./build_release \
|
|
36
|
-
-DCMAKE_C_COMPILER="/opt/homebrew/opt/llvm/bin/clang" \
|
|
37
|
-
-DCMAKE_CXX_COMPILER="/opt/homebrew/opt/llvm/bin/clang++" \
|
|
38
|
-
-DUSEARCH_USE_OPENMP=1 \
|
|
39
|
-
-DUSEARCH_USE_SIMSIMD=1 \
|
|
40
|
-
-DUSEARCH_BUILD_BENCH_CPP=1 \
|
|
41
|
-
-DUSEARCH_BUILD_TEST_CPP=1 \
|
|
42
|
-
&& \
|
|
43
|
-
make -C ./build_release -j
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
Linting:
|
|
47
|
-
|
|
48
|
-
```sh
|
|
49
|
-
cppcheck --enable=all --force --suppress=cstyleCast --suppress=unusedFunction \
|
|
50
|
-
include/usearch/index.hpp \
|
|
51
|
-
include/index_dense.hpp \
|
|
52
|
-
include/index_plugins.hpp
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
Testing:
|
|
56
|
-
|
|
57
|
-
```sh
|
|
58
|
-
cmake -DUSEARCH_BUILD_TEST_CPP=1 -B ./build_debug
|
|
59
|
-
cmake --build ./build_debug --config Debug
|
|
60
|
-
./build_debug/test_cpp
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
## Python 3
|
|
64
|
-
|
|
65
|
-
Use PyTest to validate the build.
|
|
66
|
-
The `-s` option will disable capturing the logs.
|
|
67
|
-
The `-x` option will exit after first failure to simplify debugging.
|
|
68
|
-
|
|
69
|
-
```sh
|
|
70
|
-
pip install -e . && pytest python/scripts/ -s -x
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
Linting:
|
|
74
|
-
|
|
75
|
-
```sh
|
|
76
|
-
pip install ruff
|
|
77
|
-
ruff --format=github --select=E9,F63,F7,F82 --target-version=py37 python
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
Testing wheel builds locally:
|
|
81
|
-
|
|
82
|
-
```sh
|
|
83
|
-
pip install cibuildwheel
|
|
84
|
-
cibuildwheel --platform linux
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
## JavaScript
|
|
88
|
-
|
|
89
|
-
Node.JS:
|
|
90
|
-
|
|
91
|
-
```sh
|
|
92
|
-
npm install && node --test ./javascript/usearch.test.js
|
|
93
|
-
npm publish
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
WebAssembly:
|
|
97
|
-
|
|
98
|
-
```sh
|
|
99
|
-
emcmake cmake -B ./build -DCMAKE_CXX_FLAGS="${CMAKE_CXX_FLAGS} -s TOTAL_MEMORY=64MB" && emmake make -C ./build
|
|
100
|
-
node ./build/usearch.test.js
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
If you don't yet have `emcmake` installed:
|
|
104
|
-
|
|
105
|
-
```sh
|
|
106
|
-
git clone https://github.com/emscripten-core/emsdk.git && ./emsdk/emsdk install latest && ./emsdk/emsdk activate latest && source ./emsdk/emsdk_env.sh
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
## Rust
|
|
110
|
-
|
|
111
|
-
```sh
|
|
112
|
-
cargo test -p usearch
|
|
113
|
-
cargo publish
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
## Java
|
|
117
|
-
|
|
118
|
-
```sh
|
|
119
|
-
gradle clean build
|
|
120
|
-
java -cp . -Djava.library.path="$(pwd)/build/libs/usearch/shared" java/cloud/unum/usearch/Index.java
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
Or step by-step:
|
|
124
|
-
|
|
125
|
-
```sh
|
|
126
|
-
cs java/unum/cloud/usearch
|
|
127
|
-
javac -h . Index.java
|
|
128
|
-
|
|
129
|
-
# Ubuntu:
|
|
130
|
-
g++ -c -fPIC -I${JAVA_HOME}/include -I${JAVA_HOME}/include/linux cloud_unum_usearch_Index.cpp -o cloud_unum_usearch_Index.o
|
|
131
|
-
g++ -shared -fPIC -o libusearch_c.so cloud_unum_usearch_Index.o -lc
|
|
132
|
-
|
|
133
|
-
# Windows
|
|
134
|
-
g++ -c -I%JAVA_HOME%\include -I%JAVA_HOME%\include\win32 cloud_unum_usearch_Index.cpp -o cloud_unum_usearch_Index.o
|
|
135
|
-
g++ -shared -o USearchJNI.dll cloud_unum_usearch_Index.o -Wl,--add-stdcall-alias
|
|
136
|
-
|
|
137
|
-
# MacOS
|
|
138
|
-
g++ -std=c++11 -c -fPIC \
|
|
139
|
-
-I../../../../include \
|
|
140
|
-
-I../../../../fp16/include \
|
|
141
|
-
-I../../../../simsimd/include \
|
|
142
|
-
-I${JAVA_HOME}/include -I${JAVA_HOME}/include/darwin cloud_unum_usearch_Index.cpp -o cloud_unum_usearch_Index.o
|
|
143
|
-
g++ -dynamiclib -o libusearch.dylib cloud_unum_usearch_Index.o -lc
|
|
144
|
-
# Run linking to that directory
|
|
145
|
-
java -cp . -Djava.library.path="$(pwd)/java/cloud/unum/usearch/" Index.java
|
|
146
|
-
java -cp . -Djava.library.path="$(pwd)/java" cloud.unum.usearch.Index
|
|
147
|
-
```
|
|
148
|
-
|
|
149
|
-
## Objective-C and Swift
|
|
150
|
-
|
|
151
|
-
```sh
|
|
152
|
-
swift build
|
|
153
|
-
swift test -v
|
|
154
|
-
```
|
|
155
|
-
|
|
156
|
-
## C 99
|
|
157
|
-
|
|
158
|
-
There are a few ways to compile the C 99 USearch SDK.
|
|
159
|
-
Using the Makefile, specifying the targets you need:
|
|
160
|
-
|
|
161
|
-
```sh
|
|
162
|
-
cmake -B ./build_release -DUSEARCH_BUILD_LIB_C=1 -DUSEARCH_BUILD_TEST_C=1 -DUSEARCH_USE_OPENMP=1 -DUSEARCH_USE_SIMSIMD=1
|
|
163
|
-
cmake --build ./build_release --config Release -j
|
|
164
|
-
./build_release/test_c
|
|
165
|
-
# On Windows:
|
|
166
|
-
.\build_release\test_c.exe
|
|
167
|
-
```
|
|
168
|
-
|
|
169
|
-
## GoLang
|
|
170
|
-
|
|
171
|
-
GoLang bindings are based on C.
|
|
172
|
-
So one should first compile the C library, link it with GoLang, and only then run tests.
|
|
173
|
-
|
|
174
|
-
```sh
|
|
175
|
-
cmake -B ./build_release -DUSEARCH_BUILD_LIB_C=1 -DUSEARCH_BUILD_TEST_C=1 -DUSEARCH_USE_OPENMP=1 -DUSEARCH_USE_SIMSIMD=1
|
|
176
|
-
cmake --build ./build_release --config Release -j
|
|
177
|
-
mv ./c/libusearch_c.so ./golang/
|
|
178
|
-
cp ./c/usearch.h ./golang/
|
|
179
|
-
cd golang && go test -v ; cd ..
|
|
180
|
-
```
|
|
181
|
-
|
|
182
|
-
## Wolfram
|
|
183
|
-
|
|
184
|
-
```sh
|
|
185
|
-
brew install --cask wolfram-engine
|
|
186
|
-
```
|
|
187
|
-
|
|
188
|
-
## Docker
|
|
189
|
-
|
|
190
|
-
```sh
|
|
191
|
-
docker build -t unum/usearch . && docker run unum/usearch
|
|
192
|
-
```
|
|
193
|
-
|
|
194
|
-
For multi-architecture builds and publications:
|
|
195
|
-
|
|
196
|
-
```sh
|
|
197
|
-
version=$(cat VERSION)
|
|
198
|
-
docker buildx create --use &&
|
|
199
|
-
docker login &&
|
|
200
|
-
docker buildx build \
|
|
201
|
-
--platform "linux/amd64,linux/arm64" \
|
|
202
|
-
--build-arg version=$version \
|
|
203
|
-
--file Dockerfile \
|
|
204
|
-
--tag unum/usearch:$version \
|
|
205
|
-
--tag unum/usearch:latest \
|
|
206
|
-
--push .
|
|
207
|
-
```
|
|
208
|
-
|
|
209
|
-
## Sub-Modules
|
|
210
|
-
|
|
211
|
-
Extending metrics in SimSIMD:
|
|
212
|
-
|
|
213
|
-
```sh
|
|
214
|
-
git push --set-upstream https://github.com/ashvardanian/simsimd.git HEAD:main
|
|
215
|
-
```
|
package/simsimd/.clang-format
DELETED
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
name: Pre-Release
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches: ["main-dev"]
|
|
6
|
-
pull_request:
|
|
7
|
-
branches: ["main-dev"]
|
|
8
|
-
|
|
9
|
-
env:
|
|
10
|
-
BUILD_TYPE: Release
|
|
11
|
-
GH_TOKEN: ${{ secrets.SEMANTIC_RELEASE_TOKEN }}
|
|
12
|
-
PYTHONUTF8: 1
|
|
13
|
-
|
|
14
|
-
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
|
|
15
|
-
permissions:
|
|
16
|
-
contents: read
|
|
17
|
-
|
|
18
|
-
jobs:
|
|
19
|
-
test_python:
|
|
20
|
-
name: Test Python ${{ matrix.python-version }} on ${{ matrix.architecture }} ${{ matrix.os }}
|
|
21
|
-
runs-on: ${{ matrix.os }}
|
|
22
|
-
strategy:
|
|
23
|
-
fail-fast: false
|
|
24
|
-
matrix:
|
|
25
|
-
os: [ubuntu-22.04, macOS-11, windows-2022]
|
|
26
|
-
python-version: ["3.12", "3.8"]
|
|
27
|
-
architecture: [x64, arm64]
|
|
28
|
-
|
|
29
|
-
steps:
|
|
30
|
-
- uses: actions/checkout@v3
|
|
31
|
-
- run: git submodule update --init --recursive
|
|
32
|
-
- name: Set up Python ${{ matrix.python-version }}
|
|
33
|
-
uses: actions/setup-python@v4
|
|
34
|
-
with:
|
|
35
|
-
python-version: ${{ matrix.python-version }}
|
|
36
|
-
|
|
37
|
-
- name: Install dependencies
|
|
38
|
-
run: |
|
|
39
|
-
python -m pip install --no-cache-dir --upgrade pip
|
|
40
|
-
pip install --no-cache-dir pytest numpy scipy py-cpuinfo pytest-repeat
|
|
41
|
-
python -c "from cpuinfo import get_cpu_info; print(get_cpu_info())"
|
|
42
|
-
|
|
43
|
-
- name: Build locally on Ubuntu
|
|
44
|
-
run: |
|
|
45
|
-
sudo apt-get update
|
|
46
|
-
sudo apt-get install gcc-12 -y
|
|
47
|
-
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 12
|
|
48
|
-
sudo update-alternatives --config gcc
|
|
49
|
-
gcc --version
|
|
50
|
-
python -m pip install .
|
|
51
|
-
if: ${{ matrix.os == 'ubuntu-22.04' }}
|
|
52
|
-
|
|
53
|
-
- name: Build locally on other OS
|
|
54
|
-
run: python -m pip install .
|
|
55
|
-
if: ${{ matrix.os != 'ubuntu-22.04' }}
|
|
56
|
-
|
|
57
|
-
- name: Test with PyTest
|
|
58
|
-
run: |
|
|
59
|
-
python -c "import simsimd; print(simsimd.get_capabilities())"
|
|
60
|
-
pytest python/test.py -s -x -v
|
|
61
|
-
|
|
62
|
-
test_javascript:
|
|
63
|
-
name: Test JavaScript
|
|
64
|
-
runs-on: ubuntu-22.04
|
|
65
|
-
env:
|
|
66
|
-
CC: gcc-12
|
|
67
|
-
CXX: g++-12
|
|
68
|
-
|
|
69
|
-
steps:
|
|
70
|
-
- uses: actions/checkout@v4
|
|
71
|
-
with:
|
|
72
|
-
ref: "main"
|
|
73
|
-
- run: git submodule update --init --recursive
|
|
74
|
-
|
|
75
|
-
- name: Update compilers
|
|
76
|
-
run: |
|
|
77
|
-
sudo apt update
|
|
78
|
-
sudo apt install -y cmake build-essential libjemalloc-dev libomp-dev gcc-12 g++-12
|
|
79
|
-
|
|
80
|
-
- name: Set up Node.js
|
|
81
|
-
uses: actions/setup-node@v3
|
|
82
|
-
with:
|
|
83
|
-
node-version: 18
|
|
84
|
-
|
|
85
|
-
- name: Build and Test
|
|
86
|
-
run: |
|
|
87
|
-
npm install
|
|
88
|
-
npm ci
|
|
89
|
-
npm test
|
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
name: Release
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches: ["main"]
|
|
6
|
-
|
|
7
|
-
env:
|
|
8
|
-
BUILD_TYPE: Release
|
|
9
|
-
GH_TOKEN: ${{ secrets.SEMANTIC_RELEASE_TOKEN }}
|
|
10
|
-
PYTHONUTF8: 1
|
|
11
|
-
|
|
12
|
-
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
|
|
13
|
-
permissions:
|
|
14
|
-
contents: write
|
|
15
|
-
pages: write
|
|
16
|
-
id-token: write
|
|
17
|
-
|
|
18
|
-
jobs:
|
|
19
|
-
versioning:
|
|
20
|
-
name: Semantic Release
|
|
21
|
-
runs-on: ubuntu-22.04
|
|
22
|
-
steps:
|
|
23
|
-
- uses: actions/checkout@v3
|
|
24
|
-
with:
|
|
25
|
-
persist-credentials: false
|
|
26
|
-
- uses: actions/setup-node@v3
|
|
27
|
-
- run: npm install --save-dev --prefix ./package-ci @semantic-release/exec @semantic-release/git conventional-changelog-eslint semantic-release && npx --prefix ./package-ci semantic-release
|
|
28
|
-
|
|
29
|
-
rebase:
|
|
30
|
-
name: Rebase Dev. Branch
|
|
31
|
-
needs: versioning
|
|
32
|
-
runs-on: ubuntu-22.04
|
|
33
|
-
steps:
|
|
34
|
-
- name: Checkout the latest code
|
|
35
|
-
uses: actions/checkout@v3
|
|
36
|
-
with:
|
|
37
|
-
fetch-depth: 0
|
|
38
|
-
|
|
39
|
-
- name: Perform rebase
|
|
40
|
-
run: |
|
|
41
|
-
git fetch origin main
|
|
42
|
-
git checkout main-dev
|
|
43
|
-
git rebase origin/main
|
|
44
|
-
|
|
45
|
-
- name: Push changes
|
|
46
|
-
uses: CasperWA/push-protected@v2
|
|
47
|
-
with:
|
|
48
|
-
token: ${{ secrets.SEMANTIC_REBASE_TOKEN }}
|
|
49
|
-
branch: main-dev
|
|
50
|
-
unprotect_reviews: True
|
|
51
|
-
force: True
|
|
52
|
-
|
|
53
|
-
build_wheels:
|
|
54
|
-
name: Build Wheels for ${{ matrix.os }}
|
|
55
|
-
runs-on: ${{ matrix.os }}
|
|
56
|
-
needs: versioning
|
|
57
|
-
strategy:
|
|
58
|
-
fail-fast: false
|
|
59
|
-
matrix:
|
|
60
|
-
os: [ubuntu-22.04, macOS-11, windows-2022]
|
|
61
|
-
steps:
|
|
62
|
-
- uses: actions/checkout@v3
|
|
63
|
-
with:
|
|
64
|
-
ref: "main"
|
|
65
|
-
- uses: actions/setup-python@v3
|
|
66
|
-
|
|
67
|
-
- name: Setup Docker
|
|
68
|
-
if: matrix.os == 'ubuntu-22.04'
|
|
69
|
-
uses: docker-practice/actions-setup-docker@master
|
|
70
|
-
|
|
71
|
-
- name: Setup QEMU
|
|
72
|
-
if: matrix.os == 'ubuntu-22.04'
|
|
73
|
-
uses: docker/setup-qemu-action@v2.1.0
|
|
74
|
-
|
|
75
|
-
- name: Install CIBuildWheel
|
|
76
|
-
run: python -m pip install --no-cache-dir cibuildwheel
|
|
77
|
-
|
|
78
|
-
- name: Build wheels
|
|
79
|
-
run: python -m cibuildwheel
|
|
80
|
-
|
|
81
|
-
- uses: actions/upload-artifact@v3
|
|
82
|
-
with:
|
|
83
|
-
path: ./wheelhouse/*.whl
|
|
84
|
-
|
|
85
|
-
publish_python:
|
|
86
|
-
name: Publish Python
|
|
87
|
-
needs: build_wheels
|
|
88
|
-
runs-on: ubuntu-22.04
|
|
89
|
-
environment:
|
|
90
|
-
name: pypi
|
|
91
|
-
url: https://pypi.org/p/simsimd
|
|
92
|
-
permissions:
|
|
93
|
-
id-token: write
|
|
94
|
-
|
|
95
|
-
steps:
|
|
96
|
-
- name: Download artifacts
|
|
97
|
-
uses: actions/download-artifact@v3.0.2
|
|
98
|
-
with:
|
|
99
|
-
path: ./dist/
|
|
100
|
-
|
|
101
|
-
- name: Publish to PyPi
|
|
102
|
-
uses: pypa/gh-action-pypi-publish@release/v1
|
|
103
|
-
with:
|
|
104
|
-
packages-dir: ./dist/artifact
|
|
105
|
-
verbose: true
|
|
106
|
-
print-hash: true
|
|
107
|
-
|
|
108
|
-
publish_javascript:
|
|
109
|
-
name: Publish JavaScript
|
|
110
|
-
needs: versioning
|
|
111
|
-
runs-on: ubuntu-22.04
|
|
112
|
-
env:
|
|
113
|
-
CC: gcc-12
|
|
114
|
-
CXX: g++-12
|
|
115
|
-
|
|
116
|
-
steps:
|
|
117
|
-
- uses: actions/checkout@v3
|
|
118
|
-
with:
|
|
119
|
-
ref: "main"
|
|
120
|
-
- run: git submodule update --init --recursive
|
|
121
|
-
|
|
122
|
-
- name: Update compilers
|
|
123
|
-
run: |
|
|
124
|
-
sudo apt update
|
|
125
|
-
sudo apt install -y cmake build-essential libjemalloc-dev libomp-dev gcc-12 g++-12
|
|
126
|
-
|
|
127
|
-
- name: Set up Node.js
|
|
128
|
-
uses: actions/setup-node@v3
|
|
129
|
-
with:
|
|
130
|
-
node-version: 18
|
|
131
|
-
|
|
132
|
-
- name: Build and Test
|
|
133
|
-
run: |
|
|
134
|
-
npm install
|
|
135
|
-
npm ci
|
|
136
|
-
npm test
|
|
137
|
-
|
|
138
|
-
- name: Publish
|
|
139
|
-
uses: JS-DevTools/npm-publish@v2
|
|
140
|
-
with:
|
|
141
|
-
token: ${{ secrets.NPM_TOKEN }}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
// Use IntelliSense to learn about possible attributes.
|
|
3
|
-
// Hover to view descriptions of existing attributes.
|
|
4
|
-
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
|
5
|
-
"version": "0.2.0",
|
|
6
|
-
"configurations": [
|
|
7
|
-
{
|
|
8
|
-
"name": "Debug Benchmark",
|
|
9
|
-
"type": "cppdbg",
|
|
10
|
-
"request": "launch",
|
|
11
|
-
"program": "${workspaceFolder}/build_debug/simsimd_bench",
|
|
12
|
-
"cwd": "${workspaceFolder}",
|
|
13
|
-
"args": [
|
|
14
|
-
"--benchmark_filter=i8_cos"
|
|
15
|
-
],
|
|
16
|
-
"environment": [
|
|
17
|
-
{
|
|
18
|
-
"name": "ASAN_OPTIONS",
|
|
19
|
-
"value": "detect_leaks=0:atexit=1:strict_init_order=1:strict_string_checks=1"
|
|
20
|
-
}
|
|
21
|
-
],
|
|
22
|
-
"stopAtEntry": false,
|
|
23
|
-
"preLaunchTask": "Build Benchmark: Debug",
|
|
24
|
-
"linux": {
|
|
25
|
-
"MIMode": "gdb",
|
|
26
|
-
},
|
|
27
|
-
"osx": {
|
|
28
|
-
"MIMode": "lldb"
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
"name": "Debug Test",
|
|
33
|
-
"type": "cppdbg",
|
|
34
|
-
"request": "launch",
|
|
35
|
-
"program": "${workspaceFolder}/build/test",
|
|
36
|
-
"cwd": "${workspaceFolder}",
|
|
37
|
-
"environment": [
|
|
38
|
-
{
|
|
39
|
-
"name": "ASAN_OPTIONS",
|
|
40
|
-
"value": "detect_leaks=0:atexit=1:strict_init_order=1:strict_string_checks=1"
|
|
41
|
-
}
|
|
42
|
-
],
|
|
43
|
-
"stopAtEntry": false,
|
|
44
|
-
"preLaunchTask": "Build Test: Debug",
|
|
45
|
-
"linux": {
|
|
46
|
-
"MIMode": "gdb"
|
|
47
|
-
},
|
|
48
|
-
"osx": {
|
|
49
|
-
"MIMode": "lldb"
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
]
|
|
53
|
-
}
|
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"files.associations": {
|
|
3
|
-
"array": "cpp",
|
|
4
|
-
"string_view": "cpp",
|
|
5
|
-
"random": "cpp",
|
|
6
|
-
"atomic": "cpp",
|
|
7
|
-
"bit": "cpp",
|
|
8
|
-
"*.tcc": "cpp",
|
|
9
|
-
"bitset": "cpp",
|
|
10
|
-
"cctype": "cpp",
|
|
11
|
-
"chrono": "cpp",
|
|
12
|
-
"cinttypes": "cpp",
|
|
13
|
-
"clocale": "cpp",
|
|
14
|
-
"cmath": "cpp",
|
|
15
|
-
"codecvt": "cpp",
|
|
16
|
-
"compare": "cpp",
|
|
17
|
-
"concepts": "cpp",
|
|
18
|
-
"condition_variable": "cpp",
|
|
19
|
-
"cstdarg": "cpp",
|
|
20
|
-
"cstddef": "cpp",
|
|
21
|
-
"cstdint": "cpp",
|
|
22
|
-
"cstdio": "cpp",
|
|
23
|
-
"cstdlib": "cpp",
|
|
24
|
-
"cstring": "cpp",
|
|
25
|
-
"ctime": "cpp",
|
|
26
|
-
"cwchar": "cpp",
|
|
27
|
-
"cwctype": "cpp",
|
|
28
|
-
"deque": "cpp",
|
|
29
|
-
"list": "cpp",
|
|
30
|
-
"map": "cpp",
|
|
31
|
-
"set": "cpp",
|
|
32
|
-
"string": "cpp",
|
|
33
|
-
"unordered_map": "cpp",
|
|
34
|
-
"vector": "cpp",
|
|
35
|
-
"exception": "cpp",
|
|
36
|
-
"algorithm": "cpp",
|
|
37
|
-
"functional": "cpp",
|
|
38
|
-
"iterator": "cpp",
|
|
39
|
-
"memory": "cpp",
|
|
40
|
-
"memory_resource": "cpp",
|
|
41
|
-
"numeric": "cpp",
|
|
42
|
-
"ratio": "cpp",
|
|
43
|
-
"regex": "cpp",
|
|
44
|
-
"system_error": "cpp",
|
|
45
|
-
"tuple": "cpp",
|
|
46
|
-
"type_traits": "cpp",
|
|
47
|
-
"utility": "cpp",
|
|
48
|
-
"fstream": "cpp",
|
|
49
|
-
"initializer_list": "cpp",
|
|
50
|
-
"iomanip": "cpp",
|
|
51
|
-
"iosfwd": "cpp",
|
|
52
|
-
"iostream": "cpp",
|
|
53
|
-
"istream": "cpp",
|
|
54
|
-
"limits": "cpp",
|
|
55
|
-
"mutex": "cpp",
|
|
56
|
-
"new": "cpp",
|
|
57
|
-
"numbers": "cpp",
|
|
58
|
-
"ostream": "cpp",
|
|
59
|
-
"semaphore": "cpp",
|
|
60
|
-
"sstream": "cpp",
|
|
61
|
-
"stdexcept": "cpp",
|
|
62
|
-
"stop_token": "cpp",
|
|
63
|
-
"streambuf": "cpp",
|
|
64
|
-
"thread": "cpp",
|
|
65
|
-
"typeinfo": "cpp",
|
|
66
|
-
"complex": "cpp",
|
|
67
|
-
"immintrin.h": "c",
|
|
68
|
-
"__bit_reference": "cpp",
|
|
69
|
-
"__bits": "cpp",
|
|
70
|
-
"__config": "cpp",
|
|
71
|
-
"__debug": "cpp",
|
|
72
|
-
"__errc": "cpp",
|
|
73
|
-
"__hash_table": "cpp",
|
|
74
|
-
"__locale": "cpp",
|
|
75
|
-
"__mutex_base": "cpp",
|
|
76
|
-
"__node_handle": "cpp",
|
|
77
|
-
"__split_buffer": "cpp",
|
|
78
|
-
"__threading_support": "cpp",
|
|
79
|
-
"__tuple": "cpp",
|
|
80
|
-
"__verbose_abort": "cpp",
|
|
81
|
-
"charconv": "cpp",
|
|
82
|
-
"ios": "cpp",
|
|
83
|
-
"locale": "cpp",
|
|
84
|
-
"optional": "cpp",
|
|
85
|
-
"variant": "cpp",
|
|
86
|
-
"__nullptr": "cpp",
|
|
87
|
-
"unordered_set": "cpp",
|
|
88
|
-
"span": "cpp",
|
|
89
|
-
"arm_neon.h": "c",
|
|
90
|
-
"__tree": "cpp",
|
|
91
|
-
"filesystem": "cpp"
|
|
92
|
-
},
|
|
93
|
-
"cSpell.words": [
|
|
94
|
-
"castsi",
|
|
95
|
-
"dtype",
|
|
96
|
-
"dtypes",
|
|
97
|
-
"jaccard",
|
|
98
|
-
"kann",
|
|
99
|
-
"Kullback",
|
|
100
|
-
"Leibler",
|
|
101
|
-
"loadu",
|
|
102
|
-
"maccs",
|
|
103
|
-
"maskz",
|
|
104
|
-
"napi",
|
|
105
|
-
"simd",
|
|
106
|
-
"simsimd",
|
|
107
|
-
"sqeuclidean",
|
|
108
|
-
"tanimoto",
|
|
109
|
-
"typedarray",
|
|
110
|
-
"unsw",
|
|
111
|
-
"Vardanian",
|
|
112
|
-
"vpopcntdq"
|
|
113
|
-
]
|
|
114
|
-
}
|