SDL_HasAltiVec(3)

πŸ’– SDL_HasAltiVec πŸ’–

okay bestie, sit down, we're doing a vibe check on your CPU πŸ¦‹ this one lives in the SDL3 FUNCTIONS section of the SDL_HasAltiVec(3) manual, and it's basically the "do you even AltiVec, babe?" detector ✨


🌸 NAME 🌸

SDL_HasAltiVec β€” figure out whether the CPU has AltiVec features, no cap πŸ’…


✨ SYNOPSIS ✨

#include <SDL3/SDL_cpuinfo.h>

bool SDL_HasAltiVec(void);

literally that's it, that's the whole thing πŸŽ€


🧚 DESCRIPTION 🧚

So here's the tea: this function always returns false on CPUs that aren't using PowerPC instruction sets πŸ™ˆ like, it's not being shady, that's just the rules.


πŸ‘‘ RETURN VALUE πŸ‘‘

  • true β€” yasss, the CPU has AltiVec features πŸ’š
  • false β€” nope, it does not πŸ’”

🫢 THREAD SAFETY 🫢

You can call this function from any thread and it's totally safe πŸ”₯ no drama, no locks, no chaos. main character energy fr fr.


🌈 AVAILABILITY 🌈

This function has been available since SDL 3.2.0 β€” so if you're on anything older, sorry babe, it's giving before-its-time 😭


lowkey a reminder: this is the check for AltiVec, so don't go inventing your own, iykyk πŸ’œ

okay that's the whole page, love you, bye πŸ’–βœ¨

Simple Directmedia Layer β€” SDL 3.4.18 β€” SDL_HasAltiVec(3) πŸŽ€ mwah, go compile something iconic πŸ¦‹πŸ‘‘

πŸ“¦ where this page comes from