IBM Support

MASS vector libraries for AIX -- Overview

Product Documentation


Abstract

This document provides an overview of the MASS vector libraries for AIX.

Content

The MASS vector libraries contain an accelerated set of frequently-used mathematical functions. They provide a set of functions that compute the same mathematical operation for a vector of operands.

The vector MASS libraries libmassv.a, libmassvp3.a, libmassvp4.a, libmassvp5.a, libmassvp6.a, and libmassvp7.a contain vector functions that have been tuned for generic Power Architecture®, POWER3™, POWER4™, POWER5™, POWER6®, and POWER7™ processors, respectively. They can be used in either 32- or 64-bit mode, with C/C++ or Fortran applications. (For PowerPC® 970, libmassvp4.a should be used.)

MASS vector functions -- double precision
(The mathematical operation computed can be determined by looking up the scalar or SIMD function with the same base name. For example, vector function vacos corresponds to scalar function acos or SIMD function acosd2. An exception is vrec, which corresponds to recipd2.)

vacos
vacosh
vasin
vasinh
vatan2
vatan (libmassvp7.a only)
vatanh
vcbrt
vcos
vcosisin
vcosh
vdint
vdiv
vdnint
verfc (libmassvp7.a only)
verf (libmassvp7.a only)
vexp2 (libmassvp7.a only)
vexp2m1 (libmassvp7.a only)
vexp
vexpm1
vhypot (libmassvp7.a only)
vlgamma (libmassvp7.a only)
vlog10
vlog1p
vlog2 (libmassvp7.a only)
vlog21p (libmassvp7.a only)
vlog
vpow
vqdrt
vrcbrt
vrec
vrqdrt
vrsqrt
vsin
vsincos
vsinh
vsqrt
vtan
vtanh

MASS vector functions -- single precision
(The mathematical operation computed can be determined by looking up the scalar or SIMD function with the same base name. For example, vector function vsacos corresponds to scalar function acosf or SIMD function acosf4. An exception is vsrec, which corresponds to recipf4.)

vsacos
vsacosh
vsasin
vsasinh
vsatan2
vsatan (libmassvp7.a only)
vsatanh
vscbrt
vscos
vscosisin
vscosh
vsdiv
vserfc (libmassvp7.a only)
vserf (libmassvp7.a only)
vsexp2 (libmassvp7.a only)
vsexp2m1 (libmassvp7.a only)
vsexp
vsexpm1
vshypot (libmassvp7.a only)
vslog10
vslog1p
vslog2 (libmassvp7.a only)
vslog21p (libmassvp7.a only)
vslog
vspow
vsqdrt
vsrcbrt
vsrec
vsrqdrt
vsrsqrt
vssin
vssincos
vssinh
vssqrt
vstan
vstanh

MASS vector functions -- integer
(See prototypes below for a description of the operation computed.)

vpopcnt4
vpopcnt8

Example C/C++ prototypes and Fortran interfaces

The C/C++ prototypes for the MASS vector functions can be obtained by including massvp7.h (for libmassvp7.a), or massv.h (for the other vector libraries). The Fortran interfaces can be obtained by including massvp7.include (for libmassvp7.a), or massv.include (for the other vector libraries).

The C/C++ prototype or Fortran interface for the MASS vector functions each has the form of the applicable one of the following examples:

Example C/C++ prototypes (double precision)
        void vacos (double *y, double *x, int *n);
          // Sets y[i] to the cosine of x[i], for i=0,...,*n-1
        void vatan2 (double *z, double *x, double *y, int *n);
          // Sets z[i] to the arc tangent of x[i]/y[i], for i=0,...,*n-1
        void vsincos (double *s, double *c, double *x, int *n);
          // Sets s[i] to the sine of x[i] and c[i] to the cosine of x[i],
          // for i=0,...,*n-1
        void vcosisin (double _Complex *y, double *x, int *n);
          // Sets the real part of y[i] to the cosine of x[i] and the
          // imaginary part of y[i] to the sine of x[i], for i=0,...,*n-1

Example C/C++ prototypes (single precision)
        void vsacos (float *y, float *x, int *n);
          // Sets y[i] to the cosine of x[i], for i=0,...,*n-1
        void vsatan2 (float *z, float *x, float *y, int *n);
          // Sets z[i] to the arc tangent of x[i]/y[i], for i=0,...,*n-1
        void vssincos (float *x, float *s, float *c, int *n);
          // Sets s[i] to the sine of x[i] and c[i] to the cosine of x[i],
          // for i=0,...,*n-1
        void vscosisin (float _Complex *y, float *x, int *n);
          // Sets the real part of y[i] to the cosine of x[i] and the
          // imaginary part of y[i] to the sine of x[i], for i=0,...,*n-1

Example C/C++ prototypes (integer)
    unsigned int vpopcnt4 (void *, int *);
        // Returns the total number of 1 bits in the concatenation of the
        // binary representation of ((float *)x)[i], for i=0,...,*n-1
    unsigned int vpopcnt8 (void *, int *);
         // Returns the total number of 1 bits in the concatenation of the
         // binary representation of ((double *)x)[i], for i=0,...,*n-1

Example Fortran interfaces (double precision)
      subroutine vacos (y, x, n)
          real*8 y(*), x(*)
          integer n
          ! Sets y(i) to the cosine of x(i), for i=1,...,n
        end subroutine
        subroutine vatan2 (z, x, y, n)
          real*8 z(*), x(*), y(*)
          integer n
          ! Sets z(i) to the arc tangent of x(i)/y(i), for i=1,...,n
        end subroutine
        subroutine vsincos (s, c, x, n)
          real*8 s(*), c(*), x(*)
          integer n
          ! Sets s(i) to the sine of x(i) and c(i) to the cosine of x(i),
          ! for i=1,...,n
        end subroutine
        subroutine vcosisin (y, x, n)
          complex*16 y(*)
          real*8 x(*)
          integer n
          ! Sets the real part of y(i) to the cosine of x(i) and the
          ! imaginary part of y(i) to the sine of x(i), for i=1,...,n
        end subroutine

Example Fortran interfaces (single precision)
       subroutine vsacos (y, x, n)
          real*4 y(*), x(*)
          integer n
          ! Sets y(i) to the cosine of x(i), for i=1,...,n
        end subroutine
        subroutine vsatan2 (z, x, y, n)
          real*4 z(*), x(*), y(*)
          integer n
          ! Sets z(i) to the arc tangent of x(i)/y(i), for i=1,...,n
        end subroutine
        subroutine vsincos (s, c, x, n)
          real*4 s(*), c(*), x(*)
          integer n
          ! Sets s(i) to the sine of x(i) and c(i) to the cosine of x(i),
          ! for i=1,...,n
        end subroutine
        subroutine vscosisin (y, x, n)
          complex*8 y(*)
          real*4 x(*)
          integer n
          ! Sets the real part of y(i) to the cosine of x(i) and the
          ! imaginary part of y(i) to the sine of x(i), for i=1,...,n
        end subroutine

Example Fortran interfaces (integer)
    integer*4 function vpopcnt4 (x, n) integer*4 x(*),integer*4
        ! Returns the total number of 1 bits in the concatenation of the
        ! binary representation of x(i), for i=1,...,n
    end function
    integer*4 function vpopcnt8 (x, n) integer*8 x(*),integer*4 n
        ! Returns the total number of 1 bits in the concatenation of the
        ! binary c representation of x(i), for i=1,...,n.
    end function

[{"Product":{"code":"SSVKBV","label":"Mathematical Acceleration Subsystem"},"Business Unit":{"code":"BU050","label":"BU NOT IDENTIFIED"},"Component":"Libraries","Platform":[{"code":"PF002","label":"AIX"}],"Version":"6.0","Edition":"","Line of Business":{"code":"","label":""}}]

Document Information

Modified date:
17 June 2018

UID

swg27018490