Go to file
Francesco Mazzoli 5ca10480b0 avoid selecting half-packets when unnecessary
See
<https://stackoverflow.com/questions/59709148/ensuring-that-eigen-uses-avx-vectorization-for-a-certain-operation>
for an explanation of the problem this solves.

In short, for some reason, before this commit the half-packet is
selected when the array / matrix size is not a multiple of
`unpacket_traits<PacketType>::size`, where `PacketType` starts out
being the full Packet.

For example, for some data of 100 `float`s, `Packet4f` will be
selected rather than `Packet8f`, because 100 is not a multiple of 8,
the size of `Packet8f`.

This commit switches to selecting the half-packet if the size is
less than the packet size, which seems to make more sense.

As I stated in the SO post I'm not sure that I'm understanding the
issue correctly, but this fix resolves the issue in my program. Moreover,
`make check` passes, with the exception of line 614 and 616 in
`test/packetmath.cpp`, which however also fail on master on my machine:

    CHECK_CWISE1_IF(PacketTraits::HasBessel, numext::bessel_i0, internal::pbessel_i0);
    ...
    CHECK_CWISE1_IF(PacketTraits::HasBessel, numext::bessel_i1, internal::pbessel_i1);
2020-02-07 18:16:16 +01:00
bench update hg to git hashes 2019-12-05 16:33:24 +01:00
blas
cmake
debug
demos
doc Fix formatting 2020-01-08 13:58:18 +01:00
Eigen avoid selecting half-packets when unnecessary 2020-02-07 18:16:16 +01:00
failtest
lapack
scripts Replace calls to "hg" by calls to "git" 2019-12-04 11:24:06 +01:00
test Removing executable bit from file mode 2020-01-11 15:02:29 +01:00
unsupported Fail at compile time if default executor tries to use non-default device 2020-02-06 22:43:24 +00:00
.gitignore Renamed .hgignore to .gitignore (removing hg-specific "syntax" line) 2019-12-13 19:40:57 +01:00
.hgeol
CMakeLists.txt Replace calls to "hg" by calls to "git" 2019-12-04 11:24:06 +01:00
COPYING.BSD
COPYING.GPL
COPYING.LGPL
COPYING.MINPACK
COPYING.MPL2
COPYING.README
CTestConfig.cmake
CTestCustom.cmake.in
eigen3.pc.in
INSTALL
README.md
signature_of_eigen3_matrix_library

Eigen is a C++ template library for linear algebra: matrices, vectors, numerical solvers, and related algorithms.

For more information go to http://eigen.tuxfamily.org/.

For pull request, bug reports, and feature requests, go to https://gitlab.com/libeigen/eigen.