1. 11 Jun, 2021 5 commits
  2. 10 Jun, 2021 1 commit
  3. 28 May, 2021 1 commit
  4. 26 May, 2021 1 commit
  5. 25 May, 2021 1 commit
  6. 23 May, 2021 1 commit
    • Antonio Sánchez's avatar
      Modify Unary/Binary/TernaryOp evaluators to work for non-class types. · ebb300d0
      Antonio Sánchez authored
      This used to work for non-class types (e.g. raw function pointers) in
      Eigen 3.3.  This was changed in commit 11f55b29 to optimize the
      evaluator:
      
      > `sizeof((A-B).cwiseAbs2())` with A,B Vector4f is now 16 bytes, instead of 48 before this optimization.
      
      though I cannot reproduce the 16 byte result.  Both before the change
      and after, with multiple compilers/versions, I always get a result of 40 bytes.
      
      https://godbolt.org/z/MsjTc1PGe
      
      This change modifies the code slightly to allow non-class types.  The
      final generated code is identical, and the expression remains 40 bytes
      for the `abs2` sample case.
      
      Fixes #2251
      ebb300d0
  7. 21 May, 2021 2 commits
  8. 20 May, 2021 1 commit
    • Niall Murphy's avatar
      Use derived object type in conservative_resize_like_impl · 391094c5
      Niall Murphy authored
      When calling conservativeResize() on a matrix with DontAlign flag, the
      temporary variable used to perform the resize should have the same
      Options as the original matrix to ensure that the correct override of
      swap is called (i.e. PlainObjectBase::swap(DenseBase<OtherDerived> &
      other). Calling the base class swap (i.e in DenseBase) results in
      assertions errors or memory corruption.
      391094c5
  9. 19 May, 2021 1 commit
  10. 13 May, 2021 1 commit
  11. 11 May, 2021 3 commits
  12. 10 May, 2021 2 commits
  13. 07 May, 2021 3 commits
    • Antonio Sánchez's avatar
      Restore ABI compatibility for conj with 3.3, fix conflict with boost. · c0eb5f89
      Antonio Sánchez authored
      The boost library unfortunately specializes `conj` for various types and
      assumes the original two-template-parameter version.  This changes
      restores the second parameter.  This also restores ABI compatibility.
      
      The specialization for `std::complex` is because `std::conj` is not
      a device function. For custom complex scalar types, users should provide
      their own `conj` implementation.
      
      We may consider removing the unnecessary second parameter in the future - but
      this will require modifying boost as well.
      
      Fixes #2112.
      c0eb5f89
    • Antonio Sánchez's avatar
      Clean up gpu device properties. · 0eba8a1f
      Antonio Sánchez authored
      Made a class and singleton to encapsulate initialization and retrieval of
      device properties.
      
      Related to !481, which already changed the API to address a static
      linkage issue.
      0eba8a1f
    • Antonio Sánchez's avatar
      Fix numext::arg return type. · 90e9a33e
      Antonio Sánchez authored
      The cxx11 path for `numext::arg` incorrectly returned the complex type
      instead of the real type, leading to compile errors. Fixed this and
      added tests.
      
      Related to !477, which uncovered the issue.
      90e9a33e
  14. 06 May, 2021 1 commit
  15. 04 May, 2021 1 commit
    • Antonio Sánchez's avatar
      Simplify TensorRandom and remove time-dependence. · e3b7f596
      Antonio Sánchez authored
      Time-dependence prevents tests from being repeatable. This has long
      been an issue with debugging the tensor tests. Removing this will allow
      future tests to be repeatable in the usual way.
      
      Also, the recently added macros in !476 are causing headaches across different
      platforms. For example, checking `_XOPEN_SOURCE` is leading to multiple
      ambiguous macro errors across Google, and `_DEFAULT_SOURCE`/`_SVID_SOURCE`/`_BSD_SOURCE`
      are sometimes defined with values, sometimes defined as empty, and sometimes
      not defined at all when they probably should be.  This is leading to
      multiple build breakages.
      
      The simplest approach is to generate a seed via
      `Eigen::internal::random<uint64_t>()` if on CPU. For GPU, we use a
      hash based on the current thread ID (since `rand()` isn't supported
      on GPU).
      
      Fixes #1602.
      e3b7f596
  16. 29 Apr, 2021 1 commit
    • Antonio Sánchez's avatar
      Better CUDA complex division. · 1c013be2
      Antonio Sánchez authored
      The original produced NaNs when dividing 0/b for subnormal b.
      The `complex_divide_stable` was changed to use the more common
      Smith's algorithm.
      1c013be2
  17. 27 Apr, 2021 1 commit
  18. 26 Apr, 2021 1 commit
  19. 25 Apr, 2021 1 commit
  20. 23 Apr, 2021 2 commits
    • Jakub Lichman's avatar
      Tests for pcmp_lt and pcmp_le added · 1115f546
      Jakub Lichman authored
      1115f546
    • Turing Eret's avatar
      Fix for issue with static global variables in TensorDeviceGpu.h · 3804ca0d
      Turing Eret authored
      m_deviceProperties and m_devicePropInitialized are defined as global
      statics which will define multiple copies which can cause issues if
      initializeDeviceProp() is called in one translation unit and then
      m_deviceProperties is used in a different translation unit. Added
      inline functions getDeviceProperties() and getDevicePropInitialized()
      which defines those variables as static locals. As per the C++ standard
      7.1.2/4, a static local declared in an inline function always refers
      to the same object, so this should be safer. Credit to Sun Chenggen
      for this fix.
      
      This fixes issue #1475.
      3804ca0d
  21. 22 Apr, 2021 3 commits
  22. 21 Apr, 2021 2 commits
  23. 20 Apr, 2021 2 commits
  24. 18 Apr, 2021 1 commit
  25. 13 Apr, 2021 1 commit
    • Antonio Sánchez's avatar
      Modify googlehash use to account for namespace issues. · 69adf26a
      Antonio Sánchez authored
      The namespace declaration for googlehash is a configurable macro that
      can be disabled.  In particular, it is disabled within google, causing
      compile errors since `dense_hash_map`/`sparse_hash_map` are then in
      the global namespace instead of in `::google`.
      
      Here we play a bit of gynastics to allow for both `google::*_hash_map`
      and `*_hash_map`, while limiting namespace polution.  Symbols within
      the `::google` namespace are imported into `Eigen::google`.
      
      We also remove checks based on `_SPARSE_HASH_MAP_H_`, as this is
      fragile, and instead require `EIGEN_GOOGLEHASH_SUPPORT` to be
      defined.
      69adf26a