Skip to content

Commit

Permalink
Finishing with #264 : one shouldn't use M_ anywhere in the code after…
Browse files Browse the repository at this point in the history
… maxM and maxM0 are initialized
  • Loading branch information
searchivairus committed Jan 7, 2018
1 parent c409c1d commit be1b99b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions scripts/test_run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion similarity_search/src/method/hnsw.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1183,7 +1183,7 @@ namespace similarity {

typedef typename SortArrBI<dist_t, HnswNode *>::Item QueueItem;
vector<QueueItem> &queueData = sortedArr.get_data();
vector<QueueItem> itemBuff(1 + max(M_, max(maxM_, maxM0_)));
vector<QueueItem> itemBuff(1 + max(maxM_, maxM0_));

massVisited[curNode->getId()] = currentV;
// visitedQueue.insert(curNode->getId());
Expand Down
4 changes: 2 additions & 2 deletions similarity_search/src/method/hnsw_distfunc_opt.cc
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,7 @@ namespace similarity {

typedef typename SortArrBI<dist_t, int>::Item QueueItem;
vector<QueueItem> &queueData = sortedArr.get_data();
vector<QueueItem> itemBuff(1 + max(M_, max(maxM_, maxM0_)));
vector<QueueItem> itemBuff(1 + max(maxM_, maxM0_));

massVisited[curNodeNum] = currentV;

Expand Down Expand Up @@ -791,7 +791,7 @@ namespace similarity {

typedef typename SortArrBI<dist_t, int>::Item QueueItem;
vector<QueueItem> &queueData = sortedArr.get_data();
vector<QueueItem> itemBuff(1 + max(M_, max(maxM_, maxM0_)));
vector<QueueItem> itemBuff(1 + max(maxM_, maxM0_));

massVisited[curNodeNum] = currentV;

Expand Down

0 comments on commit be1b99b

Please sign in to comment.