PAL 2D Arrays: Double-Precision Operations

Initialization, copying, arithmetic, and Float/Double interaction for two-dimensional Double arrays.

PAL 2D Arrays: Double-Precision Operations — 11 functions

KiratPalAdd2DDoubleTo2DDouble

Signature
void KiratPalAdd2DDoubleTo2DDouble( T_DOUBLE** ppdSource, T_DOUBLE** ppdDestination, T_INT iSizeDim1, T_INT iSizeDim2);
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_{\mathbf i}\leftarrow d_{\mathbf i}+s_{\mathbf i}\) (or \(+c\) for a scalar source).
Supported implementations
  • ANSI C - portable reference implementation

KiratPalAdd2DDoubleTo2DFloat

Signature
void KiratPalAdd2DDoubleTo2DFloat( T_DOUBLE** ppdSource, T_FLOAT** ppfDestination, T_INT iSizeDim1, T_INT iSizeDim2);
Description
Adds scalar, vector, or array values element-wise; ToDest writes to a separate destination, while Acc accumulates into an existing destination.
Mathematical operation
\(y_{\mathbf i}=\operatorname{cast}(x_{\mathbf i})\) element-wise.
Supported implementations
  • ANSI C - portable reference implementation

KiratPalAdd2DFloatTo2DDouble

Signature
void KiratPalAdd2DFloatTo2DDouble( T_FLOAT** ppfSource, T_DOUBLE** ppdDestination, T_INT iSizeDim1, T_INT iSizeDim2);
Description
Adds scalar, vector, or array values element-wise; ToDest writes to a separate destination, while Acc accumulates into an existing destination.
Mathematical operation
\(y_{\mathbf i}=\operatorname{cast}(x_{\mathbf i})\) element-wise.
Supported implementations
  • ANSI C - portable reference implementation

KiratPalAdd2DFloatTo2DFloatToDoubleDest

Signature
void KiratPalAdd2DFloatTo2DFloatToDoubleDest( T_FLOAT** ppfSource1, T_FLOAT** ppfSource2, T_DOUBLE** ppdDestination, T_INT iSizeDim1, T_INT iSizeDim2);
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_{\mathbf i}=a_{\mathbf i}+b_{\mathbf i}\) (or source element plus scalar, according to the signature).
Supported implementations
  • ANSI C - portable reference implementation

KiratPalCopy2DDouble

Signature
void KiratPalCopy2DDouble( T_DOUBLE* const* ppdSource, T_DOUBLE** ppdDestination, 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

KiratPalCopy2DDoubleTo2DFloat

Signature
void KiratPalCopy2DDoubleTo2DFloat( T_DOUBLE** ppdSource, 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

KiratPalCopy2DFloatTo2DDouble

Signature
void KiratPalCopy2DFloatTo2DDouble( T_FLOAT** ppfSource, T_DOUBLE** ppdDestination, 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

KiratPalMult2DDoubleWith1DDoubleToDest

Signature
void KiratPalMult2DDoubleWith1DDoubleToDest( T_DOUBLE* const* ppdSource, T_DOUBLE* pdFactor, T_DOUBLE** ppdDestination, T_INT iSizeDim1, T_INT iSizeDim2);
Description
Multiplies scalar, vector, or array values element-wise; Acc variants add the product to the destination.
Mathematical operation
\(d_{\mathbf i}=a_{\mathbf i}b_{\mathbf i}\).
Supported implementations
  • ANSI C - portable reference implementation

KiratPalMult2DDoubleWith1DFloat

Signature
void KiratPalMult2DDoubleWith1DFloat( T_DOUBLE** ppdDestination, T_FLOAT* pfFactor, T_INT iSizeDim1, T_INT iSizeDim2);
Description
Multiplies scalar, vector, or array values element-wise; Acc variants add the product to the destination.
Mathematical operation
\(d_{\mathbf i}\leftarrow d_{\mathbf i}s_{\mathbf i}\).
Supported implementations
  • ANSI C - portable reference implementation

KiratPalMult2DDoubleWithFloat

Signature
void KiratPalMult2DDoubleWithFloat( T_DOUBLE** ppdDestination, T_FLOAT fFactor, T_INT iSizeDim1, T_INT iSizeDim2);
Description
Multiplies scalar, vector, or array values element-wise; Acc variants add the product to the destination.
Mathematical operation
\(d_{\mathbf i}\leftarrow c\,d_{\mathbf i}\).
Supported implementations
  • ANSI C - portable reference implementation

KiratPalSet2DDoubleToZero

Signature
void KiratPalSet2DDoubleToZero(T_DOUBLE** ppdDestination, 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