We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Vector
Vec{N,Int32}
MWE:
julia> i = Vec(map(Int32,(1,2,3,4))...) <4 x Int32>[1, 2, 3, 4] julia> a = rand(4) 4-element Vector{Float64}: 0.5626535341100131 0.7054219085896695 0.6418954581789188 0.693063317804356 julia> a[i] ERROR: Failed to parse LLVM assembly: <string>:3:14: error: invalid cast opcode for cast from '<4 x i32>' to '<4 x i64>' %2 = bitcast <4 x i32> %0 to <4 x i64> ^ Stacktrace: [1] macro expansion @ ~/.julia/packages/SIMD/0q83J/src/LLVM_intrinsics.jl:770 [inlined] [2] inttoptr @ ~/.julia/packages/SIMD/0q83J/src/LLVM_intrinsics.jl:762 [inlined] [3] convert @ ~/.julia/packages/SIMD/0q83J/src/simdvec.jl:27 [inlined] [4] + @ ~/.julia/packages/SIMD/0q83J/src/simdvec.jl:315 [inlined] [5] getindex(::Vector{Float64}, ::Vec{4, Int32}) @ SIMD ~/.julia/packages/SIMD/0q83J/src/arrayops.jl:317 [6] top-level scope @ REPL[21]:1
Explicitly converting to Int64 works as expected:
julia> a[convert(Vec{4,Int64}, i)] <4 x Float64>[0.5626535341100131, 0.7054219085896695, 0.6418954581789188, 0.693063317804356]
I expected this conversion to be done automatically by the Base.getindex method defined in SIMD.jl
Base.getindex
The text was updated successfully, but these errors were encountered:
No branches or pull requests
MWE:
Explicitly converting to Int64 works as expected:
I expected this conversion to be done automatically by the
Base.getindex
method defined in SIMD.jlThe text was updated successfully, but these errors were encountered: