Skip to content

Commit a748ebf

Browse files
committed
Fix NaN detector for no tail
1 parent 10dfdb4 commit a748ebf

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/Utils.jl

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ end
7575

7676
# Fastest way to check for NaN in an array.
7777
# Thanks @mikmore https://discourse.julialang.org/t/fastest-way-to-check-for-inf-or-nan-in-an-array/76954/33?u=milescranmer
78-
is_bad_array(x) = !is_good_array(x)
78+
is_bad_array(x, V::Val{unroll}=Val(16)) where {unroll} = !is_good_array(x, V)
7979
function is_good_array(x::AbstractArray{T}, V::Val{unroll}=Val(16)) where {unroll,T}
8080
isempty(x) && return true
8181
_zero = zero(T)
@@ -97,8 +97,6 @@ function is_good_array(x::AbstractArray{T}, V::Val{unroll}=Val(16)) where {unrol
9797
cumulator == mask || return false
9898
end
9999

100-
!empty_vectorized_segment && return true
101-
102100
# Tail
103101
tail_segment = if empty_vectorized_segment
104102
firstindex(x):lastindex(x)

0 commit comments

Comments
 (0)