AutoScale

Scales by the maximal elements.

Syntax

IppStatus ippsAutoScale_16s (const Ipp16s* pSrc, Ipp16s* pDst, int len, int* pScale);

IppStatus ippsAutoScale_16s_I(Ipp16s* pSrcDst, int len, int* pScale);

Parameters

pSrc

Pointer to the source vector.

pDst

Pointer to the destination vector.

pSrcDst

Pointer to the source and destination vector for the in-place operation.

len

Number of elements in each vector.

pScale

Pointer to the input/output scaling factor.

Description

The function ippsAutoScale is declared in the ippsc.h file. This function scales the input vector as follows:

pDst[i] = 2scaleFactor * pSrc[i], i = 0, 1, ..., len-1,

where scaleFactor = normMax - pScale[0], and normMax is calculated so that the maximal absolute value of the vector can be normalized. The value pScale[0] is the input scaling factor. This scaling factor is replaced by scaleFactor after processing.

Return Values

ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when the pSrc, pDst, pSrcDst, pScale pointer is NULL

ippStsSizeErr

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

ippStsScaleRangeErr

Indicates an error when the scale factor pointed by pScale is less than 0.

Submit feedback on this help topic

Copyright © 2000 - 2011, Intel Corporation. All rights reserved.