Skip to content

Commit

Permalink
chore: add nogil section
Browse files Browse the repository at this point in the history
  • Loading branch information
nightwnvol committed May 10, 2024
1 parent 6c0b349 commit 22f219d
Showing 1 changed file with 20 additions and 18 deletions.
38 changes: 20 additions & 18 deletions commit/operator/operator.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -197,16 +197,17 @@ cdef class LinearOperator :
if not self.adjoint :
# DIRECT PRODUCT A*x
if self.nolut:
COMMIT_A_nolut(
self.nF,
&v_in[0], &v_out[0],
self.ICf, self.ICv, self.ICl,
self.ISOv,
self.ICthreads, self.ISOthreads,
nISO, nthreads
)
with nogil:
COMMIT_A_nolut(
self.nF,
&v_in[0], &v_out[0],
self.ICf, self.ICv, self.ICl,
self.ISOv,
self.ICthreads, self.ISOthreads,
nISO, nthreads
)
else:
with nogil :
with nogil:
COMMIT_A(
self.nF, self.nE, self.nV, self.nS, self.ndirs,
&v_in[0], &v_out[0],
Expand All @@ -220,16 +221,17 @@ cdef class LinearOperator :
else :
# INVERSE PRODUCT A'*y
if self.nolut:
COMMIT_At_nolut(
self.nF, self.n,
&v_in[0], &v_out[0],
self.ICf, self.ICv, self.ICl,
self.ISOv,
self.ICthreadsT, self.ISOthreadsT,
nISO, nthreads
)
with nogil:
COMMIT_At_nolut(
self.nF, self.n,
&v_in[0], &v_out[0],
self.ICf, self.ICv, self.ICl,
self.ISOv,
self.ICthreadsT, self.ISOthreadsT,
nISO, nthreads
)
else:
with nogil :
with nogil:
COMMIT_At(
self.nF, self.n, self.nE, self.nV, self.nS, self.ndirs,
&v_in[0], &v_out[0],
Expand Down

0 comments on commit 22f219d

Please sign in to comment.