activate_compute_deviceT_activate_compute_deviceActivateComputeDeviceActivateComputeDevice (Operator)

Name

activate_compute_deviceT_activate_compute_deviceActivateComputeDeviceActivateComputeDevice — Aktivieren eines Compute Devices.

Signatur

activate_compute_device( : : DeviceHandle : )

Herror T_activate_compute_device(const Htuple DeviceHandle)

void ActivateComputeDevice(const HTuple& DeviceHandle)

void HComputeDevice::ActivateComputeDevice() const

static void HOperatorSet.ActivateComputeDevice(HTuple deviceHandle)

void HComputeDevice.ActivateComputeDevice()

Beschreibung

activate_compute_deviceactivate_compute_deviceActivateComputeDeviceActivateComputeDeviceActivateComputeDevice aktiviert das Compute Device DeviceHandleDeviceHandleDeviceHandleDeviceHandledeviceHandle für den aktuellen HALCON Thread. Alle folgenden Aufrufe von HALCON Operatoren in diesem Thread werden auf DeviceHandleDeviceHandleDeviceHandleDeviceHandledeviceHandle ausgeführt, sofern sie über eine entsprechende Implementierung (get_operator_infoget_operator_infoGetOperatorInfoGetOperatorInfoGetOperatorInfo) verfügen. Mit deactivate_compute_devicedeactivate_compute_deviceDeactivateComputeDeviceDeactivateComputeDeviceDeactivateComputeDevice kann DeviceHandleDeviceHandleDeviceHandleDeviceHandledeviceHandle wieder deaktiviert werden.

Gegenwärtig kann pro Thread nur ein Compute Device aktiv sein. Ist vor dem Aufruf von activate_compute_deviceactivate_compute_deviceActivateComputeDeviceActivateComputeDeviceActivateComputeDevice bereits ein anderes Device aktiv, wird dieses automatisch deaktiviert.

Ausführungsinformationen

Parameter

DeviceHandleDeviceHandleDeviceHandleDeviceHandledeviceHandle (input_control)  compute_device HComputeDevice, HTupleHTupleHtuple (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 DeviceHandleDeviceHandleDeviceHandleDeviceHandledeviceHandle gültig, gibt activate_compute_deviceactivate_compute_deviceActivateComputeDeviceActivateComputeDeviceActivateComputeDevice den Wert 2 (H_MSG_TRUE) zurück. Andernfalls wird eine Fehlerbehandlung durchgeführt.

Vorgänger

open_compute_deviceopen_compute_deviceOpenComputeDeviceOpenComputeDeviceOpenComputeDevice

Siehe auch

deactivate_compute_devicedeactivate_compute_deviceDeactivateComputeDeviceDeactivateComputeDeviceDeactivateComputeDevice, deactivate_all_compute_devicesdeactivate_all_compute_devicesDeactivateAllComputeDevicesDeactivateAllComputeDevicesDeactivateAllComputeDevices

Modul

Foundation