Intel® Integrated Performance Primitives (Intel® IPP) Developer Guide and Reference

ID 790148
Date 3/22/2024
Public
Document Table of Contents

ConjPack

Converts the data in Pack format to complex data format.

Syntax

IppStatus ippsConjPack_32fc(const Ipp32f* pSrc, Ipp32fc* pDst, int lenDst);

IppStatus ippsConjPack_64fc(const Ipp64f* pSrc, Ipp64fc* pDst, int lenDst);

IppStatus ippsConjPack_32fc_I(Ipp32fc* pSrcDst, int lenDst);

IppStatus ippsConjPack_64fc_I(Ipp64fc* pSrcDst, int lenDst);

Include Files

ipps.h

Domain Dependencies

Headers: ippcore.h, ippvm.h

Libraries: ippcore.lib, ippvm.lib

Parameters

pSrc

Pointer to the source vector.

pDst

Pointer to the destination vector.

pSrcDst

Pointer to the source and destination vector (for the in-place operation).

lenDst

Number of elements in the vector.

Description

This function converts the data in Pack format in the vector pSrc to complex data format and stores the results in pDst.

The in-place function ippsConjPack converts the data in Pack format in the vector pSrcDst to complex data format and stores the results in pSrcDst.

The table below shows the examples of unpack from the Pack format. The Data column contains the real input data to be converted by the forward FFT transform to the packed data. The packed real data is in the Packed column. The output result is the complex data vector in the Extended column. The number of vector elements is in the Length column.

Examples of Unpack from the Pack Format
Data Packed Extended Length
FFT([1]) 1 {1, 0} 1
FFT([1 2]) 3, -1 {3, 0}, {-1, 0} 2
FFT([1 2 3]) 6, -1.5, 0.86 {6, 0}, {-1.5, 0.86}, {-1.5, -0.86} 3
FFT([1 2 3 9]) 15, -2, 7, -7 {15, 0}, {-2, 7}, {-7, 0}, {-2, -7} 4

Return Values

ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when the pSrcDst, pDst, or pSrc pointer is NULL.

ippStsSizeErr

Indicates an error when lenDst is less than or equal to 0.

Example

/*******************************************************************************
* Copyright 2015 Intel Corporation.
*
*
* This software and the related documents are Intel copyrighted materials, and your use of them is governed by
* the express license under which they were provided to you ('License'). Unless the License provides otherwise,
* you may not use, modify, copy, publish, distribute, disclose or transmit this software or the related
* documents without Intel's prior written permission.
* This software and the related documents are provided as is, with no express or implied warranties, other than
* those that are expressly stated in the License.
*******************************************************************************/

#include <stdio.h>
#include "ipp.h"

/* Next two defines are created to simplify code reading and understanding */
#define EXIT_MAIN exitLine:                                  /* Label for Exit */
#define check_sts(st) if((st) != ippStsNoErr) goto exitLine; /* Go to Exit if Intel(R) Integrated Performance Primitives (Intel(R) IPP) function returned status different from ippStsNoErr */

int main(void)
{
    IppStatus           status;
    Ipp32f x[8] = {1,2,3,5,6,7,8,9};
    Ipp32fc zero={0,0}, y[6] = {0};
    int i = 0;
    check_sts( status = ippsSet_32fc( zero, y, 6 ) )
    check_sts( status = ippsConjPack_32fc( x, y, 6 ) )
    for (i = 0; i < 6; i++)
    {
        printf("{%.3f %.3f} ",y[i].re,y[i].im);
    }
    printf("\n");
    check_sts( status = ippsSet_32fc( zero, y, 6 ) )
    check_sts( status = ippsConjPack_32fc( x, y, 5 ) )
    for (i = 0; i < 5; i++)
    {
        printf("{%.3f %.3f} ",y[i].re,y[i].im);
    }
    printf("\n");

EXIT_MAIN
    printf("Exit status %d (%s)\n", (int)status, ippGetStatusString(status));
    return (int)status;
}