2612 Commits

Author SHA1 Message Date
Antonio Sánchez
9441d94dcc Revert "Make fixed-size Matrix and Array trivially copyable after C++20"
This reverts commit 47eac21072ec8c225d03c139dd9632bc5c19fd83
2022-02-05 04:40:29 +00:00
Rasmus Munk Larsen
979fdd58a4 Add generic fast psqrt and prsqrt impls and make them correct for 0, +Inf, NaN, and negative arguments. 2022-02-05 00:20:13 +00:00
Arthur
18b50458b6 Update SVD Module with Options template parameter 2022-02-02 00:15:44 +00:00
Rasmus Munk Larsen
7db0ac977a Remove extraneous ")". 2022-01-27 02:20:03 +00:00
Rasmus Munk Larsen
09c0085a57 Only test pmsub, pnmadd, and pnmsub on signed types. 2022-01-27 02:09:25 +00:00
Rasmus Munk Larsen
8f2c6f0aa6 Make preciprocal IEEE compliant w.r.t. 1/0 and 1/inf. 2022-01-26 20:38:05 +00:00
Erik Schultheis
d271a7d545 reduce float warnings (comparisons and implicit conversions) 2022-01-26 18:16:19 +00:00
Rasmus Munk Larsen
51311ec651 Remove inline assembly for FMA (AVX) and add remaining extensions as packet ops: pmsub, pnmadd, and pnmsub. 2022-01-26 04:25:41 +00:00
Erik Schultheis
4e629b3c1b make casts explicit and fixed the type 2022-01-24 18:19:21 +00:00
Rasmus Munk Larsen
ea2c02060c Add reciprocal packet op and fast specializations for float with SSE, AVX, and AVX512. 2022-01-21 23:49:18 +00:00
Arthur Feeney
4b0926f99b Prevent heap allocation in diagonal product 2022-01-21 21:15:44 +00:00
Erik Schultheis
970640519b Cleanup 2022-01-21 01:48:59 +00:00
Lingzhu Xiang
47eac21072 Make fixed-size Matrix and Array trivially copyable after C++20
Making them trivially copyable allows using std::memcpy() without undefined
behaviors.

Only Matrix and Array with trivially copyable DenseStorage are marked as
trivially copyable with an additional type trait.

As described in http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p0848r3.html
it requires extremely verbose SFINAE to make the special member functions of
fixed-size Matrix and Array trivial, unless C++20 concepts are available to
simplify the selection of trivial special member functions given template
parameters. Therefore only make this feature available to compilers that support
C++20 P0848R3.

Fix #1855.
2022-01-07 19:04:35 +00:00
Rasmus Munk Larsen
96dc37a03b Some fixes/cleanups for numeric_limits & fix for related bug in psqrt 2022-01-07 01:10:17 +00:00
Rasmus Munk Larsen
7b5a8b6bc5 Improve plog: 20% speedup for float + handle denormals 2022-01-05 23:40:31 +00:00
Andrew Johnson
a491c7f898 Allow specifying inner & outer stride for CWiseUnaryView - fixes #2398 2022-01-05 19:24:46 +00:00
Rohit Santhanam
27a78e4f96 Some serialization API changes were made in commit... 2022-01-05 16:18:45 +00:00
Lingzhu Xiang
7244a74ab0 Add bounds checking to Eigen serializer 2022-01-03 17:00:24 +08:00
David Tellenbach
22a347b9d2 Remove unused EIGEN_HAS_STATIC_ARRAY_TEMPLATE
ec2fd0f7 removed the EIGEN_HAS_STATIC_ARRAY_TEMPLATE but forgot to remove this
last occurrence.

This fixes issue #2399.
2021-12-30 15:26:55 +00:00
David Tellenbach
d705eb5f86 Revert "Select AVX2 even if the data size is not a multiple of 8"
Tests are failing for AVX and NEON.

This reverts commit eb85b97339e3791d533592bac20999b1b3ebca09.
2021-12-28 23:57:06 +01:00
David Tellenbach
6e95c0cd9a Add missing internal namespace
The vectorization logic tests miss some namespace internal qualifiers.
2021-12-27 23:50:32 +00:00
Erik Schultheis
f7a056bf04 Small fixes
This MR fixes a bunch of smaller issues, making the following changes:

* Template parameters in the documentation are documented with `\tparam` instead
  of `\param`
* Superfluous semicolon warnings fixed
* Fixed the type of literals used to initialize float variables
2021-12-21 16:46:09 +00:00
Erik Schultheis
c20e908ebc turn some macros intro constexpr functions 2021-12-10 19:27:01 +00:00
Erik Schultheis
495ffff945 removed helper cmake macro and don't use deprecated COMPILE_FLAGS anymore. 2021-12-09 23:09:56 +00:00
Rasmus Munk Larsen
f04fd8b168 Make sure exp(-Inf) is zero for vectorized expressions. This fixes #2385. 2021-12-08 17:57:23 +00:00
Erik Schultheis
cc11e240ac Some further cleanup 2021-12-06 18:01:15 +00:00
Erik Schultheis
ec2fd0f7ed Require recent GCC and MSCV and removed EIGEN_HAS_CXX14 and some other feature test macros 2021-12-01 00:48:34 +00:00
Rasmus Munk Larsen
085c2fc5d5 Revert "Update SVD Module to allow specifying computation options with a... 2021-11-30 18:45:54 +00:00
Jakub Gałecki
1b8dce564a bugfix: issue #2375 2021-11-29 22:26:15 +00:00
Francesco Mazzoli
eb85b97339 Select AVX2 even if the data size is not a multiple of 8 2021-11-29 21:13:24 +00:00
Arthur
eef33946b7 Update SVD Module to allow specifying computation options with a template parameter. Resolves #2051 2021-11-29 20:50:46 +00:00
Erik Schultheis
f33a31b823 removed EIGEN_HAS_CXX11_* and redundant EIGEN_COMP_CXXVER checks 2021-11-29 19:18:57 +00:00
Erik Schultheis
ec4efbd696 remove EIGEN_HAS_CXX11 2021-11-24 20:08:49 +00:00
Erik Schultheis
7e586635ba don't use deprecated MappedSparseMatrix 2021-11-19 15:58:04 +00:00
Erik Schultheis
b0fb5417d3 Fixed Sparse-Sparse Product in case of mixed StorageIndex types 2021-11-18 18:33:31 +00:00
Erik Schultheis
13954c4440 moved pruning code to SparseVector.h 2021-11-15 22:16:01 +00:00
Minh Quan HO
4284c68fbb nestbyvalue test: fix uninitialized matrix
- Doing computation with uninitialized (zero-ed ? but thanks Linux) matrix, or
worse NaN on other non-linux systems.
- This commit fixes it by initializing to Random().
2021-11-04 14:32:12 +01:00
Xinle Liu
478a1bdda6 Fix total deflation issue in BDCSVD, when & only when M is already diagonal. 2021-11-02 16:53:55 +00:00
Maxiwell S. Garcia
99600bd1a6 test: fix boostmutiprec test to compile with older Boost versions
Eigen boostmultiprec test redefines a symbol that is already defined
inside Boot Math [1]. Boost has fixed it recently [2], but this
patch avoids errors if Boost version was less than 1.77.

https://github.com/boostorg/math/blob/boost-1.76.0/include/boost/math/policies/policy.hpp#L18
6830712302 (diff-c7a8e5911c2e6be4138e1a966d762200f147792ac16ad96fdcc724313d11f839)
2021-10-25 20:32:33 +00:00
Rasmus Munk Larsen
2d3fec8ff6 Add nan-propagation options to matrix and array plugins. 2021-10-21 19:40:11 +00:00
Antonio Sanchez
fd5f48e465 Fix tuple compilation for VS2017.
VS2017 doesn't like deducing alias types, leading to a bunch of compile
errors for functions involving the `tuple` alias.  Replacing with
`TupleImpl` seems to solve this, allowing the test to compile/pass.
2021-10-20 19:18:34 +00:00
Antonio Sanchez
701f5d1c91 Fix gpu special function tests.
Some checks used incorrect values, partly from copy-paste errors,
partly from the change in behaviour introduced in !398.

Modified results to match scipy, simplified tests by updating
`VERIFY_IS_CWISE_APPROX` to work for scalars.
2021-10-01 10:20:50 -07:00
Antonio Sanchez
f0f1d7938b Disable testing of complex compound assignment operators for MSVC.
MSVC does not support specializing compound assignments for
`std::complex`, since it already specializes them (contrary to the
standard).

Trying to use one of these on device will currently lead to a
duplicate definition error.  This is still probably preferable
to no error though.  If we remove the definitions for MSVC, then
it will compile, but the kernel will fail silently.

The only proper solution would be to define our own custom `Complex`
type.
2021-09-27 15:15:11 -07:00
Kolja Brix
51a0b4e2d2 Reorganize test main file 2021-09-27 18:30:47 +00:00
Antonio Sanchez
de218b471d Add -arch=<arch> argument for nvcc.
Without this flag, when compiling with nvcc, if the compute architecture of a card does
not exactly match any of those listed for `-gencode arch=compute_<arch>,code=sm_<arch>`,
then the kernel will fail to run with:
```
cudaErrorNoKernelImageForDevice: no kernel image is available for execution on the device.
```
This can happen, for example, when compiling with an older cuda version
that does not support a newer architecture (e.g. T4 is `sm_75`, but cuda
9.2 only supports up to `sm_70`).

With the `-arch=<arch>` flag, the code will compile and run at the
supplied architecture.
2021-09-24 20:48:01 -07:00
Antonio Sanchez
846d34384a Rename EIGEN_CUDA_FLAGS to EIGEN_CUDA_CXX_FLAGS
Also add a missing space for clang.
2021-09-24 20:15:55 -07:00
Antonio Sanchez
7b00e8b186 Clean up CUDA CMake files.
- Unify test/CMakeLists.txt and unsupported/test/CMakeLists.txt
- Added `EIGEN_CUDA_FLAGS` that are appended to the set of flags passed
to the cuda compiler (nvcc or clang).

The latter is to support passing custom flags (e.g. `-arch=` to nvcc,
or to disable cuda-specific warnings).
2021-09-24 14:43:59 -07:00
Kolja Brix
afa616bc9e Fix some typos found 2021-09-23 15:22:00 +00:00
sciencewhiz
4b6036e276 fix various typos 2021-09-22 16:15:06 +00:00
Antonio Sanchez
f49217e52b Fix implicit conversion warnings in tuple_test.
Fixes #2329.
2021-09-17 19:40:22 -07:00