Numerical Libraries

Panther ships with an impressive array of resources used for numerical computing. In addition to the optimized mathematical library, libm , many numerical libraries are packaged within the vecLib framework. This framework is located in /System/Library/Frameworks/vecLib.framework, and its libraries have been optimized to take advantage of the G5 and the Velocity engine. The vecLib framework contains the following libraries:

BLAS

Complete set (levels 1, 2, and 3) of the basic linear algebra subprograms. (See http://www.netlib.org/blas/faq.html.)

LAPACK

Linear algebra package, written on top of the BLAS library. (See http://www.netlib.org/lapack/index.html.) Lapack is designed to run efficiently having most of the actual computations performed by optimized BLAS routines.

vDSP

Digital signal processing.

vBasicOps

A set of basic arithmetic operations. (See /System/Library/Frameworks/vecLib.framework/Versions/Current/Headers/vBasicOps.h.)

vBigNum

A set of basic arithmetic operations on large (128-bit) integers. (See /System/Library/Frameworks/vecLib.framework/Versions/Current/Headers/vBasicOps.h.)

vMathLib

A set of basic vectorized transcendental functions, optimized for the Velocity engine. (See http://developer.apple.com/hardware/ve.)

To compile code using the vecLib framework, you must include the header file with the following line of code:

#include <vecLib/vecLib.h>

You can compile a program named prog.c, which makes use of this framework, as follows:

$ gcc ...

Get Mac OS X Panther for Unix Geeks, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.