diff options
author | Kenneth Heafield <github@kheafield.com> | 2020-04-28 21:41:55 +0300 |
---|---|---|
committer | Kenneth Heafield <github@kheafield.com> | 2020-04-28 21:41:55 +0300 |
commit | 18c0a52f9ffba01387b5d0aa6028e4951fcc0aef (patch) | |
tree | 025ac8c78d261da5ea18f687ca5505e7f79d47de | |
parent | 0dbb83a7bece1c5b61c5826c5bcd1d0c6e596bf8 (diff) |
Fix void * error on g++ 8.4.0. Weird error.
-rw-r--r-- | tile/access.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tile/access.h b/tile/access.h index e8e09e5..aa8365e 100644 --- a/tile/access.h +++ b/tile/access.h @@ -67,7 +67,10 @@ template <class T> class RowMajorAccess { constexpr Index remaining = (A_rows - 1) * B_cols + ColRemain; // Compilers seem to complain a lot about shifting past the end :-( constexpr __mmask16 mask = (remaining >= 16) ? 0xffff : (static_cast<__mmask16>(1 << remaining) - 1); - _mm512_mask_i32scatter_epi32(data_ - (B_cols - ColRemain), mask, offsets, *from, sizeof(int32_t)); + // The offsets add B_cols - ColRemain so they can be correct modulo the number of columns. + // So we subtract that from the data pointer. + int32_t *go_back = data_ - (B_cols - ColRemain); + _mm512_mask_i32scatter_epi32(go_back, mask, offsets, *from, sizeof(int32_t)); // We just wrote 16 values: ColRemain, the next row (all or partial), possibly the next etc. // 16 - ColRemain of the next row and whatever followed. constexpr Index Wrote = ((remaining < 16) ? remaining : 16); |