Skip to content

Conversation

@dubosipsl
Copy link

Fixes:

julia> SIMD.Vec(randn(Float64,4)...)^4
ERROR: MethodError: no method matching powi(::NTuple{4, VecElement{Float64}}, ::Int64)

Or is there a good reason to not define powi for Int64 exponents ?

@KristofferC
Copy link
Collaborator

Looking at https://llvm.org/docs/LangRef.html#llvm-powi-intrinsic it says:

Generally, the only supported type for the exponent is the one matching with the C type int.

but we could maybe do some conversion on the Julia side to bring it down to a 32 bit int before passing it to LLVM.

@dubosipsl
Copy link
Author

I have pushed another, pure Julia approach (no LLVM intrinsics). Is that better ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants