Skip to content

Commit 4ec1e74

Browse files
committed
Quick workaround for vsum issue
1 parent e1b62ac commit 4ec1e74

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/VectorizedStatistics.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
module VectorizedStatistics
22

33
using LoopVectorization, Static
4+
import LoopVectorization.vsum # Will add more specific method for ::StridedArray
45

56
const IntOrStaticInt = Union{Integer, StaticInt}
67
_dim(::Type{StaticInt{N}}) where {N} = N::Int

src/vsum.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ julia> vsum(A, dims=2)
2424
7
2525
```
2626
"""
27-
vsum(A; dim=:, dims=:, multithreaded=False()) = _vsum(A, dim, dims, multithreaded)
27+
vsum(A::StridedArray; dim=:, dims=:, multithreaded=False()) = _vsum(A, dim, dims, multithreaded)
2828
_vsum(A, ::Colon, ::Colon, multithreaded) = _vsum(A, :, multithreaded)
2929
_vsum(A, ::Colon, region, multithreaded) = _vsum(A, region, multithreaded)
3030
_vsum(A, region, ::Colon, multithreaded) = reducedims(_vsum(A, region, multithreaded), region)

0 commit comments

Comments
 (0)