query_available_compute_devicesT_query_available_compute_devicesQueryAvailableComputeDevicesQueryAvailableComputeDevicesquery_available_compute_devices (Operator)

Name

query_available_compute_devicesT_query_available_compute_devicesQueryAvailableComputeDevicesQueryAvailableComputeDevicesquery_available_compute_devices — Abfragen der Liste verfügbarer Compute Devices.

Signatur

query_available_compute_devices( : : : DeviceIdentifier)

Herror T_query_available_compute_devices(Htuple* DeviceIdentifier)

void QueryAvailableComputeDevices(HTuple* DeviceIdentifier)

static HTuple HComputeDevice::QueryAvailableComputeDevices()

static void HOperatorSet.QueryAvailableComputeDevices(out HTuple deviceIdentifier)

static HTuple HComputeDevice.QueryAvailableComputeDevices()

def query_available_compute_devices() -> Sequence[int]

Beschreibung

Gibt die Liste aller verfügbaren Compute Devices zurück. Mittels get_compute_device_infoget_compute_device_infoGetComputeDeviceInfoGetComputeDeviceInfoGetComputeDeviceInfoget_compute_device_info können Eigenschaften eines Devices abgefragt werden. open_compute_deviceopen_compute_deviceOpenComputeDeviceOpenComputeDeviceOpenComputeDeviceopen_compute_device öffnet ein Device in HALCON.

Gegenwärtig unterstützt HALCON nur OpenCL-kompatible GPUs, welche die OpenCL-Erweiterung cl_khr_byte_addressable_store und Image Objekte unterstützen. Falls Sie sich nicht sicher sind, ob ein bestimmtes Device unterstützt wird, wenden Sie sich bitte an den Hersteller.

Momentan ist es nicht möglich OpenCL mittels Windows Remote Desktop zu verwenden, da dieser den Zugriff auf den Grafiktreiber unterbindet. Mittels einer VNC Lösung ist es aber möglich, OpenCL über eine remote Verbindung zu verwenden.

Es wird empfohlen die jeweils aktuellsten Grafiktreiber zu installieren. Um auf Linuxsystemen auf die Grafikkarte zugreifen zu können sollte der Benutzer Mitglied der Gruppe 'video' sein.

Ausführungsinformationen

Parameter

DeviceIdentifierDeviceIdentifierDeviceIdentifierDeviceIdentifierdeviceIdentifierdevice_identifier (output_control)  integer-array HTupleSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Liste von verfügbaren Compute Devices.

Beispiel (HDevelop)

query_available_compute_devices (DeviceIdentifiers)
for Index := 0 to |DeviceIdentifiers|-1 by 1
  get_compute_device_info (DeviceIdentifiers[Index], 'name', DeviceName)
  get_compute_device_info (DeviceIdentifiers[Index], 'vendor', DeviceVendor)
  if (DeviceVendor == 'NVIDIA Corporation' and \
    DeviceName == 'GeForce 8800 Ultra')
    open_compute_device (DeviceIdentifiers[Index], DeviceHandle)
    break
  endif
endfor
*
init_compute_device (DeviceHandle, 'derivate_gauss')
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

query_available_compute_devicesquery_available_compute_devicesQueryAvailableComputeDevicesQueryAvailableComputeDevicesQueryAvailableComputeDevicesquery_available_compute_devices gibt 2 (H_MSG_TRUE) zurück.

Nachfolger

get_compute_device_infoget_compute_device_infoGetComputeDeviceInfoGetComputeDeviceInfoGetComputeDeviceInfoget_compute_device_info, open_compute_deviceopen_compute_deviceOpenComputeDeviceOpenComputeDeviceOpenComputeDeviceopen_compute_device

Modul

Foundation