Skip to content

Commit 60057e5

Browse files
authored
try fixing boundserrors on CUDA (#9)
1 parent 8c8d4e2 commit 60057e5

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/AztecDiamonds.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,9 @@ function _foreach(f, itr, ex)
9393
_foreach(faces(t), ex) do (i, j, isdotted)
9494
## COV_EXCL_START
9595
tile = @inbounds t[i, j]
96-
@inbounds if tile == UP && j < N && t[i, j+1] == UP
96+
@inbounds if tile == UP && j < N && get(t, (i, j+1), NONE) == UP
9797
good == isdotted && f((i, j, isdotted))
98-
elseif tile == RIGHT && i < N && t[i+1, j] == RIGHT
98+
elseif tile == RIGHT && i < N && get(t, (i+1, j), NONE) == RIGHT
9999
good == isdotted && f((i, j, isdotted))
100100
end
101101
## COV_EXCL_STOP

0 commit comments

Comments
 (0)