@@ -48,7 +48,7 @@ function _vvar(μ::Number, corrected::Bool, A, ::Colon, multithreaded::False)
4848 # Reduce all the dims!
4949 n = length (A)
5050 σ² = zero (typeof (μ))
51- @turbo for i ∈ eachindex (A)
51+ @turbo check_empty = true for i ∈ eachindex (A)
5252 δ = A[i] - μ
5353 σ² += δ * δ
5454 end
@@ -58,7 +58,7 @@ function _vvar(μ::Number, corrected::Bool, A, ::Colon, multithreaded::True)
5858 # Reduce all the dims!
5959 n = length (A)
6060 σ² = zero (typeof (μ))
61- @tturbo for i ∈ eachindex (A)
61+ @tturbo check_empty = true for i ∈ eachindex (A)
6262 δ = A[i] - μ
6363 σ² += δ * δ
6464 end
@@ -72,12 +72,12 @@ function _vvar(::Nothing, corrected::Bool, A, ::Colon, multithreaded::False)
7272 n = length (A)
7373 Tₒ = Base. promote_op (/ , eltype (A), Int)
7474 Σ = zero (Tₒ)
75- @turbo for i ∈ eachindex (A)
75+ @turbo check_empty = true for i ∈ eachindex (A)
7676 Σ += A[i]
7777 end
7878 μ = Σ / n
7979 σ² = zero (typeof (μ))
80- @turbo for i ∈ eachindex (A)
80+ @turbo check_empty = true for i ∈ eachindex (A)
8181 δ = A[i] - μ
8282 σ² += δ * δ
8383 end
@@ -88,12 +88,12 @@ function _vvar(::Nothing, corrected::Bool, A, ::Colon, multithreaded::True)
8888 n = length (A)
8989 Tₒ = Base. promote_op (/ , eltype (A), Int)
9090 Σ = zero (Tₒ)
91- @tturbo for i ∈ eachindex (A)
91+ @tturbo check_empty = true for i ∈ eachindex (A)
9292 Σ += A[i]
9393 end
9494 μ = Σ / n
9595 σ² = zero (typeof (μ))
96- @tturbo for i ∈ eachindex (A)
96+ @tturbo check_empty = true for i ∈ eachindex (A)
9797 δ = A[i] - μ
9898 σ² += δ * δ
9999 end
0 commit comments