/*M*
//
//               INTEL CORPORATION PROPRIETARY INFORMATION
//  This software is supplied under the terms of a license agreement or
//  nondisclosure agreement with Intel Corporation and may not be copied
//  or disclosed except in accordance with the terms of that agreement.
//        Copyright (c) 1995 Intel Corporation. All Rights Reserved.
//
//  RCS:
//      $Source: d:/rcs/nsp20/include/nspvec.h $
//      $Revision: 1.5 $
//      $Date: 1995/08/10 15:24:48 $
//
//  Purpose: NSP Vector Arithmetic and Algebraic Functions
*M*/

#if !defined _NSPVEC_H || defined _NSP_BLDPCS
#define _NSPVEC_H

#define NSP_Gt 1
#define NSP_Lt 0
#define HUGE_VAL_S 3.402823466e+38F
#define HUGE_VAL_D 1.7976931348623158e+308

NSPAPI(void,nspsbSqr1, (      float  *vec,              int len));
NSPAPI(void,nspcbSqr1, (      SCplx  *vec,              int len));
NSPAPI(void,nspdbSqr1, (      double *vec,              int len));
NSPAPI(void,nspzbSqr1, (      DCplx  *vec,              int len));
NSPAPI(void,nspwbSqr1, (      short  *vec,              int len));

NSPAPI(void,nspsbSqr2, (const float  *src, float  *dst, int len));
NSPAPI(void,nspcbSqr2, (const SCplx  *src, SCplx  *dst, int len));
NSPAPI(void,nspdbSqr2, (const double *src, double *dst, int len));
NSPAPI(void,nspzbSqr2, (const DCplx  *src, DCplx  *dst, int len));
NSPAPI(void,nspwbSqr2, (const short  *src, short  *dst, int len));

NSPAPI(void,nspsbSqrt1,(      float  *vec,              int len));
NSPAPI(void,nspcbSqrt1,(      SCplx  *vec,              int len));
NSPAPI(void,nspdbSqrt1,(      double *vec,              int len));
NSPAPI(void,nspzbSqrt1,(      DCplx  *vec,              int len));
NSPAPI(void,nspwbSqrt1,(      short  *vec,              int len));

NSPAPI(void,nspsbSqrt2,(const float  *src, float  *dst, int len));
NSPAPI(void,nspcbSqrt2,(const SCplx  *src, SCplx  *dst, int len));
NSPAPI(void,nspdbSqrt2,(const double *src, double *dst, int len));
NSPAPI(void,nspzbSqrt2,(const DCplx  *src, DCplx  *dst, int len));
NSPAPI(void,nspwbSqrt2,(const short  *src, short  *dst, int len));

NSPAPI(void,nspsbThresh1,(float  *vec, int len, float  thresh, int relOp));
NSPAPI(void,nspcbThresh1,(SCplx  *vec, int len, float  thresh, int relOp));
NSPAPI(void,nspdbThresh1,(double *vec, int len, double thresh, int relOp));
NSPAPI(void,nspzbThresh1,(DCplx  *vec, int len, double thresh, int relOp));
NSPAPI(void,nspwbThresh1,(short  *vec, int len, short  thresh, int relOp));

NSPAPI(void,nspsbThresh2,(const float  *src,    float  *dst,int len,
                                float   thresh, int     relOp));
NSPAPI(void,nspcbThresh2,(const SCplx  *src,    SCplx  *dst,int len,
                                float   thresh, int     relOp));
NSPAPI(void,nspdbThresh2,(const double *src,    double *dst,int len,
                                double  thresh, int     relOp));
NSPAPI(void,nspzbThresh2,(const DCplx  *src,    DCplx  *dst,int len,
                                double  thresh, int      relOp));
NSPAPI(void,nspwbThresh2,(const short  *src,    short  *dst,int len,
                                short   thresh, int      relOp));

NSPAPI(void,nspsbInvThresh1,(float  *vec, int len, float  thresh));
NSPAPI(void,nspcbInvThresh1,(SCplx  *vec, int len, float  thresh));
NSPAPI(void,nspdbInvThresh1,(double *vec, int len, double thresh));
NSPAPI(void,nspzbInvThresh1,(DCplx  *vec, int len, double thresh));

NSPAPI(void,nspsbInvThresh2,(const float  *src, float  *dst, int len,
                                   float   thresh));
NSPAPI(void,nspcbInvThresh2,(const SCplx  *src, SCplx  *dst, int len,
                                   float   thresh));
NSPAPI(void,nspdbInvThresh2,(const double *src, double *dst, int len,
                                   double  thresh));
NSPAPI(void,nspzbInvThresh2,(const DCplx  *src, DCplx  *dst, int len,
                                   double  thresh));

NSPAPI(void,nspsbAbs1,   (      float  *vec,              int len));
NSPAPI(void,nspdbAbs1,   (      double *vec,              int len));
NSPAPI(void,nspwbAbs1,   (      short  *vec,              int len));

NSPAPI(void,nspsbAbs2,   (const float  *src, float  *dst, int len));
NSPAPI(void,nspdbAbs2,   (const double *src, double *dst, int len));
NSPAPI(void,nspwbAbs2,   (const short  *src, short  *dst, int len));

NSPAPI(float,  nspsMax,   (const float  *vec,              int len));
NSPAPI(double, nspdMax,   (const double *vec,              int len));
NSPAPI(short,  nspwMax,   (const short  *vec,              int len));

NSPAPI(float,  nspsMean,  (const float  *vec,              int len));
NSPAPI(double, nspdMean,  (const double *vec,              int len));
NSPAPI(short,  nspwMean,  (const short  *vec,              int len));

NSPAPI(float,  nspsMin,   (const float  *vec,              int len));
NSPAPI(double, nspdMin,   (const double *vec,              int len));
NSPAPI(short,  nspwMin,   (const short  *vec,              int len));

NSPAPI(float,  nspsStdDev,(const float  *vec,              int len));
NSPAPI(double, nspdStdDev,(const double *vec,		  int len));
NSPAPI(short,  nspwStdDev,(const short  *vec,		  int len));

NSPAPI(float,  nspsDotProd, (const float  *srcA, const float  *srcB, int len));
NSPAPI(SCplx,  nspcDotProd, (const SCplx  *srcA, const SCplx  *srcB, int len));
NSPAPI(double, nspdDotProd, (const double *srcA, const double *srcB, int len));
NSPAPI(DCplx,  nspzDotProd, (const DCplx  *srcA, const DCplx  *srcB, int len));
NSPAPI(short,  nspwDotProd, (const short  *srcA, const short  *srcB, int len));

NSPAPI(SCplx,  nspscDotProd,(const float  *srcA, const SCplx  *srcB, int len));
NSPAPI(SCplx,  nspcsDotProd,(const SCplx  *srcA, const float  *srcB, int len));
NSPAPI(DCplx,  nspdzDotProd,(const double *srcA, const DCplx  *srcB, int len));
NSPAPI(DCplx,  nspzdDotProd,(const DCplx  *srcA, const double *srcB, int len));

#endif                                          /* _NSPVEC_H                */
