Join

Converts the floating-point data of several vectors to integer data, and stores the results in a single vector.

Syntax

IppStatus ippsJoin_32f16s_D2L(const Ipp32f** pSrc, int nChannels, int chanLen, Ipp16s* pDst);

Parameters

pSrc

Pointer to an array of pointers to the source vectors.

pDst

Pointer to the destination vector.

nChannels

Number of source vectors.

chanLen

Number of elements in each sourcet vector.

Description

The function ippsJoin is declared in the ipps.h file. This function converts floating-point data of nChannels input vectors stored in the array pSrc to integer data type and writes the results to the destination vector pDst in the following order: first element of first vector, first element of second vector, ..., first element of the last vector in the array; second element of first vector, second element of second vector, and so on. The converted value is saturated if it exceeds the output data range.

The example below shows how to use the function ippsJoin.

Return Values

ippStsNoErr

Indicates no error.

ippStsNullPtrErr

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

ippStsSizeErr

Indicates an error condition if nChannels or chanLen is less than or equal to 0.

Using the Function ippsJoin

Ipp32f** pSrc;
Ipp16s pDst[8];
int nChannels = 2;
int chanLen = 4;
int bufSize;
float k = 1.0;

		
pSrc = (Ipp32f**) ippiMalloc_32f_C1 ( 2, 1, &bufSize );
for(int I = 0; I < 2; i++) {
    pSrc[i] = ( Ipp32f*) ippiMalloc_32f_C1 ( 4, 1, &bufSize );
    for(int j = 0; j < 4; j++)
        pSrc[i][j] = k++;
}

		
ippsJoin_32f16s_D2L ( (const Ipp32f**) pSrc, nChannels, chanLen, (Ipp16s*) pDst );

		
Result:

		
1.0 2.0 3.0 4.0
5.0 6.0 7.0 8.0         pSrc

		
1 5 2 6 3 7 4 8        pDst

Submit feedback on this help topic

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