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

axp(b)y! and mul! (scalar multiplication) with mixed argument types #144

Closed
Jutho opened this issue Mar 13, 2019 · 2 comments
Closed

axp(b)y! and mul! (scalar multiplication) with mixed argument types #144

Jutho opened this issue Mar 13, 2019 · 2 comments
Labels
cuda array Stuff about CuArray. enhancement New feature or request

Comments

@Jutho
Copy link
Contributor

Jutho commented Mar 13, 2019

It would be good (and I would hope not too difficult) to support muting LinearAlgebra methods that are related to taking linear combinations of arrays:
mul!(y, x, scalar)
axpy!(scalar, x, y)
axpby!(scalar, x, scalar, y)
where scalar and also x and y can have different types.

Currently these operators fall back to their generic implementation in Base, which of course uses scalar indexing and is thus forbidden.

Not sure if this needs to go into CuArrays.jl or in GPUArrays.jl.

I encounter this in KrylovKit.jl, where complex valued linear combinations of the real-valued Schur vectors are taken in order to build the eigenvectors: Jutho/KrylovKit.jl#15

@maleadt maleadt transferred this issue from JuliaGPU/CuArrays.jl May 27, 2020
@maleadt maleadt added cuda array Stuff about CuArray. enhancement New feature or request labels May 27, 2020
@maleadt
Copy link
Member

maleadt commented Oct 16, 2020

I think many of these are implemented now, with scalar input types having been widened to Number. If there's any missing, feel free to open another issue.

@maleadt maleadt closed this as completed Oct 16, 2020
@Jutho
Copy link
Contributor Author

Jutho commented Oct 16, 2020

Great; thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cuda array Stuff about CuArray. enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants