instant-distance/Makefile

15 lines
916 B
Makefile
Raw Normal View History

instant-distance-py/test/instant_distance.so: instant-distance-py/src/lib.rs
RUSTFLAGS="-C target-cpu=native" cargo build --release
([ -f target/release/libinstant_distance.dylib ] && cp target/release/libinstant_distance.dylib instant-distance-py/test/instant_distance.so) || \
([ -f target/release/libinstant_distance.so ] && cp target/release/libinstant_distance.so instant-distance-py/test/instant_distance.so)
test-python: instant-distance-py/test/instant_distance.so
2021-03-18 10:04:39 +00:00
PYTHONPATH=instant-distance-py/test/ python3 -m test
2021-11-10 08:21:52 +00:00
bench-python: instant-distance-py/test/instant_distance.so
PYTHONPATH=instant-distance-py/test/ python3 -m timeit -n 10 -s 'import random, instant_distance; points = [[random.random() for _ in range(300)] for _ in range(1024)]; config = instant_distance.Config()' 'instant_distance.Hnsw.build(points, config)'
2021-11-10 08:21:52 +00:00
clean:
cargo clean
2021-11-10 08:23:50 +00:00
rm -f instant-distance-py/test/instant_distance.so