Skip to content

Commit 1be4aac

Browse files
committed
Add missing CloseOpen methods.
1 parent c4b3c7c commit 1be4aac

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "LoopVectorization"
22
uuid = "bdcacae8-1622-11e9-2a5c-532679323890"
33
authors = ["Chris Elrod <[email protected]>"]
4-
version = "0.9.17"
4+
version = "0.9.18"
55

66
[deps]
77
ArrayInterface = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9"

src/closeopen.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,8 @@ ArrayInterface.known_length(::Type{CloseOpen{StaticInt{F},StaticInt{L}}}) where
2828
@inline canonicalize_range(r::AbstractUnitRange) = maybestaticfirst(r):maybestaticlast(r)
2929
@inline canonicalize_range(r::CartesianIndices) = CartesianIndices(map(canonicalize_range, r.indices))
3030

31+
Base.IteratorSize(::Type{<:CloseOpen}) = Base.HasShape{1}()
32+
Base.IteratorEltype(::Type{<:CloseOpen}) = Base.HasEltype()
33+
@inline Base.size(r::CloseOpen) = (length(r),)
34+
Base.eltype(::CloseOpen) = Int
3135

0 commit comments

Comments
 (0)