diff options
author | Julian Taylor <jtaylor.debian@googlemail.com> | 2014-06-17 18:58:35 +0200 |
---|---|---|
committer | Julian Taylor <jtaylor.debian@googlemail.com> | 2014-07-01 19:24:38 +0200 |
commit | fc5d7cfbac9370c92a42450d1921aebe9c9405f5 (patch) | |
tree | 89b79ea7f59bc9a90ce9d54c42e63f711333f38a /numpy/lib/nanfunctions.py | |
parent | b25cdd68ee38de1be374b396b3b72460c17cad79 (diff) | |
download | numpy-fc5d7cfbac9370c92a42450d1921aebe9c9405f5.tar.gz |
BUG: limit type alignment to the largest alignment needed by numpy
clongdouble type required alignment of 32 bytes which is never provided
by numpys allocation scheme so they always took unaligned paths.
As complex types are structs of two smaller types only half the
alignment is actually required for operations on them.
Copying complex types on the other hand might require a larger alignment
as copies can be done on the whole structure so one can not just remove
the doubling of the alignment.
As a compromise limit the maximum alignment to 16 bytes which is double
what the current numpy copy loops require and does not penalize amd64
with unnecessary unaligned code paths in most cases.
16 bytes might be required on sparc to load long doubles.
Complex doubles on i386 will still unnecessarly take unaligned code
paths as the system will not provide 16 byte alignment.
Closes gh-3768
Diffstat (limited to 'numpy/lib/nanfunctions.py')
0 files changed, 0 insertions, 0 deletions