This project has moved to https://sourceforge.net/projects/microchipopen/. Visit us over there! Community version of Microchip Technology's GCC (GNU Compiler Collection) based MPLAB® C Compiler for PIC32 MCUs.
LibCpuDetect is a small helpful cross-platform library for cpu feature detection.
You can use it to retrieve the system's number of CPUs and the number of cores per CPU, or if it supports Hyperthreading and many many more.