SubArray x Matrix multipliciation of different eltype fails


#1

I have a subarray that I want to multiply with a matrix. They have different eltypes:

julia> A=randn(ComplexF64,3,3); 
julia> Aview=view(A,1:2,1:2);
julia> C=randn(2,2);
julia> Aview*C
ERROR: MethodError: no method matching gemm_wrapper!(::Base.ReinterpretArray{Float64,2,Complex{Float64},Array{Complex{Float64},2}}, ::Char, ::Char, ::Base.ReinterpretArray{Float64,2,Complex{Float64},SubArray{Complex{Float64},2,Array{Complex{Float64},2},Tuple{UnitRange{Int64},UnitRange{Int64}},false}}, ::Array{Float64,2})  

Is this an intended limitation in SubArray or just not supported? The other order of matrix multiplication works:

julia> C*Aview
2×2 Array{Complex{Float64},2}:
 -0.0556192+0.719633im    0.463885-0.418185im
   0.722176+1.17033im   -0.0308782+0.850718im

Versioninfo:

julia> versioninfo()
Julia Version 1.0.0
Commit 5d4eaca0c9 (2018-08-08 20:58 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: Intel(R) Core(TM) i7-4600U CPU @ 2.10GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-6.0.0 (ORCJIT, haswell)

Non-intrusive work-arounds appreciated.


#2

This is classified as bug. See github.