Mathematical Acceleration Subsystem (MASS) for Linux® consists of libraries of mathematical intrinsic functions tuned specifically for optimum performance on POWER architectures.
These libraries and functions:
Include both scalar and vector functions.
Are thread-safe.
Support both 32-bit and 64-bit compilations.
Offer improved performance over their corresponding standard system library routines.
Are intended for use in C, C++, and Fortran applications where slight differences in accuracy or handling of exceptional values can be tolerated.
Mathematical Acceleration Subsystem for Linux includes the items described below:
Scalar libraries
The MASS scalar library for Linux contains an accelerated set of frequently-used math intrinsic functions in the Linux math system system library, plus the added functions dnint for C/C++ and rsqrt for Fortran. There are two versions of the scalar library, libmass.a and libmass_64.a , for 32-bit mode and 64-bit mode.
The scalar libraries can be used with either Fortran, C, or C++ applications and will run under Linux on all IBM pSeries™ processors supported by Linux. When called from C or Fortran, the scalar MASS functions accept double-precision arguments and return a double-precision result.
The library contains the following scalar functions:
| Scalar Library Functions |
|
| sin | cos | tan | atan | sqrt |
| sinh | cosh | tanh | atan2 | rsqrt |
| exp | dnint | log | |
| pow (C/C++) | x**y (Fortran) |
Back to top
Vector libraries
There are three versions of the 32-bit vector library: libmassv for general use, libmassvp3 tuned for POWER3 architectures, and libmassvp4 tuned for POWER4 architectures. Each library also has a 64-bit version: libmassv_64.a, libmassvp3_64.a, and libmassvp4_64.a respectively.
The vector libraries can be used with either Fortran, C, or C++ applications.
| Vector Library Double-Precision Functions |
|
| vrec | vdiv | vsqrt | vrsqrt | vexp |
| vlog | vsin | vcos | vtan | vasin |
| vacos | vatan2 | vsincos | vcosisin | vsinh |
| vcosh | vtanh | vexpm1 | vlog10 | vlog1p |
| vpow | vcbrt | vrcbrt | vdint | vdnint |
| |
| Vector Library Single-Precision Functions |
|
| vsrec | vsdiv | vssqrt | vsrsqrt | vsexp |
| vslog | vssin | vscos | vstan | vsasin |
| vsacos | vsatan2 | vssincos | vscosisin | vssinh |
| vscosh | vstanh | vsexpm1 | vslog10 | vslog1p |
| vspow | vscbrt | vsrcbrt | |
The MASS vector functions accept double-precision (or single-precision) vector input and output arguments, and an integer vector-length parameter. All the functions in the Linux MASS libraries are consistent, in the sense that a given input value will always produce the same result, regardless of its position in the vector, and regardless of the vector length.
Back to top
MASS vector functions source library
Successful use of the MASS vector libraries is contingent on the user vectorizing the application. To assist in that effort, the MASS vector Fortran and C/C++ source libraries are provided to enable application developers to write portable vector code that can run on non-IBM systems where the MASS libraries are not available.
The source library, libmassv.f, includes Fortran versions of all the vector functions in the MASS vector libraries.
The source library, libmassv.c, includes C/C++ versions of all the vector functions in the MASS vector libraries.
The syntax for the vector functions is visible in libmassv.f and libmassv.c, and the user can write code using these functions to obtain code that may port to systems other than the pSeries and RS/6000 systems. The user can then use the faster MASS vector libraries with that same code when running on a pSeries or RS/6000 system.
Back to top