Cvf-6.6 Extended Math Library

Embed Size (px)

Citation preview

  • 8/15/2019 Cvf-6.6 Extended Math Library

    1/583

    Compaq Extended Math Library

    Reference Guide

    January 2001

    This document describes the Compaqยฎ Extended Math Library (CXML).CXML is a set of high-performance mathematical routines designed foruse in numerically intensive scientific and engineering applications.This document is a guide to using CXML and provides referenceinformation about CXML routines.

    Revision/Update Information:   This document ha s been revised forthis release of CXML.

    Compaq Computer CorporationHouston, Texas

  • 8/15/2019 Cvf-6.6 Extended Math Library

    2/583

    ยฉ 2001 Compaq Computer Corporation

    Compaq, the COMPAQ logo, DEC, DIG ITAL, VAX, and VMS are registered in the U.S. P atent andTra dema rk Offi ce.Alpha, Tru64, DEC Fortran, OpenVMS, and VAX F ORTRAN are tra demarks of Compaq InformationTechnologies, L.P. in the United Sta tes and other countries.

    Adobe, Adobe Acrobat, and P OS TS C R I P T   are registered trademarks of Adobe Systems Incorporated.CRAY is a registered tra demark of Cra y Research, Incorporated.IBM is a registered trademark of International Business Machines Corporation.IEEE is a registered trademark of the Insti tute of Electrical and Electronics Engineers Inc.IMSL and Visual Numerics are registered trademarks of Visual Numerics, Inc.I n t el a n d Pen t i um a r e t r a d em a r ks of I n t el C o r por a t i on .KAP is a registered trademark of Kuck and Associates, Inc.Linux is a registered tra demark of Linus Torvalds.Microsoft , Windows, and Windows NT are ei ther tra demarks or registered tra demarks of MicrosoftCorporation in the United States and other countries.OpenMP and the OpenMP logo are trademarks of OpenMP Architecture Review Board.SU N, SU N Microsystems, and J ava are registered tradema rks of Sun Microsystems, Inc.UNI X, Motif, OSF, OSF/1, OSF/Motif, and The Open G roup ar e tr adema rks of The Open G roup.

    All other trademarks and registered trademarks are the property of their respective holders.

    All other product names mentioned herein may be the trademarks or registered trademarks of theirrespective compan ies.

    Confidential computer softwa re. Valid l icense from C ompaq required for possession, use or copying.Consistent with FAR 12.211 a nd 12.212, Commercial Computer S oftwa re, C omputer SoftwareDocumentat ion, a nd Technical Da ta for C ommercial I tems are l icensed t o the U.S. Governmentunder vendorโ€™s standard commercial license.

    Compaq shall not be l iable for technical or editorial errors or omissions contained herein. Theinformation in this document is provided โ€˜ โ€˜as is โ€™ โ€™ without warranty of any kind and is subjectt o ch a n ge w i t h out n ot i ce. Th e w a r r a n t i es f o r C o m pa q pr od uct s a r e s et f or t h i n t h e expr es slimited wa rrant y sta tements accompanying such products. Nothing herein should be construed a sconsti tuting an additional warranty.

    CXML documention is ava ilable on CD -ROM.

    This document prepared using DECdocument, Version 3.3-1b.

  • 8/15/2019 Cvf-6.6 Extended Math Library

    3/583

    Contents

    Preface   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   xix

    Introduction to CXML

    1   P ar allel Library Support for Symmetric Multiprocessing . . . . . . . . . . . . . .   22   C r a y S c iLi b S uppor t (S C IP OR T) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   23   C a l l ing C XML fr om P r ogr a m m i ng La ngua ges . . . . . . . . . . . . . . . . . . . . . .   24   How CXML Achieves High P erforma nce . . . . . . . . . . . . . . . . . . . . . . . . . .   3

    5   CXMLโ€™s Accuracy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   3

    Part 1โ€”Programming Considerations

    1 Preparing and Storing Program Data

    1.1   D a t a a nd D a t a Ty pes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   1โ€“11.2   P l a t for m s a nd N um b er F or m a t s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   1โ€“21.3   S t or ing D a t a . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   1โ€“31.3.1   Ar r a y s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   1โ€“31.3.1.1   One-di m ens iona l a r r a y s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   1โ€“31.3.1.2   Two-dimensional Arra ys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   1โ€“3

    1.3.1.3   S t or ing Va l ues i n a n Ar r a y . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   1โ€“31.3.1.4   Ar r a y S t or a ge R eq ui r em ent s . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   1โ€“41.3.2   F or t r a n Ar r a y s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   1โ€“41.3.2.1   One-Dimensional Fortra n Arra y Storage . . . . . . . . . . . . . . . . . . . .   1โ€“41.3.2.2   Two-Dimensional Fortra n Arra y Storage . . . . . . . . . . . . . . . . . . . .   1โ€“41.3.2.3   Ar r a y E l em ent s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   1โ€“51.3.3   Vect or s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   1โ€“51.3.3.1   Tra nspose a nd Conjugat e Tra nspose of a Vector . . . . . . . . . . . . . . .   1โ€“61.3.3.2   D efini ng a Vect or in a n Ar r a y . . . . . . . . . . . . . . . . . . . . . . . . . . . .   1โ€“6

    1.3.3.2.1   Vector Length . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   1โ€“71.3.3.2.2   Vect or Loca t i on . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   1โ€“71.3.3.2.3   S t r i de of a Vect or . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   1โ€“71.3.3.2.4   Selecting Vector Elements from an Arra y . . . . . . . . . . . . . . . .   1โ€“8

    1.3.3.3   S t or ing a Vect or in a n A rr a y . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   1โ€“91.3.4   M a t r i ces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   1โ€“101.3.4.1   Tran spose an d Conjugate Tra nspose of a Mat rix . . . . . . . . . . . . . .   1โ€“111.3.4.2   S t or ing a M a t r i x in a n Ar r a y . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   1โ€“111.3.4.3   D efini ng a M a t r i x in a n Ar r a y . . . . . . . . . . . . . . . . . . . . . . . . . . . .   1โ€“121.3.4.3.1   M a t r i x Loca t i on . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   1โ€“12

    1.3.4.3.2   F i r st D i m ens i on of t he Ar r a y . . . . . . . . . . . . . . . . . . . . . . . . . .   1โ€“121.3.4.3.3   Number of Rows an d Columns of the Mat rix . . . . . . . . . . . . . .   1โ€“131.3.4.3.4   S elect i ng M a t r i x E l em ent s fr om a n Ar r a y . . . . . . . . . . . . . . .   1โ€“131.3.4.4   S y m m et r ic a nd Her m i t ia n M a t r i ces . . . . . . . . . . . . . . . . . . . . . . . .   1โ€“131.3.4.5   S t or a ge of S y m m et r i c a nd Her m i t ia n M a t r i c es . . . . . . . . . . . . . . .   1โ€“14

    iii

  • 8/15/2019 Cvf-6.6 Extended Math Library

    4/583

    1.3.4.5.1   Two-Dimensional U pper- or Lower-Tria ngula r St orage . . . . . .   1โ€“141.3.4.5.2   One-D i m ens iona l P a cked S t or a ge . . . . . . . . . . . . . . . . . . . . . .   1โ€“151.3.4.6   Tr i a ngula r M a t r i ces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   1โ€“171.3.4.7   S t or a ge of Tr i a ngula r M a t r i ces . . . . . . . . . . . . . . . . . . . . . . . . . . .   1โ€“171.3.4.8   G ener a l Ba nd M a t r i ces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   1โ€“17

    1.3.4.9   S t or a ge of G ener a l Ba nd M a t r i ces . . . . . . . . . . . . . . . . . . . . . . . . .   1โ€“181.3.4.10   R ea l S y m m et r ic Ba nd M a t r i ces a nd C om pl ex Her m it i a n B a ndM a t r i ces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   1โ€“19

    1.3.4.11   Storage of Real Symmetric B an d Mat rices or Complex HermitianBa nd M a t r i ces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   1โ€“20

    1.3.4.12   Upper- an d Lower-Triangula r Ba nd Matrices . . . . . . . . . . . . . . . .   1โ€“211.3.4.13   Storage of Upper- an d Lower-Triangular B an d Mat rices . . . . . . . .   1โ€“22

    2 Coding an Application Program

    2.1   Selecting th e Appropriate Da ta Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   2โ€“12.2   D a t a S t r uct ur e a nd S t or a ge M et hods . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   2โ€“12.3   Im pr ov ing P er for m a nc e . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   2โ€“1

    2.4   C a l l ing S eq uences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   2โ€“22.4.1   P a s s ing of Ar gum ent s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   2โ€“32.4.2   Implicit a nd Explicit Arguments . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   2โ€“32.4.3   E x pa nding Ar gum ent Li s t s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   2โ€“32.5   Ca lling Subroutines and F unctions in Fortran . . . . . . . . . . . . . . . . . . . . . .   2โ€“42.5.1   F or t r a n P r ogr a m E x a m pl e . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   2โ€“52.6   Using CXML from Non-Fortran P rogramming Langua ges . . . . . . . . . . . . .   2โ€“5

    2.6.1   C a l l ing C XML fr om C P r ogr a m s . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   2โ€“62.6.2   C P r ogr a m E x a m ple . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   2โ€“62.7   E r r or Ha ndl ing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   2โ€“72.7.1   Int er na l E x cept i ons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   2โ€“8

    3 Compiling and Linking an Application Program

    3.1   Tr u64 UN IX P l a t for m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   3โ€“13.1.1   C XML Li b r a r i es . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   3โ€“1

    3.1.2   C ompil ing a nd Li nking t o t he S er ia l Li br a r y . . . . . . . . . . . . . . . . . . . .   3โ€“13.1.3   C ompil ing a nd Li nking t o t he P a r a l l el Lib r a r y . . . . . . . . . . . . . . . . . .   3โ€“23.1.4   Compiling and Linking to the Archive Library . . . . . . . . . . . . . . . . . .   3โ€“23.2   Wi ndows N T P l a t for m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   3โ€“23.2.1   C XML Li b r a r i es . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   3โ€“23.2.2   Using the Libraries from the Command Console . . . . . . . . . . . . . . . . .   3โ€“23.2.3   Using the Libraries from Developer Studio . . . . . . . . . . . . . . . . . . . . .   3โ€“33.3   OpenVM S Al pha P l a t for m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   3โ€“33.3.1   C ompil ing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   3โ€“33.3.2   C XML Im a ge Li br a r i es . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   3โ€“4

    3.3.3   Li nki ng t o a C XML Li b r a r y . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   3โ€“43.3.4   Li nki ng E r r or s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   3โ€“5

    iv

  • 8/15/2019 Cvf-6.6 Extended Math Library

    5/583

    Part 2โ€”Using CXML Subprograms

    4 Using the Level 1 BLAS Subprograms and Extensions

    4.1   Level 1 B LAS Oper a t i ons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   4โ€“1

    4.2   Vect or S t or a ge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   4โ€“14.3   N a m i ng C onvent ions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   4โ€“24.4   S um m a r y of Level 1 BLA S S ub pr ogr a m s . . . . . . . . . . . . . . . . . . . . . . . . . .   4โ€“24.5   C a l l ing S ub pr ogr a m s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   4โ€“84.6   Argument Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   4โ€“84.7   E r r or Ha ndl i ng . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   4โ€“84.8   Defi nition of Absolute Value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   4โ€“94.9   A Look at a L evel 1 Extensions Subprogram . . . . . . . . . . . . . . . . . . . . . . .   4โ€“9

    5 Using the Sparse Level 1 BLAS Subprograms

    5.1   S pa r s e Lev el 1 BLAS Oper a t i ons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   5โ€“15.2   S pa r s e Vect or S t or a ge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   5โ€“2

    5.2.1   S pa r s e Vect or s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   5โ€“25.2.2   S t or ing a S pa r s e Vect or . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   5โ€“35.3   N a m i ng C onvent ions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   5โ€“35.4   S um m a r y of S pa r s e Lev el 1 BLAS S ub pr ogr a m s . . . . . . . . . . . . . . . . . . . .   5โ€“45.5   C a l l ing S ub pr ogr a m s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   5โ€“65.6   Argument Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   5โ€“75.6.1   D efini ng t he N umb er of N onzer o E l ement s . . . . . . . . . . . . . . . . . . . . .   5โ€“7

    5.6.2   D efini ng t he Input S ca l a r . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   5โ€“75.6.3   Describing the Input/Output Vectors . . . . . . . . . . . . . . . . . . . . . . . . . .   5โ€“75.7   E r r or Ha ndl i ng . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   5โ€“75.8   A Look a t a S pa r s e Lev el 1 B LAS S ub pr ogr a m . . . . . . . . . . . . . . . . . . . . .   5โ€“7

    6 Using the Level 2 BLAS Subprograms6.1   Level 2 B LAS Oper a t i ons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   6โ€“16.2   Vect or a nd M a t r i x S t or a ge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   6โ€“26.3   Naming Conventions for Level 2 B LAS Subprograms . . . . . . . . . . . . . . . .   6โ€“36.4   S um m a r y of Level 2 BLA S S ub pr ogr a m s . . . . . . . . . . . . . . . . . . . . . . . . . .   6โ€“4

    6.5   C a l l ing S ub pr ogr a m s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   6โ€“76.6   Argument Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   6โ€“86.6.1   S peci fy i ng Ma t r i x Opt i ons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   6โ€“86.6.2   D efini ng t he S ize of t he Ma t r i x . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   6โ€“96.6.3   D es cr i bi ng t he Ma t r i x . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   6โ€“96.6.4   D es cr i bi ng t he Input S c a l a r s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   6โ€“106.6.5   Describing the Vectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   6โ€“106.6.6   Inv a l i d Ar gum ent s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   6โ€“116.7   Ran k-One and Ra nk-Two Upda tes to Ba nd Mat rices . . . . . . . . . . . . . . . . .   6โ€“11

    6.8   E r r or Ha ndl i ng . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   6โ€“126.9   A Look a t a Level 2 BLAS S ub r out i ne . . . . . . . . . . . . . . . . . . . . . . . . . . . .   6โ€“12

    v

  • 8/15/2019 Cvf-6.6 Extended Math Library

    6/583

    7 Using the Level 3 BLAS Subprograms

    7.1   Level 3 BL AS Oper a t i ons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   7โ€“17.1.1   Types of Operat ions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   7โ€“17.1.2   M a t r i x S t or a ge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   7โ€“27.1.3   N a m i ng C onv ent i ons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   7โ€“3

    7.2   S um m a r y of Level 3 B LAS S ub pr ogr a m s . . . . . . . . . . . . . . . . . . . . . . . . . .   7โ€“37.3   C a l l ing t he S ub pr ogr a m s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   7โ€“67.4   Argument Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   7โ€“67.4.1   S peci fy i ng Ma t r i x Opt i ons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   7โ€“67.4.2   D efini ng t he S i ze of t he M a t r i ces . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   7โ€“87.4.3   D es cr i bi ng t he Ma t r i c es . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   7โ€“87.4.4   S peci fy i ng t he Input S c a l a r . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   7โ€“87.4.5   Inv a l i d Ar gum ent s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   7โ€“97.5   E r r or Ha ndl ing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   7โ€“97.6   A Look a t a Level 3 B LAS S ub r out i ne . . . . . . . . . . . . . . . . . . . . . . . . . . . .   7โ€“9

    7.7   Exam ples of REAL*8 Matrices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   7โ€“107.8   Exam ple of COMP LEX*16 Matrices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   7โ€“12

    8 Using LAPACK Subprograms

    8.1   Over vi ew . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   8โ€“28.2   N a m i ng C onv ent i ons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   8โ€“38.3   Summa ry of LAPACK D river Subroutines . . . . . . . . . . . . . . . . . . . . . . . . .   8โ€“48.4   E x a m ple of LAP AC K U s e a nd D es ign . . . . . . . . . . . . . . . . . . . . . . . . . . . .   8โ€“98.5   Equiva lence B etween LAPACK a nd LINPACK/EIS PACK Routines . . . . . .   8โ€“9

    9 Using the Signal Processing Subprograms

    9.1   F our i er Tr a ns for m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   9โ€“29.1.1   M a t hem a t i ca l D efini t i on of F F T. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   9โ€“2

    9.1.1.1   One-Dimensional Continuous Fourier Tra nsform . . . . . . . . . . . . . .   9โ€“29.1.1.2   One-Dimensional Discrete Fourier Tra nsform . . . . . . . . . . . . . . . .   9โ€“29.1.1.3   Two-Dimensional Discrete Fourier Tra nsform . . . . . . . . . . . . . . . .   9โ€“39.1.1.4   Three-Dimensional Discrete Fourier Tra nsform . . . . . . . . . . . . . .   9โ€“4

    9.1.1.5   Size of Fourier Tran sform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   9โ€“49.1.2   D a t a S t or a g e . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   9โ€“49.1.2.1   Storing the Fourier Coeffi cients of a 1D-FFT . . . . . . . . . . . . . . . . .   9โ€“59.1.2.2   Storing the Fourier Coefficients of 2D-FFT . . . . . . . . . . . . . . . . . .   9โ€“69.1.2.3   Storing the Fourier Coefficients of 3D-FFT . . . . . . . . . . . . . . . . . .   9โ€“89.1.2.4   Storing the Fourier Coeffi cient of G roup FFT . . . . . . . . . . . . . . . .   9โ€“119.1.3   C XMLโ€™s F F T F unct i ons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   9โ€“129.1.3.1   C hoos ing D a t a Lengt hs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   9โ€“129.1.3.2   Input a nd Out put D a t a F or m a t . . . . . . . . . . . . . . . . . . . . . . . . . . .   9โ€“13

    9.1.3.3   Us i ng t he Int er na l D a t a S t r uc t ur es . . . . . . . . . . . . . . . . . . . . . . . .   9โ€“139.1.3.4   N a m i ng C onv ent i ons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   9โ€“14

    9.1.3.5   Summa ry of Fourier Tran sform Functions . . . . . . . . . . . . . . . . . . .   9โ€“159.2   C osi ne a nd S i ne Tr a ns for m s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   9โ€“199.2.1   M a t hem a t i ca l D efini t i ons of D C T a nd D S T . . . . . . . . . . . . . . . . . . . . .   9โ€“199.2.1.1   One-Dimensional Continuous Cosine an d Sine Tra nsforms . . . . . .   9โ€“199.2.1.2   One-Dimensional Discrete Cosine a nd Sine Tra nsforms . . . . . . . . .   9โ€“199.2.1.3   Size of Cosine and Sine Tra nsforms . . . . . . . . . . . . . . . . . . . . . . . .   9โ€“219.2.1.4   D a t a S t or a g e . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   9โ€“21

    vi

  • 8/15/2019 Cvf-6.6 Extended Math Library

    7/583

    9.2.2   C XM Lโ€™s F C T a nd F S T F unct i ons . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   9โ€“219.2.2.1   C hoos ing D a t a Lengt hs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   9โ€“219.2.2.2   Us i ng t he Int er na l D a t a S t r uc t ur es . . . . . . . . . . . . . . . . . . . . . . . .   9โ€“219.2.2.3   N a m i ng C onv ent i ons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   9โ€“229.2.2.4   Summa ry of Cosine an d Sine Tra nsform Functions . . . . . . . . . . . .   9โ€“23

    9.3   C onvol ut ion a nd C or r el a t i on . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   9โ€“249.3.1   Mat hemat ical Defin itions of Correlation an d Convolution . . . . . . . . . .   9โ€“249.3.1.1   Defi nition of the Discrete Nonperiodic Convolution . . . . . . . . . . . .   9โ€“249.3.1.2   Defi nition of the Discrete Nonperiodic Correlat ion . . . . . . . . . . . .   9โ€“259.3.1.3   P eriodic Convolution and Correlation . . . . . . . . . . . . . . . . . . . . . .   9โ€“259.3.2   CXMLโ€™s Convolution an d Correlat ion Subroutines . . . . . . . . . . . . . . . .   9โ€“269.3.2.1   Using FFT Methods for Convolution and Correlation . . . . . . . . . .   9โ€“269.3.2.2   N a m i ng C onv ent i ons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   9โ€“269.3.2.3   Summa ry of Convolution an d Correlat ion Subroutines . . . . . . . . .   9โ€“27

    9.4   D i git a l F i lt er ing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   9โ€“289.4.1   Mat hemat ical Defi nition of the Nonrecursive Fil ter . . . . . . . . . . . . . . .   9โ€“299.4.2   Controll ing Filter Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   9โ€“299.4.3   Controll ing Fil ter Sha rpness an d Smoothness . . . . . . . . . . . . . . . . . . .   9โ€“30

    9.4.4   CXMLโ€™s Digital Fil ter Subroutines . . . . . . . . . . . . . . . . . . . . . . . . . . . .   9โ€“319.4.4.1   N a m i ng C onv ent i ons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   9โ€“319.4.4.2   S um m a r y of D i git a l F il t er S ub r out i nes . . . . . . . . . . . . . . . . . . . . .   9โ€“329.5   E r r or Ha ndl i ng . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   9โ€“32

    10 Using Iterative Solvers for Sparse Linear Systems

    10.1   Int r oduct i on . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   10โ€“110.1.1   M et hods for S olut i ons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   10โ€“210.1.2   D es cr i bi ng t he I t er a t i v e Met hod . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   10โ€“210.2   Int er fa ce t o t he I t er a t i v e S ol ver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   10โ€“310.2.1   Mat rix-Vector Pr oduct . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   10โ€“410.2.2   P r econdi t ioni ng . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   10โ€“6

    10.2.3   S t opping C r i t er ion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   10โ€“910.2.4   P a r a m et er s for t he I t er a t i v e S ol ver . . . . . . . . . . . . . . . . . . . . . . . . . . .   10โ€“1110.2.5   Argument List for the Iterat ive Solver . . . . . . . . . . . . . . . . . . . . . . . . .   10โ€“14

    10.3   M a t r i x Oper a t i ons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   10โ€“1610.3.1   S t or a ge S chem es for S pa r s e M a t r i ces . . . . . . . . . . . . . . . . . . . . . . . . .   10โ€“1710.3.1.1   S D IA : S y m m et r ic D i a gona l S t or a ge S c hem e . . . . . . . . . . . . . . . . .   10โ€“1810.3.1.2   UD I A: Uns y m m et r i c D i a gona l S t or a ge S c hem e . . . . . . . . . . . . . . .   10โ€“1910.3.1.3   G E N R : G ener a l S t or a ge S c hem e b y Rows . . . . . . . . . . . . . . . . . . .   10โ€“1910.3.2   Types of Preconditioners . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   10โ€“2010.3.2.1   D IAG : D i a gona l P r econdi t ioner . . . . . . . . . . . . . . . . . . . . . . . . . . .   10โ€“2010.3.2.2   P OLY: Polynomial P reconditioner . . . . . . . . . . . . . . . . . . . . . . . . . .   10โ€“2010.3.2.3   ILU : Incomplete LU P reconditioner . . . . . . . . . . . . . . . . . . . . . . . .   10โ€“2110.4   I t er a t i v e S ol ver s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   10โ€“21

    10.4.1   D r i v er R out i ne . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   10โ€“2210.5   N a m i ng C onvent ions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   10โ€“2210.6   S um m a r y of I t er a t i v e S ol ver S ub r out i nes . . . . . . . . . . . . . . . . . . . . . . . . .   10โ€“2310.7   E r r or Ha ndl i ng . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   10โ€“2510.8   M es s a ge P r i nt i ng . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   10โ€“2710.9   Hi nt s on t he Us e of t he I t er a t i v e S ol ver . . . . . . . . . . . . . . . . . . . . . . . . . .   10โ€“2710.10   A Look a t S om e I t er a t i v e S olv er s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   10โ€“30

    vii

  • 8/15/2019 Cvf-6.6 Extended Math Library

    8/583

    11 Using Direct Sparse Solvers

    11.1   Int r oduct i on . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   11โ€“111.2   M a t r i x Ba s i cs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   11โ€“211.3   The D i r ect M et hod . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   11โ€“311.4   S pa r s e M a t r i x S t or a ge F orm a t . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   11โ€“6

    11.4.1   S t or a ge F or m a t R est r i ct i ons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   11โ€“811.5   Direct S parse Solver (DSS ) Routine Overview . . . . . . . . . . . . . . . . . . . . . .   11โ€“911.6   Direct S parse Solver Routine Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . .   11โ€“1011.6.1   P or t a b i li t y Is s ues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   11โ€“1011.6.1.1   E r r or R epor t i ng . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   11โ€“1011.6.1.2   M em or y Al loca t i on a nd Ha ndl es . . . . . . . . . . . . . . . . . . . . . . . . . .   11โ€“1211.6.1.3   Ca lling Direct Sparse Solver Routines From C/C+ + . . . . . . . . . . .   11โ€“1311.6.1.3.1   A C a v ea t for C Us er s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   11โ€“1311.6.2   Int er fa ce D escr i pt i ons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   11โ€“1411.6.2.1   R out i ne Opt i ons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   11โ€“14

    11.6.2.2   Us er D a t a Ar r a y s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   11โ€“1511.7   D i r ect S pa r s e S ol ver E x a m ples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   11โ€“1511.7.1   Fortran 77 Example of Direct Spa rse Solver . . . . . . . . . . . . . . . . . . . .   11โ€“1511.7.2   C E x a m pl e of D i r ect S pa r s e S olv er . . . . . . . . . . . . . . . . . . . . . . . . . . .   11โ€“1711.7.3   Fortran 90 Example of Direct Spa rse Solver . . . . . . . . . . . . . . . . . . . .   11โ€“19

    12 Using the VLIB Routines

    12.1   VLIB Oper a t i ons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   12โ€“112.2   Vect or S t or a ge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   12โ€“1

    12.2.1   D efini ng a Vect or in a n Ar r a y . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   12โ€“212.2.1.1   Vect or Lengt h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   12โ€“212.2.1.2   Vect or Loca t i on . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   12โ€“212.2.1.3   S t r i de of a Vect or . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   12โ€“212.2.1.4   Selecting Vector Elements from an Arra y . . . . . . . . . . . . . . . . . . .   12โ€“2

    12.2.2   S t or ing a Vect or in a n Ar r a y . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   12โ€“312.3   N a m i ng C onvent ions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   12โ€“312.4   S um m a r y of VLIB S ub pr ogr a m s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   12โ€“412.5   C a l l ing S ub progr a m s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   12โ€“4

    12.6   Argument C onventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   12โ€“412.7   E r r or Ha ndl i ng . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   12โ€“512.8   A Look a t a V LIB S ub pr ogr a m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   12โ€“5

    13 Using Random Number Generator Subprograms

    13.1   Int r oduct i on . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   13โ€“113.2   S t a nda r d U ni for m R N G S ub pr ogr a m s . . . . . . . . . . . . . . . . . . . . . . . . . . . .   13โ€“213.3   Long P er iod Uni for m R N G S ub pr ogr a m . . . . . . . . . . . . . . . . . . . . . . . . . .   13โ€“2

    13.4   N or m a l l y D i st r i b ut ed R N G S ub pr ogr a m . . . . . . . . . . . . . . . . . . . . . . . . . .   13โ€“313.5   Input Subprogram s for Pa rallel Applicat ions Using RNG Subprograms . .   13โ€“3

    13.6   S um m a r y of R N G S ub pr ogr a m s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   13โ€“313.7   E r r or Ha ndl i ng . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   13โ€“4

    viii

  • 8/15/2019 Cvf-6.6 Extended Math Library

    9/583

    14 Using Sort Subprograms

    14.1   Quick S or t S ub pr ogr a m s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   14โ€“114.2   G ener a l P ur pos e S or t S ub pr ogr a m s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   14โ€“114.3   N a m i ng C onvent ions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   14โ€“114.4   S um m a r y of S or t S ub pr ogr a m s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   14โ€“2

    14.5   E r r or Ha ndl i ng . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   14โ€“2

    15 Using Sciport

    15.1   How D a t a i s Ha ndl ed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   15โ€“115.2   Compatibili ty a nd Restrictions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   15โ€“215.2.1   The Or der s R out i ne . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   15โ€“215.2.2   C F 7 7 Int r i ns ic F unct i ons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   15โ€“215.2.3   BLA S a nd LAP AC K R out i nes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   15โ€“215.2.4   F F T R out i nes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   15โ€“3

    15.3   C om pi li ng a nd Li nking S c ipor t . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   15โ€“315.4   Summa ry of Sciport Routines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   15โ€“4

    Part 3โ€”CXML Subprogram Reference

    Level 1 BLAS Subprograms

    ISAMAX IDAMAX ICAMAX IZAMAX . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“3

    S AS U M D AS U M S C A S UM D ZAS UM . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“4

    SAXPY DAXPY CAXPY ZAXPY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“5

    S C OP Y D C OP Y C C OP Y ZC OP Y . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“7

    SDOT DDOT DSD OT CDOTC ZDOTC CDOTU ZDOTU . . . . . . . . . . . . . . Referenceโ€“9

    S D S D OT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“11

    S N R M 2 D N R M2 S C N R M 2 D ZN R M 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“12

    SROT DROT CROT ZROT CSROT ZDROT . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“14

    SROTG DROTG CROTG ZROTG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“16

    S R OTM D R OTM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“17

    S R OTM G D R OTM G . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“20

    S S C A L D S C AL C S C AL ZS C AL, C S S C AL ZD S C AL . . . . . . . . . . . . . . . . . Referenceโ€“22

    SSWAP DSWAP CSWAP ZSWAP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“23

    Level 1 BLAS Extensions Subprograms

    IS AM IN ID A MIN IC AM IN IZAM IN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“27

    IS M AX ID M AX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“28

    IS M IN ID M IN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“29SAMAX DAMAX SCAMAX DZAMAX . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“30

    SAMIN D AMIN S CAMIN DZAMIN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“31

    S M AX D M AX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“32

    S M IN D M IN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“34

    S N OR M2 D N OR M2 S C N OR M 2 D ZN OR M 2 . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“35

    S N R S Q D N R S Q S C N R S Q D ZN R S Q . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“36

    S S E T D S E T C S E T ZS E T . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“38

    S S U M D S U M C S U M Z S U M . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“39

    ix

  • 8/15/2019 Cvf-6.6 Extended Math Library

    10/583

    SVCAL DVCAL CVCAL ZVCAL CSVCAL, ZDVCAL . . . . . . . . . . . . . . . . . Referenceโ€“40

    SZAXPY DZAXPY CZAXPY ZZAXPY . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“42

    Sparse Level 1 BLAS Subprograms

    SAXPYI DAXPYI CAXPYI ZAXPYI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“47SDOTI DDOTI CDOTUI ZDOTUI CDOTCI ZDOTCI . . . . . . . . . . . . . . . . . Referenceโ€“48

    S G THR D G THR C G THR ZG THR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“49

    S G THR S D G THR S C G THR S ZG THR S . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“51

    S G THR Z D G THR Z C G THR Z ZG THR Z . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“52

    S R OTI D R OTI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“53

    S S C TR D S C TR C S C TR ZS C TR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“54

    SSCTRS DSCTRS CSCTRS ZSCTRS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“55

    S S U M I D S U M I C S U M I ZS UM I . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“57

    Level 2 BLAS Subprograms

    S G B M V D G B M V C G B M V ZG B M V . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“61

    S G E M V D G E M V C G E M V ZG E M V . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“63

    S G E R D G E R C G E R C ZG E R C C G E R U ZG E R U . . . . . . . . . . . . . . . . . . . . . Referenceโ€“65

    S S B M V D S B M V C H B M V ZH B M V . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“67

    S S P M V D S P M V C H P M V ZH P M V . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“69

    S S P R D S P R C H P R ZH P R . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“71

    S S P R 2 D S P R 2 C H P R 2 ZH P R 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“73

    S S Y M V D S Y M V C HE M V ZHE M V . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“74

    S S Y R D S Y R C H E R ZHE R . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“77

    S S Y R 2 D S YR 2 C HE R 2 ZHE R 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“78

    S TBM V D TBM V C TBM V ZTBM V . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“80

    S TBS V D TBS V C TB S V ZTBS V . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“82

    STP MV DTP MV CTP MV ZTP MV . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“84

    S TP S V D TP S V C TP S V ZTP S V . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“86

    STRMV DTRMV CTRMV ZTRMV . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“87

    S TR S V D TR S V C TR S V ZTR S V . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“89

    Level 3 BLAS Subroutines

    S G E M A D G E M A C G E M A ZG E M A . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“95

    S G E M M D G E M M C G E M M ZG E M M . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“97

    S G E M S D G E M S C G E M S ZG E M S . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“99

    S G E M T D G E M T C G E M T ZG E M T. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“101S S Y M M D S Y MM C S Y M M ZS YM M C HE M M ZHE M M . . . . . . . . . . . . . . . Referenceโ€“103

    S S Y R K D S Y R K C S Y R K ZS Y R K . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“105

    C HE R K ZHE R K . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“107

    SSYR2K DS YR2K C SYR2K ZSYR2K . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“109

    C HE R 2 K ZHE R 2 K . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“112

    STRMM DTRMM CTRMM ZTRMM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“114

    STRSM D TRSM C TRSM ZTRSM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“117

    x

  • 8/15/2019 Cvf-6.6 Extended Math Library

    11/583

    Fast Fourier

    S F F T D F F T C F F T ZF F T . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“123

    SFF T_INI T DF FT_INI T CFF T_INI T ZFFT_INI T . . . . . . . . . . . . . . . . . . . Referenceโ€“125

    SFF T_AP P LY DFFT_AP P LY CFFT_AP P LY ZFFT_AP P LY . . . . . . . . . . . . Referenceโ€“126

    SFF T_EXIT DF FT_EXIT CFF T_EXIT ZFFT_EXIT . . . . . . . . . . . . . . . . . . Referenceโ€“129SFF T_2D D FFT_2D CF FT_2D ZFFT_2D . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“130

    SF FT_IN IT_2D D FF T_IN IT_2D C FF T_IN IT_2D ZF FT_IN IT_2D . . . . . . . Referenceโ€“132

    SF FT_APP LY_2D D FF T_APP LY_2D C FF T_APP LY_2D ZF FT_APP LY_2D. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“133

    SF FT_E XIT_2D D FF T_E XIT_2D C FF T_E XIT_2D ZFF T_E XIT_2D . . . . . Referenceโ€“136

    SFF T_3D D FFT_3D CF FT_3D ZFFT_3D . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“137

    SF FT_IN IT_3D D FF T_IN IT_3D C FF T_IN IT_3D ZF FT_IN IT_3D . . . . . . . Referenceโ€“139

    SF FT_APP LY_3D D FF T_APP LY_3D C FF T_APP LY_3D ZF FT_APP LY_3D. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“140

    SF FT_E XIT_3D D FF T_E XIT_3D C FF T_E XIT_3D ZFF T_E XIT_3D . . . . . Referenceโ€“143

    SFFT_G RP DFFT_G RP CFFT_GRP ZFFT_G RP . . . . . . . . . . . . . . . . . . . . Referenceโ€“144

    SFFT_INIT_GRP DFFT_INIT_GRP CFFT_INIT_GRP ZFFT_INIT_GRP. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“146

    SFFT_APPLY_GRP DFFT_APPLY_GRP CFFT_APPLY_GRPZF F T_AP P LY _G R P . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“147

    SF FT_E XIT_G RP DF FT_E XIT_G RP CF FT_EXI T_G RP ZFFT_EXI T_G RP. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“150

    Cosine and Sine

    S F C T D F C T . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“153

    SFCT_INIT DFCT_INIT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“154

    SFCT_AP P LY SFC T_AP P LY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“155

    SFCT_EXIT DFCT_EXIT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“156

    S F S T D F S T . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“157

    SFST_INIT DFST_INIT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“158

    SFS T_AP P LY DFST_AP P LY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“159

    SFST_EXIT DFST_EXIT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“161

    Convolutions and Correlations

    SCONV_NONPERIODIC DCONV_NONPERIODIC

    C C ON V_N ON P E R IOD IC ZC ON V_N ON P E R IOD IC . . . . . . . . . . . . . . . . . Referenceโ€“165

    SCONV_PERIODIC DCONV_PERIODIC CCONV_PERIODIC

    ZC ON V_P E R IOD IC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“166SCORR_NONPERIODIC DCORR_NONPERIODICC C OR R _N ON P E R IOD IC ZC OR R _N ON P E R IOD IC . . . . . . . . . . . . . . . . . Referenceโ€“167

    S C OR R _P E R IOD IC D C OR R _P E R IOD IC C C OR R _P E R IOD ICZC OR R _P E R IOD IC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“168

    SCONV_NONPERIODIC_EXT DCONV_NONPERIODIC_EXTCCONV_NONPE RIODIC _EXT ZCONV_NONPE RIODIC _EXT . . . . . . . . Referenceโ€“169

    SCONV_PERIODIC_EXT DCONV_PERIODIC_EXTCCONV_P ERIOD IC_EXT ZCONV_P ERI ODIC_EXT . . . . . . . . . . . . . . . . Referenceโ€“171

    xi

  • 8/15/2019 Cvf-6.6 Extended Math Library

    12/583

    SCORR_NONPE RIODIC _EXT DCORR_NONPE RIODIC _EXTCCORR_NONPE RIODIC _EXT ZCORR_NONPE RIODIC _EXT . . . . . . . . . Referenceโ€“173

    SCORR_P ERIOD IC_EXT DCORR_P ERIOD IC_EXT

    CCORR_P ERIOD IC_EXT ZCORR_P ERIOD IC_EXT . . . . . . . . . . . . . . . . . Referenceโ€“175

    Filters

    S F ILTE R _N ON R E C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“181

    SFILTER_INIT_NONREC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“182

    SFILTER_AP P LY_NONREC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“184

    Sparse Iterative Solver Subprograms

    DITSOL_DEFAULTS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“189

    CXML_ITSOL_SET_PRINT_ROUTINE . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“189

    US E R _P R I N T_R OUTIN E . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“190

    CXML_FORMAT_STRING . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“191

    D ITS OL_D R IV E R . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“191D ITS OL_P C G . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“193

    D ITS OL_P LS C G . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“194

    D ITS OL_P B C G . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“196

    D ITS OL_P C G S . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“199

    D ITS OL_P G M R E S . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“201

    DITSOL_PTFQMR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“203

    DMATVEC_SDIA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“206

    D M ATVE C _UD IA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“207

    D M ATVE C _G E N R . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“209

    DCREATE_DIAG_SDIA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“210

    D C R E ATE _D IAG _UD I A . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“211DCRE ATE_DIAG_GE NR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“212

    DCREATE_POLY_SDIA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“214

    D C R E ATE _P OLY_UD I A . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“215

    DCRE ATE_P OLY_GE NR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“216

    D C R E ATE _ILU_S D IA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“217

    D C R E ATE _ILU_UD I A . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“218

    D C R E ATE _ILU_G E N R . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“219

    D AP P LY _D IAG _ALL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“220

    D AP P LY _P OLY_S D IA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“221

    D AP P LY _P OLY_UD I A . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“223

    D AP P LY _P OLY_G E N R . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“225D AP P LY _ILU_S D IA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“226

    D AP P LY _ILU_UD I A_L . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“228

    D AP P LY _ILU_UD I A_U . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“229

    D AP P LY _ILU_G E N R _L . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“231

    DAPPLY_ILU_GENR_U . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“232

    xii

  • 8/15/2019 Cvf-6.6 Extended Math Library

    13/583

    Direct Sparse Solver Subprograms

    ds s _cr ea t e . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“237

    ds s _delet e . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“237

    dss_define_structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“238

    ds s _r eor der . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“239ds s _fa c t or _r ea l . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“240

    ds s _s ol ve_r ea l . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“241

    VLIB Routines

    VC OS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“245

    VC OS _S IN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“246

    VE XP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“247

    VLOG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“248

    VR E C IP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“249

    VS IN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“250

    VS QR T. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“251

    Random Number Generator Subprograms

    R AN L . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“255

    R AN L_S KIP 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“256

    R AN L_S KIP 64 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“258

    R AN L_N OR MAL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“259

    R AN 69069 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“260

    R AN 16807 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“261

    Sort SubprogramsIS OR TQ S S OR TQ D S OR TQ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“265

    IS OR TQX S S OR TQX D S OR TQX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“266

    G E N _S OR T . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“267

    G E N _S OR TX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenceโ€“269

    Part 4โ€”Appendices

    A Compaq Tru64 UNIX Considerations

    A.1   Us i ng t he P a r a l l el Li br a r y . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   Aโ€“1A.1.1   Setting Environment Var iables for Pa ra llel Execution . . . . . . . . . . . . .   Aโ€“2A.1.2   C XM L P a r a l lel S ub pr ogr a m s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   Aโ€“2A.1.3   P erforma nce Considera tions for P ara llel Execution . . . . . . . . . . . . . . .   Aโ€“4A.1.3.1   Single P rocessor Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   Aโ€“4A.1.3.2   Level 2 a nd Lev el 3 BL AS S ub pr ogr a m s . . . . . . . . . . . . . . . . . . . .   Aโ€“4

    A.1.3.3   LAP AC K S ub pr ogr a m s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   Aโ€“4A.1.3.4   S i gna l P r ocess i ng S ub pr ogr a m s . . . . . . . . . . . . . . . . . . . . . . . . . . .   Aโ€“4A.1.3.5   I t er a t i v e S olv er S ub pr ogr a m s . . . . . . . . . . . . . . . . . . . . . . . . . . . .   Aโ€“5

    xiii

  • 8/15/2019 Cvf-6.6 Extended Math Library

    14/583

    B Windows NT Considerations

    B.1   S et t i ng E nv ir onm ent Va r i a b l es . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   Bโ€“1

    C OpenVMS Considerations

    C.1   D a t a F or m a t N ot es . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   Cโ€“1

    D Linux Considerations

    D.1   Li nki ng wi t h C XM L . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   Dโ€“1

    E Using CXML From C and C++

    F Retired LAPACK Functionality - Performance Tuning

    F.1   P er for m a nc e Tuni ng . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   Fโ€“1

    G Bibliography

    G.1   Level 1 BL AS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   Gโ€“1G.2   S pa r s e Lev el 1 BLAS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   Gโ€“1G.3   Level 2 BL AS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   Gโ€“2G.4   Level 3 BL AS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   Gโ€“2G.5   S i gna l P r ocess ing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   Gโ€“2

    G.6   I t er a t i v e S ol ver s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   Gโ€“3G.7   D i r ect S olv er s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   Gโ€“3G.8   R a ndom N um ber G enera t or s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   Gโ€“4

    Index

    Examples

    9โ€“1   Exa mple of Error Routine for Signal P rocessing . . . . . . . . . . . . . . . . .   9โ€“33

    10โ€“1   US ER_P RINT_ROUTINE (Fortra n Code) . . . . . . . . . . . . . . . . . . . . . .   10โ€“31

    10โ€“2   I tera tive Solver with User-Defi ned Routines (Fortran Code) - Exa mplefi lena me: example_itsol_1.f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   10โ€“32

    10โ€“3   I tera tive Solver with CXML Routines (Fortran Code) - Exa mplefi lena me: example_itsol_4.f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   10โ€“40

    10โ€“4   I tera tive Solver with CXML Routines (C Code) - Exa mple fi lena me:exam ple_itsol_1.c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   10โ€“46

    10โ€“5   I tera tive Solver with CXML Routines (C+ + Code) - Exa mple fi lena me:

    exam ple_itsol_1.cxx . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   10โ€“5311โ€“1   Fortran 77 Exa mple to solve symmetric positive definite system of

    equat ions in Section 11.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   11โ€“15

    11โ€“2   C Example to solve symmetric positive defin ite system of equat ions inS ect i on 1 1.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   11โ€“17

    11โ€“3   Fortran 90 Exa mple to solve symmetric positive definite system ofequat ions in Section 11.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   11โ€“19

    Fโ€“1   ILAE N V . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   Fโ€“2

    Fโ€“2   XLAE N V . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   Fโ€“4

    xiv

  • 8/15/2019 Cvf-6.6 Extended Math Library

    15/583

    Figures

    9โ€“1   Digital Fil ter Tra nsfer Function Forms . . . . . . . . . . . . . . . . . . . . . . . .   9โ€“29

    9โ€“2   Lowpass Nonrecursive Fil ter for Vary ing Nterms . . . . . . . . . . . . . . . .   9โ€“30

    9โ€“3   Lowpass Nonrecursive Fil ter for Vary ing Wiggles . . . . . . . . . . . . . . . .   9โ€“31

    11โ€“1   Typica l order for invoking direct spa rse solver routines . . . . . . . . . . . .   11โ€“10

    Tables

    1   G ener a l C onv ent i ons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   xxi

    2   How P rogamming an d Mat h Items are Represented in Text . . . . . . . .   xxiii

    3   How Mat h Symbols an d Expressions ar e Represented in Text . . . . . . .   xxiv

    1โ€“1   F or t r a n D a t a Ty pes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   1โ€“2

    1โ€“2   One-Dimensional Fortra n Arra y Storage . . . . . . . . . . . . . . . . . . . . . . .   1โ€“4

    1โ€“3   Two-Dimensional Fortra n Arra y Storage . . . . . . . . . . . . . . . . . . . . . . .   1โ€“5

    4โ€“1   Naming Conventions: Level 1 B LAS Subprogram s . . . . . . . . . . . . . . .   4โ€“2

    4โ€“2   S um m a r y of Lev el 1 BLA S S ub pr ogr a m s . . . . . . . . . . . . . . . . . . . . . . .   4โ€“24โ€“3   Summa ry of Extensions to Level 1 B LAS Subprogra ms . . . . . . . . . . . .   4โ€“5

    5โ€“1   Naming Conventions: Spa rse Level 1 B LAS Subprogram . . . . . . . . . .   5โ€“3

    5โ€“2   S um m a r y of S pa r s e Lev el 1 B LAS S ub progr a m s . . . . . . . . . . . . . . . . .   5โ€“4

    6โ€“1   Naming Conventions: Level 2 B LAS Subprogram s . . . . . . . . . . . . . . .   6โ€“3

    6โ€“2   S um m a r y of Lev el 2 BLA S S ub pr ogr a m s . . . . . . . . . . . . . . . . . . . . . . .   6โ€“4

    6โ€“3   Va lues for the Argument   TRANS   . . . . . . . . . . . . . . . . . . . . . . . . . . . .   6โ€“8

    6โ€“4   Va lues for the Argument   UPLO   . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   6โ€“9

    6โ€“5   Va lues for the Argument   DIAG   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   6โ€“9

    7โ€“1   Naming Conventions: Level 3 B LAS Subprogram s . . . . . . . . . . . . . . .   7โ€“3

    7โ€“2   S um m a r y of Lev el 3 BLA S S ub pr ogr a m s . . . . . . . . . . . . . . . . . . . . . . .   7โ€“3

    7โ€“3   Va lues for the Argument   SIDE   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   7โ€“77โ€“4   Va lues for the Argument s  transa a nd  transb . . . . . . . . . . . . . . . . . . .   7โ€“7

    7โ€“5   Va lues for the Argument   uplo  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   7โ€“8

    7โ€“6   Va lues for the Argument   diag  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   7โ€“8

    8โ€“1   Naming Conventions: Mnemonics for MM . . . . . . . . . . . . . . . . . . . . . .   8โ€“3

    8โ€“2   Naming Conventions: Mnemonics for FF . . . . . . . . . . . . . . . . . . . . . . .   8โ€“4

    8โ€“3   S i m pl e D r i v er R out i nes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   8โ€“4

    8โ€“4   E x per t D r i v er R out i nes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   8โ€“7

    9โ€“1   F F T S i ze . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   9โ€“4

    9โ€“2   S i ze of Out put Ar r a y for S F F T a nd D F F T . . . . . . . . . . . . . . . . . . . . . .   9โ€“5

    9โ€“3   S i ze of Out put Ar r a y fr om C F F T a nd ZF F T. . . . . . . . . . . . . . . . . . . . .   9โ€“6

    9โ€“4   Input a nd Out put F orm a t A r gum ent Va l ues . . . . . . . . . . . . . . . . . . . .   9โ€“139โ€“5   Sta tus Values for Un supported Input an d Output Combina tions . . . . .   9โ€“13

    9โ€“6   Naming Conventions: Fourier Tra nsform Functions . . . . . . . . . . . . . .   9โ€“14

    9โ€“7   Summa ry of One-Step Fourier Tra nsform Functions . . . . . . . . . . . . . .   9โ€“15

    9โ€“8   Sum ma ry of Three-St ep Fourier Tra nsform Functions . . . . . . . . . . . . .   9โ€“16

    9โ€“9   S i ze a nd S t a r t i ng Index for _F C T a nd _F S T . . . . . . . . . . . . . . . . . . . .   9โ€“21

    9โ€“10   Naming Conventions: Cosine an d Sine Tran sform Functions . . . . . . .   9โ€“22

    9โ€“11   Summa ry of One-Step Cosine an d Sine Tran sform Functions . . . . . . .   9โ€“23

    9โ€“12   Summa ry of Three-Step Cosine an d Sine Tra nsform Functions . . . . . .   9โ€“23

    xv

  • 8/15/2019 Cvf-6.6 Extended Math Library

    16/583

    9โ€“13   Naming Conventions: C onvolution an d Correlation Subroutines . . . . .   9โ€“26

    9โ€“14   Summa ry of Convolution Subroutines . . . . . . . . . . . . . . . . . . . . . . . . .   9โ€“27

    9โ€“15   Summa ry of Correlat ion Subroutines . . . . . . . . . . . . . . . . . . . . . . . . . .   9โ€“27

    9โ€“16   Controll ing Fil tering Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   9โ€“30

    9โ€“17   Naming Conventions: Digital Fil ter Subroutines . . . . . . . . . . . . . . . . .   9โ€“32

    9โ€“18   S um m a r y of D igi t a l F il t er S ub r out i nes . . . . . . . . . . . . . . . . . . . . . . . .   9โ€“32

    9โ€“19   C XML S t a t us F unct i ons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   9โ€“34

    10โ€“1   P ar ameters for the MATVEC S ubroutine . . . . . . . . . . . . . . . . . . . . . . .   10โ€“4

    10โ€“2   P a r a m et er s for t he P C ON D R a nd P C ON D L S ub r out i nes . . . . . . . . . .   10โ€“8

    10โ€“3   P a r a m et er s for t he M S TOP S ub r out i ne . . . . . . . . . . . . . . . . . . . . . . . .   10โ€“10

    10โ€“4   Int eger P a r a m et er s for t he I t er a t i v e S olv er . . . . . . . . . . . . . . . . . . . . .   10โ€“12

    10โ€“5   R ea l P a r a m et er s for t he I t er a t i v e S olv er . . . . . . . . . . . . . . . . . . . . . . .   10โ€“13

    10โ€“6   D efa ul t Va l ues for P a r a m et er s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   10โ€“14

    10โ€“7   P a r a m et er s for t he S OLVE R S ub r out i ne . . . . . . . . . . . . . . . . . . . . . . .   10โ€“14

    10โ€“8   P reconditioners for the Iterat ive Methods . . . . . . . . . . . . . . . . . . . . . .   10โ€“22

    10โ€“9   Naming Conventions: I tera tive Solver Routines . . . . . . . . . . . . . . . . .   10โ€“23

    10โ€“10   S um m a r y of I t er a t i ve S ol ver R out i nes . . . . . . . . . . . . . . . . . . . . . . . . .   10โ€“23

    10โ€“11   Summa ry of Mat rix-Vector Pr oduct Routines . . . . . . . . . . . . . . . . . . . .   10โ€“24

    10โ€“12   Summa ry of P reconditioner Creation Routines . . . . . . . . . . . . . . . . . .   10โ€“24

    10โ€“13   Summa ry of P reconditioner Applicat ion Routines . . . . . . . . . . . . . . . .   10โ€“25

    10โ€“14   E r r or F la gs for S pa r s e I t er a t i ve S ol ver S ubpr ogr a m s . . . . . . . . . . . . .   10โ€“26

    11โ€“1   D i r ect S pa r s e S olv er R out i nes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   11โ€“9

    11โ€“2   C XML S y m b ol ic E r r or C odes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   11โ€“11

    12โ€“1   N a m i ng C onv ent i ons : VLIB S ub pr ogr a m s . . . . . . . . . . . . . . . . . . . . . .   12โ€“3

    12โ€“2   S um m a r y of VLIB S ub pr ogr a m s . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   12โ€“4

    13โ€“1   S um m a r y of R N G S ub pr ogr a m s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   13โ€“4

    14โ€“1   Naming Conventions: _SORTQ_ Subprogram s . . . . . . . . . . . . . . . . . .   14โ€“2

    14โ€“2   S um m a r y of S or t S ub pr ogr a m s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   14โ€“2

    15โ€“1   S um m a r y of C F 77 Int r ins i cs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   15โ€“4

    15โ€“2   S um m a r y of BLAS E x t ens ions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   15โ€“5

    15โ€“3   S um m a r y of S igna l P r ocess i ng R out i nes . . . . . . . . . . . . . . . . . . . . . . .   15โ€“5

    15โ€“4   Summa ry of First an d Second Order Recurrence Functions . . . . . . . . .   15โ€“6

    15โ€“5   Summa ry of Tri-Diagonal Solvers . . . . . . . . . . . . . . . . . . . . . . . . . . . .   15โ€“7

    15โ€“6   S um m a r y of S or t i ng R out i nes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   15โ€“7

    15โ€“7   Summa ry of Vector Scatter/Ga ther Routines . . . . . . . . . . . . . . . . . . . .   15โ€“7

    Aโ€“1   P a r a l l el S ubpr ogr a m s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   Aโ€“2

    xvi

  • 8/15/2019 Cvf-6.6 Extended Math Library

    17/583

    Preface

    The Compaq Extended Math Library (CXML) is a collection of high performance

    mat hemat ical routines optimized for Alpha systems. CXML routines performnumerically intensive operations that occur frequently in engineering andscientifi c computing, such a s l inear a lgebra an d signa l processing. CXMLcan help reduce t he cost of computa tion, enhance portabil ity, a nd improveproductivity.

    Although optimized for Alpha, CXML is supported on most common hardwarear chitectures. CXML can be used on most popular operating systems, such a s

    Tru64 Unix, OpenVMS, LI NU X, an d Windows N T. CXML is prima rily used w ithFortran programs, but is also recommended for use with many other languages

    as well , such a s C or C+ + for example. This documenta tion uses Fortra n for mostexam ples a nd explana tions of CXML routines.

    CXML documentation is intended for a user who has an advanced understandingof computer concepts, strong knowledge and experience in computer programminga nd l a ngua ges , a nd a s ol id knowl edge of m a t hem a t i cs i n t he a r ea s of C XM Lcomputations.

    Using CXML Documentation

    Infor m a t i on a b out C XM L i s a v a i l a b le i n s ever a l wa y s , a nd i n m a ny for m s a nd

    formats.CXML documentation is available as hardcopy (.ps), Adobe Acrobat format (.pdf),web browser reada ble forma t (.html), a nd UNI X/LINU X ma npages.

    All CXML documenta tion can be down loaded from t he CXML website, located a t :www.compaq.com/ math .

    โ€ข The  CXM L Reference Guide   is the complete reference ma nua l for C XML.In addition to a complete reference section of CXML routines, it also fullydescribes all aspects of using CXML. This guide is available in both Postscriptan d Adobe P DF forma t (see Adobe P DF Format of CXML Documenta tion).It is included with Compaq products that make use of the CXML library.I t a l s o a v a i l a b le for downl oa di ng or v i ewi ng a t t he C XML web si t e a t :www.compaq.com/ math .

    โ€ข Online CXML reference informa tion conta ins descriptions of al l theCXML routines. Routine descriptions are are available in HTML format,U NIX/LIN U X man page forma t (see About CXML Ma npa ges), a nd OpenVMSHelp forma t. Online reference information is included with the C XML kit ,and can be instal led in the appropriate format for your operating system.

    โ€ข CXML reference informa tion can be accessed and viewed directly on theinternet by means of a web browser. Or i t can be downloaded and viewedlocally. It is available on the CXML website at :   www.compaq.com/ math .Follow the l inks t o obtain the r eference documenta tion you wa nt.

    xix

  • 8/15/2019 Cvf-6.6 Extended Math Library

    18/583

    โ€ข C XM L ins t a l l a t i on i nfom a t i on, r elea s e not es , a nd r ea dm e fil es a r e i ncl udedwith the CXML software kit . When CXML is obtained with another product,s uch a s F or t r a n, t hi s i nfor m a t i on i s a l s o a v a i la b l e wi t h t ha t pr oduct .This information is also separately available from the CXML website at :www.compaq.com/ math .

    Related Documentation

    Additionally, depending upon your operating system, the following relateddocumentation is recommended:

    โ€ข   C omp a q F or tr a n 9 0 U s er M a n u a l for T r u 6 4 U N IX Sy stems  

    โ€ข   Compaq Fortr an L anguage Reference M anual  

    โ€ข   L APACK U sersโ€™ Guid e  (see About LAPACK)

    โ€ข C ompa q Vi sua l F or t r a n onli ne a nd pr int ed docum ent a t i on:

    โ€ข   Gett i ng Start ed 

    โ€ข   Pr ogr am mer โ€™s Gui de 

    โ€ข   L an guage Refer ence 

    โ€ข   Er r or M essages 

    About LAPACK

    To make u se of the LAPACK library, Compaq recommends th e use of the ma jordocumentation for LAPACK, the LAPACK Usersโ€™ Guide, 3rd Edition, by E.Anderson et al . This documenta tion is published by the Society for I ndustria l a nd

    Applied Ma th (SIAM). It is a vailable for purchase in ha rdcopy form a t the S IAMweb si t e a t :   http:/ / www.siam.org 

    The LAPACK Usersโ€™ Guide is also available on the internet in a format viewableb y a web b r ows er. I t i s l oca t ed a t t he   N e t l i b R e p o s i to r y a t U T K a n d O R N L

    website. To view t his book on the int ernet, use t he followin g U RL:htt p:/ / www .netl ib.org/ l apack/ l ug/ lapack_lu g.htm l  

    About CXML Manpages

    For th e Tru64 UNIX an d LINU X platforms, C XML provides the following onlinem a npa ges .

    โ€ข A top-level ma npage consisting of a product overview a nd a l ist o