Skip to content

Commit 7896059

Browse files
author
Michael Abbott
committed
awful hack to let LoopVectorization 0.9 work
1 parent 0eb47f3 commit 7896059

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/eval.jl

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,14 @@ using Requires
5252
@inline anyone(cond::Bool) = cond
5353

5454
@init @require LoopVectorization = "bdcacae8-1622-11e9-2a5c-532679323890" begin
55-
56-
using .LoopVectorization.VectorizationBase: SVec, Mask, prevpow2
55+
using .LoopVectorization
56+
SVec = if isdefined(LoopVectorization, :SVec) # version 0.8, for Julia ⩽1.5
57+
using .LoopVectorization.VectorizationBase: SVec, Mask, prevpow2
58+
Svec
59+
else # version 0.9, supports Julia 1.6
60+
using .LoopVectorization.VectorizationBase: Vec, Mask, prevpow2
61+
Vec
62+
end
5763

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

0 commit comments

Comments
 (0)