Skip to content

Commit f939e89

Browse files
committed
Explicitly don't support mul! for adjoint plans
1 parent 01a1dbc commit f939e89

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/definitions.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -643,3 +643,6 @@ function _mul(p::AdjointPlan{T}, x::AbstractArray, ::RealInverseProjectionStyle)
643643
end
644644

645645
plan_inv(p::AdjointPlan) = adjoint(plan_inv(p.p))
646+
function LinearAlgebra.mul!(y::AbstractArray, p::AdjointPlan, x::AbstractArray)
647+
throw(MethodError(LinearAlgebra.mul!, "mul! is not supported for adjoint plans"))
648+
end

test/runtests.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,7 @@ end
246246
@test size(Pinv') == AbstractFFTs.output_size(Pinv)
247247
@test dot(x, Pinv * y) dot(Pinv' * x, y)
248248
@test dot(x, Pinv \ y) dot(Pinv' \ x, y)
249+
@test_throws MethodError mul!(x, P', y)
249250
end
250251
end
251252
end

0 commit comments

Comments
 (0)