Skip to content

Commit

Permalink
awful hack to let LoopVectorization 0.9 work
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Abbott committed Nov 30, 2020
1 parent 0eb47f3 commit 7896059
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/eval.jl
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,14 @@ using Requires
@inline anyone(cond::Bool) = cond

@init @require LoopVectorization = "bdcacae8-1622-11e9-2a5c-532679323890" begin

using .LoopVectorization.VectorizationBase: SVec, Mask, prevpow2
using .LoopVectorization
SVec = if isdefined(LoopVectorization, :SVec) # version 0.8, for Julia ⩽1.5
using .LoopVectorization.VectorizationBase: SVec, Mask, prevpow2
Svec
else # version 0.9, supports Julia 1.6
using .LoopVectorization.VectorizationBase: Vec, Mask, prevpow2
Vec
end

# Functions needed for safe vectorised max gradient
@inline Tullio.onlyone(cond::Bool, seen::SVec) = cond && allzero(seen)
Expand Down

0 comments on commit 7896059

Please sign in to comment.