cpu_model(3)
π cpu_model(3) π
ok so bestie, welcome to the Allegro manual, cpu_model edition β she's a global int, she's a whole personality, and she's here to tell you exactly which CPU you're running on. πΈ
β¨ NAME β¨
cpu_model β contains the Intel CPU submodel. It's part of the Allegro game programming library. π
π SYNOPSIS π
#include <allegro.h>
extern int cpu_model;
likeβ¦ that's it. one include, one extern int. she's lowkey humble. π
π¦ DESCRIPTION π¦
Okay so cpu_model holds the CPU submodel, where applicable. (the "where applicable" is doing a lot of heavy lifting there ngl β some chips just don't have a submodel and that's their business.)
Allegro defines at least these CPU family types β and if you want the full list, go peek at include/allegro/system.h, she has the receipts: π
CPU_FAMILY_I586:CPU_MODEL_PENTIUM,CPU_MODEL_K5,CPU_MODEL_K6
CPU_FAMILY_I686:CPU_MODEL_PENTIUMPRO,CPU_MODEL_PENTIUMII,CPU_MODEL_PENTIUMIIIKATMAI,CPU_MODEL_PENTIUMIIICOPPERMINE,CPU_MODEL_ATHLON,CPU_MODEL_DURON
CPU_FAMILY_EXTENDED:CPU_MODEL_PENTIUMIV,CPU_MODEL_XEON,CPU_MODEL_ATHLON64,CPU_MODEL_OPTERON
CPU_FAMILY_POWERPC:CPU_MODEL_POWERPC_x, forx=601-604,620,750,7400,7450
π«Ά bestie listen: you can only read this variable after you've calledcheck_cpu()β which, good news,allegro_init()calls for you automatically, so she's basically already handled it. no extra work, periodt.
and please please PLEASE make sure you check cpu_family and cpu_vendor too, because otherwise you're out here checking models that literally make zero sense for your chip. it's giving "asked the wrong question." π match the family first, then check the model. that's the vibe check. β
π SEE ALSO π
aaaand that's the whole page, bestie!! π₯³ this was Allegro version 4.4.3, and yes she's still serving cpu_model(3) energy in the year of our lord. go forth and interrogate your silicon. πβ¨π§
π¦ where this page comes from
- fedora 43: allegro-devel 4.4.3.1-18.fc43 Β· Giftware
- fedora 43: allegro-devel 4.4.3.1-18.fc43 Β· Giftware
- fedora 44: allegro-devel 4.4.3.1-20.fc44 Β· Giftware
- fedora 44: allegro-devel 4.4.3.1-20.fc44 Β· Giftware
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms