Skip to main content

Software > Software Development > Mathematical Acceleration Subsystem >

Mathematical Acceleration Subsystem for AIX

Features and benefits

Mathematical Acceleration Subsystem (MASS) for AIX® consists of libraries of tuned mathematical intrinsic functions.

These libraries:

  • 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 AIX includes the scalar and vector library groups described below:
 

Scalar Library 
Vector Libraries
Vector Functions Source Library
 

Scalar library
The MASS scalar library, libmass.a, contains an accelerated set of frequently-used math intrinsic functions in the AIX math system system library, plus the added functions dnint for C/C++ and rsqrt for Fortran.

The libmass.a library can be used with either Fortran or C/C++ applications and will run under AIX on all of the IBM pSeries™ and RS/6000™ processors. The library contains the following scalar functions: 

Scalar Library Functions

sincostanatansqrt
sinhcoshtanhatan2rsqrt
expdnintlog
pow  (C/C++)x**y (Fortran)

When called from C, all the scalar MASS functions except dnint accept double-precision arguments and return a double-precision result. The dnint function takes a pointer to a double-precision argument.

When called from Fortran, all the scalar MASS functions accept double-precision arguments and return a double-precision result.

The trigonometric functions (sin, cos, tan) return NaN (Not-a-Number) for large arguments (abs(x)>2**50*pi). The pow (C/C++) and x**y (Fortran) functions accept negative x arguments with integer y arguments.

Back to top

Vector libraries
The general vector library, libmassv.a, contains vector functions that will run on all computers in the IBM pSeries and RS/6000 families. The library libmassvp3.a contains some functions that have been tuned for the POWER3 architecture, while the remaining functions are identical to those in libmassv.a.

Similarly, the library libmassvp4.a contains some functions that have been tuned for the POWER4 architecture, while the remaining functions are identical to those in libmassv.a.

The vector libraries libmassv.a, libmassvp3.a, and libmassvp4.a can be used with either Fortran or C/C++ applications. The accuracy of the vector functions is comparable to that of the corresponding scalar functions in libmass.a, though results may not be bitwise-identical.

Vector Library Double-Precision Functions

vrecvdivvsqrtvrsqrtvexp
vlogvsinvcosvtanvasin
vacosvatan2vsincosvcosisinvdint
vdnintvcoshvexpm1vlog10vlog1p
vpowvsinhvtanh 
   
Vector Library Single-Precision Functions

vsrecvsdivvssqrtvsrsqrtvsexp
vslogvssinvscosvstanvsasin
vsacosvsatan2vssincosvscosisinvscosh
vsexpm1vslog10vslog1pvspowvssinh
  vstanh 

The MASS vector functions accept double-precision (or single-precision) vector input and output arguments, and an integer vector-length parameter.

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

We're here to help
Easy ways to get the answers you need.
Request a quote
E-mail IBM

Or call us at:
877-426-3774
Priority code:
104CBW67


Technical details

Performance and Accuracy of MASS Libraries for AIX

Consistency of MASS Vector Functions for AIX

Using MASS Libraries on AIX


Upgrades/Migrations

Download Current Version of MASS Libraries for AIX

Download Previous Versions of MASS Libraries for AIX


Further reading

C Prototypes for MASS Functions on AIX

Fortran Interface Blocks for MASS Functions on AIX