Scale

Multiplies a matrix by a scalar value.

Syntax

DSP style:

ippsq_status ippsq_mat_scale_f32 (const ippsq_matrix_instance_f32 *pSrc, float32_t scale, ippsq_matrix_instance_f32 *pDst);

ippsq_status ippsq_mat_scale_q15 (const ippsq_matrix_instance_q15 *pSrc, q15_t scale, int32_t shift, ippsq_matrix_instance_q15 *pDst);

ippsq_status ippsq_mat_scale_q31 (const ippsq_matrix_instance_q31 *pSrc, q31_t scale, int32_t shift, ippsq_matrix_instance_q31 *pDst);

Include Files

dsp.h

Parameters

pSrc

Pointer to the source matrix.

pDst

Pointer to destination matrix.

scale

Scalar value to multiply each element of the source matrix by.

shift

Scale factor for the Q15 and Q31 function flavors.

Description

This function multiplies each element of pSrc by the scale value. For integer functions, an arithmetic shift shift is added. The pSrc and pDst matrices must have an equal number of rows and columns.

Before using this function, initialize the pSrc and pDst matrices using the Init function.

Return Values

IPPSQ_MATH_SUCCESS

Indicates no error.

IPPSQ_MATH_ARGUMENT_ERROR

Indicates an error when any of the specified pointers is NULL.

IPPSQ_MATH_SIZE_MISMATCH

Indicates an error when matrix sizes are not compatible with the operation.

See Also

For more complete information about compiler optimizations, see our Optimization Notice.