Re: [AD] CPU info changes

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Vincent Penquerc'h wrote:

How about:

struct CPUCaps;
int GetCPUCount();
struct CPUCaps *GetCPUCaps(int); // 0 for single CPU machines
void DestroyCPUCaps(struct CPUCaps*);
const char *GetCPUDescription(struct CPUCaps*);


It'll have to be CPU_CAPS, get_cpu_count() an do on, to be consisten with Allegro. Or am I missing something?

In anycase the capabilitiy flags need to be accessible easily via assembly, for all those MMX and SSE enabled code inside Allegro, so a function call with structs being passed around may not be such a good idea.

However, I'm concerned about multi-cpu computers, especially when one CPU has more capabilities than the other (Although I'm not sure such combinations can be made). Any ideas on how this works?

[snip]


--
- Robert J Ohannessian
"Microsoft code is probably O(n^20)" (my CS prof)
http://pages.infinit.net/voidstar/



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/