check_par_hw_potential — Check hardware regarding its potential for parallel processing.
check_par_hw_potential is obsolete and is only provided for reasons of backward compatibility. New applications should use the operator optimize_aop to optimize the automatic operator parallelization instead.
check_par_hw_potential( : : AllInpPars : )
check_par_hw_potential is necessary for an efficient automatic parallelization, which is used by HALCON to better utilize multiprocessor hardware in order to speed up the processing of operators. As the parallelization of operators is done automatically, there is no need for the user to explicitly prepare or change programs for their parallelization. Thus, all HALCON-based programs can be used unchanged on multiprocessor hardware and users benifit from the potential of parallel hardware. check_par_hw_potential checks a given hardware with respect to a parallel processing of HALCON operators. In doing so, it examines every operator, which can possibly be sped up by an automatic parallelization. Each examined operator is executed several times - both sequentially and parallel - with a changing set of input parameter values/images. The latter helps to evaluate dependencies between an operator's input parameter characteristics (e.g. the size of an input image) and the efficiency of its parallel processing. At this, AllInpPars is used in the following way: In the normal case, i.e., if AllInpPars contains the default value 0 (“false”), only those input parameters are examined which are supposed to show influence on the processing time. Other parameters are not examined so that the whole process is sped up. However, in some rare cases, the internal implementation of a HALCON operator might change from one HALCON release to another. Then, a parameter which did not show any direct influence on the processing time in former releases, may now show such an influence. In this case it is necessary to set AllInpPars to 1 (“true”) in order to force the examination of all input parameters. If this happens, the HALCON release notes will most likely contain an appropriate note about this fact. Overall, check_par_hw_potential performs several test loops and collects a lot of hardware-specific informations, which enable HALCON to optimize the automatic parallelization for a given hardware. The hardware information is stored so that it can be used again in future HALCON sessions. Thus, it is sufficient, to start check_par_hw_potential once on each multiprocessor machine that is used for parallel processing. Of course, it should be started again, if the hardware of the machine changes, for example, by installing a new cpu, or if the operating system of the machine changes, or if the machine gets a new host name. The latter is necessary, because HALCON identifies the machine-specific parallelization information by the machine's host name. If the same multiprocessor machine is used with different operating systems, such as Windows and Linux, it is necessary to start check_par_hw_potential once for each operating system in order to correctly measure the rather strong influence of the operating system on the potential of exploiting multiprocessor hardware. Under Windows, HALCON stores the parallelization knowledge, which belongs to a specific machine, in the machine's registry. At this, it uses a machine-specific registry key, which can be used by different users simultaneously. In the normal case, this key can be written or changed by any user under Windows NT. However, under Windows 2000 the key may only be changed by users with administrator privileges or by users which at least belong to the “power user” group. For all other users check_par_hw_potential shows no effect (but does not return an error). Under Linux/OS X the parallelization information is stored in a file in the HALCON installation directory ($HALCONROOT). Again this means that check_par_hw_potential must be called by users with the appropriate privileges, here by users which have write access to the HALCON directory. If HALCON is used within a network under Linux/OS X, the denoted file contains the information about every computer in the network for which the hardware check has been successfully completed.
During its test loops check_par_hw_potential has to start every examined operator several times. Thus, the processing of check_par_hw_potential can take rather a long time. check_par_hw_potential must be called by users with the appropriate privileges for storing the parallelization information permanently (see the operator's description above for more details about this subject).
Check every input parameter?
Default value: 0
List of values: 0, 1
check_par_hw_potential returns 2 (H_MSG_TRUE) if all parameters are correct.