activate_compute_deviceT_activate_compute_deviceActivateComputeDeviceActivateComputeDeviceactivate_compute_device (Operator)
Name
activate_compute_deviceT_activate_compute_deviceActivateComputeDeviceActivateComputeDeviceactivate_compute_device — Aktivieren eines Compute Devices.
Signatur
Beschreibung
activate_compute_deviceactivate_compute_deviceActivateComputeDeviceActivateComputeDeviceActivateComputeDeviceactivate_compute_device aktiviert das Compute Device
DeviceHandleDeviceHandleDeviceHandleDeviceHandledeviceHandledevice_handle für den aktuellen HALCON Thread.
Alle folgenden Aufrufe von HALCON Operatoren in diesem Thread werden auf
DeviceHandleDeviceHandleDeviceHandleDeviceHandledeviceHandledevice_handle ausgeführt, sofern sie über eine entsprechende
Implementierung (get_operator_infoget_operator_infoGetOperatorInfoGetOperatorInfoGetOperatorInfoget_operator_info) verfügen.
Mit deactivate_compute_devicedeactivate_compute_deviceDeactivateComputeDeviceDeactivateComputeDeviceDeactivateComputeDevicedeactivate_compute_device kann DeviceHandleDeviceHandleDeviceHandleDeviceHandledeviceHandledevice_handle wieder
deaktiviert werden.
Gegenwärtig kann pro Thread nur ein Compute Device aktiv sein. Ist
vor dem Aufruf von activate_compute_deviceactivate_compute_deviceActivateComputeDeviceActivateComputeDeviceActivateComputeDeviceactivate_compute_device bereits ein anderes
Device aktiv, wird dieses automatisch deaktiviert.
Ausführungsinformationen
- Multithreading-Typ: reentrant (läuft parallel zu nicht-exklusiven Operatoren).
- Multithreading-Bereich: local (kann nur von dem Thread aufgerufen werden, in dem die Fenster-, Modell- oder Tool-Instanz erzeugt wurde).
- Wird ohne Parallelisierung verarbeitet.
Parameter
DeviceHandleDeviceHandleDeviceHandleDeviceHandledeviceHandledevice_handle (input_control) compute_device → HComputeDevice, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)
Compute Device Handle.
Beispiel (HDevelop)
open_compute_device (DeviceIdentifier, DeviceHandle)
read_image (Image, 'rings_and_nuts')
*
* Gaussian convolution on a compute device
activate_compute_device (DeviceHandle)
derivate_gauss (Image, DerivGauss, 5, 'none')
*
* Gaussian convolution on the CPU
deactivate_compute_device (DeviceHandle)
derivate_gauss (Image, DerivGauss, 5, 'none')
Ergebnis
Ist DeviceHandleDeviceHandleDeviceHandleDeviceHandledeviceHandledevice_handle gültig, gibt activate_compute_deviceactivate_compute_deviceActivateComputeDeviceActivateComputeDeviceActivateComputeDeviceactivate_compute_device
den Wert 2 (H_MSG_TRUE) zurück.
Andernfalls wird eine Fehlerbehandlung durchgeführt.
Vorgänger
open_compute_deviceopen_compute_deviceOpenComputeDeviceOpenComputeDeviceOpenComputeDeviceopen_compute_device
Siehe auch
deactivate_compute_devicedeactivate_compute_deviceDeactivateComputeDeviceDeactivateComputeDeviceDeactivateComputeDevicedeactivate_compute_device,
deactivate_all_compute_devicesdeactivate_all_compute_devicesDeactivateAllComputeDevicesDeactivateAllComputeDevicesDeactivateAllComputeDevicesdeactivate_all_compute_devices
Modul
Foundation