Arnt Karlsen wrote: > ..well, all good jokes can't come up with a potential like the > http://gpgpu.org; your average recent GPU chews code 6 times > faster than your average CPU. So, we can use part of the GPU > to show pretty pictures, and the remainder, say "half", to say, > triple FG framerates? ;-)
Well... it's not quite that great. If GPUs were better CPUs than CPUs, guess what we'd all be running for our performance-critical operations? Specifically, find me an implementation of string search (the fundamental operation in gene sequencing) that works on a GPU. Or index building (database stuff); or a big if()-tree based on complicated state (server-side business apps)... GPUs have dedicated hardware for the purpose of 3D rendering. Most importantly this includes: + Parallel, pipelined, single-precision 4D vector operations. A typical CPU has 2 or 3 floating point pipelines. A high end GPU can have dozens. + 1- 2- and 3D lookup tables (i.e. textures), with built-in interpolation/extrapolation (i.e. mipmapping & filtering). The memory bandwidth they can bring to bear on this stuff just crushes what a CPU can do. It also includes less generically useful stuff, like perspective-correct interpolation of vertex constants across a polygon. And it lacks a lot of stuff that CPU users take for granted: + High clock speeds. A CPU can dispatch single instructions 10x faster than the fastest GPU. This means that anything requiring quick decision making or iteration belong on the CPU. + Registers and cache. CPUs get special bonuses for iterating on the same data they were just using. GPUs get almost nothing (there's a little bit of caching that goes on within a single polygon's texture mapping, and a vertex cache of recently transformed vertices), and have to fetch it from main memory every single time it's used. + Turing completeness. Other than recent NVidia hardware, GPUs simply can't decide a lot of problems without CPU intervention anyway. + Double precision floating point math. Sometimes, single just ain't enough. And lots of others. Basically, this is all just a long winded way of saying "use the right tool for the job". Andy _______________________________________________ Flightgear-devel mailing list [email protected] http://mail.flightgear.org/mailman/listinfo/flightgear-devel 2f585eeea02e2c79d7b1d8c4963bae2d
