Skip to content

@turbo not doing LoopVectorization on Float64 #541

Description

@Lincoln-Hannah

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions