comparison src/SbpOperators/stencil.jl @ 1544:7cfa729e256d bugfix/sbp_operators/stencil_return_type

Remove ineffective @inline
author Jonatan Werpers <jonatan@werpers.com>
date Fri, 12 Apr 2024 10:11:52 +0200
parents 20da24e7bc36
children 8b9cdadb845a
comparison
equal deleted inserted replaced
1542:bf13bc787403 1544:7cfa729e256d
67 end 67 end
68 return s.weights[1 + i - s.range[1]] 68 return s.weights[1 + i - s.range[1]]
69 end 69 end
70 70
71 Base.@propagate_inbounds @inline function apply_stencil(s::Stencil, v::AbstractVector, i::Int) 71 Base.@propagate_inbounds @inline function apply_stencil(s::Stencil, v::AbstractVector, i::Int)
72 return @inline sum(enumerate(s.weights)) do (k,w) #TBD: Which optimizations are needed here? 72 return sum(enumerate(s.weights)) do (k,w) #TBD: Which optimizations are needed here?
73 w*v[i + @inbounds s.range[k]] 73 w*v[i + @inbounds s.range[k]]
74 end 74 end
75 end 75 end
76 76
77 Base.@propagate_inbounds @inline function apply_stencil_backwards(s::Stencil, v::AbstractVector, i::Int) 77 Base.@propagate_inbounds @inline function apply_stencil_backwards(s::Stencil, v::AbstractVector, i::Int)
78 return @inline sum(enumerate(s.weights)) do (k,w) #TBD: Which optimizations are needed here? 78 return sum(enumerate(s.weights)) do (k,w) #TBD: Which optimizations are needed here?
79 w*v[i - @inbounds s.range[k]] 79 w*v[i - @inbounds s.range[k]]
80 end 80 end
81 end 81 end
82 82
83 function left_pad(s::Stencil, N) 83 function left_pad(s::Stencil, N)