The Basic Linear Algebra Subprograms (BLAS) are sets of Fortran (and more recently C) primitives for matrix and vector notations. They cover all common operations in linear algebra. There are three levels, corresponding to the types of object operated upon:
The BLAS are intended to be called in the innermost loops of linear algebra codes. Usually, most of the computation in a code that uses BLAS calls is done inside these calls. LINPACK (details given below) uses the level-1 BLAS throughout. LAPACK (details given below) exploits all three levels, using the highest possible level at all times.
Each set of BLAS comprises a set of program specifications only. The specifications define the parameters to each routine and state what the routines must do, but not how it must do it (like an abstract data type). Thus, the implementor has freedom over the precise implementation details (loop orderings, block algorithms, special code for special cases) and even the method (fast versus conventional matrix multiply), but the implementation is required to be numerically stable, and code that tests the numerical stability is provided with the model implementations. Most vendors of high-performance parallel computers provide implementations of lower-level routines based on BLAS specifications.