al_get_cpu_count(3alleg5)
β¨ NAME β¨
al_get_cpu_count β Allegro 5 API. Bestie, this is the al_get_cpu_count(3alleg5) page, and it's giving "how many CPU cores does this system actually have?" energy. π
π¦ SYNOPSIS π¦
#include <allegro5/allegro.h>
int al_get_cpu_count(void)
πΈ DESCRIPTION πΈ
Okay so al_get_cpu_count returns the number of CPU cores that the system Allegro is running on has, and which could be detected. If detection failed, it returns a negative number. π
No cap, though: even if a positive number is returned, it might be that it is not correct. For example, Allegro running on a virtual machine will return the amount of CPUβs of the VM, and not that of the underlying system. π«
And even if the number is correct, this only gives you information about the total CPU cores of the system Allegro runs on. The amount of cores available to your program may be less due to circumstances such as programs that are currently running. π
Therefore, itβs best to use this for advisory purposes only. It is certainly a bad idea to make your program exclusive to systems for which this function returns a certain βdesirableβ number. That's not the vibe, bestie. π«
This function may be called prior to al_install_system(3alleg5) or al_init(3alleg5). Slay. β¨
β SINCE β
5.1.12 β been iconic since then. π
Kisses from the Allegro reference manual π β this page is literally al_get_cpu_count(3alleg5). π
π¦ where this page comes from
- debian trixie: allegro5-doc 2:5.2.10.1+dfsg-1 Β· Zlib
- ubuntu questing: allegro5-doc 2:5.2.10.1+dfsg-1build1
- ubuntu resolute: allegro5-doc 2:5.2.11.3+dfsg-1 Β· Zlib
- ubuntu stonking: allegro5-doc 2:5.2.11.3+dfsg-1 Β· Zlib
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms