Re: [AD] CPU info changes |
[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]
Henrik Stokseth wrote:
On Tuesday 23 October 2001 14:44, Laurence Withers wrote:In reply to Bob <ohannessian@xxxxxxxxxx>: I was thinking we get rid of it (less symbols to export).If nobody strongly disagrees, this is probably a good thing. I wouldn't mind, but then I don't use any of these variables.We can document how to "get it back" from the cpu_id string. I also don't think it will break too many programs.Fair enough (at least by me).having a string to list processor information is ok. but getting rid of cpu_type, cpu_vedor etc. is something that should be avoided. besides breaking some programs
I don't think it'll break that many programs. We can always code macros to get the info if you're so worried about it :)
it also makes it harder and slower to get this info. parsing a string to fetch this info is just a bad idea IMO.
I don't know about you, but I tend not to fetch CPU info a few million times per second :-P Seriously though, I wanted to use the string idea because it's indefinately extensible. We can add as many paramters as we want without breaking old programs (well new programs, from our perspective :)
your original proposal was adding a cpu-info string, and combining various information in an int, right?
Not quite. Only the cpu_mmx, cpu_sse, cpu_3dnow and cpu_fpu will be combined together. This makes it a whole lot easier to test for combined capabilities.
what about putting all info into a cpu struct like this? struct { char *desc; /* string with cpu info */ int vendor_id; int family, model; int mmx, sse, 3dnow, cpu_id, fpu; } cpu; this gets rid of some exports. and perhaps you should also provide some macros for backwards compatibility?
This could work also, but I think a string is much more flexible. -- - 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/ |