# Multithreading

ViDi supports the use of multiple GPUs in the same process. This topic describes the various modes of operation and the behavior.

The possible GPU Modes of operation are:

- SingleDevicePerTool (default setting) – A single GPU is used for the analysis of the tool. When using multiple GPUs, the processing time of a single image remains the same, but multiple images can be processed concurrently, on different devices.
- MultipleDevicesPerTool – This mode is for use with the Red Analyze tool, allowing its image analysis to be split among multiple GPUs. This mode is best suited to applications analyzing larger images using a smaller feature size and/or higher sampling density. This mode may be slower than the SingleDevicePerTool mode, when the MultipleDevicesPerTool mode is used with small images, a large feature size, and a low sampling density.
- NoGPUSupport – Specifies that a GPU will not be used.

These GPU modes can be specified on the initialization of the library through the C and .NET API, and command line arguments that can be used with the ViDi GUI on startup for library initialization.

Note:

When using the MultipleDevicesPerTool mode, keep in mind the following:

- This mode should only be used on a PC with identical GPUs (i.e. GPUs that are the same model, and have the same amount of memory).
- When using a Red Analyze tool with multiple GPUs, the processing time of a single image potentially decreases (due to reduced latency).
- When using this mode, the Blue Locate, Blue Read and Green Classify tools will be slower unless you explicitly specify a single device for the gpuDevices argument when invoking any Process methods in the API.