Intel® Integrated Performance Primitives (Intel® IPP) Developer Guide and Reference

ID 790148
Date 3/22/2024
Public
Document Table of Contents

MulC

Multiplies each element of a vector by a constant value.

Syntax

Case 1. Not-in-place operations without scaling.

IppStatus ippsMulC_32f(const Ipp32f* pSrc, Ipp32f val, Ipp32f* pDst, int len);

IppStatus ippsMulC_64f(const Ipp64f* pSrc, Ipp64f val, Ipp64f* pDst, int len);

IppStatus ippsMulC_32fc(const Ipp32fc* pSrc, Ipp32fc val, Ipp32fc* pDst, int len);

IppStatus ippsMulC_64fc(const Ipp64fc* pSrc, Ipp64fc val, Ipp64fc* pDst, int len);

IppStatus ippsMulC_Low_32f16s(const Ipp32f* pSrc, Ipp32f val, Ipp16s* pDst, int len);

Case 2. Not-in-place operations with scaling.

IppStatus ippsMulC_8u_Sfs(const Ipp8u* pSrc, Ipp8u val, Ipp8u* pDst, int len, int scaleFactor);

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

IppStatus ippsMulC_16u_Sfs(const Ipp16u* pSrc, Ipp16u val, Ipp16u* pDst, int len, int scaleFactor);

IppStatus ippsMulC_32s_Sfs(const Ipp32s* pSrc, Ipp32s val, Ipp32s* pDst, int len, int scaleFactor);

IppStatus ippsMulC_16sc_Sfs(const Ipp16sc* pSrc, Ipp16sc val, Ipp16sc* pDst, int len, int scaleFactor);

IppStatus ippsMulC_32sc_Sfs(const Ipp32sc* pSrc, Ipp32sc val, Ipp32sc* pDst, int len, int scaleFactor);

IppStatus ippsMulC_32f16s_Sfs(const Ipp32f* pSrc, Ipp32f val, Ipp16s* pDst, int len, int scaleFactor);

Case 3. In-place operations without scaling.

IppStatus ippsMulC_16s_I(Ipp16s val, Ipp16s* pSrcDst, int len);

IppStatus ippsMulC_32f_I(Ipp32f val, Ipp32f* pSrcDst, int len);

IppStatus ippsMulC_64f_I(Ipp64f val, Ipp64f* pSrcDst, int len);

IppStatus ippsMulC_32fc_I(Ipp32fc val, Ipp32fc* pSrcDst, int len);

IppStatus ippsMulC_64fc_I(Ipp64fc val, Ipp64fc* pSrcDst, int len);

Case 4. In-place operations with scaling.

IppStatus ippsMulC_8u_ISfs(Ipp8u val, Ipp8u* pSrcDst, int len, int scaleFactor);

IppStatus ippsMulC_16u_ISfs(Ipp16u val, Ipp16u* pSrcDst, int len, int scaleFactor);

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

IppStatus ippsMulC_32s_ISfs(Ipp32s val, Ipp32s* pSrcDst, int len, int scaleFactor);

IppStatus ippsMulC_64f64s_ISfs(Ipp64f val, Ipp64s* pSrcDst, Ipp32u len, int scaleFactor);

IppStatus ippsMulC_16sc_ISfs(Ipp16sc val, Ipp16sc* pSrcDst, int len, int scaleFactor);

IppStatus ippsMulC_32sc_ISfs(Ipp32sc val, Ipp32sc* pSrcDst, int len, int scaleFactor);

IppStatus ippsMulC_64s_ISfs(Ipp64s val, Ipp64s* pSrcDst, Ipp32u len, int scaleFactor);

Case 5. Not In-place operations without scaling with platform-aware functions.

IppStatus ippsMulC_32f_L(const Ipp32f* pSrc, Ipp32f val, Ipp32f* pDst, IppSizeL len);

IppStatus ippsMulC_64f_L(const Ipp64f* pSrc, Ipp64f val, Ipp64f* pDst, IppSizeL len);

IppStatus ippsMulC_32fc_L(const Ipp32fc* pSrc, Ipp32fc val, Ipp32fc* pDst, IppSizeL len);

IppStatus ippsMulC_64fc_L(const Ipp64fc* pSrc, Ipp64fc val, Ipp64fc* pDst, IppSizeL len);

Case 6. Not-in-place operations with scaling with platform-aware functions.

IppStatus ippsMulC_32s_Sfs_L(const Ipp32s* pSrc, Ipp32s val, Ipp32s* pDst, IppSizeL len, int scaleFactor);

Case 7. In-place operations without scaling with platform-aware functions.

IppStatus ippsMulC_64f_I_L(Ipp64f val, Ipp64f* pSrcDst, IppSizeL len);

IppStatus ippsMulC_32fc_I_L(Ipp32fc val, Ipp32fc* pSrcDst, IppSizeL len);

IppStatus ippsMulC_64fc_I_L(Ipp64fc val, Ipp64fc* pSrcDst, IppSizeL len);

Case 8. In-place operations with scaling with platform-aware functions.

IppStatus ippsMulC_32s_ISfs_L(Ipp32s val, Ipp32s* pSrcDst, IppSizeL len, int scaleFactor);

Include Files

ipps.h

Domain Dependencies

Headers: ippcore.h, ippvm.h

Libraries: ippcore.lib, ippvm.lib

Parameters

pSrc

Pointer to the source vector.

val

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

pDst

Pointer to the destination vector.

pSrcDst

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

len

The number of elements in the vector

scaleFactor

Scale factor, refer to Integer Scaling.

Description

This function multiplies each element of the vector pSrc by a value val and stores the result in pDst.

The in-place flavors of ippsMulC multiply each element of the vector pSrcDst by a value val and store the result in pSrcDst.

The function flavor with Low suffix in its name requires that each value of the product pSrc*val does not exceed the Ipp32s data type range.

The function flavors with Sfs suffix perform scaling of the result value in accordance with the scaleFactor value. If the output value exceeds the data range, the result is saturated.

Return Values

ippStsNoErr

Indicates no error.

ippStsNullPtrErr

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

ippStsSizeErr

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

See Also