nessai.utils.threading
======================

.. py:module:: nessai.utils.threading

.. autoapi-nested-parse::

   Utilities related to managing threads used by nessai.

   ..
       !! processed by numpydoc !!


Functions
---------

.. autoapisummary::

   nessai.utils.threading.configure_threads


Module Contents
---------------

.. py:function:: configure_threads(pytorch_threads=None)

   
   Configure the number of threads available.

   This is necessary when using PyTorch on the CPU as by default it will use
   all available threads.

   :Parameters:

       **pytorch_threads: int, optional**
           Maximum number of threads for PyTorch on CPU. If None, pytorch will
           use all available threads.











   .. rubric:: Notes

   Uses ``torch.set_num_threads``. If pytorch threads is None but other
   arguments are specified then the value is inferred from them.



   ..
       !! processed by numpydoc !!

