Operator Reference

open_compute_deviceT_open_compute_deviceOpenComputeDeviceOpenComputeDeviceopen_compute_device (Operator)

open_compute_deviceT_open_compute_deviceOpenComputeDeviceOpenComputeDeviceopen_compute_device — Open a compute device.

Signature

open_compute_device( : : DeviceIdentifier : DeviceHandle)

Herror T_open_compute_device(const Htuple DeviceIdentifier, Htuple* DeviceHandle)

void OpenComputeDevice(const HTuple& DeviceIdentifier, HTuple* DeviceHandle)

void HComputeDevice::HComputeDevice(Hlong DeviceIdentifier)

void HComputeDevice::OpenComputeDevice(Hlong DeviceIdentifier)

static void HOperatorSet.OpenComputeDevice(HTuple deviceIdentifier, out HTuple deviceHandle)

public HComputeDevice(int deviceIdentifier)

void HComputeDevice.OpenComputeDevice(int deviceIdentifier)

def open_compute_device(device_identifier: int) -> HHandle

Description

open_compute_deviceopen_compute_deviceOpenComputeDeviceOpenComputeDeviceopen_compute_device opens the compute device referenced by DeviceIdentifierDeviceIdentifierDeviceIdentifierdeviceIdentifierdevice_identifier and returns DeviceHandleDeviceHandleDeviceHandledeviceHandledevice_handle. Enable computation on DeviceHandleDeviceHandleDeviceHandledeviceHandledevice_handle via activate_compute_deviceactivate_compute_deviceActivateComputeDeviceActivateComputeDeviceactivate_compute_device.

DeviceIdentifierDeviceIdentifierDeviceIdentifierdeviceIdentifierdevice_identifier must be obtained by query_available_compute_devicesquery_available_compute_devicesQueryAvailableComputeDevicesQueryAvailableComputeDevicesquery_available_compute_devices.

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

DeviceIdentifierDeviceIdentifierDeviceIdentifierdeviceIdentifierdevice_identifier (input_control)  integer HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Compute device Identifier.

DeviceHandleDeviceHandleDeviceHandledeviceHandledevice_handle (output_control)  compute_device HComputeDevice, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Compute device handle.

Result

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

Possible Predecessors

query_available_compute_devicesquery_available_compute_devicesQueryAvailableComputeDevicesQueryAvailableComputeDevicesquery_available_compute_devices

Possible Successors

activate_compute_deviceactivate_compute_deviceActivateComputeDeviceActivateComputeDeviceactivate_compute_device, init_compute_deviceinit_compute_deviceInitComputeDeviceInitComputeDeviceinit_compute_device

Module

Foundation