LShiftC, RShiftC

Shift bits in vector elements to the left/right.

Syntax

Intel IPP style:

IppStatus ippsqLShiftCQ15_16s_s(const Ipp16s* pSrc, Ipp32u val, Ipp16s* pDst, Ipp32u len);

IppStatus ippsqLShiftCQ31_32s_s(const Ipp32s* pSrc, Ipp32u val, Ipp32s* pDst, Ipp32u len);

IppStatus ippsqRShiftCQ15_16s_Rm(const Ipp16s* pSrc, Ipp16s val, Ipp16s* pDst, Ipp32u len);

IppStatus ippsqRShiftCQ31_32s_Rm(const Ipp32s* pSrc, Ipp32s val, Ipp32s* pDst, Ipp32u len);

DSP style:

void ippsq_shift_q15(const q15_t* pSrc, int8_t val, q15_t* pDst, uint32_t len);

void ippsq_shift_q31(const q31_t* pSrc, int8_t val, q31_t* pDst, uint32_t len);

Include Files

ippsq.h

dsp.h

Parameters

pSrc

Pointer to the source vector.

val

Number of bits by which the function shifts each element of the source vector.

pDst

Pointer to the destination vector.

len

Number of elements in the vector.

Description

Intel IPP style: The LShiftC and RShiftC functions shift each element of the pSrc vector by val bits to the left or to the right, respectively, and store the result in pDst.

Intel DSP style: The shift function shifts each element of the pSrc vector by val bits to the left for positive val, and to the right for negative val.

Function flavors with the _s suffix perform saturation of the resulting value if it exceeds the data range.

Return Values

ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when any of the specified pointers is NULL.
For more complete information about compiler optimizations, see our Optimization Notice.