Skip to content

Commit

Permalink
Add [lr]mul!!
Browse files Browse the repository at this point in the history
  • Loading branch information
tkf committed Aug 28, 2019
1 parent 70cabf2 commit 78b8e9e
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/linearalgebra.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@
"""
mul!!(C, A, B) -> C′
"""
mul!!(C, A, B) = may(mul!, C, A, B)

pure(::typeof(mul!)) = NoBang.mul
_asbb(::typeof(mul!)) = mul!!
possible(::typeof(mul!), C, ::Any, ::Any) = ismutable(C)

"""
lmul!!(A, B) -> B′
"""
lmul!!(A, B) = may(lmul!, A, B)

pure(::typeof(lmul!)) = *
_asbb(::typeof(lmul!)) = lmul!!
possible(::typeof(lmul!), ::Any, B) = ismutable(B)

"""
rmul!!(A, B) -> A′
"""
rmul!!(A, B) = may(rmul!, A, B)

pure(::typeof(rmul!)) = *
_asbb(::typeof(rmul!)) = rmul!!
possible(::typeof(rmul!), A, ::Any) = ismutable(A)

0 comments on commit 78b8e9e

Please sign in to comment.