JuliaSIMD / JuliaSIMD/LoopVectorization.jl

@turbo not doing LoopVectorization on Float64

Open
#541 9 comments 0 reactions 0 assignees View on GitHub
Dominant language
Julia
Stars
789
Forks
73
PR merge metrics
No merged PRs in 30d

Description

Seems to fail for Float64 and AbstractFloat but works for real and more general types.
Also, should it be able to work on structs as in the X1 example at the bottom.

```
X = randn(50_000_000)

float64( x::Float64 ) = sin(x)
abs_float( x::AbstractFloat ) = sin(x)
real( x::Real ) = sin(x)
any( x::Any ) = sin(x)

@turbo float64.(X) # LoopVectorization.check_args` on your inputs failed; running fallback `@inbounds @fastmath` loop instead
@turbo abs_float.(X) # LoopVectorization.check_args` on your inputs failed; running fallback `@inbounds @fastmath` loop instead
@turbo real.(X) # works
@turbo any.(X) # works

struct X1; x::Float64 end
fx1((;x)::X1) = sin(x)
x1 = repeat([X1(1.0)],1000_000)

@turbo fx1.( x1 ) # LoopVectorization.check_args` on your inputs failed; running fallback `@inbounds @fastmath` loop instead
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.