From be1b99b689625ffcee6e2b01bc8a8f8fd9643dc4 Mon Sep 17 00:00:00 2001 From: searchivairus Date: Sun, 7 Jan 2018 17:26:11 -0500 Subject: [PATCH] Finishing with #264 : one shouldn't use M_ anywhere in the code after maxM and maxM0 are initialized --- scripts/test_run.sh | 10 +++++----- similarity_search/src/method/hnsw.cc | 2 +- similarity_search/src/method/hnsw_distfunc_opt.cc | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/scripts/test_run.sh b/scripts/test_run.sh index ab989cd..9aee8f9 100755 --- a/scripts/test_run.sh +++ b/scripts/test_run.sh @@ -117,11 +117,11 @@ do_run 1 "sw-graph" " -c NN=10 " 0 " -t efSearch=10 -t efSearch=20 -t efSearch=4 do_run 1 "hnsw" " -c M=10 " 1 " -t efSearch=10 -t efSearch=20 -t efSearch=40 -t efSearch=80 -t efSearch=160 -t efSearch=240" "hnsw_${SPACE}.index" # Methods that do not support creation of an index -do_run 1 "vptree" " -c tuneK=$K,bucketSize=50,desiredRecall=0.99,chunkBucket=1 0 " "" -do_run 1 "vptree" " -c tuneK=$K,bucketSize=50,desiredRecall=0.975,chunkBucket=1 0 " "" -do_run 1 "vptree" " -c tuneK=$K,bucketSize=50,desiredRecall=0.95,chunkBucket=1 0 " "" -do_run 1 "vptree" " -c tuneK=$K,bucketSize=50,desiredRecall=0.925,chunkBucket=1 0 " "" -do_run 1 "vptree" " -c tuneK=$K,bucketSize=50,desiredRecall=0.9,chunkBucket=1 0 " "" +do_run 1 "vptree" " -c tuneK=$K,bucketSize=50,desiredRecall=0.99,chunkBucket=1 " "0" "" "" +do_run 1 "vptree" " -c tuneK=$K,bucketSize=50,desiredRecall=0.975,chunkBucket=1 " "0" "" "" +do_run 1 "vptree" " -c tuneK=$K,bucketSize=50,desiredRecall=0.95,chunkBucket=1 " "0" "" "" +do_run 1 "vptree" " -c tuneK=$K,bucketSize=50,desiredRecall=0.925,chunkBucket=1 " "0" "" "" +do_run 1 "vptree" " -c tuneK=$K,bucketSize=50,desiredRecall=0.9,chunkBucket=1 " "0" "" "" if [ "$GEN_PLOT" = 1 ] ; then ./genplot_configurable.py -i ${RESULT_FILE}_K=${K}.dat -o plot_${K}_NN -x 1~norm~Recall -y 1~log~ImprEfficiency -l "1~south west" -t "Improvement in efficiency vs recall" -n "MethodName" -a axis_desc.txt -m meth_desc.txt diff --git a/similarity_search/src/method/hnsw.cc b/similarity_search/src/method/hnsw.cc index ebdd417..9a2dc1a 100644 --- a/similarity_search/src/method/hnsw.cc +++ b/similarity_search/src/method/hnsw.cc @@ -1183,7 +1183,7 @@ namespace similarity { typedef typename SortArrBI::Item QueueItem; vector &queueData = sortedArr.get_data(); - vector itemBuff(1 + max(M_, max(maxM_, maxM0_))); + vector itemBuff(1 + max(maxM_, maxM0_)); massVisited[curNode->getId()] = currentV; // visitedQueue.insert(curNode->getId()); diff --git a/similarity_search/src/method/hnsw_distfunc_opt.cc b/similarity_search/src/method/hnsw_distfunc_opt.cc index ee1966e..d6f2ee3 100644 --- a/similarity_search/src/method/hnsw_distfunc_opt.cc +++ b/similarity_search/src/method/hnsw_distfunc_opt.cc @@ -532,7 +532,7 @@ namespace similarity { typedef typename SortArrBI::Item QueueItem; vector &queueData = sortedArr.get_data(); - vector itemBuff(1 + max(M_, max(maxM_, maxM0_))); + vector itemBuff(1 + max(maxM_, maxM0_)); massVisited[curNodeNum] = currentV; @@ -791,7 +791,7 @@ namespace similarity { typedef typename SortArrBI::Item QueueItem; vector &queueData = sortedArr.get_data(); - vector itemBuff(1 + max(M_, max(maxM_, maxM0_))); + vector itemBuff(1 + max(maxM_, maxM0_)); massVisited[curNodeNum] = currentV;