End-user products => VAST/AltiVec

VAST/AltiVec
AltiVec FAQ

Features

Performance

Code examples

Availability

Evaluations

User's Guides

Overview

With the advent of the Motorola G4 and IBM G5 chips featuring the AltiVec unit (Apple calls it the Velocity Engine) you can now achieve very high performance from desktop systems. Vector processing techniques from supercomputers have made their way down to microprocessors, and if you adapt your application to take advantage of these vectors, you can see dramatic performance gains.

What is VAST?

VAST is a code optimizer that has been widely used for over 20 years to help people get the most out of high performance computer systems. It features highly advanced automatic vectorization and parallelization. VAST analyzes source codes and creates a new version of the program that includes vector and/or parallel constructs and runs faster than the original program.

AltiVec Code

For AltiVec, a special VAST code generation pass automatically replaces loops in C/C++ programs with inline vector extensions (as defined by Motorola), and loops in Fortran programs with calls to newly-generated C functions with inline vector extensions. These vector extensions allow VAST to access the AltiVec unit at close to instruction level efficiency while remaining at the source code level.

The AltiVec unit's 128-bit vector register set allows either four 32-bit, eight 16-bit, or sixteen 8-bit operands to be computed at the same time. While operands must nominally be aligned on 16 byte boundaries, there are special instructions in the AltiVec unit that allow reasonably fast methods of aligning data "on the fly". VAST is able to vectorize all of the AltiVec data types that appear in C codes, and can automatically generate the code to deal with un-aligned vector data.

If you are interested in more details, you can look at an example of VAST's code generation or see the FAQ.

Using VAST

The driver(s) that comes with VAST/AltiVec combines VAST and the compiler(s) in a transparent way, so that (for example) compilation can be as easy as replacing gcc with vcc or f90 with v90 in your makefiles.

There are several ways to use VAST. If your program spends most of its time in clean loops, then VAST may be able to vectorize your program automatically. Often with C programs, depending on the programming style they are written it, a potential "data dependency" between pointers and arrays may prevent some vectorization, and some simple assertions from the user can improve the amount of vectorization. VAST can provide messages that help you understand what parts of your program have been successfully optimized and what parts have not been optimized.

Advanced users may choose to write clean loops for new applications and have VAST automatically generate AltiVec code, rather than doing AltiVec coding by hand. Very advanced users may wish to modify the VAST intermediate C code and change the order or nature of vector operations that VAST generates.

DEEP/AltiVec

A new version of DEEP works closly with VAST/AltiVec to provide exceptional performance analysis of your AltiVec programs. With DEEP/AltiVec, you can see at a glance which loops have been vectorized, and quickly zoom in on any performance bottlenecks. VAST/AltiVec is used to instrument the code, and when the code is executed, the resulting files can be displayed with DEEP/AltiVec.

Return to Top.


Home Contact Legal

Copyright 2003, 2005 Crescent Bay Software Corp.