Hello,
I would like to get your feedback on the fastest way to fill the 1 modulo 3 entries with the real part of an array and the 2 modul0 3 entries with the imaginary part of the same array.
using BenchmarkTools
A = rand(ComplexF64, 20, 50)
B = zeros(20,150)
B[:,1:3:end-1] .= real(A)
B[:,2:3:end] .= imag(A)
function test1(A)
B = zeros(20,150)
B[:,1:3:end-1] .= real(A)
B[:,2:3:end] .= imag(A)
end
@btime test1($A)
9.327 μs (4 allocations: 39.39 KiB)