set_threads

py_ste.set_threads(threads: int)

Sets the number of threads to be used during multithreading.

Parameters:

threads (int) –

The number of threads to be used during mutlithreading

Warning

The number of threads should be less than or equal to the number of physical cores and you should not attempt to make use of hyperthreading by using twice the number of physical cores. PySTE uses Eigen for multithreading which provides the following warning:

On most OS it is very important to limit the number of threads to the number of physical cores, otherwise significant slowdowns are expected

For more details see https://eigen.tuxfamily.org/dox/TopicMultiThreading.html.

See also

get_threads()