Upload
itetejac
View
236
Download
0
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