Skip to content

Commit ef2891d

Browse files
authored
try fixing coverage info (#24)
1 parent eb2747c commit ef2891d

1 file changed

Lines changed: 24 additions & 24 deletions

File tree

src/ka.jl

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ Adapt.adapt_structure(to, (; N, x)::Tiling) = Tiling(N, adapt(to, x))
44
KernelAbstractions.get_backend((; x)::Tiling) = KernelAbstractions.get_backend(x)
55

66
# destruction
7-
@kernel function remove_bad_blocks_kernel!(t::Tiling)
7+
@kernel function remove_bad_blocks_kernel!(t::Tiling) # COV_EXCL_LINE
88
(; N) = t
9-
I = @index(Global, NTuple)
9+
I = @index(Global, NTuple) # COV_EXCL_LINE
1010
i, j = I .- N
1111

1212
@inbounds if in_diamond(N, i, j) && isblock(t, i, j, Val(false))
@@ -20,9 +20,9 @@ KernelAbstractions.get_backend((; x)::Tiling) = KernelAbstractions.get_backend(x
2020
end
2121

2222
# sliding
23-
@kernel function slide_tiles_kernel!(t′::Tiling, @Const(t::Tiling))
23+
@kernel function slide_tiles_kernel!(t′::Tiling, @Const(t::Tiling)) # COV_EXCL_LINE
2424
(; N) = t
25-
I = @index(Global, NTuple)
25+
I = @index(Global, NTuple) # COV_EXCL_LINE
2626
i, j = I .- N
2727

2828
@inbounds if in_diamond(N, i, j)
@@ -38,9 +38,9 @@ end
3838
end
3939

4040
# filling
41-
@kernel function fill_empty_blocks_kernel1!(t′::Tiling, scratch::OffsetMatrix)
41+
@kernel function fill_empty_blocks_kernel1!(t′::Tiling, scratch::OffsetMatrix) # COV_EXCL_LINE
4242
(; N) = t′
43-
I = @index(Global, NTuple)
43+
I = @index(Global, NTuple) # COV_EXCL_LINE
4444
i, j = I .- N
4545

4646
@inbounds if in_diamond(N, i, j) && is_empty_tile(t′, i, j)
@@ -50,22 +50,22 @@ end
5050
should_fill ⊻= true
5151
i′ -= 1
5252
end
53-
should_fill || @goto ret
54-
j′ = j - 1
55-
while in_diamond(N, i, j′) && is_empty_tile(t′, i, j′)
56-
should_fill ⊻= true
57-
j′ -= 1
58-
end
5953
if should_fill
60-
scratch[i, j] = SHOULD_FILL
54+
j′ = j - 1
55+
while in_diamond(N, i, j′) && is_empty_tile(t′, i, j′)
56+
should_fill ⊻= true
57+
j′ -= 1
58+
end
59+
if should_fill
60+
scratch[i, j] = SHOULD_FILL
61+
end
6162
end
6263
end
63-
@label ret
6464
end
6565

66-
@kernel function fill_empty_blocks_kernel2!(t′::Tiling, scratch::OffsetMatrix)
66+
@kernel function fill_empty_blocks_kernel2!(t′::Tiling, scratch::OffsetMatrix) # COV_EXCL_LINE
6767
(; N) = t′
68-
I = @index(Global, NTuple)
68+
I = @index(Global, NTuple) # COV_EXCL_LINE
6969
i, j = I .- N
7070

7171
@inbounds if in_diamond(N, i, j)
@@ -79,8 +79,8 @@ end
7979
end
8080
end
8181

82-
@kernel function zero_kernel!(t::Tiling, N)
83-
I = @index(Global, NTuple)
82+
@kernel function zero_kernel!(t::Tiling, N) # COV_EXCL_LINE
83+
I = @index(Global, NTuple) # COV_EXCL_LINE
8484
i, j = I .- N
8585
@inbounds t.x[i, j] = NONE
8686
end
@@ -121,9 +121,9 @@ end
121121

122122
# rotation of tilings
123123

124-
@kernel function rotr90_kernel!(t′::Tiling, @Const(t::Tiling))
124+
@kernel function rotr90_kernel!(t′::Tiling, @Const(t::Tiling)) # COV_EXCL_LINE
125125
(; N) = t
126-
I = @index(Global, NTuple)
126+
I = @index(Global, NTuple) # COV_EXCL_LINE
127127
i, j = I .- N
128128

129129
edge = NONE
@@ -135,9 +135,9 @@ end
135135
@inbounds t′.x[j, 1 - i] = edge
136136
end
137137

138-
@kernel function rotl90_kernel!(t′::Tiling, @Const(t::Tiling))
138+
@kernel function rotl90_kernel!(t′::Tiling, @Const(t::Tiling)) # COV_EXCL_LINE
139139
(; N) = t
140-
I = @index(Global, NTuple)
140+
I = @index(Global, NTuple) # COV_EXCL_LINE
141141
i, j = I .- N
142142

143143
edge = NONE
@@ -149,9 +149,9 @@ end
149149
@inbounds t′.x[1 - j, i] = edge
150150
end
151151

152-
@kernel function rot180_kernel!(t′::Tiling, @Const(t::Tiling))
152+
@kernel function rot180_kernel!(t′::Tiling, @Const(t::Tiling)) # COV_EXCL_LINE
153153
(; N) = t
154-
I = @index(Global, NTuple)
154+
I = @index(Global, NTuple) # COV_EXCL_LINE
155155
i, j = I .- N
156156

157157
edge = NONE

0 commit comments

Comments
 (0)