Skip to content

Commit 6f1db3a

Browse files
committed
Fix bug in main gemmi function
Reported by Yuki Uchino.
1 parent ddc562e commit 6f1db3a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/gemmi.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ std::vector<fp_t> gemmi (const std::vector<fp_t> &A, const std::vector<fp_t> &B,
447447
const size_t bitsInAccumulator = std::numeric_limits<accumulator_t>::digits;
448448
const size_t bitsPerInteger = std::numeric_limits<splitint_t>::digits;
449449
assert(bitsPerInteger <= bitsInAccumulator / 2);
450-
const size_t alpha = std::floor((bitsInAccumulator - log2(n)) / 2);
450+
const size_t alpha = std::floor((bitsInAccumulator - log2(k)) / 2);
451451
const size_t bitsPerSlice = std::min(bitsPerInteger, static_cast<size_t>(alpha));
452452

453453
auto splitA = MatrixSplit<splitint_t, fp_t>(A, m, k, splitType, numSplitsA, bitsPerSlice, normalisationDimension::byRows);

0 commit comments

Comments
 (0)