Vectorization
VectorC exploits the ability of the latest microprocessors to perform multiple operations in parallel. The new SIMD (single instruction, multiple data) instructions enable a large boost in processing power, however taking advantage of them is a time consuming process which has so far required the deployment of complex assembly language programming.
VectorC recognises parallelisms in standard C/C++ source code and generates vectorized code for the supported CPUs. As a 'smart compiler', VectorC automatically utilises advanced CPU features and negates the need for time consuming assembly language programming.
Many algorithms can benefit from vectorization, the most common are:
- Image processing
- 3D Vector operations
- 3D Graphics
- Sound processing
Programs involving physics and maths type calculations are particularly suited to being optimised through vectorization; this makes VectorC ideal for the optimization of game collision code!
Processors features supported by the VectorC {PC} compiler include:
- MMX
- Streaming SIMD Extensions (Pentium III)
- Streaming SIMD Extensions 2 (Pentium 4)
- 3DNow! (K6-2, K6-III, Duron and Athlon)
- Advanced 3DNow! (Athlon, Duron)
- Read Prefetching (Athlon, Duron, Pentium III, and Pentium 4)
- Write Prefetching (K6-2)
- Uncached stores / non-temporal stores (Athlon, Duron, Pentium III, and Pentium 4)
To help VectorC produce the fastest possible code but keep you in control, 'hints' are provided that help the compiler use its most powerful optimizations. These are simple but powerful language additions which let you add prefetching to every reference of a variable, for example; prefetching is a hint to the cache to load in data from main memory that you may need later.
There are other compilers which claim to be vectorizing compilers, click here for a comparison with VectorC. |