Skip to content

Commit 896c7d7

Browse files
committed
fix deps
1 parent b9f70b6 commit 896c7d7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/utils.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
immutable UnsafeVectorView{T,U} <: AbstractVector{T}
1+
struct UnsafeVectorView{T,U} <: AbstractVector{T}
22
offset::U
33
len::U
44
ptr::Ptr{T}
@@ -9,7 +9,7 @@ end
99
@inline Base.getindex(v::UnsafeVectorView, idx) = unsafe_load(v.ptr, idx + v.offset)
1010
@inline Base.setindex!(v::UnsafeVectorView, value, idx) = unsafe_store!(v.ptr, value, idx + v.offset)
1111
@inline Base.length(v::UnsafeVectorView) = v.len
12-
Base.IndexStyle{V <: UnsafeVectorView}(::Type{V}) = IndexLinear()
12+
Base.IndexStyle(::Type{V}) where V <: UnsafeVectorView = IndexLinear()
1313

1414
"""
1515
UnsafeVectorView only works for isbits types. For other types, we're already
@@ -18,7 +18,7 @@ This function looks type-unstable, but the isbits(T) test can be evaluated
1818
by the compiler, so the result is actually type-stable.
1919
From https://github.com/rdeits/NNLS.jl/blob/0a9bf56774595b5735bc738723bd3cb94138c5bd/src/NNLS.jl#L218.
2020
"""
21-
@inline function fastview{T}(parent::Union{Vector{T}, Base.FastContiguousSubArray{T}}, range::UnitRange)
21+
@inline function fastview(parent::Union{Vector{T}, Base.FastContiguousSubArray{T}}, range::UnitRange) where T
2222
if isbits(T)
2323
UnsafeVectorView(parent, range)
2424
else

0 commit comments

Comments
 (0)