On Sat, Nov 7, 2009 at 5:07 AM, David McPaul <dlmcpaul@xxxxxxxxx> wrote: > 2009/11/7 Konstantinos Margaritis <markos@xxxxxxxx>: >> On Nov 7, 2009, at 1:18 PM, Axel Dörfler wrote: >>> >>> Currently, the only solution is to use the get_cpuid() function from >>> userland. >>> You can have a look at src/bin/sysinfo.c on how to retrieve the info >>> you are interested in. > > I also have the beginnngs of a CpuCapabilities class committed in the > ffmpeg media add-on. > > It needs more work but it could eventually be promoted to a more > common place for more people to use. gfx_util.cpp has an example of > it's use. I think it would be nice if this was available somewhere as an API. I previously had to copy chunks of code from sysinfo in order to support CPU features in BOINC: http://boinc.berkeley.edu/trac/browser/trunk/boinc/client/hostinfo_unix.cpp#L687 Quite a PITA, and I never quite finished the AMD portion (because I didn't have an AMD box handy during the porting) BTW, I believe I found some feature mismatches and missing features in the sysinfo implementation (compared to the intel specs) - I never got around to providing a patch for those :P - Urias