You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now that we have @fastmath min in Base ( JuliaLang/julia#47972), how do I make SIMD.jl work as well? Just using @fastmath min(a, b) with a and b being Vec of Float32 complains about a missing method:
julia>using SIMD, Base.Cartesian
julia> t =Vec(@ntuple8 _ ->-Inf32)
<8 x Float32>[-Inf, -Inf, -Inf, -Inf, -Inf, -Inf, -Inf, -Inf]
julia>@fastmathmin(t,t)
ERROR: MethodError: no method matching minnum(::NTuple{8, VecElement{Float32}}, ::NTuple{8, VecElement{Float32}}, ::SIMD.Intrinsics.FastMathFlags{128})
Closest candidates are:minnum(::T, ::T) where T<:(Union{Tuple{Vararg{VecElement{var"#s6"}, var"#s1"}} where var"#s1", var"#s6"} where var"#s6"<:Union{Float32, Float64})
@ SIMD ~/.julia/packages/SIMD/Ls1Up/src/LLVM_intrinsics.jl:265
Stacktrace:
[1] min_fast(x::Vec{8, Float32}, y::Vec{8, Float32})
@ SIMD ~/.julia/packages/SIMD/Ls1Up/src/simdvec.jl:259
[2] top-level scope
@ REPL[5]:1
This should ideally directly map to vminps on x86 with AVX, but right now it also has an additional vmpcunordps when not using @fastmath:
Now that we have
@fastmath min
in Base ( JuliaLang/julia#47972), how do I make SIMD.jl work as well? Just using@fastmath min(a, b)
witha
andb
beingVec
ofFloat32
complains about a missing method:This should ideally directly map to
vminps
on x86 with AVX, but right now it also has an additionalvmpcunordps
when not using@fastmath
:Compare to this workaround for length 8:
The text was updated successfully, but these errors were encountered: