Parallel Module¶
Overview
freud.parallel.NumThreads |
Context manager for managing the number of threads to use. |
freud.parallel.setNumThreads |
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.
By default, freud tries to use all available threads for parallelization unless
directed otherwise, with one exception.
-
parallel.
setNumThreads
(nthreads=None)¶ Set the number of threads for parallel computation.
Module author: Joshua Anderson <joaander@umich.edu>
Parameters: nthreads (int, optional) – Number of threads to use. If None (default), use all threads available.
-
class
freud.parallel.
NumThreads
(N=None)[source]¶ Context manager for managing the number of threads to use.
Module author: Joshua Anderson <joaander@umich.edu>
Parameters: N (int) – Number of threads to use in this context. Defaults to None, which will use all available threads.