set_num_threads

set_num_threads(arg: int, /) None

Set the number of threads used for parallel computation.

This function sets the number of threads used for parallel computation in Amplify. If set to 0, Amplify attempts to use the number of concurrent threads supported by the hardware. This setting affects einsum() and graph embedding when Minor is used. In parallel solving with parallel_solve(), the number of threads can be set independently, with a default that is at least the number of jobs.

パラメータ:

arg (int) -- Number of threads to use.