intel® integrated performance primitives 7.0 windows...title ipp7.0 win usage guide author xlsoft...
TRANSCRIPT
Intel® Integrated Performance Primitives 7.0
Windows
2012 2 2
Copyright © 1998-2012 XLsoft Corporation. All Rights Reserved. 2
IPP
IPP
IPP SSE AVX
IPP
IPP
OpenMP
OpenMP
IPP IPP
Copyright © 1998-2012 XLsoft Corporation. All Rights Reserved. 3
DLL
ippAC ippac.h ippac[_*].lib ippac[**]-x.x.dll ipps audio coding
ippCC ippcc.h ippcc[_*].lib ippcc[**]-x.x.dll ippi color conversion
ippCH ippch.h ippch[_*].lib ippch[**]-x.x.dll ipps string operations
ippCP ippcp.h ippcp[_*].lib ippcp[**]-x.x.dll ipps cryptography
ippCV ippcv.h ippcv[_*].lib ippcv[**]-x.x.dll ippi computer vision
ippDC ippdc.h ippdc[_*].lib ippdc[**]-x.x.dll ipps data compression
* l t ** s8 x.x 7.0
• IPP
• DLL
• IPP Prefix
• IPP IPP
IPP [ (R) IPP ]-[ ]
IPP
Copyright © 1998-2012 XLsoft Corporation. All Rights Reserved. 4
ipp<data-domain><name>[_<datatype>][_<descriptor>]();
IPP [ (R) IPP ]-[ ]
ippiCopy_8u_C1MR
( )
1D 2D 3Ds,g,I,m,r
ipps, ippi, ippm, ippr
Add, FFTFwd, LuDecomp
8u, 32f, 64f
ISfs, C1R, P
※ (ippcore.h) ippGetStatusString
Copyright © 1998-2012 XLsoft Corporation. All Rights Reserved. 5
IPP
IPPROOT
IPP IA32 DLL
IPP ※
IPP Intel64 DLL
Copyright © 1998-2012 XLsoft Corporation. All Rights Reserved. 6
IPP
IPP
IPP
IPP
IPP
DLL
Copyright © 1998-2012 XLsoft Corporation. All Rights Reserved. 7
DLL IPP
DLL
DLL
DLL
DLL
LIB
Copyright © 1998-2012 XLsoft Corporation. All Rights Reserved. 8
DLL
DLL
( “ _l ” )
( “ _t ” )
Copyright © 1998-2012 XLsoft Corporation. All Rights Reserved. 9
IPP
IA-32 Architecture
px IA-32 ippig9-7.0.dll
ippip8-7.0.dll
ipp_p8.h
ipp_s8.h
p8_ippiCopy_16s_C1C3R
s8_ippiXorC_8u_C4IR
v8 SSSE3
p8 SSE4.1
g9 AVX
s8 ATOM
Intel 64 Architecture
mx Intel64 ippse9-7.0.dll
ippsm7-7.0.dll
ipp_n8.h
ipp_y8.h
m7_ippiWTFwd_32f_C1R
n8_ippsIIRSetTaps_32fc
u8 SSSE3
y8 SSE4.1
e9 AVX
n8 ATOM
Copyright © 1998-2012 XLsoft Corporation. All Rights Reserved. 10
¥Composer XE 2011 SP1¥bin¥ipsxe-comp-vars.bat intel64 vs2010
¥Inspector XE 2011¥ inspxe-vars.bat
¥VTune Amplifier XE 2011¥ amplxe-vars.bat
¥compilervars.bat intel64 vs2010
¥tbb¥bin¥tbbvars.bat intel64 vs2010 ¥mkl¥bin¥mklvars.bat intel64 vs2010
¥ipp¥bin¥ippvars.bat intel64 vs2010 IPPROOT=¥Composer XE 2011 SP1¥ipp PATH=¥Composer XE 2011 SP1¥redist¥intel64¥ipp
¥Composer XE 2011 SP1¥redist¥intel64¥compiler LIB= ¥Intel¥Composer XE 2011 SP1¥ipp¥lib¥intel64
¥Intel¥Composer XE 2011 SP1¥compiler¥lib¥intel64 INCLUDE= ¥Intel¥Composer XE 2011 SP1¥ipp¥include
¥compilervars_arch.bat intel64 vs2010
Windows [ ] ®
® 64 Visual Studio 2010
Copyright © 1998-2012 XLsoft Corporation. All Rights Reserved. 11
IPP DLL
Copyright © 1998-2012 XLsoft Corporation. All Rights Reserved. 12
DLL
( )
( )
DLL
CPU CPU CPU CPU
DLL
IPP DLL
IPP
IPP
Copyright © 1998-2012 XLsoft Corporation. All Rights Reserved. 13
“ipp.h”
ipp.h IPP
IPP
IPP
ippsCopy_8u ipps.lib
” /D_IPP_PARALLEL_DYNAMIC”
DLL
Visual C++(cl) Intel Compiler(icl)
> cl ipp-test.cpp ipps.lib ippcore.lib ←
> cl ipp-test.cpp /D_IPP_PARALLEL_DYNAMIC ← Define
Intel Compiler(icl)
> icl ipp-test.cpp /Qipp /MD ← Intel Compiler /Qipp
Copyright © 1998-2012 XLsoft Corporation. All Rights Reserved. 14
“ipp.h” ipp.h IPP
ippStaticInit ippInitCpu IPP
IPP
ippsCopy_8u ipps_l.lib ipps_t.lib
※ IPP [ ® IPP ]-[
® IPP ]-[]-[ ]
”/D_IPP_PARALLEL_STATIC” “/D_IPP_SEQUENTIAL_STATIC”
Visual C++(cl) Intel Compiler(icl)
> cl ipp-test.cpp ipps_l.lib ippcore_l.lib ← > cl ipp-test.cpp ipps_t.lib ippcore_t.lib libiomp5mt.lib ← > cl ipp-test.cpp /D_IPP_SEQUENTIAL_STATIC ← > cl ipp-test.cpp /D_IPP_PARALLEL_STATIC ←
Intel Compiler(icl)
> icl ipp-test.cpp /Qipp /Qopenmp /Qopenmp-link:static /MT ← > icl ipp-test.cpp /Qipp libiomp5mt.lib /MT ←
※ OpenMP libiomp5mt.lib libiomp5md.lib
Copyright © 1998-2012 XLsoft Corporation. All Rights Reserved. 15
¥ipp¥tools¥ia32( intel64)¥staticlib
※ IPP “ipp.h”
ipp.h IPP IPP
IPP
ippsCopy_8u ipps_l.lib ipps_t.lib
”/D_IPP_PARALLEL_STATIC” “/D_IPP_SEQUENTIAL_STATIC”
Visual C++(cl) Intel Compiler(icl)
> cl ipp-test.cpp ipps_l.lib ippcore_l.lib ← > cl ipp-test.cpp ipps_t.lib ippcore_t.lib libiomp5mt.lib ← > cl ipp-test.cpp /D_IPP_SEQUENTIAL_STATIC ← > cl ipp-test.cpp /D_IPP_PARALLEL_STATIC ←
Intel Compiler(icl)
> icl ipp-test.cpp /Qipp /Qopenmp /Qopenmp-link:static /MT ← > icl ipp-test.cpp /Qipp libiomp5mt.lib /MT ←
※ OpenMP libiomp5mt.lib libiomp5md.lib
DLL
Copyright © 1998-2012 XLsoft Corporation. All Rights Reserved. 16
( ) src¥export.def
IPP
Makefile Libs= IPP
Libs=ippi$(LIB_SFX).lib ipps$(LIB_SFX).lib ippcore$(LIB_SFX).lib Composer XE
> build_intel64.bat customdll Bin DLL Lib
( )
IPP Main Samples
http://www.intel.com/software/products/ipp/samples.htm
¥ipp-samples¥advanced-usage¥linkage¥customdll
Visual Studio
Copyright © 1998-2012 XLsoft Corporation. All Rights Reserved. 17
VS2010
VS2005 / VS2008
Visual Studio
Copyright © 1998-2012 XLsoft Corporation. All Rights Reserved. 18
IPP "C:¥Program Files (x86)¥Intel¥Composer XE 2011 SP1¥ipp¥include“
_IPP_PARALLEL_DYNAMIC
” ” ” DLL”
⇒ IPP _IPP_PARALLEL_STATIC
” ”
⇒ IPP _IPP_SEQUENTIAL_STATIC
” ”
⇒ IPP
IPP “C:¥Program Files (x86)¥Intel¥Composer XE 2011 SP1¥lib¥ia32"
Visual Studio IPP
※ IPP IPP #pragma comment
IPP ( )
IPP
Copyright © 1998-2012 XLsoft Corporation. All Rights Reserved. 19
“ipp.h”
#if !defined( _IPP_NO_DEFAULT_LIB )
#if defined( _IPP_PARALLEL_DYNAMIC )
#elif defined( _IPP_PARALLEL_STATIC )
#pragma comment( lib, "libircmt" )
#pragma comment( lib, "libmmt" )
#pragma comment( lib, "svml_dispmt" )
#pragma comment( lib, "libiomp5mt" )
#elif defined( _IPP_SEQUENTIAL_STATIC )
#endif
#endif
#if !defined( _IPP_NO_DEFAULT_LIB )
#if defined( _IPP_PARALLEL_DYNAMIC )
#pragma comment( lib, "ippcore" )
#elif defined( _IPP_PARALLEL_STATIC )
#pragma comment( lib, "ippcore_t" )
#elif defined( _IPP_SEQUENTIAL_STATIC )
#pragma comment( lib, "ippcore_l" )
#endif
#endif
#if !defined( _IPP_NO_DEFAULT_LIB )
#if defined( _IPP_PARALLEL_DYNAMIC )
#pragma comment( lib, "ippac" )
#pragma comment( lib, "ippcore" )
#elif defined( _IPP_PARALLEL_STATIC )
#pragma comment( lib, "ippac_t" )
#pragma comment( lib, "ippdc_t" )
#pragma comment( lib, "ipps_t" )
#pragma comment( lib, "ippcore_t" )
#elif defined( _IPP_SEQUENTIAL_STATIC )
#pragma comment( lib, "ippac_l" )
#pragma comment( lib, "ippdc_l" )
#pragma comment( lib, "ipps_l" )
#pragma comment( lib, "ippcore_l" )
#endif
#endif
"ippversion.h"
"ippdefs.h“
"ippcore.h"
"ippac.h"
"ippcc.h"
"ippdc.h"
"ippch.h"
"ippcv.h"
"ippi.h"
"ippj.h"
"ippm.h"
"ipps.h"
"ippsc.h"
"ippvc.h"
"ippvm.h"
"ippr.h"
"ippdi.h“
( ippdefs.h )
( ippcore.h )
( ippac.h )
#pragma comment
Tips IPP
Copyright © 1998-2012 XLsoft Corporation. All Rights Reserved. 20
IPP OpenMP OMP_NUM_THREADS ippSetNumThreads(n) (n )
IPP
ippGetNumThreads()
CPU
KMP_AFFINITY=compact
IPP OpenMP OpenMP
IPP
IPP
ippSetNumThreads(1) IPP
IPP
Copyright © 1998-2012 XLsoft Corporation. All Rights Reserved. 21
IPP ¥ipp¥tools¥ia32¥perfsys¥ps_*.exe ¥ipp¥tools¥intel64¥perfsys¥ps_*.exe
IPP
ps_*.exe >ps_ippac.exe
>ps_ippac.exe –h ( )
IPP
Copyright © 1998-2012 XLsoft Corporation. All Rights Reserved. 22
• IPP
http://www.intel.com/software/products/ipp/samples.htm
•
ippGetLibVersion() ¥include¥ippversion.h
• IPP
¥Composer XE 2011 SP1¥Documentation¥en_US¥ipp¥ThreadedFunctionsList.txt
• IPP
IPP [ ® IPP ]-[® IPP ]-[ ]-[
]
• OpenCV IPP
OpenCV 2.3 IPP 7.0 US
• DependencyWalker Dumpbin
DLL