Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

convert AbstractVector to StridedVector in mul!? #217

Open
dlfivefifty opened this issue Sep 29, 2021 · 0 comments
Open

convert AbstractVector to StridedVector in mul!? #217

dlfivefifty opened this issue Sep 29, 2021 · 0 comments

Comments

@dlfivefifty
Copy link
Member

dlfivefifty commented Sep 29, 2021

Should calling lmul! with something that's not a StridedArray error out like this?

julia> n = 10; F = FFTW.plan_r2r(randn(n), FFTW.REDFT00)
FFTW r2r REDFT00 plan for 10-element array of Float64
(redft00e-r2hc-pad-10
  (rdft-ct-dit/3
    (hc2hc-direct-3/4 "hf_3"
      (rdft-r2hc-direct-r2c-3 "r2cf_3")
      (rdft-r2hc01-direct-r2c-3 "r2cfII_3"))
    (rdft-r2hc-directbuf/10-r2c-6-x3 "r2cf_6"))
  (rdft-rank0-iter-ci/10))

julia> x = 1:n;

julia> F*x
10-element Vector{Float64}:
  99.0
 -33.16343747752636
   0.0
  -4.0
   0.0
  -1.7040881910418477
   0.0
  -1.1324743314317942
   0.0
  -1.0

julia> mul!(similar(1.0x),F,x)
ERROR: MethodError: no method matching mul!(::Vector{Float64}, ::FFTW.r2rFFTWPlan{Float64, (3,), false, 1, UnitRange{Int64}}, ::UnitRange{Int64}, ::Bool, ::Bool)
Closest candidates are:
  mul!(::AbstractVector{T} where T, ::Union{Bidiagonal, SymTridiagonal, Tridiagonal}, ::AbstractVector{T} where T, ::Number, ::Number) at /Users/sheehanolver/Projects/julia-1.6/usr/share/julia/stdlib/v1.6/LinearAlgebra/src/bidiag.jl:398
  mul!(::AbstractVecOrMat{T} where T, ::Union{Bidiagonal, SymTridiagonal, Tridiagonal}, ::AbstractVecOrMat{T} where T, ::Number, ::Number) at /Users/sheehanolver/Projects/julia-1.6/usr/share/julia/stdlib/v1.6/LinearAlgebra/src/bidiag.jl:400
  mul!(::AbstractVector{T} where T, ::Transpose{var"#s832", var"#s831"} where {var"#s832", var"#s831"<:Diagonal}, ::AbstractVector{T} where T, ::Number, ::Number) at /Users/sheehanolver/Projects/julia-1.6/usr/share/julia/stdlib/v1.6/LinearAlgebra/src/diagonal.jl:322
  ...
Stacktrace:
 [1] mul!(C::Vector{Float64}, A::FFTW.r2rFFTWPlan{Float64, (3,), false, 1, UnitRange{Int64}}, B::UnitRange{Int64})
   @ LinearAlgebra ~/Projects/julia-1.6/usr/share/julia/stdlib/v1.6/LinearAlgebra/src/matmul.jl:275
 [2] top-level scope
   @ REPL[11]:1
@dlfivefifty dlfivefifty changed the title convert AbstractVector to StridedVector in lmul!? convert AbstractVector to StridedVector in mul!? Sep 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant