Developer Reference

  • 2020
  • 10/21/2020
  • Public Content
Contents

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.

Product and Performance Information

1

Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804