Parallel Module¶
Overview
Context manager for managing the number of threads to use. |
|
Get the number of threads for parallel computation. |
|
Set the number of threads for parallel computation. |
Details
The freud.parallel
module controls the parallelization behavior of
freud, determining how many threads the TBB-enabled parts of freud will use.
freud uses all available threads for parallelization unless directed otherwise.
- class freud.parallel.NumThreads(N=None)¶
Bases:
object
Context manager for managing the number of threads to use.
- Parameters:
N (int, optional) – Number of threads to use in this context. If
None
, which will use all available threads. (Default value =None
).