Skip to content

Commit 9668e96

Browse files
committed
Don't show misleading memory estimate for prefilter-less precomputed index
1 parent 829003a commit 9668e96

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/util/indexdb.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,13 @@ int indexdb(int argc, const char **argv, const Command &command) {
9494

9595
int splitMode = Parameters::TARGET_DB_SPLIT;
9696
par.maxResListLen = std::min(dbr.getSize(), par.maxResListLen);
97-
Prefiltering::setupSplit(dbr, seedSubMat->alphabetSize - 1, dbr.getDbtype(), par.threads, false, memoryLimit, 1, par.maxResListLen, par.kmerSize, par.split, splitMode);
97+
const bool noKmerIndex = (par.indexSubset & Parameters::INDEX_SUBSET_NO_PREFILTER) != 0;
98+
if (noKmerIndex) {
99+
par.kmerSize = 0;
100+
par.split = 1;
101+
} else {
102+
Prefiltering::setupSplit(dbr, seedSubMat->alphabetSize - 1, dbr.getDbtype(), par.threads, false, memoryLimit, 1, par.maxResListLen, par.kmerSize, par.split, splitMode);
103+
}
98104

99105
bool kScoreSet = false;
100106
for (size_t i = 0; i < par.indexdb.size(); i++) {

0 commit comments

Comments
 (0)