sdlGetCpuCacheLineSize function

int sdlGetCpuCacheLineSize()

Determine the L1 cache line size of the CPU.

This is useful for determining multi-threaded structure padding or SIMD prefetch sizes.

\returns the L1 cache line size of the CPU, in bytes.

\since This function is available since SDL 2.0.0.

extern DECLSPEC int SDLCALL SDL_GetCPUCacheLineSize(void)

Implementation

int sdlGetCpuCacheLineSize() {
  final sdlGetCpuCacheLineSizeLookupFunction =
      libSdl2.lookupFunction<Int32 Function(), int Function()>(
          'SDL_GetCPUCacheLineSize');
  return sdlGetCpuCacheLineSizeLookupFunction();
}