📄 nsparith.h
字号:
/*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) 1996 Intel Corporation. All Rights Reserved.
//
// $Workfile: nsparith.h $
// $Revision: 3 $
// $Modtime: Dec 16 1996 18:31:20 $
//
// Purpose: NSP Scalar and Vector Arithmetics
*M*/
#ifdef __cplusplus
extern "C" {
#endif
#if !defined (_NSPARITH_H) || defined (_OWN_BLDPCS)
# define _NSPARITH_H
/*-------------------------------------------------------------------------*/
/* Miscellaneous Scalar Functions and Vector Functions */
/* Complex Add, Sub, Mpy, Div, Conj */
/* */
/* These functions perform addition, subtraction, multiplication, */
/* division, and conjugation on complex numbers a and b. */
NSPAPI(SCplx, nspcAdd, (const SCplx a, const SCplx b))
NSPAPI(SCplx, nspcSub, (const SCplx a, const SCplx b))
NSPAPI(SCplx, nspcMpy, (const SCplx a, const SCplx b))
NSPAPI(SCplx, nspcDiv, (const SCplx a, const SCplx b))
NSPAPI(SCplx, nspcConj,(const SCplx a))
NSPAPI(void, nspcAddOut, (const SCplx a, const SCplx b, SCplx* val))
NSPAPI(void, nspcSubOut, (const SCplx a, const SCplx b, SCplx* val))
NSPAPI(void, nspcMpyOut, (const SCplx a, const SCplx b, SCplx* val))
NSPAPI(void, nspcDivOut, (const SCplx a, const SCplx b, SCplx* val))
NSPAPI(void, nspcConjOut,(const SCplx a, SCplx* val))
/*---- Additional Functions -----------------------------------------------*/
NSPAPI(SCplx, nspcSet, (float re, float im))
NSPAPI(void, nspcSetOut, (float re, float im, SCplx* val))
/*-------------------------------------------------------------------------*/
/* Vector Initialization */
/* These functions initialize vectors of length n. */
NSPAPI(void, nspsbZero,(float *dst, int n))
NSPAPI(void, nspcbZero,(SCplx *dst, int n))
NSPAPI(void, nspsbSet, (float val, float *dst, int n))
NSPAPI(void, nspcbSet, (float re, float im, SCplx *dst, int n))
NSPAPI(void, nspsbCopy,(const float *src, float *dst, int n))
NSPAPI(void, nspcbCopy,(const SCplx *src, SCplx *dst, int n))
/*-------------------------------------------------------------------------*/
/* Vector Addition and multiplication */
/* These functions perform element-wise arithmetic on vectors of length n*/
/* dst[i]=dst[i]+val; */
NSPAPI(void,nspsbAdd1,(const float val, float *dst,int n))
NSPAPI(void,nspcbAdd1,(const SCplx val, SCplx *dst,int n))
/* dst[i]=dst[i]+src[i]; */
NSPAPI(void,nspsbAdd2,(const float *src, float *dst,int n))
NSPAPI(void,nspcbAdd2,(const SCplx *src, SCplx *dst,int n))
/* dst[i]=srcA[i]+srcB[i]; */
NSPAPI(void,nspsbAdd3,(const float *srcA,const float *srcB,float *dst,int n))
NSPAPI(void,nspcbAdd3,(const SCplx *srcA,const SCplx *srcB,SCplx *dst,int n))
/* dst[i]=dst[i]-val; */
NSPAPI(void,nspsbSub1,(const float val, float *dst,int n))
NSPAPI(void,nspcbSub1,(const SCplx val, SCplx *dst,int n))
/* dst[i]=dst[i]-val[i]; */
NSPAPI(void,nspsbSub2,(const float *val, float *dst,int n))
NSPAPI(void,nspcbSub2,(const SCplx *val, SCplx *dst,int n))
/* dst[i]=src[i]-val[i]; */
NSPAPI(void,nspsbSub3,(const float *src, const float *val, float *dst,int n))
NSPAPI(void,nspcbSub3,(const SCplx *src, const SCplx *val, SCplx *dst,int n))
/* dst[i]=dst[i]*val; */
NSPAPI(void,nspsbMpy1,(const float val, float *dst,int n))
NSPAPI(void,nspcbMpy1,(const SCplx val, SCplx *dst,int n))
/* dst[i]=dst[i]*src[i]; */
NSPAPI(void,nspsbMpy2,(const float *src, float *dst,int n))
NSPAPI(void,nspcbMpy2,(const SCplx *src, SCplx *dst,int n))
/* dst[i]=srcA[i]*srcB[i]; */
NSPAPI(void,nspsbMpy3,(const float *srcA,const float *srcB,float *dst,int n))
NSPAPI(void,nspcbMpy3,(const SCplx *srcA,const SCplx *srcB,SCplx *dst,int n))
/*-------------------------------------------------------------------------*/
/* Complex conjugates of scalars and vectors */
NSPAPI(void, nspcbConj1, ( SCplx *vec, int n))
NSPAPI(void, nspcbConj2, (const SCplx *src, SCplx *dst, int n))
NSPAPI(void, nspcbConjFlip2, (const SCplx *src, SCplx *dst, int n))
NSPAPI(void, nspcbConjExtend1,( SCplx *vec, int n))
NSPAPI(void, nspcbConjExtend2,(const SCplx *src, SCplx *dst, int n))
/*-------------------------------------------------------------------------*/
/* Miscellaneous Scalar Functions and Vector Functions */
/* Complex Add, Sub, Mpy, Div, Conj */
/* These functions perform addition, subtraction, multiplication, */
/* division, and conjugation on complex numbers a and b. */
/* */
NSPAPI(DCplx, nspzAdd, (const DCplx a, const DCplx b))
NSPAPI(DCplx, nspzSub, (const DCplx a, const DCplx b))
NSPAPI(DCplx, nspzMpy, (const DCplx a, const DCplx b))
NSPAPI(DCplx, nspzDiv, (const DCplx a, const DCplx b))
NSPAPI(DCplx, nspzConj,(const DCplx a))
/*---- Additional Functions -----------------------------------------------*/
NSPAPI(DCplx, nspzSet, (double re, double im))
/*-------------------------------------------------------------------------*/
/* Vector Initialization */
/* These functions initialize vectors of length n. */
NSPAPI(void, nspdbZero,(double *dst, int n))
NSPAPI(void, nspzbZero,(DCplx *dst, int n))
NSPAPI(void, nspdbSet, (double val, double *dst, int n))
NSPAPI(void, nspzbSet, (double re, double im, DCplx *dst, int n))
NSPAPI(void, nspdbCopy,(const double *src, double *dst, int n))
NSPAPI(void, nspzbCopy,(const DCplx *src, DCplx *dst, int n))
/*-------------------------------------------------------------------------*/
/* Vector Addition and multiplication */
/* These functions perform element-wise arithmetic on vectors of length n*/
/* dst[i]=dst[i]+val; */
NSPAPI(void, nspdbAdd1,(const double val, double *dst,int n))
NSPAPI(void, nspzbAdd1,(const DCplx val, DCplx *dst,int n))
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -