Skip to content

Commit 279e6ca

Browse files
committed
[FIXES-#118] floating point exception in indexer
1 parent cf116cb commit 279e6ca

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/mkindex_misc.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -376,10 +376,10 @@ createRankDictionaryProgress(LF<StringSet<TText, TSSetSpec>, TSpec, TConfig> & l
376376
/* Compute the rest of the bwt.*/
377377

378378
// align the chunk_size to underlying word boundaries to prevent parallel write to word spanning chunk boundary
379-
uint64_t chunkSize = _max((length(sa) / omp_get_max_threads() / 64) * 64, 1ull);
380-
uint64_t twoPercent = chunkSize / 50;
379+
uint64_t const chunkSize = std::max(static_cast<uint64_t>((length(sa) / omp_get_max_threads() / 64ull) * 64ull), uint64_t{1});
380+
uint64_t const twoPercent = std::max(chunkSize / 50, uint64_t{1});
381381
// the 0th thread might get an additional chunk because of the above alignment so we count from the 1st instead
382-
uint32_t countThreadID = omp_get_max_threads() > 1 ? 1 : 0;
382+
uint32_t const countThreadID = omp_get_max_threads() > 1 ? 1 : 0;
383383

384384
SEQAN_OMP_PRAGMA(parallel for schedule(static, chunkSize))
385385
for (TSize i = 0; i < length(sa); ++i)

0 commit comments

Comments
 (0)