Developer Reference

  • 2021
  • 01/15/2021
  • Public Content
Contents

MaxAbs

Returns the maximum absolute value of a vector.

Syntax

IppStatus ippsMaxAbs_16s(const Ipp16s*
pSrc
, int
len
, Ipp16s*
pMaxAbs
);
IppStatus ippsMaxAbs_32s(const Ipp32s*
pSrc
, int
len
, Ipp32s*
pMaxAbs
);
IppStatus ippsMaxAbs_32f(const Ipp32f*
pSrc
, int
len
, Ipp32f*
pMaxAbs
);
IppStatus ippsMaxAbs_64f(const Ipp64f*
pSrc
, int
len
, Ipp64f*
pMaxAbs
);
Include Files
ipps.h
Domain Dependencies
Headers:
ippcore.h
,
ippvm.h
Libraries:
ippcore.lib
,
ippvm.lib
Parameters
pSrc
Pointer to the source vector.
pMaxAbs
Pointer to the output result.
len
Number of elements in the vector.
Description
This function returns the maximum absolute value of the input vector
pSrc
, and stores the result in
pMaxAbs
.
Return Values
ippStsNoErr
Indicates no error.
ippStsNullPtrErr
Indicates an error when the
pMaxAbs
or
pSrc
pointer is
NULL
.
ippStsSizeErr
Indicates an error when
len
is less than or equal to 0.

Example

The example below shows how to use the function
ippsMaxAbs_16s
.
Ipp16s src[5] = { 2, -8, -3, -1, 7 }; Ipp16s maxAbs; ippsMaxAbs_16s ( src, 5, &maxAbs );
Result:
maxAbs = 8

Product and Performance Information

1

Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex.