Upload
itetejac
View
243
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