UpdateLinear

Integrates an input vector with specified integration weight.

Syntax

IppStatus ippsUpdateLinear_16s32s_I(const Ipp16s* pSrc, int len, Ipp32s* pSrcDst, int srcShiftRight, Ipp16s alpha, IppHintAlgorithm hint);

Parameters

pSrc

Pointer to the source vector.

len

Number of elements of the vector.

pSrcDst

Pointer to the input value and output result.

srcShiftRight

Shift value; must be non-negative.

alpha

Integration weight.

hint

Suggests using specific code. The possible values for the hint argument are described in Hint Arguments.

Description

The function ippsUpdateLinear is declared in the ipps.h file. This function performs len iterations in which the sum

alpha * pSrcDst + (1 - alpha) * pSrc[i]shift is calculated and stored in pSrcDst. Here i is the number of previous iterations, pSrcDst is the result of previous iteration, and pSrc[i]shift is the element of the source vector right-shifted by the non-negative value srcShiftRight.

The example below shows how to use the function ippsUpdateLinear.

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 len is less than or equal to 0.

Using the Function ippsUpdateLinear

void func_updatelinear()
{
    Ipp16s pSrc[2] = {16, 32};
    Ipp32s pSrcDst =1;
    Ipp16s alpha = 2;
    int shift = 2;
    int srcLen = 2;
 		
    ippsUpdateLinear_16s32s_I(pSrc, 2, &pSrcDst, shift, alpha, ippAlgHintFast);
 		
}

		
Result: -12

Submit feedback on this help topic

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