Skip to content

Commit ad545d9

Browse files
committed
Fix vcount
1 parent 6d7b07e commit ad545d9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/simdfunctionals/count.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
_vcount(f) = 0
2-
function _vcount(f::F, args::Vararg{DenseArray,M}) where {F,M}
2+
function _vcount(f::F, args::Vararg{StridedArray,M}) where {F,M}
33
x = first(args)
44
y = Base.tail(args)
55
foreach(a -> @assert(size(a) == size(x)), y)
@@ -36,10 +36,10 @@ function _vcount(f::F, args::Vararg{DenseArray,M}) where {F,M}
3636
count
3737
end
3838

39-
@generated function vcount(f::F, args::Vararg{DenseArray,M}) where {F,M}
39+
@generated function vcount(f::F, args::Vararg{StridedArray,M}) where {F,M}
4040
call = Expr(:call, :_vcount, :f)
4141
gc_preserve_call_quote(call, M::Int)
4242
end
43-
vcount(::typeof(identity), x::AbstractArray{Bool}) =
43+
vcount(::typeof(identity), x::StridedArray{Bool}) =
4444
vcount(VectorizationBase.tomask, x)
45-
vcount(x::AbstractArray{Bool}) = vcount(VectorizationBase.tomask, x)
45+
vcount(x::StridedArray{Bool}) = vcount(VectorizationBase.tomask, x)

0 commit comments

Comments
 (0)