MulC_NR

Multiplies each element of a vector by a constant value.

Syntax

IppStatus ippsMulC_NR_16s_Sfs (Ipp16s* pSrc, Ipp16s val, Ipp16s* pDst, int len, int scaleFactor);

IppStatus ippsMulC_NR_16s_ISfs (Ipp16s val, Ipp16s* pSrcDst, int len, int scaleFactor);

Parameters

val

The scalar value used to multiply to each element of the source vector.

pSrc

Pointer to the source vector.

pDst

Pointer to the destination vector.

pSrcDst

Pointer to the source and destination vector for the in-place operation.

len

Number of elements in the vector.

scaleFactor

Scale factor for output data scaling.

Description

The function ippsMulC_NR is declared in the ippsc.h file. This function multiplies the source vector pSrc by the scalar value val, and stores the result in pDst.

The in-place function flavor multiplies the vector pSrcDst by val, and stores the result in pSrcDst.

Both function flavors scale the multiplication results in accordance with the scaleFactor value (see Integer Scaling). If output values exceed the data range, the results are saturated.

Functions ippsMulC_NR perform “nearest right” rounding needed to meet the bit-to-bit exactness requirement.

Return Values

ippStsNoErr

Indicates no error.

ippStsNullPtrErr I

ndicates an error when the pSrc, pDst, or pSrcDst pointer is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

ippStsScaleRangeErr

Indicates an error when scaleFactor is less than 0.

Submit feedback on this help topic

Copyright © 2000 - 2011, Intel Corporation. All rights reserved.