Developer Reference

  • 2020
  • 07/15/2020
  • Public Content
Contents

AddProduct

Adds product of two vectors to the accumulator vector.

Syntax

Case 1. Operations on floating point data.
IppStatus ippsAddProduct_32f(const Ipp32f*
pSrc1
, const Ipp32f*
pSrc2
, Ipp32f*
pSrcDst
, int
len
);
IppStatus ippsAddProduct_64f(const Ipp64f*
pSrc1
, const Ipp64f*
pSrc2
, Ipp64f*
pSrcDst
, int
len
);
IppStatus ippsAddProduct_32fc(const Ipp32fc*
pSrc1
, const Ipp32fc*
pSrc2
, Ipp32fc*
pSrcDst
, int
len
);
IppStatus ippsAddProduct_64fc(const Ipp64fc*
pSrc1
, const Ipp64fc*
pSrc2
, Ipp64fc*
pSrcDst
, int
len
);
Case 2. Operations on integer data with scaling.
IppStatus ippsAddProduct_16s_Sfs(const Ipp16s*
pSrc1
, const Ipp16s*
pSrc2
, Ipp16s*
pSrcDst
, int
len
, int
scaleFactor
);
IppStatus ippsAddProduct_32s_Sfs(const Ipp32s*
pSrc1
, const Ipp32s*
pSrc2
, Ipp32s*
pSrcDst
, int
len
, int
scaleFactor
);
IppStatus ippsAddProduct_16s32s_Sfs(const Ipp16s*
pSrc1
, const Ipp16s*
pSrc2
, Ipp32s*
pSrcDst
, int
len
, int
scaleFactor
);
Include Files
ipps.h
Domain Dependencies
Headers:
ippcore.h
,
ippvm.h
Libraries:
ippcore.lib
,
ippvm.lib
Parameters
pSrc1
,
pSrc2
Pointers to the source vectors.
pSrcDst
Pointer to the destination accumulator vector.
len
The number of elements in the vectors.
scaleFactor
Scale factor, refer to Integer Scaling.
Description
This function multiplies each element of the source vector
pSrc1
by the corresponding element of the vector
pSrc2
, and adds the result to the corresponding element of the accumulator vector
pSrcDst
as given by:
pSrcDst
[n ] =
pSrcDst
[n ] +
pSrc1
[n ] *
pSrc2
[n ]
,
0
n <
len
.
Functions with
Sfs
suffixes perform scaling of the result value in accordance with the
scaleFactor
value. If the output value exceeds the data range, the result becomes saturated.
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.

Product and Performance Information

1

Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804