Function vaal_sys::vaal_context_create
source · pub unsafe extern "C" fn vaal_context_create(
device: *const c_char
) -> *mut VAALContextExpand description
Creates a VAALContext for the provided device. A context can manage a single model but many contexts can be created within an application. If device is NULL then the default DeepViewRT engine will be used which evaluates models on the CPU.
The device string can be further extended to specify device details such as using “gpu:1” to use the second GPU instead of the default one. Refer to the VAAL_DEVICE documentation for details on the extended parameters.
Supported devices:
- @ref VAAL_DEVICE_CPU
- @ref VAAL_DEVICE_GPU
- @ref VAAL_DEVICE_NPU
@param device
@return VAALContext
@since 1.0