File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -40,18 +40,16 @@ considerable performance issues
4040should support in-place operations.
4141"""
4242supports_inplace (:: Type{<:Vector{ComplexF64}} ) = true
43- supports_inplace (:: Type{T} ) where {T<: AbstractVector } = ismutabletype (T) # fallback
44- # The fallback doesn't actually guarantee that the required interface implied
45- # by `supports_inplace` is fulfilled, but it's a reasonable expectation to
46- # have, and the `check_state` function will test it.
4743
4844supports_inplace (:: Type{<:Matrix} ) = true
4945supports_inplace (:: Type{<:Operator} ) = true
5046supports_inplace (:: Type{<:LinearAlgebra.Diagonal} ) = true
5147supports_inplace (:: Type{<:SparseMatrixCSC} ) = true # XXX is this a good idea?
5248supports_inplace (:: Type{<:ScaledOperator{<:Any,OT}} ) where {OT} = supports_inplace (OT)
49+
50+ # Fallback (both for operators and states)
5351supports_inplace (:: Type{T} ) where {T<: AbstractArray } =
54- ArrayInterface. ismutable (T) && ArrayInterface. fast_scalar_indexing (T) # fallback
52+ ArrayInterface. ismutable (T) && ArrayInterface. fast_scalar_indexing (T)
5553
5654# Generic catch-all for types without a specific method (prevents StackOverflow
5755# from the value→type fallback below)
You can’t perform that action at this time.
0 commit comments