PAL 2D Arrays: Boolean and Integer Operations

Initialization, copying, reduction, extrema, and type conversion for two-dimensional Boolean and integer arrays.

PAL 2D Arrays: Boolean and Integer Operations — 9 functions

KiratPalCopy2DBool

Signature
void KiratPalCopy2DBool( T_BOOL** ppbSource, T_BOOL** ppbDestination, T_INT iSizeDim1, T_INT iSizeDim2);
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

KiratPalCopy2DInt

Signature
void KiratPalCopy2DInt( T_INT** ppiSource, T_INT** ppiDestination, T_INT iSizeDim1, T_INT iSizeDim2);
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

KiratPalCopy2DIntTo2DFloat

Signature
void KiratPalCopy2DIntTo2DFloat( T_INT** ppiSource, T_FLOAT** ppfDestination, T_INT iSizeDim1, T_INT iSizeDim2);
Description
Copies the specified data or subrange to the destination.
Mathematical operation
\(y_{\mathbf i}=\operatorname{cast}(x_{\mathbf i})\) element-wise.
Supported implementations
  • ANSI C - portable reference implementation

KiratPalGetMax2DInt

Signature
T_INT KiratPalGetMax2DInt(T_INT** ppiVector, T_INT iSize1, T_INT iSize2);
Description
Returns the largest value in the array.
Mathematical operation
\(y=\max_{\mathbf i}x_{\mathbf i}\).
Supported implementations
  • ANSI C - portable reference implementation

KiratPalGetMin2DInt

Signature
T_INT KiratPalGetMin2DInt(T_INT** ppiVector, T_INT iSize1, T_INT iSize2);
Description
Returns the smallest value in the array.
Mathematical operation
\(y=\min_{\mathbf i}x_{\mathbf i}\).
Supported implementations
  • ANSI C - portable reference implementation

KiratPalSet2DBoolToValue

Signature
void KiratPalSet2DBoolToValue( T_BOOL** ppbDestination, T_INT iSizeDim1, T_INT iSizeDim2, T_BOOL bValue);
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

KiratPalSet2DIntToValue

Signature
void KiratPalSet2DIntToValue( T_INT** ppiDestination, T_INT iSizeDim1, T_INT iSizeDim2, T_INT iValue);
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

KiratPalSet2DIntToZero

Signature
void KiratPalSet2DIntToZero(T_INT** ppiDestination, T_INT iSizeDim1, T_INT iSizeDim2);
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

KiratPalSumUp2DBoolVectorToScalar

Signature
T_INT KiratPalSumUp2DBoolVectorToScalar(const T_BOOL** ppbSource, T_INT iSizeDim1, T_INT iSizeDim2);
Description
Sums array elements; variants sum values, magnitudes, powers, or Boolean true values.
Mathematical operation
\(s=\sum_i\mathbf1[b_i=\mathrm{true}]\) (or the analogous sum over all matrix indices).
Supported implementations
  • ANSI C - portable reference implementation