File tree Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -330,10 +330,12 @@ using Test
330
330
qq[i,k] = tmp
331
331
end
332
332
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
337
339
end
338
340
end
339
341
qq[:,Base. OneTo (maxk)] ./= vec (lse)
@@ -346,10 +348,12 @@ using Test
346
348
qq[i,k] = tmp
347
349
end
348
350
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
353
357
end
354
358
end
355
359
qq[:,Base. OneTo (maxk)] ./= vec (lse)
You can’t perform that action at this time.
0 commit comments