Linux の MASS ライブラリーは、AIX 用の MASS ライブラリーの サブセットです。 Linux では、32 ビット・オブジェクトと 64 ビット・オブジェクトは単一のライブラリーで混在しない場合があるため、2 つのバージョンの MASS ライブラリー libmassvp4.a (32 ビット) および libmassvp4_64.a (64 ビット) が 提供されます。
ベクトル・ライブラリーに含まれている単精度関数と 倍精度関数は、表 28 で 要約されています。 関数のインターフェース宣言を指定するには、ソース・ファイルに massv.include を入れます。
倍精度関数 | 単精度関数 | 引き数 | 説明 |
vrec | vsrec | (y,x,n) | i=1,..,n の場合に、y(i) を x(i) の逆数に設定します。 |
vrsqrt | vsrsqrt | (y,x,n) | i=1,..,n の場合に、y(i) を x(i) の平方根の逆数に設定します。 |
vsqrt | vssqrt | (y,x,n) | i=1,..,n の場合に、y(i) を x(i) の平方根に設定します。 |
以下の例は、一部の MASS 倍精度ベクトル関数のインターフェース宣言を 示しています。
interface subroutine vsqrt (y, x, n) real*8 y(*), x(*) integer n ! Sets y(i) to the square root of x(i), for i=1,..,n end subroutine vsqrt subroutine vrsqrt (y, x, n) real*8 y(*), x(*) integer n ! Sets y(i) to the reciprocal of the square root of x(i), ! for i=1,..,n end subroutine vrsqrt end interface
以下の例は、一部の MASS 単精度ベクトル関数のインターフェース宣言を 示しています。
interface subroutine vssqrt (y, x, n) real*4 y(*), x(*) integer n ! Sets y(i) to the square root of x(i), for i=1,..,n end subroutine vssqrt subroutine vsrsqrt (y, x, n) real*4 y(*), x(*) integer n ! Sets y(i) to the reciprocal of the square root of x(i), ! for i=1,..,n end subroutine vsrsqrt end interface
MASS ベクトル・ライブラリーのすべての関数は、ベクトル内での位置と
ベクトル長に関係なく、指定された入力値が常に同じ結果を
生成するという意味で、一貫性があります。