Intel® Integrated Performance Primitives (Intel® IPP) Developer Guide and Reference

ID 790148
Date 6/24/2024
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

MinMaxIndx

Returns the maximum and minimum values of a vector and the indexes of the corresponding elements.

Syntax

IppStatus ippsMinMaxIndx_8u(const Ipp8u* pSrc, int len, Ipp8u* pMin, int* pMinIndx, Ipp8u* pMax, int* pMaxIndx);

IppStatus ippsMinMaxIndx_16u(const Ipp16u* pSrc, int len, Ipp16u* pMin, int* pMinIndx, Ipp16u* pMax, int* pMaxIndx);

IppStatus ippsMinMaxIndx_16s(const Ipp16s* pSrc, int len, Ipp16s* pMin, int* pMinIndx, Ipp16s* pMax, int* pMaxIndx);

IppStatus ippsMinMaxIndx_32u(const Ipp32u* pSrc, int len, Ipp32u* pMin, int* pMinIndx, Ipp32u* pMax, int* pMaxIndx);

IppStatus ippsMinMaxIndx_32s(const Ipp32s* pSrc, int len, Ipp32s* pMin, int* pMinIndx, Ipp32s* pMax, int* pMaxIndx);

IppStatus ippsMinMaxIndx_32f(const Ipp32f* pSrc, int len, Ipp32f* pMin, int* pMinIndx, Ipp32f* pMax, int* pMaxIndx);

IppStatus ippsMinMaxIndx_64f(const Ipp64f* pSrc, int len, Ipp64f* pMin, int* pMinIndx, Ipp64f* pMax, int* pMaxIndx);

Include Files

ipps.h

Domain Dependencies

Headers: ippcore.h, ippvm.h

Libraries: ippcore.lib, ippvm.lib

Parameters

pSrc

Pointer to the source vector.

pMin

Pointer to the minimum value.

pMax

Pointer to the maximum value.

len

Number of elements in the vector.

pMinIndx

Pointer to the index value of the minimum element.

pMaxIndx

Pointer to the index value of the maximum element.

Description

This function returns the minimum and maximum values of the input vector pSrc and stores the result in pMin and pMax, respectively. The function also returns the indexes of the minimum and maximum elements and stores them in pMinIndx and pMaxIndx, respectively. If there are several equal minimum or maximum elements, the first index from the beginning is returned.

Return Values

ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when any of the specified pointers is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.