Recommended way to use something like `evalpoly` with `@turbo` from LoopVectorization.jl

The error for evalpoly was:

ERROR: LoadError: Expression not recognized.
(1, 2, 3)

You can hoist the tuple construction.

function foo!(dst, src)
    coefs = (1,2,3)
    @turbo for i in eachindex(dst, src)
        dst[i] = evalpoly(src[i], coefs)
    end
end
1 Like