init_compute_device — Initialize a compute device.
init_compute_device initializes a compute device and prepares a list of operators given in Operators for the execution on this device. Further the device is activated for the current thread. If init_compute_device is not called or operators other than those in Operators are used on the device, the initialization is performed on demand.
Use get_operator_info to test if an operator qualifies for execution on the compute device.
Be aware that the execution time of init_compute_device depends on the number of Operators and may last up to several seconds.
Compute device handle.
List of operators to prepare.
Default value: 'all'
List of values: 'all', 'derivate_gauss', 'sobel_amp'
The operator init_compute_device returns the value 2 (H_MSG_TRUE) if the initialization was successful. Otherwise an exception will be raised.