KlassenKlassenKlassenKlassen | | | | Operatoren

activate_compute_deviceactivate_compute_deviceActivateComputeDeviceactivate_compute_deviceActivateComputeDeviceActivateComputeDevice (Operator)

Name

activate_compute_deviceactivate_compute_deviceActivateComputeDeviceactivate_compute_deviceActivateComputeDeviceActivateComputeDevice — Aktivieren eines Compute Devices.

Signatur

activate_compute_device( : : DeviceHandle : )

Herror activate_compute_device(const Hlong DeviceHandle)

Herror T_activate_compute_device(const Htuple DeviceHandle)

Herror activate_compute_device(const HTuple& DeviceHandle)

void HComputeDevice::ActivateComputeDevice() const

void ActivateComputeDevice(const HTuple& DeviceHandle)

void HComputeDevice::ActivateComputeDevice() const

void HOperatorSetX.ActivateComputeDevice([in] VARIANT DeviceHandle)

void HComputeDeviceX.ActivateComputeDevice()

static void HOperatorSet.ActivateComputeDevice(HTuple deviceHandle)

void HComputeDevice.ActivateComputeDevice()

Beschreibung

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

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

Parallelisierung

Parameter

DeviceHandleDeviceHandleDeviceHandleDeviceHandleDeviceHandledeviceHandle (input_control)  compute_device HComputeDevice, HTupleHTupleHComputeDevice, HTupleHComputeDeviceX, VARIANTHtuple (integer) (IntPtr) (Hlong) (Hlong) (Hlong) (Hlong)

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 DeviceHandleDeviceHandleDeviceHandleDeviceHandleDeviceHandledeviceHandle gültig, gibt activate_compute_deviceactivate_compute_deviceActivateComputeDeviceactivate_compute_deviceActivateComputeDeviceActivateComputeDevice den Wert 2 (H_MSG_TRUE) zurück. Andernfalls wird eine Fehlerbehandlung durchgeführt.

Vorgänger

open_compute_deviceopen_compute_deviceOpenComputeDeviceopen_compute_deviceOpenComputeDeviceOpenComputeDevice

Siehe auch

deactivate_compute_devicedeactivate_compute_deviceDeactivateComputeDevicedeactivate_compute_deviceDeactivateComputeDeviceDeactivateComputeDevice, deactivate_all_compute_devicesdeactivate_all_compute_devicesDeactivateAllComputeDevicesdeactivate_all_compute_devicesDeactivateAllComputeDevicesDeactivateAllComputeDevices

Modul

Foundation


KlassenKlassenKlassenKlassen | | | | Operatoren