Click here to Skip to main content
13,792,859 members
Click here to Skip to main content
Add your own
alternative version

Stats

1.2K views
1 bookmarked
Posted 7 Dec 2018
Licenced CPOL

Get Started with Intel® Integrated Performance Primitives 2019 for Windows OS

, 7 Dec 2018
Intel® Integrated Performance Primitives (Intel® IPP) is a software library that provides a broad range of functionality, including general signal and image processing, computer vision, data compression, and string manipulation.

Editorial Note

This article is in the Product Showcase section for our sponsors at CodeProject. These articles are intended to provide you with information on products and services that we consider useful and of value to developers.

Intel® Integrated Performance Primitives (Intel® IPP) is a software library that provides a broad range of functionality, including general signal and image processing, computer vision, data compression, and string manipulation.

Intel IPP is installed as part of the following suites:

The library is also provided as a standalone package under the Community Licensing program.

The majority of Intel IPP functions offered in different product suites are the same. But there are several Intel IPP libraries or domains that are only included in some product packages. The following table provides a summary of Intel IPP functionality for different product suites:

Intel IPP Functionality Intel® Parallel Studio XE Intel® System Studio Intel® IPP Standalone
Common function domains (string operations, cryptography, computer vision, data compression, image processing, signal processing, etc.) Yes Yes Yes
Long Term Evolution functions for the embedded domain No Yes No
Intel® IPP libraries for Android* and Intel® Quark™ platforms No Yes No
Intel® IPP libraries for Intel® Xeon Phi™ Coprocessor Yes No Yes

Prerequisites

<!-- -->Set Environment Variables

After installing Intel IPP, set the PATH, LIB, and INCLUDE environment variables by running the script appropriate to your target platform architecture. The scripts are available in <install dir>\Ipp\bin.

By default, the <install dir> is C:\Program files (x86)\IntelSWTools\compilers_and_libraries_2019.x.xxx\<target_os>

<!-- -->Configure Your IDE Environment to Link with Intel IPP

To configure your Microsoft* Visual Studio* development system for linking with the Intel IPP library, follow the steps below. Though some versions of the Visual Studio* IDE may vary slightly in the menu items mentioned below, the fundamental configuring steps are applicable to all these versions.

  1. In Solution Explorer, right-click your project and click Properties.
  2. Select Configuration Properties > VC++ Directories and set the following from the Select directories for drop down menu:
    • Include Files menu item, and then type in the directory for the Intel IPP include files (default is <install_dir>\ipp\include)
    • Library Files menu item, and then type in the directory for the Intel IPP library files (default is <install_dir>\ipp\lib\<arch>)
    • Executable Files menu item, and then type in the directory for the Intel IPP executable files (default is <install_dir>\redist\<arch>\ipp)

System Requirements

Build and Run Your First Intel® IPP Application

The code example below represents a short application to help you get started with Intel IPP:

#include "ipp.h"
#include <stdio.h>
int main(int argc, char* argv[])
{
   const IppLibraryVersion *lib;
   IppStatus status;
   Ipp64u mask, emask;

   /* Initialize Intel IPP library */
   ippInit();
   /* Get Intel IPP library version info */
   lib = ippGetLibVersion();
   printf("%s %s\n", lib->Name, lib->Version);

   /* Get CPU features and features enabled with selected library level */
   status = ippGetCpuFeatures( &mask, 0 );
   if( ippStsNoErr == status ) {
      emask = ippGetEnabledCpuFeatures();
      printf("Features supported by CPU\tby Intel IPP\n");
      printf("-----------------------------------------\n");
      printf("  ippCPUID_MMX        = ");
      printf("%c\t%c\t",( mask & ippCPUID_MMX ) ? 'Y':'N',( emask & ippCPUID_MMX ) ? 'Y':'N');
      printf("Intel(R) architecture MMX(TM) technology supported\n");
      printf("  ippCPUID_SSE        = ");
      printf("%c\t%c\t",( mask & ippCPUID_SSE ) ? 'Y':'N',( emask & ippCPUID_SSE ) ? 'Y':'N');
      printf("Intel(R) Streaming SIMD Extensions\n");
      printf("  ippCPUID_SSE2       = ");
      printf("%c\t%c\t",( mask & ippCPUID_SSE2 ) ? 'Y':'N',( emask & ippCPUID_SSE2 ) ? 'Y':'N');
      printf("Intel(R) Streaming SIMD Extensions 2\n");
      printf("  ippCPUID_SSE3       = ");
      printf("%c\t%c\t",( mask & ippCPUID_SSE3 ) ? 'Y':'N',( emask & ippCPUID_SSE3 ) ? 'Y':'N');
      printf("Intel(R) Streaming SIMD Extensions 3\n");
      printf("  ippCPUID_SSSE3      = ");
      printf("%c\t%c\t",( mask & ippCPUID_SSSE3 ) ? 'Y':'N',( emask & ippCPUID_SSSE3 ) ? 'Y':'N');
      printf("Supplemental Streaming SIMD Extensions 3\n");
      printf("  ippCPUID_MOVBE      = ");
      printf("%c\t%c\t",( mask & ippCPUID_MOVBE ) ? 'Y':'N',( emask & ippCPUID_MOVBE ) ? 'Y':'N');
      printf("The processor supports MOVBE instruction\n");
      printf("  ippCPUID_SSE41      = ");
      printf("%c\t%c\t",( mask & ippCPUID_SSE41 ) ? 'Y':'N',( emask & ippCPUID_SSE41 ) ? 'Y':'N');
      printf("Intel(R) Streaming SIMD Extensions 4.1\n");
      printf("  ippCPUID_SSE42      = ");
      printf("%c\t%c\t",( mask & ippCPUID_SSE42 ) ? 'Y':'N',( emask & ippCPUID_SSE42 ) ? 'Y':'N');
      printf("Intel(R) Streaming SIMD Extensions 4.2\n");
      printf("  ippCPUID_AVX        = ");
      printf("%c\t%c\t",( mask & ippCPUID_AVX ) ? 'Y':'N',( emask & ippCPUID_AVX ) ? 'Y':'N');
      printf("Intel(R) Advanced Vector Extensions instruction set\n");
      printf("  ippAVX_ENABLEDBYOS  = ");
      printf("%c\t%c\t",( mask & ippAVX_ENABLEDBYOS ) ? 'Y':'N',( emask & ippAVX_ENABLEDBYOS ) ? 'Y':'N');
      printf("The operating system supports Intel(R) AVX\n");
      printf("  ippCPUID_AES        = ");
      printf("%c\t%c\t",( mask & ippCPUID_AES ) ? 'Y':'N',( emask & ippCPUID_AES ) ? 'Y':'N');
      printf("AES instruction\n");
      printf("  ippCPUID_SHA        = ");
      printf("%c\t%c\t",( mask & ippCPUID_SHA ) ? 'Y':'N',( emask & ippCPUID_SHA ) ? 'Y':'N');
      printf("Intel(R) SHA new instructions\n");
      printf("  ippCPUID_CLMUL      = ");
      printf("%c\t%c\t",( mask & ippCPUID_CLMUL ) ? 'Y':'N',( emask & ippCPUID_CLMUL ) ? 'Y':'N');
      printf("PCLMULQDQ instruction\n");
      printf("  ippCPUID_RDRAND     = ");
      printf("%c\t%c\t",( mask & ippCPUID_RDRAND ) ? 'Y':'N',( emask & ippCPUID_RDRAND ) ? 'Y':'N');
      printf("Read Random Number instructions\n");
      printf("  ippCPUID_F16C       = ");
      printf("%c\t%c\t",( mask & ippCPUID_F16C ) ? 'Y':'N',( emask & ippCPUID_F16C ) ? 'Y':'N');
      printf("Float16 instructions\n");
      printf("  ippCPUID_AVX2       = ");
      printf("%c\t%c\t",( mask & ippCPUID_AVX2 ) ? 'Y':'N',( emask & ippCPUID_AVX2 ) ? 'Y':'N');
      printf("Intel(R) Advanced Vector Extensions 2 instruction set\n");
      printf("  ippCPUID_AVX512F    = ");
      printf("%c\t%c\t",( mask & ippCPUID_AVX512F ) ? 'Y':'N',( emask & ippCPUID_AVX512F ) ? 'Y':'N');
      printf("Intel(R) Advanced Vector Extensions 3.1 instruction set\n");
      printf("  ippCPUID_AVX512CD   = ");
      printf("%c\t%c\t",( mask & ippCPUID_AVX512CD ) ? 'Y':'N',( emask & ippCPUID_AVX512CD ) ? 'Y':'N');
      printf("Intel(R) Advanced Vector Extensions CD (Conflict Detection) instruction set\n");
      printf("  ippCPUID_AVX512ER   = ");
      printf("%c\t%c\t",( mask & ippCPUID_AVX512ER ) ? 'Y':'N',( emask & ippCPUID_AVX512ER ) ? 'Y':'N');
      printf("Intel(R) Advanced Vector Extensions ER instruction set\n");
      printf("  ippCPUID_ADCOX      = ");
      printf("%c\t%c\t",( mask & ippCPUID_ADCOX ) ? 'Y':'N',( emask & ippCPUID_ADCOX ) ? 'Y':'N');
      printf("ADCX and ADOX instructions\n");
      printf("  ippCPUID_RDSEED     = ");
      printf("%c\t%c\t",( mask & ippCPUID_RDSEED ) ? 'Y':'N',( emask & ippCPUID_RDSEED ) ? 'Y':'N');
      printf("The RDSEED instruction\n");
      printf("  ippCPUID_PREFETCHW  = ");
      printf("%c\t%c\t",( mask & ippCPUID_PREFETCHW ) ? 'Y':'N',( emask & ippCPUID_PREFETCHW ) ? 'Y':'N');
      printf("The PREFETCHW instruction\n");
      printf("  ippCPUID_KNC        = ");
      printf("%c\t%c\t",( mask & ippCPUID_KNC ) ? 'Y':'N',( emask & ippCPUID_KNC ) ? 'Y':'N');
      printf("Intel(R) Xeon Phi(TM) Coprocessor instruction set\n");
   }
   return 0;
}

This application consists of three sections:

  1. Initialize the Intel IPP library. This stage is required to take advantage of full Intel IPP optimization. With ippInit(), the best implementation layer is dispatched at runtime; otherwise, the least optimized implementation is chosen. If the Intel IPP application runs without ippInit(), the Intel IPP library is auto-initialized with the first call of the Intel IPP function from any domain that is different from ippCore. In certain debugging scenarios, it is helpful to force a specific implementation layer using ippSetCpuFeatures(), instead of the best as chosen by the dispatcher.
  2. Get the library layer name and version. You can also get the version information using the ippversion.h file located in the <install_dir>\ipp\include directory.
  3. Show the hardware optimizations used by the selected library layer and supported by CPU.

On Windows* OS, Intel IPP applications are significantly easier to build with Microsoft* Visual Studio*. To build the code example above, follow the steps:

  1. Start Microsoft* Visual Studio* and create an empty C++ project.
  2. Add a new c file and paste the code into it.
  3. Set the include directories and the linking model as described in Configure Your IDE Environment to Link with Intel IPP.
  4. Compile and run the application.

To build the code example above, follow the steps:

Training and Documentation

Document

Description

Online Training

Intel® IPP training resources.

Intel® IPP Developer Reference

Contains detailed descriptions of the Intel IPP functions and interfaces for signal, image processing, and computer vision.

Intel® IPP Cryptography Developer Reference

Contains detailed descriptions of the Intel IPP Cryptography functions.

Intel® IPP Developer Guide

Provides detailed guidance on Intel IPP library configuration, development environment, and linkage modes.

Tutorial: Image Blurring and Rotation with Intel® IPP

Demonstrates how to implement box blurring of an image using Intel IPP image processing functions. The tutorial and sample bundle is available for download from Intel® Software Product Samples and Tutorials.

Integration Wrappers for Intel® IPP Developer Guide and Reference

Contains detailed descriptions of the Intel IPP Integration Wrappers C and C++ application programming interfaces and provides guidance on how to use them in your code.

Intel® IPP Examples

Include a collection of example programs that demonstrate the various features of the Intel IPP library. These programs are located in the components_and_examples_<target>.zip archive at the <install_dir>/ipp/components subdirectory. The archive also includes the ipp-examples.html documentation file at the documentation subdirectory.

Intel® Integrated Performance Primitives

Intel® IPP product page. See this page for support and online documentation.

Note

You can also download an offline version of the documentation from:

Legal Information

Intel, and the Intel logo are trademarks of Intel Corporation in the U.S. and/or other countries.

*Other names and brands may be claimed as the property of others.

Copyright 2002-2018 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.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Intel Corporation
United States United States
You may know us for our processors. But we do so much more. Intel invents at the boundaries of technology to make amazing experiences possible for business and society, and for every person on Earth.

Harnessing the capability of the cloud, the ubiquity of the Internet of Things, the latest advances in memory and programmable solutions, and the promise of always-on 5G connectivity, Intel is disrupting industries and solving global challenges. Leading on policy, diversity, inclusion, education and sustainability, we create value for our stockholders, customers and society.
Group type: Organisation

43 members


You may also be interested in...

Pro
Pro

Comments and Discussions

 
-- There are no messages in this forum --
Permalink | Advertise | Privacy | Cookies | Terms of Use | Mobile
Web05 | 2.8.181207.3 | Last Updated 7 Dec 2018
Article Copyright 2018 by Intel Corporation
Everything else Copyright © CodeProject, 1999-2018
Layout: fixed | fluid