[SDL] SDL_GetCPUNum() in 1.3?
Gabriele Greco
gabriele.greco at darts.it
Wed Dec 17 06:39:33 PST 2008
Today most system have 2 or more processors so it make sense to add an API
to detect the number of CPUs in SDL, I'm quite sure SDL has not such a API
right now (at least grep didn't found nothing relevant in 1.3 snapshot
headers :) )
The CPU number should include also partial CPU (hyperthreading and similar
tecnologies), and another API could be added to check if the CPU support
hyperthreading or not, it could make sense to have a consistent and flexible
api to change also the calls in SDL_cpuinfo.h to match the multicpu
enviroment:
SDL_HasHT(int cpuidx);
SDL_Has3DNow(int cpuidx);
SDL_HasAltivec(int cpuidx);
This will cover possible systems that include CPUs with different
tecnologies.
Maybe this situation is so unlikely that it doesn't worth the effort to be
covered and the SDL_HasCPUfeature() calls should stay void...
--
Bye,
Gabry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20081217/27643299/attachment.htm>
More information about the SDL
mailing list