Skip to content

open_compute_deviceOpenComputeDeviceOpenComputeDeviceopen_compute_deviceT_open_compute_device🔗

Short description🔗

open_compute_deviceOpenComputeDeviceOpenComputeDeviceopen_compute_deviceT_open_compute_device — Open a compute device.

Signature🔗

open_compute_device( integer DeviceIdentifier, out compute_device DeviceHandle )void OpenComputeDevice( const HTuple& DeviceIdentifier, HTuple* DeviceHandle )static void HOperatorSet.OpenComputeDevice( HTuple deviceIdentifier, out HTuple deviceHandle )def open_compute_device( device_identifier: int ) -> HHandle

Herror T_open_compute_device( const Htuple DeviceIdentifier, Htuple* DeviceHandle )

void HComputeDevice::HComputeDevice( Hlong DeviceIdentifier )

public HComputeDevice( int deviceIdentifier )

void HComputeDevice::OpenComputeDevice( Hlong DeviceIdentifier )

void HComputeDevice.OpenComputeDevice( int deviceIdentifier )

Description🔗

open_compute_deviceOpenComputeDevice opens the compute device referenced by DeviceIdentifierdeviceIdentifierdevice_identifier and returns DeviceHandledeviceHandledevice_handle. Enable computation on DeviceHandledeviceHandledevice_handle via activate_compute_deviceActivateComputeDevice.

DeviceIdentifierdeviceIdentifierdevice_identifier must be obtained by query_available_compute_devicesQueryAvailableComputeDevices.

Execution information🔗

Execution information
  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).

  • Multithreading scope: local (may only be called from the same thread in which the window, model, or tool instance was created).

  • Processed without parallelization.

This operator returns a handle. Note that the state of an instance of this handle type may be changed by specific operators even though the handle is used as an input parameter by those operators.

Parameters🔗

DeviceIdentifierdeviceIdentifierdevice_identifier (input_control) integer → (integer)HTuple (Hlong)HTuple (int / long)intHtuple (Hlong)

Compute device Identifier.

DeviceHandledeviceHandledevice_handle (output_control) compute_device → (handle)HTuple (HHandle)HComputeDevice, HTuple (IntPtr)HHandleHtuple (handle)

Compute device handle.

Result🔗

open_compute_deviceOpenComputeDevice returns the value 2 (H_MSG_TRUE) if DeviceIdentifierdeviceIdentifierdevice_identifier is valid. Otherwise an exception will be raised.

Combinations with other operators🔗

Combinations

Possible predecessors

query_available_compute_devicesQueryAvailableComputeDevices

Possible successors

activate_compute_deviceActivateComputeDevice, init_compute_deviceInitComputeDevice

Module🔗

Foundation