[fpc-pascal] detect CPU cores

Sven Barth pascaldragon at googlemail.com
Fri Sep 12 17:20:26 CEST 2014


Am 12.09.2014 16:08 schrieb "Xiangrong Fang" <xrfang at gmail.com>:
>
> Hi All,
>
> Is there a platform independent (specifically Windows and Linux) way to
detect cores and hyper-threads of the CPU? I am writing a calculation
intensive app and would like to fully utilize SMP capability of the CPU.

FPC 2.7.1 has TThread.ProcessorCount (it's a class property, so no instance
needed) or System.CpuCount (ProcessorCount uses this). It's not yet
implemented though for any system :/

Regards,
Sven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20140912/b2ab5ced/attachment.html>


More information about the fpc-pascal mailing list