Skip to content

Commit

Permalink
Fix 5-argument boxdot! (#21)
Browse files Browse the repository at this point in the history
* Fix 5-argument `boxdot!`

* Fix test
  • Loading branch information
KeitaNakamura authored Oct 24, 2024
1 parent f8bc400 commit ca2e4ca
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/TensorCore.jl
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ else

# For boxdot!, only where mul! behaves differently:
boxdot!(Y::AbstractArray, A::AbstractArray, B::AdjOrTransAbsVec,
α::Number=true, β::Number=false) = boxdot!(Y, A, vec(B))
α::Number=true, β::Number=false) = boxdot!(Y, A, vec(B), α, β)

end

Expand Down
4 changes: 3 additions & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ end
d = [3im, 4-5im]

@test A B == A * B
@test A c == A c
@test A c == A * c
@test c A == vec(transpose(c) * A)
@test c d == sum(c .* d)

Expand Down Expand Up @@ -268,6 +268,8 @@ end
if VERSION >= v"1.3"
@test boxdot!(similar(c), A, c, 100) == A * c * 100
@test boxdot!(copy(c), B, d, 100, -5) == B * d * 100 .- 5 .* c
@test boxdot!(similar(c), A, c', 100) == A * conj(c) * 100
@test boxdot!(copy(c), B, d', 100, -5) == B * conj(d) * 100 .- 5 .* c
end

@test boxdot!(similar(c), A, c') == A * conj(c)
Expand Down

0 comments on commit ca2e4ca

Please sign in to comment.