MinIndx

Returns the minimum value of a vector and the index of the minimum element.

Syntax

Intel IPP style:

IppStatus ippsqMinIndx_32f(const Ipp32f* pSrc, Ipp32u len, Ipp32f* pMin , Ipp32u* pIndx);

IppStatus ippsqMinIndxQ15_16s(const Ipp16s* pSrc, Ipp32u len, Ipp16s* pMin , Ipp32u* pIndx);

IppStatus ippsqMinIndxQ31_32s(const Ipp32s* pSrc, Ipp32u len, Ipp32s* pMin , Ipp32u* pIndx);

DSP style:

void ippsq_min_f32(const float32_t* pSrc, uint32_t len, float32_t* pMin , uint32_t* pIndx);

void ippsq_min_q15(const q15_t* pSrc, uint32_t len, q15_t* pMin , uint32_t* pIndx);

void ippsq_min_q31(const q31_t* pSrc, uint32_t len, q31_t* pMin , uint32_t* pIndx);

Include Files

ippsq.h

dsp.h

Parameters

pSrc

Pointer to the source vector.

len

Number of elements in the vector.

pMin

Pointer to the minimum value.

pIndx

Pointer to the index value of the minimum element.

Description

This function does the following:

  • If pMin is not NULL, returns the minimum value of the source vector pSrc and stores the result in pMin.

  • If pIndx is not NULL, returns the index value of the minimum element and stores it in pIndx.

If there are several equal minimum elements, the first index from the beginning is returned. If len is equal to zero, pMin and pIndx values do not change.

Return Values

ippStsNoErr

Indicates no error.

ippStsSizeErr

Indicates an error when len is equal to zero.

ippStsNullPtrErr

Indicates an error when pSrc is NULL, or both pMin and pIndx are NULL.
For more complete information about compiler optimizations, see our Optimization Notice.