---
name: "SDL_GetNumLogicalCPUCores"
section: "3"
platform: "linux"
package: "libsdl3-doc"
version: "3.2.10+ds-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/SDL_GetNumLogicalCPUCores"
---

# SDL\_GetNumLogicalCPUCores(3)

Get the number of logical CPU cores available.

## NAME

SDL\_GetNumLogicalCPUCores - Get the number of logical CPU cores available.

## HEADER FILE

Defined in SDL3/SDL\_cpuinfo.h

## SYNOPSIS

```
#include "SDL3/SDL.h"
```

**int SDL\_GetNumLogicalCPUCores(void);**

## RETURN VALUE

Returns the total number of logical CPU cores. On CPUs that include technologies such as hyperthreading, the number of logical cores may be more than the number of physical cores.

## THREAD SAFETY

It is safe to call this function from any thread.

## AVAILABILITY

This function is available since SDL 3.2.0.
