csipl/brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 scalar...

112
CSIPL Quick Reference Guide CSIPL/Brief [3.1] Release 3.1 May 2013

Upload: others

Post on 19-Jul-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

CSIPLQuick Reference Guide

CSIPL/Brief [3.1]

Release 3.1May 2013

Page 2: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

Contents

1 Introduction 1

1.1 Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

1.2 Symbols and Flags . . . . . . . . . . . . . . . . . . . . . . . . . . 1

1.3 Vector Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

1.4 Matrix Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

1.5 Complex Variables . . . . . . . . . . . . . . . . . . . . . . . . . . 2

1.6 Function Names . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

1.7 Hints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

1.8 Notation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

1.9 Errors and Restrictions . . . . . . . . . . . . . . . . . . . . . . . 4

2 Getting the Best Performance 5

2.1 Version Information . . . . . . . . . . . . . . . . . . . . . . . . . 5

2.2 Memory Alignment . . . . . . . . . . . . . . . . . . . . . . . . . . 5

2.3 Vector/Matrix Format . . . . . . . . . . . . . . . . . . . . . . . . 5

2.4 Error Checking and Debugging . . . . . . . . . . . . . . . . . . . 6

2.5 Support Functions . . . . . . . . . . . . . . . . . . . . . . . . . . 7

2.6 Scalar Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

2.7 Random Number Generation . . . . . . . . . . . . . . . . . . . . 7

2.8 Vector and Elementwise Operations . . . . . . . . . . . . . . . . 7

2.9 Signal Processing Functions . . . . . . . . . . . . . . . . . . . . . 7

2.10 FFT Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

2.11 FIR Filter, Convolution and Correlation Functions . . . . . . . . 9

2.12 Linear Algebra Functions . . . . . . . . . . . . . . . . . . . . . . 9

2.13 Matrix and Vector Operations . . . . . . . . . . . . . . . . . . . . 9

2.14 LU Decomposition, Cholesky and QRD Functions . . . . . . . . . 9

2.15 Special Linear System Solvers . . . . . . . . . . . . . . . . . . . . 10

2.16 Controlling the Number of Threads . . . . . . . . . . . . . . . . . 10

3 Support Functions 11

3.1 Initilialisation and Finalisation . . . . . . . . . . . . . . . . . . . 11

csipl init . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

csipl finalize . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

3.2 Sundry Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

csipl complete . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

CSIPL/Brief [3.1] NASoftware i

Page 3: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

csipl cstorage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

4 Scalar Functions 12

4.1 Real Scalar Functions . . . . . . . . . . . . . . . . . . . . . . . . 12

csipl acos f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

csipl asin f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

csipl atan f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

csipl atan2 f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

csipl ceil f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

csipl cos f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

csipl cosh f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

csipl exp f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

csipl floor f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

csipl log f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

csipl log10 f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

csipl mag f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

csipl pow f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

csipl sin f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

csipl sinh f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

csipl sqrt f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

csipl tan f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

csipl tanh f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

4.2 Complex Scalar Functions . . . . . . . . . . . . . . . . . . . . . . 13

csipl arg f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

csipl cadd f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

csipl rcadd f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

csipl cdiv f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

csipl crdiv f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

csipl cexp f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

csipl cjmul f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

csipl cmag f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

csipl cmagsq f . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

csipl cmplx f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

csipl cmul f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

csipl rcmul f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

csipl cneg f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

csipl conj f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

csipl crecip f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

CSIPL/Brief [3.1] NASoftware ii

Page 4: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

csipl csqrt f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

csipl csub f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

csipl rcsub f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

csipl crsub f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

csipl imag f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

csipl polar f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

csipl real f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

csipl rect f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

4.3 Index Scalar Functions . . . . . . . . . . . . . . . . . . . . . . . . 14

csipl matindex . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

csipl mcolindex . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

csipl mrowindex . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

5 Random Number Generation 15

5.1 Random Number Functions . . . . . . . . . . . . . . . . . . . . . 15

csipl randcreate . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

csipl randdestroy . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

csipl randu f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

csipl crandu f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

csipl vrandu f . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

csipl cvrandu inter f . . . . . . . . . . . . . . . . . . . . . . . . . 15

csipl cvrandu split f . . . . . . . . . . . . . . . . . . . . . . . . . 15

csipl randn f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

csipl crandn f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

csipl vrandn f . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

csipl cvrandn inter f . . . . . . . . . . . . . . . . . . . . . . . . . 16

csipl cvrandn split f . . . . . . . . . . . . . . . . . . . . . . . . . 16

6 Vector And Elementwise Operations 17

6.1 Elementary Mathematical Functions . . . . . . . . . . . . . . . . 17

csipl vacos f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

csipl macos f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

csipl vasin f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

csipl masin f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

csipl vatan f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

csipl matan f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

csipl vatan2 f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

csipl matan2 f . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

csipl vcos f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

CSIPL/Brief [3.1] NASoftware iii

Page 5: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

csipl mcos f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

csipl vcosh f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

csipl mcosh f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

csipl vexp f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

csipl cvexp inter f . . . . . . . . . . . . . . . . . . . . . . . . . . 18

csipl cvexp split f . . . . . . . . . . . . . . . . . . . . . . . . . . 19

csipl mexp f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

csipl cmexp inter f . . . . . . . . . . . . . . . . . . . . . . . . . . 19

csipl cmexp split f . . . . . . . . . . . . . . . . . . . . . . . . . . 19

csipl vexp10 f . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

csipl mexp10 f . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

csipl vfloor f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

csipl vlog f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

csipl cvlog inter f . . . . . . . . . . . . . . . . . . . . . . . . . . 20

csipl cvlog split f . . . . . . . . . . . . . . . . . . . . . . . . . . 20

csipl mlog f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

csipl cmlog inter f . . . . . . . . . . . . . . . . . . . . . . . . . . 20

csipl cmlog split f . . . . . . . . . . . . . . . . . . . . . . . . . . 20

csipl vlog10 f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

csipl mlog10 f . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

csipl vsin f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

csipl msin f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

csipl vsinh f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

csipl msinh f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

csipl vsqrt f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

csipl cvsqrt inter f . . . . . . . . . . . . . . . . . . . . . . . . . . 21

csipl cvsqrt split f . . . . . . . . . . . . . . . . . . . . . . . . . . 21

csipl msqrt f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

csipl cmsqrt inter f . . . . . . . . . . . . . . . . . . . . . . . . . 22

csipl cmsqrt split f . . . . . . . . . . . . . . . . . . . . . . . . . 22

csipl mtan f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

csipl mtanh f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

6.2 Unary Operations . . . . . . . . . . . . . . . . . . . . . . . . . . 22

csipl varg f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

csipl marg f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

csipl vceil f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

csipl cvconj inter f . . . . . . . . . . . . . . . . . . . . . . . . . . 23

csipl cvconj split f . . . . . . . . . . . . . . . . . . . . . . . . . . 23

CSIPL/Brief [3.1] NASoftware iv

Page 6: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

csipl cmconj inter f . . . . . . . . . . . . . . . . . . . . . . . . . 23

csipl cmconj split f . . . . . . . . . . . . . . . . . . . . . . . . . 23

csipl vcumsum P . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

csipl cvcumsum inter P . . . . . . . . . . . . . . . . . . . . . . . 23

csipl cvcumsum split P . . . . . . . . . . . . . . . . . . . . . . . 24

csipl mcumsum P . . . . . . . . . . . . . . . . . . . . . . . . . . 24

csipl cmcumsum inter P . . . . . . . . . . . . . . . . . . . . . . 24

csipl cmcumsum split P . . . . . . . . . . . . . . . . . . . . . . . 24

csipl veuler f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

csipl meuler f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

csipl vmag P . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

csipl cvmag inter f . . . . . . . . . . . . . . . . . . . . . . . . . . 24

csipl cvmag split f . . . . . . . . . . . . . . . . . . . . . . . . . . 25

csipl mmag f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

csipl cmmag inter f . . . . . . . . . . . . . . . . . . . . . . . . . 25

csipl cmmag split f . . . . . . . . . . . . . . . . . . . . . . . . . 25

csipl vcmagsq inter f . . . . . . . . . . . . . . . . . . . . . . . . 25

csipl vcmagsq split f . . . . . . . . . . . . . . . . . . . . . . . . . 25

csipl mcmagsq f . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

csipl vmeanval f . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

csipl cvmeanval inter f . . . . . . . . . . . . . . . . . . . . . . . 26

csipl cvmeanval split f . . . . . . . . . . . . . . . . . . . . . . . 26

csipl mmeanval f . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

csipl cmmeanval inter f . . . . . . . . . . . . . . . . . . . . . . . 26

csipl cmmeanval split f . . . . . . . . . . . . . . . . . . . . . . . 26

csipl vmeansqval f . . . . . . . . . . . . . . . . . . . . . . . . . . 26

csipl cvmeansqval inter f . . . . . . . . . . . . . . . . . . . . . . 26

csipl cvmeansqval split f . . . . . . . . . . . . . . . . . . . . . . 26

csipl mmeansqval f . . . . . . . . . . . . . . . . . . . . . . . . . . 26

csipl cmmeansqval inter f . . . . . . . . . . . . . . . . . . . . . . 26

csipl cmmeansqval split f . . . . . . . . . . . . . . . . . . . . . . 27

csipl vmodulate f . . . . . . . . . . . . . . . . . . . . . . . . . . 27

csipl cvmodulate inter f . . . . . . . . . . . . . . . . . . . . . . . 27

csipl cvmodulate split f . . . . . . . . . . . . . . . . . . . . . . . 27

csipl vneg P . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

csipl cvneg inter f . . . . . . . . . . . . . . . . . . . . . . . . . . 27

csipl cvneg split f . . . . . . . . . . . . . . . . . . . . . . . . . . 27

csipl mneg P . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

CSIPL/Brief [3.1] NASoftware v

Page 7: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

csipl cmneg inter f . . . . . . . . . . . . . . . . . . . . . . . . . . 28

csipl cmneg split f . . . . . . . . . . . . . . . . . . . . . . . . . . 28

csipl vrecip f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

csipl cvrecip inter f . . . . . . . . . . . . . . . . . . . . . . . . . 28

csipl cvrecip split f . . . . . . . . . . . . . . . . . . . . . . . . . 28

csipl mrecip f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

csipl cmrecip inter f . . . . . . . . . . . . . . . . . . . . . . . . . 29

csipl cmrecip split f . . . . . . . . . . . . . . . . . . . . . . . . . 29

csipl vrsqrt f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

csipl mrsqrt f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

csipl vsq f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

csipl msq f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

csipl cvsumval inter P . . . . . . . . . . . . . . . . . . . . . . . . 29

csipl cvsumval split P . . . . . . . . . . . . . . . . . . . . . . . . 29

csipl msumval P . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

csipl cmsumval inter P . . . . . . . . . . . . . . . . . . . . . . . 30

csipl cmsumval split P . . . . . . . . . . . . . . . . . . . . . . . 30

csipl msumsqval f . . . . . . . . . . . . . . . . . . . . . . . . . . 30

6.3 Binary Operations . . . . . . . . . . . . . . . . . . . . . . . . . . 30

csipl vadd P . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

csipl cvadd inter P . . . . . . . . . . . . . . . . . . . . . . . . . 30

csipl cvadd split P . . . . . . . . . . . . . . . . . . . . . . . . . . 30

csipl madd P . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

csipl cmadd inter f . . . . . . . . . . . . . . . . . . . . . . . . . 31

csipl cmadd split f . . . . . . . . . . . . . . . . . . . . . . . . . . 31

csipl rcvadd inter f . . . . . . . . . . . . . . . . . . . . . . . . . 31

csipl rcvadd split f . . . . . . . . . . . . . . . . . . . . . . . . . . 31

csipl rcmadd inter f . . . . . . . . . . . . . . . . . . . . . . . . . 31

csipl rcmadd split f . . . . . . . . . . . . . . . . . . . . . . . . . 32

csipl svadd P . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

csipl csvadd inter f . . . . . . . . . . . . . . . . . . . . . . . . . 32

csipl csvadd split f . . . . . . . . . . . . . . . . . . . . . . . . . . 32

csipl smadd P . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

csipl csmadd inter f . . . . . . . . . . . . . . . . . . . . . . . . . 32

csipl csmadd split f . . . . . . . . . . . . . . . . . . . . . . . . . 33

csipl rscvadd inter f . . . . . . . . . . . . . . . . . . . . . . . . . 33

csipl rscvadd split f . . . . . . . . . . . . . . . . . . . . . . . . . 33

csipl rscmadd inter f . . . . . . . . . . . . . . . . . . . . . . . . 33

CSIPL/Brief [3.1] NASoftware vi

Page 8: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

csipl rscmadd split f . . . . . . . . . . . . . . . . . . . . . . . . . 33

csipl Dvdiv P . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

csipl Dvdiv inter P . . . . . . . . . . . . . . . . . . . . . . . . . 34

csipl Dvdiv split P . . . . . . . . . . . . . . . . . . . . . . . . . 34

csipl mdiv f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

csipl cmdiv inter f . . . . . . . . . . . . . . . . . . . . . . . . . . 34

csipl cmdiv split f . . . . . . . . . . . . . . . . . . . . . . . . . . 34

csipl rcvdiv inter f . . . . . . . . . . . . . . . . . . . . . . . . . . 34

csipl rcvdiv split f . . . . . . . . . . . . . . . . . . . . . . . . . . 35

csipl rcmdiv inter f . . . . . . . . . . . . . . . . . . . . . . . . . 35

csipl rcmdiv split f . . . . . . . . . . . . . . . . . . . . . . . . . 35

csipl crmdiv inter f . . . . . . . . . . . . . . . . . . . . . . . . . 35

csipl crmdiv split f . . . . . . . . . . . . . . . . . . . . . . . . . 35

csipl rscmsub inter f . . . . . . . . . . . . . . . . . . . . . . . . . 35

csipl rscmsub split f . . . . . . . . . . . . . . . . . . . . . . . . . 36

csipl vsdiv f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

csipl cvrsdiv inter f . . . . . . . . . . . . . . . . . . . . . . . . . 36

csipl cvrsdiv split f . . . . . . . . . . . . . . . . . . . . . . . . . 36

csipl msdiv f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

csipl cmrsdiv inter f . . . . . . . . . . . . . . . . . . . . . . . . . 36

csipl cmrsdiv split f . . . . . . . . . . . . . . . . . . . . . . . . . 37

csipl vexpoavg f . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

csipl cvexpoavg inter f . . . . . . . . . . . . . . . . . . . . . . . 37

csipl cvexpoavg split f . . . . . . . . . . . . . . . . . . . . . . . 37

csipl mexpoavg f . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

csipl cmexpoavg inter f . . . . . . . . . . . . . . . . . . . . . . . 37

csipl cmexpoavg split f . . . . . . . . . . . . . . . . . . . . . . . 38

csipl vhypot f . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

csipl mhypot f . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

csipl cvjmul inter f . . . . . . . . . . . . . . . . . . . . . . . . . 38

csipl cvjmul split f . . . . . . . . . . . . . . . . . . . . . . . . . . 38

csipl cmjmul inter f . . . . . . . . . . . . . . . . . . . . . . . . . 38

csipl cmjmul split f . . . . . . . . . . . . . . . . . . . . . . . . . 39

csipl Dvmul P . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

csipl cvmul inter f . . . . . . . . . . . . . . . . . . . . . . . . . . 39

csipl cvmul split f . . . . . . . . . . . . . . . . . . . . . . . . . . 39

csipl mmul P . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

csipl cmmul inter f . . . . . . . . . . . . . . . . . . . . . . . . . 40

CSIPL/Brief [3.1] NASoftware vii

Page 9: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

csipl cmmul split f . . . . . . . . . . . . . . . . . . . . . . . . . . 40

csipl rcvmul inter f . . . . . . . . . . . . . . . . . . . . . . . . . 40

csipl rcvmul split f . . . . . . . . . . . . . . . . . . . . . . . . . 40

csipl rcmmul inter f . . . . . . . . . . . . . . . . . . . . . . . . . 40

csipl rcmmul split f . . . . . . . . . . . . . . . . . . . . . . . . . 41

csipl rscvmul inter f . . . . . . . . . . . . . . . . . . . . . . . . . 41

csipl rscvmul split f . . . . . . . . . . . . . . . . . . . . . . . . . 41

csipl csvmul inter f . . . . . . . . . . . . . . . . . . . . . . . . . 41

csipl csvmul split f . . . . . . . . . . . . . . . . . . . . . . . . . 41

csipl smmul f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

csipl csmmul inter f . . . . . . . . . . . . . . . . . . . . . . . . . 42

csipl csmmul split f . . . . . . . . . . . . . . . . . . . . . . . . . 42

csipl rscmmul inter f . . . . . . . . . . . . . . . . . . . . . . . . 42

csipl rscmmul split f . . . . . . . . . . . . . . . . . . . . . . . . . 42

csipl vmmul f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42

csipl cvmmul inter f . . . . . . . . . . . . . . . . . . . . . . . . . 42

csipl cvmmul split f . . . . . . . . . . . . . . . . . . . . . . . . . 43

csipl rvcmmul inter f . . . . . . . . . . . . . . . . . . . . . . . . 43

csipl rvcmmul split f . . . . . . . . . . . . . . . . . . . . . . . . 43

csipl vsub P . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43

csipl cvsub inter f . . . . . . . . . . . . . . . . . . . . . . . . . . 43

csipl cvsub split f . . . . . . . . . . . . . . . . . . . . . . . . . . 44

csipl msub P . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44

csipl cmsub inter f . . . . . . . . . . . . . . . . . . . . . . . . . . 44

csipl cmsub split f . . . . . . . . . . . . . . . . . . . . . . . . . . 44

csipl crmsub inter f . . . . . . . . . . . . . . . . . . . . . . . . . 44

csipl crmsub split f . . . . . . . . . . . . . . . . . . . . . . . . . 45

csipl rcvsub inter f . . . . . . . . . . . . . . . . . . . . . . . . . 45

csipl rcvsub split f . . . . . . . . . . . . . . . . . . . . . . . . . . 45

csipl rcmsub inter f . . . . . . . . . . . . . . . . . . . . . . . . . 45

csipl rcmsub split f . . . . . . . . . . . . . . . . . . . . . . . . . 45

csipl crvsub inter f . . . . . . . . . . . . . . . . . . . . . . . . . 45

csipl crvsub split f . . . . . . . . . . . . . . . . . . . . . . . . . . 46

csipl svsub P . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46

csipl csvsub inter f . . . . . . . . . . . . . . . . . . . . . . . . . 46

csipl csvsub split f . . . . . . . . . . . . . . . . . . . . . . . . . . 46

csipl smsub P . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46

csipl csmsub inter f . . . . . . . . . . . . . . . . . . . . . . . . . 46

CSIPL/Brief [3.1] NASoftware viii

Page 10: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

csipl csmsub split f . . . . . . . . . . . . . . . . . . . . . . . . . 47

csipl smdiv f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47

csipl csmdiv inter f . . . . . . . . . . . . . . . . . . . . . . . . . 47

csipl csmdiv split f . . . . . . . . . . . . . . . . . . . . . . . . . 47

csipl rscvdiv inter f . . . . . . . . . . . . . . . . . . . . . . . . . 47

csipl rscvdiv split f . . . . . . . . . . . . . . . . . . . . . . . . . 47

csipl rscvsub inter f . . . . . . . . . . . . . . . . . . . . . . . . . 48

csipl rscvsub split f . . . . . . . . . . . . . . . . . . . . . . . . . 48

csipl rscmdiv inter f . . . . . . . . . . . . . . . . . . . . . . . . . 48

csipl rscmdiv split f . . . . . . . . . . . . . . . . . . . . . . . . . 48

6.4 Ternary Operations . . . . . . . . . . . . . . . . . . . . . . . . . . 48

csipl vam P . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48

csipl cvam inter P . . . . . . . . . . . . . . . . . . . . . . . . . . 49

csipl cvam split P . . . . . . . . . . . . . . . . . . . . . . . . . . 49

csipl vmsa f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49

csipl cvmsa inter f . . . . . . . . . . . . . . . . . . . . . . . . . . 49

csipl cvmsa split f . . . . . . . . . . . . . . . . . . . . . . . . . . 49

csipl vmsb f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50

csipl cvmsb inter f . . . . . . . . . . . . . . . . . . . . . . . . . . 50

csipl cvmsb split f . . . . . . . . . . . . . . . . . . . . . . . . . . 50

csipl vsam f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50

csipl cvsam inter f . . . . . . . . . . . . . . . . . . . . . . . . . . 50

csipl cvsam split f . . . . . . . . . . . . . . . . . . . . . . . . . . 51

csipl vsbm f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51

csipl cvsbm inter f . . . . . . . . . . . . . . . . . . . . . . . . . . 51

csipl cvsbm split f . . . . . . . . . . . . . . . . . . . . . . . . . . 51

csipl vsma f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51

csipl cvsma inter f . . . . . . . . . . . . . . . . . . . . . . . . . . 52

csipl cvsma split f . . . . . . . . . . . . . . . . . . . . . . . . . . 52

csipl vsmsa f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52

csipl cvsmsa inter f . . . . . . . . . . . . . . . . . . . . . . . . . 52

csipl cvsmsa split f . . . . . . . . . . . . . . . . . . . . . . . . . 52

6.5 Logical Operations . . . . . . . . . . . . . . . . . . . . . . . . . . 52

csipl valltrue bl . . . . . . . . . . . . . . . . . . . . . . . . . . . 53

csipl malltrue bl . . . . . . . . . . . . . . . . . . . . . . . . . . . 53

csipl vanytrue bl . . . . . . . . . . . . . . . . . . . . . . . . . . . 53

csipl manytrue bl . . . . . . . . . . . . . . . . . . . . . . . . . . 53

csipl vleq P . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53

CSIPL/Brief [3.1] NASoftware ix

Page 11: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

csipl cvleq inter P . . . . . . . . . . . . . . . . . . . . . . . . . . 53

csipl cvleq split P . . . . . . . . . . . . . . . . . . . . . . . . . . 53

csipl mleq P . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53

csipl cmleq inter P . . . . . . . . . . . . . . . . . . . . . . . . . 54

csipl cmleq split P . . . . . . . . . . . . . . . . . . . . . . . . . . 54

csipl vlge P . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54

csipl mlge P . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54

csipl vlgt P . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54

csipl mlgt P . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54

csipl vlle P . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55

csipl mlle P . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55

csipl vllt P . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55

csipl mllt P . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55

csipl vlne P . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55

csipl cvlne inter P . . . . . . . . . . . . . . . . . . . . . . . . . . 55

csipl cvlne split P . . . . . . . . . . . . . . . . . . . . . . . . . . 56

csipl mlne P . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56

csipl cmlne inter P . . . . . . . . . . . . . . . . . . . . . . . . . 56

csipl cmlne split P . . . . . . . . . . . . . . . . . . . . . . . . . . 56

6.6 Selection Operations . . . . . . . . . . . . . . . . . . . . . . . . . 56

csipl vclip P . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56

csipl vinvclip P . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57

csipl vindexbool . . . . . . . . . . . . . . . . . . . . . . . . . . . 57

csipl vmax f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57

csipl vmaxmg f . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57

csipl vcmaxmgsq inter f . . . . . . . . . . . . . . . . . . . . . . . 57

csipl vcmaxmgsq split f . . . . . . . . . . . . . . . . . . . . . . . 57

csipl vcmaxmgsqval inter f . . . . . . . . . . . . . . . . . . . . . 57

csipl vcmaxmgsqval split f . . . . . . . . . . . . . . . . . . . . . 58

csipl vmaxmgval f . . . . . . . . . . . . . . . . . . . . . . . . . . 58

csipl vmaxval f . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58

csipl vmin f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58

csipl vminmg f . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58

csipl vcminmgsq inter f . . . . . . . . . . . . . . . . . . . . . . . 58

csipl vcminmgsq split f . . . . . . . . . . . . . . . . . . . . . . . 58

csipl vcminmgsqval inter f . . . . . . . . . . . . . . . . . . . . . 59

csipl vcminmgsqval split f . . . . . . . . . . . . . . . . . . . . . 59

csipl vminmgval f . . . . . . . . . . . . . . . . . . . . . . . . . . 59

CSIPL/Brief [3.1] NASoftware x

Page 12: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

csipl vminval f . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59

6.7 Bitwise and Boolean Logical Operators . . . . . . . . . . . . . . . 59

csipl vand P . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59

csipl mand P . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59

csipl vnot P . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59

csipl mnot P . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60

csipl vor P . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60

csipl mor P . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60

csipl mxor P . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60

6.8 Element Generation and Copy . . . . . . . . . . . . . . . . . . . 60

csipl vcopy P P . . . . . . . . . . . . . . . . . . . . . . . . . . . 61

csipl cvcopy inter f f . . . . . . . . . . . . . . . . . . . . . . . . 61

csipl cvcopy split f f . . . . . . . . . . . . . . . . . . . . . . . . 61

csipl mcopy P P . . . . . . . . . . . . . . . . . . . . . . . . . . . 61

csipl cmcopy inter f f . . . . . . . . . . . . . . . . . . . . . . . . 62

csipl cmcopy split f f . . . . . . . . . . . . . . . . . . . . . . . . 62

csipl vfill P . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62

csipl cvfill inter f . . . . . . . . . . . . . . . . . . . . . . . . . . 62

csipl cvfill split f . . . . . . . . . . . . . . . . . . . . . . . . . . . 62

csipl mfill P . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62

csipl cmfill inter f . . . . . . . . . . . . . . . . . . . . . . . . . . 62

csipl cmfill split f . . . . . . . . . . . . . . . . . . . . . . . . . . 62

csipl vramp P . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63

6.9 Manipulation Operations . . . . . . . . . . . . . . . . . . . . . . 63

csipl vcmplx inter f . . . . . . . . . . . . . . . . . . . . . . . . . 63

csipl vcmplx split f . . . . . . . . . . . . . . . . . . . . . . . . . 63

csipl mcmplx f . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63

csipl vgather P . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63

csipl cvgather inter f . . . . . . . . . . . . . . . . . . . . . . . . 64

csipl cvgather split f . . . . . . . . . . . . . . . . . . . . . . . . 64

csipl mgather P . . . . . . . . . . . . . . . . . . . . . . . . . . . 64

csipl cmgather inter f . . . . . . . . . . . . . . . . . . . . . . . . 64

csipl cmgather split f . . . . . . . . . . . . . . . . . . . . . . . . 64

csipl vimag inter f . . . . . . . . . . . . . . . . . . . . . . . . . . 64

csipl vimag split f . . . . . . . . . . . . . . . . . . . . . . . . . . 65

csipl mimag f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65

csipl vpolar inter f . . . . . . . . . . . . . . . . . . . . . . . . . . 65

csipl vpolar split f . . . . . . . . . . . . . . . . . . . . . . . . . . 65

CSIPL/Brief [3.1] NASoftware xi

Page 13: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

csipl mpolar f . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65

csipl vreal inter f . . . . . . . . . . . . . . . . . . . . . . . . . . 65

csipl vreal split f . . . . . . . . . . . . . . . . . . . . . . . . . . . 65

csipl mreal f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66

csipl vrect inter f . . . . . . . . . . . . . . . . . . . . . . . . . . 66

csipl vrect split f . . . . . . . . . . . . . . . . . . . . . . . . . . 66

csipl mrect f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66

csipl vscatter P . . . . . . . . . . . . . . . . . . . . . . . . . . . 66

csipl cvscatter inter f . . . . . . . . . . . . . . . . . . . . . . . . 66

csipl cvscatter split f . . . . . . . . . . . . . . . . . . . . . . . . 67

csipl mscatter P . . . . . . . . . . . . . . . . . . . . . . . . . . . 67

csipl cmscatter inter f . . . . . . . . . . . . . . . . . . . . . . . . 67

csipl cmscatter split f . . . . . . . . . . . . . . . . . . . . . . . . 67

csipl cvswap inter f . . . . . . . . . . . . . . . . . . . . . . . . . 67

csipl cvswap split f . . . . . . . . . . . . . . . . . . . . . . . . . 67

csipl mswap P . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68

csipl cmswap inter f . . . . . . . . . . . . . . . . . . . . . . . . . 68

csipl cmswap split f . . . . . . . . . . . . . . . . . . . . . . . . . 68

7 Signal Processing Functions 69

7.1 FFT Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69

csipl ccfftip create f . . . . . . . . . . . . . . . . . . . . . . . . . 69

csipl ccfftop create f . . . . . . . . . . . . . . . . . . . . . . . . . 69

csipl crfftop create f . . . . . . . . . . . . . . . . . . . . . . . . . 69

csipl rcfftop create f . . . . . . . . . . . . . . . . . . . . . . . . . 69

csipl ccfftip inter f . . . . . . . . . . . . . . . . . . . . . . . . . . 69

csipl ccfftip split f . . . . . . . . . . . . . . . . . . . . . . . . . . 69

csipl ccfftop inter f . . . . . . . . . . . . . . . . . . . . . . . . . 69

csipl ccfftop split f . . . . . . . . . . . . . . . . . . . . . . . . . . 69

csipl crfftop inter f . . . . . . . . . . . . . . . . . . . . . . . . . 70

csipl crfftop split f . . . . . . . . . . . . . . . . . . . . . . . . . . 70

csipl rcfftop inter f . . . . . . . . . . . . . . . . . . . . . . . . . 70

csipl rcfftop split f . . . . . . . . . . . . . . . . . . . . . . . . . . 70

csipl fft destroy f . . . . . . . . . . . . . . . . . . . . . . . . . . 70

csipl fft getattr f . . . . . . . . . . . . . . . . . . . . . . . . . . . 70

csipl ccfftmop create f . . . . . . . . . . . . . . . . . . . . . . . . 70

csipl ccfftmip create f . . . . . . . . . . . . . . . . . . . . . . . . 70

csipl crfftmop create f . . . . . . . . . . . . . . . . . . . . . . . . 71

CSIPL/Brief [3.1] NASoftware xii

Page 14: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

csipl rcfftmop create f . . . . . . . . . . . . . . . . . . . . . . . . 71

csipl fftm destroy f . . . . . . . . . . . . . . . . . . . . . . . . . 71

csipl fftm getattr f . . . . . . . . . . . . . . . . . . . . . . . . . . 71

csipl ccfftmip inter f . . . . . . . . . . . . . . . . . . . . . . . . . 71

csipl ccfftmip split f . . . . . . . . . . . . . . . . . . . . . . . . . 71

csipl ccfftmop inter f . . . . . . . . . . . . . . . . . . . . . . . . 71

csipl ccfftmop split f . . . . . . . . . . . . . . . . . . . . . . . . 71

csipl crfftmop inter f . . . . . . . . . . . . . . . . . . . . . . . . 71

csipl crfftmop split f . . . . . . . . . . . . . . . . . . . . . . . . . 72

csipl rcfftmop inter f . . . . . . . . . . . . . . . . . . . . . . . . 72

csipl rcfftmop split f . . . . . . . . . . . . . . . . . . . . . . . . . 72

csipl ccfft2dop create f . . . . . . . . . . . . . . . . . . . . . . . 72

csipl ccfft2dip create f . . . . . . . . . . . . . . . . . . . . . . . . 72

csipl crfft2dop create f . . . . . . . . . . . . . . . . . . . . . . . 72

csipl rcfft2dop create f . . . . . . . . . . . . . . . . . . . . . . . 72

csipl ccfft2dip inter f . . . . . . . . . . . . . . . . . . . . . . . . 72

csipl ccfft2dip split f . . . . . . . . . . . . . . . . . . . . . . . . 73

csipl ccfft2dop inter f . . . . . . . . . . . . . . . . . . . . . . . . 73

csipl ccfft2dop split f . . . . . . . . . . . . . . . . . . . . . . . . 73

csipl crfft2dop inter f . . . . . . . . . . . . . . . . . . . . . . . . 73

csipl crfft2dop split f . . . . . . . . . . . . . . . . . . . . . . . . 73

csipl rcfft2dop inter f . . . . . . . . . . . . . . . . . . . . . . . . 73

csipl rcfft2dop split f . . . . . . . . . . . . . . . . . . . . . . . . 73

csipl fft2d destroy f . . . . . . . . . . . . . . . . . . . . . . . . . 73

csipl fft2d getattr f . . . . . . . . . . . . . . . . . . . . . . . . . 73

7.2 Convolution/Correlation Functions . . . . . . . . . . . . . . . . . 73

csipl conv1d create f . . . . . . . . . . . . . . . . . . . . . . . . 74

csipl conv1d destroy f . . . . . . . . . . . . . . . . . . . . . . . . 74

csipl conv1d getattr f . . . . . . . . . . . . . . . . . . . . . . . . 74

csipl convolve1d f . . . . . . . . . . . . . . . . . . . . . . . . . . 74

csipl conv2d create f . . . . . . . . . . . . . . . . . . . . . . . . 74

csipl conv2d destroy f . . . . . . . . . . . . . . . . . . . . . . . . 74

csipl conv2d getattr f . . . . . . . . . . . . . . . . . . . . . . . . 74

csipl convolve2d f . . . . . . . . . . . . . . . . . . . . . . . . . . 74

csipl Dcorr1d create P . . . . . . . . . . . . . . . . . . . . . . . 74

csipl Dcorr1d destroy P . . . . . . . . . . . . . . . . . . . . . . . 75

csipl Dcorr1d getattr P . . . . . . . . . . . . . . . . . . . . . . . 75

csipl correlate1d f . . . . . . . . . . . . . . . . . . . . . . . . . . 75

CSIPL/Brief [3.1] NASoftware xiii

Page 15: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

csipl ccorrelate1d inter f . . . . . . . . . . . . . . . . . . . . . . 75

csipl ccorrelate1d split f . . . . . . . . . . . . . . . . . . . . . . 75

csipl Dcorr2d create P . . . . . . . . . . . . . . . . . . . . . . . 75

csipl Dcorr2d destroy P . . . . . . . . . . . . . . . . . . . . . . . 75

csipl Dcorr2d getattr P . . . . . . . . . . . . . . . . . . . . . . . 76

csipl correlate2d f . . . . . . . . . . . . . . . . . . . . . . . . . . 76

csipl ccorrelate2d inter f . . . . . . . . . . . . . . . . . . . . . . 76

csipl ccorrelate2d split f . . . . . . . . . . . . . . . . . . . . . . 76

7.3 Window Functions . . . . . . . . . . . . . . . . . . . . . . . . . . 76

csipl vcreate blackman f . . . . . . . . . . . . . . . . . . . . . . 76

csipl vcreate cheby f . . . . . . . . . . . . . . . . . . . . . . . . . 76

csipl vcreate hanning f . . . . . . . . . . . . . . . . . . . . . . . 77

csipl vcreate kaiser f . . . . . . . . . . . . . . . . . . . . . . . . . 77

7.4 Filter Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77

csipl fir create f . . . . . . . . . . . . . . . . . . . . . . . . . . . 77

csipl cfir create inter f . . . . . . . . . . . . . . . . . . . . . . . 77

csipl cfir create split f . . . . . . . . . . . . . . . . . . . . . . . 77

csipl Dfir destroy P . . . . . . . . . . . . . . . . . . . . . . . . . 77

csipl firflt f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77

csipl cfirflt inter f . . . . . . . . . . . . . . . . . . . . . . . . . . 78

csipl cfirflt split f . . . . . . . . . . . . . . . . . . . . . . . . . . 78

csipl Dfir getattr P . . . . . . . . . . . . . . . . . . . . . . . . . 78

csipl Dfir reset P . . . . . . . . . . . . . . . . . . . . . . . . . . 78

7.5 Miscellaneous Signal Processing Functions . . . . . . . . . . . . . 79

csipl vhisto f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79

8 Linear Algebra 80

8.1 Matrix and Vector Operations . . . . . . . . . . . . . . . . . . . . 80

csipl cmherm inter f . . . . . . . . . . . . . . . . . . . . . . . . . 80

csipl cmherm split f . . . . . . . . . . . . . . . . . . . . . . . . . 80

csipl cvjdot inter f . . . . . . . . . . . . . . . . . . . . . . . . . . 80

csipl cvjdot split f . . . . . . . . . . . . . . . . . . . . . . . . . . 80

csipl gemp f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80

csipl cgemp inter f . . . . . . . . . . . . . . . . . . . . . . . . . . 81

csipl cgemp split f . . . . . . . . . . . . . . . . . . . . . . . . . . 81

csipl gems f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81

csipl cgems inter f . . . . . . . . . . . . . . . . . . . . . . . . . . 81

csipl cgems split f . . . . . . . . . . . . . . . . . . . . . . . . . . 82

CSIPL/Brief [3.1] NASoftware xiv

Page 16: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

csipl mprod P . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82

csipl cmprod inter P . . . . . . . . . . . . . . . . . . . . . . . . 82

csipl cmprod split P . . . . . . . . . . . . . . . . . . . . . . . . . 82

csipl cmprodh inter P . . . . . . . . . . . . . . . . . . . . . . . . 82

csipl cmprodh split P . . . . . . . . . . . . . . . . . . . . . . . . 83

csipl cmprodj inter P . . . . . . . . . . . . . . . . . . . . . . . . 83

csipl cmprodj split P . . . . . . . . . . . . . . . . . . . . . . . . 83

csipl mprodt P . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83

csipl cmprodt inter P . . . . . . . . . . . . . . . . . . . . . . . . 83

csipl cmprodt split P . . . . . . . . . . . . . . . . . . . . . . . . 84

csipl mvprod P . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84

csipl cmvprod inter P . . . . . . . . . . . . . . . . . . . . . . . . 84

csipl cmvprod split P . . . . . . . . . . . . . . . . . . . . . . . . 84

csipl mtrans P . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84

csipl cmtrans inter P . . . . . . . . . . . . . . . . . . . . . . . . 84

csipl cmtrans split P . . . . . . . . . . . . . . . . . . . . . . . . 85

csipl vdot f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85

csipl cvdot inter f . . . . . . . . . . . . . . . . . . . . . . . . . . 85

csipl cvdot split f . . . . . . . . . . . . . . . . . . . . . . . . . . 85

csipl vmprod P . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85

csipl cvmprod inter P . . . . . . . . . . . . . . . . . . . . . . . . 85

csipl cvmprod split P . . . . . . . . . . . . . . . . . . . . . . . . 86

csipl vouter f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86

csipl cvouter inter f . . . . . . . . . . . . . . . . . . . . . . . . . 86

csipl cvouter split f . . . . . . . . . . . . . . . . . . . . . . . . . 86

csipl vcsummgval inter f . . . . . . . . . . . . . . . . . . . . . . 86

csipl vcsummgval split f . . . . . . . . . . . . . . . . . . . . . . 86

csipl minvlu f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87

csipl cminvlu inter f . . . . . . . . . . . . . . . . . . . . . . . . . 87

csipl cminvlu split f . . . . . . . . . . . . . . . . . . . . . . . . . 87

8.2 Special Linear System Solvers . . . . . . . . . . . . . . . . . . . . 88

csipl covsol f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88

csipl ccovsol inter f . . . . . . . . . . . . . . . . . . . . . . . . . 88

csipl ccovsol split f . . . . . . . . . . . . . . . . . . . . . . . . . 88

csipl llsqsol f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88

csipl cllsqsol inter f . . . . . . . . . . . . . . . . . . . . . . . . . 88

csipl cllsqsol split f . . . . . . . . . . . . . . . . . . . . . . . . . 88

csipl toepsol f . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89

CSIPL/Brief [3.1] NASoftware xv

Page 17: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

csipl ctoepsol inter f . . . . . . . . . . . . . . . . . . . . . . . . . 89

csipl ctoepsol split f . . . . . . . . . . . . . . . . . . . . . . . . . 89

8.3 General Square Linear System Solver . . . . . . . . . . . . . . . . 89

csipl lud f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89

csipl clud inter f . . . . . . . . . . . . . . . . . . . . . . . . . . . 89

csipl clud split f . . . . . . . . . . . . . . . . . . . . . . . . . . . 89

csipl Dlud create P . . . . . . . . . . . . . . . . . . . . . . . . . 90

csipl Dlud destroy P . . . . . . . . . . . . . . . . . . . . . . . . 90

csipl Dlud getattr P . . . . . . . . . . . . . . . . . . . . . . . . . 90

csipl lusol f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90

csipl clusol inter f . . . . . . . . . . . . . . . . . . . . . . . . . . 90

csipl clusol split f . . . . . . . . . . . . . . . . . . . . . . . . . . 90

8.4 Symmetric Positive Definite Linear System Solver . . . . . . . . . 90

csipl chold f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90

csipl cchold inter f . . . . . . . . . . . . . . . . . . . . . . . . . . 90

csipl cchold split f . . . . . . . . . . . . . . . . . . . . . . . . . . 91

csipl chold create f . . . . . . . . . . . . . . . . . . . . . . . . . 91

csipl cchold create f . . . . . . . . . . . . . . . . . . . . . . . . . 91

csipl Dchold destroy P . . . . . . . . . . . . . . . . . . . . . . . 91

csipl Dchold getattr P . . . . . . . . . . . . . . . . . . . . . . . 91

csipl cholsol f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91

csipl ccholsol inter f . . . . . . . . . . . . . . . . . . . . . . . . . 91

csipl ccholsol split f . . . . . . . . . . . . . . . . . . . . . . . . . 91

8.5 Overdetermined Linear System Solver . . . . . . . . . . . . . . . 91

csipl qrd f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91

csipl cqrd inter f . . . . . . . . . . . . . . . . . . . . . . . . . . . 92

csipl cqrd split f . . . . . . . . . . . . . . . . . . . . . . . . . . . 92

csipl qrd create f . . . . . . . . . . . . . . . . . . . . . . . . . . 92

csipl cqrd create f . . . . . . . . . . . . . . . . . . . . . . . . . . 92

csipl Dqrd destroy P . . . . . . . . . . . . . . . . . . . . . . . . 92

csipl Dqrd getattr P . . . . . . . . . . . . . . . . . . . . . . . . 92

csipl qrdprodq f . . . . . . . . . . . . . . . . . . . . . . . . . . . 92

csipl cqrdprodq inter f . . . . . . . . . . . . . . . . . . . . . . . 92

csipl cqrdprodq split f . . . . . . . . . . . . . . . . . . . . . . . . 93

csipl qrdsolr f . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93

csipl cqrdsolr inter f . . . . . . . . . . . . . . . . . . . . . . . . . 93

csipl cqrdsolr split f . . . . . . . . . . . . . . . . . . . . . . . . . 93

csipl qrsol f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93

CSIPL/Brief [3.1] NASoftware xvi

Page 18: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

csipl cqrsol inter f . . . . . . . . . . . . . . . . . . . . . . . . . . 93

csipl cqrsol split f . . . . . . . . . . . . . . . . . . . . . . . . . . 94

CSIPL/Brief [3.1] NASoftware xvii

Page 19: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

Chapter 1. Introduction

This document describes the functions available in the CSIPL library of vector,signal processing, and linear algebra routines.

1.1 TypesThe following base types are available:

csipl bool booleancsipl cscalar f complex floating-point scalarcsipl index index to a vectorcsipl index mi index (pair of integers) to a matrixcsipl length dimension of a vector or matrixcsipl stride stride or jump of a vector or matrix

If you are using a version of the library that has 64-bit pointers, you must definethe symbol POINTER SIZE 64BIT at compile time: this will ensure that variablesof types csipl length and csipl stride are 64-bit integers.

The library also passes information around in abstract data types. These objectsare opaque structures (implemented as incomplete typedefs) and they can onlybe created, accessed, and destroyed with library functions that reference themvia a pointer. Some are used to describe the data layout in memory; others storeinformation on filters, matrix decompositions, and so on. Some objects have a‘get attribute’ function that allows the user access to the internal values.

1.2 Symbols and FlagsThe following symbolic constants are defined.

CSIPL TRUE

CSIPL FALSE

Other symbols are defined in enumerated types. The valid choices are listed witheach function description.

1.3 Vector VariablesA vector is passed into a function with three parameters:

• a pointer to the start of the data

• an integer for the distance between processed elements (stride); stride = 1(unit stride) means every element of a vector has to be processed, stride = 2means every other element, and so on

CSIPL/Brief [3.1] NASoftware 1

Page 20: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

Chapter 1. Introduction

• an integer for the number of elements accessed (length).

Stride and length are measured in number of data elements (not bytes). For acompound type like complex, this means the number of (real,imaginary) pairsand not the number of atomic type elements (floats for example).

When several vectors are passed into a function, each has its own stride, butusually they all share a common length. In the function prototypes, each vectorvariable has two parameters (a data pointer followed by a stride) and the commonprocessed length is usually the last parameter.

When a stride is negative the processing progresses backwards through the dataso a suitable offset must be added to the data pointer. With proper pointerarithmetic the offset is also measured in number of data elements.

1.4 Matrix VariablesMatrices are stored in row-major format. A matrix is passed into a function withfour parameters:

• a pointer to the start of the data

• an integer for the distance between adjacent elements in a column of thematrix (leading dimension); it is denoted by ldM for matrix M; it can beviewed as the number of columns in the 2-dimensional array containing M;

• an integer for the number of rows

• an integer for the number of columns (less than or equal to the leadingdimension).

As with vectors, the leading dimension is measured in number of data elements.

When several matrices are passed into a function, each has its own leading di-mension, but often they all have the same dimensions, or have one dimension incommon. In the function prototypes, each matrix variable has two parameters (adata pointer followed by a leading dimension); the dimension parameters (num-bers of row and columns) are often common for several matrices and are usuallythe last items in the parameter list. The description of each function explainsthe dimensions of the matrices.

1.5 Complex VariablesMost functions that use complex data are available in two versions: one acceptsdata stored in interleaved format and each complex variable is passed as a singleparameter; the other takes data stored in split format and each complex variableis passed via two parameters — one each for the real and imaginary parts.

CSIPL/Brief [3.1] NASoftware 2

Page 21: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

Chapter 1. Introduction

1.6 Function NamesFor almost all functions, the suffix indicates the base datatype of the argumentsas follows:

f floati integerbl booleanvi vector indexmi matrix index.

1.7 HintsThey following mechanisms are provided for the programmer to indicate prefer-ences for optimisation: currently almost all are ignored but they are reservedfor future use. The only exception is the algorithm hint in FIR filters.

• Flags of the enumerated type csipl memory hint specified when allocat-ing or creating some objects.

• Flags of the enumerated type csipl alg hint used to indicate whetheralgorithmic optimisation should minimise execution time, memory use, ormaximise numerical accuracy.

• An indication of how many times an object will be used (filters and FFTshave such a parameter).

1.8 NotationThe following standard mathematical notation is used in the function descrip-tions.

:= assignment operatori square root of −1|x| absolute value of the real number x|z| modulus of the complex number zbxc floor of the real number x (largest integer less than or equal to x)dxe ceiling of the real number x (smallest integer greater than or equal to x)z∗ conjugate of the complex number zMT transpose of the matrix MMH Hermitian (conjugate transpose) of the complex matrix M

Note that in expressions i is always the square root of −1; vectors and matricesare indexed with j and k.

CSIPL/Brief [3.1] NASoftware 3

Page 22: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

Chapter 1. Introduction

An elementwise operation on vectors will be written C[j ∗ strideC] := A[j ∗strideA] + B[j ∗ strideB]. Often the range of the index variable is not givenexplicity; in such cases it is clear from the context that it runs over all theelements in the vectors and that the lengths of the vectors must be equal.

An M by N matrix has M rows and N columns.

1.9 Errors and RestrictionsMany functions require that their arguments be conformant. This means thatthe objects passed have compatible attributes: for example, size and shape ofmatrices, lengths of vectors or filter kernels.

If an argument is required to be valid, it means:

• a pointer is not NULL

• a flag is a member of the required enumerated type

• an object has been initialised and not destroyed.

Errors can occur for the following reasons:

1. argument is outside the domain for calculation

2. over/underflow during calculation

3. failure to allocate memory

4. algorithm failure because of inappropriate data (as when a matrix does nothave full rank)

5. arguments are invalid, out of range, or non-conformant.

Only errors of type 5 are regarded as fatal: in this case, the development versionof the library will write a message to stderr and call exit.

Errors of types 3 and 4 are signalled through the return value of the function.A create function will return NULL if the allocation fails; functions with integerreturn codes use zero to indicate success.

The calling program is not alerted to errors of types 1 and 2.

CSIPL/Brief [3.1] NASoftware 4

Page 23: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

Chapter 2. Getting the Best Performance

This section is a short guide for programmers using the NAS CSIPL Library. Itcontains explanations of library behaviour, and tips on selecting the right storageoptions for your data to increase performance.

2.1 Version InformationInformation about the version of the NAS CSIPL library you are using can befound in the comments at the top of the include file csipl.h. There is no waythat a program can determine the library version at run-time.

2.2 Memory AlignmentThe efficiency of many operations is improved if data within memory is correctlyaligned on certain word boundaries.

Vectors and matrices can be loaded and stored faster if they are vector aligned.

The following table gives the vector alignment and minimum vector length forfloat data:

Technology Vector AligmentSSE 16AVX 32AltiVec 16

Alignment can be controlled using a function such as memalign. This is a Cfunction that is not in the ANSI standard but is available on many systems. Itis defined in malloc.h on Linux systems.

The following macro redefines malloc so that all memory allocation is optimallyaligned:

#include <malloc.h>

#define malloc(SIZE) memalign(16, SIZE)

Some operating systems (e.g. Apple’s OSX) automatically align all memory to a16-byte boundary so memalign is not needed.

2.3 Vector/Matrix FormatWhen available, vector and matrix calculations are done using single instruction,multiple data (SIMD) instructions to process several elements simultaneously.This imposes a minimum vector length given in the table below:

CSIPL/Brief [3.1] NASoftware 5

Page 24: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

Chapter 2. Getting the Best Performance

Technology

minimumVector Length(floats)

SSE 4AVX 8AltiVec 4

For short ints (16 bits) the vector length should be twice that of the float vectorlength. If the vector unit supports doubles (64 bits), then the vector lengthshould be half that of floats.

For best performance all input and output vectors should:

• have a stride of 1

Vectors and matrices can be loaded and stored much quicker when theyare contiguous in memory. The library includes special optimisations fora stride length of 2 (which was added for interleaved complex numbers),but all other non-unit strides will be significantly slower than a stride of 1and, in many cases, almost as slow as unvectorised scalar code. Note that,a stride of −1 will also be significantly slower than a stride of +1.

• be vector aligned

• have length greater than or equal to the vector length

The vector unit works on arrays of the vector length so no speed up isgained by using the library on vectors of length less than this.

• have row (row major matrices) or column (column major matrices) lengthdivisible by the vector length

For a row major matrix: if the row length of a matrix is not divisible bythe vector length then the alignment of the first element of each row willchange for each row/column. For optimal performance the first element ofeach row should be vector aligned.

The same rule applies to columns in column major matrices.

• have a length divisible by the vector length

Any elements at the end of the vector which cannot be dealt with by thevector unit must be dealt with in normal scalar code, which will decreasethe performance. The decrease in performance becomes less important forlonger vectors.

2.4 Error Checking and DebuggingTwo versions of the NAS CSIPL library are provided: a performance version anda development version. The development version of the library (signified by a

CSIPL/Brief [3.1] NASoftware 6

Page 25: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

Chapter 2. Getting the Best Performance

‘D’ in the library’s name) contains full error checking and should always be usedwhen developing and debugging applications.

A few library functions return status information: always check the return codeof those that do.

The performance version of the library contains no error checking, and con-sequently runs faster than the development library. The performance libraryshould only be used with applications that have been run successfully with thedevelopment version of the library.

When timing code, the performance version of the library should be used.

Note: the performance version of the library reads in data before it knows howmuch will be used and as a result often reads more data than is needed. Thisis not a problem, except when using memory checkers such as Electric Fencewhich object to this behaviour. The development library only reads in the datait intends to use and so is safe to use with memory checkers.

2.5 Support FunctionsAlways call csip init and csip finalize at the beginning and end of a pro-gram.

Note: For the AltiVec optimized library, calling csip init will put the AltiVecunit into non-Java mode if it is not already. This speeds up most AltiVec in-structions.

2.6 Scalar FunctionsAs the vector unit works on arrays of the vector length, scalar functions in thelibrary are not vectorised.

2.7 Random Number GenerationThe random number generation functions have not been vectorised in the currentversion of the library.

2.8 Vector and Elementwise OperationsAll vector and elementwise operations work optimally on vectors which matchthe conditions given in Section 2.3.

2.9 Signal Processing FunctionsAll signal processing operations work optimally on vectors which match the con-ditions given in Section 2.3.

Most of the signal processing routines are split into three stages:

• a create stage

CSIPL/Brief [3.1] NASoftware 7

Page 26: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

Chapter 2. Getting the Best Performance

• a compute stage

• a destroy stage.

The library has been optimised to minimise the time taken to do the computestage, which means as much precomputation as possible is done in the createstage. If you are using the same signal processing routine on many vectors of thesame length, it is far quicker to just create the required signal processing objectonce and reuse it for each computation stage rather than recreating the objecteach time it is needed.

2.10 FFT FunctionsTo get the best performance from an FFT, a vector must have length a multipleof the numbers 2, 4, 8, and 3 only. If a vector length is not a multiple of thesenumbers, a DFT may be done, which is considerably slower than an FFT.

Factors of 3 should be avoided if possible. An FFT will only be done for factorsof 3 if the length also has a factor of 16, otherwise a DFT is done.

When doing large FFT’s, optimal routines have been developed for the lengths:4096, 8192, 16384, 32768, and 65536. These lengths should be much quicker thanlengths of similar magnitude.

In-place FFT’s are normally faster than out-of-place FFT’s.

FFT’s are fastest with a scale factor of 1. However, if you need to use a differentscale factor, it is better to let the FFT routine do the scaling rather than to doit yourself.

The internal FFT routines only work on vector aligned data with a stride of1. If vectors are used which do not match these restrictions an internal copy ofthe vector will be made. This is an important consideration when using largevectors. Also, if complex vectors are not stored split an internal copy will bemade.

The current version of the NAS CSIPL library does not have any special FFTroutines for doing multiple FFT’s, so the time to do n single FFT’s will beapproximately the same as using the multiple FFT routines on a matrix of nrows.

The ntimes parameter to the FFT functions is ignored. The algorithmic hint isonly used in the FFT create function: if the CSIP ALG NOISE hint is used, theFFT create function will take significantly longer. By default, the algorithms areoptimised to minimise execution time.

CSIPL/Brief [3.1] NASoftware 8

Page 27: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

Chapter 2. Getting the Best Performance

2.11 FIR Filter, Convolution and Correlation Func-tions

These functions call the FFT functions internally and are therefore subject tothe same restrictions.

Hints are ignored with the exception of the internal calling of the FFT createfunction described in the FFT functions section.

2.12 Linear Algebra FunctionsFor optimal performance the vectors and matrices used with the linear algebrafunctions should match the conditions given in Section 2.3. (See also the sectionsbelow when using complex LU, complex Cholesky, or complex QRD functions).

2.13 Matrix and Vector OperationsMatrix and vector operations should work optimally on row or column majormatrices (row major is the default), however, the restriction exists that all ma-trices passed to a function should be of the same order. For example, usingtwo row major matrices as input to a function and a column major as outputwill be slower than using all row major or all column major. When matricesare passed to NAS CSIPL functions that are not all of the same order, the li-brary will assume they are all row major and treat the column major matricesas strided matrices. (See also the sections below when using LU, Cholesky, orQRD functions).

2.14 LU Decomposition, Cholesky and QRD Func-tions

These functions have three separate stages:

• a create stage

• a compute stage

• a destroy stage.

The library has been optimised to minimise the time taken to do the computestage, which means as much precomputation as possible is done in the createstage. If you are using the linear algebra routine on many matrices of the samesize, it is far quicker to just create the required linear algebra object once andreuse it for each computation stage rather than recreating the object each timeit is needed.

If matrices of different orders or strided matrices are passed to these functions, aninternal copy will be made of the entire matrix before the computation is done.

CSIPL/Brief [3.1] NASoftware 9

Page 28: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

Chapter 2. Getting the Best Performance

This is an important consideration when using large matrices. (Note: unalignedmatrices do NOT require internal copying provided they have a stride of one andall matrices used with the functions are of the same order).

When using the QRD functions, it is only necessary to save the Q matrix if usingthe qrdprodq function; the qrsol and qrdsolr do not need the Q matrix.

2.15 Special Linear System SolversThe covsol and llsqsol functions internally use the QRD functions and so havethe same requirements for optimal performance.

The toepsol functions are based on vector operations and so have the samerequirements for optimal performance.

2.16 Controlling the Number of ThreadsThe NAS CSIPL library is multithreaded and will take advantage of multiplecores on the processor invoking it. Utilising multiple threads is automatic:

• The maximum number of threads used is set when csip init is called.

• The maximum number running at any one time is also set at that point.If a threaded routine is called with (say) 4 threads and we have hit thismaximum number running then four of them are shut down before the newfunction is executed.

• The number of threads invoked when a routine is called, is decided by thatroutine by reference to the data (vector or matrix) size specified in the call,to provide the best performance for that call.

It is possible to change the maximum number of threads used.

1. A threaded, and a non-threaded (“serial”) version of the library are pro-vided. If you wish to only ever use one thread in a library call, use theserial version of the library.

2. The maximum number of threads used for a specific function call, and themaximum number kept running at any one time, can be changed by acall to the routine Thread SetParams with arguments num threads andmax num running. This call, if used, must be made before the libraryinitialisation routine csip init is called.

If no call to Thread SetParams is made, the library default values will beutilised.

CSIPL/Brief [3.1] NASoftware 10

Page 29: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

Chapter 3. Support Functions

3.1 Initilialisation and Finalisation

Prototype Descriptionintcsipl init(void * ptr);

Provides initialisation, allowing the li-brary to allocate and set a global state,and prepare to support the use ofCSIPL functionality by the user.

intcsipl finalize(void * ptr);

Provides cleanup and releases resourcesused by CSIPL (if the last of a nestedseries of calls), allowing the library toguarantee that any resources allocatedby csipl init are no longer in use af-ter the call is complete.

3.2 Sundry Functions

Prototype Descriptionvoidcsipl complete(void);

Force all deferred CSIPL execution tocomplete.

csipl cmplx memcsipl cstorage(void);

Returns the preferred complex storageformat for the system.

CSIPL/Brief [3.1] NASoftware 11

Page 30: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

Chapter 4. Scalar Functions

4.1 Real Scalar Functions

Prototype Descriptionfloatcsipl acos f(float A);

Computes the principal radian value in[0, π] of the inverse cosine of a scalar.

floatcsipl asin f(float A);

Computes the principal radian value in[0, π] of the inverse sine of a scalar.

floatcsipl atan f(float A);

Computes the principal radian value in[−π/2, π/2] of the inverse tangent of ascalar.

floatcsipl atan2 f(float A,float B);

Computes the four-quadrant radianvalue in [−π, π] of the inverse tangentof the ratio of two scalars.

floatcsipl ceil f(float A);

Computes the ceiling of a scalar.

floatcsipl cos f(float A);

Computes the cosine of a scalar anglein radians.

floatcsipl cosh f(float A);

Computes the hyperbolic cosine of ascalar.

floatcsipl exp f(float A);

Computes the exponential of a scalar.

floatcsipl floor f(float A);

Computes the floor of a scalar.

floatcsipl log f(float A);

Computes the natural logarithm of ascalar.

floatcsipl log10 f(float A);

Computes the base 10 logarithm of ascalar.

floatcsipl mag f(float A);

Computes the magnitude (absolutevalue) of a scalar.

floatcsipl pow f(float A,float B);

Computes the power function of twoscalars.

floatcsipl sin f(float A);

Computes the sine of a scalar angle inradians.

floatcsipl sinh f(float A);

Computes the hyperbolic sine of ascalar.

floatcsipl sqrt f(float A);

Computes the square root of a scalar.

floatcsipl tan f(float A);

Computes the tangent of a scalar anglein radians.

CSIPL/Brief [3.1] NASoftware 12

Page 31: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

Chapter 4. Scalar Functions

Prototype Descriptionfloatcsipl tanh f(float A);

Computes the hyperbolic tangent of ascalar.

4.2 Complex Scalar Functions

Prototype Descriptionfloatcsipl arg f(csipl cscalar f x);

Returns the argument in radians[−π, π] of a complex scalar.

csipl cscalar fcsipl cadd f(csipl cscalar f x,csipl cscalar f y);

Computes the complex sum of twoscalars.

csipl cscalar fcsipl rcadd f(float x,csipl cscalar f y);

Computes the complex sum of twoscalars.

csipl cscalar fcsipl cdiv f(csipl cscalar f x,csipl cscalar f y);

Computes the complex quotient of twoscalars.

csipl cscalar fcsipl crdiv f(csipl cscalar f x,float y);

Computes the complex quotient of twoscalars.

csipl cscalar fcsipl cexp f(csipl cscalar f A);

Computes the exponential of a scalar.

csipl cscalar fcsipl cjmul f(csipl cscalar f x,csipl cscalar f y);

Computes the product a complex scalarwith the conjugate of a second complexscalar.

csipl cscalar fcsipl cmag f(csipl cscalar f A);

Computes the magnitude (absolutevalue) of a scalar.

floatcsipl cmagsq f(csipl cscalar f x);

Computes the magnitude squared of acomplex scalar.

csipl cscalar fcsipl cmplx f(float re,float im);

Form a complex scalar from two realscalars.

csipl cscalar fcsipl cmul f(csipl cscalar f x,csipl cscalar f y);

Computes the complex product of twoscalars.

csipl cscalar fcsipl rcmul f(float x,csipl cscalar f y);

Computes the complex product of twoscalars.

csipl cscalar fcsipl cneg f(csipl cscalar f x);

Computes the negation of a complexscalar.

csipl cscalar fcsipl conj f(csipl cscalar f x);

Computes the complex conjugate of ascalar.

csipl cscalar fcsipl crecip f(csipl cscalar f x);

Computes the reciprocal of a complexscalar.

CSIPL/Brief [3.1] NASoftware 13

Page 32: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

Chapter 4. Scalar Functions

Prototype Descriptioncsipl cscalar fcsipl csqrt f(csipl cscalar f x);

Computes the square root a complexscalar.

csipl cscalar fcsipl csub f(csipl cscalar f x,csipl cscalar f y);

Computes the complex difference oftwo scalars.

csipl cscalar fcsipl rcsub f(float x,csipl cscalar f y);

Computes the complex difference oftwo scalars.

csipl cscalar fcsipl crsub f(csipl cscalar f x,float y);

Computes the complex difference oftwo scalars.

floatcsipl imag f(csipl cscalar f x);

Extract the imaginary part of a com-plex scalar.

voidcsipl polar f(csipl cscalar f a,float * r,float * t);

Convert a complex scalar from rectan-gular to polar form. The polar dataconsists of a real scalar containing theradius and a corresponding real scalarcontaining the argument (angle) of thecomplex scalar.

floatcsipl real f(csipl cscalar f x);

Extract the real part of a complexscalar.

csipl cscalar fcsipl rect f(float r,float t);

Convert a pair of real scalars from com-plex polar to complex rectangular form.

4.3 Index Scalar Functions

Prototype Descriptioncsipl scalar micsipl matindex(csipl index r,csipl index c);

Form a matrix index from two vectorindices.

csipl indexcsipl mcolindex(csipl scalar mi mi);

Returns the column vector index froma matrix index.

csipl indexcsipl mrowindex(csipl scalar mi mi);

Returns the row vector index from amatrix index.

CSIPL/Brief [3.1] NASoftware 14

Page 33: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

Chapter 5. Random Number Generation

5.1 Random Number Functions

Prototype Descriptioncsipl randstate *csipl randcreate(csipl index seed,csipl index numprocs,csipl index id,csipl rng portable);

Create a random number generatorstate object.

intcsipl randdestroy(csipl randstate * rand);

Destroys (frees the memory used by) arandom number generator state object.Returns zero on success, non-zero onfailure.

floatcsipl randu f(csipl randstate * state);

Generate a uniformly distributed(pseudo-)random number. Floatingpoint values are uniformly distributedover the open interval (0,1). Integerdeviates are uniformly distributed overthe open interval (0, 231 − 1).

csipl cscalar fcsipl crandu f(csipl randstate * state);

Generate a uniformly distributed(pseudo-)random number. Floatingpoint values are uniformly distributedover the open interval (0,1). Integerdeviates are uniformly distributed overthe open interval (0, 231 − 1).

voidcsipl vrandu f(csipl randstate * state,float * R,csipl stride strideR,csipl length n);

Generate a uniformly distributed(pseudo-)random number. Floatingpoint values are uniformly distributedover the open interval (0,1). Integerdeviates are uniformly distributed overthe open interval (0, 231 − 1).

voidcsipl cvrandu inter f(csipl randstate * state,void * R,csipl stride strideR,csipl length n);

Generate a uniformly distributed(pseudo-)random number. Floatingpoint values are uniformly distributedover the open interval (0,1). Integerdeviates are uniformly distributed overthe open interval (0, 231 − 1).

voidcsipl cvrandu split f(csipl randstate * state,float * R re,float * R im,csipl stride strideR,csipl length n);

Generate a uniformly distributed(pseudo-)random number. Floatingpoint values are uniformly distributedover the open interval (0,1). Integerdeviates are uniformly distributed overthe open interval (0, 231 − 1).

floatcsipl randn f(csipl randstate * state);

Generate an approximately normallydistributed (pseudo-)random deviatehaving mean zero and unit variance:N(0, 1). The random numbers are gen-erated by summing values returned bythe uniform random number generator.

CSIPL/Brief [3.1] NASoftware 15

Page 34: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

Chapter 5. Random Number Generation

Prototype Descriptioncsipl cscalar fcsipl crandn f(csipl randstate * state);

Generate an approximately normallydistributed (pseudo-)random deviatehaving mean zero and unit variance:N(0, 1). The random numbers are gen-erated by summing values returned bythe uniform random number generator.

voidcsipl vrandn f(csipl randstate * state,float * R,csipl stride strideR,csipl length n);

Generate an approximately normallydistributed (pseudo-)random deviatehaving mean zero and unit variance:N(0, 1). The random numbers are gen-erated by summing values returned bythe uniform random number generator.

voidcsipl cvrandn inter f(csipl randstate * state,void * R,csipl stride strideR,csipl length n);

Generate an approximately normallydistributed (pseudo-)random deviatehaving mean zero and unit variance:N(0, 1). The random numbers are gen-erated by summing values returned bythe uniform random number generator.

voidcsipl cvrandn split f(csipl randstate * state,float * R re,float * R im,csipl stride strideR,csipl length n);

Generate an approximately normallydistributed (pseudo-)random deviatehaving mean zero and unit variance:N(0, 1). The random numbers are gen-erated by summing values returned bythe uniform random number generator.

CSIPL/Brief [3.1] NASoftware 16

Page 35: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

Chapter 6. Vector And Elementwise Operations

6.1 Elementary Mathematical Functions

Prototype Descriptionvoidcsipl vacos f(float * A,csipl stride strideA,float * R,csipl stride strideR,csipl length n);

Computes the principal radian value in[0, π] of the inverse cosine for each ele-ment of a vector.

voidcsipl macos f(float * A,int ldA,float * R,int ldR,csipl length m,csipl length n);

Computes the principal radian value in[0, π] of the inverse cosine for each ele-ment of a matrix.

voidcsipl vasin f(float * A,csipl stride strideA,float * R,csipl stride strideR,csipl length n);

Computes the principal radian value in[0, π] of the inverse sine for each ele-ment of a vector.

voidcsipl masin f(float * A,int ldA,float * R,int ldR,csipl length m,csipl length n);

Computes the principal radian value in[0, π] of the inverse sine for each ele-ment of a matrix.

voidcsipl vatan f(float * A,csipl stride strideA,float * R,csipl stride strideR,csipl length n);

Computes the principal radian value in[−π/2, π/2] of the inverse tangent foreach element of a vector.

voidcsipl matan f(float * A,int ldA,float * R,int ldR,csipl length m,csipl length n);

Computes the principal radian value in[−π/2, π/2] of the inverse tangent foreach element of a matrix.

voidcsipl vatan2 f(float * A,csipl stride strideA,float * B,csipl stride strideB,float * R,csipl stride strideR,csipl length n);

Computes the four-quadrant radianvalue in [−π, π] of the inverse tangentof the ratio of the elements of two inputvectors.

CSIPL/Brief [3.1] NASoftware 17

Page 36: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

Chapter 6. Vector And Elementwise Operations

Prototype Descriptionvoidcsipl matan2 f(float * A,int ldA,float * B,int ldB,float * R,int ldR,csipl length m,csipl length n);

Computes the four-quadrant radianvalue in [−π, π] of the inverse tangentof the ratio of the elements of two inputmatrices.

voidcsipl vcos f(float * A,csipl stride strideA,float * R,csipl stride strideR,csipl length n);

Computes the cosine for each elementof a vector. Element angle values arein radians.

voidcsipl mcos f(float * A,int ldA,float * R,int ldR,csipl length m,csipl length n);

Computes the cosine for each elementof a matrix. Element angle values arein radians.

voidcsipl vcosh f(float * A,csipl stride strideA,float * R,csipl stride strideR,csipl length n);

Computes the hyperbolic cosine foreach element of a vector.

voidcsipl mcosh f(float * A,int ldA,float * R,int ldR,csipl length m,csipl length n);

Computes the hyperbolic cosine foreach element of a matrix.

voidcsipl vexp f(float * A,csipl stride strideA,float * R,csipl stride strideR,csipl length n);

Computes the exponential functionvalue for each element of a vector.

voidcsipl cvexp inter f(void * A,csipl stride strideA,void * R,csipl stride strideR,csipl length n);

Computes the exponential functionvalue for each element of a vector.

CSIPL/Brief [3.1] NASoftware 18

Page 37: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

Chapter 6. Vector And Elementwise Operations

Prototype Descriptionvoidcsipl cvexp split f(float * A re,float * A im,csipl stride strideA,float * R re,float * R im,csipl stride strideR,csipl length n);

Computes the exponential functionvalue for each element of a vector.

voidcsipl mexp f(float * A,int ldA,float * R,int ldR,csipl length m,csipl length n);

Computes the exponential functionvalue for each element of a matrix.

voidcsipl cmexp inter f(void * A,int ldA,void * R,int ldR,csipl length m,csipl length n);

Computes the exponential functionvalue for each element of a matrix.

voidcsipl cmexp split f(float * A re,float * A im,int ldA,float * R re,float * R im,int ldR,csipl length m,csipl length n);

Computes the exponential functionvalue for each element of a matrix.

voidcsipl vexp10 f(float * A,csipl stride strideA,float * R,csipl stride strideR,csipl length n);

Computes the base 10 exponential foreach element of a vector.

voidcsipl mexp10 f(float * A,int ldA,float * R,int ldR,csipl length m,csipl length n);

Computes the base 10 exponential foreach element of a matrix.

voidcsipl vfloor f(float * A,csipl stride strideA,float * R,csipl stride strideR,csipl length n);

Computes the floor for each element ofa vector.

CSIPL/Brief [3.1] NASoftware 19

Page 38: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

Chapter 6. Vector And Elementwise Operations

Prototype Descriptionvoidcsipl vlog f(float * A,csipl stride strideA,float * R,csipl stride strideR,csipl length n);

Computes the natural logarithm foreach element of a vector.

voidcsipl cvlog inter f(void * A,csipl stride strideA,void * R,csipl stride strideR,csipl length n);

Computes the natural logarithm foreach element of a vector.

voidcsipl cvlog split f(float * A re,float * A im,csipl stride strideA,float * R re,float * R im,csipl stride strideR,csipl length n);

Computes the natural logarithm foreach element of a vector.

voidcsipl mlog f(float * A,int ldA,float * R,int ldR,csipl length m,csipl length n);

Computes the natural logarithm foreach element of a matrix.

voidcsipl cmlog inter f(void * A,int ldA,void * R,int ldR,csipl length m,csipl length n);

Computes the natural logarithm foreach element of a matrix.

voidcsipl cmlog split f(float * A re,float * A im,int ldA,float * R re,float * R im,int ldR,csipl length m,csipl length n);

Computes the natural logarithm foreach element of a matrix.

voidcsipl vlog10 f(float * A,csipl stride strideA,float * R,csipl stride strideR,csipl length n);

Compute the base ten logarithm foreach element of a vector.

CSIPL/Brief [3.1] NASoftware 20

Page 39: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

Chapter 6. Vector And Elementwise Operations

Prototype Descriptionvoidcsipl mlog10 f(float * A,int ldA,float * R,int ldR,csipl length m,csipl length n);

Compute the base ten logarithm foreach element of a matrix.

voidcsipl vsin f(float * A,csipl stride strideA,float * R,csipl stride strideR,csipl length n);

Compute the sine for each element ofa vector. Element angle values are inradians.

voidcsipl msin f(float * A,int ldA,float * R,int ldR,csipl length m,csipl length n);

Compute the sine for each element ofa matrix. Element angle values are inradians.

voidcsipl vsinh f(float * A,csipl stride strideA,float * R,csipl stride strideR,csipl length n);

Computes the hyperbolic sine for eachelement of a vector.

voidcsipl msinh f(float * A,int ldA,float * R,int ldR,csipl length m,csipl length n);

Computes the hyperbolic sine for eachelement of a matrix.

voidcsipl vsqrt f(float * A,csipl stride strideA,float * R,csipl stride strideR,csipl length n);

Compute the square root for each ele-ment of a vector.

voidcsipl cvsqrt inter f(void * A,csipl stride strideA,void * R,csipl stride strideR,csipl length n);

Compute the square root for each ele-ment of a vector.

voidcsipl cvsqrt split f(float * A re,float * A im,csipl stride strideA,float * R re,float * R im,csipl stride strideR,csipl length n);

Compute the square root for each ele-ment of a vector.

CSIPL/Brief [3.1] NASoftware 21

Page 40: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

Chapter 6. Vector And Elementwise Operations

Prototype Descriptionvoidcsipl msqrt f(float * A,int ldA,float * R,int ldR,csipl length m,csipl length n);

Compute the square root for each ele-ment of a matrix.

voidcsipl cmsqrt inter f(void * A,int ldA,void * R,int ldR,csipl length m,csipl length n);

Compute the square root for each ele-ment of a matrix.

voidcsipl cmsqrt split f(float * A re,float * A im,int ldA,float * R re,float * R im,int ldR,csipl length m,csipl length n);

Compute the square root for each ele-ment of a matrix.

voidcsipl mtan f(float * A,int ldA,float * R,int ldR,csipl length m,csipl length n);

Compute the tangent for each elementof a matrix. Element angle values arein radians.

voidcsipl mtanh f(float * A,int ldA,float * R,int ldR,csipl length m,csipl length n);

Computes the hyperbolic tangent foreach element of a matrix.

6.2 Unary Operations

Prototype Descriptionvoidcsipl varg f(void * A,csipl stride strideA,float * R,csipl stride strideR,csipl length n);

Computes the argument in radians[−π, π] for each element of a complexvector.

voidcsipl marg f(void * A,int ldA,float * R,int ldR,csipl length m,csipl length n);

Computes the argument in radians[−π, π] for each element of a complexmatrix.

CSIPL/Brief [3.1] NASoftware 22

Page 41: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

Chapter 6. Vector And Elementwise Operations

Prototype Descriptionvoidcsipl vceil f(float * A,csipl stride strideA,float * R,csipl stride strideR,csipl length n);

Computes the ceiling for each elementof a vector.

voidcsipl cvconj inter f(void * A,csipl stride strideA,void * R,csipl stride strideR,csipl length n);

Compute the conjugate for each ele-ment of a complex vector.

voidcsipl cvconj split f(float * A re,float * A im,csipl stride strideA,float * R re,float * R im,csipl stride strideR,csipl length n);

Compute the conjugate for each ele-ment of a complex vector.

voidcsipl cmconj inter f(void * A,int ldA,void * R,int ldR,csipl length m,csipl length n);

Compute the conjugate for each ele-ment of a complex matrix.

voidcsipl cmconj split f(float * A re,float * A im,int ldA,float * R re,float * R im,int ldR,csipl length m,csipl length n);

Compute the conjugate for each ele-ment of a complex matrix.

voidcsipl vcumsum P(scalar P * A,csipl stride strideA,scalar P * R,csipl stride strideR,csipl length n);

Compute the cumulative sum of the el-ements of a vector.The following instances are supported:

csipl vcumsum fcsipl vcumsum i

voidcsipl cvcumsum inter P(void * A,csipl stride strideA,void * R,csipl stride strideR,csipl length n);

Compute the cumulative sum of the el-ements of a vector.The following instances are supported:

csipl cvcumsum inter fcsipl cvcumsum inter i

CSIPL/Brief [3.1] NASoftware 23

Page 42: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

Chapter 6. Vector And Elementwise Operations

Prototype Descriptionvoidcsipl cvcumsum split P(scalar P * A re,scalar P * A im,csipl stride strideA,scalar P * R re,scalar P * R im,csipl stride strideR,csipl length n);

Compute the cumulative sum of the el-ements of a vector.The following instances are supported:

csipl cvcumsum split fcsipl cvcumsum split i

voidcsipl mcumsum P(csipl major dir,scalar P * R,int ldR,csipl length m,csipl length n);

Compute the cumulative sums of theelements in the rows or columns of amatrix.The following instances are supported:

csipl mcumsum fcsipl mcumsum i

voidcsipl cmcumsum inter P(void * A,csipl stride strideA,void * R,csipl stride strideR,csipl length n);

Compute the cumulative sum of the el-ements of a vector.The following instances are supported:

csipl cmcumsum inter fcsipl cmcumsum inter i

voidcsipl cmcumsum split P(scalar P * A re,scalar P * A im,csipl stride strideA,scalar P * R re,scalar P * R im,csipl stride strideR,csipl length n);

Compute the cumulative sum of the el-ements of a vector.The following instances are supported:

csipl cmcumsum split fcsipl cmcumsum split i

voidcsipl veuler f(float * A,csipl stride strideA,void * R,csipl stride strideR,csipl length n);

Computes the complex numbers corre-sponding to the angle of a unit vectorin the complex plane for each elementof a vector.

voidcsipl meuler f(float * A,int ldA,void * R,int ldR,csipl length m,csipl length n);

Computes the complex numbers corre-sponding to the angle of a unit vectorin the complex plane for each elementof a matrix.

voidcsipl vmag P(scalar P * A,csipl stride strideA,scalar P * R,csipl stride strideR,csipl length n);

Compute the magnitude for each ele-ment of a vector.The following instances are supported:

csipl vmag fcsipl vmag icsipl vmag si

voidcsipl cvmag inter f(void * A,csipl stride strideA,float * R,csipl stride strideR,csipl length n);

Compute the magnitude for each ele-ment of a vector.

CSIPL/Brief [3.1] NASoftware 24

Page 43: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

Chapter 6. Vector And Elementwise Operations

Prototype Descriptionvoidcsipl cvmag split f(float * A re,float * A im,csipl stride strideA,float * R,csipl stride strideR,csipl length n);

Compute the magnitude for each ele-ment of a vector.

voidcsipl mmag f(float * A,int ldA,float * R,int ldR,csipl length m,csipl length n);

Compute the magnitude for each ele-ment of a matrix.

voidcsipl cmmag inter f(void * A,int ldA,float * R,int ldR,csipl length m,csipl length n);

Compute the magnitude for each ele-ment of a matrix.

voidcsipl cmmag split f(float * A re,float * A im,int ldA,float * R,int ldR,csipl length m,csipl length n);

Compute the magnitude for each ele-ment of a matrix.

voidcsipl vcmagsq inter f(void * A,csipl stride strideA,float * R,csipl stride strideR,csipl length n);

Computes the square of the magnitudesfor each element of a vector.

voidcsipl vcmagsq split f(float * A re,float * A im,csipl stride strideA,float * R,csipl stride strideR,csipl length n);

Computes the square of the magnitudesfor each element of a vector.

voidcsipl mcmagsq f(void * A,int ldA,float * R,int ldR,csipl length m,csipl length n);

Computes the square of the magnitudesfor each element of a matrix.

floatcsipl vmeanval f(float * A,csipl stride strideA,csipl length n);

Returns the mean value of the elementsof a vector.

CSIPL/Brief [3.1] NASoftware 25

Page 44: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

Chapter 6. Vector And Elementwise Operations

Prototype Descriptioncsipl cscalar fcsipl cvmeanval inter f(void * A,csipl stride strideA,csipl length n);

Returns the mean value of the elementsof a vector.

csipl cscalar fcsipl cvmeanval split f(float * A re,float * A im,csipl stride strideA,csipl length n);

Returns the mean value of the elementsof a vector.

floatcsipl mmeanval f(float * A,int ldA,csipl length m,csipl length n);

Returns the mean value of the elementsof a matrix.

csipl cscalar fcsipl cmmeanval inter f(void * A,int ldA,csipl length m,csipl length n);

Returns the mean value of the elementsof a matrix.

csipl cscalar fcsipl cmmeanval split f(float * A re,float * A im,int ldA,csipl length m,csipl length n);

Returns the mean value of the elementsof a matrix.

floatcsipl vmeansqval f(float * A,csipl stride strideA,csipl length n);

Returns the mean magnitude squaredvalue of the elements of a vector.

floatcsipl cvmeansqval inter f(void * A,csipl stride strideA,csipl length n);

Returns the mean magnitude squaredvalue of the elements of a vector.

floatcsipl cvmeansqval split f(float * A re,float * A im,csipl stride strideA,csipl length n);

Returns the mean magnitude squaredvalue of the elements of a vector.

floatcsipl mmeansqval f(float * A,int ldA,csipl length m,csipl length n);

Returns the mean magnitude squaredvalue of the elements of a matrix.

floatcsipl cmmeansqval inter f(void * A,int ldA,csipl length m,csipl length n);

Returns the mean magnitude squaredvalue of the elements of a matrix.

CSIPL/Brief [3.1] NASoftware 26

Page 45: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

Chapter 6. Vector And Elementwise Operations

Prototype Descriptionfloatcsipl cmmeansqval split f(float * A re,float * A im,int ldA,csipl length m,csipl length n);

Returns the mean magnitude squaredvalue of the elements of a matrix.

floatcsipl vmodulate f(float * A,csipl stride strideA,float nu,float phi,float * R,csipl stride strideR,csipl length n);

Computes the modulation of a real vec-tor by a specified complex frequency.

floatcsipl cvmodulate inter f(void * A,csipl stride strideA,float nu,float phi,void * R,csipl stride strideR,csipl length n);

Computes the modulation of a real vec-tor by a specified complex frequency.

floatcsipl cvmodulate split f(float * A re,float * A im,csipl stride strideA,float nu,float phi,float * R re,float * R im,csipl stride strideR,csipl length n);

Computes the modulation of a real vec-tor by a specified complex frequency.

voidcsipl vneg P(scalar P * A,csipl stride strideA,scalar P * R,csipl stride strideR,csipl length n);

Computes the negation for each ele-ment of a vector.The following instances are supported:

csipl vneg fcsipl vneg icsipl vneg si

voidcsipl cvneg inter f(void * A,csipl stride strideA,void * R,csipl stride strideR,csipl length n);

Computes the negation for each ele-ment of a vector.

voidcsipl cvneg split f(float * A re,float * A im,csipl stride strideA,float * R re,float * R im,csipl stride strideR,csipl length n);

Computes the negation for each ele-ment of a vector.

CSIPL/Brief [3.1] NASoftware 27

Page 46: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

Chapter 6. Vector And Elementwise Operations

Prototype Descriptionvoidcsipl mneg P(scalar P * A,int ldA,scalar P * R,int ldR,csipl length m,csipl length n);

Computes the negation for each ele-ment of a matrix.The following instances are supported:

csipl mneg fcsipl mneg i

voidcsipl cmneg inter f(void * A,int ldA,void * R,int ldR,csipl length m,csipl length n);

Computes the negation for each ele-ment of a matrix.

voidcsipl cmneg split f(float * A re,float * A im,int ldA,float * R re,float * R im,int ldR,csipl length m,csipl length n);

Computes the negation for each ele-ment of a matrix.

voidcsipl vrecip f(float * A,csipl stride strideA,float * R,csipl stride strideR,csipl length n);

Computes the reciprocal for each ele-ment of a vector.

voidcsipl cvrecip inter f(void * A,csipl stride strideA,void * R,csipl stride strideR,csipl length n);

Computes the reciprocal for each ele-ment of a vector.

voidcsipl cvrecip split f(float * A re,float * A im,csipl stride strideA,float * R re,float * R im,csipl stride strideR,csipl length n);

Computes the reciprocal for each ele-ment of a vector.

voidcsipl mrecip f(float * A,int ldA,float * R,int ldR,csipl length m,csipl length n);

Computes the reciprocal for each ele-ment of a matrix.

CSIPL/Brief [3.1] NASoftware 28

Page 47: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

Chapter 6. Vector And Elementwise Operations

Prototype Descriptionvoidcsipl cmrecip inter f(void * A,int ldA,void * R,int ldR,csipl length m,csipl length n);

Computes the reciprocal for each ele-ment of a matrix.

voidcsipl cmrecip split f(float * A re,float * A im,int ldA,float * R re,float * R im,int ldR,csipl length m,csipl length n);

Computes the reciprocal for each ele-ment of a matrix.

voidcsipl vrsqrt f(float * A,csipl stride strideA,float * R,csipl stride strideR,csipl length n);

Computes the reciprocal of the squareroot for each element of a vector.

voidcsipl mrsqrt f(float * A,int ldA,float * R,int ldR,csipl length m,csipl length n);

Computes the reciprocal of the squareroot for each element of a matrix.

voidcsipl vsq f(float * A,csipl stride strideA,float * R,csipl stride strideR,csipl length n);

Computes the square for each elementof a vector.

voidcsipl msq f(float * A,int ldA,float * R,int ldR,csipl length m,csipl length n);

Computes the square for each elementof a matrix.

scalar Pcsipl cvsumval inter P(scalar P * A,csipl stride strideA,csipl length n);

Returns the sum of the elements of avector.The following instances are supported:

csipl cvsumval inter fcsipl cvsumval inter i

scalar Pcsipl cvsumval split P(scalar P * A re,scalar P * A im,csipl stride strideA,csipl length n);

Returns the sum of the elements of avector.The following instances are supported:

csipl cvsumval split fcsipl cvsumval split i

CSIPL/Brief [3.1] NASoftware 29

Page 48: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

Chapter 6. Vector And Elementwise Operations

Prototype Descriptionscalar Pcsipl msumval P(scalar P * A,csipl stride strideA,csipl length n);

Returns the sum of the elements of avector.The following instances are supported:

csipl msumval fcsipl msumval i

scalar Pcsipl cmsumval inter P(scalar P * A,csipl stride strideA,csipl length n);

Returns the sum of the elements of avector.The following instances are supported:

csipl cmsumval inter fcsipl cmsumval inter i

scalar Pcsipl cmsumval split P(scalar P * A re,scalar P * A im,csipl stride strideA,csipl length n);

Returns the sum of the elements of avector.The following instances are supported:

csipl cmsumval split fcsipl cmsumval split i

floatcsipl msumsqval f(float * A,int ldA,csipl length m,csipl length n);

Returns the sum of the squares of theelements of a matrix.

6.3 Binary Operations

Prototype Descriptionvoidcsipl vadd P(scalar P * A,csipl stride strideA,scalar P * B,csipl stride strideB,scalar P * R,csipl stride strideR,csipl length n);

Computes the sum, by element, of twovectors.The following instances are supported:

csipl vadd fcsipl vadd icsipl vadd si

voidcsipl cvadd inter P(void * A,csipl stride strideA,void * B,csipl stride strideB,void * R,csipl stride strideR,csipl length n);

Computes the sum, by element, of twovectors.The following instances are supported:

csipl cvadd inter fcsipl cvadd inter i

voidcsipl cvadd split P(scalar P * A re,scalar P * A im,csipl stride strideA,scalar P * B re,scalar P * B im,csipl stride strideB,scalar P * R re,scalar P * R im,csipl stride strideR,csipl length n);

Computes the sum, by element, of twovectors.The following instances are supported:

csipl cvadd split fcsipl cvadd split i

CSIPL/Brief [3.1] NASoftware 30

Page 49: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

Chapter 6. Vector And Elementwise Operations

Prototype Descriptionvoidcsipl madd P(scalar P * A,int ldA,scalar P * B,int ldB,scalar P * R,int ldR,csipl length m,csipl length n);

Computes the sum, by element, of twomatrices.The following instances are supported:

csipl madd fcsipl madd i

voidcsipl cmadd inter f(void * A,int ldA,void * B,int ldB,void * R,int ldR,csipl length m,csipl length n);

Computes the sum, by element, of twomatrices.

voidcsipl cmadd split f(float * A re,float * A im,int ldA,float * B re,float * B im,int ldB,float * R re,float * R im,int ldR,csipl length m,csipl length n);

Computes the sum, by element, of twomatrices.

voidcsipl rcvadd inter f(float * A,csipl stride strideA,void * B,csipl stride strideB,void * R,csipl stride strideR,csipl length n);

Computes the sum, by element, of twovectors.

voidcsipl rcvadd split f(float * A,csipl stride strideA,float * B re,float * B im,csipl stride strideB,float * R re,float * R im,csipl stride strideR,csipl length n);

Computes the sum, by element, of twovectors.

voidcsipl rcmadd inter f(float * A,int ldA,void * B,int ldB,void * R,int ldR,csipl length m,csipl length n);

Computes the sum, by element, of twomatrices.

CSIPL/Brief [3.1] NASoftware 31

Page 50: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

Chapter 6. Vector And Elementwise Operations

Prototype Descriptionvoidcsipl rcmadd split f(float * A,int ldA,float * B re,float * B im,int ldB,float * R re,float * R im,int ldR,csipl length m,csipl length n);

Computes the sum, by element, of twomatrices.

voidcsipl svadd P(scalar P a,scalar P * B,csipl stride strideB,scalar P * R,csipl stride strideR,csipl length n);

Computes the sum, by element, of ascalar and a vector.The following instances are supported:

csipl svadd fcsipl svadd icsipl svadd si

voidcsipl csvadd inter f(csipl cscalar f a,void * B,csipl stride strideB,void * R,csipl stride strideR,csipl length n);

Computes the sum, by element, of ascalar and a vector.

voidcsipl csvadd split f(csipl cscalar f a re,csipl cscalar f a im,float * B re,float * B im,csipl stride strideB,float * R re,float * R im,csipl stride strideR,csipl length n);

Computes the sum, by element, of ascalar and a vector.

voidcsipl smadd P(scalar P a,scalar P * B,int ldB,scalar P * R,int ldR,csipl length m,csipl length n);

Computes the sum, by element, of ascalar and a matrix.The following instances are supported:

csipl smadd fcsipl smadd i

voidcsipl csmadd inter f(csipl cscalar f a,void * B,int ldB,void * R,int ldR,csipl length m,csipl length n);

Computes the sum, by element, of ascalar and a matrix.

CSIPL/Brief [3.1] NASoftware 32

Page 51: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

Chapter 6. Vector And Elementwise Operations

Prototype Descriptionvoidcsipl csmadd split f(csipl cscalar f a re,csipl cscalar f a im,float * B re,float * B im,int ldB,float * R re,float * R im,int ldR,csipl length m,csipl length n);

Computes the sum, by element, of ascalar and a matrix.

voidcsipl rscvadd inter f(float a,void * B,csipl stride strideB,void * R,csipl stride strideR,csipl length n);

Computes the sum, by element, of areal scalar and a complex vector.

voidcsipl rscvadd split f(float a,float * B re,float * B im,csipl stride strideB,float * R re,float * R im,csipl stride strideR,csipl length n);

Computes the sum, by element, of areal scalar and a complex vector.

voidcsipl rscmadd inter f(float a,void * B,int ldB,void * R,int ldR,csipl length m,csipl length n);

Computes the sum, by element, of areal scalar and a complex matrix.

voidcsipl rscmadd split f(float a,float * B re,float * B im,int ldB,float * R re,float * R im,int ldR,csipl length m,csipl length n);

Computes the sum, by element, of areal scalar and a complex matrix.

voidcsipl Dvdiv P(csipl Dvview P * A,csipl stride strideA,csipl Dvview P * B,csipl stride strideB,csipl Dvview P * R,csipl stride strideR,csipl length n);

Computes the quotient, by element, oftwo vectors.The following instances are supported:

csipl vdiv fcsipl svdiv f

CSIPL/Brief [3.1] NASoftware 33

Page 52: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

Chapter 6. Vector And Elementwise Operations

Prototype Descriptionvoidcsipl Dvdiv inter P(csipl Dvview P * A,csipl stride strideA,csipl Dvview P * B,csipl stride strideB,csipl Dvview P * R,csipl stride strideR,csipl length n);

Computes the quotient, by element, oftwo vectors.The following instances are supported:

csipl crvdiv inter fcsipl cvdiv inter f

voidcsipl Dvdiv split P(csipl Dvview P * A re,csipl Dvview P * A im,csipl stride strideA,csipl Dvview P * B re,csipl Dvview P * B im,csipl stride strideB,csipl Dvview P * R re,csipl Dvview P * R im,csipl stride strideR,csipl length n);

Computes the quotient, by element, oftwo vectors.The following instances are supported:

csipl crvdiv split fcsipl cvdiv split f

voidcsipl mdiv f(float * A,int ldA,float * B,int ldB,float * R,int ldR,csipl length m,csipl length n);

Computes the quotient, by element, oftwo matrices.

voidcsipl cmdiv inter f(void * A,int ldA,void * B,int ldB,void * R,int ldR,csipl length m,csipl length n);

Computes the quotient, by element, oftwo matrices.

voidcsipl cmdiv split f(float * A re,float * A im,int ldA,float * B re,float * B im,int ldB,float * R re,float * R im,int ldR,csipl length m,csipl length n);

Computes the quotient, by element, oftwo matrices.

voidcsipl rcvdiv inter f(float a,void * B,csipl stride strideB,void * R,csipl stride strideR,csipl length n);

Computes the quotient, by element, oftwo vectors.

CSIPL/Brief [3.1] NASoftware 34

Page 53: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

Chapter 6. Vector And Elementwise Operations

Prototype Descriptionvoidcsipl rcvdiv split f(float a,float * B re,float * B im,csipl stride strideB,float * R re,float * R im,csipl stride strideR,csipl length n);

Computes the quotient, by element, oftwo vectors.

voidcsipl rcmdiv inter f(float a,void * B,int ldB,void * R,int ldR,csipl length m,csipl length n);

Computes the quotient, by element, oftwo matrices.

voidcsipl rcmdiv split f(float a,float * B re,float * B im,int ldB,float * R re,float * R im,int ldR,csipl length m,csipl length n);

Computes the quotient, by element, oftwo matrices.

voidcsipl crmdiv inter f(void * A,int ldA,float * B,int ldB,void * R,int ldR,csipl length m,csipl length n);

Computes the quotient, by element, oftwo matrices.

voidcsipl crmdiv split f(float * A re,float * A im,int ldA,float * B,int ldB,float * R re,float * R im,int ldR,csipl length m,csipl length n);

Computes the quotient, by element, oftwo matrices.

voidcsipl rscmsub inter f(float a,void * B,int ldB,void * R,int ldR,csipl length m,csipl length n);

Computes the difference, by element, ofa real scalar and a complex matrix.

CSIPL/Brief [3.1] NASoftware 35

Page 54: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

Chapter 6. Vector And Elementwise Operations

Prototype Descriptionvoidcsipl rscmsub split f(float a,float * B re,float * B im,int ldB,float * R re,float * R im,int ldR,csipl length m,csipl length n);

Computes the difference, by element, ofa real scalar and a complex matrix.

voidcsipl vsdiv f(float * A,csipl stride strideA,float b,float * R,csipl stride strideR,csipl length n);

Computes the quotient, by element, ofa vector and a scalar.

voidcsipl cvrsdiv inter f(float * A,csipl stride strideA,float b,float * R,csipl stride strideR,csipl length n);

Computes the quotient, by element, ofa vector and a scalar.

voidcsipl cvrsdiv split f(float * A re,float * A im,csipl stride strideA,float b re,float b im,float * R re,float * R im,csipl stride strideR,csipl length n);

Computes the quotient, by element, ofa vector and a scalar.

voidcsipl msdiv f(float * A,int ldA,float b,float * R,int ldR,csipl length m,csipl length n);

Computes the quotient, by element, ofa matrix and a scalar.

voidcsipl cmrsdiv inter f(void * A,int ldA,csipl cscalar f b,void * R,int ldR,csipl length m,csipl length n);

Computes the quotient, by element, ofa matrix and a scalar.

CSIPL/Brief [3.1] NASoftware 36

Page 55: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

Chapter 6. Vector And Elementwise Operations

Prototype Descriptionvoidcsipl cmrsdiv split f(float * A re,float * A im,int ldA,csipl cscalar f b re,csipl cscalar f b im,float * R re,float * R im,int ldR,csipl length m,csipl length n);

Computes the quotient, by element, ofa matrix and a scalar.

voidcsipl vexpoavg f(float a,float * B,csipl stride strideB,float * C,csipl stride strideC,csipl length n);

Computes an exponential weighted av-erage, by element, of two vectors.

voidcsipl cvexpoavg inter f(float a,void * B,csipl stride strideB,void * C,csipl stride strideC,csipl length n);

Computes an exponential weighted av-erage, by element, of two vectors.

voidcsipl cvexpoavg split f(float a,float * B re,float * B im,csipl stride strideB,float * C re,float * C im,csipl stride strideC,csipl length n);

Computes an exponential weighted av-erage, by element, of two vectors.

voidcsipl mexpoavg f(float a,float * B,int ldB,float * C,int ldC,csipl length m,csipl length n);

Computes an exponential weighted av-erage, by element, of two matrices.

voidcsipl cmexpoavg inter f(float a,void * B,int ldB,void * C,int ldC,csipl length m,csipl length n);

Computes an exponential weighted av-erage, by element, of two matrices.

CSIPL/Brief [3.1] NASoftware 37

Page 56: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

Chapter 6. Vector And Elementwise Operations

Prototype Descriptionvoidcsipl cmexpoavg split f(float a,float * B re,float * B im,int ldB,float * C re,float * C im,int ldC,csipl length m,csipl length n);

Computes an exponential weighted av-erage, by element, of two matrices.

voidcsipl vhypot f(float * A,csipl stride strideA,float * B,csipl stride strideB,float * R,csipl stride strideR,csipl length n);

Computes the square root of the sum ofsquares, by element, of two input vec-tors.

voidcsipl mhypot f(float * A,int ldA,float * B,int ldB,float * R,int ldR,csipl length m,csipl length n);

Computes the square root of the sum ofsquares, by element, of two input ma-trices.

voidcsipl cvjmul inter f(void * A,csipl stride strideA,void * B,csipl stride strideB,void * R,csipl stride strideR,csipl length n);

Computes the product of a complexvector with the conjugate of a secondcomplex vector, by element.

voidcsipl cvjmul split f(float * A re,float * A im,csipl stride strideA,float * B re,float * B im,csipl stride strideB,float * R re,float * R im,csipl stride strideR,csipl length n);

Computes the product of a complexvector with the conjugate of a secondcomplex vector, by element.

voidcsipl cmjmul inter f(void * A,int ldA,void * B,int ldB,void * R,int ldR,csipl length m,csipl length n);

Computes the product of a complexmatrix with the conjugate of a secondcomplex matrix, by element.

CSIPL/Brief [3.1] NASoftware 38

Page 57: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

Chapter 6. Vector And Elementwise Operations

Prototype Descriptionvoidcsipl cmjmul split f(float * A re,float * A im,int ldA,float * B re,float * B im,int ldB,float * R re,float * R im,int ldR,csipl length m,csipl length n);

Computes the product of a complexmatrix with the conjugate of a secondcomplex matrix, by element.

voidcsipl Dvmul P(csipl Dvview P * A,csipl stride strideA,csipl Dvview P * B,csipl stride strideB,csipl Dvview P * R,csipl stride strideR,csipl length n);

Computes the product, by element, oftwo vectors.The following instances are supported:

csipl vmul fcsipl vmul icsipl vmul sicsipl svmul fcsipl svmul icsipl svmul si

voidcsipl cvmul inter f(void * A,csipl stride strideA,void * B,csipl stride strideB,void * R,csipl stride strideR,csipl length n);

Computes the product, by element, oftwo vectors.

voidcsipl cvmul split f(float * A re,float * A im,csipl stride strideA,float * B re,float * B im,csipl stride strideB,float * R re,float * R im,csipl stride strideR,csipl length n);

Computes the product, by element, oftwo vectors.

voidcsipl mmul P(scalar P * A,int ldA,scalar P * B,int ldB,scalar P * R,int ldR,csipl length m,csipl length n);

Computes the product, by element, oftwo matrices.The following instances are supported:

csipl mmul fcsipl mmul i

CSIPL/Brief [3.1] NASoftware 39

Page 58: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

Chapter 6. Vector And Elementwise Operations

Prototype Descriptionvoidcsipl cmmul inter f(void * A,int ldA,void * B,int ldB,void * R,int ldR,csipl length m,csipl length n);

Computes the product, by element, oftwo matrices.

voidcsipl cmmul split f(float * A re,float * A im,int ldA,float * B re,float * B im,int ldB,float * R re,float * R im,int ldR,csipl length m,csipl length n);

Computes the product, by element, oftwo matrices.

voidcsipl rcvmul inter f(float * A,csipl stride strideA,void * B,csipl stride strideB,void * R,csipl stride strideR,csipl length n);

Computes the product, by element, oftwo vectors.

voidcsipl rcvmul split f(float * A,csipl stride strideA,float * B re,float * B im,csipl stride strideB,float * R re,float * R im,csipl stride strideR,csipl length n);

Computes the product, by element, oftwo vectors.

voidcsipl rcmmul inter f(float * A,int ldA,void * B,int ldB,void * R,int ldR,csipl length m,csipl length n);

Computes the product, by element, oftwo matrices.

CSIPL/Brief [3.1] NASoftware 40

Page 59: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

Chapter 6. Vector And Elementwise Operations

Prototype Descriptionvoidcsipl rcmmul split f(float * A,int ldA,float * B re,float * B im,int ldB,float * R re,float * R im,int ldR,csipl length m,csipl length n);

Computes the product, by element, oftwo matrices.

voidcsipl rscvmul inter f(float a,void * B,csipl stride strideB,void * R,csipl stride strideR,csipl length n);

Computes the product, by element, ofa real scalar and a complex vector.

voidcsipl rscvmul split f(float a,float * B re,float * B im,csipl stride strideB,float * R re,float * R im,csipl stride strideR,csipl length n);

Computes the product, by element, ofa real scalar and a complex vector.

voidcsipl csvmul inter f(csipl cscalar f a,void * B,csipl stride strideB,void * R,csipl stride strideR,csipl length n);

Computes the product, by element, ofa scalar and a vector.

voidcsipl csvmul split f(csipl cscalar f a re,csipl cscalar f a im,float * B re,float * B im,csipl stride strideB,float * R re,float * R im,csipl stride strideR,csipl length n);

Computes the product, by element, ofa scalar and a vector.

voidcsipl smmul f(float a,float * B,int ldB,float * R,int ldR,csipl length m,csipl length n);

Computes the product, by element, ofa scalar and a matrix.

CSIPL/Brief [3.1] NASoftware 41

Page 60: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

Chapter 6. Vector And Elementwise Operations

Prototype Descriptionvoidcsipl csmmul inter f(csipl cscalar f a,void * B,int ldB,void * R,int ldR,csipl length m,csipl length n);

Computes the product, by element, ofa scalar and a matrix.

voidcsipl csmmul split f(csipl cscalar f a re,csipl cscalar f a im,float * B re,float * B im,int ldB,float * R re,float * R im,int ldR,csipl length m,csipl length n);

Computes the product, by element, ofa scalar and a matrix.

voidcsipl rscmmul inter f(float a,void * B,int ldB,void * R,int ldR,csipl length m,csipl length n);

Computes the product, by element, ofa real scalar and a complex matrix.

voidcsipl rscmmul split f(float a,float * B re,float * B im,int ldB,float * R re,float * R im,int ldR,csipl length m,csipl length n);

Computes the product, by element, ofa real scalar and a complex matrix.

voidcsipl vmmul f(float * A,csipl stride strideA,float * B,int ldB,csipl major major,float * R,int ldR,csipl length m,csipl length n);

Computes the product, by element, ofa vector and the rows or columns of amatrix.

voidcsipl cvmmul inter f(void * A,csipl stride strideA,void * B,int ldB,csipl major major,void * R,int ldR,csipl length m,csipl length n);

Computes the product, by element, ofa vector and the rows or columns of amatrix.

CSIPL/Brief [3.1] NASoftware 42

Page 61: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

Chapter 6. Vector And Elementwise Operations

Prototype Descriptionvoidcsipl cvmmul split f(csipl Dvview f * A re,csipl Dvview f * A im,csipl stride strideA,csipl Dmview f * B re,csipl Dmview f * B im,int ldB,csipl major major,csipl Dmview f * R re,csipl Dmview f * R im,int ldR,csipl length m,csipl length n);

Computes the product, by element, ofa vector and the rows or columns of amatrix.

voidcsipl rvcmmul inter f(float * A,csipl stride strideA,void * B,int ldB,csipl major major,void * R,int ldR,csipl length m,csipl length n);

Computes the product, by element, ofa vector and the rows or columns of amatrix.

voidcsipl rvcmmul split f(float * A,csipl stride strideA,float * B re,float * B im,int ldB,csipl major major,float * R re,float * R im,int ldR,csipl length m,csipl length n);

Computes the product, by element, ofa vector and the rows or columns of amatrix.

voidcsipl vsub P(scalar P * A,csipl stride strideA,scalar P * B,csipl stride strideB,scalar P * R,csipl stride strideR,csipl length n);

Computes the difference, by element, oftwo vectors.The following instances are supported:

csipl vsub fcsipl vsub icsipl vsub si

voidcsipl cvsub inter f(void * A,csipl stride strideA,void * B,csipl stride strideB,void * R,csipl stride strideR,csipl length n);

Computes the difference, by element, oftwo vectors.

CSIPL/Brief [3.1] NASoftware 43

Page 62: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

Chapter 6. Vector And Elementwise Operations

Prototype Descriptionvoidcsipl cvsub split f(float * A re,float * A im,csipl stride strideA,float * B re,float * B im,csipl stride strideB,float * R re,float * R im,csipl stride strideR,csipl length n);

Computes the difference, by element, oftwo vectors.

voidcsipl msub P(scalar P * A,int ldA,scalar P * B,int ldB,scalar P * R,int ldR,csipl length m,csipl length n);

Computes the difference, by element, oftwo matrices.The following instances are supported:

csipl msub fcsipl msub i

voidcsipl cmsub inter f(void * A,int ldA,void * B,int ldB,void * R,int ldR,csipl length m,csipl length n);

Computes the difference, by element, oftwo matrices.

voidcsipl cmsub split f(float * A re,float * A im,int ldA,float * B re,float * B im,int ldB,float * R re,float * R im,int ldR,csipl length m,csipl length n);

Computes the difference, by element, oftwo matrices.

voidcsipl crmsub inter f(void * A,int ldA,float * B,int ldB,void * R,int ldR,csipl length m,csipl length n);

Computes the difference, by element, oftwo matrices.

CSIPL/Brief [3.1] NASoftware 44

Page 63: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

Chapter 6. Vector And Elementwise Operations

Prototype Descriptionvoidcsipl crmsub split f(float * A re,float * A im,int ldA,float * B,int ldB,float * R re,float * R im,int ldR,csipl length m,csipl length n);

Computes the difference, by element, oftwo matrices.

voidcsipl rcvsub inter f(float * A,csipl stride strideA,void * B,csipl stride strideB,void * R,csipl stride strideR,csipl length n);

Computes the difference, by element, oftwo vectors.

voidcsipl rcvsub split f(float * A,csipl stride strideA,float * B re,float * B im,csipl stride strideB,float * R re,float * R im,csipl stride strideR,csipl length n);

Computes the difference, by element, oftwo vectors.

voidcsipl rcmsub inter f(float * A,int ldA,void * B,int ldB,void * R,int ldR,csipl length m,csipl length n);

Computes the difference, by element, oftwo matrices.

voidcsipl rcmsub split f(float * A,int ldA,float * B re,float * B im,int ldB,float * R re,float * R im,int ldR,csipl length m,csipl length n);

Computes the difference, by element, oftwo matrices.

voidcsipl crvsub inter f(void * A,csipl stride strideA,float * B,csipl stride strideB,void * R,csipl stride strideR,csipl length n);

Computes the difference, by element, oftwo vectors.

CSIPL/Brief [3.1] NASoftware 45

Page 64: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

Chapter 6. Vector And Elementwise Operations

Prototype Descriptionvoidcsipl crvsub split f(float * A re,float * A im,csipl stride strideA,float * B,csipl stride strideB,float * R re,float * R im,csipl stride strideR,csipl length n);

Computes the difference, by element, oftwo vectors.

voidcsipl svsub P(scalar P a,scalar P * B,csipl stride strideB,scalar P * R,csipl stride strideR,csipl length n);

Computes the difference, by element, ofa scalar and a vector.The following instances are supported:

csipl svsub fcsipl svsub icsipl svsub si

voidcsipl csvsub inter f(csipl cscalar f a,void * B,csipl stride strideB,void * R,csipl stride strideR,csipl length n);

Computes the difference, by element, ofa scalar and a vector.

voidcsipl csvsub split f(csipl cscalar f a re,csipl cscalar f a im,float * B re,float * B im,csipl stride strideB,float * R re,float * R im,csipl stride strideR,csipl length n);

Computes the difference, by element, ofa scalar and a vector.

voidcsipl smsub P(scalar P a,scalar P * B,int ldB,scalar P * R,int ldR,csipl length m,csipl length n);

Computes the difference, by element, ofa scalar and a matrix.The following instances are supported:

csipl smsub fcsipl smsub i

voidcsipl csmsub inter f(csipl cscalar f a,void * B,int ldB,void * R,int ldR,csipl length m,csipl length n);

Computes the difference, by element, ofa scalar and a matrix.

CSIPL/Brief [3.1] NASoftware 46

Page 65: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

Chapter 6. Vector And Elementwise Operations

Prototype Descriptionvoidcsipl csmsub split f(csipl cscalar f a re,csipl cscalar f a im,float * B re,float * B im,int ldB,float * R re,float * R im,int ldR,csipl length m,csipl length n);

Computes the difference, by element, ofa scalar and a matrix.

voidcsipl smdiv f(float a,float * B,int ldB,float * R,int ldR,csipl length m,csipl length n);

Computes the quotient, by element, ofa scalar and a matrix.

voidcsipl csmdiv inter f(csipl cscalar f a,void * B,int ldB,void * R,int ldR,csipl length m,csipl length n);

Computes the quotient, by element, ofa scalar and a matrix.

voidcsipl csmdiv split f(csipl cscalar f a re,csipl cscalar f a im,float * B re,float * B im,int ldB,float * R re,float * R im,int ldR,csipl length m,csipl length n);

Computes the quotient, by element, ofa scalar and a matrix.

voidcsipl rscvdiv inter f(float a,void * B,csipl stride strideB,void * R,csipl stride strideR,csipl length n);

Computes the quotient, by element, ofa real scalar and a complex vector.

voidcsipl rscvdiv split f(float a,float * B re,float * B im,csipl stride strideB,float * R re,float * R im,csipl stride strideR,csipl length n);

Computes the quotient, by element, ofa real scalar and a complex vector.

CSIPL/Brief [3.1] NASoftware 47

Page 66: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

Chapter 6. Vector And Elementwise Operations

Prototype Descriptionvoidcsipl rscvsub inter f(float a,void * B,csipl stride strideB,void * R,csipl stride strideR,csipl length n);

Computes the difference, by element, ofa real scalar and a complex vector.

voidcsipl rscvsub split f(float a,float * B re,float * B im,csipl stride strideB,float * R re,float * R im,csipl stride strideR,csipl length n);

Computes the difference, by element, ofa real scalar and a complex vector.

voidcsipl rscmdiv inter f(float a,void * B,int ldB,void * R,int ldR,csipl length m,csipl length n);

Computes the quotient, by element, ofa real scalar and a complex matrix.

voidcsipl rscmdiv split f(float a,float * B re,float * B im,int ldB,float * R re,float * R im,int ldR,csipl length m,csipl length n);

Computes the quotient, by element, ofa real scalar and a complex matrix.

6.4 Ternary Operations

Prototype Descriptionvoidcsipl vam P(scalar P * A,csipl stride strideA,scalar P * B,csipl stride strideB,scalar P * C,csipl stride strideC,scalar P * R,csipl stride strideR,csipl length n);

Computes the sum of two vectors andproduct of a third vector, by element.The following instances are supported:

csipl vam fcsipl vma f

CSIPL/Brief [3.1] NASoftware 48

Page 67: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

Chapter 6. Vector And Elementwise Operations

Prototype Descriptionvoidcsipl cvam inter P(void * A,csipl stride strideA,void * B,csipl stride strideB,void * C,csipl stride strideC,void * R,csipl stride strideR,csipl length n);

Computes the sum of two vectors andproduct of a third vector, by element.The following instances are supported:

csipl cvam inter fcsipl cvma inter f

voidcsipl cvam split P(scalar P * A re,scalar P * A im,csipl stride strideA,scalar P * B re,scalar P * B im,csipl stride strideB,scalar P * C re,scalar P * C im,csipl stride strideC,scalar P * R re,scalar P * R im,csipl stride strideR,csipl length n);

Computes the sum of two vectors andproduct of a third vector, by element.The following instances are supported:

csipl cvam split fcsipl cvma split f

voidcsipl vmsa f(float * A,csipl stride strideA,float * B,csipl stride strideB,float c,float * R,csipl stride strideR,csipl length n);

Computes the product of two vectorsand sum of a scalar, by element.

voidcsipl cvmsa inter f(void * A,csipl stride strideA,void * B,csipl stride strideB,csipl cscalar f c,void * R,csipl stride strideR,csipl length n);

Computes the product of two vectorsand sum of a scalar, by element.

voidcsipl cvmsa split f(float * A re,float * A im,csipl stride strideA,float * B re,float * B im,csipl stride strideB,csipl cscalar f c re,csipl cscalar f c im,float * R re,float * R im,csipl stride strideR,csipl length n);

Computes the product of two vectorsand sum of a scalar, by element.

CSIPL/Brief [3.1] NASoftware 49

Page 68: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

Chapter 6. Vector And Elementwise Operations

Prototype Descriptionvoidcsipl vmsb f(float * A,csipl stride strideA,float * B,csipl stride strideB,float * C,csipl stride strideC,float * R,csipl stride strideR,csipl length n);

Computes the product of two vectorsand difference of a third vector, by ele-ment.

voidcsipl cvmsb inter f(void * A,csipl stride strideA,void * B,csipl stride strideB,void * C,csipl stride strideC,void * R,csipl stride strideR,csipl length n);

Computes the product of two vectorsand difference of a third vector, by ele-ment.

voidcsipl cvmsb split f(float * A re,float * A im,csipl stride strideA,float * B re,float * B im,csipl stride strideB,float * C re,float * C im,csipl stride strideC,float * R re,float * R im,csipl stride strideR,csipl length n);

Computes the product of two vectorsand difference of a third vector, by ele-ment.

voidcsipl vsam f(float * A,csipl stride strideA,float b,float * C,csipl stride strideC,float * R,csipl stride strideR,csipl length n);

Computes the sum of a vector and ascalar, and product with a second vec-tor, by element.

voidcsipl cvsam inter f(void * A,csipl stride strideA,csipl cscalar f b,void * C,csipl stride strideC,void * R,csipl stride strideR,csipl length n);

Computes the sum of a vector and ascalar, and product with a second vec-tor, by element.

CSIPL/Brief [3.1] NASoftware 50

Page 69: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

Chapter 6. Vector And Elementwise Operations

Prototype Descriptionvoidcsipl cvsam split f(float * A re,float * A im,csipl stride strideA,csipl cscalar f b re,csipl cscalar f b im,float * C re,float * C im,csipl stride strideC,float * R re,float * R im,csipl stride strideR,csipl length n);

Computes the sum of a vector and ascalar, and product with a second vec-tor, by element.

voidcsipl vsbm f(float * A,csipl stride strideA,float * B,csipl stride strideB,float * C,csipl stride strideC,float * R,csipl stride strideR,csipl length n);

Computes the difference of two vectors,and product with a third vector, by el-ement.

voidcsipl cvsbm inter f(void * A,csipl stride strideA,void * B,csipl stride strideB,void * C,csipl stride strideC,void * R,csipl stride strideR,csipl length n);

Computes the difference of two vectors,and product with a third vector, by el-ement.

voidcsipl cvsbm split f(float * A re,float * A im,csipl stride strideA,float * B re,float * B im,csipl stride strideB,float * C re,float * C im,csipl stride strideC,float * R re,float * R im,csipl stride strideR,csipl length n);

Computes the difference of two vectors,and product with a third vector, by el-ement.

voidcsipl vsma f(float * A,csipl stride strideA,float b,float * C,csipl stride strideC,float * R,csipl stride strideR,csipl length n);

Computes the product of a vector anda scalar, and sum with a second vector,by element.

CSIPL/Brief [3.1] NASoftware 51

Page 70: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

Chapter 6. Vector And Elementwise Operations

Prototype Descriptionvoidcsipl cvsma inter f(void * A,csipl stride strideA,csipl cscalar f b,void * C,csipl stride strideC,void * R,csipl stride strideR,csipl length n);

Computes the product of a vector anda scalar, and sum with a second vector,by element.

voidcsipl cvsma split f(float * A re,float * A im,csipl stride strideA,csipl cscalar f b re,csipl cscalar f b im,float * C re,float * C im,csipl stride strideC,float * R re,float * R im,csipl stride strideR,csipl length n);

Computes the product of a vector anda scalar, and sum with a second vector,by element.

voidcsipl vsmsa f(float * A,csipl stride strideA,float b,float c,float * R,csipl stride strideR,csipl length n);

Computes the product of a vector anda scalar, and sum with a second scalar,by element.

voidcsipl cvsmsa inter f(void * A,csipl stride strideA,csipl cscalar f b,csipl cscalar f c,void * R,csipl stride strideR,csipl length n);

Computes the product of a vector anda scalar, and sum with a second scalar,by element.

voidcsipl cvsmsa split f(float * A re,float * A im,csipl stride strideA,csipl cscalar f b re,csipl cscalar f b im,csipl cscalar f c re,csipl cscalar f c im,float * R re,float * R im,csipl stride strideR,csipl length n);

Computes the product of a vector anda scalar, and sum with a second scalar,by element.

6.5 Logical Operations

CSIPL/Brief [3.1] NASoftware 52

Page 71: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

Chapter 6. Vector And Elementwise Operations

Prototype Descriptioncsipl scalar blcsipl valltrue bl(signed int * A,csipl stride strideA,csipl length n);

Returns true if all the elements of a vec-tor are true.

csipl scalar blcsipl malltrue bl(signed int * A,csipl stride strideA,csipl length n);

Returns true if all the elements of a vec-tor are true.

csipl scalar blcsipl vanytrue bl(signed int * A,csipl stride strideA,csipl length n);

Returns true if one or more elements ofa vector are true.

csipl scalar blcsipl manytrue bl(signed int * A,csipl stride strideA,csipl length n);

Returns true if one or more elements ofa vector are true.

voidcsipl vleq P(scalar P * A,csipl stride strideA,scalar P * B,csipl stride strideB,signed int * R,csipl stride strideR,csipl length n);

Computes the boolean comparison of‘equal’, by element, of two vectors.The following instances are supported:

csipl vleq fcsipl vleq i

voidcsipl cvleq inter P(void * A,csipl stride strideA,void * B,csipl stride strideB,signed int * R,csipl stride strideR,csipl length n);

Computes the boolean comparison of‘equal’, by element, of two vectors.The following instances are supported:

csipl cvleq inter fcsipl cvleq inter i

voidcsipl cvleq split P(scalar P * A re,scalar P * A im,csipl stride strideA,scalar P * B re,scalar P * B im,csipl stride strideB,signed int * R re,signed int * R im,csipl stride strideR,csipl length n);

Computes the boolean comparison of‘equal’, by element, of two vectors.The following instances are supported:

csipl cvleq split fcsipl cvleq split i

voidcsipl mleq P(scalar P * A,int ldA,scalar P * B,int ldB,signed int * R,csipl stride strideR,csipl length m,csipl length n);

Computes the boolean comparisonof ‘equal’, by element, of two vec-tors/matrices.The following instances are supported:

csipl mleq fcsipl mleq i

CSIPL/Brief [3.1] NASoftware 53

Page 72: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

Chapter 6. Vector And Elementwise Operations

Prototype Descriptionvoidcsipl cmleq inter P(void * A,int ldA,void * B,int ldB,signed int * R,csipl stride strideR,csipl length m,csipl length n);

Computes the boolean comparisonof ‘equal’, by element, of two vec-tors/matrices.The following instances are supported:

csipl cmleq inter fcsipl cmleq inter i

voidcsipl cmleq split P(scalar P * A re,scalar P * A im,int ldA,scalar P * B re,scalar P * B im,int ldB,signed int * R re,signed int * R im,csipl stride strideR,csipl length m,csipl length n);

Computes the boolean comparisonof ‘equal’, by element, of two vec-tors/matrices.The following instances are supported:

csipl cmleq split fcsipl cmleq split i

voidcsipl vlge P(scalar P * A,csipl stride strideA,scalar P * B,csipl stride strideB,signed int * R,csipl stride strideR,csipl length n);

Computes the boolean comparison of‘greater than or equal’, by element, oftwo vectors.The following instances are supported:

csipl vlge fcsipl vlge i

voidcsipl mlge P(scalar P * A,int ldA,scalar P * B,int ldB,signed int * R,csipl stride strideR,csipl length m,csipl length n);

Computes the boolean comparison of‘greater than or equal’, by element, oftwo vectors/matrices.The following instances are supported:

csipl mlge fcsipl mlge i

voidcsipl vlgt P(scalar P * A,csipl stride strideA,scalar P * B,csipl stride strideB,signed int * R,csipl stride strideR,csipl length n);

Computes the boolean comparison of‘greater than’, by element, of two vec-tors.The following instances are supported:

csipl vlgt fcsipl vlgt i

voidcsipl mlgt P(scalar P * A,int ldA,scalar P * B,int ldB,signed int * R,csipl stride strideR,csipl length m,csipl length n);

Computes the boolean comparison of‘greater than’, by element, of two vec-tors/matrices.The following instances are supported:

csipl mlgt fcsipl mlgt i

CSIPL/Brief [3.1] NASoftware 54

Page 73: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

Chapter 6. Vector And Elementwise Operations

Prototype Descriptionvoidcsipl vlle P(scalar P * A,csipl stride strideA,scalar P * B,csipl stride strideB,signed int * R,csipl stride strideR,csipl length n);

Computes the boolean comparison of‘less than or equal’, by element, of twovectors.The following instances are supported:

csipl vlle fcsipl vlle i

voidcsipl mlle P(scalar P * A,int ldA,scalar P * B,int ldB,signed int * R,csipl stride strideR,csipl length m,csipl length n);

Computes the boolean comparison of‘less than or equal’, by element, of twovectors/matrices.The following instances are supported:

csipl mlle fcsipl mlle i

voidcsipl vllt P(scalar P * A,csipl stride strideA,scalar P * B,csipl stride strideB,signed int * R,csipl stride strideR,csipl length n);

Computes the boolean comparison of‘less than’, by element, of two vectors.The following instances are supported:

csipl vllt fcsipl vllt i

voidcsipl mllt P(scalar P * A,int ldA,scalar P * B,int ldB,signed int * R,csipl stride strideR,csipl length m,csipl length n);

Computes the boolean comparison of‘less than’, by element, of two vec-tors/matrices.The following instances are supported:

csipl mllt fcsipl mllt i

voidcsipl vlne P(scalar P * A,csipl stride strideA,scalar P * B,csipl stride strideB,signed int * R,csipl stride strideR,csipl length n);

Computes the boolean comparison of‘not equal’, by element, of two vectors.The following instances are supported:

csipl vlne fcsipl vlne i

voidcsipl cvlne inter P(void * A,csipl stride strideA,void * B,csipl stride strideB,signed int * R,csipl stride strideR,csipl length n);

Computes the boolean comparison of‘not equal’, by element, of two vectors.The following instances are supported:

csipl cvlne inter fcsipl cvlne inter i

CSIPL/Brief [3.1] NASoftware 55

Page 74: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

Chapter 6. Vector And Elementwise Operations

Prototype Descriptionvoidcsipl cvlne split P(scalar P * A re,scalar P * A im,csipl stride strideA,scalar P * B re,scalar P * B im,csipl stride strideB,signed int * R re,signed int * R im,csipl stride strideR,csipl length n);

Computes the boolean comparison of‘not equal’, by element, of two vectors.The following instances are supported:

csipl cvlne split fcsipl cvlne split i

voidcsipl mlne P(scalar P * A,int ldA,scalar P * B,int ldB,signed int * R,csipl stride strideR,csipl length m,csipl length n);

Computes the boolean comparison of‘not equal’, by element, of two vec-tors/matrices.The following instances are supported:

csipl mlne fcsipl mlne i

voidcsipl cmlne inter P(void * A,int ldA,void * B,int ldB,signed int * R,csipl stride strideR,csipl length m,csipl length n);

Computes the boolean comparison of‘not equal’, by element, of two vec-tors/matrices.The following instances are supported:

csipl cmlne inter fcsipl cmlne inter i

voidcsipl cmlne split P(scalar P * A re,scalar P * A im,int ldA,scalar P * B re,scalar P * B im,int ldB,signed int * R re,signed int * R im,csipl stride strideR,csipl length m,csipl length n);

Computes the boolean comparison of‘not equal’, by element, of two vec-tors/matrices.The following instances are supported:

csipl cmlne split fcsipl cmlne split i

6.6 Selection Operations

Prototype Descriptionvoidcsipl vclip P(scalar P * A,csipl stride strideA,scalar P t1,scalar P t2,scalar P c1,scalar P c2,scalar P * R,csipl stride strideR,csipl length n);

Computes the generalised double clip,by element, of two vectors.The following instances are supported:

csipl vclip fcsipl vclip icsipl vclip si

CSIPL/Brief [3.1] NASoftware 56

Page 75: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

Chapter 6. Vector And Elementwise Operations

Prototype Descriptionvoidcsipl vinvclip P(scalar P * A,csipl stride strideA,scalar P t1,scalar P t2,scalar P t3,scalar P c1,scalar P c2,scalar P * R,csipl stride strideR,csipl length n);

Computes the generalised inverteddouble clip, by element, of two vectors.The following instances are supported:

csipl vinvclip fcsipl vinvclip icsipl vinvclip si

unsigned intcsipl vindexbool(signed int * X,csipl stride strideX,unsigned int * Y,csipl stride strideY,csipl length n);

Computes an index vector of the in-dices of the non-false elements of theboolean vector, and returns the num-ber of non-false elements.

voidcsipl vmax f(float * A,csipl stride strideA,float * B,csipl stride strideB,float * R,csipl stride strideR,csipl length n);

Computes the maximum, by element,of two vectors.

voidcsipl vmaxmg f(float * A,csipl stride strideA,float * B,csipl stride strideB,float * R,csipl stride strideR,csipl length n);

Computes the maximum magnitude(absolute value), by element, of twovectors.

voidcsipl vcmaxmgsq inter f(void * A,csipl stride strideA,void * B,csipl stride strideB,float * R,csipl stride strideR,csipl length n);

Computes the maximum magnitudesquared, by element, of two complexvectors.

voidcsipl vcmaxmgsq split f(float * A re,float * A im,csipl stride strideA,float * B re,float * B im,csipl stride strideB,float * R,csipl stride strideR,csipl length n);

Computes the maximum magnitudesquared, by element, of two complexvectors.

floatcsipl vcmaxmgsqval inter f(void * A,csipl stride strideA,csipl index * index,csipl length n);

Returns the index and value of themaximum magnitude squared of the el-ements of a complex vector. The indexis returned by reference as one of thearguments.

CSIPL/Brief [3.1] NASoftware 57

Page 76: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

Chapter 6. Vector And Elementwise Operations

Prototype Descriptionfloatcsipl vcmaxmgsqval split f(float * A re,float * A im,csipl stride strideA,csipl index * index,csipl length n);

Returns the index and value of themaximum magnitude squared of the el-ements of a complex vector. The indexis returned by reference as one of thearguments.

floatcsipl vmaxmgval f(float * A,csipl stride strideA,csipl index * index,csipl length n);

Returns the index and value of themaximum absolute value of the ele-ments of a vector. The index is re-turned by reference as one of the ar-guments.

floatcsipl vmaxval f(float * A,csipl stride strideA,csipl index * index,csipl length n);

Returns the index and value of themaximum value of the elements of avector. The index is returned by ref-erence as one of the arguments.

voidcsipl vmin f(float * A,csipl stride strideA,float * B,csipl stride strideB,float * R,csipl stride strideR,csipl length n);

Computes the minimum, by element, oftwo vectors.

voidcsipl vminmg f(float * A,csipl stride strideA,float * B,csipl stride strideB,float * R,csipl stride strideR,csipl length n);

Computes the minimum magnitude(absolute value), by element, of twovectors.

voidcsipl vcminmgsq inter f(void * A,csipl stride strideA,void * B,csipl stride strideB,float * R,csipl stride strideR,csipl length n);

Computes the minimum magnitudesquared, by element, of two complexvectors.

voidcsipl vcminmgsq split f(float * A re,float * A im,csipl stride strideA,float * B re,float * B im,csipl stride strideB,float * R,csipl stride strideR,csipl length n);

Computes the minimum magnitudesquared, by element, of two complexvectors.

CSIPL/Brief [3.1] NASoftware 58

Page 77: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

Chapter 6. Vector And Elementwise Operations

Prototype Descriptionfloatcsipl vcminmgsqval inter f(void * A,csipl stride strideA,csipl index * index,csipl length n);

Returns the index and value of the min-imum magnitude squared of the ele-ments of a complex vector. The indexis returned by reference as one of thearguments.

floatcsipl vcminmgsqval split f(float * A re,float * A im,csipl stride strideA,csipl index * index,csipl length n);

Returns the index and value of the min-imum magnitude squared of the ele-ments of a complex vector. The indexis returned by reference as one of thearguments.

floatcsipl vminmgval f(float * A,csipl stride strideA,csipl index * index,csipl length n);

Returns the index and value of the min-imum absolute value of the elements ofa vector. The index is returned by ref-erence as one of the arguments.

floatcsipl vminval f(float * A,csipl stride strideA,csipl index * index,csipl length n);

Returns the index and value of the min-imum value of the elements of a vector.The index is returned by reference asone of the arguments.

6.7 Bitwise and Boolean Logical Operators

Prototype Descriptionvoidcsipl vand P(scalar P * A,csipl stride strideA,scalar P * B,csipl stride strideB,scalar P * R,csipl stride strideR,csipl length n);

Computes the bitwise and, by element,of two vectors.The following instances are supported:

csipl vand icsipl vand sicsipl vand bl

voidcsipl mand P(scalar P * A,int ldA,scalar P * B,int ldB,scalar P * R,int ldR,csipl length m,csipl length n);

Computes the bitwise and, by element,of two matrices.The following instances are supported:

csipl mand icsipl mand sicsipl mand bl

voidcsipl vnot P(scalar P * A,csipl stride strideA,scalar P * R,csipl stride strideR,csipl length n);

Computes the bitwise not (one’s com-plement), by element, of two vectors.The following instances are supported:

csipl vnot icsipl vnot sicsipl vnot bl

CSIPL/Brief [3.1] NASoftware 59

Page 78: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

Chapter 6. Vector And Elementwise Operations

Prototype Descriptionvoidcsipl mnot P(scalar P * A,int ldA,scalar P * R,int ldR,csipl length m,csipl length n);

Computes the bitwise not (one’s com-plement), by element, of two matrices.The following instances are supported:

csipl mnot icsipl mnot sicsipl mnot bl

voidcsipl vor P(scalar P * A,csipl stride strideA,scalar P * B,csipl stride strideB,scalar P * R,csipl stride strideR,csipl length n);

Computes the bitwise inclusive or, byelement, of two vectors.The following instances are supported:

csipl vor icsipl vor sicsipl vor bl

voidcsipl mor P(scalar P * A,int ldA,scalar P * B,int ldB,scalar P * R,int ldR,csipl length m,csipl length n);

Computes the bitwise inclusive or, byelement, of two matrices.The following instances are supported:

csipl mor icsipl mor sicsipl mor bl

voidcsipl mxor P(scalar P * A,int ldA,scalar P * B,int ldB,scalar P * R,int ldR,csipl length m,csipl length n);

Computes the bitwise exclusive or, byelement, of two matrices.The following instances are supported:

csipl mxor icsipl mxor sicsipl mxor bl

6.8 Element Generation and Copy

CSIPL/Brief [3.1] NASoftware 60

Page 79: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

Chapter 6. Vector And Elementwise Operations

Prototype Descriptionvoidcsipl vcopy P P(scalar P * A,csipl stride strideA,scalar P * R,csipl stride strideR,csipl length n);

Copy the source vector to the destina-tion vector performing any necessarytype conversion of the standard ANSIC scalar types.The following instances are supported:

csipl vcopy f fcsipl vcopy f icsipl vcopy f sicsipl vcopy f blcsipl vcopy i fcsipl vcopy i icsipl vcopy i sicsipl vcopy i vicsipl vcopy si fcsipl vcopy si icsipl vcopy si sicsipl vcopy bl fcsipl vcopy bl blcsipl vcopy vi icsipl vcopy vi vicsipl vcopy mi mi

voidcsipl cvcopy inter f f(void * A,csipl stride strideA,void * R,csipl stride strideR,csipl length n);

Copy the source vector to the destina-tion vector performing any necessarytype conversion of the standard ANSIC scalar types.

voidcsipl cvcopy split f f(float * A re,float * A im,csipl stride strideA,float * R re,float * R im,csipl stride strideR,csipl length n);

Copy the source vector to the destina-tion vector performing any necessarytype conversion of the standard ANSIC scalar types.

voidcsipl mcopy P P(scalar P * A,int ldA,scalar P * R,int ldR,csipl length m,csipl length n);

Copy the source matrix to the destina-tion matrix performing any necessarytype conversion of the standard ANSIC scalar types.The following instances are supported:

csipl mcopy f fcsipl mcopy f icsipl mcopy f sicsipl mcopy f blcsipl mcopy i fcsipl mcopy i icsipl mcopy i sicsipl mcopy si fcsipl mcopy si icsipl mcopy si sicsipl mcopy bl fcsipl mcopy bl bl

CSIPL/Brief [3.1] NASoftware 61

Page 80: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

Chapter 6. Vector And Elementwise Operations

Prototype Descriptionvoidcsipl cmcopy inter f f(void * A,int ldA,void * R,int ldR,csipl length m,csipl length n);

Copy the source matrix to the destina-tion matrix performing any necessarytype conversion of the standard ANSIC scalar types.

voidcsipl cmcopy split f f(scalar P * A re,scalar P * A im,int ldA,scalar P * R re,scalar P * R im,int ldR,csipl length m,csipl length n);

Copy the source matrix to the destina-tion matrix performing any necessarytype conversion of the standard ANSIC scalar types.

voidcsipl vfill P(scalar P a,scalar P * R,csipl stride strideR,csipl length n);

Fill a vector with a constant value.The following instances are supported:

csipl vfill fcsipl vfill icsipl vfill si

voidcsipl cvfill inter f(csipl cscalar f a,void * R,csipl stride strideR,csipl length n);

Fill a vector with a constant value.

voidcsipl cvfill split f(csipl cscalar f a re,csipl cscalar f a im,float * R re,float * R im,csipl stride strideR,csipl length n);

Fill a vector with a constant value.

voidcsipl mfill P(scalar P a,scalar P * R,int ldR,csipl length m,csipl length n);

Fill a matrix with a constant value.The following instances are supported:

csipl mfill fcsipl mfill icsipl mfill si

voidcsipl cmfill inter f(csipl cscalar f a,void * R,int ldR,csipl length m,csipl length n);

Fill a matrix with a constant value.

voidcsipl cmfill split f(csipl cscalar f a re,csipl cscalar f a im,float * R re,float * R im,int ldR,csipl length m,csipl length n);

Fill a matrix with a constant value.

CSIPL/Brief [3.1] NASoftware 62

Page 81: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

Chapter 6. Vector And Elementwise Operations

Prototype Descriptionvoidcsipl vramp P(scalar P alpha,scalar P beta,scalar P * R,csipl stride strideR,csipl length n);

Computes a vector ramp by starting atan initial value and incrementing eachsuccessive element by the ramp stepsize.The following instances are supported:

csipl vramp fcsipl vramp icsipl vramp si

6.9 Manipulation Operations

Prototype Descriptionvoidcsipl vcmplx inter f(float * A,csipl stride strideA,float * B,csipl stride strideB,void * R,csipl stride strideR,csipl length n);

Form a complex vector from two realvectors.

voidcsipl vcmplx split f(float * A,csipl stride strideA,float * B,csipl stride strideB,float * R re,float * R im,csipl stride strideR,csipl length n);

Form a complex vector from two realvectors.

voidcsipl mcmplx f(float * A,int ldA,float * B,int ldB,void * R,int ldR,csipl length m,csipl length n);

Form a complex matrix from two realmatrices.

voidcsipl vgather P(scalar P * X,csipl stride strideX,unsigned int * I,csipl stride strideI,scalar P * Y,csipl stride strideY,csipl length n);

The gather operation selects elementsof a source vector using indices sup-plied by an index vector. The selectedelements are placed sequentially in anoutput vector so that the output vec-tor and the index vector are indexedthe same.The following instances are supported:

csipl vgather fcsipl vgather icsipl vgather si

CSIPL/Brief [3.1] NASoftware 63

Page 82: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

Chapter 6. Vector And Elementwise Operations

Prototype Descriptionvoidcsipl cvgather inter f(void * X,csipl stride strideX,unsigned int * I,csipl stride strideI,void * Y,csipl stride strideY,csipl length n);

The gather operation selects elementsof a source vector using indices sup-plied by an index vector. The selectedelements are placed sequentially in anoutput vector so that the output vec-tor and the index vector are indexedthe same.

voidcsipl cvgather split f(float * X re,float * X im,csipl stride strideX,unsigned int * I re,unsigned int * I im,csipl stride strideI,float * Y re,float * Y im,csipl stride strideY,csipl length n);

The gather operation selects elementsof a source vector using indices sup-plied by an index vector. The selectedelements are placed sequentially in anoutput vector so that the output vec-tor and the index vector are indexedthe same.

voidcsipl mgather P(scalar P * X,int ldX,csipl scalar mi * I,csipl stride strideI,scalar P * Y,csipl stride strideY,csipl length n);

The gather operation selects elementsof a source vector/matrix using indicessupplied by an index vector. The se-lected elements are placed sequentiallyin an output vector so that the outputvector and the index vector are indexedthe same.The following instances are supported:

csipl mgather fcsipl mgather icsipl mgather si

voidcsipl cmgather inter f(void * X,int ldX,csipl scalar mi * I,csipl stride strideI,void * Y,csipl stride strideY,csipl length n);

The gather operation selects elementsof a source vector/matrix using indicessupplied by an index vector. The se-lected elements are placed sequentiallyin an output vector so that the outputvector and the index vector are indexedthe same.

voidcsipl cmgather split f(float * X re,float * X im,int ldX,csipl scalar mi * I re,csipl scalar mi * I im,csipl stride strideI,float * Y re,float * Y im,csipl stride strideY,csipl length n);

The gather operation selects elementsof a source vector/matrix using indicessupplied by an index vector. The se-lected elements are placed sequentiallyin an output vector so that the outputvector and the index vector are indexedthe same.

voidcsipl vimag inter f(void * A,csipl stride strideA,float * R,csipl stride strideR,csipl length n);

Extract the imaginary part of a com-plex vector.

CSIPL/Brief [3.1] NASoftware 64

Page 83: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

Chapter 6. Vector And Elementwise Operations

Prototype Descriptionvoidcsipl vimag split f(float * A re,float * A im,csipl stride strideA,float * R,csipl stride strideR,csipl length n);

Extract the imaginary part of a com-plex vector.

voidcsipl mimag f(void * A,int ldA,float * R,int ldR,csipl length m,csipl length n);

Extract the imaginary part of a com-plex matrix.

voidcsipl vpolar inter f(void * A,csipl stride strideA,float * R,csipl stride strideR,float * P,csipl stride strideP,csipl length n);

Convert a complex vector from rectan-gular to polar form. The polar dataconsists of a real vector containing theradius and a corresponding real vectorcontaining the argument (angle) of thecomplex input data.

voidcsipl vpolar split f(float * A re,float * A im,csipl stride strideA,float * R,csipl stride strideR,float * P,csipl stride strideP,csipl length n);

Convert a complex vector from rectan-gular to polar form. The polar dataconsists of a real vector containing theradius and a corresponding real vectorcontaining the argument (angle) of thecomplex input data.

voidcsipl mpolar f(void * A,int ldA,float * R,int ldR,float * P,int ldP,csipl length m,csipl length n);

Convert a complex matrix from rect-angular to polar form. The polar dataconsists of a real matrix containing theradius and a corresponding real matrixcontaining the argument (angle) of thecomplex input data.

voidcsipl vreal inter f(void * A,csipl stride strideA,float * R,csipl stride strideR,csipl length n);

Extract the real part of a complex vec-tor.

voidcsipl vreal split f(float * A re,float * A im,csipl stride strideA,float * R,csipl stride strideR,csipl length n);

Extract the real part of a complex vec-tor.

CSIPL/Brief [3.1] NASoftware 65

Page 84: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

Chapter 6. Vector And Elementwise Operations

Prototype Descriptionvoidcsipl mreal f(void * A,int ldA,float * R,int ldR,csipl length m,csipl length n);

Extract the real part of a complex ma-trix.

voidcsipl vrect inter f(float * R,csipl stride strideR,float * P,csipl stride strideP,void * A,csipl stride strideA,csipl length n);

Convert a pair of real vectors from com-plex polar to complex rectangular form.

voidcsipl vrect split f(float * R,csipl stride strideR,float * P,csipl stride strideP,float * A re,float * A im,csipl stride strideA,csipl length n);

Convert a pair of real vectors from com-plex polar to complex rectangular form.

voidcsipl mrect f(float * R,int ldR,float * P,int ldP,void * A,int ldA,csipl length m,csipl length n);

Convert a pair of real matrices fromcomplex polar to complex rectangularform.

voidcsipl vscatter P(scalar P * X,csipl stride strideX,scalar P * Y,csipl stride strideY,unsigned int * I,csipl stride strideI,csipl length n);

The scatter operation sequentially useselements of a source vector and an in-dex vector. The element of the vectorindex is used to select a storage loca-tion in the output vector to store theelement from the source vector.The following instances are supported:

csipl vscatter fcsipl vscatter icsipl vscatter si

voidcsipl cvscatter inter f(void * X,csipl stride strideX,void * Y,csipl stride strideY,unsigned int * I,csipl stride strideI,csipl length n);

The scatter operation sequentially useselements of a source vector and an in-dex vector. The element of the vectorindex is used to select a storage loca-tion in the output vector to store theelement from the source vector.

CSIPL/Brief [3.1] NASoftware 66

Page 85: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

Chapter 6. Vector And Elementwise Operations

Prototype Descriptionvoidcsipl cvscatter split f(float * X re,float * X im,csipl stride strideX,float * Y re,float * Y im,csipl stride strideY,unsigned int * I re,unsigned int * I im,csipl stride strideI,csipl length n);

The scatter operation sequentially useselements of a source vector and an in-dex vector. The element of the vectorindex is used to select a storage loca-tion in the output vector to store theelement from the source vector.

voidcsipl mscatter P(scalar P * X,csipl stride strideX,scalar P * Y,int ldY,csipl scalar mi * I,csipl stride strideI,csipl length n);

The scatter operation sequentially useselements of a source vector and an in-dex vector. The element of the vec-tor/matrix index is used to select astorage location in the output vec-tor/matrix to store the element fromthe source vector.The following instances are supported:

csipl mscatter fcsipl mscatter icsipl mscatter si

voidcsipl cmscatter inter f(void * X,csipl stride strideX,void * Y,int ldY,csipl scalar mi * I,csipl stride strideI,csipl length n);

The scatter operation sequentially useselements of a source vector and an in-dex vector. The element of the vec-tor/matrix index is used to select astorage location in the output vec-tor/matrix to store the element fromthe source vector.

voidcsipl cmscatter split f(float * X re,float * X im,csipl stride strideX,float * Y re,float * Y im,int ldY,csipl scalar mi * I re,csipl scalar mi * I im,csipl stride strideI,csipl length n);

The scatter operation sequentially useselements of a source vector and an in-dex vector. The element of the vec-tor/matrix index is used to select astorage location in the output vec-tor/matrix to store the element fromthe source vector.

voidcsipl cvswap inter f(void * A,csipl stride strideA,void * B,csipl stride strideB,csipl length n);

Swap elements between two vectors.

voidcsipl cvswap split f(float * A re,float * A im,csipl stride strideA,float * B re,float * B im,csipl stride strideB,csipl length n);

Swap elements between two vectors.

CSIPL/Brief [3.1] NASoftware 67

Page 86: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

Chapter 6. Vector And Elementwise Operations

Prototype Descriptionvoidcsipl mswap P(scalar P * A,int ldA,scalar P * B,int ldB,csipl length m,csipl length n);

Swap elements between two matrices.The following instances are supported:

csipl mswap fcsipl mswap icsipl mswap si

voidcsipl cmswap inter f(void * A,int ldA,void * B,int ldB,csipl length m,csipl length n);

Swap elements between two matrices.

voidcsipl cmswap split f(float * A re,float * A im,int ldA,float * B re,float * B im,int ldB,csipl length m,csipl length n);

Swap elements between two matrices.

CSIPL/Brief [3.1] NASoftware 68

Page 87: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

Chapter 7. Signal Processing Functions

7.1 FFT Functions

Prototype Descriptioncsipl fft f *csipl ccfftip create f(csipl index length,float scale,csipl fft dir dir,unsigned int ntimes,csipl alg hint hint);

Create a 1D FFT object.

csipl fft f *csipl ccfftop create f(csipl index length,float scale,csipl fft dir dir,unsigned int ntimes,csipl alg hint hint);

Create a 1D FFT object.

csipl fft f *csipl crfftop create f(csipl index length,float scale,unsigned int ntimes,csipl alg hint hint);

Create a 1D FFT object.

csipl fft f *csipl rcfftop create f(csipl index length,float scale,unsigned int ntimes,csipl alg hint hint);

Create a 1D FFT object.

voidcsipl ccfftip inter f(csipl fft f * plan,void * xy,csipl stride stridexy);

Apply a complex-to-complex FastFourier Transform (FFT).

voidcsipl ccfftip split f(csipl fft f * plan,float * xy re,float * xy im,csipl stride stridexy);

Apply a complex-to-complex FastFourier Transform (FFT).

voidcsipl ccfftop inter f(csipl fft f * plan,void * x,csipl stride stridex,void * y,csipl stride stridey);

Apply a complex-to-complex FastFourier Transform (FFT).

voidcsipl ccfftop split f(csipl fft f * plan,float * x re,float * x im,csipl stride stridex,float * y re,float * y im,csipl stride stridey);

Apply a complex-to-complex FastFourier Transform (FFT).

CSIPL/Brief [3.1] NASoftware 69

Page 88: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

Chapter 7. Signal Processing Functions

Prototype Descriptionvoidcsipl crfftop inter f(csipl fft f * plan,void * x,csipl stride stridex,float * y,csipl stride stridey);

Apply a complex-to-real Fast FourierTransform (FFT).

voidcsipl crfftop split f(csipl fft f * plan,float * x re,float * x im,csipl stride stridex,float * y,csipl stride stridey);

Apply a complex-to-real Fast FourierTransform (FFT).

voidcsipl rcfftop inter f(csipl fft f * plan,float * x,csipl stride stridex,void * y,csipl stride stridey);

Apply a real-to-complex Fast FourierTransform (FFT).

voidcsipl rcfftop split f(csipl fft f * plan,float * x,csipl stride stridex,float * y re,float * y im,csipl stride stridey);

Apply a real-to-complex Fast FourierTransform (FFT).

intcsipl fft destroy f(csipl fft f * plan);

Destroy an FFT object.

voidcsipl fft getattr f(csipl fft f * plan,csipl fft attr f * attr);

Return the attributes of an FFT ob-ject.

csipl fftm f *csipl ccfftmop create f(csipl index rows,csipl index cols,float scale,csipl fft dir dir,csipl major major,unsigned int ntimes,csipl alg hint hint);

Create a 1D multiple FFT object.

csipl fftm f *csipl ccfftmip create f(csipl index rows,csipl index cols,float scale,csipl fft dir dir,csipl major major,unsigned int ntimes,csipl alg hint hint);

Create a 1D multiple FFT object.

CSIPL/Brief [3.1] NASoftware 70

Page 89: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

Chapter 7. Signal Processing Functions

Prototype Descriptioncsipl fftm f *csipl crfftmop create f(csipl index rows,csipl index cols,float scale,csipl major major,unsigned int ntimes,csipl alg hint hint);

Create a 1D multiple FFT object.

csipl fftm f *csipl rcfftmop create f(csipl index rows,csipl index cols,float scale,csipl major major,unsigned int ntimes,csipl alg hint hint);

Create a 1D multiple FFT object.

intcsipl fftm destroy f(csipl fftm f * plan);

Destroy an FFT object.

voidcsipl fftm getattr f(csipl fftm f * plan,csipl fftm attr f * attr);

Return the attributes of an FFT ob-ject.

voidcsipl ccfftmip inter f(csipl fftm f * plan,void * XY,int ldXY);

Apply a multiple complex-to-complexFast Fourier Transform (FFT).

voidcsipl ccfftmip split f(csipl fftm f * plan,float * XY re,float * XY im,int ldXY);

Apply a multiple complex-to-complexFast Fourier Transform (FFT).

voidcsipl ccfftmop inter f(csipl fftm f * plan,void * X,int ldX,void * Y,int ldY);

Apply a multiple complex-to-complexFast Fourier Transform (FFT).

voidcsipl ccfftmop split f(csipl fftm f * plan,float * X re,float * X im,int ldX,float * Y re,float * Y im,int ldY);

Apply a multiple complex-to-complexFast Fourier Transform (FFT).

voidcsipl crfftmop inter f(csipl fftm f * plan,void * X,int ldX,float * Y,int ldY);

Apply a multiple complex-to-real FastFourier Transform (FFT).

CSIPL/Brief [3.1] NASoftware 71

Page 90: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

Chapter 7. Signal Processing Functions

Prototype Descriptionvoidcsipl crfftmop split f(csipl fftm f * plan,float * X re,float * X im,int ldX,float * Y,int ldY);

Apply a multiple complex-to-real FastFourier Transform (FFT).

voidcsipl rcfftmop inter f(csipl fftm f * plan,float * X,int ldX,void * Y,int ldY);

Apply a multiple real-to-complex out ofplace Fast Fourier Transform (FFT).

voidcsipl rcfftmop split f(csipl fftm f * plan,float * X,int ldX,float * Y re,float * Y im,int ldY);

Apply a multiple real-to-complex out ofplace Fast Fourier Transform (FFT).

csipl fft2d f *csipl ccfft2dop create f(csipl index rows,csipl index cols,float scale,csipl fft dir dir,unsigned int ntimes,csipl alg hint hint);

Create a 2D FFT object.

csipl fft2d f *csipl ccfft2dip create f(csipl index rows,csipl index cols,float scale,csipl fft dir dir,unsigned int ntimes,csipl alg hint hint);

Create a 2D FFT object.

csipl fft2d f *csipl crfft2dop create f(csipl index rows,csipl index cols,float scale,unsigned int ntimes,csipl alg hint hint);

Create a 2D FFT object.

csipl fft2d f *csipl rcfft2dop create f(csipl index rows,csipl index cols,float scale,unsigned int ntimes,csipl alg hint hint);

Create a 2D FFT object.

voidcsipl ccfft2dip inter f(csipl fft2d f * plan,void * XY,int ldXY);

Apply a complex-to-complex 2D FastFourier Transform (FFT).

CSIPL/Brief [3.1] NASoftware 72

Page 91: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

Chapter 7. Signal Processing Functions

Prototype Descriptionvoidcsipl ccfft2dip split f(csipl fft2d f * plan,float * XY re,float * XY im,int ldXY);

Apply a complex-to-complex 2D FastFourier Transform (FFT).

voidcsipl ccfft2dop inter f(csipl fft2d f * plan,void * X,int ldX,void * Y,int ldY);

Apply a complex-to-complex 2D FastFourier Transform (FFT).

voidcsipl ccfft2dop split f(csipl fft2d f * plan,float * X re,float * X im,int ldX,float * Y re,float * Y im,int ldY);

Apply a complex-to-complex 2D FastFourier Transform (FFT).

voidcsipl crfft2dop inter f(csipl fft2d f * plan,void * X,int ldX,float * Y,int ldY);

Apply a complex-to-real 2D FastFourier Transform (FFT).

voidcsipl crfft2dop split f(csipl fft2d f * plan,float * X re,float * X im,int ldX,float * Y,int ldY);

Apply a complex-to-real 2D FastFourier Transform (FFT).

voidcsipl rcfft2dop inter f(csipl fft2d f * plan,float * X,int ldX,void * Y,int ldY);

Apply a real-to-complex 2D FastFourier Transform (FFT).

voidcsipl rcfft2dop split f(csipl fft2d f * plan,float * X,int ldX,float * Y re,float * Y im,int ldY);

Apply a real-to-complex 2D FastFourier Transform (FFT).

intcsipl fft2d destroy f(csipl fft2d f * plan);

Destroy an FFT object.

voidcsipl fft2d getattr f(csipl fft2d f * plan,csipl fft2d attr f * attr);

Return the attributes of an FFT ob-ject.

7.2 Convolution/Correlation FunctionsCSIPL/Brief [3.1] NASoftware 73

Page 92: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

Chapter 7. Signal Processing Functions

Prototype Descriptioncsipl conv1d f *csipl conv1d create f(float * kernel,csipl stride stridekernel,csipl symmetry symm,unsigned int N,unsigned int D,csipl support region support,unsigned int ntimes,csipl alg hint hint,csipl length n);

Create a decimated 1D convolution fil-ter object.

intcsipl conv1d destroy f(csipl conv1d f * plan);

Destroy a 1D convolution object.

voidcsipl conv1d getattr f(csipl conv1d f * plan,csipl conv1d attr f * attr);

Returns the attributes for a 1D convo-lution object.

voidcsipl convolve1d f(csipl conv1d f * plan,float * x,csipl stride stridex,float * y,csipl stride stridey,csipl length n);

Compute a decimated real one-dimensional (1D) convolution of twovectors.

csipl conv2d f *csipl conv2d create f(float * H,int ldH,csipl symmetry symm,unsigned int P,unsigned int Q,unsigned int D,csipl support region support,unsigned int ntimes,csipl alg hint hint,csipl length m,csipl length n);

Create a decimated 2D convolution fil-ter object.

intcsipl conv2d destroy f(csipl conv2d f * plan);

Destroy a 2D convolution object.

voidcsipl conv2d getattr f(csipl conv2d f * plan,csipl conv2d attr f * attr);

Returns the attributes for a 2D convo-lution object.

voidcsipl convolve2d f(csipl conv2d f * plan,float * x,int ldx,float * y,int ldy,csipl length m,csipl length n);

Compute a decimated real two-dimensional (2D) convolution of twomatrices.

csipl Dcorr1d P *csipl Dcorr1d create P(unsigned int M,unsigned int N,csipl support region support,unsigned int ntimes,csipl alg hint hint);

Create a 1D correlation object.The following instances are supported:

csipl corr1d create fcsipl ccorr1d create f

CSIPL/Brief [3.1] NASoftware 74

Page 93: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

Chapter 7. Signal Processing Functions

Prototype Descriptionintcsipl Dcorr1d destroy P(csipl Dcorr1d P * plan);

Destroy a 1D correlation object.The following instances are supported:

csipl corr1d destroy fcsipl ccorr1d destroy f

voidcsipl Dcorr1d getattr P(csipl Dcorr1d P * plan,csipl Dcorr1d attr P * attr);

Return the attributes for a 1D correla-tion object.The following instances are supported:

csipl corr1d getattr fcsipl ccorr1d getattr f

voidcsipl correlate1d f(csipl corr1d f * plan,csipl bias bias,float * ref,csipl stride strideref,float * x,csipl stride stridex,float * y,csipl stride stridey,csipl length n);

Compute a real one-dimensional (1D)correlation of two vectors.

voidcsipl ccorrelate1d inter f(csipl ccorr1d f * plan,csipl bias bias,void * ref,csipl stride strideref,void * x,csipl stride stridex,void * y,csipl stride stridey,csipl length n);

Compute a real one-dimensional (1D)correlation of two vectors.

voidcsipl ccorrelate1d split f(csipl ccorr1d f * plan,csipl bias bias,float * ref re,float * ref im,csipl stride strideref,float * x re,float * x im,csipl stride stridex,float * y re,float * y im,csipl stride stridey,csipl length n);

Compute a real one-dimensional (1D)correlation of two vectors.

csipl Dcorr2d P *csipl Dcorr2d create P(unsigned int M,unsigned int N,unsigned int P,unsigned int Q,csipl support region support,unsigned int ntimes,csipl alg hint hint);

Create a 2D correlation object.The following instances are supported:

csipl corr2d create fcsipl ccorr2d create f

intcsipl Dcorr2d destroy P(csipl Dcorr2d P * plan);

Destroy a 2D correlation object.The following instances are supported:

csipl corr2d destroy fcsipl ccorr2d destroy f

CSIPL/Brief [3.1] NASoftware 75

Page 94: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

Chapter 7. Signal Processing Functions

Prototype Descriptionvoidcsipl Dcorr2d getattr P(csipl Dcorr2d P * plan,csipl Dcorr2d attr P * attr);

Return the attributes for a 2D correla-tion object.The following instances are supported:

csipl corr2d getattr fcsipl ccorr2d getattr f

voidcsipl correlate2d f(csipl corr2d f * plan,csipl bias bias,float * ref,int ldref,float * x,int ldx,float * y,int ldy,csipl length m,csipl length n);

Compute a two-dimensional (2D) cor-relation of two matrices.

voidcsipl ccorrelate2d inter f(csipl ccorr2d f * plan,csipl bias bias,void * ref,int ldref,void * x,int ldx,void * y,int ldy,csipl length m,csipl length n);

Compute a two-dimensional (2D) cor-relation of two matrices.

voidcsipl ccorrelate2d split f(csipl ccorr2d f * plan,csipl bias bias,float * ref re,float * ref im,int ldref,float * x re,float * x im,int ldx,float * y re,float * y im,int ldy,csipl length m,csipl length n);

Compute a two-dimensional (2D) cor-relation of two matrices.

7.3 Window Functions

Prototype Descriptionfloat *csipl vcreate blackman f(unsigned int N,csipl memory hint hint);

Create a vector with Blackman windowweights.

float *csipl vcreate cheby f(unsigned int N,float ripple,csipl memory hint hint);

Create a vector with Dolph-Chebyshevwindow weights.

CSIPL/Brief [3.1] NASoftware 76

Page 95: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

Chapter 7. Signal Processing Functions

Prototype Descriptionfloat *csipl vcreate hanning f(unsigned int N,csipl memory hint hint);

Create a vector with Hanning windowweights.

float *csipl vcreate kaiser f(unsigned int N,float beta,csipl memory hint hint);

Create a vector with Kaiser windowweights.

7.4 Filter Functions

Prototype Descriptioncsipl fir f *csipl fir create f(float * kernel,csipl stride stridekernel,csipl symmetry symm,unsigned int N,unsigned int D,csipl obj state state,unsigned int ntimes,csipl alg hint hint,csipl length n);

Create a decimated FIR filter object.

csipl cfir f *csipl cfir create inter f(void * kernel,csipl stride stridekernel,csipl symmetry symm,unsigned int N,unsigned int D,csipl obj state state,unsigned int ntimes,csipl alg hint hint,csipl length n);

Create a decimated FIR filter object.

csipl cfir f *csipl cfir create split f(float * kernel re,float * kernel im,csipl stride stridekernel,csipl symmetry symm,unsigned int N,unsigned int D,csipl obj state state,unsigned int ntimes,csipl alg hint hint,csipl length n);

Create a decimated FIR filter object.

intcsipl Dfir destroy P(csipl Dfir P * plan);

Destroy a FIR filter object.The following instances are supported:

csipl fir destroy fcsipl cfir destroy f

intcsipl firflt f(csipl fir f * plan,float * x,csipl stride stridex,float * y,csipl stride stridey,csipl length n);

FIR filter an input sequence and deci-mate the output.

CSIPL/Brief [3.1] NASoftware 77

Page 96: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

Chapter 7. Signal Processing Functions

Prototype Descriptionintcsipl cfirflt inter f(csipl cfir f * plan,void * x,csipl stride stridex,void * y,csipl stride stridey,csipl length n);

FIR filter an input sequence and deci-mate the output.

intcsipl cfirflt split f(csipl cfir f * plan,float * x re,float * x im,csipl stride stridex,float * y re,float * y im,csipl stride stridey,csipl length n);

FIR filter an input sequence and deci-mate the output.

voidcsipl Dfir getattr P(csipl Dfir P * plan,csipl Dfir attr P * attr);

Return the attributes of a FIR filter ob-ject.The following instances are supported:

csipl fir getattr fcsipl cfir getattr f

voidcsipl Dfir reset P(csipl Dfir P * fir);

Reset the state of a decimated FIR fil-ter object.The following instances are supported:

csipl fir reset fcsipl cfir reset f

CSIPL/Brief [3.1] NASoftware 78

Page 97: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

Chapter 7. Signal Processing Functions

7.5 Miscellaneous Signal Processing Functions

Prototype Descriptionvoidcsipl vhisto f(float * A,csipl stride strideA,float min,float max,csipl hist opt opt,float * R,csipl stride strideR,csipl length n);

Compute the histogram of a vector.

CSIPL/Brief [3.1] NASoftware 79

Page 98: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

Chapter 8. Linear Algebra

8.1 Matrix and Vector Operations

Prototype Descriptionvoidcsipl cmherm inter f(void * A,int ldA,void * R,int ldR,csipl length m,csipl length n);

Complex Hermitian (conjugate trans-pose) of a matrix.

voidcsipl cmherm split f(float * A re,float * A im,int ldA,float * R re,float * R im,int ldR,csipl length m,csipl length n);

Complex Hermitian (conjugate trans-pose) of a matrix.

csipl cscalar fcsipl cvjdot inter f(void * A,csipl stride strideA,void * B,csipl stride strideB,csipl length n);

Compute the conjugate inner (dot)product of two complex vectors.

csipl cscalar fcsipl cvjdot split f(float * A re,float * A im,csipl stride strideA,float * B re,float * B im,csipl stride strideB,csipl length n);

Compute the conjugate inner (dot)product of two complex vectors.

voidcsipl gemp f(float alpha,float * A,int ldA,csipl mat op Aop,float * B,int ldB,csipl mat op Bop,float beta,float * R,int ldR,csipl length m,csipl length n,csipl length p);

Calculate the general product of twomatrices and accumulate.

CSIPL/Brief [3.1] NASoftware 80

Page 99: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

Chapter 8. Linear Algebra

Prototype Descriptionvoidcsipl cgemp inter f(csipl cscalar f alpha,void * A,int ldA,csipl mat op Aop,void * B,int ldB,csipl mat op Bop,csipl cscalar f beta,void * R,int ldR,csipl length m,csipl length n,csipl length p);

Calculate the general product of twomatrices and accumulate.

voidcsipl cgemp split f(csipl cscalar f alpha re,csipl cscalar f alpha im,float * A re,float * A im,int ldA,csipl mat op Aop,float * B re,float * B im,int ldB,csipl mat op Bop,csipl cscalar f beta re,csipl cscalar f beta im,float * R re,float * R im,int ldR,csipl length m,csipl length n,csipl length p);

Calculate the general product of twomatrices and accumulate.

voidcsipl gems f(float alpha,float * A,int ldA,csipl mat op Aop,float beta,float * C,int ldC,csipl length m,csipl length n);

Calculate a general matrix sum.

voidcsipl cgems inter f(csipl cscalar f alpha,void * A,int ldA,csipl mat op Aop,csipl cscalar f beta,void * C,int ldC,csipl length m,csipl length n);

Calculate a general matrix sum.

CSIPL/Brief [3.1] NASoftware 81

Page 100: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

Chapter 8. Linear Algebra

Prototype Descriptionvoidcsipl cgems split f(csipl cscalar f alpha re,csipl cscalar f alpha im,float * A re,float * A im,int ldA,csipl mat op Aop,csipl cscalar f beta re,csipl cscalar f beta im,float * C re,float * C im,int ldC,csipl length m,csipl length n);

Calculate a general matrix sum.

voidcsipl mprod P(scalar P * A,int ldA,scalar P * B,int ldB,scalar P * R,int ldR,csipl length m,csipl length n,csipl length p);

Calculate the product of two matrices.The following instances are supported:

csipl mprod fcsipl mprod icsipl mprod si

voidcsipl cmprod inter P(void * A,int ldA,void * B,int ldB,void * R,int ldR,csipl length m,csipl length n,csipl length p);

Calculate the product of two matrices.The following instances are supported:

csipl cmprod inter fcsipl cmprod inter icsipl cmprod inter si

voidcsipl cmprod split P(scalar P * A re,scalar P * A im,int ldA,scalar P * B re,scalar P * B im,int ldB,scalar P * R re,scalar P * R im,int ldR,csipl length m,csipl length n,csipl length p);

Calculate the product of two matrices.The following instances are supported:

csipl cmprod split fcsipl cmprod split icsipl cmprod split si

voidcsipl cmprodh inter P(void * A,int ldA,void * B,int ldB,void * R,int ldR,csipl length m,csipl length n,csipl length p);

Calculate the product a complex ma-trix and the Hermitian of a complexmatrix.The following instances are supported:

csipl cmprodh inter fcsipl cmprodh inter icsipl cmprodh inter si

CSIPL/Brief [3.1] NASoftware 82

Page 101: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

Chapter 8. Linear Algebra

Prototype Descriptionvoidcsipl cmprodh split P(scalar P * A re,scalar P * A im,int ldA,scalar P * B re,scalar P * B im,int ldB,scalar P * R re,scalar P * R im,int ldR,csipl length m,csipl length n,csipl length p);

Calculate the product a complex ma-trix and the Hermitian of a complexmatrix.The following instances are supported:

csipl cmprodh split fcsipl cmprodh split icsipl cmprodh split si

voidcsipl cmprodj inter P(void * A,int ldA,void * B,int ldB,void * R,int ldR,csipl length m,csipl length n,csipl length p);

Calculate the product a complex ma-trix and the conjugate of a complex ma-trix.The following instances are supported:

csipl cmprodj inter fcsipl cmprodj inter icsipl cmprodj inter si

voidcsipl cmprodj split P(scalar P * A re,scalar P * A im,int ldA,scalar P * B re,scalar P * B im,int ldB,scalar P * R re,scalar P * R im,int ldR,csipl length m,csipl length n,csipl length p);

Calculate the product a complex ma-trix and the conjugate of a complex ma-trix.The following instances are supported:

csipl cmprodj split fcsipl cmprodj split icsipl cmprodj split si

voidcsipl mprodt P(scalar P * A,int ldA,scalar P * B,int ldB,scalar P * R,int ldR,csipl length m,csipl length n,csipl length p);

Calculate the product of a matrix andthe transpose of a matrix.The following instances are supported:

csipl mprodt fcsipl mprodt icsipl mprodt si

voidcsipl cmprodt inter P(void * A,int ldA,void * B,int ldB,void * R,int ldR,csipl length m,csipl length n,csipl length p);

Calculate the product of a matrix andthe transpose of a matrix.The following instances are supported:

csipl cmprodt inter fcsipl cmprodt inter icsipl cmprodt inter si

CSIPL/Brief [3.1] NASoftware 83

Page 102: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

Chapter 8. Linear Algebra

Prototype Descriptionvoidcsipl cmprodt split P(scalar P * A re,scalar P * A im,int ldA,scalar P * B re,scalar P * B im,int ldB,scalar P * R re,scalar P * R im,int ldR,csipl length m,csipl length n,csipl length p);

Calculate the product of a matrix andthe transpose of a matrix.The following instances are supported:

csipl cmprodt split fcsipl cmprodt split icsipl cmprodt split si

voidcsipl mvprod P(scalar P * A,int ldA,scalar P * X,csipl stride strideX,scalar P * Y,csipl stride strideY,csipl length m,csipl length n);

Calculate a matrix–vector product.The following instances are supported:

csipl mvprod fcsipl mvprod icsipl mvprod si

voidcsipl cmvprod inter P(void * A,int ldA,void * X,csipl stride strideX,void * Y,csipl stride strideY,csipl length m,csipl length n);

Calculate a matrix–vector product.The following instances are supported:

csipl cmvprod inter fcsipl cmvprod inter icsipl cmvprod inter si

voidcsipl cmvprod split P(scalar P * A re,scalar P * A im,int ldA,scalar P * X re,scalar P * X im,csipl stride strideX,scalar P * Y re,scalar P * Y im,csipl stride strideY,csipl length m,csipl length n);

Calculate a matrix–vector product.The following instances are supported:

csipl cmvprod split fcsipl cmvprod split icsipl cmvprod split si

voidcsipl mtrans P(scalar P * A,int ldA,scalar P * R,int ldR,csipl length m,csipl length n);

Transpose a matrix.The following instances are supported:

csipl mtrans blcsipl mtrans fcsipl mtrans icsipl mtrans si

voidcsipl cmtrans inter P(void * A,int ldA,void * R,int ldR,csipl length m,csipl length n);

Transpose a matrix.The following instances are supported:

csipl cmtrans inter fcsipl cmtrans inter icsipl cmtrans inter si

CSIPL/Brief [3.1] NASoftware 84

Page 103: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

Chapter 8. Linear Algebra

Prototype Descriptionvoidcsipl cmtrans split P(scalar P * A re,scalar P * A im,int ldA,scalar P * R re,scalar P * R im,int ldR,csipl length m,csipl length n);

Transpose a matrix.The following instances are supported:

csipl cmtrans split fcsipl cmtrans split icsipl cmtrans split si

floatcsipl vdot f(float * A,csipl stride strideA,float * B,csipl stride strideB,csipl length n);

Compute the inner (dot) product oftwo vectors.

csipl cscalar fcsipl cvdot inter f(void * A,csipl stride strideA,void * B,csipl stride strideB,csipl length n);

Compute the inner (dot) product oftwo vectors.

csipl cscalar fcsipl cvdot split f(float * A re,float * A im,csipl stride strideA,float * B re,float * B im,csipl stride strideB,csipl length n);

Compute the inner (dot) product oftwo vectors.

voidcsipl vmprod P(scalar P * X,csipl stride strideX,scalar P * A,int ldA,scalar P * Y,csipl stride strideY,csipl length m,csipl length n);

Calculate a vector–matrix product.The following instances are supported:

csipl vmprod fcsipl vmprod icsipl vmprod si

voidcsipl cvmprod inter P(void * X,csipl stride strideX,void * A,int ldA,void * Y,csipl stride strideY,csipl length m,csipl length n);

Calculate a vector–matrix product.The following instances are supported:

csipl cvmprod inter fcsipl cvmprod inter icsipl cvmprod inter si

CSIPL/Brief [3.1] NASoftware 85

Page 104: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

Chapter 8. Linear Algebra

Prototype Descriptionvoidcsipl cvmprod split P(scalar P * X re,scalar P * X im,csipl stride strideX,scalar P * A re,scalar P * A im,int ldA,scalar P * Y re,scalar P * Y im,csipl stride strideY,csipl length m,csipl length n);

Calculate a vector–matrix product.The following instances are supported:

csipl cvmprod split fcsipl cvmprod split icsipl cvmprod split si

voidcsipl vouter f(float alpha,float * X,csipl stride strideX,float * Y,csipl stride strideY,float * R,int ldR,csipl length m,csipl length n);

Calculate the outer product of two vec-tors.

voidcsipl cvouter inter f(csipl cscalar f alpha,void * X,csipl stride strideX,void * Y,csipl stride strideY,void * R,int ldR,csipl length m,csipl length n);

Calculate the outer product of two vec-tors.

voidcsipl cvouter split f(csipl cscalar f alpha re,csipl cscalar f alpha im,float * X re,float * X im,csipl stride strideX,float * Y re,float * Y im,csipl stride strideY,float * R re,float * R im,int ldR,csipl length m,csipl length n);

Calculate the outer product of two vec-tors.

floatcsipl vcsummgval inter f(void * A,csipl stride strideA,csipl length n);

Returns the sum of the magnitudes ofthe elements of a complex vector.

floatcsipl vcsummgval split f(float * A re,float * A im,csipl stride strideA,csipl length n);

Returns the sum of the magnitudes ofthe elements of a complex vector.

CSIPL/Brief [3.1] NASoftware 86

Page 105: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

Chapter 8. Linear Algebra

Prototype Descriptionvoidcsipl minvlu f(float * A,int ldA,signed int * V,csipl stride strideV,float * R,int ldR,csipl length n);

Invert a square matrix using LU de-composition.

voidcsipl cminvlu inter f(void * A,int ldA,signed int * V,csipl stride strideV,void * R,int ldR,csipl length n);

Invert a square matrix using LU de-composition.

voidcsipl cminvlu split f(float * A re,float * A im,int ldA,signed int * V,csipl stride strideV,float * R re,float * R im,int ldR,csipl length n);

Invert a square matrix using LU de-composition.

CSIPL/Brief [3.1] NASoftware 87

Page 106: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

Chapter 8. Linear Algebra

8.2 Special Linear System Solvers

Prototype Descriptionintcsipl covsol f(float * A,int ldA,float * XB,int ldXB,csipl length m,csipl length n,csipl length p);

Solve a covariance linear system prob-lem.

intcsipl ccovsol inter f(void * A,int ldA,void * XB,int ldXB,csipl length m,csipl length n,csipl length p);

Solve a covariance linear system prob-lem.

intcsipl ccovsol split f(float * A re,float * A im,int ldA,float * XB re,float * XB im,int ldXB,csipl length m,csipl length n,csipl length p);

Solve a covariance linear system prob-lem.

intcsipl llsqsol f(float * A,int ldA,float * XB,int ldXB,csipl length m,csipl length n,csipl length p);

Solve a linear least squares problem.

intcsipl cllsqsol inter f(void * A,int ldA,void * XB,int ldXB,csipl length m,csipl length n,csipl length p);

Solve a linear least squares problem.

intcsipl cllsqsol split f(float * A re,float * A im,int ldA,float * XB re,float * XB im,int ldXB,csipl length m,csipl length n,csipl length p);

Solve a linear least squares problem.

CSIPL/Brief [3.1] NASoftware 88

Page 107: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

Chapter 8. Linear Algebra

Prototype Descriptionintcsipl toepsol f(float * T,csipl stride strideT,float * B,csipl stride strideB,float * W,csipl stride strideW,float * X,csipl stride strideX,csipl length n);

Solve a real symmetric positive definiteToeplitz linear system.

intcsipl ctoepsol inter f(void * T,csipl stride strideT,void * B,csipl stride strideB,void * W,csipl stride strideW,void * X,csipl stride strideX,csipl length n);

Solve a real symmetric positive definiteToeplitz linear system.

intcsipl ctoepsol split f(float * T re,float * T im,csipl stride strideT,float * B re,float * B im,csipl stride strideB,float * W re,float * W im,csipl stride strideW,float * X re,float * X im,csipl stride strideX,csipl length n);

Solve a real symmetric positive definiteToeplitz linear system.

8.3 General Square Linear System Solver

Prototype Descriptionintcsipl lud f(csipl clu f * lud,float * A,int ldA,csipl length n);

Compute an LU decomposition of asquare matrix using partial pivoting.

intcsipl clud inter f(csipl clu f * lud,void * A,int ldA,csipl length n);

Compute an LU decomposition of asquare matrix using partial pivoting.

intcsipl clud split f(csipl clu f * lud,float * A re,float * A im,int ldA,csipl length n);

Compute an LU decomposition of asquare matrix using partial pivoting.

CSIPL/Brief [3.1] NASoftware 89

Page 108: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

Chapter 8. Linear Algebra

Prototype Descriptioncsipl Dlu P *csipl Dlud create P(unsigned int N);

Create an LU decomposition object.The following instances are supported:

csipl lud create fcsipl clud create f

intcsipl Dlud destroy P(csipl Dlu P * lud);

Destroy an LU decomposition object.The following instances are supported:

csipl lud destroy fcsipl clud destroy f

voidcsipl Dlud getattr P(csipl Dlu P * lud,csipl Dlu attr P * attr);

Returns the attributes of an LU decom-position object.The following instances are supported:

csipl lud getattr fcsipl clud getattr f

intcsipl lusol f(csipl clu f * clud,csipl mat op opA,float * XB,int ldXB,csipl length m,csipl length n);

Solve a square linear system.

intcsipl clusol inter f(csipl clu f * clud,csipl mat op opA,void * XB,int ldXB,csipl length m,csipl length n);

Solve a square linear system.

intcsipl clusol split f(csipl clu f * clud re,csipl clu f * clud im,csipl mat op opA,float * XB re,float * XB im,int ldXB,csipl length m,csipl length n);

Solve a square linear system.

8.4 Symmetric Positive Definite Linear System Solver

Prototype Descriptionintcsipl chold f(csipl cchol f * chold,float * A,int ldA,csipl length n);

Compute a Cholesky decomposition ofa symmetric positive definite matrix.

intcsipl cchold inter f(csipl cchol f * chold,void * A,int ldA,csipl length n);

Compute a Cholesky decomposition ofa symmetric positive definite matrix.

CSIPL/Brief [3.1] NASoftware 90

Page 109: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

Chapter 8. Linear Algebra

Prototype Descriptionintcsipl cchold split f(csipl cchol f * chold,float * A re,float * A im,int ldA,csipl length n);

Compute a Cholesky decomposition ofa symmetric positive definite matrix.

csipl chol f *csipl chold create f(csipl mat uplo uplo,unsigned int n);

Creates a Cholesky decomposition ob-ject.

csipl cchol f *csipl cchold create f(csipl mat uplo uplo,unsigned int n);

Creates a Cholesky decomposition ob-ject.

intcsipl Dchold destroy P(csipl Dchol P * chold);

Destroy a Cholesky decomposition ob-ject.The following instances are supported:

csipl chold destroy fcsipl cchold destroy f

voidcsipl Dchold getattr P(csipl Dchol P * chold,csipl Dchol attr P * attr);

Returns the attributes of a Choleskydecomposition object.The following instances are supported:

csipl chold getattr fcsipl cchold getattr f

intcsipl cholsol f(csipl cchol f * chold,float * XB,int ldXB,csipl length m,csipl length n);

Solve a symmetric positive definite lin-ear system.

intcsipl ccholsol inter f(csipl cchol f * chold,void * XB,int ldXB,csipl length m,csipl length n);

Solve a symmetric positive definite lin-ear system.

intcsipl ccholsol split f(csipl cchol f * chold,float * XB re,float * XB im,int ldXB,csipl length m,csipl length n);

Solve a symmetric positive definite lin-ear system.

8.5 Overdetermined Linear System Solver

Prototype Descriptionintcsipl qrd f(csipl cqr f * qrd,float * A,int ldA,csipl length m,csipl length n);

Compute a QR decomposition of a ma-trix .

CSIPL/Brief [3.1] NASoftware 91

Page 110: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

Chapter 8. Linear Algebra

Prototype Descriptionintcsipl cqrd inter f(csipl cqr f * qrd,void * A,int ldA,csipl length m,csipl length n);

Compute a QR decomposition of a ma-trix .

intcsipl cqrd split f(csipl cqr f * qrd,float * A re,float * A im,int ldA,csipl length m,csipl length n);

Compute a QR decomposition of a ma-trix .

csipl qr f *csipl qrd create f(unsigned int m,unsigned int n,csipl qrd qopt qopt);

Create a QR decomposition object.

csipl cqr f *csipl cqrd create f(unsigned int m,unsigned int n,csipl qrd qopt qopt);

Create a QR decomposition object.

intcsipl Dqrd destroy P(csipl Dqr P * qrd);

Destroy a QR decomposition object.The following instances are supported:

csipl qrd destroy fcsipl cqrd destroy f

voidcsipl Dqrd getattr P(csipl Dqr P * qrd,csipl Dqr attr P * attr);

Returns the attributes of a QR decom-position object.The following instances are supported:

csipl qrd getattr fcsipl cqrd getattr f

intcsipl qrdprodq f(csipl qr f * qrd,csipl mat op opQ,csipl mat side apQ,float * C,int ldC,csipl length m,csipl length n);

Multiply a matrix by the matrix Qfrom a QR decomposition.

intcsipl cqrdprodq inter f(csipl cqr f * qrd,csipl mat op opQ,csipl mat side apQ,void * C,int ldC,csipl length m,csipl length n);

Multiply a matrix by the matrix Qfrom a QR decomposition.

CSIPL/Brief [3.1] NASoftware 92

Page 111: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

Chapter 8. Linear Algebra

Prototype Descriptionintcsipl cqrdprodq split f(csipl cqr f * qrd re,csipl cqr f * qrd im,csipl mat op opQ,csipl mat side apQ,float * C re,float * C im,int ldC,csipl length m,csipl length n);

Multiply a matrix by the matrix Qfrom a QR decomposition.

intcsipl qrdsolr f(csipl qr f * qrd,csipl mat op OpR,float alpha,float * XB,int ldXB,csipl length m,csipl length n);

Solve linear system based on the ma-trix R, from QR decomposition of thematrix A.

intcsipl cqrdsolr inter f(csipl cqr f * qrd,csipl mat op OpR,csipl cscalar f alpha,void * XB,int ldXB,csipl length m,csipl length n);

Solve linear system based on the ma-trix R, from QR decomposition of thematrix A.

intcsipl cqrdsolr split f(csipl cqr f * qrd re,csipl cqr f * qrd im,csipl mat op OpR,csipl cscalar f alpha re,csipl cscalar f alpha im,float * XB re,float * XB im,int ldXB,csipl length m,csipl length n);

Solve linear system based on the ma-trix R, from QR decomposition of thematrix A.

intcsipl qrsol f(csipl qr f * qrd,csipl qrd prob prob,float * XB,int ldXB,csipl length m,csipl length n);

Solve either a linear covariance or linearleast squares problem.

intcsipl cqrsol inter f(csipl cqr f * qrd,csipl qrd prob prob,void * XB,int ldXB,csipl length m,csipl length n);

Solve either a linear covariance or linearleast squares problem.

CSIPL/Brief [3.1] NASoftware 93

Page 112: CSIPL/Brief [3.1]csipl cstorage. . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 4 Scalar Functions12 4.1 Real Scalar Functions

Chapter 8. Linear Algebra

Prototype Descriptionintcsipl cqrsol split f(csipl cqr f * qrd re,csipl cqr f * qrd im,csipl qrd prob prob,void * XB,int ldXB,csipl length m,csipl length n);

Solve either a linear covariance or linearleast squares problem.

CSIPL/Brief [3.1] NASoftware 94