SDL_HasLSX(3)

πŸ’– SDL_HasLSX(3) πŸ’–

okay bestie, welcome to the SDL3 FUNCTIONS corner of the man pages, this one's called SDL_HasLSX(3) and it's short, sweet, and honestly kinda niche, but we're gonna give it the full main-character treatment anyway ✨


🌸 NAME 🌸

SDL_HasLSX β€” figure out whether your CPU is out here rockin' LSX (LOONGARCH SIMD) features or not πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

#include <SDL3/SDL_cpuinfo.h>

bool SDL_HasLSX(void);

like yes, that's the whole thing, she's simple and she knows it 🫢


πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the tea: this function checks if the CPU you're running on has those LOONGARCH LSX SIMD goodies.

and lowkey important β€” on CPUs that aren't using LOONGARCH instruction sets, this always returns false. always always. no exceptions, no cap. it's not gonna go hunting around for features that literally cannot exist on that architecture, she just says no πŸ™ˆ


✨ RETURN VALUE ✨

  • returns true if the CPU has LOONGARCH LSX features πŸ‘‘
  • returns false if it does not πŸ’€

that's it, that's the whole vibe check 🌈


🧚 THREAD SAFETY 🧚

good news bestie: it is safe to call this function from any thread. go wild, call it from all of them, she can handle it πŸ’–


⭐ AVAILABILITY ⭐

this function has been available since SDL 3.2.0 β€” so if you're on anything older, sorry babe, she's not there yet 😭


ngl there's not a single flag, argument, or environment variable in sight here β€” she takes void and gives you a bool, and that is the entire personality. iconic behavior, honestly πŸŽ€

and that's the whole page!! tysm for reading, mwah πŸ’…βœ¨

this little masterpiece comes to you from the fine folks at Simple Directmedia Layer, running SDL 3.4.18 β€” SDL_HasLSX(3), periodt πŸ«ΆπŸ’–

πŸ“¦ where this page comes from