MASS vector libraries for Linux -- Overview

Product documentation


Abstract

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

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 MASS vector libraries libmassv.a, libmassvp3.a, libmassvp4.a, libmassvp5.a, and libmassvp6.a (32-bit), and libmassv_64.a, libmassvp3_64.a, libmassvp4_64.a, libmassvp5_64.a, and libmassvp6_64.a (64-bit) contain vector functions that have been tuned for generic Power Architecture®, POWER3™, POWER4™, POWER5™, and POWER6® processors, respectively. The libraries can be used with C/C++ or Fortran applications. (For PowerPC® 970, libmassvp4.a or libmassvp4_64.a should be used.)

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

vacos
vacosh
vasin
vasinh
vatan2
vatanh
vcbrt
vcos
vcosisin
vcosh
vdint
vdiv
vdnint
vexp
vexpm1
vlog10
vlog1p
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 function with the same base name. For example, vector function vsacos corresponds to scalar function acosf. An exception is vsrec, which computes the reciprocal.)

vsacos
vsacosh
vsasin
vsasinh
vsatan2
vsatanh
vscbrt
vscos
vscosisin
vscosh
vsdiv
vsexp
vsexpm1
vslog10
vslog1p
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 massv.h. The Fortran interfaces can be obtained by including massv.include.

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 vssincos (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

Rate this page:

(0 users)Average rating

Document information


More support for:

Mathematical Acceleration Subsystem
Libraries

Software version:

5.0

Operating system(s):

Linux

Reference #:

7018495

Modified date:

2010-04-13

Translate my page

Machine Translation

Content navigation