diff options
author | Nikolay Bogoychev <nheart@gmail.com> | 2021-03-24 00:32:01 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-24 00:32:01 +0300 |
commit | ffd997e36015e1022a122095ebb8e147c5b59650 (patch) | |
tree | 2119738a8f2edfbb1328be39205d00475fb9a286 /src | |
parent | b36d0bbbab1fa4d435e517c974c3fde96e3145fe (diff) |
Properly copy the entire vector in the int16_t case (#845)
Fixes #842 #843 #844
Diffstat (limited to 'src')
-rw-r--r-- | src/tensors/cpu/integer_common.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tensors/cpu/integer_common.h b/src/tensors/cpu/integer_common.h index 6e96f8cd..cb372a74 100644 --- a/src/tensors/cpu/integer_common.h +++ b/src/tensors/cpu/integer_common.h @@ -198,7 +198,7 @@ void prepareAndTransposeB(io::Item& item, const char * input) { cols(item.shape)); //rows here returns the columns of the transposed input matrix, and cols -> the rows } else { Integer * aligned_input = reinterpret_cast<Integer *>(genericMalloc(512, rows(item.shape)*cols(item.shape)*sizeof(Integer))); - std::copy(input, input + rows(item.shape)*cols(item.shape), aligned_input); + std::copy(reinterpret_cast<const Integer *>(input), reinterpret_cast<const Integer *>(input) + rows(item.shape)*cols(item.shape), aligned_input); Integer * aligned_output = reinterpret_cast<Integer *>(genericMalloc(512, rows(item.shape)*cols(item.shape)*sizeof(Integer))); intgemm_<vtype>::width::PrepareBQuantizedTransposed(reinterpret_cast<const Integer *>(aligned_input), reinterpret_cast<Integer *>(aligned_output), |