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

Add dispatch for LinearAlgebra.dot for Symmetric and Hermitian matrices #248

Merged
merged 1 commit into from
Nov 30, 2023

Conversation

odow
Copy link
Member

@odow odow commented Nov 30, 2023

Closes #234
Closes #236

I've added @araujoms as a co-author to this commit.

Copy link

codecov bot commented Nov 30, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (444331d) 90.76% compared to head (424e062) 90.75%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #248      +/-   ##
==========================================
- Coverage   90.76%   90.75%   -0.02%     
==========================================
  Files          23       23              
  Lines        2122     2119       -3     
==========================================
- Hits         1926     1923       -3     
  Misses        196      196              

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

@odow odow merged commit 229103a into master Nov 30, 2023
11 checks passed
@odow odow deleted the od/symmetric-dot branch November 30, 2023 01:35
@araujoms
Copy link
Contributor

I hope I'm not abusing your goodwill, but could you explain why you changed LinearAlgebra.dot(lhs::A, rhs::B) to @eval LinearAlgebra.dot(lhs::$A, rhs::$B)? As far as I understand both alternatives do the same thing.

It would be necessary if A were a symbol, like :Hermitian, but A is just the type directly, Hermitian.

@odow
Copy link
Member Author

odow commented Nov 30, 2023

It's really just a personal preference thing. I like that @eval is a signal that we're generating a bunch of new methods. If it's just lhs::A, then (I think) the code is a little more likely to be glossed over.

@araujoms
Copy link
Contributor

Ok, thanks for the answer. I was just curious because in LinearAlgebra they defined A as :Hermitian, I was afraid there was a deep reason to prefer one over the other.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Slow Hilbert-Schmidt inner product
2 participants