Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove multiple exit from prange #1901

Merged
merged 8 commits into from
Oct 16, 2024
4 changes: 2 additions & 2 deletions Wrappers/Python/cil/optimisation/functions/KullbackLeibler.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ def kl_div(x, y, eta):
accumulator[get_thread_id()] += Y
else:
# out.flat[i] = numpy.inf
return numpy.inf
accumulator[get_thread_id()] = numpy.inf
paskino marked this conversation as resolved.
Show resolved Hide resolved
return sum(accumulator)

@njit(parallel=True)
Expand All @@ -372,7 +372,7 @@ def kl_div_mask(x, y, eta, mask):
accumulator[get_thread_id()] += Y
else:
# out.flat[i] = numpy.inf
return numpy.inf
accumulator[get_thread_id()] = numpy.inf
paskino marked this conversation as resolved.
Show resolved Hide resolved
return sum(accumulator)

# convex conjugate
Expand Down
Loading