Sync SDL3 wiki -> header

[ci skip]
This commit is contained in:
SDL Wiki Bot 2024-12-18 04:26:44 +00:00
parent 6730cf7bed
commit d38c09e5c4

View file

@ -25,25 +25,25 @@
* # CategoryIntrinsics * # CategoryIntrinsics
* *
* SDL does some preprocessor gymnastics to determine if any CPU-specific * SDL does some preprocessor gymnastics to determine if any CPU-specific
* compiler intrinsics are available, as this is not necessarily an easy * compiler intrinsics are available, as this is not necessarily an easy thing
* thing to calculate, and sometimes depends on quirks of a system, versions * to calculate, and sometimes depends on quirks of a system, versions of
* of build tools, and other external forces. * build tools, and other external forces.
* *
* Apps including SDL's headers will be able to check consistent preprocessor * Apps including SDL's headers will be able to check consistent preprocessor
* definitions to decide if it's safe to use compiler intrinsics for a * definitions to decide if it's safe to use compiler intrinsics for a
* specific CPU architecture. This check only tells you that the compiler is * specific CPU architecture. This check only tells you that the compiler is
* capable of using those intrinsics; at runtime, you should still check * capable of using those intrinsics; at runtime, you should still check if
* if they are available on the current system with the * they are available on the current system with the
* [CPU info functions](https://wiki.libsdl.org/SDL3/CategoryCPUInfo), such as * [CPU info functions](https://wiki.libsdl.org/SDL3/CategoryCPUInfo)
* SDL_HasSSE() or SDL_HasNEON(). Otherwise, the process might crash for using * , such as SDL_HasSSE() or SDL_HasNEON(). Otherwise, the process might crash
* an unsupported CPU instruction. * for using an unsupported CPU instruction.
* *
* SDL only sets preprocessor defines for CPU intrinsics if they are * SDL only sets preprocessor defines for CPU intrinsics if they are
* supported, so apps should check with `#ifdef` and not `#if`. * supported, so apps should check with `#ifdef` and not `#if`.
* *
* SDL will also include the appropriate instruction-set-specific support * SDL will also include the appropriate instruction-set-specific support
* headers, so if SDL decides to define SDL_SSE2_INTRINSICS, it will * headers, so if SDL decides to define SDL_SSE2_INTRINSICS, it will also
* also `#include <emmintrin.h>` as well. * `#include <emmintrin.h>` as well.
*/ */
#ifndef SDL_intrin_h_ #ifndef SDL_intrin_h_