Skip to content
This repository has been archived by the owner on Feb 9, 2020. It is now read-only.

Commit

Permalink
Add missing inbounds annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
timholy committed Jul 23, 2014
1 parent cf01938 commit fc8a380
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions src/newinterp.jl
Expand Up @@ -33,7 +33,8 @@ function body_gen(::Type{BCnil}, ::Type{InterpLinear}, N::Integer)
@nexprs $N d->(ix_d = ifloor(x_d); fx_d = x_d - convert(typeof(x_d), ix_d))
@nexprs $N d->(ixp_d = ix_d + 1)
A = G.coefs
$ex
@inbounds ret = $ex
ret
end
end

Expand All @@ -44,7 +45,8 @@ function body_gen(::Type{BCnan}, ::Type{InterpLinear}, N::Integer)
@nexprs $N d->(ix_d = ifloor(x_d); fx_d = x_d - convert(typeof(x_d), ix_d))
@nexprs $N d->(ixp_d = ix_d + 1)
A = G.coefs
$ex
@inbounds ret = $ex
ret
end
end

Expand All @@ -61,7 +63,8 @@ function body_gen(::Type{BCna}, ::Type{InterpLinear}, N::Integer)
ixp_d = ix_d+1
end)
A = G.coefs
$ex
@inbounds ret = $ex
ret
end
end

Expand All @@ -72,7 +75,8 @@ function body_gen(::Type{BCperiodic}, ::Type{InterpLinear}, N::Integer)
@nexprs $N d->(ixp_d = (ix_d % size(G,d)) + 1)
@nexprs $N d->(ix_d = ((ix_d - 1) % size(G,d)) + 1)
A = G.coefs
$ex
@inbounds ret = $ex
ret
end
end

Expand All @@ -83,7 +87,8 @@ function body_gen(::Type{BCnearest}, ::Type{InterpLinear}, N::Integer)
@nexprs $N d->(ix_d = ifloor(x_d); fx_d = x_d - convert(typeof(x_d), ix_d))
@nexprs $N d->(ixp_d = ix_d == size(G,d) ? ix_d : ix_d+1)
A = G.coefs
$ex
@inbounds ret = $ex
ret
end
end

Expand Down

0 comments on commit fc8a380

Please sign in to comment.