Skip to content

Commit ca2e4ca

Browse files
Fix 5-argument boxdot! (#21)
* Fix 5-argument `boxdot!` * Fix test
1 parent f8bc400 commit ca2e4ca

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/TensorCore.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ else
278278

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

283283
end
284284

test/runtests.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ end
188188
d = [3im, 4-5im]
189189

190190
@test A B == A * B
191-
@test A c == A c
191+
@test A c == A * c
192192
@test c A == vec(transpose(c) * A)
193193
@test c d == sum(c .* d)
194194

@@ -268,6 +268,8 @@ end
268268
if VERSION >= v"1.3"
269269
@test boxdot!(similar(c), A, c, 100) == A * c * 100
270270
@test boxdot!(copy(c), B, d, 100, -5) == B * d * 100 .- 5 .* c
271+
@test boxdot!(similar(c), A, c', 100) == A * conj(c) * 100
272+
@test boxdot!(copy(c), B, d', 100, -5) == B * conj(d) * 100 .- 5 .* c
271273
end
272274

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

0 commit comments

Comments
 (0)