Permalink
Browse files

Default bmaxDivN to 4 * nthreads

  • Loading branch information...
1 parent 7b2b381 commit 043e95c4aa36c7cc8a3170c4c46b79e3c2dcdc1a @ch4rr0 ch4rr0 committed Jun 6, 2017
Showing with 5 additions and 0 deletions.
  1. +5 −0 ebwt_build.cpp
View
@@ -216,6 +216,7 @@ static int parseNumber(T lower, const char *errmsg) {
static void parseOptions(int argc, const char **argv) {
int option_index = 0;
int next_option;
+ bool bmaxDivNSet = false;
do {
next_option = getopt_long(
argc, const_cast<char**>(argv),
@@ -261,6 +262,7 @@ static void parseOptions(int argc, const char **argv) {
bmaxDivN = 0xffffffff; // don't use multSqrt
break;
case ARG_BMAX_DIV:
+ bmaxDivNSet = true;
bmaxDivN = parseNumber<uint32_t>(1, "--bmaxdivn arg must be at least 1");
bmax = OFF_MASK; // don't use bmax
bmaxMultSqrt = OFF_MASK; // don't use multSqrt
@@ -296,6 +298,9 @@ static void parseOptions(int argc, const char **argv) {
<< "extremely slow performance and memory exhaustion. Perhaps you meant to specify" << endl
<< "a small --bmaxdivn?" << endl;
}
+ if (!bmaxDivNSet) {
+ bmaxDivN *= nthreads;
+ }
}
/**

0 comments on commit 043e95c

Please sign in to comment.