JuliaSIMD / JuliaSIMD/LoopVectorization.jl

Support for complex numbers?

オープン
#19 コメント 16 件 リアクション 4 件 担当者 0 名 GitHub で見る
enhancement
主要言語
Julia
スター
789
フォーク
73
PR マージ指標
30日以内にマージされた PR はありません

説明

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
```

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
julia
領域
performance, tooling
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。