DivC
DivC
Divides each element of a vector by a constant value.
Syntax
Case 1. Not-in-place operations on floating point data.
IppStatus ippsDivC_32f(const Ipp32f*
pSrc
, Ipp32f
val
, Ipp32f*
pDst
, int
len
);
IppStatus ippsDivC_64f(const Ipp64f*
pSrc
, Ipp64f
val
, Ipp64f*
pDst
, int
len
);
IppStatus ippsDivC_32fc(const Ipp32fc*
pSrc
, Ipp32fc
val
, Ipp32fc*
pDst
, int
len
);
IppStatus ippsDivC_64fc(const Ipp64fc*
pSrc
, Ipp64fc
val
, Ipp64fc*
pDst
, int
len
);
Case 2. Not-in-place operations on integer data with scaling.
IppStatus ippsDivC_8u_Sfs(const Ipp8u*
pSrc
, Ipp8u
val
, Ipp8u*
pDst
, int
len
, int
scaleFactor
);
IppStatus ippsDivC_16u_Sfs(const Ipp16u*
pSrc
, Ipp16u
val
, Ipp16u*
pDst
, int
len
, int
scaleFactor
);
IppStatus ippsDivC_16s_Sfs(const Ipp16s*
pSrc
, Ipp16s
val
, Ipp16s*
pDst
, int
len
, int
scaleFactor
);
IppStatus ippsDivC_16sc_Sfs(const Ipp16sc*
pSrc
, Ipp16sc
val
, Ipp16sc*
pDst
, int
len
, int
scaleFactor
);
Case 3. In-place operations on floating point data.
IppStatus ippsDivC_32f_I(Ipp32f
val
, Ipp32f*
pSrcDst
, int
len
);
IppStatus ippsDivC_64f_I(Ipp64f
val
, Ipp64f*
pSrcDst
, int
len
);
IppStatus ippsDivC_32fc_I(Ipp32fc
val
, Ipp32fc*
pSrcDst
, int
len
);
IppStatus ippsDivC_64fc_I(Ipp64fc
val
, Ipp64fc*
pSrcDst
, int
len
);
Case 4. In-place operations on integer data with scaling.
IppStatus ippsDivC_8u_ISfs(Ipp8u
val
, Ipp8u*
pSrcDst
, int
len
, int
scaleFactor
);
IppStatus ippsDivC_16u_ISfs(Ipp16u
val
, Ipp16u*
pSrcDst
, int
len
, int
scaleFactor
);
IppStatus ippsDivC_16s_ISfs(Ipp16s
val
, Ipp16s*
pSrcDst
, int
len
, int
scaleFactor
);
IppStatus ippsDivC_64s_ISfs(Ipp64s
val
, Ipp64s*
pSrcDst
, Ipp32u
len
, int
scaleFactor
);
IppStatus ippsDivC_16sc_ISfs(Ipp16sc
val
, Ipp16sc*
pSrcDst
, int
len
, int
scaleFactor
);
Include Files
ipps.h
Domain Dependencies
Headers:
ippcore.h
,
ippvm.h
Libraries:
ippcore.lib
,
ippvm.lib
Parameters
- val
- Scalar value used as a divisor.
- pSrc
- Pointer to the source vector.
- pDst
- Pointer to the destination vector.
- pSrcDst
- Pointer to the source and destination vector for in-place operation.
- len
- Number of elements in the vector
- scaleFactor
- Scale factor, refer to Integer Scaling.
Description
This function divides each element of the vector
pSrc
by a value val
and stores the result in pDst
.The in-place flavors of
ippsDivC
divide each element of the vector pSrcDst
by a value val
and store the result in pSrcDst
. Functions with
Sfs
suffixes perform scaling of the result value in accordance with the scaleFactor
value. If the output value exceeds the data range, the result becomes saturated.Return Values
- ippStsNoErr
- Indicates no error.
- ippStsNullPtrErr
- Indicates an error when thepSrc,pDst, orpSrcDstpointer isNULL.
- ippStsSizeErr
- Indicates an error whenlenis less than or equal to 0.
- ippStsDivByZeroErr
- Indicates an error whenvalis equal to 0.