vsipl/content [3.1] · vsip vdestroy mi vsipl/content [3.1] nasoftware 4. chapter 1. support...

53
VSIPL List of Contents VSIPL/Content [3.1] Release 3.1 May 2013

Upload: others

Post on 23-Jan-2021

6 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: VSIPL/Content [3.1] · vsip vdestroy mi VSIPL/Content [3.1] NASoftware 4. Chapter 1. Support Functions Prototype Description vsip Dscalar P vsip Dvget P(constvsip Dvview P*vector,

VSIPLList of Contents

VSIPL/Content [3.1]

Release 3.1May 2013

Page 2: VSIPL/Content [3.1] · vsip vdestroy mi VSIPL/Content [3.1] NASoftware 4. Chapter 1. Support Functions Prototype Description vsip Dscalar P vsip Dvget P(constvsip Dvview P*vector,

Chapter 1. Support Functions

1.1 Initilialisation and Finalisation

Prototype Descriptionintvsip init(void * ptr);

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

intvsip finalize(void * ptr);

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

voidThread SetParams(vsip length num threads,vsip length max num running);

Allows the library to allocate a numberof threads.

1.2 Array and Block Functions

Prototype Descriptionintvsip Dblockadmit P(vsip Dblock P * block,vsip scalar bl update);

Admit a data block for VSIPL opera-tions.The following instances are supported:

vsip blockadmit fvsip blockadmit ivsip blockadmit sivsip cblockadmit fvsip cblockadmit ivsip cblockadmit sivsip blockadmit blvsip blockadmit vivsip blockadmit mi

vsip block P *vsip blockbind P(vsip scalar P * user data,vsip length num items,vsip memory hint hint);

Create and bind a VSIPL block to auser-allocated data array.The following instances are supported:

vsip blockbind fvsip blockbind ivsip blockbind sivsip blockbind blvsip blockbind vivsip blockbind mi

vsip cblock P *vsip cblockbind P(vsip scalar P * user data1,vsip scalar P * user data2,vsip length num items,vsip memory hint hint);

Create and bind a VSIPL complexblock to a user-allocated data array.The following instances are supported:

vsip cblockbind fvsip cblockbind ivsip cblockbind si

VSIPL/Content [3.1] NASoftware 1

Page 3: VSIPL/Content [3.1] · vsip vdestroy mi VSIPL/Content [3.1] NASoftware 4. Chapter 1. Support Functions Prototype Description vsip Dscalar P vsip Dvget P(constvsip Dvview P*vector,

Chapter 1. Support Functions

Prototype Descriptionvsip Dblock P *vsip Dblockcreate P(vsip length num items,vsip memory hint hint);

Creates a VSIPL block and binds a(VSIPL-allocated) data array to it.The following instances are supported:

vsip blockcreate fvsip blockcreate ivsip blockcreate sivsip cblockcreate fvsip cblockcreate ivsip cblockcreate sivsip blockcreate blvsip blockcreate vivsip blockcreate mi

voidvsip Dblockdestroy P(vsip Dblock P * block);

Destroy a VSIPL block object and anymemory allocated for it by VSIPL.The following instances are supported:

vsip blockdestroy fvsip blockdestroy ivsip blockdestroy sivsip cblockdestroy fvsip cblockdestroy ivsip cblockdestroy sivsip blockdestroy blvsip blockdestroy vivsip blockdestroy mi

vsip scalar P *vsip blockfind P(const vsip block P * block);

Find the pointer to the data bound toa VSIPL released block object.The following instances are supported:

vsip blockfind fvsip blockfind ivsip blockfind sivsip blockfind blvsip blockfind vivsip blockfind mi

voidvsip cblockfind P(const vsip cblock P * block,vsip scalar P ** user data1,vsip scalar P ** user data2);

Find the pointer(s) to the data boundto a VSIPL released complex block ob-ject.The following instances are supported:

vsip cblockfind fvsip cblockfind ivsip cblockfind si

vsip scalar P *vsip blockrebind P(vsip block P * block,vsip scalar P * new data);

Rebind a VSIPL block to user-specifieddata.The following instances are supported:

vsip blockrebind fvsip blockrebind ivsip blockrebind sivsip blockrebind blvsip blockrebind vivsip blockrebind mi

VSIPL/Content [3.1] NASoftware 2

Page 4: VSIPL/Content [3.1] · vsip vdestroy mi VSIPL/Content [3.1] NASoftware 4. Chapter 1. Support Functions Prototype Description vsip Dscalar P vsip Dvget P(constvsip Dvview P*vector,

Chapter 1. Support Functions

Prototype Descriptionvoidvsip cblockrebind P(vsip cblock P * block,vsip scalar P * new data1,vsip scalar P * new data2,vsip scalar P ** old data1,vsip scalar P ** old data2);

Rebind a VSIPL complex block to user-specified data.The following instances are supported:

vsip cblockrebind fvsip cblockrebind ivsip cblockrebind si

vsip scalar P *vsip blockrelease P(vsip block P * block,vsip scalar bl update);

Release a VSIPL block for direct useraccess.The following instances are supported:

vsip blockrelease fvsip blockrelease ivsip blockrelease sivsip blockrelease blvsip blockrelease vivsip blockrelease mi

voidvsip cblockrelease P(vsip cblock P * block,vsip scalar bl update,vsip scalar P ** user data1,vsip scalar P ** user data2);

Release a complex block from VSIPLfor direct user access.The following instances are supported:

vsip cblockrelease fvsip cblockrelease ivsip cblockrelease si

voidvsip complete(void);

Force all deferred VSIPL execution tocomplete.

vsip cmplx memvsip cstorage(void);

Returns the preferred complex storageformat for the system.

1.3 Vector View Functions

Prototype Descriptionvoidvsip Dvalldestroy P(vsip Dvview P * vector);

Destroy a vector, its associated block,and any VSIPL data array bound tothe block.The following instances are supported:

vsip valldestroy fvsip valldestroy ivsip valldestroy sivsip cvalldestroy fvsip cvalldestroy ivsip cvalldestroy sivsip valldestroy blvsip valldestroy vivsip valldestroy mi

VSIPL/Content [3.1] NASoftware 3

Page 5: VSIPL/Content [3.1] · vsip vdestroy mi VSIPL/Content [3.1] NASoftware 4. Chapter 1. Support Functions Prototype Description vsip Dscalar P vsip Dvget P(constvsip Dvview P*vector,

Chapter 1. Support Functions

Prototype Descriptionvsip Dvview P *vsip Dvbind P(vsip Dblock P * block,vsip offset offset,vsip stride stride,vsip length length);

Create a vector view object and bind itto a block object.The following instances are supported:

vsip vbind fvsip vbind ivsip vbind sivsip cvbind fvsip cvbind ivsip cvbind sivsip vbind blvsip vbind vivsip vbind mi

vsip Dvview P *vsip Dvcloneview P(const vsip Dvview P * vector);

Create a clone of a vector view.The following instances are supported:

vsip vcloneview fvsip vcloneview ivsip vcloneview sivsip cvcloneview fvsip cvcloneview ivsip cvcloneview sivsip vcloneview blvsip vcloneview vivsip vcloneview mi

vsip Dvview P *vsip Dvcreate P(vsip length length,vsip memory hint hint);

Creates a block object and a vectorview object of the block.The following instances are supported:

vsip vcreate fvsip vcreate ivsip vcreate sivsip cvcreate fvsip cvcreate ivsip cvcreate sivsip vcreate blvsip vcreate vivsip vcreate mi

vsip Dblock P *vsip Dvdestroy P(vsip Dvview P * vector);

Destroy a vector view object and re-turn a pointer to the associated blockobject.The following instances are supported:

vsip vdestroy fvsip vdestroy ivsip vdestroy sivsip cvdestroy fvsip cvdestroy ivsip cvdestroy sivsip vdestroy blvsip vdestroy vivsip vdestroy mi

VSIPL/Content [3.1] NASoftware 4

Page 6: VSIPL/Content [3.1] · vsip vdestroy mi VSIPL/Content [3.1] NASoftware 4. Chapter 1. Support Functions Prototype Description vsip Dscalar P vsip Dvget P(constvsip Dvview P*vector,

Chapter 1. Support Functions

Prototype Descriptionvsip Dscalar Pvsip Dvget P(const vsip Dvview P * vector,vsip index j);

Get the value of a specified element ofa vector view object.The following instances are supported:

vsip vget fvsip vget ivsip vget sivsip cvget fvsip cvget ivsip cvget sivsip vget blvsip vget vivsip vget mi

voidvsip Dvgetattrib P(const vsip Dvview P * vector,vsip Dvattr P * attr);

Return the attributes of a vector viewobject.The following instances are supported:

vsip vgetattrib fvsip vgetattrib ivsip vgetattrib sivsip cvgetattrib fvsip cvgetattrib ivsip cvgetattrib sivsip vgetattrib blvsip vgetattrib vivsip vgetattrib mi

vsip Dblock P *vsip Dvgetblock P(const vsip Dvview P * vector);

Get the block attribute of a vector viewobject.The following instances are supported:

vsip vgetblock fvsip vgetblock ivsip vgetblock sivsip cvgetblock fvsip cvgetblock ivsip cvgetblock sivsip vgetblock blvsip vgetblock vivsip vgetblock mi

vsip lengthvsip Dvgetlength P(const vsip Dvview P * vector);

Get the length attribute of a vectorview object.The following instances are supported:

vsip vgetlength fvsip vgetlength ivsip vgetlength sivsip cvgetlength fvsip cvgetlength ivsip cvgetlength sivsip vgetlength blvsip vgetlength vivsip vgetlength mi

VSIPL/Content [3.1] NASoftware 5

Page 7: VSIPL/Content [3.1] · vsip vdestroy mi VSIPL/Content [3.1] NASoftware 4. Chapter 1. Support Functions Prototype Description vsip Dscalar P vsip Dvget P(constvsip Dvview P*vector,

Chapter 1. Support Functions

Prototype Descriptionvsip offsetvsip Dvgetoffset P(const vsip Dvview P * vector);

Get the offset attribute of a vector viewobject.The following instances are supported:

vsip vgetoffset fvsip vgetoffset ivsip vgetoffset sivsip cvgetoffset fvsip cvgetoffset ivsip cvgetoffset sivsip vgetoffset blvsip vgetoffset vivsip vgetoffset mi

vsip stridevsip Dvgetstride P(const vsip Dvview P * vector);

Get the stride attribute of a vector viewobject.The following instances are supported:

vsip vgetstride fvsip vgetstride ivsip vgetstride sivsip cvgetstride fvsip cvgetstride ivsip cvgetstride sivsip vgetstride blvsip vgetstride vivsip vgetstride mi

vsip vview P *vsip vimagview P(const vsip cvview P *complex vector);

Create a vector view object of theimaginary part of a complex vectorfrom a complex vector view object.The following instances are supported:

vsip vimagview fvsip vimagview ivsip vimagview si

voidvsip Dvput P(vsip Dvview P * vector,vsip index j,vsip Dscalar P value);

Set the value of a specified element ofa vector view object.The following instances are supported:

vsip vput fvsip vput ivsip vput sivsip cvput fvsip cvput ivsip cvput sivsip vput blvsip vput vivsip vput mi

vsip Dvview P *vsip Dvputattrib P(vsip Dvview P * ve3tor,const vsip Dvattr P * attr);

Set the attributes of a vector view ob-ject.The following instances are supported:

vsip vputattrib fvsip vputattrib ivsip vputattrib sivsip cvputattrib fvsip cvputattrib ivsip cvputattrib sivsip vputattrib blvsip vputattrib vivsip vputattrib mi

VSIPL/Content [3.1] NASoftware 6

Page 8: VSIPL/Content [3.1] · vsip vdestroy mi VSIPL/Content [3.1] NASoftware 4. Chapter 1. Support Functions Prototype Description vsip Dscalar P vsip Dvget P(constvsip Dvview P*vector,

Chapter 1. Support Functions

Prototype Descriptionvsip Dvview P *vsip Dvputlength P(vsip Dvview P * vector,vsip length length);

Set the length attribute of a vector viewobject.The following instances are supported:

vsip vputlength fvsip vputlength ivsip vputlength sivsip cvputlength fvsip cvputlength ivsip cvputlength sivsip vputlength blvsip vputlength vivsip vputlength mi

vsip Dvview P *vsip Dvputoffset P(vsip Dvview P * vector,vsip offset offset);

Set the offset attribute of a vector viewobject.The following instances are supported:

vsip vputoffset fvsip vputoffset ivsip vputoffset sivsip cvputoffset fvsip cvputoffset ivsip cvputoffset sivsip vputoffset blvsip vputoffset vivsip vputoffset mi

vsip Dvview P *vsip Dvputstride P(vsip Dvview P * vector,vsip stride stride);

Set the stride attribute of a vector viewobject.The following instances are supported:

vsip vputstride fvsip vputstride ivsip vputstride sivsip cvputstride fvsip cvputstride ivsip cvputstride sivsip vputstride blvsip vputstride vivsip vputstride mi

vsip vview P *vsip vrealview P(const vsip cvview P *complex vector);

Create a vector view object of the realpart of a complex vector from a com-plex vector view object.The following instances are supported:

vsip vrealview fvsip vrealview ivsip vrealview si

vsip Dvview P *vsip Dvsubview P(const vsip Dvview P * vector,vsip index j,vsip length n);

Create a vector view object that is asubview of a vector view object.The following instances are supported:

vsip vsubview fvsip vsubview ivsip vsubview sivsip cvsubview fvsip cvsubview ivsip cvsubview sivsip vsubview blvsip vsubview vivsip vsubview mi

VSIPL/Content [3.1] NASoftware 7

Page 9: VSIPL/Content [3.1] · vsip vdestroy mi VSIPL/Content [3.1] NASoftware 4. Chapter 1. Support Functions Prototype Description vsip Dscalar P vsip Dvget P(constvsip Dvview P*vector,

Chapter 1. Support Functions

1.4 Matrix View Functions

Prototype Descriptionvoidvsip Dmalldestroy P(vsip Dmview P * matrix);

Destroy a matrix, its associated block,and any VSIPL data array bound tothe block.The following instances are supported:

vsip malldestroy fvsip malldestroy ivsip malldestroy sivsip cmalldestroy fvsip cmalldestroy ivsip cmalldestroy sivsip malldestroy bl

vsip Dmview P *vsip Dmbind P(vsip Dblock P * block,vsip offset offset,vsip stride col stride,vsip length col length,vsip stride row stride,vsip length row length);

Create a matrix view object and bindit to a block object.The following instances are supported:

vsip mbind fvsip mbind ivsip mbind sivsip cmbind fvsip cmbind ivsip cmbind sivsip mbind bl

vsip Dmview P *vsip Dmcloneview P(const vsip Dmview P * matrix);

Create a clone of a matrix view.The following instances are supported:

vsip mcloneview fvsip mcloneview ivsip mcloneview sivsip cmcloneview fvsip cmcloneview ivsip cmcloneview sivsip mcloneview bl

vsip Dvview P *vsip Dmcolview P(const vsip Dmview P * matrix,vsip index j);

Create a vector view object of a spec-ified column of the source matrix viewobject.The following instances are supported:

vsip mcolview fvsip mcolview ivsip mcolview sivsip cmcolview fvsip cmcolview ivsip cmcolview sivsip mcolview bl

vsip Dmview P *vsip Dmcreate P(vsip length col length,vsip length row length,vsip major rc,vsip memory hint hint);

Creates a block object and matrix viewobject of the block.The following instances are supported:

vsip mcreate fvsip mcreate ivsip mcreate sivsip cmcreate fvsip cmcreate ivsip cmcreate sivsip mcreate bl

VSIPL/Content [3.1] NASoftware 8

Page 10: VSIPL/Content [3.1] · vsip vdestroy mi VSIPL/Content [3.1] NASoftware 4. Chapter 1. Support Functions Prototype Description vsip Dscalar P vsip Dvget P(constvsip Dvview P*vector,

Chapter 1. Support Functions

Prototype Descriptionvsip Dblock P *vsip Dmdestroy P(vsip Dmview P * matrix);

Destroy a matrix view object and re-turns a pointer to the associated blockobject.The following instances are supported:

vsip mdestroy fvsip mdestroy ivsip mdestroy sivsip cmdestroy fvsip cmdestroy ivsip cmdestroy sivsip mdestroy bl

vsip Dvview P *vsip Dmdiagview P(const vsip Dmview P * matrix,vsip stride index);

Create a vector view object of a matrixdiagonal of a matrix view object.The following instances are supported:

vsip mdiagview fvsip mdiagview ivsip mdiagview sivsip cmdiagview fvsip cmdiagview ivsip cmdiagview sivsip mdiagview bl

vsip Dscalar Pvsip Dmget P(const vsip Dmview P * matrix,vsip index i,vsip index j);

Get the value of a specified element ofa matrix view object.The following instances are supported:

vsip mget fvsip mget ivsip mget sivsip cmget fvsip cmget ivsip cmget sivsip mget bl

voidvsip Dmgetattrib P(const vsip Dmview P * matrix,vsip Dmattr P * attr);

Get the attributes of a matrix view ob-ject.The following instances are supported:

vsip mgetattrib fvsip mgetattrib ivsip mgetattrib sivsip cmgetattrib fvsip cmgetattrib ivsip cmgetattrib sivsip mgetattrib bl

vsip Dblock P *vsip Dmgetblock P(const vsip Dmview P * matrix);

Get the block attribute of a matrixview object.The following instances are supported:

vsip mgetblock fvsip mgetblock ivsip mgetblock sivsip cmgetblock fvsip cmgetblock ivsip cmgetblock sivsip mgetblock bl

VSIPL/Content [3.1] NASoftware 9

Page 11: VSIPL/Content [3.1] · vsip vdestroy mi VSIPL/Content [3.1] NASoftware 4. Chapter 1. Support Functions Prototype Description vsip Dscalar P vsip Dvget P(constvsip Dvview P*vector,

Chapter 1. Support Functions

Prototype Descriptionvsip lengthvsip Dmgetcollength P(const vsip Dmview P * matrix);

Get the column length attribute of amatrix view object.The following instances are supported:

vsip mgetcollength fvsip mgetcollength ivsip mgetcollength sivsip cmgetcollength fvsip cmgetcollength ivsip cmgetcollength sivsip mgetcollength bl

vsip stridevsip Dmgetcolstride P(const vsip Dmview P * matrix);

Get the column stride attribute of amatrix view object.The following instances are supported:

vsip mgetcolstride fvsip mgetcolstride ivsip mgetcolstride sivsip cmgetcolstride fvsip cmgetcolstride ivsip cmgetcolstride sivsip mgetcolstride bl

vsip offsetvsip Dmgetoffset P(const vsip Dmview P * matrix);

Get the offset attribute of a matrixview object.The following instances are supported:

vsip mgetoffset fvsip mgetoffset ivsip mgetoffset sivsip cmgetoffset fvsip cmgetoffset ivsip cmgetoffset sivsip mgetoffset bl

vsip lengthvsip Dmgetrowlength P(const vsip Dmview P * matrix);

Get the row length attribute of a ma-trix view object.The following instances are supported:

vsip mgetrowlength fvsip cmgetrowlength fvsip cmgetrowlength ivsip cmgetrowlength si

vsip stridevsip Dmgetrowstride P(const vsip Dmview P * matrix);

Get the row stride attribute of a matrixview object.The following instances are supported:

vsip mgetrowstride fvsip mgetrowstride ivsip mgetrowstride sivsip cmgetrowstride fvsip cmgetrowstride ivsip cmgetrowstride sivsip mgetrowstride bl

vsip mview P *vsip mimagview P(const vsip cmview P *complex matrix);

Create a matrix view object of theimaginary part of complex matrix froma complex matrix view object.The following instances are supported:

vsip mimagview fvsip mimagview ivsip mimagview si

VSIPL/Content [3.1] NASoftware 10

Page 12: VSIPL/Content [3.1] · vsip vdestroy mi VSIPL/Content [3.1] NASoftware 4. Chapter 1. Support Functions Prototype Description vsip Dscalar P vsip Dvget P(constvsip Dvview P*vector,

Chapter 1. Support Functions

Prototype Descriptionvoidvsip Dmput P(const vsip Dmview P * matrix,vsip index i,vsip index j,vsip Dscalar P value);

Set the value of a specified element ofa matrix view object.The following instances are supported:

vsip mput fvsip mput ivsip mput sivsip cmput fvsip cmput ivsip cmput sivsip mput bl

vsip Dmview P *vsip Dmputattrib P(vsip Dmview P * matrix,const vsip Dmattr P * attr);

Set the attributes of a matrix view ob-ject.The following instances are supported:

vsip mputattrib fvsip mputattrib ivsip mputattrib sivsip cmputattrib fvsip cmputattrib ivsip cmputattrib sivsip mputattrib bl

vsip Dmview P *vsip Dmputcollength P(vsip Dmview P * matrix,vsip length n2);

Set the column length attribute of amatrix view object.The following instances are supported:

vsip mputcollength fvsip mputcollength ivsip mputcollength sivsip cmputcollength fvsip cmputcollength ivsip cmputcollength sivsip mputcollength bl

vsip Dmview P *vsip Dmputcolstride P(vsip Dmview P * matrix,vsip stride s2);

Set the column stride attribute of a ma-trix view object.The following instances are supported:

vsip mputcolstride fvsip mputcolstride ivsip mputcolstride sivsip cmputcolstride fvsip cmputcolstride ivsip cmputcolstride sivsip mputcolstride bl

vsip Dmview P *vsip Dmputoffset P(vsip Dmview P * matrix,vsip offset offset);

Set the offset attribute of a matrix viewobject.The following instances are supported:

vsip mputoffset fvsip mputoffset ivsip mputoffset sivsip cmputoffset fvsip cmputoffset ivsip cmputoffset sivsip mputoffset bl

VSIPL/Content [3.1] NASoftware 11

Page 13: VSIPL/Content [3.1] · vsip vdestroy mi VSIPL/Content [3.1] NASoftware 4. Chapter 1. Support Functions Prototype Description vsip Dscalar P vsip Dvget P(constvsip Dvview P*vector,

Chapter 1. Support Functions

Prototype Descriptionvsip Dmview P *vsip Dmputrowlength P(vsip Dmview P * matrix,vsip length n1);

Set the row length attribute of a matrixview object.The following instances are supported:

vsip mputrowlength fvsip mputrowlength ivsip mputrowlength sivsip cmputrowlength fvsip cmputrowlength ivsip cmputrowlength sivsip mputrowlength bl

vsip Dmview P *vsip Dmputrowstride P(vsip Dmview P * matrix,vsip stride s1);

Set the row stride attribute of a matrixview object.The following instances are supported:

vsip mputrowstride fvsip mputrowstride ivsip mputrowstride sivsip cmputrowstride fvsip cmputrowstride ivsip cmputrowstride sivsip mputrowstride bl

vsip mview P *vsip mrealview P(const vsip cmview P *complex matrix);

Create a matrix view object of the realpart of complex matrix from a complexmatrix view object.The following instances are supported:

vsip mrealview fvsip mrealview ivsip mrealview si

vsip Dvview P *vsip Dmrowview P(const vsip Dmview P * matrix,vsip index i);

Create a vector view object of a speci-fied row of the source matrix view ob-ject.The following instances are supported:

vsip mrowview fvsip mrowview ivsip mrowview sivsip cmrowview fvsip cmrowview ivsip cmrowview sivsip mrowview bl

vsip Dmview P *vsip Dmsubview P(const vsip Dmview P * matrix,vsip index i,vsip index j,vsip length m,vsip length n);

Create a matrix view object that is asubview of matrix view object.The following instances are supported:

vsip msubview fvsip msubview ivsip msubview sivsip cmsubview fvsip cmsubview ivsip cmsubview sivsip msubview bl

VSIPL/Content [3.1] NASoftware 12

Page 14: VSIPL/Content [3.1] · vsip vdestroy mi VSIPL/Content [3.1] NASoftware 4. Chapter 1. Support Functions Prototype Description vsip Dscalar P vsip Dvget P(constvsip Dvview P*vector,

Chapter 1. Support Functions

Prototype Descriptionvsip Dmview P *vsip Dmtransview P(const vsip Dmview P * matrix);

Create a matrix view object that is thetranspose of a matrix view object.The following instances are supported:

vsip mtransview fvsip mtransview ivsip mtransview sivsip cmtransview fvsip cmtransview ivsip cmtransview sivsip mtransview bl

VSIPL/Content [3.1] NASoftware 13

Page 15: VSIPL/Content [3.1] · vsip vdestroy mi VSIPL/Content [3.1] NASoftware 4. Chapter 1. Support Functions Prototype Description vsip Dscalar P vsip Dvget P(constvsip Dvview P*vector,

Chapter 2. Scalar Functions

2.1 Real Scalar Functions

Prototype Descriptionvsip scalar fvsip acos f(const vsip scalar f A);

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

vsip scalar fvsip asin f(const vsip scalar f A);

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

vsip scalar fvsip atan f(const vsip scalar f A);

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

vsip scalar fvsip atan2 f(const vsip scalar f A,const vsip scalar f B);

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

vsip scalar fvsip ceil f(const vsip scalar f A);

Computes the ceiling of a scalar.

vsip scalar fvsip cos f(const vsip scalar f A);

Computes the cosine of a scalar anglein radians.

vsip scalar fvsip cosh f(const vsip scalar f A);

Computes the hyperbolic cosine of ascalar.

vsip scalar fvsip exp f(const vsip scalar f A);

Computes the exponential of a scalar.

vsip scalar fvsip floor f(const vsip scalar f A);

Computes the floor of a scalar.

vsip scalar fvsip log f(const vsip scalar f A);

Computes the natural logarithm of ascalar.

vsip scalar fvsip log10 f(const vsip scalar f A);

Computes the base 10 logarithm of ascalar.

vsip scalar fvsip mag f(const vsip scalar f A);

Computes the magnitude (absolutevalue) of a scalar.

vsip scalar fvsip pow f(const vsip scalar f A,const vsip scalar f B);

Computes the power function of twoscalars.

vsip scalar fvsip sin f(const vsip scalar f A);

Computes the sine of a scalar angle inradians.

vsip scalar fvsip sinh f(const vsip scalar f A);

Computes the hyperbolic sine of ascalar.

vsip scalar fvsip sqrt f(const vsip scalar f A);

Computes the square root of a scalar.

vsip scalar fvsip tan f(const vsip scalar f A);

Computes the tangent of a scalar anglein radians.

VSIPL/Content [3.1] NASoftware 14

Page 16: VSIPL/Content [3.1] · vsip vdestroy mi VSIPL/Content [3.1] NASoftware 4. Chapter 1. Support Functions Prototype Description vsip Dscalar P vsip Dvget P(constvsip Dvview P*vector,

Chapter 2. Scalar Functions

Prototype Descriptionvsip scalar fvsip tanh f(const vsip scalar f A);

Computes the hyperbolic tangent of ascalar.

2.2 Complex Scalar Functions

Prototype Descriptionvsip scalar fvsip arg f(vsip cscalar f x);

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

voidvsip CADD f(vsip cscalar f x,vsip cscalar f y,vsip cscalar f * z);

Computes the complex sum of twoscalars.

vsip cscalar fvsip cadd f(vsip cscalar f x,vsip cscalar f y);

Computes the complex sum of twoscalars.

voidvsip RCADD f(vsip scalar f x,vsip cscalar f y,vsip cscalar f * z);

Computes the complex sum of twoscalars.

vsip cscalar fvsip rcadd f(vsip scalar f x,vsip cscalar f y);

Computes the complex sum of twoscalars.

voidvsip CDIV f(vsip cscalar f x,vsip cscalar f y,vsip cscalar f * z);

Computes the complex quotient of twoscalars.

vsip cscalar fvsip cdiv f(vsip cscalar f x,vsip cscalar f y);

Computes the complex quotient of twoscalars.

voidvsip CRDIV f(vsip cscalar f x,vsip scalar f y,vsip cscalar f * z);

Computes the complex quotient of twoscalars.

vsip cscalar fvsip crdiv f(vsip cscalar f x,vsip scalar f y);

Computes the complex quotient of twoscalars.

voidvsip CEXP f(vsip cscalar f x,vsip cscalar f * y);

Computes the exponential of a scalar.

vsip cscalar fvsip cexp f(const vsip cscalar f A);

Computes the exponential of a scalar.

voidvsip CJMUL f(vsip cscalar f x,vsip cscalar f y,vsip cscalar f * z);

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

VSIPL/Content [3.1] NASoftware 15

Page 17: VSIPL/Content [3.1] · vsip vdestroy mi VSIPL/Content [3.1] NASoftware 4. Chapter 1. Support Functions Prototype Description vsip Dscalar P vsip Dvget P(constvsip Dvview P*vector,

Chapter 2. Scalar Functions

Prototype Descriptionvsip cscalar fvsip cjmul f(vsip cscalar f x,vsip cscalar f y);

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

vsip cscalar fvsip cmag f(const vsip cscalar f A);

Computes the magnitude (absolutevalue) of a scalar.

vsip scalar fvsip cmagsq f(vsip cscalar f x);

Computes the magnitude squared of acomplex scalar.

voidvsip CMPLX f(vsip scalar f a,vsip scalar f b,vsip cscalar f * r);

Form a complex scalar from two realscalars.

vsip cscalar fvsip cmplx f(vsip scalar f re,vsip scalar f im);

Form a complex scalar from two realscalars.

voidvsip CMUL f(vsip cscalar f x,vsip cscalar f y,vsip cscalar f * z);

Computes the complex product of twoscalars.

vsip cscalar fvsip cmul f(vsip cscalar f x,vsip cscalar f y);

Computes the complex product of twoscalars.

voidvsip RCMUL f(vsip scalar f x,vsip cscalar f y,vsip cscalar f * z);

Computes the complex product of twoscalars.

vsip cscalar fvsip rcmul f(vsip scalar f x,vsip cscalar f y);

Computes the complex product of twoscalars.

voidvsip CNEG f(vsip cscalar f x,vsip cscalar f * y);

Computes the negation of a complexscalar.

vsip cscalar fvsip cneg f(vsip cscalar f x);

Computes the negation of a complexscalar.

voidvsip CONJ f(vsip cscalar f x,vsip cscalar f * y);

Computes the complex conjugate of ascalar.

vsip cscalar fvsip conj f(vsip cscalar f x);

Computes the complex conjugate of ascalar.

voidvsip CRECIP f(vsip cscalar f x,vsip cscalar f * y);

Computes the reciprocal of a complexscalar.

vsip cscalar fvsip crecip f(vsip cscalar f x);

Computes the reciprocal of a complexscalar.

voidvsip CSQRT f(vsip cscalar f x,vsip cscalar f * y);

Computes the square root a complexscalar.

VSIPL/Content [3.1] NASoftware 16

Page 18: VSIPL/Content [3.1] · vsip vdestroy mi VSIPL/Content [3.1] NASoftware 4. Chapter 1. Support Functions Prototype Description vsip Dscalar P vsip Dvget P(constvsip Dvview P*vector,

Chapter 2. Scalar Functions

Prototype Descriptionvsip cscalar fvsip csqrt f(vsip cscalar f x);

Computes the square root a complexscalar.

voidvsip CSUB f(vsip cscalar f x,vsip cscalar f y,vsip cscalar f * z);

Computes the complex difference oftwo scalars.

vsip cscalar fvsip csub f(vsip cscalar f x,vsip cscalar f y);

Computes the complex difference oftwo scalars.

voidvsip RCSUB f(vsip scalar f x,vsip cscalar f y,vsip cscalar f * z);

Computes the complex difference oftwo scalars.

vsip cscalar fvsip rcsub f(vsip scalar f x,vsip cscalar f y);

Computes the complex difference oftwo scalars.

voidvsip CRSUB f(vsip cscalar f x,vsip scalar f y,vsip cscalar f * z);

Computes the complex difference oftwo scalars.

vsip cscalar fvsip crsub f(vsip cscalar f x,vsip scalar f y);

Computes the complex difference oftwo scalars.

vsip scalar fvsip imag f(vsip cscalar f x);

Extract the imaginary part of a com-plex scalar.

voidvsip polar f(vsip cscalar f a,vsip scalar f * r,vsip scalar f * 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.

vsip scalar fvsip real f(vsip cscalar f x);

Extract the real part of a complexscalar.

voidvsip RECT f(vsip scalar f radius,vsip scalar f theta,vsip cscalar f * r);

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

vsip cscalar fvsip rect f(vsip scalar f r,vsip scalar f t);

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

VSIPL/Content [3.1] NASoftware 17

Page 19: VSIPL/Content [3.1] · vsip vdestroy mi VSIPL/Content [3.1] NASoftware 4. Chapter 1. Support Functions Prototype Description vsip Dscalar P vsip Dvget P(constvsip Dvview P*vector,

Chapter 2. Scalar Functions

2.3 Index Scalar Functions

Prototype Descriptionvoidvsip MATINDEX(vsip index r,vsip index c,vsip scalar mi * mi);

Form a matrix index from two vectorindices.

vsip scalar mivsip matindex(vsip index r,vsip index c);

Form a matrix index from two vectorindices.

vsip indexvsip mcolindex(vsip scalar mi mi);

Returns the column vector index froma matrix index.

vsip indexvsip mrowindex(vsip scalar mi mi);

Returns the row vector index from amatrix index.

VSIPL/Content [3.1] NASoftware 18

Page 20: VSIPL/Content [3.1] · vsip vdestroy mi VSIPL/Content [3.1] NASoftware 4. Chapter 1. Support Functions Prototype Description vsip Dscalar P vsip Dvget P(constvsip Dvview P*vector,

Chapter 3. Random Number Generation

3.1 Random Number Functions

Prototype Descriptionvsip randstate *vsip randcreate(const vsip index seed,const vsip index numprocs,const vsip index id,const vsip rng portable);

Create a random number generatorstate object.

intvsip randdestroy(vsip randstate * rand);

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

vsip scalar fvsip randu f(vsip 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).

vsip cscalar fvsip crandu f(vsip 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).

voidvsip vrandu f(vsip randstate * state,const vsip vview f * R);

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).

voidvsip cvrandu f(vsip randstate * state,const vsip cvview f * R);

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).

vsip scalar fvsip randn f(vsip 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.

vsip cscalar fvsip crandn f(vsip 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.

VSIPL/Content [3.1] NASoftware 19

Page 21: VSIPL/Content [3.1] · vsip vdestroy mi VSIPL/Content [3.1] NASoftware 4. Chapter 1. Support Functions Prototype Description vsip Dscalar P vsip Dvget P(constvsip Dvview P*vector,

Chapter 3. Random Number Generation

Prototype Descriptionvoidvsip vrandn f(vsip randstate * state,const vsip vview f * R);

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.

voidvsip cvrandn f(vsip randstate * state,const vsip cvview f * R);

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.

VSIPL/Content [3.1] NASoftware 20

Page 22: VSIPL/Content [3.1] · vsip vdestroy mi VSIPL/Content [3.1] NASoftware 4. Chapter 1. Support Functions Prototype Description vsip Dscalar P vsip Dvget P(constvsip Dvview P*vector,

Chapter 4. Elementwise Functions

4.1 Elementary Mathematical Functions

Prototype Descriptionvoidvsip vacos f(const vsip vview f * A,const vsip vview f * R);

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

voidvsip macos f(const vsip mview f * A,const vsip mview f * R);

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

voidvsip vasin f(const vsip vview f * A,const vsip vview f * R);

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

voidvsip masin f(const vsip mview f * A,const vsip mview f * R);

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

voidvsip vatan f(const vsip vview f * A,const vsip vview f * R);

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

voidvsip matan f(const vsip mview f * A,const vsip mview f * R);

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

voidvsip vatan2 f(const vsip vview f * A,const vsip vview f * B,const vsip vview f * R);

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

voidvsip matan2 f(const vsip mview f * A,const vsip mview f * B,const vsip mview f * R);

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

voidvsip vcos f(const vsip vview f * A,const vsip vview f * R);

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

voidvsip mcos f(const vsip mview f * A,const vsip mview f * R);

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

voidvsip vcosh f(const vsip vview f * A,const vsip vview f * R);

Computes the hyperbolic cosine foreach element of a vector.

voidvsip mcosh f(const vsip mview f * A,const vsip mview f * R);

Computes the hyperbolic cosine foreach element of a matrix.

voidvsip vexp f(const vsip vview f * A,const vsip vview f * R);

Computes the exponential functionvalue for each element of a vector.

VSIPL/Content [3.1] NASoftware 21

Page 23: VSIPL/Content [3.1] · vsip vdestroy mi VSIPL/Content [3.1] NASoftware 4. Chapter 1. Support Functions Prototype Description vsip Dscalar P vsip Dvget P(constvsip Dvview P*vector,

Chapter 4. Elementwise Functions

Prototype Descriptionvoidvsip cvexp f(const vsip cvview f * A,const vsip cvview f * R);

Computes the exponential functionvalue for each element of a vector.

voidvsip mexp f(const vsip mview f * A,const vsip mview f * R);

Computes the exponential functionvalue for each element of a matrix.

voidvsip cmexp f(const vsip cmview f * A,const vsip cmview f * R);

Computes the exponential functionvalue for each element of a matrix.

voidvsip vexp10 f(const vsip vview f * A,const vsip vview f * R);

Computes the base 10 exponential foreach element of a vector.

voidvsip mexp10 f(const vsip mview f * A,const vsip mview f * R);

Computes the base 10 exponential foreach element of a matrix.

voidvsip vlog f(const vsip vview f * A,const vsip vview f * R);

Computes the natural logarithm foreach element of a vector.

voidvsip cvlog f(const vsip cvview f * A,const vsip cvview f * R);

Computes the natural logarithm foreach element of a vector.

voidvsip mlog f(const vsip mview f * A,const vsip mview f * R);

Computes the natural logarithm foreach element of a matrix.

voidvsip cmlog f(const vsip cmview f * A,const vsip cmview f * R);

Computes the natural logarithm foreach element of a matrix.

voidvsip vlog10 f(const vsip vview f * A,const vsip vview f * R);

Compute the base ten logarithm foreach element of a vector.

voidvsip mlog10 f(const vsip mview f * A,const vsip mview f * R);

Compute the base ten logarithm foreach element of a matrix.

voidvsip vsin f(const vsip vview f * A,const vsip vview f * R);

Compute the sine for each element ofa vector. Element angle values are inradians.

voidvsip msin f(const vsip mview f * A,const vsip mview f * R);

Compute the sine for each element ofa matrix. Element angle values are inradians.

voidvsip vsinh f(const vsip vview f * A,const vsip vview f * R);

Computes the hyperbolic sine for eachelement of a vector.

voidvsip msinh f(const vsip mview f * A,const vsip mview f * R);

Computes the hyperbolic sine for eachelement of a matrix.

VSIPL/Content [3.1] NASoftware 22

Page 24: VSIPL/Content [3.1] · vsip vdestroy mi VSIPL/Content [3.1] NASoftware 4. Chapter 1. Support Functions Prototype Description vsip Dscalar P vsip Dvget P(constvsip Dvview P*vector,

Chapter 4. Elementwise Functions

Prototype Descriptionvoidvsip Dvsqrt P(const vsip Dvview P * A,const vsip Dvview P * R);

Compute the square root for each ele-ment of a vector.The following instances are supported:

vsip vsqrt fvsip cvsqrt f

voidvsip Dmsqrt P(const vsip Dmview P * A,const vsip Dmview P * R);

Compute the square root for each ele-ment of a matrix.The following instances are supported:

vsip msqrt fvsip cmsqrt f

voidvsip vtan f(const vsip vview f * A,const vsip vview f * R);

Compute the tangent for each elementof a vector. Element angle values arein radians.

voidvsip mtan f(const vsip mview f * A,const vsip mview f * R);

Compute the tangent for each elementof a matrix. Element angle values arein radians.

voidvsip vtanh f(const vsip vview f * A,const vsip vview f * R);

Computes the hyperbolic tangent foreach element of a vector.

voidvsip mtanh f(const vsip mview f * A,const vsip mview f * R);

Computes the hyperbolic tangent foreach element of a matrix.

4.2 Unary Operations

Prototype Descriptionvoidvsip varg f(const vsip cvview f * A,const vsip vview f * R);

Computes the argument in radians[−π, π] for each element of a complexvector.

voidvsip marg f(const vsip cmview f * A,const vsip mview f * R);

Computes the argument in radians[−π, π] for each element of a complexmatrix.

voidvsip vceil f(const vsip vview f * A,const vsip vview f * R);

Computes the ceiling for each elementof a vector.

voidvsip cvconj f(const vsip cvview f * A,const vsip cvview f * R);

Compute the conjugate for each ele-ment of a complex vector.

voidvsip cmconj f(const vsip cmview f * A,const vsip cmview f * R);

Compute the conjugate for each ele-ment of a complex matrix.

VSIPL/Content [3.1] NASoftware 23

Page 25: VSIPL/Content [3.1] · vsip vdestroy mi VSIPL/Content [3.1] NASoftware 4. Chapter 1. Support Functions Prototype Description vsip Dscalar P vsip Dvget P(constvsip Dvview P*vector,

Chapter 4. Elementwise Functions

Prototype Descriptionvoidvsip Dvcumsum P(const vsip Dvview P * A,const vsip Dvview P * R);

Compute the cumulative sum of the el-ements of a vector.The following instances are supported:

vsip vcumsum fvsip vcumsum ivsip cvcumsum fvsip cvcumsum i

voidvsip Dmcumsum P(vsip major dir,const vsip Dmview P * R);

Compute the cumulative sums of theelements in the rows or columns of amatrix.The following instances are supported:

vsip mcumsum fvsip mcumsum ivsip cmcumsum fvsip cmcumsum i

voidvsip veuler f(const vsip vview f * A,const vsip cvview f * R);

Computes the complex numbers corre-sponding to the angle of a unit vectorin the complex plane for each elementof a vector.

voidvsip meuler f(const vsip mview f * A,const vsip cmview f * R);

Computes the complex numbers corre-sponding to the angle of a unit vectorin the complex plane for each elementof a matrix.

voidvsip vfloor f(const vsip vview f * A,const vsip vview f * R);

Computes the floor for each element ofa vector.

voidvsip Dvmag P(const vsip Dvview P * A,const vsip vview P * R);

Compute the magnitude for each ele-ment of a vector.The following instances are supported:

vsip vmag fvsip vmag ivsip vmag sivsip cvmag f

voidvsip Dmmag P(const vsip Dmview P * A,const vsip mview P * R);

Compute the magnitude for each ele-ment of a matrix.The following instances are supported:

vsip mmag fvsip cmmag f

voidvsip vcmagsq f(const vsip cvview f * A,const vsip vview f * R);

Computes the square of the magnitudesfor each element of a vector.

voidvsip mcmagsq f(const vsip cmview f * A,const vsip mview f * R);

Computes the square of the magnitudesfor each element of a matrix.

vsip Dscalar Pvsip Dvmeanval P(const vsip Dvview P * A);

Returns the mean value of the elementsof a vector.The following instances are supported:

vsip vmeanval fvsip cvmeanval f

VSIPL/Content [3.1] NASoftware 24

Page 26: VSIPL/Content [3.1] · vsip vdestroy mi VSIPL/Content [3.1] NASoftware 4. Chapter 1. Support Functions Prototype Description vsip Dscalar P vsip Dvget P(constvsip Dvview P*vector,

Chapter 4. Elementwise Functions

Prototype Descriptionvsip Dscalar Pvsip Dmmeanval P(const vsip Dmview P * A);

Returns the mean value of the elementsof a matrix.The following instances are supported:

vsip mmeanval fvsip cmmeanval f

vsip scalar Pvsip Dvmeansqval P(const vsip Dvview P * A);

Returns the mean magnitude squaredvalue of the elements of a vector.The following instances are supported:

vsip vmeansqval fvsip cvmeansqval f

vsip scalar Pvsip Dmmeansqval P(const vsip Dmview P * A);

Returns the mean magnitude squaredvalue of the elements of a matrix.The following instances are supported:

vsip mmeansqval fvsip cmmeansqval f

vsip scalar Pvsip Dvmodulate P(const vsip Dvview P * A,const vsip scalar P nu,const vsip scalar P phi,const vsip Dvview P * R);

Computes the modulation of a real vec-tor by a specified complex frequency.The following instances are supported:

vsip vmodulate fvsip cvmodulate f

voidvsip Dvneg P(const vsip Dvview P * A,const vsip Dvview P * R);

Computes the negation for each ele-ment of a vector.The following instances are supported:

vsip vneg fvsip vneg ivsip vneg sivsip cvneg f

voidvsip Dmneg P(const vsip Dmview P * A,const vsip Dmview P * R);

Computes the negation for each ele-ment of a matrix.The following instances are supported:

vsip mneg fvsip mneg ivsip cmneg f

voidvsip Dvrecip P(const vsip Dvview P * A,const vsip Dvview P * R);

Computes the reciprocal for each ele-ment of a vector.The following instances are supported:

vsip vrecip fvsip cvrecip f

voidvsip Dmrecip P(const vsip Dmview P * A,const vsip Dmview P * R);

Computes the reciprocal for each ele-ment of a matrix.The following instances are supported:

vsip mrecip fvsip cmrecip f

voidvsip vrsqrt f(const vsip vview f * A,const vsip vview f * R);

Computes the reciprocal of the squareroot for each element of a vector.

VSIPL/Content [3.1] NASoftware 25

Page 27: VSIPL/Content [3.1] · vsip vdestroy mi VSIPL/Content [3.1] NASoftware 4. Chapter 1. Support Functions Prototype Description vsip Dscalar P vsip Dvget P(constvsip Dvview P*vector,

Chapter 4. Elementwise Functions

Prototype Descriptionvoidvsip mrsqrt f(const vsip mview f * A,const vsip mview f * R);

Computes the reciprocal of the squareroot for each element of a matrix.

voidvsip vsq f(const vsip vview f * A,const vsip vview f * R);

Computes the square for each elementof a vector.

voidvsip msq f(const vsip mview f * A,const vsip mview f * R);

Computes the square for each elementof a matrix.

vsip scalar Pvsip Dvsumval P(const vsip vview P * A);

Returns the sum of the elements of avector.The following instances are supported:

vsip vsumval fvsip vsumval ivsip vsumval sivsip vsumval blvsip cvsumval fvsip cvsumval i

vsip scalar Pvsip Dmsumval P(const vsip mview P * A);

Returns the sum of the elements of avector.The following instances are supported:

vsip msumval fvsip msumval ivsip cmsumval fvsip cmsumval i

vsip scalar fvsip vsumsqval f(const vsip vview f * A);

Returns the sum of the squares of theelements of a vector.

vsip scalar fvsip msumsqval f(const vsip mview f * A);

Returns the sum of the squares of theelements of a matrix.

4.3 Binary Operations

Prototype Descriptionvoidvsip Dvadd P(const vsip Dvview P * A,const vsip Dvview P * B,const vsip Dvview P * R);

Computes the sum, by element, of twovectors.The following instances are supported:

vsip vadd fvsip vadd ivsip vadd sivsip cvadd fvsip cvadd i

voidvsip Dmadd P(const vsip Dmview P * A,const vsip Dmview P * B,const vsip Dmview P * R);

Computes the sum, by element, of twomatrices.The following instances are supported:

vsip madd fvsip madd ivsip cmadd f

VSIPL/Content [3.1] NASoftware 26

Page 28: VSIPL/Content [3.1] · vsip vdestroy mi VSIPL/Content [3.1] NASoftware 4. Chapter 1. Support Functions Prototype Description vsip Dscalar P vsip Dvget P(constvsip Dvview P*vector,

Chapter 4. Elementwise Functions

Prototype Descriptionvoidvsip rcvadd f(const vsip vview f * A,const vsip cvview f * B,const vsip cvview f * R);

Computes the sum, by element, of twovectors.

voidvsip rcmadd f(const vsip mview f * A,const vsip cmview f * B,const vsip cmview f * R);

Computes the sum, by element, of twomatrices.

voidvsip Dsvadd P(const vsip Dscalar P a,const vsip Dvview P * B,const vsip Dvview P * R);

Computes the sum, by element, of ascalar and a vector.The following instances are supported:

vsip svadd fvsip svadd ivsip svadd sivsip csvadd f

voidvsip Dsmadd P(const vsip Dscalar P a,const vsip Dmview P * B,const vsip Dmview P * R);

Computes the sum, by element, of ascalar and a matrix.The following instances are supported:

vsip smadd fvsip smadd ivsip csmadd f

voidvsip rscvadd f(const vsip scalar f a,const vsip cvview f * B,const vsip cvview f * R);

Computes the sum, by element, of areal scalar and a complex vector.

voidvsip rscmadd f(const vsip scalar f a,const vsip cmview f * B,const vsip cmview f * R);

Computes the sum, by element, of areal scalar and a complex matrix.

voidvsip Dvdiv P(const vsip Dvview P * A,const vsip Dvview P * B,const vsip Dvview P * R);

Computes the quotient, by element, oftwo vectors.The following instances are supported:

vsip vdiv fvsip cvdiv f

voidvsip Dmdiv P(const vsip Dmview P * A,const vsip Dmview P * B,const vsip Dmview P * R);

Computes the quotient, by element, oftwo matrices.The following instances are supported:

vsip mdiv fvsip cmdiv f

voidvsip rcvdiv f(const vsip scalar f a,const vsip cvview f * B,const vsip cvview f * R);

Computes the quotient, by element, oftwo vectors.

voidvsip rcmdiv f(const vsip scalar f a,const vsip cmview f * B,const vsip cmview f * R);

Computes the quotient, by element, oftwo matrices.

VSIPL/Content [3.1] NASoftware 27

Page 29: VSIPL/Content [3.1] · vsip vdestroy mi VSIPL/Content [3.1] NASoftware 4. Chapter 1. Support Functions Prototype Description vsip Dscalar P vsip Dvget P(constvsip Dvview P*vector,

Chapter 4. Elementwise Functions

Prototype Descriptionvoidvsip crvdiv f(const vsip cvview f * A,const vsip vview f * B,const vsip cvview f * R);

Computes the quotient, by element, oftwo vectors.

voidvsip crmdiv f(const vsip cmview f * A,const vsip mview f * B,const vsip cmview f * R);

Computes the quotient, by element, oftwo matrices.

voidvsip svdiv f(const vsip scalar f a,const vsip vview f * B,const vsip vview f * R);

Computes the quotient, by element, ofa scalar and a vector.

voidvsip Dsmdiv P(const vsip Dscalar P a,const vsip Dmview P * B,const vsip Dmview P * R);

Computes the quotient, by element, ofa scalar and a matrix.The following instances are supported:

vsip smdiv fvsip csmdiv f

voidvsip rscvdiv f(const vsip scalar f a,const vsip cvview f * B,const vsip cvview f * R);

Computes the quotient, by element, ofa real scalar and a complex vector.

voidvsip rscvsub f(const vsip scalar f a,const vsip cvview f * B,const vsip cvview f * R);

Computes the difference, by element, ofa real scalar and a complex vector.

voidvsip rscmdiv f(const vsip scalar f a,const vsip cmview f * B,const vsip cmview f * R);

Computes the quotient, by element, ofa real scalar and a complex matrix.

voidvsip rscmsub f(const vsip scalar f a,const vsip cmview f * B,const vsip cmview f * R);

Computes the difference, by element, ofa real scalar and a complex matrix.

voidvsip Dvsdiv P(const vsip Dvview P * A,const vsip Dscalar P b,const vsip Dvview P * R);

Computes the quotient, by element, ofa vector and a scalar.The following instances are supported:

vsip vsdiv fvsip cvrsdiv f

voidvsip Dmsdiv P(const vsip Dmview P * A,const vsip Dscalar P b,const vsip Dmview P * R);

Computes the quotient, by element, ofa matrix and a scalar.The following instances are supported:

vsip msdiv fvsip cmrsdiv f

voidvsip Dvexpoavg P(const vsip scalar P a,const vsip Dvview P * B,const vsip Dvview P * C);

Computes an exponential weighted av-erage, by element, of two vectors.The following instances are supported:

vsip vexpoavg fvsip cvexpoavg f

VSIPL/Content [3.1] NASoftware 28

Page 30: VSIPL/Content [3.1] · vsip vdestroy mi VSIPL/Content [3.1] NASoftware 4. Chapter 1. Support Functions Prototype Description vsip Dscalar P vsip Dvget P(constvsip Dvview P*vector,

Chapter 4. Elementwise Functions

Prototype Descriptionvoidvsip Dmexpoavg P(const vsip scalar P a,const vsip Dmview P * B,const vsip Dmview P * C);

Computes an exponential weighted av-erage, by element, of two matrices.The following instances are supported:

vsip mexpoavg fvsip cmexpoavg f

voidvsip vhypot f(const vsip vview f * A,const vsip vview f * B,const vsip vview f * R);

Computes the square root of the sum ofsquares, by element, of two input vec-tors.

voidvsip mhypot f(const vsip mview f * A,const vsip mview f * B,const vsip mview f * R);

Computes the square root of the sum ofsquares, by element, of two input ma-trices.

voidvsip cvjmul f(const vsip cvview f * A,const vsip cvview f * B,const vsip cvview f * R);

Computes the product of a complexvector with the conjugate of a secondcomplex vector, by element.

voidvsip cmjmul f(const vsip cmview f * A,const vsip cmview f * B,const vsip cmview f * R);

Computes the product of a complexmatrix with the conjugate of a secondcomplex matrix, by element.

voidvsip Dvmul P(const vsip Dvview P * A,const vsip Dvview P * B,const vsip Dvview P * R);

Computes the product, by element, oftwo vectors.The following instances are supported:

vsip vmul fvsip vmul ivsip vmul sivsip cvmul f

voidvsip Dmmul P(const vsip Dmview P * A,const vsip Dmview P * B,const vsip Dmview P * R);

Computes the product, by element, oftwo matrices.The following instances are supported:

vsip mmul fvsip mmul ivsip cmmul f

voidvsip rcvmul f(const vsip vview f * A,const vsip cvview f * B,const vsip cvview f * R);

Computes the product, by element, oftwo vectors.

voidvsip rcmmul f(const vsip mview f * A,const vsip cmview f * B,const vsip cmview f * R);

Computes the product, by element, oftwo matrices.

voidvsip Dsvmul P(const vsip Dscalar P a,const vsip Dvview P * B,const vsip Dvview P * R);

Computes the product, by element, ofa scalar and a vector.The following instances are supported:

vsip svmul fvsip svmul ivsip svmul sivsip csvmul f

VSIPL/Content [3.1] NASoftware 29

Page 31: VSIPL/Content [3.1] · vsip vdestroy mi VSIPL/Content [3.1] NASoftware 4. Chapter 1. Support Functions Prototype Description vsip Dscalar P vsip Dvget P(constvsip Dvview P*vector,

Chapter 4. Elementwise Functions

Prototype Descriptionvoidvsip Dsmmul P(const vsip Dscalar P a,const vsip Dmview P * B,const vsip Dmview P * R);

Computes the product, by element, ofa scalar and a matrix.The following instances are supported:

vsip smmul fvsip csmmul f

voidvsip rscvmul f(const vsip scalar f a,const vsip cvview f * B,const vsip cvview f * R);

Computes the product, by element, ofa real scalar and a complex vector.

voidvsip rscmmul f(const vsip scalar f a,const vsip cmview f * B,const vsip cmview f * R);

Computes the product, by element, ofa real scalar and a complex matrix.

voidvsip DvDmmul P(const vsip Dvview P * A,const vsip Dmview P * B,const vsip major major,const vsip Dmview P * R);

Computes the product, by element, ofa vector and the rows or columns of amatrix.The following instances are supported:

vsip vmmul fvsip cvmmul f

voidvsip rvcmmul f(const vsip vview f * A,const vsip cmview f * B,const vsip major major,const vsip cmview f * R);

Computes the product, by element, ofa vector and the rows or columns of amatrix.

voidvsip Dvsub P(const vsip Dvview P * A,const vsip Dvview P * B,const vsip Dvview P * R);

Computes the difference, by element, oftwo vectors.The following instances are supported:

vsip vsub fvsip vsub ivsip vsub sivsip cvsub f

voidvsip Dmsub P(const vsip Dmview P * A,const vsip Dmview P * B,const vsip Dmview P * R);

Computes the difference, by element, oftwo matrices.The following instances are supported:

vsip msub fvsip msub ivsip cmsub f

voidvsip crvsub f(const vsip cvview f * A,const vsip vview f * B,const vsip cvview f * R);

Computes the difference, by element, oftwo vectors.

voidvsip crmsub f(const vsip cmview f * A,const vsip mview f * B,const vsip cmview f * R);

Computes the difference, by element, oftwo matrices.

voidvsip rcvsub f(const vsip vview f * A,const vsip cvview f * B,const vsip cvview f * R);

Computes the difference, by element, oftwo vectors.

VSIPL/Content [3.1] NASoftware 30

Page 32: VSIPL/Content [3.1] · vsip vdestroy mi VSIPL/Content [3.1] NASoftware 4. Chapter 1. Support Functions Prototype Description vsip Dscalar P vsip Dvget P(constvsip Dvview P*vector,

Chapter 4. Elementwise Functions

Prototype Descriptionvoidvsip rcmsub f(const vsip mview f * A,const vsip cmview f * B,const vsip cmview f * R);

Computes the difference, by element, oftwo matrices.

voidvsip Dsvsub P(const vsip Dscalar P a,const vsip Dvview P * B,const vsip Dvview P * R);

Computes the difference, by element, ofa scalar and a vector.The following instances are supported:

vsip svsub fvsip svsub ivsip svsub sivsip csvsub f

voidvsip Dsmsub P(const vsip Dscalar P a,const vsip Dmview P * B,const vsip Dmview P * R);

Computes the difference, by element, ofa scalar and a matrix.The following instances are supported:

vsip smsub fvsip smsub ivsip csmsub f

4.4 Ternary Operations

Prototype Descriptionvoidvsip Dvam P(const vsip Dvview P * A,const vsip Dvview P * B,const vsip Dvview P * C,const vsip Dvview P * R);

Computes the sum of two vectors andproduct of a third vector, by element.The following instances are supported:

vsip vam fvsip cvam f

voidvsip Dvma P(const vsip Dvview P * A,const vsip Dvview P * B,const vsip Dvview P * C,const vsip Dvview P * R);

Computes the product of two vectorsand sum of a third vector, by element.The following instances are supported:

vsip vma fvsip cvma f

voidvsip Dvmsa P(const vsip Dvview P * A,const vsip Dvview P * B,const vsip Dscalar P c,const vsip Dvview P * R);

Computes the product of two vectorsand sum of a scalar, by element.The following instances are supported:

vsip vmsa fvsip cvmsa f

voidvsip Dvmsb P(const vsip Dvview P * A,const vsip Dvview P * B,const vsip Dvview P * C,const vsip Dvview P * R);

Computes the product of two vectorsand difference of a third vector, by ele-ment.The following instances are supported:

vsip vmsb fvsip cvmsb f

voidvsip Dvsam P(const vsip Dvview P * A,const vsip Dscalar P b,const vsip Dvview P * C,const vsip Dvview P * R);

Computes the sum of a vector and ascalar, and product with a second vec-tor, by element.The following instances are supported:

vsip vsam fvsip cvsam f

VSIPL/Content [3.1] NASoftware 31

Page 33: VSIPL/Content [3.1] · vsip vdestroy mi VSIPL/Content [3.1] NASoftware 4. Chapter 1. Support Functions Prototype Description vsip Dscalar P vsip Dvget P(constvsip Dvview P*vector,

Chapter 4. Elementwise Functions

Prototype Descriptionvoidvsip Dvsbm P(const vsip Dvview P * A,const vsip Dvview P * B,const vsip Dvview P * C,const vsip Dvview P * R);

Computes the difference of two vectors,and product with a third vector, by el-ement.The following instances are supported:

vsip vsbm fvsip cvsbm f

voidvsip Dvsma P(const vsip Dvview P * A,const vsip Dscalar P b,const vsip Dvview P * C,const vsip Dvview P * R);

Computes the product of a vector anda scalar, and sum with a second vector,by element.The following instances are supported:

vsip vsma fvsip cvsma f

voidvsip Dvsmsa P(const vsip Dvview P * A,const vsip Dscalar P b,const vsip Dscalar P c,const vsip Dvview P * R);

Computes the product of a vector anda scalar, and sum with a second scalar,by element.The following instances are supported:

vsip vsmsa fvsip cvsmsa f

4.5 Logical Operations

Prototype Descriptionvsip scalar blvsip valltrue bl(const vsip vview bl * A);

Returns true if all the elements of a vec-tor are true.

vsip scalar blvsip malltrue bl(const vsip vview bl * A);

Returns true if all the elements of a vec-tor are true.

vsip scalar blvsip vanytrue bl(const vsip vview bl * A);

Returns true if one or more elements ofa vector are true.

vsip scalar blvsip manytrue bl(const vsip vview bl * A);

Returns true if one or more elements ofa vector are true.

voidvsip Dvleq P(const vsip Dvview P * A,const vsip Dvview P * B,const vsip vview bl * R);

Computes the boolean comparison of‘equal’, by element, of two vectors.The following instances are supported:

vsip vleq fvsip vleq ivsip cvleq fvsip cvleq i

voidvsip Dmleq P(const vsip Dmview P * A,const vsip Dmview P * B,const vsip vview bl * R);

Computes the boolean comparisonof ‘equal’, by element, of two vec-tors/matrices.The following instances are supported:

vsip mleq fvsip mleq ivsip cmleq fvsip cmleq i

VSIPL/Content [3.1] NASoftware 32

Page 34: VSIPL/Content [3.1] · vsip vdestroy mi VSIPL/Content [3.1] NASoftware 4. Chapter 1. Support Functions Prototype Description vsip Dscalar P vsip Dvget P(constvsip Dvview P*vector,

Chapter 4. Elementwise Functions

Prototype Descriptionvoidvsip vlge P(const vsip vview P * A,const vsip vview P * B,const vsip vview bl * R);

Computes the boolean comparison of‘greater than or equal’, by element, oftwo vectors.The following instances are supported:

vsip vlge fvsip vlge i

voidvsip mlge P(const vsip mview P * A,const vsip mview P * B,const vsip vview bl * R);

Computes the boolean comparison of‘greater than or equal’, by element, oftwo vectors/matrices.The following instances are supported:

vsip mlge fvsip mlge i

voidvsip vlgt P(const vsip vview P * A,const vsip vview P * B,const vsip vview bl * R);

Computes the boolean comparison of‘greater than’, by element, of two vec-tors.The following instances are supported:

vsip vlgt fvsip vlgt i

voidvsip mlgt P(const vsip mview P * A,const vsip mview P * B,const vsip vview bl * R);

Computes the boolean comparison of‘greater than’, by element, of two vec-tors/matrices.The following instances are supported:

vsip mlgt fvsip mlgt i

voidvsip vlle P(const vsip vview P * A,const vsip vview P * B,const vsip vview bl * R);

Computes the boolean comparison of‘less than or equal’, by element, of twovectors.The following instances are supported:

vsip vlle fvsip vlle i

voidvsip mlle P(const vsip mview P * A,const vsip mview P * B,const vsip vview bl * R);

Computes the boolean comparison of‘less than or equal’, by element, of twovectors/matrices.The following instances are supported:

vsip mlle fvsip mlle i

voidvsip vllt P(const vsip vview P * A,const vsip vview P * B,const vsip vview bl * R);

Computes the boolean comparison of‘less than’, by element, of two vectors.The following instances are supported:

vsip vllt fvsip vllt i

voidvsip mllt P(const vsip mview P * A,const vsip mview P * B,const vsip vview bl * R);

Computes the boolean comparison of‘less than’, by element, of two vec-tors/matrices.The following instances are supported:

vsip mllt fvsip mllt i

VSIPL/Content [3.1] NASoftware 33

Page 35: VSIPL/Content [3.1] · vsip vdestroy mi VSIPL/Content [3.1] NASoftware 4. Chapter 1. Support Functions Prototype Description vsip Dscalar P vsip Dvget P(constvsip Dvview P*vector,

Chapter 4. Elementwise Functions

Prototype Descriptionvoidvsip Dvlne P(const vsip Dvview P * A,const vsip Dvview P * B,const vsip vview bl * R);

Computes the boolean comparison of‘not equal’, by element, of two vectors.The following instances are supported:

vsip vlne fvsip vlne ivsip cvlne fvsip cvlne i

voidvsip Dmlne P(const vsip Dmview P * A,const vsip Dmview P * B,const vsip vview bl * R);

Computes the boolean comparison of‘not equal’, by element, of two vec-tors/matrices.The following instances are supported:

vsip mlne fvsip mlne ivsip cmlne fvsip cmlne i

4.6 Selection Operations

Prototype Descriptionvoidvsip vclip P(const vsip vview P * A,const vsip scalar P t1,const vsip scalar P t2,const vsip scalar P c1,const vsip scalar P c2,const vsip vview P * R);

Computes the generalised double clip,by element, of two vectors.The following instances are supported:

vsip vclip fvsip vclip ivsip vclip si

voidvsip vinvclip P(const vsip vview P * A,const vsip scalar P t1,const vsip scalar P t2,const vsip scalar P t3,const vsip scalar P c1,const vsip scalar P c2,const vsip vview P * R);

Computes the generalised inverteddouble clip, by element, of two vectors.The following instances are supported:

vsip vinvclip fvsip vinvclip ivsip vinvclip si

vsip lengthvsip vindexbool(const vsip vview bl * X,vsip vview vi * Y);

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.

voidvsip vmax f(const vsip vview f * A,const vsip vview f * B,const vsip vview f * R);

Computes the maximum, by element,of two vectors.

voidvsip vmaxmg f(const vsip vview f * A,const vsip vview f * B,const vsip vview f * R);

Computes the maximum magnitude(absolute value), by element, of twovectors.

voidvsip vcmaxmgsq f(const vsip cvview f * A,const vsip cvview f * B,const vsip vview f * R);

Computes the maximum magnitudesquared, by element, of two complexvectors.

VSIPL/Content [3.1] NASoftware 34

Page 36: VSIPL/Content [3.1] · vsip vdestroy mi VSIPL/Content [3.1] NASoftware 4. Chapter 1. Support Functions Prototype Description vsip Dscalar P vsip Dvget P(constvsip Dvview P*vector,

Chapter 4. Elementwise Functions

Prototype Descriptionvsip scalar fvsip vcmaxmgsqval f(const vsip cvview f * A,vsip index * index);

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.

vsip scalar fvsip vmaxmgval f(const vsip vview f * A,vsip index * index);

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.

vsip scalar fvsip vmaxval f(const vsip vview f * A,vsip index * index);

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.

voidvsip vmin f(const vsip vview f * A,const vsip vview f * B,const vsip vview f * R);

Computes the minimum, by element, oftwo vectors.

voidvsip vminmg f(const vsip vview f * A,const vsip vview f * B,const vsip vview f * R);

Computes the minimum magnitude(absolute value), by element, of twovectors.

voidvsip vcminmgsq f(const vsip cvview f * A,const vsip cvview f * B,const vsip vview f * R);

Computes the minimum magnitudesquared, by element, of two complexvectors.

vsip scalar fvsip vcminmgsqval f(const vsip cvview f * A,vsip index * index);

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.

vsip scalar fvsip vminmgval f(const vsip vview f * A,vsip index * index);

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.

vsip scalar fvsip vminval f(const vsip vview f * A,vsip index * index);

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.

4.7 Bitwise and Boolean Logical Operators

Prototype Descriptionvoidvsip vand P(const vsip vview P * A,const vsip vview P * B,const vsip vview P * R);

Computes the bitwise and, by element,of two vectors.The following instances are supported:

vsip vand ivsip vand sivsip vand bl

VSIPL/Content [3.1] NASoftware 35

Page 37: VSIPL/Content [3.1] · vsip vdestroy mi VSIPL/Content [3.1] NASoftware 4. Chapter 1. Support Functions Prototype Description vsip Dscalar P vsip Dvget P(constvsip Dvview P*vector,

Chapter 4. Elementwise Functions

Prototype Descriptionvoidvsip mand P(const vsip mview P * A,const vsip mview P * B,const vsip mview P * R);

Computes the bitwise and, by element,of two matrices.The following instances are supported:

vsip mand ivsip mand sivsip mand bl

voidvsip vnot P(const vsip vview P * A,const vsip vview P * R);

Computes the bitwise not (one’s com-plement), by element, of two vectors.The following instances are supported:

vsip vnot ivsip vnot sivsip vnot bl

voidvsip mnot P(const vsip mview P * A,const vsip mview P * R);

Computes the bitwise not (one’s com-plement), by element, of two matrices.The following instances are supported:

vsip mnot ivsip mnot sivsip mnot bl

voidvsip vor P(const vsip vview P * A,const vsip vview P * B,const vsip vview P * R);

Computes the bitwise inclusive or, byelement, of two vectors.The following instances are supported:

vsip vor ivsip vor sivsip vor bl

voidvsip mor P(const vsip mview P * A,const vsip mview P * B,const vsip mview P * R);

Computes the bitwise inclusive or, byelement, of two matrices.The following instances are supported:

vsip mor ivsip mor sivsip mor bl

voidvsip vxor P(const vsip vview P * A,const vsip vview P * B,const vsip vview P * R);

Computes the bitwise exclusive or, byelement, of two vectors.The following instances are supported:

vsip vxor ivsip vxor sivsip vxor bl

voidvsip mxor P(const vsip mview P * A,const vsip mview P * B,const vsip mview P * R);

Computes the bitwise exclusive or, byelement, of two matrices.The following instances are supported:

vsip mxor ivsip mxor sivsip mxor bl

4.8 Element Generation and Copy

VSIPL/Content [3.1] NASoftware 36

Page 38: VSIPL/Content [3.1] · vsip vdestroy mi VSIPL/Content [3.1] NASoftware 4. Chapter 1. Support Functions Prototype Description vsip Dscalar P vsip Dvget P(constvsip Dvview P*vector,

Chapter 4. Elementwise Functions

Prototype Descriptionvoidvsip Dvcopy P P(const vsip Dvview P * A,const vsip Dvview P * R);

Copy the source vector to the destina-tion vector performing any necessarytype conversion of the standard ANSIC scalar types.The following instances are supported:

vsip vcopy f fvsip vcopy f ivsip vcopy f sivsip vcopy f blvsip vcopy i fvsip vcopy i ivsip vcopy i sivsip vcopy i vivsip vcopy si fvsip vcopy si ivsip vcopy si sivsip vcopy bl fvsip vcopy bl blvsip vcopy vi ivsip vcopy vi vivsip vcopy mi mivsip cvcopy f f

voidvsip Dmcopy P P(const vsip Dmview P * A,const vsip Dmview P * R);

Copy the source matrix to the destina-tion matrix performing any necessarytype conversion of the standard ANSIC scalar types.The following instances are supported:

vsip mcopy f fvsip mcopy f ivsip mcopy f sivsip mcopy f blvsip mcopy i fvsip mcopy i ivsip mcopy i sivsip mcopy si fvsip mcopy si ivsip mcopy si sivsip mcopy bl fvsip mcopy bl blvsip cmcopy f f

voidvsip Dvfill P(const vsip Dscalar P a,const vsip Dvview P * R);

Fill a vector with a constant value.The following instances are supported:

vsip vfill fvsip vfill ivsip vfill sivsip cvfill f

voidvsip Dmfill P(const vsip Dscalar P a,const vsip Dmview P * R);

Fill a matrix with a constant value.The following instances are supported:

vsip mfill fvsip mfill ivsip mfill sivsip cmfill f

VSIPL/Content [3.1] NASoftware 37

Page 39: VSIPL/Content [3.1] · vsip vdestroy mi VSIPL/Content [3.1] NASoftware 4. Chapter 1. Support Functions Prototype Description vsip Dscalar P vsip Dvget P(constvsip Dvview P*vector,

Chapter 4. Elementwise Functions

Prototype Descriptionvoidvsip vramp P(const vsip scalar P alpha,const vsip scalar P beta,const vsip vview P * R);

Computes a vector ramp by starting atan initial value and incrementing eachsuccessive element by the ramp stepsize.The following instances are supported:

vsip vramp fvsip vramp ivsip vramp si

4.9 Manipulation Operations

Prototype Descriptionvoidvsip vcmplx f(const vsip vview f * A,const vsip vview f * B,const vsip cvview f * R);

Form a complex vector from two realvectors.

voidvsip mcmplx f(const vsip mview f * A,const vsip mview f * B,const vsip cmview f * R);

Form a complex matrix from two realmatrices.

voidvsip Dvgather P(const vsip Dvview P * X,const vsip vview vi * I,const vsip Dvview P * Y);

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:

vsip vgather fvsip vgather ivsip vgather sivsip cvgather f

voidvsip Dmgather P(const vsip Dmview P * X,const vsip vview mi * I,const vsip Dvview P * Y);

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:

vsip mgather fvsip mgather ivsip mgather sivsip cmgather f

voidvsip vimag f(const vsip cvview f * A,const vsip vview f * R);

Extract the imaginary part of a com-plex vector.

voidvsip mimag f(const vsip cmview f * A,const vsip mview f * R);

Extract the imaginary part of a com-plex matrix.

VSIPL/Content [3.1] NASoftware 38

Page 40: VSIPL/Content [3.1] · vsip vdestroy mi VSIPL/Content [3.1] NASoftware 4. Chapter 1. Support Functions Prototype Description vsip Dscalar P vsip Dvget P(constvsip Dvview P*vector,

Chapter 4. Elementwise Functions

Prototype Descriptionvoidvsip vpolar f(const vsip cvview f * A,const vsip vview f * R,const vsip vview f * P);

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.

voidvsip mpolar f(const vsip cmview f * A,const vsip mview f * R,const vsip mview f * P);

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.

voidvsip vreal f(const vsip cvview f * A,const vsip vview f * R);

Extract the real part of a complex vec-tor.

voidvsip mreal f(const vsip cmview f * A,const vsip mview f * R);

Extract the real part of a complex ma-trix.

voidvsip vrect f(const vsip vview f * R,const vsip vview f * P,const vsip cvview f * A);

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

voidvsip mrect f(const vsip mview f * R,const vsip mview f * P,const vsip cmview f * A);

Convert a pair of real matrices fromcomplex polar to complex rectangularform.

voidvsip Dvscatter P(const vsip Dvview P * X,const vsip Dvview P * Y,const vsip vview vi * I);

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:

vsip vscatter fvsip vscatter ivsip vscatter sivsip cvscatter f

voidvsip Dmscatter P(const vsip Dvview P * X,const vsip Dmview P * Y,const vsip vview mi * I);

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:

vsip mscatter fvsip mscatter ivsip mscatter sivsip cmscatter f

VSIPL/Content [3.1] NASoftware 39

Page 41: VSIPL/Content [3.1] · vsip vdestroy mi VSIPL/Content [3.1] NASoftware 4. Chapter 1. Support Functions Prototype Description vsip Dscalar P vsip Dvget P(constvsip Dvview P*vector,

Chapter 4. Elementwise Functions

Prototype Descriptionvoidvsip Dvswap P(const vsip Dvview P * A,const vsip Dvview P * B);

Swap elements between two vectors.The following instances are supported:

vsip vswap fvsip vswap ivsip vswap sivsip cvswap f

voidvsip Dmswap P(const vsip Dmview P * A,const vsip Dmview P * B);

Swap elements between two matrices.The following instances are supported:

vsip mswap fvsip mswap ivsip mswap sivsip cmswap f

4.10 Extensions

Prototype Descriptionvsip scalar fvsip vcsummgval f(const vsip cvview f * A);

Returns the sum of the magnitudes ofthe elements of a complex vector.

VSIPL/Content [3.1] NASoftware 40

Page 42: VSIPL/Content [3.1] · vsip vdestroy mi VSIPL/Content [3.1] NASoftware 4. Chapter 1. Support Functions Prototype Description vsip Dscalar P vsip Dvget P(constvsip Dvview P*vector,

Chapter 5. Signal Processing Functions

5.1 FFT Functions

Prototype Descriptionvsip fft f *vsip ccfftip create f(const vsip index length,const vsip scalar f scale,const vsip fft dir dir,const vsip length ntimes,const vsip alg hint hint);

Create a 1D FFT object.

vsip fft f *vsip ccfftop create f(const vsip index length,const vsip scalar f scale,const vsip fft dir dir,const vsip length ntimes,const vsip alg hint hint);

Create a 1D FFT object.

vsip fft f *vsip crfftop create f(const vsip index length,const vsip scalar f scale,const vsip length ntimes,const vsip alg hint hint);

Create a 1D FFT object.

vsip fft f *vsip rcfftop create f(const vsip index length,const vsip scalar f scale,const vsip length ntimes,const vsip alg hint hint);

Create a 1D FFT object.

intvsip fft destroy f(vsip fft f * plan);

Destroy an FFT object.

voidvsip fft getattr f(const vsip fft f * plan,vsip fft attr f * attr);

Return the attributes of an FFT ob-ject.

voidvsip ccfftip f(const vsip fft f * plan,const vsip cvview f * xy);

Apply a complex-to-complex FastFourier Transform (FFT).

voidvsip ccfftop f(const vsip fft f * plan,const vsip cvview f * x,const vsip cvview f * y);

Apply a complex-to-complex FastFourier Transform (FFT).

voidvsip crfftop f(const vsip fft f * plan,const vsip cvview f * x,const vsip vview f * y);

Apply a complex-to-real Fast FourierTransform (FFT).

voidvsip rcfftop f(const vsip fft f * plan,const vsip vview f * x,const vsip cvview f * y);

Apply a real-to-complex Fast FourierTransform (FFT).

VSIPL/Content [3.1] NASoftware 41

Page 43: VSIPL/Content [3.1] · vsip vdestroy mi VSIPL/Content [3.1] NASoftware 4. Chapter 1. Support Functions Prototype Description vsip Dscalar P vsip Dvget P(constvsip Dvview P*vector,

Chapter 5. Signal Processing Functions

Prototype Descriptionvsip fftm f *vsip ccfftmip create f(const vsip index rows,const vsip index cols,const vsip scalar f scale,const vsip fft dir dir,const vsip major major,const vsip length ntimes,const vsip alg hint hint);

Create a 1D multiple FFT object.

vsip fftm f *vsip ccfftmop create f(const vsip index rows,const vsip index cols,const vsip scalar f scale,const vsip fft dir dir,const vsip major major,const vsip length ntimes,const vsip alg hint hint);

Create a 1D multiple FFT object.

vsip fftm f *vsip crfftmop create f(const vsip index rows,const vsip index cols,const vsip scalar f scale,const vsip major major,const vsip length ntimes,const vsip alg hint hint);

Create a 1D multiple FFT object.

vsip fftm f *vsip rcfftmop create f(const vsip index rows,const vsip index cols,const vsip scalar f scale,const vsip major major,const vsip length ntimes,const vsip alg hint hint);

Create a 1D multiple FFT object.

intvsip fftm destroy f(vsip fftm f * plan);

Destroy an FFT object.

voidvsip fftm getattr f(const vsip fftm f * plan,vsip fftm attr f * attr);

Return the attributes of an FFT ob-ject.

voidvsip ccfftmip f(const vsip fftm f * plan,const vsip cmview f * XY);

Apply a multiple complex-to-complexFast Fourier Transform (FFT).

voidvsip ccfftmop f(const vsip fftm f * plan,const vsip cmview f * X,const vsip cmview f * Y);

Apply a multiple complex-to-complexFast Fourier Transform (FFT).

voidvsip crfftmop f(const vsip fftm f * plan,const vsip cmview f * X,const vsip mview f * Y);

Apply a multiple complex-to-real FastFourier Transform (FFT).

voidvsip rcfftmop f(const vsip fftm f * plan,const vsip mview f * X,const vsip cmview f * Y);

Apply a multiple real-to-complex out ofplace Fast Fourier Transform (FFT).

VSIPL/Content [3.1] NASoftware 42

Page 44: VSIPL/Content [3.1] · vsip vdestroy mi VSIPL/Content [3.1] NASoftware 4. Chapter 1. Support Functions Prototype Description vsip Dscalar P vsip Dvget P(constvsip Dvview P*vector,

Chapter 5. Signal Processing Functions

Prototype Descriptionvsip fft2d f *vsip ccfft2dip create f(const vsip index rows,const vsip index cols,const vsip scalar f scale,const vsip fft dir dir,const vsip length ntimes,const vsip alg hint hint);

Create a 2D FFT object.

vsip fft2d f *vsip ccfft2dop create f(const vsip index rows,const vsip index cols,const vsip scalar f scale,const vsip fft dir dir,const vsip length ntimes,const vsip alg hint hint);

Create a 2D FFT object.

vsip fft2d f *vsip crfft2dop create f(const vsip index rows,const vsip index cols,const vsip scalar f scale,const vsip length ntimes,const vsip alg hint hint);

Create a 2D FFT object.

vsip fft2d f *vsip rcfft2dop create f(const vsip index rows,const vsip index cols,const vsip scalar f scale,const vsip length ntimes,const vsip alg hint hint);

Create a 2D FFT object.

intvsip fft2d destroy f(vsip fft2d f * plan);

Destroy an FFT object.

voidvsip fft2d getattr f(const vsip fft2d f * plan,vsip fft2d attr f * attr);

Return the attributes of an FFT ob-ject.

voidvsip ccfft2dip f(const vsip fft2d f * plan,const vsip cmview f * XY);

Apply a complex-to-complex 2D FastFourier Transform (FFT).

voidvsip ccfft2dop f(const vsip fft2d f * plan,const vsip cmview f * X,const vsip cmview f * Y);

Apply a complex-to-complex 2D FastFourier Transform (FFT).

voidvsip crfft2dop f(const vsip fft2d f * plan,const vsip cmview f * X,const vsip mview f * Y);

Apply a complex-to-real 2D FastFourier Transform (FFT).

voidvsip rcfft2dop f(const vsip fft2d f * plan,const vsip mview f * X,const vsip cmview f * Y);

Apply a real-to-complex 2D FastFourier Transform (FFT).

VSIPL/Content [3.1] NASoftware 43

Page 45: VSIPL/Content [3.1] · vsip vdestroy mi VSIPL/Content [3.1] NASoftware 4. Chapter 1. Support Functions Prototype Description vsip Dscalar P vsip Dvget P(constvsip Dvview P*vector,

Chapter 5. Signal Processing Functions

5.2 Convolution/Correlation Functions

Prototype Descriptionvsip conv1d f *vsip conv1d create f(const vsip vview f * kernel,const vsip symmetry symm,const vsip length N,const vsip length D,const vsip support region support,const vsip length ntimes,const vsip alg hint hint);

Create a decimated 1D convolution fil-ter object.

intvsip conv1d destroy f(vsip conv1d f * plan);

Destroy a 1D convolution object.

voidvsip conv1d getattr f(const vsip conv1d f * plan,vsip conv1d attr f * attr);

Returns the attributes for a 1D convo-lution object.

voidvsip convolve1d f(const vsip conv1d f * plan,const vsip vview f * x,const vsip vview f * y);

Compute a decimated real one-dimensional (1D) convolution of twovectors.

vsip conv2d f *vsip conv2d create f(const vsip mview f * H,const vsip symmetry symm,const vsip length P,const vsip length Q,const vsip length D,const vsip support region support,const vsip length ntimes,const vsip alg hint hint);

Create a decimated 2D convolution fil-ter object.

intvsip conv2d destroy f(vsip conv2d f * plan);

Destroy a 2D convolution object.

voidvsip conv2d getattr f(const vsip conv2d f * plan,vsip conv2d attr f * attr);

Returns the attributes for a 2D convo-lution object.

voidvsip convolve2d f(const vsip conv2d f * plan,const vsip mview f * x,const vsip mview f * y);

Compute a decimated real two-dimensional (2D) convolution of twomatrices.

vsip Dcorr1d P *vsip Dcorr1d create P(const vsip length M,const vsip length N,const vsip support region support,const vsip length ntimes,const vsip alg hint hint);

Create a 1D correlation object.The following instances are supported:

vsip corr1d create fvsip ccorr1d create f

intvsip Dcorr1d destroy P(vsip Dcorr1d P * plan);

Destroy a 1D correlation object.The following instances are supported:

vsip corr1d destroy fvsip ccorr1d destroy f

VSIPL/Content [3.1] NASoftware 44

Page 46: VSIPL/Content [3.1] · vsip vdestroy mi VSIPL/Content [3.1] NASoftware 4. Chapter 1. Support Functions Prototype Description vsip Dscalar P vsip Dvget P(constvsip Dvview P*vector,

Chapter 5. Signal Processing Functions

Prototype Descriptionvoidvsip Dcorr1d getattr P(const vsip Dcorr1d P * plan,vsip Dcorr1d attr P * attr);

Return the attributes for a 1D correla-tion object.The following instances are supported:

vsip corr1d getattr fvsip ccorr1d getattr f

voidvsip Dcorrelate1d P(const vsip Dcorr1d P * plan,const vsip bias bias,const vsip Dvview P * ref,const vsip Dvview P * x,const vsip Dvview P * y);

Compute a real one-dimensional (1D)correlation of two vectors.The following instances are supported:

vsip correlate1d fvsip ccorrelate1d f

vsip Dcorr2d P *vsip Dcorr2d create P(const vsip length M,const vsip length N,vsip length P,vsip length Q,const vsip support region support,const vsip length ntimes,const vsip alg hint hint);

Create a 2D correlation object.The following instances are supported:

vsip corr2d create fvsip ccorr2d create f

intvsip Dcorr2d destroy P(vsip Dcorr2d P * plan);

Destroy a 2D correlation object.The following instances are supported:

vsip corr2d destroy fvsip ccorr2d destroy f

voidvsip Dcorr2d getattr P(const vsip Dcorr2d P * plan,vsip Dcorr2d attr P * attr);

Return the attributes for a 2D correla-tion object.The following instances are supported:

vsip corr2d getattr fvsip ccorr2d getattr f

voidvsip Dcorrelate2d P(const vsip Dcorr2d P * plan,const vsip bias bias,const vsip Dmview P * ref,const vsip Dmview P * x,const vsip Dmview P * y);

Compute a two-dimensional (2D) cor-relation of two matrices.The following instances are supported:

vsip correlate2d fvsip ccorrelate2d f

5.3 Window Functions

Prototype Descriptionvsip vview f *vsip vcreate blackman f(const vsip length N,const vsip memory hint hint);

Create a vector with Blackman windowweights.

vsip vview f *vsip vcreate cheby f(const vsip length N,const vsip scalar f ripple,const vsip memory hint hint);

Create a vector with Dolph-Chebyshevwindow weights.

vsip vview f *vsip vcreate hanning f(const vsip length N,const vsip memory hint hint);

Create a vector with Hanning windowweights.

VSIPL/Content [3.1] NASoftware 45

Page 47: VSIPL/Content [3.1] · vsip vdestroy mi VSIPL/Content [3.1] NASoftware 4. Chapter 1. Support Functions Prototype Description vsip Dscalar P vsip Dvget P(constvsip Dvview P*vector,

Chapter 5. Signal Processing Functions

Prototype Descriptionvsip vview f *vsip vcreate kaiser f(const vsip length N,const vsip scalar f beta,const vsip memory hint hint);

Create a vector with Kaiser windowweights.

5.4 Filter Functions

Prototype Descriptionvsip Dfir P *vsip Dfir create P(const vsip Dvview P * kernel,const vsip symmetry symm,const vsip length N,const vsip length D,const vsip obj state state,const vsip length ntimes,const vsip alg hint hint);

Create a decimated FIR filter object.The following instances are supported:

vsip fir create fvsip cfir create f

intvsip Dfir destroy P(vsip Dfir P * plan);

Destroy a FIR filter object.The following instances are supported:

vsip fir destroy fvsip cfir destroy f

intvsip Dfirflt P(vsip Dfir P * plan,const vsip Dvview P * x,const vsip Dvview P * y);

FIR filter an input sequence and deci-mate the output.The following instances are supported:

vsip firflt fvsip cfirflt f

voidvsip Dfir getattr P(const vsip Dfir P * plan,vsip Dfir attr P * attr);

Return the attributes of a FIR filter ob-ject.The following instances are supported:

vsip fir getattr fvsip cfir getattr f

voidvsip Dfir reset P(vsip Dfir P * fir);

Reset the state of a decimated FIR fil-ter object.The following instances are supported:

vsip fir reset fvsip cfir reset f

5.5 Miscellaneous signal Processing Functions

Prototype Descriptionvoidvsip vhisto f(const vsip vview f * A,const vsip scalar f min,const vsip scalar f max,const vsip hist opt opt,const vsip vview f * R);

Compute the histogram of a vector.

VSIPL/Content [3.1] NASoftware 46

Page 48: VSIPL/Content [3.1] · vsip vdestroy mi VSIPL/Content [3.1] NASoftware 4. Chapter 1. Support Functions Prototype Description vsip Dscalar P vsip Dvget P(constvsip Dvview P*vector,

Chapter 6. Linear Algebra

6.1 Matrix and Vector Operations

Prototype Descriptionvoidvsip cmherm f(const vsip cmview f * A,const vsip cmview f * R);

Complex Hermitian (conjugate trans-pose) of a matrix.

vsip cscalar fvsip cvjdot f(const vsip cvview f * A,const vsip cvview f * B);

Compute the conjugate inner (dot)product of two complex vectors.

voidvsip gemp f(const vsip scalar f alpha,const vsip mview f * A,const vsip mat op Aop,const vsip mview f * B,const vsip mat op Bop,const vsip scalar f beta,const vsip mview f * R);

Calculate the general product of twomatrices and accumulate.

voidvsip cgemp f(const vsip cscalar f alpha,const vsip cmview f * A,const vsip mat op Aop,const vsip cmview f * B,const vsip mat op Bop,const vsip cscalar f beta,const vsip cmview f * R);

Calculate the general product of twomatrices and accumulate.

voidvsip gems f(const vsip scalar f alpha,const vsip mview f * A,const vsip mat op Aop,const vsip scalar f beta,const vsip mview f * C);

Calculate a general matrix sum.

voidvsip cgems f(const vsip cscalar f alpha,const vsip cmview f * A,const vsip mat op Aop,const vsip cscalar f beta,const vsip cmview f * C);

Calculate a general matrix sum.

voidvsip Dmprod P(const vsip Dmview P * A,const vsip Dmview P * B,const vsip Dmview P * R);

Calculate the product of two matrices.The following instances are supported:

vsip mprod fvsip mprod ivsip mprod sivsip cmprod fvsip cmprod ivsip cmprod si

VSIPL/Content [3.1] NASoftware 47

Page 49: VSIPL/Content [3.1] · vsip vdestroy mi VSIPL/Content [3.1] NASoftware 4. Chapter 1. Support Functions Prototype Description vsip Dscalar P vsip Dvget P(constvsip Dvview P*vector,

Chapter 6. Linear Algebra

Prototype Descriptionvoidvsip cmprodh P(const vsip cmview P * A,const vsip cmview P * B,const vsip cmview P * R);

Calculate the product a complex ma-trix and the Hermitian of a complexmatrix.The following instances are supported:

vsip cmprodh fvsip cmprodh ivsip cmprodh si

voidvsip cmprodj P(const vsip cmview P * A,const vsip cmview P * B,const vsip cmview P * R);

Calculate the product a complex ma-trix and the conjugate of a complex ma-trix.The following instances are supported:

vsip cmprodj fvsip cmprodj ivsip cmprodj si

voidvsip Dmprodt P(const vsip Dmview P * A,const vsip Dmview P * B,const vsip Dmview P * R);

Calculate the product of a matrix andthe transpose of a matrix.The following instances are supported:

vsip mprodt fvsip mprodt ivsip mprodt sivsip cmprodt fvsip cmprodt ivsip cmprodt si

voidvsip Dmvprod P(const vsip Dmview P * A,const vsip Dvview P * X,const vsip Dvview P * Y);

Calculate a matrix–vector product.The following instances are supported:

vsip mvprod fvsip mvprod ivsip mvprod sivsip cmvprod fvsip cmvprod ivsip cmvprod si

voidvsip Dmtrans P(const vsip Dmview P * A,const vsip Dmview P * R);

Transpose a matrix.The following instances are supported:

vsip mtrans blvsip mtrans fvsip mtrans ivsip mtrans sivsip cmtrans fvsip cmtrans ivsip cmtrans si

vsip Dscalar Pvsip Dvdot P(const vsip Dvview P * A,const vsip Dvview P * B);

Compute the inner (dot) product oftwo vectors.The following instances are supported:

vsip vdot fvsip cvdot f

VSIPL/Content [3.1] NASoftware 48

Page 50: VSIPL/Content [3.1] · vsip vdestroy mi VSIPL/Content [3.1] NASoftware 4. Chapter 1. Support Functions Prototype Description vsip Dscalar P vsip Dvget P(constvsip Dvview P*vector,

Chapter 6. Linear Algebra

Prototype Descriptionvoidvsip Dvmprod P(const vsip Dvview P * X,const vsip Dmview P * A,const vsip Dvview P * Y);

Calculate a vector–matrix product.The following instances are supported:

vsip vmprod fvsip vmprod ivsip vmprod sivsip cvmprod fvsip cvmprod ivsip cvmprod si

voidvsip vouter f(const vsip scalar f alpha,const vsip vview f * X,const vsip vview f * Y,const vsip vview f * R);

Calculate the outer product of two vec-tors.

voidvsip cvouter f(const vsip cscalar f alpha,const vsip cvview f * X,const vsip cvview f * Y,const vsip cvview f * R);

Calculate the outer product of two vec-tors.

6.2 Special Linear System Solvers

Prototype Descriptionintvsip covsol f(const vsip mview f * A,const vsip mview f * XB);

Solve a covariance linear system prob-lem.

intvsip ccovsol f(const vsip cmview f * A,const vsip cmview f * XB);

Solve a covariance linear system prob-lem.

intvsip llsqsol f(const vsip mview f * A,const vsip mview f * XB);

Solve a linear least squares problem.

intvsip cllsqsol f(const vsip cmview f * A,const vsip cmview f * XB);

Solve a linear least squares problem.

intvsip toepsol f(const vsip vview f * T,const vsip vview f * B,const vsip vview f * W,const vsip vview f * X);

Solve a real symmetric positive definiteToeplitz linear system.

intvsip ctoepsol f(const vsip cvview f * T,const vsip cvview f * B,const vsip cvview f * W,const vsip cvview f * X);

Solve a real symmetric positive definiteToeplitz linear system.

VSIPL/Content [3.1] NASoftware 49

Page 51: VSIPL/Content [3.1] · vsip vdestroy mi VSIPL/Content [3.1] NASoftware 4. Chapter 1. Support Functions Prototype Description vsip Dscalar P vsip Dvget P(constvsip Dvview P*vector,

Chapter 6. Linear Algebra

6.3 General Square Linear System Solver

Prototype Descriptionintvsip Dlud P(vsip clu P * lud,const vsip Dmview P * A);

Compute an LU decomposition of asquare matrix using partial pivoting.The following instances are supported:

vsip lud fvsip clud f

vsip Dlu P *vsip Dlud create P(const vsip length N);

Create an LU decomposition object.The following instances are supported:

vsip lud create fvsip clud create f

intvsip Dlud destroy P(vsip Dlu P * lud);

Destroy an LU decomposition object.The following instances are supported:

vsip lud destroy fvsip clud destroy f

voidvsip Dlud getattr P(const vsip Dlu P * lud,vsip Dlu attr P * attr);

Returns the attributes of an LU decom-position object.The following instances are supported:

vsip lud getattr fvsip clud getattr f

intvsip lusol f(const vsip clu f * clud,const vsip mat op opA,const vsip mview f * XB);

Solve a square linear system.

intvsip clusol f(const vsip clu f * clud,const vsip mat op opA,const vsip cmview f * XB);

Solve a square linear system.

6.4 Symmetric Positive Definite Linear System Solver

Prototype Descriptionintvsip chold f(vsip cchol f * chold,const vsip mview f * A);

Compute a Cholesky decomposition ofa symmetric positive definite matrix.

intvsip cchold f(vsip cchol f * chold,const vsip cmview f * A);

Compute a Cholesky decomposition ofa symmetric positive definite matrix.

vsip chol f *vsip chold create f(const vsip mat uplo uplo,const vsip length n);

Creates a Cholesky decomposition ob-ject.

vsip cchol f *vsip cchold create f(const vsip mat uplo uplo,const vsip length n);

Creates a Cholesky decomposition ob-ject.

VSIPL/Content [3.1] NASoftware 50

Page 52: VSIPL/Content [3.1] · vsip vdestroy mi VSIPL/Content [3.1] NASoftware 4. Chapter 1. Support Functions Prototype Description vsip Dscalar P vsip Dvget P(constvsip Dvview P*vector,

Chapter 6. Linear Algebra

Prototype Descriptionintvsip Dchold destroy P(vsip Dchol P * chold);

Destroy a Cholesky decomposition ob-ject.The following instances are supported:

vsip chold destroy fvsip cchold destroy f

voidvsip Dchold getattr P(const vsip Dchol P * chold,vsip Dchol attr P * attr);

Returns the attributes of a Choleskydecomposition object.The following instances are supported:

vsip chold getattr fvsip cchold getattr f

intvsip cholsol f(const vsip cchol f * chold,const vsip mview f * XB);

Solve a symmetric positive definite lin-ear system.

intvsip ccholsol f(const vsip cchol f * chold,const vsip cmview f * XB);

Solve a symmetric positive definite lin-ear system.

6.5 Overdetermined Linear System Solver

Prototype Descriptionintvsip qrd f(vsip cqr f * qrd,const vsip mview f * A);

Compute a QR decomposition of a ma-trix .

intvsip cqrd f(vsip cqr f * qrd,const vsip cmview f * A);

Compute a QR decomposition of a ma-trix .

vsip qr f *vsip qrd create f(const vsip length m,const vsip length n,const vsip qrd qopt qopt);

Create a QR decomposition object.

vsip cqr f *vsip cqrd create f(const vsip length m,const vsip length n,const vsip qrd qopt qopt);

Create a QR decomposition object.

intvsip Dqrd destroy P(vsip Dqr P * qrd);

Destroy a QR decomposition object.The following instances are supported:

vsip qrd destroy fvsip cqrd destroy f

voidvsip Dqrd getattr P(const vsip Dqr P * qrd,vsip Dqr attr P * attr);

Returns the attributes of a QR decom-position object.The following instances are supported:

vsip qrd getattr fvsip cqrd getattr f

VSIPL/Content [3.1] NASoftware 51

Page 53: VSIPL/Content [3.1] · vsip vdestroy mi VSIPL/Content [3.1] NASoftware 4. Chapter 1. Support Functions Prototype Description vsip Dscalar P vsip Dvget P(constvsip Dvview P*vector,

Chapter 6. Linear Algebra

Prototype Descriptionintvsip qrdprodq f(const vsip qr f * qrd,const vsip mat op opQ,const vsip mat side apQ,const vsip mview f * C);

Multiply a matrix by the matrix Qfrom a QR decomposition.

intvsip cqrdprodq f(const vsip cqr f * qrd,const vsip mat op opQ,const vsip mat side apQ,const vsip cmview f * C);

Multiply a matrix by the matrix Qfrom a QR decomposition.

intvsip qrdsolr f(const vsip qr f * qrd,const vsip mat op OpR,const vsip scalar f alpha,const vsip mview f * XB);

Solve linear system based on the ma-trix R, from QR decomposition of thematrix A.

intvsip cqrdsolr f(const vsip cqr f * qrd,const vsip mat op OpR,const vsip cscalar f alpha,const vsip cmview f * XB);

Solve linear system based on the ma-trix R, from QR decomposition of thematrix A.

intvsip qrsol f(const vsip qr f * qrd,const vsip qrd prob prob,const vsip mview f * XB);

Solve either a linear covariance or linearleast squares problem.

intvsip cqrsol f(const vsip cqr f * qrd,const vsip qrd prob prob,const vsip cmview f * XB);

Solve either a linear covariance or linearleast squares problem.

6.6 Extensions

Prototype Descriptionvoidvsip Dminvlu P(const vsip Dmview P * A,const vsip vview i * V,const vsip Dmview P * R);

Invert a square matrix using LU de-composition.The following instances are supported:

vsip minvlu fvsip cminvlu f

VSIPL/Content [3.1] NASoftware 52