IBM Support

MASS vector library for Blue Gene -- Overview

Product Documentation


Abstract

This document provides an overview of the MASS vector library for Blue Gene®.

Content

The MASS vector library contains an accelerated set of frequently-used mathematical functions. It provides a set of functions that compute the same mathematical operation for each element of a vector of operands.

MASS Vector Library for Blue Gene/Q

For information on the MASS vector library for Blue Gene/Q, click on the following links:
Using the vector library (C/C++)
Using the vector library (Fortran)

MASS Vector Library for Blue Gene/L and Blue Gene/P

The MASS vector library, libmassvbgl.a, can be used with either Fortran or C/C++ applications and will run in 32-bit mode on Blue Gene/L or Blue Gene/P processors.

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 vacos corresponds to scalar function acos. An exception is vrec, 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 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":"PF016","label":"Linux"}],"Version":"4.4;7.3","Edition":"","Line of Business":{"code":"","label":""}}]

Document Information

Modified date:
17 June 2018

UID

swg27018497