From 21fcc2f694e41c0dbbc7e233511f93fe80fef33e Mon Sep 17 00:00:00 2001 From: Rafael Schouten Date: Fri, 7 Sep 2018 04:44:03 +1000 Subject: [PATCH 1/3] add propagate_inbounds to getindex for SMatrix --- src/SMatrix.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SMatrix.jl b/src/SMatrix.jl index 7681622d..0749671b 100644 --- a/src/SMatrix.jl +++ b/src/SMatrix.jl @@ -71,7 +71,7 @@ end ## SMatrix methods ## ##################### -function getindex(v::SMatrix, i::Int) +Base.@propagate_inbounds function getindex(v::SMatrix, i::Int) Base.@_inline_meta v.data[i] end From 66501d7607ff5b1c787c390ad1300f88f5799e5c Mon Sep 17 00:00:00 2001 From: Rafael Schouten Date: Sat, 8 Sep 2018 19:11:39 +1000 Subject: [PATCH 2/3] cleanup SMatrix macros --- src/SMatrix.jl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/SMatrix.jl b/src/SMatrix.jl index 0749671b..9a448cec 100644 --- a/src/SMatrix.jl +++ b/src/SMatrix.jl @@ -71,8 +71,7 @@ end ## SMatrix methods ## ##################### -Base.@propagate_inbounds function getindex(v::SMatrix, i::Int) - Base.@_inline_meta +@propagate_inbounds function getindex(v::SMatrix, i::Int) v.data[i] end From 81898fe9252e0fdc5c2347fdf3ecc82dd62571c9 Mon Sep 17 00:00:00 2001 From: Rafael Schouten Date: Sat, 8 Sep 2018 19:12:01 +1000 Subject: [PATCH 3/3] propagate_inbounds for SArray --- src/SArray.jl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/SArray.jl b/src/SArray.jl index 3fd1c7ed..b3788c28 100644 --- a/src/SArray.jl +++ b/src/SArray.jl @@ -71,8 +71,7 @@ end ## SArray methods ## #################### -function getindex(v::SArray, i::Int) - Base.@_inline_meta +@propagate_inbounds function getindex(v::SArray, i::Int) v.data[i] end