diff options
Diffstat (limited to 'src/Buffer.cpp')
-rw-r--r-- | src/Buffer.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Buffer.cpp b/src/Buffer.cpp index cef4ad5..7fe0334 100644 --- a/src/Buffer.cpp +++ b/src/Buffer.cpp @@ -69,8 +69,10 @@ void Buffer::setLength(size_t len) { if (len > size) { void *tmp = data; - //data = _mm_malloc(len, 16); - data = memalign(16, len); + + /* Align to 32-byte boundary for AVX. */ + data = memalign(32, len); + memcpy(data, tmp, this->len); free(tmp); size = len; |