# ComputeResources

class `propertyestimator.backends.``ComputeResources`(number_of_threads=1, number_of_gpus=0, preferred_gpu_toolkit=None)

  An object which stores how many of each type of computational resource (threads or gpu’s) is available to a calculation worker.

  TODO: The use of the terminology here is questionable, and is used interchangable

    with process which may lead to some confusion.

  `__init__`(number_of_threads=1, number_of_gpus=0, preferred_gpu_toolkit=None)

    Constructs a new ComputeResources object.

    Parameters

      - number_of_threads (int) – The number of threads available to a calculation worker.

      - number_of_gpus (int) – The number of GPUs available to a calculation worker.

      - preferred_gpu_toolkit (ComputeResources.GPUToolkit, optional) – The preferred toolkit to use when running on GPUs.

  Methods

  `__init__`([number_of_threads, …]) | Constructs a new ComputeResources object.

  Attributes

  `gpu_device_indices` | The indices of the GPUs to run on.
  `number_of_gpus` | The number of GPUs available to a calculation worker.
  `number_of_threads` | The number of threads available to a calculation worker.
  `preferred_gpu_toolkit` | The preferred toolkit to use when running on GPUs.

  class `GPUToolkit`

    An enumeration of the different GPU toolkits to make available to different calculations.

  property `number_of_threads`

    The number of threads available to a calculation worker.

    Type

      int

  property `number_of_gpus`

    The number of GPUs available to a calculation worker.

    Type

      int

  property `preferred_gpu_toolkit`

    The preferred toolkit to use when running on GPUs.

    Type

      ComputeResources.GPUToolkit

  property `gpu_device_indices`

    The indices of the GPUs to run on. This is purely an internal implementation detail and should not be relied upon externally.

    Type

      str