Skip to content

get_compute_device_paramGetComputeDeviceParamGetComputeDeviceParamget_compute_device_paramT_get_compute_device_paramπŸ”—

Short descriptionπŸ”—

get_compute_device_paramGetComputeDeviceParamGetComputeDeviceParamget_compute_device_paramT_get_compute_device_param β€” Query compute device parameters.

SignatureπŸ”—

get_compute_device_param( compute_device DeviceHandle, string GenParamName, out string GenParamValue )void GetComputeDeviceParam( const HTuple& DeviceHandle, const HTuple& GenParamName, HTuple* GenParamValue )static void HOperatorSet.GetComputeDeviceParam( HTuple deviceHandle, HTuple genParamName, out HTuple genParamValue )def get_compute_device_param( device_handle: HHandle, gen_param_name: str ) -> Sequence[Union[str, int, float]]

def get_compute_device_param_s( device_handle: HHandle, gen_param_name: str ) -> Union[str, int, float]Herror T_get_compute_device_param( const Htuple DeviceHandle, const Htuple GenParamName, Htuple* GenParamValue )

HTuple HComputeDevice::GetComputeDeviceParam( const HString& GenParamName ) const

HTuple HComputeDevice::GetComputeDeviceParam( const char* GenParamName ) const

HTuple HComputeDevice::GetComputeDeviceParam( const wchar_t* GenParamName ) const (Windows only)

HTuple HComputeDevice.GetComputeDeviceParam( string genParamName )

DescriptionπŸ”—

get_compute_device_paramGetComputeDeviceParam returns parameters of the compute device DeviceHandledeviceHandledevice_handle for the current HALCON thread in GenParamValuegenParamValuegen_param_value.

The following parameters can be queried (for more information see set_compute_device_paramSetComputeDeviceParam) by setting them for GenParamNamegenParamNamegen_param_name:

  • 'alloc_pinned'"alloc_pinned" If 'true'"true", the output image matrices of all operators are created in page locked (so called β€˜pinned’) memory.

  • 'asynchronous_execution'"asynchronous_execution" If 'true'"true", operators executed on the compute device do not wait for the device computations to finish but return after initiation the computations.

  • 'buffer_cache_capacity'"buffer_cache_capacity" Maximum size (in bytes) of the compute device buffer cache.

  • 'buffer_cache_used'"buffer_cache_used" Current size (in bytes) of the compute device buffer cache.

  • 'image_cache_capacity'"image_cache_capacity" Maximum size (in bytes) of the compute device image cache.

  • 'image_cache_used'"image_cache_used" Current size (in bytes) of the compute device image cache.

  • 'pinned_mem_cache_capacity'"pinned_mem_cache_capacity" Maximum size (in bytes) of the page locked (pinned) memory cache.

  • 'pinned_mem_cache_used'"pinned_mem_cache_used" Current size (in bytes) of the page locked (pinned) memory cache.

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.

ParametersπŸ”—

DeviceHandledeviceHandledevice_handle (input_control) compute_device β†’ (handle)HTuple (HHandle)HComputeDevice, HTuple (IntPtr)HHandleHtuple (handle)

Compute device handle.

GenParamNamegenParamNamegen_param_name (input_control) string β†’ (string)HTuple (HString)HTuple (string)strHtuple (char*)

Name of the parameter to query.

Default: 'buffer_cache_capacity'"buffer_cache_capacity"
List of values: 'alloc_pinned', 'asynchronous_execution', 'buffer_cache_capacity', 'buffer_cache_used', 'image_cache_capacity', 'image_cache_used', 'pinned_mem_cache_capacity', 'pinned_mem_cache_used'"alloc_pinned", "asynchronous_execution", "buffer_cache_capacity", "buffer_cache_used", "image_cache_capacity", "image_cache_used", "pinned_mem_cache_capacity", "pinned_mem_cache_used"

GenParamValuegenParamValuegen_param_value (output_control) string(-array) β†’ (string / integer / real)HTuple (HString / Hlong / double)HTuple (string / int / long / double)Sequence[Union[str, int, float]]Htuple (char* / Hlong / double)

Value of the parameter.

ResultπŸ”—

The operator get_compute_device_paramGetComputeDeviceParam returns the value 2 (H_MSG_TRUE) if the parameters are correct. Otherwise an exception will be raised.

Combinations with other operatorsπŸ”—

Combinations

Possible predecessors

activate_compute_deviceActivateComputeDevice

See also

set_compute_device_paramSetComputeDeviceParam, get_compute_device_infoGetComputeDeviceInfo

ModuleπŸ”—

Foundation