From 7896059b78a737a467af881d2afb3e36986af7a7 Mon Sep 17 00:00:00 2001 From: Michael Abbott Date: Tue, 1 Dec 2020 00:30:07 +0100 Subject: [PATCH] awful hack to let LoopVectorization 0.9 work --- src/eval.jl | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/eval.jl b/src/eval.jl index 240af22..6a837cd 100644 --- a/src/eval.jl +++ b/src/eval.jl @@ -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)