Skip to content

init_compute_deviceInitComputeDeviceInitComputeDeviceinit_compute_deviceT_init_compute_device🔗

説明🔗

init_compute_deviceInitComputeDeviceInitComputeDeviceinit_compute_deviceT_init_compute_device — 計算デバイスを初期化する。

書式🔗

init_compute_device( compute_device DeviceHandle, string Operators )void InitComputeDevice( const HTuple& DeviceHandle, const HTuple& Operators )static void HOperatorSet.InitComputeDevice( HTuple deviceHandle, HTuple operators )def init_compute_device( device_handle: HHandle, operators: Sequence[str] ) -> None

Herror T_init_compute_device( const Htuple DeviceHandle, const Htuple Operators )

void HComputeDevice::InitComputeDevice( const HTuple& Operators ) const

void HComputeDevice.InitComputeDevice( HTuple operators )

説明🔗

init_compute_deviceInitComputeDevice は、計算デバイスを初期化し、 Operatorsoperatorsoperators に記載されたオペレーターのリストを使ってこのデバイスで実行 するための準備をします。さらに、現在のスレッドに対して このデバイスがアクティブになります。 init_compute_deviceInitComputeDevice が呼び出されない場合、または Operatorsoperatorsoperators に記載されていないオペレーターがデバイスに使用 された場合には、初期化はオンデマンドで実行されます。

get_operator_infoGetOperatorInfo を使用することで、オペレーターが計算デバイスで 実行できるかどうかをテストすることができます。

注意🔗

init_compute_deviceInitComputeDevice の実行時間は、Operatorsoperatorsoperators の数 によって異なり、数秒間続く場合があることに注意してください。

実行情報🔗

実行情報
  • マルチスレッドタイプ: リエントラント(非排他なオペレーターと並列に動作)

  • マルチスレッドスコープ: ローカル(同じスレッドからのみ呼び出される可能性あり)

  • 並列演算処理には未対応

パラメーター🔗

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

計算デバイスのハンドル

Operatorsoperatorsoperators (input_control) string-array → (string)HTuple (HString)HTuple (string)Sequence[str]Htuple (char*)

準備するオペレーターのリスト

初期値: 'all'"all"
値のリスト: 'all', 'derivate_gauss', 'sobel_amp'"all", "derivate_gauss", "sobel_amp"

結果🔗

init_compute_deviceInitComputeDevice オペレーターは、初期化に成功すると 2 (H_MSG_TRUE) 値を返します。さもなければ、例外処理が発生します。

他のオペレーターとの組み合わせ🔗

組み合わせ

前処理の候補

query_available_compute_devicesQueryAvailableComputeDevices, open_compute_deviceOpenComputeDevice

後処理の候補

activate_compute_deviceActivateComputeDevice

モジュール🔗

Foundation