COMPUTE_PREFERENCE Class Reference

Lists how much GPU a module is allowed to use. More...

Static Functions

def from_string (str, name)
 Converts a string to the corresponding COMPUTE_PREFERENCE enum value. More...
 

Detailed Description

Lists how much GPU a module is allowed to use.

The selected mode sets a floor that cannot be avoided: POSITIONAL_TRACKING_MODE.GEN_1 computes depth and therefore always uses the GPU. This preference only controls the work that is optional on top of that floor.

Enumerator
AUTO Default. Let the SDK choose. For positional tracking, GEN_3 runs on the CPU and GEN_1 uses the GPU, since it computes depth.
PREFER_CPU Use no more GPU than the selected mode requires, leaving the GPU free for your own workloads. Tracking is slower than with GPU acceleration.
PREFER_GPU Use GPU acceleration wherever it is available, which makes tracking faster and lowers the per-frame grab time. Falls back to the CPU by itself if the GPU cannot be used.

Functions

◆ from_string()

def from_string (   str,
  name 
)
static

Converts a string to the corresponding COMPUTE_PREFERENCE enum value.

Parameters
name: The string representation of the COMPUTE_PREFERENCE enum value.
Returns
The corresponding COMPUTE_PREFERENCE enum value. If the string does not match any COMPUTE_PREFERENCE, COMPUTE_PREFERENCE.AUTO is returned.