SDL_HasAVX2(3)

✨ NAME ✨

SDL_HasAVX2 β€” bestie, this one is your little vibe check for whether the CPU has AVX2 features. πŸ’…

So like, if you're in the SDL3 FUNCTIONS corner of the manual and you clicked on SDL_HasAVX2(3), welcome, you're in the right place. 🫢


🌸 SYNOPSIS 🌸

#include <SDL3/SDL_cpuinfo.h>

bool SDL_HasAVX2(void);

That's it. No args, no drama, just a bool coming back at you. πŸŽ€


πŸ’– DESCRIPTION πŸ’–

Okay so here's the tea: on CPUs that aren't using Intel instruction sets, this function always returns false. Like, always. Not sometimes. Always. No cap. πŸ’€


🌈 RETURN VALUE 🌈

  • true β€” slay, the CPU has AVX2 features. πŸ‘‘
  • false β€” nope, it does not. 😭

🧚 THREAD SAFETY 🧚

You can call this from any thread. Any of them. All of them. It's safe, it's chill, it's unbothered. ✨


⭐ AVAILABILITY ⭐

This function has been available since SDL 3.2.0. So if you're on anything older... girl. 🫠


πŸ¦‹ SEE ALSO πŸ¦‹


Lowkey the shortest manpage ever and honestly? It ate. 🌸

Simple Directmedia Layer made this one, and this whole page is coming at you from SDL 3.4.18, dated right there in the footer as SDL_HasAVX2(3). Bye bestie, go check your CPU, mwah πŸ’–πŸ’…βœ¨

πŸ“¦ where this page comes from