Skip to content
Snippets Groups Projects

Draft: Extend pexp_complex for double

Reference issue

This MR follows the SIMD implementation campaign #2635. This MR involves the extension of pexp_complex for double precision.

What does this implement/fix?

This MR is a draft (for the moment) implementing the extension of pexp_complex for double precision.

Additional information

References values in NEON are wrong in some edge cases. I will think of a workaround, but we might start discussing about the presence of psincos_aux , which is an auxiliary function I used to avoid duplicating the code of pexp_complex for float and double .

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
425 426 return plog_complex<Packet2cf>(a);
426 427 }
427 428
429 template <>
430 EIGEN_STRONG_INLINE Packet1cd pexp<Packet1cd>(const Packet1cd& a) {
431 return pexp_complex<Packet1cd>(a);
  • Is this faster than a simple call to std::exp? Even if its not but close, I still think its worth it for more complex expressions. Just curious.

  • Unfortunately, it is pretty slow. I also checked the performances of pexp_complex for double with other architectures, and it makes vectorization worth only for AVX512. I find it quite weird because the performances of vectorized sincos and exp (no complex numbers) with double are already faster with AVX2 (similar performances with SSE 4.1).

  • Damiano Franzò changed this line in version 3 of the diff

    changed this line in version 3 of the diff

  • Please register or sign in to reply
  • Damiano Franzò added 3 commits

    added 3 commits

    Compare with previous version

  • 1016 1016 return cos(a);
    1017 1017 }
    1018 1018
    1019 /** \internal \returns the sine cosine of \a a (coeff-wise) */
    1020 template <typename Packet>
    1021 EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS Packet psincos_aux(const Packet& a) {
    1022 EIGEN_USING_STD(sin);
    1023 EIGEN_USING_STD(cos);
    1024 return pselect(peven_mask(a), sin(a), cos(a));
  • Damiano Franzò added 269 commits

    added 269 commits

    Compare with previous version

  • added 1 commit

    • 0835085a - Extend pexp_complex for double

    Compare with previous version

  • Please register or sign in to reply
    Loading