Mercurial > repos > public > sbplib_julia
comparison sbpD2.jl @ 88:170e5447bc19 patch_based_test
Reduce allocations
author | Vidar Stiernström <vidar.stiernstrom@it.uu.se> |
---|---|
date | Fri, 25 Jan 2019 15:10:41 +0100 |
parents | 7f72e7e14659 |
children | c0729ade65da |
comparison
equal
deleted
inserted
replaced
87:38733e84ef1a | 88:170e5447bc19 |
---|---|
13 for i ∈ range(innerStart, stop=innerEnd) | 13 for i ∈ range(innerStart, stop=innerEnd) |
14 @inbounds u[i] = apply(op.innerStencil, v, i)/h^2 | 14 @inbounds u[i] = apply(op.innerStencil, v, i)/h^2 |
15 end | 15 end |
16 | 16 |
17 for i ∈ range(innerEnd+1, length=cSize) | 17 for i ∈ range(innerEnd+1, length=cSize) |
18 @inbounds u[i] = Int(op.parity)*apply(flip(op.closureStencils[N-i+1]), v, i)/h^2 | 18 @inbounds u[i] = Int(op.parity)*applybackwards(op.closureStencils[N-i+1], v, i)/h^2 |
19 end | 19 end |
20 | 20 |
21 return nothing | 21 return nothing |
22 end | 22 end |
23 | 23 |