JuliaSIMD / JuliaSIMD/LoopVectorization.jl

Support for complex numbers?

Abierto
#19 16 comentarios 4 reacciones 0 asignados Ver en GitHub
enhancement
Lenguaje dominante
Julia
Estrellas
789
Forks
73
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

Does `LoopVectorization` support complex vectors? E.g.
```julia
using LoopVectorization

function test_avx!(x::Vector, y::Vector, beta)
@avx for n=1:length(x)
x[n] += conj(beta)*y[n]
end
end

# set up
T = ComplexF32
N = 1024

x = zeros(T,N)
y = rand(T,N)
β = rand(T)
# end set up

test_avm!(x,y,β)
```
gives me the following error
```
KeyError: key Complex{Float32} not found

Stacktrace:
[1] getindex at ./dict.jl:477 [inlined]
[2] llvmtype(::Type) at /home/moeddel/.julia/packages/VectorizationBase/hBLD0/src/vectorizable.jl:21
[3] #s24#123 at /home/moeddel/.julia/packages/SIMDPirates/aKvPC/src/memory.jl:94 [inlined]
[4] #s24#123(::Any, ::Any, ::Any, ::Any, ::Any, ::Type, ::Any, ::Type, ::Any) at ./none:0
[5] (::Core.GeneratedFunctionStub)(::Any, ::Vararg{Any,N} where N) at ./boot.jl:524
[6] vload at /home/moeddel/.julia/packages/SIMDPirates/aKvPC/src/memory.jl:218 [inlined]
[7] macro expansion at ./gcutils.jl:91 [inlined]
[8] test_avm!(::Array{Complex{Float32},1}, ::Array{Complex{Float32},1}, ::Complex{Float32}) at ./In[26]:4
```

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Línea de trabajo

Start with the @avx reproducer and inspect VectorizationBase/src/vectorizable.jl at llvmtype, then follow the vload path in SIMDPirates/src/memory.jl. Determine the required behavior for ComplexF32 vectors and confirm that the example runs without the reported KeyError.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
julia
Área
performance, tooling
Tipo de issue
Nueva funcionalidad
Dificultad
5/5
Tiempo estimado
Más de una semana
Estado de actividad
Estancado
Claridad
Necesita aclaración
Aptitud para principiantes
35/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.