Skip to content

Commit

Permalink
Merge pull request #51 from b-fg/fix_typeunstable_delta
Browse files Browse the repository at this point in the history
delta function for CI was not type-stable
  • Loading branch information
weymouth committed May 2, 2023
2 parents 28b5a38 + 614a545 commit af00631
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/util.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ GPUArray = Union{CuArray,ROCArray}
Return a CartesianIndex of dimension `N` which is one at index `i` and zero elsewhere.
"""
@inline δ(i,N::Int) = CI(ntuple(j -> j==i ? 1 : 0, N))
@inline δ(i,I::CartesianIndex{N}) where {N} = δ(i,N)
δ(i,::Val{N}) where N = CI(ntuple(j -> j==i ? 1 : 0, N))
δ(i,I::CartesianIndex{N}) where N = δ(i, Val{N}())

"""
inside(a)
Expand Down

0 comments on commit af00631

Please sign in to comment.