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

Set

Initializes vector elements to a specified common value.

Syntax

IppStatus ippsSet_8u(Ipp8u val, Ipp8u* pDst, int len);

IppStatus ippsSet_16s(Ipp16s val, Ipp16s* pDst, int len);

IppStatus ippsSet_16sc(Ipp16sc val, Ipp16sc* pDst, int len);

IppStatus ippsSet_32s(Ipp32s val, Ipp32s* pDst, int len);

IppStatus ippsSet_32f(Ipp32f val, Ipp32f* pDst, int len);

IppStatus ippsSet_32sc(Ipp32sc val, Ipp32sc* pDst, int len);

IppStatus ippsSet_32fc(Ipp32fc val, Ipp32fc* pDst, int len);

IppStatus ippsSet_64s(Ipp64s val, Ipp64s* pDst, int len);

IppStatus ippsSet_64f(Ipp64f val, Ipp64f* pDst, int len);

IppStatus ippsSet_64sc(Ipp64sc val, Ipp64sc* pDst, int len);

IppStatus ippsSet_64fc(Ipp64fc val, Ipp64fc* pDst, int len);

Include Files

ipps.h

Domain Dependencies

Headers: ippcore.h, ippvm.h

Libraries: ippcore.lib, ippvm.lib

Parameters

pDst

Pointer to the vector to be initialized.

len

Number of elements to initialize.

val

Value used to initialize the vector pDst.

Description

This function initializes the first len elements of the real or complex vector pDst to contain the same value val.

Return Values

ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when the pDst pointer is NULL.

ippStsSizeErr

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

Example

The code example below shows how to use the function ippsSet.

IppStatus set(void) {
      char src[] = “set”;
      return ippsSet_8u(‘0', src, strlen(src)); 
}