PAL 1D Arrays: Float Setup and Arithmetic

Initialization, copying, movement, addition, subtraction, multiplication, division, and direct scalar/vector arithmetic for one-dimensional Float arrays.

PAL 1D Arrays: Float Setup and Arithmetic — 33 functions

KiratPalAdd1DFloatTo1DFloat

Signature
void KiratPalAdd1DFloatTo1DFloat(const T_FLOAT* pfSource, T_FLOAT* pfDestination, 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
  • Analog Devices SHARC DSP — Analog Devices SHARC-specific implementation
  • ARM — ARM NE10 optimized implementation
  • TI C66x DSP — TI DSP-Lib optimized implementation

KiratPalAdd1DFloatTo1DFloatToDest

Signature
T_INT KiratPalAdd1DFloatTo1DFloatToDest( const T_FLOAT* pfSource1, const T_FLOAT* pfSource2, T_FLOAT* pfDestination, 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
  • ARM — ARM NE10 optimized implementation

KiratPalAddFloatTo1DFloat

Signature
T_INT KiratPalAddFloatTo1DFloat(T_FLOAT fSource, T_FLOAT* pfDestination, 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+c\).
Supported implementations
  • ANSI C - portable reference implementation
  • Intel/AMD processors - Intel IPP library support
  • ARM — ARM NE10 optimized implementation

KiratPalAddFloatTo1DFloatToDest

Signature
T_INT KiratPalAddFloatTo1DFloatToDest( const T_FLOAT* pfSource, T_FLOAT fValue, T_FLOAT* pfDestination, 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+c\).
Supported implementations
  • ANSI C - portable reference implementation
  • Intel/AMD processors - Intel IPP library support

KiratPalAddSubset1DFloatTo1DFloat

Signature
void KiratPalAddSubset1DFloatTo1DFloat( const T_FLOAT* pfSource, T_FLOAT* pfDestination, T_INT iSize, T_INT* piPoints);
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

KiratPalCopy1DFloat

Signature
T_INT KiratPalCopy1DFloat(const T_FLOAT* pfSource, T_FLOAT* pfDestination, 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
  • ARM — processor-specific ARM branch

KiratPalCopy1DFloatFromRingBuffer

Signature
T_INT KiratPalCopy1DFloatFromRingBuffer( const T_FLOAT* pfSource, T_FLOAT* pfDestination, 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

KiratPalCopy1DFloatReverse

Signature
T_INT KiratPalCopy1DFloatReverse(const T_FLOAT* pfSource, T_FLOAT* pfDestination, 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

KiratPalCopy1DFloatToRingBuffer

Signature
T_INT KiratPalCopy1DFloatToRingBuffer( const T_FLOAT* pfSource, T_FLOAT* pfDestination, 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

KiratPalDivide1DFloatWith1DFloat

Signature
T_INT KiratPalDivide1DFloatWith1DFloat( const T_FLOAT* pfSource, T_FLOAT* pfDestination, 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/x_i\).
Supported implementations
  • ANSI C - portable reference implementation
  • Intel/AMD processors - Intel IPP library support
  • ARM — ARM NE10 optimized implementation

KiratPalDivide1DFloatWith1DFloatToDest

Signature
T_INT KiratPalDivide1DFloatWith1DFloatToDest( const T_FLOAT* pfSource1, const T_FLOAT* pfSource2, T_FLOAT* pfDestination, 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=x^{(2)}_i/x^{(1)}_i\).
Supported implementations
  • ANSI C - portable reference implementation
  • Intel/AMD processors - Intel IPP library support
  • ARM — ARM NE10 optimized implementation

KiratPalDivide1DFloatWithFloat

Signature
T_INT KiratPalDivide1DFloatWithFloat(T_FLOAT* pfDestination, T_FLOAT fValue, 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\).
Supported implementations
  • ANSI C - portable reference implementation
  • Intel/AMD processors - Intel IPP library support

KiratPalDivide1DFloatWithFloatToDest

Signature
T_INT KiratPalDivide1DFloatWithFloatToDest( const T_FLOAT* pfSource, T_FLOAT* pfDestination, T_FLOAT fValue, 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=x_i/c\).
Supported implementations
  • ANSI C - portable reference implementation
  • Intel/AMD processors - Intel IPP library support

KiratPalMove1DFloat

Signature
T_INT KiratPalMove1DFloat(const T_FLOAT* pfSource, T_FLOAT* pfDestination, 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

KiratPalMult1DFloatWith1DFloat

Signature
void KiratPalMult1DFloatWith1DFloat(const T_FLOAT* pfSource, T_FLOAT* pfDestination, 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
  • Analog Devices SHARC DSP — Analog Devices SHARC-specific implementation
  • ARM — ARM NE10 optimized implementation
  • TI C66x DSP — TI DSP-Lib optimized implementation

KiratPalMult1DFloatWith1DFloatToDest

Signature
void KiratPalMult1DFloatWith1DFloatToDest( const T_FLOAT* pfSource1, const T_FLOAT* pfSource2, T_FLOAT* pfDestination, 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
  • Analog Devices SHARC DSP — Analog Devices SHARC-specific implementation
  • ARM — ARM NE10 optimized implementation
  • TI C66x DSP — TI DSP-Lib optimized implementation

KiratPalMult1DFloatWithFloat

Signature
T_INT KiratPalMult1DFloatWithFloat(T_FLOAT* pfDestination, T_FLOAT fValue, 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
  • ARM — ARM NE10 optimized implementation

KiratPalMult1DFloatWithFloatToDest

Signature
T_INT KiratPalMult1DFloatWithFloatToDest( const T_FLOAT* pfSource, T_FLOAT* pfDestination, T_FLOAT fValue, 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
  • ARM — ARM NE10 optimized implementation

KiratPalMultAcc1DFloatWith1DFloat

Signature
void KiratPalMultAcc1DFloatWith1DFloat( const T_FLOAT* pfSource1, const T_FLOAT* pfSource2, T_FLOAT* pfDestination, 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_i+a_ib_i\) (subset variants only over the selected range).
Supported implementations
  • ANSI C - portable reference implementation
  • Intel/AMD processors - Intel IPP library support
  • Analog Devices SHARC DSP — Analog Devices SHARC-specific implementation
  • ARM — ARM NE10 optimized implementation
  • TI C66x DSP — TI DSP-Lib optimized implementation

KiratPalMultAcc1DFloatWithFloat

Signature
T_INT KiratPalMultAcc1DFloatWithFloat( const T_FLOAT* pfSource, T_FLOAT fValue, T_FLOAT* pfDestination, 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_i+a_ib_i\) (subset variants only over the selected range).
Supported implementations
  • ANSI C - portable reference implementation
  • Intel/AMD processors - Intel IPP library support
  • ARM — ARM NE10 optimized implementation

KiratPalSet1DFloatToLowPowerNoise

Signature
void KiratPalSet1DFloatToLowPowerNoise(T_FLOAT* pfDestination, T_INT iSize);
Description
Fills the array with very low-level noise.
Mathematical operation
\(x_i=10^{-10}u_i\), with \(u_i\approx\mathcal U[-1,1)\).
Supported implementations
  • ANSI C - portable reference implementation

KiratPalSet1DFloatToValue

Signature
T_INT KiratPalSet1DFloatToValue(T_FLOAT* pfDestination, T_INT iSize, T_FLOAT fValue);
Description
Sets all elements of the array to a constant value.
Mathematical operation
\(d_{\mathbf i}\leftarrow c\) for every array index \(\mathbf i\).
Supported implementations
  • ANSI C - portable reference implementation
  • Intel/AMD processors - Intel IPP library support
  • ARM — ARM NE10 optimized implementation

KiratPalSet1DFloatToValueIfAboveBelowTheshold

Signature
T_INT KiratPalSet1DFloatToValueIfAboveBelowTheshold( T_FLOAT* pfDestination, T_INT iSize, T_FLOAT fMin, T_FLOAT fValMin, T_FLOAT fMax, T_FLOAT fValMax);
Description
Replaces elements by specified values depending on a threshold condition.
Mathematical operation
\(d_i=\begin{cases}v_{above},&d_i>t_{above},\\v_{below},&d_i<t_{below},\\d_i,&\text{otherwise}.\end{cases}\)
Supported implementations
  • ANSI C - portable reference implementation
  • Intel/AMD processors - Intel IPP library support

KiratPalSet1DFloatToValueIfAboveTheshold

Signature
T_INT KiratPalSet1DFloatToValueIfAboveTheshold( T_FLOAT* pfDestination, T_INT iSize, T_FLOAT fValue, T_FLOAT fThreshold);
Description
Replaces elements by specified values depending on a threshold condition.
Mathematical operation
\(d_{\mathbf i}\leftarrow v\) if \(d_{\mathbf i}>t\); otherwise the element is unchanged.
Supported implementations
  • ANSI C - portable reference implementation
  • Intel/AMD processors - Intel IPP library support

KiratPalSet1DFloatToValueIfBelowTheshold

Signature
T_INT KiratPalSet1DFloatToValueIfBelowTheshold( T_FLOAT* pfDestination, T_INT iSize, T_FLOAT fValue, T_FLOAT fThreshold);
Description
Replaces elements by specified values depending on a threshold condition.
Mathematical operation
\(d_{\mathbf i}\leftarrow v\) if \(d_{\mathbf i}<t\); otherwise the element is unchanged.
Supported implementations
  • ANSI C - portable reference implementation
  • Intel/AMD processors - Intel IPP library support

KiratPalSet1DFloatToZero

Signature
T_INT KiratPalSet1DFloatToZero(T_FLOAT* pfDestination, 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
  • ARM — ARM NE10 optimized implementation

KiratPalSet1DFloatToZeroOrFillWithLowPowerNoise

Signature
void KiratPalSet1DFloatToZeroOrFillWithLowPowerNoise(T_FLOAT* pfDestination, 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 real-valued default path selects the local zero mode, so \(x_i=0\); the alternative code path would use uniform noise of gain \(10^{-10}\).
Supported implementations
  • ANSI C - portable reference implementation

KiratPalSubtract1DFloatFrom1DFloat

Signature
T_INT KiratPalSubtract1DFloatFrom1DFloat( const T_FLOAT* pfSource, T_FLOAT* pfDestination, T_INT iSize);
Description
Subtracts scalar, vector, or array values element-wise; “A from B” means B−A mathematically.
Mathematical operation
\(d_i\leftarrow d_i-x_i\).
Supported implementations
  • ANSI C - portable reference implementation
  • Intel/AMD processors - Intel IPP library support
  • ARM — ARM NE10 optimized implementation

KiratPalSubtract1DFloatFrom1DFloatToDest

Signature
T_INT KiratPalSubtract1DFloatFrom1DFloatToDest( const T_FLOAT* pfSource1, const T_FLOAT* pfSource2, T_FLOAT* pfDestination, T_INT iSize);
Description
Subtracts scalar, vector, or array values element-wise; “A from B” means B−A mathematically.
Mathematical operation
\(d_i=x^{(2)}_i-x^{(1)}_i\).
Supported implementations
  • ANSI C - portable reference implementation
  • Intel/AMD processors - Intel IPP library support
  • ARM — ARM NE10 optimized implementation

KiratPalSubtract1DFloatFromFloat

Signature
T_INT KiratPalSubtract1DFloatFromFloat(T_FLOAT* pfDestination, T_FLOAT fValue, T_INT iSize);
Description
Subtracts scalar, vector, or array values element-wise; “A from B” means B−A mathematically.
Mathematical operation
\(d_i\leftarrow c-d_i\).
Supported implementations
  • ANSI C - portable reference implementation
  • Intel/AMD processors - Intel IPP library support

KiratPalSubtract1DFloatFromFloatToDest

Signature
T_INT KiratPalSubtract1DFloatFromFloatToDest( T_FLOAT* pfDestination, T_FLOAT* pfSource, T_FLOAT fValue, T_INT iSize);
Description
Subtracts scalar, vector, or array values element-wise; “A from B” means B−A mathematically.
Mathematical operation
\(d_i=c-x_i\).
Supported implementations
  • ANSI C - portable reference implementation
  • Intel/AMD processors - Intel IPP library support

KiratPalSubtractFloatFrom1DFloat

Signature
T_INT KiratPalSubtractFloatFrom1DFloat(T_FLOAT* pfDestination, T_FLOAT fValue, T_INT iSize);
Description
Subtracts scalar, vector, or array values element-wise; “A from B” means B−A mathematically.
Mathematical operation
\(d_i\leftarrow d_i-c\).
Supported implementations
  • ANSI C - portable reference implementation
  • Intel/AMD processors - Intel IPP library support
  • ARM — ARM NE10 optimized implementation

KiratPalSubtractFloatFrom1DFloatToDest

Signature
T_INT KiratPalSubtractFloatFrom1DFloatToDest( T_FLOAT* pfSource, T_FLOAT* pfDestination, T_FLOAT fValue, T_INT iSize);
Description
Subtracts scalar, vector, or array values element-wise; “A from B” means B−A mathematically.
Mathematical operation
\(d_i=x_i-c\).
Supported implementations
  • ANSI C - portable reference implementation
  • Intel/AMD processors - Intel IPP library support
  • ARM — ARM NE10 optimized implementation