diff options
author | Lars Buitinck <larsmans@gmail.com> | 2013-10-14 19:36:38 +0200 |
---|---|---|
committer | Lars Buitinck <larsmans@gmail.com> | 2013-11-21 17:48:20 +0100 |
commit | 46dd681ff4aed02a87b27db684f8600b5b7a7fa3 (patch) | |
tree | 868c77952465ff3d6a2a9a0935fba900f9d0cf7e /numpy/f2py/docs/usersguide/setup_example.py | |
parent | 78e29a323316642899f8ff85e538b785f0d5e31f (diff) | |
download | numpy-46dd681ff4aed02a87b27db684f8600b5b7a7fa3.tar.gz |
BUG/ENH: blasdot: make *dot calls 64-bit safe
BLAS uses int for all its size types, so the size is going to be
silently truncated on platforms where sizeof npy_intp > sizeof int,
i.e. on modern 64-bit platforms. In this case, we do a dot product
in reasonably-sized chunks and add the result ourselves.
On platforms where sizeof(int) == sizeof(npy_intp), i.e. typical
32-bit platforms, it's up to the compiler to optimize the loop away.
Also tried to make the code more readable, replaced int by npy_intp
in a few places and removed useless register declarations (modern
compilers ignore those).
Diffstat (limited to 'numpy/f2py/docs/usersguide/setup_example.py')
0 files changed, 0 insertions, 0 deletions