Skip to content

Commit

Permalink
Inline coord
Browse files Browse the repository at this point in the history
  • Loading branch information
utkinis committed Aug 10, 2023
1 parent 025de7d commit ba54ea8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/grids.jl
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,9 @@ spacing(grid::CartesianGrid) = spacing.(grid.axes)
@propagate_inbounds spacing(grid::CartesianGrid, dim::Integer) = spacing(grid.axes[dim])
@propagate_inbounds Δ(grid::CartesianGrid, dim::Integer) = spacing(grid.axes[dim])

coord(grid::CartesianGrid{N}, loc::Location, inds::NTuple{N}) where {N} = coord.(grid.axes, Ref(loc), inds)
@propagate_inbounds coord(grid::CartesianGrid{N}, loc::Location, inds::NTuple{N}) where {N} = coord.(grid.axes, Ref(loc), inds)

function coord(grid::CartesianGrid{N}, loc::NTuple{N,Location}, inds::NTuple{N}) where {N}
@propagate_inbounds function coord(grid::CartesianGrid{N}, loc::NTuple{N,Location}, inds::NTuple{N}) where {N}
ntuple(Val(N)) do I
Base.@_inline_meta
coord(grid.axes[I], loc[I], inds[I])
Expand Down

0 comments on commit ba54ea8

Please sign in to comment.