Parallel Module

Overview

freud.parallel.NumThreads

Context manager for managing the number of threads to use.

freud.parallel.getNumThreads

Get the number of threads for parallel computation.

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. freud uses all available threads for parallelization unless directed otherwise.

class freud.parallel.NumThreads

Context manager for managing the number of threads to use.

Module author: Joshua Anderson <joaander@umich.edu>

Parameters

N (int, optional) – Number of threads to use in this context. Defaults to None, which will use all available threads.

freud.parallel.getNumThreads

Get the number of threads for parallel computation.

Module author: Bradley Dice <bdice@bradleydice.com>

Returns

Number of threads.

Return type

int

freud.parallel.setNumThreads

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.