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

Fix A_mul_B! for y inputs with NaNs by setting elements to zero when β is zero. #6096

Merged
merged 1 commit into from
Mar 11, 2014

Conversation

andreasnoack
Copy link
Member

@jiahao
Copy link
Member

jiahao commented Mar 10, 2014

This looks fine. Possibly irrelevant,but I'm still concerned at the inconsistent interface of A_mul_B! (#5332). Sometimes it's a synonym for _axpy, i.e. it computes A*x+y and stores it in y, like in these particular methods, and at other times it's literally A times B, overwriting B.

@andreasnoack
Copy link
Member Author

Updated to use scale! and fill!.

First of all, the different interfaces for A_mul_B! are also for different types, so I am not deeply concerned. When using a mutating function, the general advice must be to read the documentation to figure out what is getting mutated. Some of the differences are also well motivated, e.g. that applying a rotation works directly on the factor in the multiplication. However, we should strive for consistency when possible. The difference between A_mul_B!(Strided,Strided,Strided) and A_mul_B!(Number,Sparse,Strided,Number,Strided) is more troubling to me. Actually so much that I've tried to change it.

andreasnoack added a commit that referenced this pull request Mar 11, 2014
Fix A_mul_B! for y inputs with NaNs by setting elements to zero when β is zero.
@andreasnoack andreasnoack merged commit 623ebe9 into master Mar 11, 2014
@andreasnoack andreasnoack deleted the anj/sparsemul branch March 11, 2014 08:18
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.

sparse A_mul_B! broken by NaNs
2 participants