open_compute_deviceT_open_compute_deviceOpenComputeDeviceOpenComputeDeviceopen_compute_device (算子名称)
名称
open_compute_deviceT_open_compute_deviceOpenComputeDeviceOpenComputeDeviceopen_compute_device — Open a compute device.
参数签名
描述
open_compute_deviceopen_compute_deviceOpenComputeDeviceOpenComputeDeviceOpenComputeDeviceopen_compute_device opens the compute device referenced by
DeviceIdentifierDeviceIdentifierDeviceIdentifierDeviceIdentifierdeviceIdentifierdevice_identifier and
returns DeviceHandleDeviceHandleDeviceHandleDeviceHandledeviceHandledevice_handle. Enable computation on
DeviceHandleDeviceHandleDeviceHandleDeviceHandledeviceHandledevice_handle via activate_compute_deviceactivate_compute_deviceActivateComputeDeviceActivateComputeDeviceActivateComputeDeviceactivate_compute_device.
DeviceIdentifierDeviceIdentifierDeviceIdentifierDeviceIdentifierdeviceIdentifierdevice_identifier must be obtained by
query_available_compute_devicesquery_available_compute_devicesQueryAvailableComputeDevicesQueryAvailableComputeDevicesQueryAvailableComputeDevicesquery_available_compute_devices.
运行信息
- 多线程类型:可重入(与非独占操作符并行运行)。
- Multithreading scope: local (may only be called from the same thread in which the window, model, or tool instance was created).
- 未经并行化处理。
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.
参数表
DeviceIdentifierDeviceIdentifierDeviceIdentifierDeviceIdentifierdeviceIdentifierdevice_identifier (input_control) integer → HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)
Compute device Identifier.
DeviceHandleDeviceHandleDeviceHandleDeviceHandledeviceHandledevice_handle (output_control) compute_device → HComputeDevice, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)
Compute device handle.
结果
open_compute_deviceopen_compute_deviceOpenComputeDeviceOpenComputeDeviceOpenComputeDeviceopen_compute_device 返回值
2 (
H_MSG_TRUE)
if DeviceIdentifierDeviceIdentifierDeviceIdentifierDeviceIdentifierdeviceIdentifierdevice_identifier is valid. Otherwise
an exception will be raised.
可能的前置算子
query_available_compute_devicesquery_available_compute_devicesQueryAvailableComputeDevicesQueryAvailableComputeDevicesQueryAvailableComputeDevicesquery_available_compute_devices
可能的后置算子
activate_compute_deviceactivate_compute_deviceActivateComputeDeviceActivateComputeDeviceActivateComputeDeviceactivate_compute_device,
init_compute_deviceinit_compute_deviceInitComputeDeviceInitComputeDeviceInitComputeDeviceinit_compute_device
模块
Foundation