PAL 1D Arrays: Complex Setup and Arithmetic

Initialization, copying, conjugation, inversion, phase conversion, addition, subtraction, multiplication, and division for one-dimensional complex arrays.

PAL 1D Arrays: Complex Setup and Arithmetic — 39 functions

KiratPalAdd1DComplexTo1DComplex

Signature
T_INT KiratPalAdd1DComplexTo1DComplex( const T_COMPLEX* pcSource, T_COMPLEX* pcDestination, T_INT iSize);
Description
Adds scalar, vector, or array values element-wise; ToDest writes to a separate destination, while Acc accumulates into an existing destination.
Mathematical operation
\(d_i\leftarrow d_i+s_i\) (or \(+c\) for a scalar source).
Supported implementations
  • ANSI C - portable reference implementation
  • Intel/AMD processors - Intel IPP library support

KiratPalAdd1DComplexTo1DComplexToDest

Signature
T_INT KiratPalAdd1DComplexTo1DComplexToDest( const T_COMPLEX* pcSource1, const T_COMPLEX* pcSource2, T_COMPLEX* pcDestination, T_INT iSize);
Description
Adds scalar, vector, or array values element-wise; ToDest writes to a separate destination, while Acc accumulates into an existing destination.
Mathematical operation
\(d_i=a_i+b_i\) (or source element plus scalar, according to the signature).
Supported implementations
  • ANSI C - portable reference implementation
  • Intel/AMD processors - Intel IPP library support

KiratPalConj1DComplex

Signature
T_INT KiratPalConj1DComplex(T_COMPLEX* pcDestination, T_INT iSize);
Description
Calculates the element-wise complex conjugate.
Mathematical operation
\(y_i=z_i^*\).
Supported implementations
  • ANSI C - portable reference implementation
  • Intel/AMD processors - Intel IPP library support

KiratPalConvert1DPolarTo1DComplex

Signature
T_INT KiratPalConvert1DPolarTo1DComplex( const T_FLOAT* pfSourceMag, const T_FLOAT* pfSourcePhase, T_COMPLEX* pcDestination, T_INT iSize);
Description
Calculates the linear convolution of two vectors.
Mathematical operation
\(z_i=r_i(\cos\varphi_i+j\sin\varphi_i)=r_ie^{j\varphi_i}\).
Supported implementations
  • ANSI C - portable reference implementation
  • Intel/AMD processors - Intel IPP library support

KiratPalCopy1DComplex

Signature
T_INT KiratPalCopy1DComplex(const T_COMPLEX* pcSource, T_COMPLEX* pcDestination, T_INT iSize);
Description
Copies the specified data or subrange to the destination.
Mathematical operation
\(D_{\mathbf i}\leftarrow S_{\mathbf i}\) element-wise (with type conversion where indicated by the function name).
Supported implementations
  • ANSI C - portable reference implementation
  • Intel/AMD processors - Intel IPP library support

KiratPalCopy1DComplexFromRingBuffer

Signature
T_INT KiratPalCopy1DComplexFromRingBuffer( const T_COMPLEX* pcSource, T_COMPLEX* pcDestination, T_INT iStartOffset, T_INT iSamples, T_INT iRingBufferLength);
Description
Copies the specified data or subrange to the destination.
Mathematical operation
Data are copied with circular indexing: the physical buffer index is taken modulo the ring-buffer length while the logical samples remain in sequential order.
Supported implementations
  • ANSI C - portable reference implementation

KiratPalCopy1DComplexMirrored

Signature
T_INT KiratPalCopy1DComplexMirrored( const T_COMPLEX* pcSource, T_COMPLEX* pcDestination, T_INT iSize);
Description
Copies the specified data or subrange to the destination.
Mathematical operation
\(y_i=x_{N-1-i}\).
Supported implementations
  • ANSI C - portable reference implementation
  • Intel/AMD processors - Intel IPP library support

KiratPalCopy1DComplexTo1DFloatImag

Signature
T_INT KiratPalCopy1DComplexTo1DFloatImag( const T_COMPLEX* pcSourceComplex, T_FLOAT* pfDestImag, T_INT iSize);
Description
Copies the specified data or subrange to the destination.
Mathematical operation
\(y_i=\Im z_i\).
Supported implementations
  • ANSI C - portable reference implementation
  • Intel/AMD processors - Intel IPP library support

KiratPalCopy1DComplexTo1DFloatReal

Signature
T_INT KiratPalCopy1DComplexTo1DFloatReal( const T_COMPLEX* pcSourceComplex, T_FLOAT* pfDestReal, T_INT iSize);
Description
Copies the specified data or subrange to the destination.
Mathematical operation
\(y_i=\Re z_i\).
Supported implementations
  • ANSI C - portable reference implementation
  • Intel/AMD processors - Intel IPP library support

KiratPalCopy1DComplexTo1DFloatRealAnd1DFloatImag

Signature
T_INT KiratPalCopy1DComplexTo1DFloatRealAnd1DFloatImag( const T_COMPLEX* pcSourceComplex, T_FLOAT* pfDestReal, T_FLOAT* pfDestImag, T_INT iSize);
Description
Copies the specified data or subrange to the destination.
Mathematical operation
\(r_i=\Re z_i,\quad q_i=\Im z_i\).
Supported implementations
  • ANSI C - portable reference implementation
  • Intel/AMD processors - Intel IPP library support

KiratPalCopy1DComplexToRingBuffer

Signature
T_INT KiratPalCopy1DComplexToRingBuffer( const T_COMPLEX* pcSource, T_COMPLEX* pcDestination, T_INT iStartOffset, T_INT iSamples, T_INT iRingBufferLength);
Description
Copies the specified data or subrange to the destination.
Mathematical operation
Data are copied with circular indexing: the physical buffer index is taken modulo the ring-buffer length while the logical samples remain in sequential order.
Supported implementations
  • ANSI C - portable reference implementation

KiratPalDivide1DComplexByComplexToDestination

Signature
T_INT KiratPalDivide1DComplexByComplexToDestination( T_COMPLEX cValue, T_COMPLEX* pcSource, T_COMPLEX* pcDestination, T_INT iSize);
Description
Divides element-wise; some implementations add SYS_EPS or another small safeguard to avoid division by zero.
Mathematical operation
For scalar \(c\), \(d_i=z_i c^*/(|c|^2+\varepsilon_{\mathrm{SYS}})\) on the generic path.
Supported implementations
  • ANSI C - portable reference implementation
  • Intel/AMD processors - Intel IPP library support

KiratPalDivide1DComplexByFloat

Signature
T_INT KiratPalDivide1DComplexByFloat(T_FLOAT fValue, T_COMPLEX* pcDestination, T_INT iSize);
Description
Divides element-wise; some implementations add SYS_EPS or another small safeguard to avoid division by zero.
Mathematical operation
\(d_i\leftarrow d_i/(c+\varepsilon_{\mathrm{SYS}})\) on the generic path.
Supported implementations
  • ANSI C - portable reference implementation

KiratPalDivide1DComplexWith1DComplex

Signature
T_INT KiratPalDivide1DComplexWith1DComplex( const T_COMPLEX* pcSource, T_COMPLEX* pcDestination, T_INT iSize);
Description
Divides element-wise; some implementations add SYS_EPS or another small safeguard to avoid division by zero.
Mathematical operation
ANSI-C path: \(d_i\leftarrow d_i x_i^*/(|x_i|^2+10^{-10})\).
Supported implementations
  • ANSI C - portable reference implementation
  • Intel/AMD processors - Intel IPP library support

KiratPalDivide1DComplexWith1DComplexToDest

Signature
T_INT KiratPalDivide1DComplexWith1DComplexToDest( const T_COMPLEX* pcSource1, const T_COMPLEX* pcSource2, T_COMPLEX* pcDestination, T_INT iSize);
Description
Divides element-wise; some implementations add SYS_EPS or another small safeguard to avoid division by zero.
Mathematical operation
ANSI-C path: \(d_i=x^{(2)}_i(x^{(1)}_i)^*/(|x^{(1)}_i|^2+10^{-10})\).
Supported implementations
  • ANSI C - portable reference implementation
  • Intel/AMD processors - Intel IPP library support

KiratPalDivide1DComplexWith1DFloat

Signature
T_INT KiratPalDivide1DComplexWith1DFloat( const T_FLOAT* pfSource, T_COMPLEX* pcDestination, T_INT iSize);
Description
Divides element-wise; some implementations add SYS_EPS or another small safeguard to avoid division by zero.
Mathematical operation
ANSI-C path: \(d_i\leftarrow d_i/(x_i+10^{-10})\).
Supported implementations
  • ANSI C - portable reference implementation

KiratPalDivide1DComplexWith1DFloatToDest

Signature
T_INT KiratPalDivide1DComplexWith1DFloatToDest( const T_FLOAT* pfSource1, const T_COMPLEX* pcSource2, T_COMPLEX* pcDestination, T_INT iSize);
Description
Divides element-wise; some implementations add SYS_EPS or another small safeguard to avoid division by zero.
Mathematical operation
ANSI-C path: \(d_i=z^{(2)}_i/(x^{(1)}_i+10^{-10})\).
Supported implementations
  • ANSI C - portable reference implementation

KiratPalInverse1DComplex

Signature
T_INT KiratPalInverse1DComplex(T_COMPLEX* pcSrcDest, T_INT iSize);
Description
Calculates the element-wise reciprocal; threshold variants limit critically small denominators.
Mathematical operation
ANSI-C path: \(z_i\leftarrow z_i^*/(|z_i|^2+\varepsilon_{\mathrm{SYS}})\).
Supported implementations
  • ANSI C - portable reference implementation
  • Intel/AMD processors - Intel IPP library support

KiratPalInverse1DComplexToDest

Signature
T_INT KiratPalInverse1DComplexToDest( const T_COMPLEX* pcSource, T_COMPLEX* pcDestination, T_INT iSize);
Description
Calculates the element-wise reciprocal; threshold variants limit critically small denominators.
Mathematical operation
ANSI-C path: \(y_i=z_i^*/(|z_i|^2+\varepsilon_{\mathrm{SYS}})\).
Supported implementations
  • ANSI C - portable reference implementation
  • Intel/AMD processors - Intel IPP library support

KiratPalMove1DComplex

Signature
T_INT KiratPalMove1DComplex(const T_COMPLEX* pcSource, T_COMPLEX* pcDestination, T_INT iSize);
Description
Moves/copies data safely even when source and destination memory regions overlap.
Mathematical operation
\(D_{\mathbf i}\leftarrow S_{\mathbf i}\) element-wise (with type conversion where indicated by the function name).
Supported implementations
  • ANSI C - portable reference implementation
  • Intel/AMD processors - Intel IPP library support

KiratPalMult1DComplexWith1DComplex

Signature
T_INT KiratPalMult1DComplexWith1DComplex( const T_COMPLEX* pcSource, T_COMPLEX* pcDestination, T_INT iSize);
Description
Multiplies scalar, vector, or array values element-wise; Acc variants add the product to the destination.
Mathematical operation
\(d_i\leftarrow d_is_i\).
Supported implementations
  • ANSI C - portable reference implementation
  • Intel/AMD processors - Intel IPP library support

KiratPalMult1DComplexWith1DComplexToDest

Signature
T_INT KiratPalMult1DComplexWith1DComplexToDest( const T_COMPLEX* pcSource1, const T_COMPLEX* pcSource2, T_COMPLEX* pcDestination, T_INT iSize);
Description
Multiplies scalar, vector, or array values element-wise; Acc variants add the product to the destination.
Mathematical operation
\(d_i=a_ib_i\).
Supported implementations
  • ANSI C - portable reference implementation
  • Intel/AMD processors - Intel IPP library support

KiratPalMult1DComplexWith1DFloat

Signature
T_INT KiratPalMult1DComplexWith1DFloat( const T_FLOAT* pfSource, T_COMPLEX* pcDestination, T_INT iSize);
Description
Multiplies scalar, vector, or array values element-wise; Acc variants add the product to the destination.
Mathematical operation
\(d_i\leftarrow d_is_i\).
Supported implementations
  • ANSI C - portable reference implementation
  • Intel/AMD processors - Intel IPP library support

KiratPalMult1DComplexWith1DFloatToDest

Signature
T_INT KiratPalMult1DComplexWith1DFloatToDest( const T_FLOAT* pfSource1, const T_COMPLEX* pcSource2, T_COMPLEX* pcDestination, T_INT iSize);
Description
Multiplies scalar, vector, or array values element-wise; Acc variants add the product to the destination.
Mathematical operation
\(d_i=a_ib_i\).
Supported implementations
  • ANSI C - portable reference implementation
  • Intel/AMD processors - Intel IPP library support

KiratPalMult1DComplexWithComplex

Signature
T_INT KiratPalMult1DComplexWithComplex(T_COMPLEX* pcDestination, T_COMPLEX* cFactor, T_INT iSize);
Description
Multiplies scalar, vector, or array values element-wise; Acc variants add the product to the destination.
Mathematical operation
\(d_i\leftarrow c\,d_i\).
Supported implementations
  • ANSI C - portable reference implementation
  • Intel/AMD processors - Intel IPP library support

KiratPalMult1DComplexWithComplexToDest

Signature
T_INT KiratPalMult1DComplexWithComplexToDest( T_COMPLEX* pcDestination, T_COMPLEX* pcSource, T_COMPLEX* cFactor, T_INT iSize);
Description
Multiplies scalar, vector, or array values element-wise; Acc variants add the product to the destination.
Mathematical operation
\(d_i=c\,s_i\).
Supported implementations
  • ANSI C - portable reference implementation
  • Intel/AMD processors - Intel IPP library support

KiratPalMult1DComplexWithConj1DComplexToDest

Signature
T_INT KiratPalMult1DComplexWithConj1DComplexToDest( const T_COMPLEX* pcSource1, const T_COMPLEX* pcSource2, T_COMPLEX* pcDestination, T_INT iSize);
Description
Multiplies scalar, vector, or array values element-wise; Acc variants add the product to the destination.
Mathematical operation
\(d_i=a_i b_i^*\).
Supported implementations
  • ANSI C - portable reference implementation
  • Intel/AMD processors - Intel IPP library support

KiratPalMult1DComplexWithConj1DComplexToDestSmoothed

Signature
T_INT KiratPalMult1DComplexWithConj1DComplexToDestSmoothed( const T_COMPLEX* pcSource1, const T_COMPLEX* pcSource2, T_COMPLEX* pcDestination, T_INT iSize, T_FLOAT fBeta);
Description
Multiplies scalar, vector, or array values element-wise; Acc variants add the product to the destination.
Mathematical operation
\(d_i=a_i b_i^*\).
Supported implementations
  • ANSI C - portable reference implementation

KiratPalMult1DComplexWithFloat

Signature
T_INT KiratPalMult1DComplexWithFloat(T_COMPLEX* pcDestination, T_FLOAT fFactor, T_INT iSize);
Description
Multiplies scalar, vector, or array values element-wise; Acc variants add the product to the destination.
Mathematical operation
\(d_i\leftarrow c\,d_i\).
Supported implementations
  • ANSI C - portable reference implementation
  • Intel/AMD processors - Intel IPP library support

KiratPalMult1DComplexWithFloatToDest

Signature
T_INT KiratPalMult1DComplexWithFloatToDest( const T_COMPLEX* pcSource, T_COMPLEX* pcDestination, T_FLOAT fFactor, T_INT iSize);
Description
Multiplies scalar, vector, or array values element-wise; Acc variants add the product to the destination.
Mathematical operation
\(d_i=c\,s_i\).
Supported implementations
  • ANSI C - portable reference implementation
  • Intel/AMD processors - Intel IPP library support

KiratPalMultConj1DComplexWith1DComplexToDest

Signature
T_INT KiratPalMultConj1DComplexWith1DComplexToDest( const T_COMPLEX* pcSource1, const T_COMPLEX* pcSource2, T_COMPLEX* pcDestination, T_INT iSize);
Description
Multiplies scalar, vector, or array values element-wise; Acc variants add the product to the destination.
Mathematical operation
\(d_i=a_i b_i^*\).
Supported implementations
  • ANSI C - portable reference implementation

KiratPalMultConj1DComplexWith1DFloatToDest

Signature
T_INT KiratPalMultConj1DComplexWith1DFloatToDest( const T_COMPLEX* pcSource1, const T_FLOAT* pfSource2, T_COMPLEX* pcDestination, T_INT iSize);
Description
Multiplies scalar, vector, or array values element-wise; Acc variants add the product to the destination.
Mathematical operation
\(d_i=a_i b_i^*\).
Supported implementations
  • ANSI C - portable reference implementation
  • Intel/AMD processors - Intel IPP library support

KiratPalPhase1DComplex

Signature
T_INT KiratPalPhase1DComplex(const T_COMPLEX* pcSource, T_FLOAT* pfDestination, T_INT iSize);
Description
Calculates the element-wise phase of complex values.
Mathematical operation
\(\varphi_i=\operatorname{atan2}(\Im z_i,\Re z_i)\).
Supported implementations
  • ANSI C - portable reference implementation
  • Intel/AMD processors - Intel IPP library support

KiratPalSet1DComplexToComplex

Signature
T_INT KiratPalSet1DComplexToComplex(T_COMPLEX* pcDestination, T_COMPLEX cValue, T_INT iSize);
Description
Sets every element of a complex vector to the same complex constant.
Mathematical operation
\(z_i\leftarrow c\).
Supported implementations
  • ANSI C - portable reference implementation
  • Intel/AMD processors - Intel IPP library support

KiratPalSet1DComplexToFloat

Signature
T_INT KiratPalSet1DComplexToFloat(T_COMPLEX* pcDestination, T_FLOAT fValue, T_INT iSize);
Description
Sets real components/elements from Float values; complex imaginary components are handled according to the implementation.
Mathematical operation
\(z_{\mathbf i}\leftarrow a+j0\).
Supported implementations
  • ANSI C - portable reference implementation
  • Intel/AMD processors - Intel IPP library support

KiratPalSet1DComplexToZero

Signature
T_INT KiratPalSet1DComplexToZero(T_COMPLEX* pcDestination, T_INT iSize);
Description
Sets all elements of the array to zero.
Mathematical operation
\(d_{\mathbf i}\leftarrow0\) for every array index \(\mathbf i\).
Supported implementations
  • ANSI C - portable reference implementation
  • Intel/AMD processors - Intel IPP library support

KiratPalSet1DComplexToZeroOrFillWithLowPowerNoise

Signature
T_INT KiratPalSet1DComplexToZeroOrFillWithLowPowerNoise(T_COMPLEX* pcDestination, T_INT iSize);
Description
Sets the array to zero or, depending on the configuration, fills it with very low-level noise to avoid numerical corner cases.
Mathematical operation
Current 1-D complex default path uses \(z_i=10^{-10}u_i+j10^{-10}v_i\) with \(u_i,v_i\approx\mathcal U[-1,1)\); higher-dimensional complex variants call this row-wise. (The 1-D local mode is currently set to noise.)
Supported implementations
  • ANSI C - portable reference implementation

KiratPalSubtract1DComplexFrom1DComplex

Signature
T_INT KiratPalSubtract1DComplexFrom1DComplex( const T_COMPLEX* pcSource, T_COMPLEX* pcDestination, T_INT iSize);
Description
Subtracts scalar, vector, or array values element-wise; “A from B” means B−A mathematically.
Mathematical operation
\(d_i\leftarrow x_i-d_i\) (the source explicitly uses this operand order).
Supported implementations
  • ANSI C - portable reference implementation
  • Intel/AMD processors - Intel IPP library support

KiratPalSubtract1DComplexFrom1DComplexToDest

Signature
T_INT KiratPalSubtract1DComplexFrom1DComplexToDest( const T_COMPLEX* pcSource1, const T_COMPLEX* pcSource2, T_COMPLEX* pcDestination, T_INT iSize);
Description
Subtracts scalar, vector, or array values element-wise; “A from B” means B−A mathematically.
Mathematical operation
\(d_i=x^{(1)}_i-x^{(2)}_i\).
Supported implementations
  • ANSI C - portable reference implementation
  • Intel/AMD processors - Intel IPP library support