PAL 1D Arrays: Boolean and Integer Operations
Basic Boolean, integer, and short-vector initialization, copying, arithmetic, counting, sorting, and conversion helpers.
|
|
|---|---|
KiratPal1DIntSortAscendSignature
T_INT KiratPal1DIntSortAscend(T_INT* piSrcDest, T_INT iSize);Description
Sorts the array in ascending order. Mathematical operation
\(y_{(0)}\le y_{(1)}\le\cdots\le y_{(N-1)}\), where \(y\) is a permutation of the input elements. Supported implementations
|
|
KiratPalAdd1DIntTo1DIntSignature
T_INT KiratPalAdd1DIntTo1DInt(T_INT* piDestination, T_INT* piVector, 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
|
|
KiratPalAddIntTo1DIntSignature
T_INT KiratPalAddIntTo1DInt(T_INT* piDest, T_INT iValue, 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
|
|
KiratPalCopy1DBoolSignature
T_INT KiratPalCopy1DBool(const T_BOOL* pbSource, T_BOOL* pbDestination, 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
|
|
KiratPalCopy1DIntSignature
T_INT KiratPalCopy1DInt(const T_INT* piSource, T_INT* piDestination, 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
|
|
KiratPalGetMax1DIntSignature
T_INT KiratPalGetMax1DInt(const T_INT* piVector, T_INT iSize);Description
Returns the largest value in the array. Mathematical operation
\(y=\max_{\mathbf i}x_{\mathbf i}\). Supported implementations
|
|
KiratPalGetNumTruesAndIndex1DBoolSignature
T_INT KiratPalGetNumTruesAndIndex1DBool(const T_BOOL* pbSource, T_INT iSize, T_INT* iIndex);Description
Counts true Boolean values and writes their indices to a destination array. Mathematical operation
\(N_T=\sum_i\mathbf1[b_i=\mathrm{true}]\); the function also stores the indices for which the indicator is 1. Supported implementations
|
|
KiratPalIntShuffleSignature
void KiratPalIntShuffle(T_INT* piInOut, T_INT iSize);Description
Pseudo-randomly shuffles the order of the elements. Mathematical operation
\(y_i=x_{\pi(i)}\) for a pseudo-random permutation \(\pi\). Supported implementations
|
|
KiratPalSet1DBoolToValueSignature
T_INT KiratPalSet1DBoolToValue(T_BOOL* pbDestination, T_INT iSize, 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
|
|
KiratPalSet1DIntToValueSignature
T_INT KiratPalSet1DIntToValue(T_INT* piDestination, T_INT iSize, 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
|
|
KiratPalSet1DIntToZeroSignature
T_INT KiratPalSet1DIntToZero(T_INT* piDestination, 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
|
|
KiratPalSet1DShortToZeroSignature
T_INT KiratPalSet1DShortToZero(T_SHORT* psDestination, 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
|
|
KiratPalSubtract1DIntFrom1DIntSignature
T_INT KiratPalSubtract1DIntFrom1DInt(T_INT* piDestination, T_INT* piVector, 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
|
|
KiratPalSumUp1DBoolVectorToScalarSignature
T_INT KiratPalSumUp1DBoolVectorToScalar(const T_BOOL* pbSource, T_INT iSize);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
|
|
KiratPalSumUp1DIntVectorToScalarSignature
T_INT KiratPalSumUp1DIntVectorToScalar(const T_INT* piSource, T_INT iSize);Description
Sums array elements; variants sum values, magnitudes, powers, or Boolean true values. Mathematical operation
\(s=\sum_i x_i\). Supported implementations
|