diff --git a/src/operators_dense.jl b/src/operators_dense.jl index bfcf8ce..c00b512 100644 --- a/src/operators_dense.jl +++ b/src/operators_dense.jl @@ -444,6 +444,7 @@ Base.iterate(a::DataOperator, idx) = iterate(a.data, idx) # In-place broadcasting @inline function Base.copyto!(dest::DataOperator{BL,BR}, bc::Broadcast.Broadcasted{Style,Axes,F,Args}) where {BL,BR,Style<:DataOperatorStyle{BL,BR},Axes,F,Args} + axes(dest) == axes(bc) || Base.Broadcast.throwdm(axes(dest), axes(bc)) bc′ = Base.Broadcast.preprocess(dest, bc) dest′ = dest.data @inbounds @simd for I in eachindex(bc′) diff --git a/src/states.jl b/src/states.jl index 7bcfa5c..ee15cb5 100644 --- a/src/states.jl +++ b/src/states.jl @@ -219,7 +219,7 @@ Base.@propagate_inbounds Base.Broadcast._broadcast_getindex(x::T, i) where {T<:U # In-place broadcasting for Kets @inline function Base.copyto!(dest::Ket{B}, bc::Broadcast.Broadcasted{Style,Axes,F,Args}) where {B,Style<:KetStyle{B},Axes,F,Args} - axes(dest) == axes(bc) || throwdm(axes(dest), axes(bc)) + axes(dest) == axes(bc) || Base.Broadcast.throwdm(axes(dest), axes(bc)) bc′ = Base.Broadcast.preprocess(dest, bc) dest′ = dest.data @inbounds @simd for I in eachindex(bc′) @@ -232,7 +232,7 @@ end # In-place broadcasting for Bras @inline function Base.copyto!(dest::Bra{B}, bc::Broadcast.Broadcasted{Style,Axes,F,Args}) where {B,Style<:BraStyle{B},Axes,F,Args} - axes(dest) == axes(bc) || throwdm(axes(dest), axes(bc)) + axes(dest) == axes(bc) || Base.Broadcast.throwdm(axes(dest), axes(bc)) bc′ = Base.Broadcast.preprocess(dest, bc) dest′ = dest.data @inbounds @simd for I in eachindex(bc′) diff --git a/test/test_jet.jl b/test/test_jet.jl index 29c419e..a1d886a 100644 --- a/test/test_jet.jl +++ b/test/test_jet.jl @@ -35,7 +35,7 @@ using LinearAlgebra, LRUCache, Strided, StridedViews, Dates, SparseArrays, Rando AnyFrameModule(RandomMatrices)) ) @show rep - @test length(JET.get_reports(rep)) <= 24 + @test length(JET.get_reports(rep)) <= 28 @test_broken length(JET.get_reports(rep)) == 0 end end # testset