Skip to content

Commit 3e37f91

Browse files
Update tests for new >0 iterations assumption.
1 parent 0cca17f commit 3e37f91

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

test/miscellaneous.jl

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -330,10 +330,12 @@ using Test
330330
qq[i,k] = tmp
331331
end
332332
end
333-
@avx for k in maxk+1:nk
334-
for i in eachindex(lse)
335-
tmp = exp(xx[i,k] - tmpmax[i])
336-
lse[i] += tmp
333+
if maxk < nk
334+
@avx for k in maxk+1:nk
335+
for i in eachindex(lse)
336+
tmp = exp(xx[i,k] - tmpmax[i])
337+
lse[i] += tmp
338+
end
337339
end
338340
end
339341
qq[:,Base.OneTo(maxk)] ./= vec(lse)
@@ -346,10 +348,12 @@ using Test
346348
qq[i,k] = tmp
347349
end
348350
end
349-
@_avx for k in maxk+1:nk
350-
for i in eachindex(lse)
351-
tmp = exp(xx[i,k] - tmpmax[i])
352-
lse[i] += tmp
351+
if maxk < nk
352+
@_avx for k in maxk+1:nk
353+
for i in eachindex(lse)
354+
tmp = exp(xx[i,k] - tmpmax[i])
355+
lse[i] += tmp
356+
end
353357
end
354358
end
355359
qq[:,Base.OneTo(maxk)] ./= vec(lse)

0 commit comments

Comments
 (0)