ax_count_cpus

Synopsis

AX_COUNT_CPUS([ACTION-IF-DETECTED],[ACTION-IF-NOT-DETECTED])

Description

Attempt to count the number of logical processor cores (including virtual and HT cores) currently available to use on the machine and place detected value in CPU_COUNT variable.

On successful detection, ACTION-IF-DETECTED is executed if present. If the detection fails, then ACTION-IF-NOT-DETECTED is triggered. The default ACTION-IF-NOT-DETECTED is to set CPU_COUNT to 1.

Source Code

Download the latest version of ax_count_cpus.m4 or browse the macro’s revision history.

License

Copyright © 2014,2016 Karlson2k (Evgeny Grin) 
Copyright © 2012 Brian Aker 
Copyright © 2008 Michael Paul Bailey 
Copyright © 2008 Christophe Tournayre 

Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without any warranty.