Developer Reference for Intel® Integrated Performance Primitives 2018

Threshold_LTInv

Computes the inverse of vector elements after limiting their magnitudes by the given lower bound.

Syntax

IppStatus ippsThreshold_LTInv_32f(const Ipp32f* pSrc, Ipp32f* pDst, int len, Ipp32f level);

IppStatus ippsThreshold_LTInv_64f(const Ipp64f* pSrc, Ipp64f* pDst, int len, Ipp64f level);

IppStatus ippsThreshold_LTInv_32fc(const Ipp32fc* pSrc, Ipp32fc* pDst, int len, Ipp32f level);

IppStatus ippsThreshold_LTInv_64fc(const Ipp64fc* pSrc, Ipp64fc* pDst, int len, Ipp64f level);

IppStatus ippsThreshold_LTInv_32f_I(Ipp32f* pSrcDst, int len, Ipp32f level);

IppStatus ippsThreshold_LTInv_64f_I(Ipp64f* pSrcDst, int len, Ipp64f level);

IppStatus ippsThreshold_LTInv_32fc_I(Ipp32fc* pSrcDst, int len, Ipp32f level);

IppStatus ippsThreshold_LTInv_64fc_I(Ipp64fc* pSrcDst, int len, Ipp64f level);

Include Files

ipps.h

Domain Dependencies

Headers: ippcore.h, ippvm.h

Libraries: ippcore.lib, ippvm.lib

Parameters

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.

level

Value used to limit each element of pSrc or pSrcDst.This argument must always be real and positive.

Description

This function computes the inverse of elements of the vector pSrc and stores the result in pDst. The computation occurs after first limiting the magnitude of each element by the threshold value level.

The in-place flavors of ippsThreshold_LTInv compute the inverse of elements of the vector pSrcDst and store the result in pSrcDst. The computation occurs after first limiting the magnitude of each element by the threshold value level.

The threshold operation is performed to avoid division by zero. Since level represents a magnitude, it is always real and must be positive. The formula for ippsThreshold_LTInv is the following:



If the function encounters zero-valued vector elements and level is also 0 (see appendix A "Handling of Special Cases"), the output value is set to Inf (infinity), but operation execution is not aborted:



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 zero.

ippStsThreshNegLevelErr

Indicates an error when level is negative.

ippStsInvZero

Indicates a warning when level and a vector element are equal to zero. Operation execution is not aborted. The value of the destination vector element is Inf.

Example

Threshold_LtInv.c

Threshold_LtInv_I.c