Visible to Intel only — GUID: GUID-F3B297AF-1DDE-4401-ACA3-DFC8274401FA
Visible to Intel only — GUID: GUID-F3B297AF-1DDE-4401-ACA3-DFC8274401FA
FindNearestOne
Finds an element of the table which is closest to the specified value.
Syntax
IppStatus ippsFindNearestOne_16u(Ipp16u inpVal, Ipp16u* pOutVal, int* pOutIndex, const Ipp16u *pTable, int tblLen);
Include Files
ipps.h
Domain Dependencies
Headers: ippcore.h, ippvm.h
Libraries: ippcore.lib, ippvm.lib
Parameters
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. |
Description
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]|).
Return Values
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. |