Functions and Directives

Function GetLogicalProcessorCount() Foundation

Query the number of available logical processors on the machine

Syntax
GetLogicalProcessorCount() --> nLogicalProcessor
Return

The function returns the number of logical processors available on the system.

Description

A processor is generally a unit able to execute operations. A Logical Processor is the term used to represent the fact that today:

A processor can be virtual (vmware, MS hyper-v).
A physical CPU (the chip you mount on your Motherboard) contains one or more cores.
A hyper-threading capable core is divided into two logical cores (Pentium 4 HT or current XEONs, i7xxx).

The term Logical Processor describes what we see from a software perspective as the processing unit.

Examples
GetLogicalProcessorCount()
// Assign the Process randomly to a logical processor unit 

PROCEDURE Main 

   SetLogicalProcessor( RandomInt(GetLogicalProcessorCount()) ) 

RETURN 
Feedback

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.