---
name: "cpu_model"
section: "3alleg4"
platform: "linux"
package: "allegro4-doc"
version: "2:4.4.3.1-5"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/cpu_model/3alleg4"
---

# cpu\_model(3alleg4)

Contains the Intel CPU submodel. Allegro game programming library.

## NAME

cpu\_model - Contains the Intel CPU submodel. Allegro game programming library.

## SYNOPSIS

**#include \<allegro.h\>**

**extern int cpu\_model;**

## DESCRIPTION

Contains the CPU submodel, where applicable. Allegro defines at least the  following CPU family types (see include/allegro/system.h for a more  complete list):

```
   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, for x=601-604, 620, 750, 7400, 7450
```

You can read this variable after you have called check\_cpu() (which is  automatically called by allegro\_init()). Make sure you check the cpu\_family and cpu\_vendor so you know which models make sense to check.

## SEE ALSO

**check\_cpu**(3alleg4), **cpu\_vendor**(3alleg4), **cpu\_family**(3alleg4), **cpu\_capabilities**(3alleg4), **allegro\_init**(3alleg4)
