# IBM:MASS

### MASS Library

The Mathematical Acceleration SubSystem (MASS) is a collection of optimized mathematical functions. These functions are thread-safe, and can be used with C, C++ and Fortran programs. To load the MASS Library module type "module load xlmass".

#### MASS scalar library

The MASS scalar library contains a collection of scalar mathematical function (e.g. sin, cos, erfc). To link the MASS scalar library add the "-lmass_64" flag ("-lmass" for 32 bit applications) to your compile/link command

Example: compile program hello_mass.c and link with MASS scalar library

xlc -lmass_64 hello_mass.c

#### MASS vector library

The MASS vector library contains a collection of vector mathematical function (e.g. vsin, vcos, verfc). To link the MASS vector library add the "-lmassv_64" ("-lmassv" for 32 bit applications) to your compile/link command

Example: compile program hello_mass.c and link with MASS scalar library

xlc -lmassv_64 hello_mass.c

NOTE: if you compile your program using "-qhot -O3", "-O4", or "-O5" the
compiler will try to vectorize system math functions by calling equivalent
MASS vector functions if possible. Otherwise the compiler will replace system
math functions with scalar MASS functions.