You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If we set the trait FiveArg(), is it also necessary to implement the three argument mul!? Something like:
LinearMaps.MulStyle(A::MyMap) = FiveArg()
function LinearMaps._unsafe_mul!(y, A::MyMap, x::AbstractVector, α, β)
...
end
LinearMaps._unsafe_mul!(y, A::MyMap, x::AbstractVector) = LinearMaps._unsafe_mul!(y, A, x, 1, 0)
If so, it would be useful to note this in the "Custom Maps" section of the documentation.
If you don't need to do this then I have some other issue... :)
Sorry for my slow response. That's a good question, I haven't looked things in here for quite a while. It seems that within this package, even the FiveArg() types have the three-arg _unsafe_mul! defined, but that may be "by tradition" or "by necessity". I think we introduced it to indicate whether or not one can do multiply-and-add in-place, without allocating the intermediate multiplication result. I never thought about it in terms of "saving" the three-arg method.
Activity
dkarrasch commentedon Oct 7, 2024
Sorry for my slow response. That's a good question, I haven't looked things in here for quite a while. It seems that within this package, even the
FiveArg()types have the three-arg_unsafe_mul!defined, but that may be "by tradition" or "by necessity". I think we introduced it to indicate whether or not one can do multiply-and-add in-place, without allocating the intermediate multiplication result. I never thought about it in terms of "saving" the three-arg method.If you don't, which issue comes up?
dkarrasch commentedon May 20, 2026
This is an old issue, but I hope that #248 addresses the issue.