MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/Python/comments/eq30cd/i_made_metaballs_works_quite_fast/feo7a5t
r/Python • u/Norn9 • Jan 17 '20
64 comments sorted by
View all comments
9
Can you explain how you utilize CORES = os.cpu_count() in the draw_balls function? Does numba.prange automatically invoke multiprocessing?
CORES = os.cpu_count()
numba.prange
9 u/Norn9 Jan 17 '20 Yes. If you set parallel=True then numba.prange automatically execute you loop in parallel. If parallel=False then it works exactly like range
Yes. If you set parallel=True then numba.prange automatically execute you loop in parallel. If parallel=False then it works exactly like range
parallel=True
parallel=False
range
9
u/MattR0se Jan 17 '20
Can you explain how you utilize
CORES = os.cpu_count()in the draw_balls function? Doesnumba.prangeautomatically invoke multiprocessing?