[haiku-development] Re: Fixing get_cpu_model_string(), Ticket 3541

  • From: Richard Jasmin <jasminr@xxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Sun, 21 Jun 2009 02:48:47 -0400

You mean like a mmx/opencL routine? you are confusing me. vendors ship optimized drivers like nvidia drivers and such when VESA modes would work fine.I can understand somewhat why, but the rest is crappy programming.MMX isn't optimal when you think about it and -O3 does most of the optimizations anyway when compiling.You can use -O4, but even some optimizations with -O3 break certain compiles.


MMX uses four instructions to execute a 32 or 64 bit math function.You can do the same in less code faster and to a finer degree [yes, you are limited in bitwise ops.] with a normal math function.If you read up on MMX, you would realize this. Some AMD instructions are the same. Not sure about multimedia optimizations, which leads up to my next paragraph.

OpenCl is different.It uses hardware in the GPU to do the work,similar to what apple did in the G4 series[also works with audio routines, BTW.] with GarageBand and for Graphics improvement.[Quartz...] Its nothing new, just on Intel, not PPC systems.Why do you think everything requires a G4 or better these days? It allows part of the GPU to function as an added processor, not to mention the speed of the GPU is always faster than ram.

Start a new thread please, this one is on detection, not optimization.[hence the title.] Now, if you had specific MMX routines and are willing to share, I'm all ears.

André Braga wrote:
Em 20/06/2009, às 15:08, Christian Packmann <Christian.Packmann@xxxxxx> escreveu:
I don't think that this string generation should be part of a OS API, at least not in the kernel. OTOH, if the OS has the code to generate these strings anyway (sysinfo), then it may make sense to move the routines to a library and make them available for other programs which may want to use this information to display it another form (GUI instead of CLI).

And while you are at it, how about drafting an Acceleration Kit? It could abstract vector code running on the CPU or in the GPU, with hints for which would be more desirable if available. It might make sense to look at what Apple did with Accelerate.framework and OpenCL and devise an unified API that targets both worlds.

Be was doing something not quite along these lines, but just as interesting, with the (unreleased) OpenGL kit, where native code would be generated to make for missing GPU capabilities. Apple does this today with LLVM to make up for the lack of... everything interesting, on integrated Intel GMA graphics.

Again, it might make sense to leverage LLVM for on-the-fly code generation that covers both cases. Unfortunately we can't use LLVM to compile the whole OS given incomplete C++ support, but this is bound to change. The FreeBSD people are already testing building kernel+world with LLVM, and there are just a few issues left with #pragma's on contributed code, IIRC.

[/llvm_plug]


Cheers,
A.
____________________________________________________________________________________
Use the link below to report this message as spam.
https://lavabit.com/apps/teacher?sig=622756&key=1522155569
____________________________________________________________________________________



Other related posts: