Made python really optional
This commit is contained in:
parent
984aa5e209
commit
9131e815c7
3 changed files with 12 additions and 9 deletions
|
@ -854,16 +854,16 @@ def spherical_projection(int Nside,
|
|||
N0 = outm.size
|
||||
|
||||
if booster < 0:
|
||||
booster = 1000
|
||||
booster = 1#000
|
||||
|
||||
job_done = view.array(shape=(N,), format="i", itemsize=sizeof(int))
|
||||
job_done[:] = 0
|
||||
theta,phi = hp.pix2ang(Nside, np.arange(N0))
|
||||
with nogil, parallel():
|
||||
if True:#nogil, parallel():
|
||||
tid = smp_get_thread_id()
|
||||
for i in prange(N0,schedule='dynamic',chunksize=256):
|
||||
for i in range(N0):#prange(N0,schedule='dynamic',chunksize=256):
|
||||
if progress != 0 and (i%booster) == 0:
|
||||
with gil:
|
||||
# with gil:
|
||||
p.update(_mysum(job_done))
|
||||
outm[i] = _spherical_projloop(theta[i], phi[i], density_view, min_distance, max_distance, shifter, integrator_id)
|
||||
job_done[tid] += 1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue