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

DotProd

Computes the dot product of pixel values of two source images.

Syntax

Case 1: Operation on one-channel integer data

IppStatus ippiDotProd_<mod>(const Ipp<srcDatatype>* pSrc1, int src1Step, const Ipp<srcDatatype>* pSrc2, int src2Step, IppiSize roiSize, Ipp64f* pDp);

Supported values for mod:

8u64f_C1R

 

16u64f_C1R

16s64f_C1R

32u64f_C1R

32s64f_C1R

Case 2: Operation on three-channel integer data

IppStatus ippiDotProd_<mod>(const Ipp<srcDatatype>* pSrc1, int src1Step, const Ipp<srcDatatype>* pSrc2, int src2Step, IppiSize roiSize, Ipp64f pDp[3]);

Supported values for mod:

8u64f_C3R

16u64f_C3R

16s64f_C3R

32u64f_C3R

32s64f_C3R

Case 3: Operation on four-channel integer data

IppStatus ippiDotProd_<mod>(const Ipp<srcDatatype>* pSrc1, int src1Step, const Ipp<srcDatatype>* pSrc2, int src2Step, IppiSize roiSize, Ipp64f pDp[4]);

Supported values for mod:

8u64f_C4R

16u64f_C4R

16s64f_C4R

32u64f_C4R

32s64f_C4R

IppStatus ippiDotProd_<mod>(const Ipp<srcDatatype>* pSrc1, int src1Step, const Ipp<srcDatatype>* pSrc2, int src2Step, IppiSize roiSize, Ipp64f pDp[3]);

Supported values for mod:

8u64f_AC4R

16u64f_AC4R

32u64f_AC4R

16s64f_AC4R

32s64f_AC4R

Case 4: Operation on floating-point data

IppStatus ippiDotProd_32f64f_C1R(const Ipp32f* pSrc1, int src1Step, const Ipp32f* pSrc2, int src2Step, IppiSize roiSize, Ipp64f* pDp, IppHintAlgorithm hint);

IppStatus ippiDotProd_32f64f_C3R(const Ipp32f* pSrc1, int src1Step, const Ipp32f* pSrc2, int src2Step, IppiSize roiSize, Ipp64f pDp[3], IppHintAlgorithm hint);

IppStatus ippiDotProd_32f64f_C4R(const Ipp32f* pSrc1, int src1Step, const Ipp32f* pSrc2, int src2Step, IppiSize roiSize, Ipp64f pDp[4], IppHintAlgorithm hint);

IppStatus ippiDotProd_32f64f_AC4R(const Ipp32f* pSrc1, int src1Step, const Ipp32f* pSrc2, int src2Step, IppiSize roiSize, Ipp64f pDp[3], IppHintAlgorithm hint);

Include Files

ippi.h

Domain Dependencies

Headers: ippcore.h, ippvm.h, ipps.h

Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters

pSrc1, pSrc2

Pointer to the ROI in the source images.

src1Step, src2Step

Distance, in bytes, between the starting points of consecutive lines in the source images.

roiSize

Size of the source image ROI.

pDp

Pointer to the dot product or to the array containing the computed dot products for multi-channel images.

hint

Option to select the algorithmic implementation of the function, see Table “Hint Arguments for Image Moment Functions”.

Description

This function operates with ROI (see Regions of Interest in Intel IPP).

This function computes the dot product of pixel values of two source images pSrc1 and pSrc2 using algorithm indicated by the hint argument (see Table “Hint Arguments for Image Moment Functions”) and stores the result in pDp. In case of multi-channel images, the dot product is computed for each channel separately and stored in the array pDp.

Return Values

ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error condition if one of the specified pointers is NULL.

ippStsSizeErr

Indicates an error condition if roiSize has a field with zero or negative value.

ippStsStepErr

Indicates an error condition if one of the step values has zero or negative value.