Alpha Anywhere provides the following performance functions.
- CPUCount Function
Get number of processors available on the system. The CPUCount() function returns the number of available CPUs. Hyperthreaded systems (such as my laptop) appear to have multiple CPUs and behave accordingly. It is possible on some systems to disable a CPU.
- PrimaryProcessor Function
Get the index of the primary CPU for the process. The PrimaryProcessor() function returns the zero-based index of the processor Alpha Anywhere is using. If (for some reason) the user manages to undercut Alpha Anywhere and set its Process Affinity to more than one CPU, this function will return -1.
- SelectBestProcessor Function
Select the most appropriate CPU (on a multi-processor system) for the process.
- SetPrimaryProcessor Function
Set the index of the primary CPU for the process. The SetPrimaryProcessor() function sets the primary processor. If the value is less than zero or greater than the number of CPUs - 1, the function returns .F. .