Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Define real, imag, conj, angle, and abs2 for Vec{N,<:Real} #127

Merged
merged 4 commits into from
Sep 18, 2024

Conversation

favba
Copy link
Contributor

@favba favba commented Sep 10, 2024

Addresses #126

@favba favba changed the title Define real and conj for Vec{N,<:Real} Define real, conj and abs2 for Vec{N,<:Real} Sep 17, 2024
@favba favba changed the title Define real, conj and abs2 for Vec{N,<:Real} Define real, imag, conj, angle, and abs2 for Vec{N,<:Real} Sep 17, 2024
@favba
Copy link
Contributor Author

favba commented Sep 17, 2024

Hi, @KristofferC
This a quite simple PR that implements complex number functions (real,imag,angle,abs2) for the supported types by SIMD.jl

It is useful for calling with Vecs generic definitions of functions that should work for both complex and Real numbers. That is indeed how I encountered this issue (I used conj and real functions).

I didn't implement angle(::Vec{N,Integer} as that would involve a different output type, and I thought the conversion might be better handled explicitly by the programmer.

This PR is pretty much complete now.

@codecov-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.86%. Comparing base (c332a03) to head (1110296).

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #127      +/-   ##
==========================================
+ Coverage   88.77%   88.86%   +0.09%     
==========================================
  Files           5        5              
  Lines         561      566       +5     
==========================================
+ Hits          498      503       +5     
  Misses         63       63              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@favba
Copy link
Contributor Author

favba commented Sep 17, 2024

The failures in Julia nightly are unrelated to the PR changes

src/simdvec.jl Outdated Show resolved Hide resolved
@KristofferC KristofferC merged commit 33b78fc into eschnett:master Sep 18, 2024
10 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants