Developer Reference for Intel® Integrated Performance Primitives
Finds an element of the table which is closest to the specified value.
IppStatus ippsFindNearestOne_16u(Ipp16u inpVal, Ipp16u* pOutVal, int* pOutIndex, const Ipp16u *pTable, int tblLen);
ipps.h
Headers: ippcore.h, ippvm.h
Libraries: ippcore.lib, ippvm.lib
inpVal |
Reference value. |
pOutVal |
Pointer to the output value. |
pOutIndex |
Pointer to the output index. |
pTable |
Pointer to the table for searching. |
tblLen |
Number of elements in the table. |
This function searches through the table pTable for an element which is closest to the specified reference value inpVal. The resulting element and its index are stored in pOutVal and pOutIndex, respectively. The table elements must satisfy the condition pTable[n] ≤pTable[n+1]. The function uses the following distance criterion for determining the table closest element closest: min(|inpVal -pTable[n]|).
ippStsNoErr |
Indicates no error. |
ippStsNullPtrErr |
Indicates an error when at least one of the specified pointers is NULL. |
ippStsSizeErr |
Indicates an error when tblLen is less than or equal to 0. |