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

VSIPL/Content [3.1D] - NASoftware · vsip Dmview P*matrix); Destroy a matrix, its associated block, and any VSIPL data array bound to the block. The following instances are supported:

  • Upload
    lebao

  • View
    227

  • Download
    0

Embed Size (px)

Citation preview

VSIPLList of Contents

VSIPL/Content [3.1D]

Release 3.1DMay 2013

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 dvsip blockadmit ivsip blockadmit sivsip cblockadmit fvsip cblockadmit dvsip 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 dvsip blockbind ivsip blockbind sivsip blockbind blvsip blockbind vivsip blockbind mi

VSIPL/Content [3.1D] NASoftware 1

Chapter 1. Support Functions

Prototype Descriptionvsip 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 dvsip cblockbind ivsip cblockbind si

vsip 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 dvsip blockcreate ivsip blockcreate sivsip cblockcreate fvsip cblockcreate dvsip 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 dvsip blockdestroy ivsip blockdestroy sivsip cblockdestroy fvsip cblockdestroy dvsip 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 dvsip 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 dvsip cblockfind ivsip cblockfind si

VSIPL/Content [3.1D] NASoftware 2

Chapter 1. Support Functions

Prototype Descriptionvsip 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 dvsip blockrebind ivsip blockrebind sivsip blockrebind blvsip blockrebind vivsip blockrebind mi

voidvsip 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 dvsip 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 dvsip 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 dvsip 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

VSIPL/Content [3.1D] NASoftware 3

Chapter 1. Support 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 dvsip valldestroy ivsip valldestroy sivsip cvalldestroy fvsip cvalldestroy dvsip cvalldestroy ivsip cvalldestroy sivsip valldestroy blvsip valldestroy vivsip valldestroy mi

vsip 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 dvsip vbind ivsip vbind sivsip cvbind fvsip cvbind dvsip 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 dvsip vcloneview ivsip vcloneview sivsip cvcloneview fvsip cvcloneview dvsip 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 dvsip vcreate ivsip vcreate sivsip cvcreate fvsip cvcreate dvsip cvcreate ivsip cvcreate sivsip vcreate blvsip vcreate vivsip vcreate mi

VSIPL/Content [3.1D] NASoftware 4

Chapter 1. Support Functions

Prototype Descriptionvsip 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 dvsip vdestroy ivsip vdestroy sivsip cvdestroy fvsip cvdestroy dvsip cvdestroy ivsip cvdestroy sivsip vdestroy blvsip vdestroy vivsip vdestroy mi

vsip 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 dvsip vget ivsip vget sivsip cvget fvsip cvget dvsip 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 dvsip vgetattrib ivsip vgetattrib sivsip cvgetattrib fvsip cvgetattrib dvsip 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 dvsip vgetblock ivsip vgetblock sivsip cvgetblock fvsip cvgetblock dvsip cvgetblock ivsip cvgetblock sivsip vgetblock blvsip vgetblock vivsip vgetblock mi

VSIPL/Content [3.1D] NASoftware 5

Chapter 1. Support Functions

Prototype Descriptionvsip 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 dvsip vgetlength ivsip vgetlength sivsip cvgetlength fvsip cvgetlength dvsip cvgetlength ivsip cvgetlength sivsip vgetlength blvsip vgetlength vivsip vgetlength mi

vsip 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 dvsip vgetoffset ivsip vgetoffset sivsip cvgetoffset fvsip cvgetoffset dvsip 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 dvsip vgetstride ivsip vgetstride sivsip cvgetstride fvsip cvgetstride dvsip 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 dvsip vimagview ivsip vimagview si

VSIPL/Content [3.1D] NASoftware 6

Chapter 1. Support Functions

Prototype Descriptionvoidvsip 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 dvsip vput ivsip vput sivsip cvput fvsip cvput dvsip 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 dvsip vputattrib ivsip vputattrib sivsip cvputattrib fvsip cvputattrib dvsip cvputattrib ivsip cvputattrib sivsip vputattrib blvsip vputattrib vivsip vputattrib mi

vsip 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 dvsip vputlength ivsip vputlength sivsip cvputlength fvsip cvputlength dvsip 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 dvsip vputoffset ivsip vputoffset sivsip cvputoffset fvsip cvputoffset dvsip cvputoffset ivsip cvputoffset sivsip vputoffset blvsip vputoffset vivsip vputoffset mi

VSIPL/Content [3.1D] NASoftware 7

Chapter 1. Support Functions

Prototype Descriptionvsip 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 dvsip vputstride ivsip vputstride sivsip cvputstride fvsip cvputstride dvsip 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 dvsip 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 dvsip vsubview ivsip vsubview sivsip cvsubview fvsip cvsubview dvsip cvsubview ivsip cvsubview sivsip vsubview blvsip vsubview vivsip vsubview mi

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 dvsip malldestroy ivsip malldestroy sivsip cmalldestroy fvsip cmalldestroy dvsip cmalldestroy ivsip cmalldestroy sivsip malldestroy bl

VSIPL/Content [3.1D] NASoftware 8

Chapter 1. Support Functions

Prototype Descriptionvsip 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 dvsip mbind ivsip mbind sivsip cmbind fvsip cmbind dvsip 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 dvsip mcloneview ivsip mcloneview sivsip cmcloneview fvsip cmcloneview dvsip 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 dvsip mcolview ivsip mcolview sivsip cmcolview fvsip cmcolview dvsip 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 dvsip mcreate ivsip mcreate sivsip cmcreate fvsip cmcreate dvsip cmcreate ivsip cmcreate sivsip mcreate bl

VSIPL/Content [3.1D] NASoftware 9

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 dvsip mdestroy ivsip mdestroy sivsip cmdestroy fvsip cmdestroy dvsip 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 dvsip mdiagview ivsip mdiagview sivsip cmdiagview fvsip cmdiagview dvsip 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 dvsip mget ivsip mget sivsip cmget fvsip cmget dvsip 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 dvsip mgetattrib ivsip mgetattrib sivsip cmgetattrib fvsip cmgetattrib dvsip cmgetattrib ivsip cmgetattrib sivsip mgetattrib bl

VSIPL/Content [3.1D] NASoftware 10

Chapter 1. Support Functions

Prototype Descriptionvsip 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 dvsip mgetblock ivsip mgetblock sivsip cmgetblock fvsip cmgetblock dvsip cmgetblock ivsip cmgetblock sivsip mgetblock bl

vsip 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 dvsip mgetcollength ivsip mgetcollength sivsip cmgetcollength fvsip cmgetcollength dvsip 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 dvsip mgetcolstride ivsip mgetcolstride sivsip cmgetcolstride fvsip cmgetcolstride dvsip 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 dvsip mgetoffset ivsip mgetoffset sivsip cmgetoffset fvsip cmgetoffset dvsip cmgetoffset ivsip cmgetoffset sivsip mgetoffset bl

VSIPL/Content [3.1D] NASoftware 11

Chapter 1. Support Functions

Prototype Descriptionvsip 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 mgetrowlength dvsip cmgetrowlength fvsip cmgetrowlength dvsip 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 dvsip mgetrowstride ivsip mgetrowstride sivsip cmgetrowstride fvsip cmgetrowstride dvsip 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 dvsip mimagview ivsip mimagview si

voidvsip 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 dvsip mput ivsip mput sivsip cmput fvsip cmput dvsip 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 dvsip mputattrib ivsip mputattrib sivsip cmputattrib fvsip cmputattrib dvsip cmputattrib ivsip cmputattrib sivsip mputattrib bl

VSIPL/Content [3.1D] NASoftware 12

Chapter 1. Support Functions

Prototype Descriptionvsip 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 dvsip mputcollength ivsip mputcollength sivsip cmputcollength fvsip cmputcollength dvsip 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 dvsip mputcolstride ivsip mputcolstride sivsip cmputcolstride fvsip cmputcolstride dvsip 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 dvsip mputoffset ivsip mputoffset sivsip cmputoffset fvsip cmputoffset dvsip cmputoffset ivsip cmputoffset sivsip mputoffset bl

vsip 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 dvsip mputrowlength ivsip mputrowlength sivsip cmputrowlength fvsip cmputrowlength dvsip cmputrowlength ivsip cmputrowlength sivsip mputrowlength bl

VSIPL/Content [3.1D] NASoftware 13

Chapter 1. Support Functions

Prototype Descriptionvsip 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 dvsip mputrowstride ivsip mputrowstride sivsip cmputrowstride fvsip cmputrowstride dvsip 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 dvsip 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 dvsip mrowview ivsip mrowview sivsip cmrowview fvsip cmrowview dvsip 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 dvsip msubview ivsip msubview sivsip cmsubview fvsip cmsubview dvsip cmsubview ivsip cmsubview sivsip msubview bl

VSIPL/Content [3.1D] NASoftware 14

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 dvsip mtransview ivsip mtransview sivsip cmtransview fvsip cmtransview dvsip cmtransview ivsip cmtransview sivsip mtransview bl

VSIPL/Content [3.1D] NASoftware 15

Chapter 2. Scalar Functions

2.1 Real Scalar Functions

Prototype Descriptionvsip scalar Pvsip acos P(const vsip scalar P A);

Computes the principal radian value in[0, π] of the inverse cosine of a scalar.The following instances are supported:

vsip acos fvsip acos d

vsip scalar Pvsip asin P(const vsip scalar P A);

Computes the principal radian value in[0, π] of the inverse sine of a scalar.The following instances are supported:

vsip asin fvsip asin d

vsip scalar Pvsip atan P(const vsip scalar P A);

Computes the principal radian value in[−π/2, π/2] of the inverse tangent of ascalar.The following instances are supported:

vsip atan fvsip atan d

vsip scalar Pvsip atan2 P(const vsip scalar P A,const vsip scalar P B);

Computes the four-quadrant radianvalue in [−π, π] of the inverse tangentof the ratio of two scalars.The following instances are supported:

vsip atan2 fvsip atan2 d

vsip scalar Pvsip ceil P(const vsip scalar P A);

Computes the ceiling of a scalar.The following instances are supported:

vsip ceil fvsip ceil d

vsip scalar Pvsip cos P(const vsip scalar P A);

Computes the cosine of a scalar anglein radians.The following instances are supported:

vsip cos fvsip cos d

vsip scalar Pvsip cosh P(const vsip scalar P A);

Computes the hyperbolic cosine of ascalar.The following instances are supported:

vsip cosh fvsip cosh d

vsip scalar Pvsip exp P(const vsip scalar P A);

Computes the exponential of a scalar.The following instances are supported:

vsip exp fvsip exp d

VSIPL/Content [3.1D] NASoftware 16

Chapter 2. Scalar Functions

Prototype Descriptionvsip scalar Pvsip floor P(const vsip scalar P A);

Computes the floor of a scalar.The following instances are supported:

vsip floor fvsip floor d

vsip scalar Pvsip log P(const vsip scalar P A);

Computes the natural logarithm of ascalar.The following instances are supported:

vsip log fvsip log d

vsip scalar Pvsip log10 P(const vsip scalar P A);

Computes the base 10 logarithm of ascalar.The following instances are supported:

vsip log10 fvsip log10 d

vsip scalar Pvsip mag P(const vsip scalar P A);

Computes the magnitude (absolutevalue) of a scalar.The following instances are supported:

vsip mag fvsip mag d

vsip scalar Pvsip pow P(const vsip scalar P A,const vsip scalar P B);

Computes the power function of twoscalars.The following instances are supported:

vsip pow fvsip pow d

vsip scalar Pvsip sin P(const vsip scalar P A);

Computes the sine of a scalar angle inradians.The following instances are supported:

vsip sin fvsip sin d

vsip scalar Pvsip sinh P(const vsip scalar P A);

Computes the hyperbolic sine of ascalar.The following instances are supported:

vsip sinh fvsip sinh d

vsip scalar Pvsip sqrt P(const vsip scalar P A);

Computes the square root of a scalar.The following instances are supported:

vsip sqrt fvsip sqrt d

vsip scalar Pvsip tan P(const vsip scalar P A);

Computes the tangent of a scalar anglein radians.The following instances are supported:

vsip tan fvsip tan d

VSIPL/Content [3.1D] NASoftware 17

Chapter 2. Scalar Functions

Prototype Descriptionvsip scalar Pvsip tanh P(const vsip scalar P A);

Computes the hyperbolic tangent of ascalar.The following instances are supported:

vsip tanh fvsip tanh d

2.2 Complex Scalar Functions

Prototype Descriptionvsip scalar Pvsip arg P(vsip cscalar P x);

Returns the argument in radians[−π, π] of a complex scalar.The following instances are supported:

vsip arg fvsip arg d

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

Computes the complex sum of twoscalars.The following instances are supported:

vsip CADD fvsip CADD d

vsip cscalar Pvsip cadd P(vsip cscalar P x,vsip cscalar P y);

Computes the complex sum of twoscalars.The following instances are supported:

vsip cadd fvsip cadd d

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

Computes the complex sum of twoscalars.The following instances are supported:

vsip RCADD fvsip RCADD d

vsip cscalar Pvsip rcadd P(vsip scalar P x,vsip cscalar P y);

Computes the complex sum of twoscalars.The following instances are supported:

vsip rcadd fvsip rcadd d

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

Computes the complex quotient of twoscalars.The following instances are supported:

vsip CDIV fvsip CDIV d

vsip cscalar Pvsip cdiv P(vsip cscalar P x,vsip cscalar P y);

Computes the complex quotient of twoscalars.The following instances are supported:

vsip cdiv fvsip cdiv d

VSIPL/Content [3.1D] NASoftware 18

Chapter 2. Scalar Functions

Prototype Descriptionvoidvsip CRDIV P(vsip cscalar P x,vsip scalar P y,vsip cscalar P * z);

Computes the complex quotient of twoscalars.The following instances are supported:

vsip CRDIV fvsip CRDIV d

vsip cscalar Pvsip crdiv P(vsip cscalar P x,vsip scalar P y);

Computes the complex quotient of twoscalars.The following instances are supported:

vsip crdiv fvsip crdiv d

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

Computes the exponential of a scalar.The following instances are supported:

vsip CEXP fvsip CEXP d

vsip cscalar Pvsip cexp P(vsip cscalar P x);

Computes the complex exponential ofa scalar.The following instances are supported:

vsip cexp fvsip cexp d

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

Computes the product a complex scalarwith the conjugate of a second complexscalar.The following instances are supported:

vsip CJMUL fvsip CJMUL d

vsip cscalar Pvsip cjmul P(vsip cscalar P x,vsip cscalar P y);

Computes the product a complex scalarwith the conjugate of a second complexscalar.The following instances are supported:

vsip cjmul fvsip cjmul d

vsip scalar Pvsip cmag P(vsip cscalar P x);

Computes the magnitude of a complexscalar.The following instances are supported:

vsip cmag fvsip cmag d

vsip scalar Pvsip cmagsq P(vsip cscalar P x);

Computes the magnitude squared of acomplex scalar.The following instances are supported:

vsip cmagsq fvsip cmagsq d

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

Form a complex scalar from two realscalars.The following instances are supported:

vsip CMPLX fvsip CMPLX d

VSIPL/Content [3.1D] NASoftware 19

Chapter 2. Scalar Functions

Prototype Descriptionvsip cscalar Pvsip cmplx P(vsip scalar P re,vsip scalar P im);

Form a complex scalar from two realscalars.The following instances are supported:

vsip cmplx fvsip cmplx d

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

Computes the complex product of twoscalars.The following instances are supported:

vsip CMUL fvsip CMUL d

vsip cscalar Pvsip cmul P(vsip cscalar P x,vsip cscalar P y);

Computes the complex product of twoscalars.The following instances are supported:

vsip cmul fvsip cmul d

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

Computes the complex product of twoscalars.The following instances are supported:

vsip RCMUL fvsip RCMUL d

vsip cscalar Pvsip rcmul P(vsip scalar P x,vsip cscalar P y);

Computes the complex product of twoscalars.The following instances are supported:

vsip rcmul fvsip rcmul d

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

Computes the negation of a complexscalar.The following instances are supported:

vsip CNEG fvsip CNEG d

vsip cscalar Pvsip cneg P(vsip cscalar P x);

Computes the negation of a complexscalar.The following instances are supported:

vsip cneg fvsip cneg d

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

Computes the complex conjugate of ascalar.The following instances are supported:

vsip CONJ fvsip CONJ d

vsip cscalar Pvsip conj P(vsip cscalar P x);

Computes the complex conjugate of ascalar.The following instances are supported:

vsip conj fvsip conj d

VSIPL/Content [3.1D] NASoftware 20

Chapter 2. Scalar Functions

Prototype Descriptionvoidvsip CRECIP P(vsip cscalar P x,vsip cscalar P * y);

Computes the reciprocal of a complexscalar.The following instances are supported:

vsip CRECIP fvsip CRECIP d

vsip cscalar Pvsip crecip P(vsip cscalar P x);

Computes the reciprocal of a complexscalar.The following instances are supported:

vsip crecip fvsip crecip d

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

Computes the square root a complexscalar.The following instances are supported:

vsip CSQRT fvsip CSQRT d

vsip cscalar Pvsip csqrt P(vsip cscalar P x);

Computes the square root a complexscalar.The following instances are supported:

vsip csqrt fvsip csqrt d

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

Computes the complex difference oftwo scalars.The following instances are supported:

vsip CSUB fvsip CSUB d

vsip cscalar Pvsip csub P(vsip cscalar P x,vsip cscalar P y);

Computes the complex difference oftwo scalars.The following instances are supported:

vsip csub fvsip csub d

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

Computes the complex difference oftwo scalars.The following instances are supported:

vsip RCSUB fvsip RCSUB d

vsip cscalar Pvsip rcsub P(vsip scalar P x,vsip cscalar P y);

Computes the complex difference oftwo scalars.The following instances are supported:

vsip rcsub fvsip rcsub d

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

Computes the complex difference oftwo scalars.The following instances are supported:

vsip CRSUB fvsip CRSUB d

VSIPL/Content [3.1D] NASoftware 21

Chapter 2. Scalar Functions

Prototype Descriptionvsip cscalar Pvsip crsub P(vsip cscalar P x,vsip scalar P y);

Computes the complex difference oftwo scalars.The following instances are supported:

vsip crsub fvsip crsub d

vsip scalar Pvsip imag P(vsip cscalar P x);

Extract the imaginary part of a com-plex scalar.The following instances are supported:

vsip imag fvsip imag d

voidvsip polar P(vsip cscalar P a,vsip scalar P * r,vsip scalar P * 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.The following instances are supported:

vsip polar fvsip polar d

vsip scalar Pvsip real P(vsip cscalar P x);

Extract the real part of a complexscalar.The following instances are supported:

vsip real fvsip real d

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

Convert a pair of real scalars from com-plex polar to complex rectangular form.The following instances are supported:

vsip RECT fvsip RECT d

vsip cscalar Pvsip rect P(vsip scalar P r,vsip scalar P t);

Convert a pair of real scalars from com-plex polar to complex rectangular form.The following instances are supported:

vsip rect fvsip rect d

VSIPL/Content [3.1D] NASoftware 22

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.1D] NASoftware 23

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 Pvsip randu P(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).The following instances are supported:

vsip randu fvsip randu d

vsip cscalar Pvsip crandu P(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).The following instances are supported:

vsip crandu fvsip crandu d

voidvsip vrandu P(vsip randstate * state,const vsip vview P * 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).The following instances are supported:

vsip vrandu fvsip vrandu d

VSIPL/Content [3.1D] NASoftware 24

Chapter 3. Random Number Generation

Prototype Descriptionvoidvsip cvrandu P(vsip randstate * state,const vsip cvview P * 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).The following instances are supported:

vsip cvrandu fvsip cvrandu d

vsip scalar Pvsip randn P(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.The following instances are supported:

vsip randn fvsip randn d

vsip cscalar Pvsip crandn P(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.The following instances are supported:

vsip crandn fvsip crandn d

vsip scalar Pvsip vrandn P(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.The following instances are supported:

vsip vrandn fvsip vrandn d

voidvsip cvrandn P(vsip randstate * state,const vsip cvview P * 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.The following instances are supported:

vsip cvrandn fvsip cvrandn d

VSIPL/Content [3.1D] NASoftware 25

Chapter 4. Elementwise Functions

4.1 Elementary Mathematical Functions

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

Computes the principal radian value in[0, π] of the inverse cosine for each ele-ment of a vector.The following instances are supported:

vsip vacos fvsip vacos d

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

Computes the principal radian value in[0, π] of the inverse cosine for each ele-ment of a matrix.The following instances are supported:

vsip macos fvsip macos d

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

Computes the principal radian value in[0, π] of the inverse sine for each ele-ment of a vector.The following instances are supported:

vsip vasin fvsip vasin d

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

Computes the principal radian value in[0, π] of the inverse sine for each ele-ment of a matrix.The following instances are supported:

vsip masin fvsip masin d

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

Computes the principal radian value in[−π/2, π/2] of the inverse tangent foreach element of a vector.The following instances are supported:

vsip vatan fvsip vatan d

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

Computes the principal radian value in[−π/2, π/2] of the inverse tangent foreach element of a matrix.The following instances are supported:

vsip matan fvsip matan d

VSIPL/Content [3.1D] NASoftware 26

Chapter 4. Elementwise Functions

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

Computes the four-quadrant radianvalue in [−π, π] of the inverse tangentof the ratio of the elements of two inputvectors.The following instances are supported:

vsip vatan2 fvsip vatan2 d

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

Computes the four-quadrant radianvalue in [−π, π] of the inverse tangentof the ratio of the elements of two inputmatrices.The following instances are supported:

vsip matan2 fvsip matan2 d

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

Computes the cosine for each elementof a vector. Element angle values arein radians.The following instances are supported:

vsip vcos fvsip vcos d

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

Computes the cosine for each elementof a matrix. Element angle values arein radians.The following instances are supported:

vsip mcos fvsip mcos d

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

Computes the hyperbolic cosine foreach element of a vector.The following instances are supported:

vsip vcosh fvsip vcosh d

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

Computes the hyperbolic cosine foreach element of a matrix.The following instances are supported:

vsip mcosh fvsip mcosh d

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

Computes the exponential functionvalue for each element of a vector.The following instances are supported:

vsip vexp fvsip vexp d

voidvsip cvexp P(const vsip cvview P * A,const vsip cvview P * R);

Computes the exponential functionvalue for each element of a vector.The following instances are supported:

vsip cvexp fvsip cvexp d

VSIPL/Content [3.1D] NASoftware 27

Chapter 4. Elementwise Functions

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

Computes the exponential functionvalue for each element of a matrix.The following instances are supported:

vsip mexp fvsip mexp d

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

Computes the exponential functionvalue for each element of a matrix.The following instances are supported:

vsip cmexp fvsip cmexp d

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

Computes the base 10 exponential foreach element of a vector.The following instances are supported:

vsip vexp10 fvsip vexp10 d

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

Computes the base 10 exponential foreach element of a matrix.The following instances are supported:

vsip mexp10 fvsip mexp10 d

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

Computes the natural logarithm foreach element of a vector.The following instances are supported:

vsip vlog fvsip vlog d

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

Computes the natural logarithm foreach element of a vector.The following instances are supported:

vsip cvlog fvsip cvlog d

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

Computes the natural logarithm foreach element of a matrix.The following instances are supported:

vsip mlog fvsip mlog d

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

Computes the natural logarithm foreach element of a matrix.The following instances are supported:

vsip cmlog fvsip cmlog d

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

Compute the base ten logarithm foreach element of a vector.The following instances are supported:

vsip vlog10 fvsip vlog10 d

VSIPL/Content [3.1D] NASoftware 28

Chapter 4. Elementwise Functions

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

Compute the base ten logarithm foreach element of a matrix.The following instances are supported:

vsip mlog10 fvsip mlog10 d

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

Compute the sine for each element ofa vector. Element angle values are inradians.The following instances are supported:

vsip vsin fvsip vsin d

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

Compute the sine for each element ofa matrix. Element angle values are inradians.The following instances are supported:

vsip msin fvsip msin d

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

Computes the hyperbolic sine for eachelement of a vector.The following instances are supported:

vsip vsinh fvsip vsinh d

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

Computes the hyperbolic sine for eachelement of a matrix.The following instances are supported:

vsip msinh fvsip msinh d

voidvsip 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 vsqrt dvsip cvsqrt fvsip cvsqrt d

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 msqrt dvsip cmsqrt fvsip cmsqrt d

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

Compute the tangent for each elementof a vector. Element angle values arein radians.The following instances are supported:

vsip vtan fvsip vtan d

VSIPL/Content [3.1D] NASoftware 29

Chapter 4. Elementwise Functions

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

Compute the tangent for each elementof a matrix. Element angle values arein radians.The following instances are supported:

vsip mtan fvsip mtan d

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

Computes the hyperbolic tangent foreach element of a vector.The following instances are supported:

vsip vtanh fvsip vtanh d

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

Computes the hyperbolic tangent foreach element of a matrix.The following instances are supported:

vsip mtanh fvsip mtanh d

4.2 Unary Operations

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

Computes the argument in radians[−π, π] for each element of a complexvector.The following instances are supported:

vsip varg fvsip varg d

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

Computes the argument in radians[−π, π] for each element of a complexmatrix.The following instances are supported:

vsip marg fvsip marg d

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

Computes the ceiling for each elementof a vector.The following instances are supported:

vsip vceil fvsip vceil d

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

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

vsip cvconj fvsip cvconj d

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

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

vsip cmconj fvsip cmconj d

VSIPL/Content [3.1D] NASoftware 30

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 dvsip vcumsum ivsip cvcumsum fvsip cvcumsum dvsip 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 dvsip mcumsum ivsip cmcumsum fvsip cmcumsum dvsip cmcumsum i

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

Computes the complex numbers corre-sponding to the angle of a unit vectorin the complex plane for each elementof a vector.The following instances are supported:

vsip veuler fvsip veuler d

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

Computes the complex numbers corre-sponding to the angle of a unit vectorin the complex plane for each elementof a matrix.The following instances are supported:

vsip meuler fvsip meuler d

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

Computes the floor for each element ofa vector.The following instances are supported:

vsip vfloor fvsip vfloor d

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 dvsip vmag ivsip vmag sivsip cvmag fvsip cvmag d

VSIPL/Content [3.1D] NASoftware 31

Chapter 4. Elementwise Functions

Prototype Descriptionvoidvsip 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 mmag dvsip cmmag fvsip cmmag d

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

Computes the square of the magnitudesfor each element of a vector.The following instances are supported:

vsip vcmagsq fvsip vcmagsq d

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

Computes the square of the magnitudesfor each element of a matrix.The following instances are supported:

vsip mcmagsq fvsip mcmagsq d

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 vmeanval dvsip cvmeanval fvsip cvmeanval d

vsip 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 mmeanval dvsip cmmeanval fvsip cmmeanval d

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 vmeansqval dvsip cvmeansqval fvsip cvmeansqval d

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 mmeansqval dvsip cmmeansqval fvsip cmmeansqval d

VSIPL/Content [3.1D] NASoftware 32

Chapter 4. Elementwise Functions

Prototype Descriptionvsip 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 vmodulate dvsip cvmodulate fvsip cvmodulate d

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 dvsip vneg ivsip vneg sivsip cvneg fvsip cvneg d

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 dvsip mneg ivsip cmneg fvsip cmneg d

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 vrecip dvsip cvrecip fvsip cvrecip d

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 mrecip dvsip cmrecip fvsip cmrecip d

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

Computes the reciprocal of the squareroot for each element of a vector.The following instances are supported:

vsip vrsqrt fvsip vrsqrt d

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

Computes the reciprocal of the squareroot for each element of a matrix.The following instances are supported:

vsip mrsqrt fvsip mrsqrt d

VSIPL/Content [3.1D] NASoftware 33

Chapter 4. Elementwise Functions

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

Computes the square for each elementof a vector.The following instances are supported:

vsip vsq fvsip vsq d

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

Computes the square for each elementof a matrix.The following instances are supported:

vsip msq fvsip msq d

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 dvsip vsumval ivsip vsumval sivsip vsumval blvsip cvsumval fvsip cvsumval dvsip 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 dvsip msumval ivsip cmsumval fvsip cmsumval dvsip cmsumval i

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

Returns the sum of the squares of theelements of a vector.The following instances are supported:

vsip vsumsqval fvsip vsumsqval d

vsip Dscalar Pvsip Dmsumsqval P(const vsip Dmview P * A);

Returns the sum of the squares of theelements of a matrix.The following instances are supported:

vsip msumsqval fvsip msumsqval d

4.3 Binary Operations

VSIPL/Content [3.1D] NASoftware 34

Chapter 4. Elementwise Functions

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 dvsip vadd ivsip vadd sivsip cvadd fvsip cvadd dvsip 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 dvsip madd ivsip cmadd fvsip cmadd d

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

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

vsip rcvadd fvsip rcvadd d

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

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

vsip rcmadd fvsip rcmadd d

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 dvsip svadd ivsip svadd sivsip csvadd fvsip csvadd d

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 dvsip smadd ivsip csmadd fvsip csmadd d

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

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

vsip rscvadd fvsip rscvadd d

VSIPL/Content [3.1D] NASoftware 35

Chapter 4. Elementwise Functions

Prototype Descriptionvoidvsip rscmadd P(const vsip scalar P a,const vsip cmview P * B,const vsip cmview P * R);

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

vsip rscmadd fvsip rscmadd d

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 vdiv dvsip cvdiv fvsip cvdiv d

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 mdiv dvsip cmdiv fvsip cmdiv d

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

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

vsip rcvdiv fvsip rcvdiv d

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

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

vsip rcmdiv fvsip rcmdiv d

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

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

vsip crvdiv fvsip crvdiv d

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

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

vsip crmdiv fvsip crmdiv d

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

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

vsip svdiv fvsip svdiv d

VSIPL/Content [3.1D] NASoftware 36

Chapter 4. Elementwise Functions

Prototype Descriptionvoidvsip 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 smdiv dvsip csmdiv fvsip csmdiv d

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

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

vsip rscvdiv fvsip rscvdiv d

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

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

vsip rscvsub fvsip rscvsub d

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

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

vsip rscmdiv fvsip rscmdiv d

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

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

vsip rscmsub fvsip rscmsub d

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 vsdiv dvsip cvrsdiv fvsip cvrsdiv d

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 msdiv dvsip cmrsdiv fvsip cmrsdiv d

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 vexpoavg dvsip cvexpoavg fvsip cvexpoavg d

VSIPL/Content [3.1D] NASoftware 37

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 mexpoavg dvsip cmexpoavg fvsip cmexpoavg d

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

Computes the square root of the sum ofsquares, by element, of two input vec-tors.The following instances are supported:

vsip vhypot fvsip vhypot d

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

Computes the square root of the sum ofsquares, by element, of two input ma-trices.The following instances are supported:

vsip mhypot fvsip mhypot d

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

Computes the product of a complexvector with the conjugate of a secondcomplex vector, by element.The following instances are supported:

vsip cvjmul fvsip cvjmul d

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

Computes the product of a complexmatrix with the conjugate of a secondcomplex matrix, by element.The following instances are supported:

vsip cmjmul fvsip cmjmul d

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 dvsip vmul ivsip vmul sivsip cvmul fvsip cvmul d

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 dvsip mmul ivsip cmmul fvsip cmmul d

VSIPL/Content [3.1D] NASoftware 38

Chapter 4. Elementwise Functions

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

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

vsip rcvmul fvsip rcvmul d

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

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

vsip rcmmul fvsip rcmmul d

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 dvsip svmul ivsip svmul sivsip csvmul fvsip csvmul d

voidvsip 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 smmul dvsip csmmul fvsip csmmul d

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

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

vsip rscvmul fvsip rscvmul d

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

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

vsip rscmmul fvsip rscmmul d

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 vmmul dvsip cvmmul fvsip cvmmul d

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

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

vsip rvcmmul fvsip rvcmmul d

VSIPL/Content [3.1D] NASoftware 39

Chapter 4. Elementwise Functions

Prototype Descriptionvoidvsip 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 dvsip vsub ivsip vsub sivsip cvsub fvsip cvsub d

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 dvsip msub ivsip cmsub fvsip cmsub d

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

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

vsip crvsub fvsip crvsub d

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

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

vsip crmsub fvsip crmsub d

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

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

vsip rcvsub fvsip rcvsub d

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

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

vsip rcmsub fvsip rcmsub d

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 dvsip svsub ivsip svsub sivsip csvsub fvsip csvsub d

VSIPL/Content [3.1D] NASoftware 40

Chapter 4. Elementwise Functions

Prototype Descriptionvoidvsip 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 dvsip smsub ivsip csmsub fvsip csmsub d

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 vam dvsip cvam fvsip cvam d

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 vma dvsip cvma fvsip cvma d

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 vmsa dvsip cvmsa fvsip cvmsa d

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 vmsb dvsip cvmsb fvsip cvmsb d

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 vsam dvsip cvsam fvsip cvsam d

VSIPL/Content [3.1D] NASoftware 41

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 vsbm dvsip cvsbm fvsip cvsbm d

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 vsma dvsip cvsma fvsip cvsma d

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 vsmsa dvsip cvsmsa fvsip cvsmsa d

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 dvsip vleq ivsip cvleq fvsip cvleq dvsip cvleq i

VSIPL/Content [3.1D] NASoftware 42

Chapter 4. Elementwise Functions

Prototype Descriptionvoidvsip 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 dvsip mleq ivsip cmleq fvsip cmleq dvsip cmleq i

voidvsip 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 dvsip 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 dvsip 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 dvsip 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 dvsip 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 dvsip vlle i

VSIPL/Content [3.1D] NASoftware 43

Chapter 4. Elementwise Functions

Prototype Descriptionvoidvsip 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 dvsip 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 dvsip 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 dvsip mllt i

voidvsip 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 dvsip vlne ivsip cvlne fvsip cvlne dvsip 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 dvsip mlne ivsip cmlne fvsip cmlne dvsip 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 dvsip vclip ivsip vclip si

VSIPL/Content [3.1D] NASoftware 44

Chapter 4. Elementwise Functions

Prototype Descriptionvoidvsip 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 dvsip 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 P(const vsip vview P * A,const vsip vview P * B,const vsip vview P * R);

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

vsip vmax fvsip vmax d

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

Computes the maximum magnitude(absolute value), by element, of twovectors.The following instances are supported:

vsip vmaxmg fvsip vmaxmg d

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

Computes the maximum magnitudesquared, by element, of two complexvectors.The following instances are supported:

vsip vcmaxmgsq fvsip vcmaxmgsq d

vsip scalar Pvsip vcmaxmgsqval P(const vsip cvview P * 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.The following instances are supported:

vsip vcmaxmgsqval fvsip vcmaxmgsqval d

vsip scalar Pvsip vmaxmgval P(const vsip vview P * 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.The following instances are supported:

vsip vmaxmgval fvsip vmaxmgval d

vsip scalar Pvsip vmaxval P(const vsip vview P * 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.The following instances are supported:

vsip vmaxval fvsip vmaxval d

VSIPL/Content [3.1D] NASoftware 45

Chapter 4. Elementwise Functions

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

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

vsip vmin fvsip vmin d

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

Computes the minimum magnitude(absolute value), by element, of twovectors.The following instances are supported:

vsip vminmg fvsip vminmg d

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

Computes the minimum magnitudesquared, by element, of two complexvectors.The following instances are supported:

vsip vcminmgsq fvsip vcminmgsq d

vsip scalar Pvsip vcminmgsqval P(const vsip cvview P * 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.The following instances are supported:

vsip vcminmgsqval fvsip vcminmgsqval d

vsip scalar Pvsip vminmgval P(const vsip vview P * 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.The following instances are supported:

vsip vminmgval fvsip vminmgval d

vsip scalar Pvsip vminval P(const vsip vview P * 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.The following instances are supported:

vsip vminval fvsip vminval d

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.1D] NASoftware 46

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.1D] NASoftware 47

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 dvsip vcopy d fvsip vcopy d dvsip vcopy f ivsip vcopy d ivsip vcopy f sivsip vcopy f blvsip vcopy d sivsip vcopy d blvsip vcopy i fvsip vcopy i dvsip vcopy i ivsip vcopy i sivsip vcopy i vivsip vcopy si fvsip vcopy si dvsip vcopy si ivsip vcopy si sivsip vcopy bl fvsip vcopy bl dvsip vcopy bl blvsip vcopy vi ivsip vcopy vi vivsip vcopy mi mivsip cvcopy f fvsip cvcopy f dvsip cvcopy d fvsip cvcopy d d

VSIPL/Content [3.1D] NASoftware 48

Chapter 4. Elementwise Functions

Prototype Descriptionvoidvsip 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 dvsip mcopy d fvsip mcopy d dvsip mcopy f ivsip mcopy f sivsip mcopy f blvsip mcopy d ivsip mcopy d sivsip mcopy d blvsip mcopy i fvsip mcopy i dvsip mcopy i ivsip mcopy i sivsip mcopy si fvsip mcopy si dvsip mcopy si ivsip mcopy si sivsip mcopy bl fvsip mcopy bl dvsip mcopy bl blvsip cmcopy f fvsip cmcopy f dvsip cmcopy d fvsip cmcopy d d

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 dvsip vfill ivsip vfill sivsip cvfill fvsip cvfill d

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 dvsip mfill ivsip mfill sivsip cmfill fvsip cmfill d

voidvsip 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 dvsip vramp ivsip vramp si

VSIPL/Content [3.1D] NASoftware 49

Chapter 4. Elementwise Functions

4.9 Manipulation Operations

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

Form a complex vector from two realvectors.The following instances are supported:

vsip vcmplx fvsip vcmplx d

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

Form a complex matrix from two realmatrices.The following instances are supported:

vsip mcmplx fvsip mcmplx d

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 dvsip vgather ivsip vgather sivsip cvgather fvsip cvgather d

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 dvsip mgather ivsip mgather sivsip cmgather fvsip cmgather d

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

Extract the imaginary part of a com-plex vector.The following instances are supported:

vsip vimag fvsip vimag d

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

Extract the imaginary part of a com-plex matrix.The following instances are supported:

vsip mimag fvsip mimag d

VSIPL/Content [3.1D] NASoftware 50

Chapter 4. Elementwise Functions

Prototype Descriptionvoidvsip vpolar P(const vsip cvview P * A,const vsip vview P * R,const vsip vview P * 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.The following instances are supported:

vsip vpolar fvsip vpolar d

voidvsip mpolar P(const vsip cmview P * A,const vsip mview P * R,const vsip mview P * 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.The following instances are supported:

vsip mpolar fvsip mpolar d

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

Extract the real part of a complex vec-tor.The following instances are supported:

vsip vreal fvsip vreal d

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

Extract the real part of a complex ma-trix.The following instances are supported:

vsip mreal fvsip mreal d

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

Convert a pair of real vectors from com-plex polar to complex rectangular form.The following instances are supported:

vsip vrect fvsip vrect d

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

Convert a pair of real matrices fromcomplex polar to complex rectangularform.The following instances are supported:

vsip mrect fvsip mrect d

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 dvsip vscatter ivsip vscatter sivsip cvscatter fvsip cvscatter d

VSIPL/Content [3.1D] NASoftware 51

Chapter 4. Elementwise Functions

Prototype Descriptionvoidvsip 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 dvsip mscatter ivsip mscatter sivsip cmscatter fvsip cmscatter d

voidvsip 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 dvsip vswap ivsip vswap sivsip cvswap fvsip cvswap d

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 dvsip mswap ivsip mswap sivsip cmswap fvsip cmswap d

4.10 Extensions

Prototype Descriptionvsip scalar Pvsip Dsummgval P(const vsip Dvview P * A);

Returns the sum of the magnitude ofelements of a vector.The following instances are supported:

vsip vcsummgval fvsip vcsummgval d

VSIPL/Content [3.1D] NASoftware 52

Chapter 5. Signal Processing Functions

5.1 FFT Functions

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

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

vsip ccfftip create fvsip ccfftip create d

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

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

vsip ccfftop create fvsip ccfftop create d

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

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

vsip crfftop create fvsip crfftop create d

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

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

vsip rcfftop create fvsip rcfftop create d

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

Destroy an FFT object.The following instances are supported:

vsip fft destroy fvsip fft destroy d

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

Return the attributes of an FFT ob-ject.The following instances are supported:

vsip fft getattr fvsip fft getattr d

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

Apply a complex-to-complex FastFourier Transform (FFT).The following instances are supported:

vsip ccfftip fvsip ccfftip d

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

Apply a complex-to-complex FastFourier Transform (FFT).The following instances are supported:

vsip ccfftop fvsip ccfftop d

VSIPL/Content [3.1D] NASoftware 53

Chapter 5. Signal Processing Functions

Prototype Descriptionvoidvsip crfftop P(const vsip fft P * plan,const vsip cvview P * x,const vsip vview P * y);

Apply a complex-to-real Fast FourierTransform (FFT).The following instances are supported:

vsip crfftop fvsip crfftop d

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

Apply a real-to-complex Fast FourierTransform (FFT).The following instances are supported:

vsip rcfftop fvsip rcfftop d

vsip fftm P *vsip ccfftmip create P(const vsip index rows,const vsip index cols,const vsip scalar P 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.The following instances are supported:

vsip ccfftmip create fvsip ccfftmip create d

vsip fftm P *vsip ccfftmop create P(const vsip index rows,const vsip index cols,const vsip scalar P 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.The following instances are supported:

vsip ccfftmop create fvsip ccfftmop create d

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

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

vsip crfftmop create fvsip crfftmop create d

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

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

vsip rcfftmop create fvsip rcfftmop create d

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

Destroy an FFT object.The following instances are supported:

vsip fftm destroy fvsip fftm destroy d

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

Return the attributes of an FFT ob-ject.The following instances are supported:

vsip fftm getattr fvsip fftm getattr d

VSIPL/Content [3.1D] NASoftware 54

Chapter 5. Signal Processing Functions

Prototype Descriptionvoidvsip ccfftmip P(const vsip fftm P * plan,const vsip cmview P * XY);

Apply a multiple complex-to-complexFast Fourier Transform (FFT).The following instances are supported:

vsip ccfftmip fvsip ccfftmip d

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

Apply a multiple complex-to-complexFast Fourier Transform (FFT).The following instances are supported:

vsip ccfftmop fvsip ccfftmop d

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

Apply a multiple complex-to-real FastFourier Transform (FFT).The following instances are supported:

vsip crfftmop fvsip crfftmop d

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

Apply a multiple real-to-complex out ofplace Fast Fourier Transform (FFT).The following instances are supported:

vsip rcfftmop fvsip rcfftmop d

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

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

vsip ccfft2dip create fvsip ccfft2dip create d

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

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

vsip ccfft2dop create fvsip ccfft2dop create d

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

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

vsip crfft2dop create fvsip crfft2dop create d

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

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

vsip rcfft2dop create fvsip rcfft2dop create d

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

Destroy an FFT object.The following instances are supported:

vsip fft2d destroy fvsip fft2d destroy d

VSIPL/Content [3.1D] NASoftware 55

Chapter 5. Signal Processing Functions

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

Return the attributes of an FFT ob-ject.The following instances are supported:

vsip fft2d getattr fvsip fft2d getattr d

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

Apply a complex-to-complex 2D FastFourier Transform (FFT).The following instances are supported:

vsip ccfft2dip fvsip ccfft2dip d

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

Apply a complex-to-complex 2D FastFourier Transform (FFT).The following instances are supported:

vsip ccfft2dop fvsip ccfft2dop d

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

Apply a complex-to-real 2D FastFourier Transform (FFT).The following instances are supported:

vsip crfft2dop fvsip crfft2dop d

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

Apply a real-to-complex 2D FastFourier Transform (FFT).The following instances are supported:

vsip rcfft2dop fvsip rcfft2dop d

VSIPL/Content [3.1D] NASoftware 56

Chapter 5. Signal Processing Functions

5.2 Convolution/Correlation Functions

Prototype Descriptionvsip conv1d P *vsip conv1d create P(const vsip vview P * 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.The following instances are supported:

vsip conv1d create fvsip conv1d create d

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

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

vsip conv1d destroy fvsip conv1d destroy d

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

Returns the attributes for a 1D convo-lution object.The following instances are supported:

vsip conv1d getattr fvsip conv1d getattr d

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

Compute a decimated real one-dimensional (1D) convolution of twovectors.The following instances are supported:

vsip convolve1d fvsip convolve1d d

vsip conv2d P *vsip conv2d create P(const vsip mview P * 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.The following instances are supported:

vsip conv2d create fvsip conv2d create d

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

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

vsip conv2d destroy fvsip conv2d destroy d

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

Returns the attributes for a 2D convo-lution object.The following instances are supported:

vsip conv2d getattr fvsip conv2d getattr d

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

Compute a decimated real two-dimensional (2D) convolution of twomatrices.The following instances are supported:

vsip convolve2d fvsip convolve2d d

VSIPL/Content [3.1D] NASoftware 57

Chapter 5. Signal Processing Functions

Prototype Descriptionvsip 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 corr1d create dvsip ccorr1d create fvsip ccorr1d create d

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

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

vsip corr1d destroy fvsip corr1d destroy dvsip ccorr1d destroy fvsip ccorr1d destroy d

voidvsip 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 corr1d getattr dvsip ccorr1d getattr fvsip ccorr1d getattr d

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 correlate1d dvsip ccorrelate1d fvsip ccorrelate1d d

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 corr2d create dvsip ccorr2d create fvsip ccorr2d create d

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

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

vsip corr2d destroy fvsip corr2d destroy dvsip ccorr2d destroy fvsip ccorr2d destroy d

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 corr2d getattr dvsip ccorr2d getattr fvsip ccorr2d getattr d

VSIPL/Content [3.1D] NASoftware 58

Chapter 5. Signal Processing Functions

Prototype Descriptionvoidvsip 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 correlate2d dvsip ccorrelate2d fvsip ccorrelate2d d

5.3 Window Functions

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

Create a vector with Blackman windowweights.The following instances are supported:

vsip vcreate blackman fvsip vcreate blackman d

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

Create a vector with Dolph-Chebyshevwindow weights.The following instances are supported:

vsip vcreate cheby fvsip vcreate cheby d

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

Create a vector with Hanning windowweights.The following instances are supported:

vsip vcreate hanning fvsip vcreate hanning d

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

Create a vector with Kaiser windowweights.The following instances are supported:

vsip vcreate kaiser fvsip vcreate kaiser d

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 fir create dvsip cfir create fvsip cfir create d

VSIPL/Content [3.1D] NASoftware 59

Chapter 5. Signal Processing Functions

Prototype Descriptionintvsip Dfir destroy P(vsip Dfir P * plan);

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

vsip fir destroy fvsip fir destroy dvsip cfir destroy fvsip cfir destroy d

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 firflt dvsip cfirflt fvsip cfirflt d

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 fir getattr dvsip cfir getattr fvsip cfir getattr d

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 fir reset dvsip cfir reset fvsip cfir reset d

5.5 Miscellaneous signal Processing Functions

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

Compute the histogram of a vector.The following instances are supported:

vsip vhisto fvsip vhisto d

VSIPL/Content [3.1D] NASoftware 60

Chapter 6. Linear Algebra

6.1 Matrix and Vector Operations

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

Complex Hermitian (conjugate trans-pose) of a matrix.The following instances are supported:

vsip cmherm fvsip cmherm d

vsip cscalar Pvsip cvjdot P(const vsip cvview P * A,const vsip cvview P * B);

Compute the conjugate inner (dot)product of two complex vectors.The following instances are supported:

vsip cvjdot fvsip cvjdot d

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

Calculate the general product of twomatrices and accumulate.The following instances are supported:

vsip gemp fvsip gemp d

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

Calculate the general product of twomatrices and accumulate.The following instances are supported:

vsip cgemp fvsip cgemp d

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

Calculate a general matrix sum.The following instances are supported:

vsip gems fvsip gems d

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

Calculate a general matrix sum.The following instances are supported:

vsip cgems fvsip cgems d

VSIPL/Content [3.1D] NASoftware 61

Chapter 6. Linear Algebra

Prototype Descriptionvoidvsip 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 dvsip mprod ivsip mprod sivsip cmprod fvsip cmprod dvsip cmprod ivsip cmprod si

voidvsip 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 dvsip 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 dvsip 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 dvsip mprodt ivsip mprodt sivsip cmprodt fvsip cmprodt dvsip 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 dvsip mvprod ivsip mvprod sivsip cmvprod fvsip cmvprod dvsip cmvprod ivsip cmvprod si

VSIPL/Content [3.1D] NASoftware 62

Chapter 6. Linear Algebra

Prototype Descriptionvoidvsip 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 dvsip mtrans ivsip mtrans sivsip cmtrans fvsip cmtrans dvsip 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 vdot dvsip cvdot fvsip cvdot d

voidvsip 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 dvsip vmprod ivsip vmprod sivsip cvmprod fvsip cvmprod dvsip cvmprod ivsip cvmprod si

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

Calculate the outer product of two vec-tors.The following instances are supported:

vsip vouter fvsip vouter d

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

Calculate the outer product of two vec-tors.The following instances are supported:

vsip cvouter fvsip cvouter d

6.2 Special Linear System Solvers

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

Solve a covariance linear system prob-lem.The following instances are supported:

vsip covsol fvsip covsol d

VSIPL/Content [3.1D] NASoftware 63

Chapter 6. Linear Algebra

Prototype Descriptionintvsip ccovsol P(const vsip cmview P * A,const vsip cmview P * XB);

Solve a covariance linear system prob-lem.The following instances are supported:

vsip ccovsol fvsip ccovsol d

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

Solve a linear least squares problem.The following instances are supported:

vsip llsqsol fvsip llsqsol d

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

Solve a linear least squares problem.The following instances are supported:

vsip cllsqsol fvsip cllsqsol d

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

Solve a real symmetric positive definiteToeplitz linear system.The following instances are supported:

vsip toepsol fvsip toepsol d

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

Solve a real symmetric positive definiteToeplitz linear system.The following instances are supported:

vsip ctoepsol fvsip ctoepsol d

VSIPL/Content [3.1D] NASoftware 64

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 lud dvsip clud fvsip clud d

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 lud create dvsip clud create fvsip clud create d

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

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

vsip lud destroy fvsip lud destroy dvsip clud destroy fvsip clud destroy d

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 lud getattr dvsip clud getattr fvsip clud getattr d

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

Solve a square linear system.The following instances are supported:

vsip lusol fvsip lusol d

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

Solve a square linear system.The following instances are supported:

vsip clusol fvsip clusol d

6.4 Symmetric Positive Definite Linear System Solver

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

Compute a Cholesky decomposition ofa symmetric positive definite matrix.The following instances are supported:

vsip chold fvsip chold d

VSIPL/Content [3.1D] NASoftware 65

Chapter 6. Linear Algebra

Prototype Descriptionintvsip cchold P(vsip cchol P * chold,const vsip cmview P * A);

Compute a Cholesky decomposition ofa symmetric positive definite matrix.The following instances are supported:

vsip cchold fvsip cchold d

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

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

vsip chold create fvsip chold create d

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

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

vsip cchold create fvsip cchold create d

intvsip Dchold destroy P(vsip Dchol P * chold);

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

vsip chold destroy fvsip chold destroy dvsip cchold destroy fvsip cchold destroy d

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 chold getattr dvsip cchold getattr fvsip cchold getattr d

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

Solve a symmetric positive definite lin-ear system.The following instances are supported:

vsip cholsol fvsip cholsol d

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

Solve a symmetric positive definite lin-ear system.The following instances are supported:

vsip ccholsol fvsip ccholsol d

6.5 Overdetermined Linear System Solver

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

Compute a QR decomposition of a ma-trix .The following instances are supported:

vsip qrd fvsip qrd d

VSIPL/Content [3.1D] NASoftware 66

Chapter 6. Linear Algebra

Prototype Descriptionintvsip cqrd P(vsip cqr P * qrd,const vsip cmview P * A);

Compute a QR decomposition of a ma-trix .The following instances are supported:

vsip cqrd fvsip cqrd d

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

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

vsip qrd create fvsip qrd create d

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

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

vsip cqrd create fvsip cqrd create d

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

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

vsip qrd destroy fvsip qrd destroy dvsip cqrd destroy fvsip cqrd destroy d

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 qrd getattr dvsip cqrd getattr fvsip cqrd getattr d

intvsip qrdprodq P(const vsip qr P * qrd,const vsip mat op opQ,const vsip mat side apQ,const vsip mview P * C);

Multiply a matrix by the matrix Qfrom a QR decomposition.The following instances are supported:

vsip qrdprodq fvsip qrdprodq d

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

Multiply a matrix by the matrix Qfrom a QR decomposition.The following instances are supported:

vsip cqrdprodq fvsip cqrdprodq d

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

Solve linear system based on the ma-trix R, from QR decomposition of thematrix A.The following instances are supported:

vsip qrdsolr fvsip qrdsolr d

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

Solve linear system based on the ma-trix R, from QR decomposition of thematrix A.The following instances are supported:

vsip cqrdsolr fvsip cqrdsolr d

VSIPL/Content [3.1D] NASoftware 67

Chapter 6. Linear Algebra

Prototype Descriptionintvsip qrsol P(const vsip qr P * qrd,const vsip mat op OpR,const vsip scalar P alpha,const vsip mview P * XB);

Solve linear system based on the ma-trix R, from QR decomposition of thematrix A.The following instances are supported:

vsip qrsol fvsip qrsol d

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

Solve either a linear covariance or linearleast squares problem.The following instances are supported:

vsip cqrsol fvsip cqrsol d

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 minvlu dvsip cminvlu fvsip cminvlu d

VSIPL/Content [3.1D] NASoftware 68