forked from ZJU-DAILY/HNSW-Flash
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
33 lines (25 loc) · 798 Bytes
/
Makefile
File metadata and controls
33 lines (25 loc) · 798 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
MSG=update
algo ?= hnsw
data ?= siftsmall
clean:
rm -fr build && rm -fr bin && rm -f output.bin
debug-build: clean
mkdir -p bin && mkdir build && cd build && cmake .. -DCMAKE_BUILD_TYPE=Debug && make -j32
debug: debug-build
cd bin && gdb main
build: clean
mkdir -p bin && mkdir build && cd build && cmake .. && make -j32
run:
@data=$(word 2, $(MAKECMDGOALS)) ; \
algo=$(word 3, $(MAKECMDGOALS)) ; \
thread_num=$(word 4, $(MAKECMDGOALS)) ; \
topk=$(word 5, $(MAKECMDGOALS)) ; \
: ${data:=$(DEFAULT_DATA)} ; \
: ${algo:=$(DEFAULT_ALGO)} ; \
: ${thread_num:=$(DEFAULT_THREAD_NUM)} ; \
: ${topk:=$(DEFAULT_TOPK)} ; \
echo "Running with algo=$$algo and data=$$data thread_num=$$thread_num topk=$$topk" ; \
cd bin && ./main $$data $$algo $$thread_num $$topk;
rerun: build run
%:
@: