Developer Reference for Intel® Integrated Performance Primitives 2019
Finds table elements that are closest to the elements of the specified vector.
IppStatus ippsFindNearest_16u(const Ipp16u* pVals, Ipp16u* pOutVals, int* pOutIndexes, int len, const Ipp16u *pTable, int tblLen);
ipps.h
Headers: ippcore.h, ippvm.h
Libraries: ippcore.lib, ippvm.lib
pVals |
Pointer to the vector containing reference values. |
pOutVals |
Pointer to the output vector. |
pOutIndexes |
Pointer to the array that stores output indexes. |
len |
Number of elements in the input vector. |
pTable |
Pointer to the table for searching. |
tblLen |
Number of elements in the table. |
This function searches through the table pTable for elements which are closest to the reference elements of the input vector pVals. The resulting elements and their indexes are stored in pOutVals and pOutIndexes, respectively. The table elements must satisfy the condition pTable[n] ≤pTable[n+1]. The function uses the following distance criterion for determining the table element closest to pVals[k] : min(|pVals[k] -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 or len is less than or equal to zero. |