Vous êtes sur la page 1sur 12

Intel® System Studio 2016 Beta for Windows* -

Microsoft* Visual Studio Configuration Guide


Agenda

Intel® Integrated Performance Primitives Configuration


Intel® IPP Example
Intel® C++ Compiler Configuration
Intel® Math Kernel Library Configuration
Intel® MKL Example
Intel® Threading Building Blocks Configuration
Intel® TBB Example
Intel® VTune™ Amplifier

Intel Confidential
2
Copyright © 2015, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others. Optimization Notice
Intel® Integrated Performance Primitives Configuration
1
 Set up environment variables
 Go to <Install folder>
/Intel_sw_development_tools\compilers_a
nd_libraries_<version>\windows\ipp\bin
and use script file (ippvars.bat) to set up. 2
 Link your application with Intel® IPP
 Right click your project in Solution
Explorer
 Properties > Configuration Properties >
Intel Performance Libraries >

 Now you can start to develop.

Intel Confidential
3
Copyright © 2015, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others. Optimization Notice
Intel® IPP Example
#include "stdafx.h"
#include "ipp.h"
 Start Microsoft Visual Studio* and Initial #include <iostream>
one empty c++ project using namespace std;

 Set up environment variables and link int _tmain(){


your project with Intel® IPP const IppLibraryVersion *lib;

 Include Intel® IPP header file by demand /* Init IPP library */


ippInit();
 Add a new c file and paste the code into
it /* Get IPP library version info */
lib = ippGetLibVersion();
 Compile and run the application printf("Hello IPP!\n");
printf("IPP version: %s %s\n", lib->Name, lib-
>Version);
system("pause");
return 0;
}
Intel Confidential
4
Copyright © 2015, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others. Optimization Notice
Intel® C++ Compiler Configuration

 No need to set the environment


variables on Windows* OS
 Right click your project in Solution
Explorer
 Intel Compiler > Use Intel C++

 Click OK to configure your project with 1


Intel® C++ Compiler
 Output window shows compiler set up
successfully
 Rebuild your application
3 2
Intel Confidential
5
Copyright © 2015, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others. Optimization Notice
Intel® Math Kernel Library Configuration
1
 Set up environment variables
 Go to <Install folder>
/Intel_sw_development_tools\compilers_a
nd_libraries_<version>\windows\mkl\bin\i
ntel64 and use script file 2
(mklvars_intel64.bat) to set up.

 Link your application with Intel® MKL


 Right click your project in Solution
Explorer
 Properties > Configuration Properties >
Intel Performance Libraries >

 Now you can start to develop.

Intel Confidential
6
Copyright © 2015, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others. Optimization Notice
Intel® MKL Example

 Start Microsoft Visual Studio* and Initial #include "stdafx.h"


one empty c++ project #include "mkl.h"
#include <iostream>
 Set up environment variables and link using namespace std;
your project with Intel® MKL
int _tmain()
 Include Intel® MKL header file by {
demand /* Get MKL library version info */
int len = 198;
 Add a new c file and paste the code into char buf[198];
it mkl_get_version_string(buf, len);
printf("MKL version: %s\n", buf);
 Compile and run the application system("pause");

return 0;
}
Intel Confidential
7
Copyright © 2015, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others. Optimization Notice
Intel® Threading Building Blocks Configuration
1
 Set up environment variables
 Go to <Install folder>
/Intel_sw_development_tools\compilers_a
nd_libraries_<version>\windows\tbb\bin
and use script file (tbbvars.bat) to set up.
2
 Link your application with Intel® TBB
 Right click your project in Solution
Explorer
 Properties > Configuration Properties >
Intel Performance Libraries >

 Now you can start to develop.

Intel Confidential
8
Copyright © 2015, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others. Optimization Notice
Intel® TBB Example

 Start Microsoft Visual Studio* and Initial #include "stdafx.h"


one empty c++ project #include "tbb/tbb_stddef.h "
#include <iostream>
 Set up environment variables and link using namespace std;
your project with Intel® TBB
int _tmain()
 Include Intel® TBB header file by demand {
/* Get TBB library version info */
 Add a new c file and paste the code into int x = TBB_VERSION_MAJOR;
it int y = TBB_VERSION_MINOR;
printf("Hello TBB!\n");
 Compile and run the application printf("TBB version: Intel(R) Threading
Building Blocks %d.%d\n", x,y);
system("pause");

return 0;
}
Intel Confidential
9
Copyright © 2015, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others. Optimization Notice
Intel® VTune™ Amplifier * VTune is fully integrated in VS

 Two way to launch the VTune in Visual


Studio
 Icon in the toolbar
 Right click your project in Solution
Explorer (Intel VTune Amplifier 2016 for
systems > New Analysis…)

 Configure the properties automatically


 Start to analysis with basic hotspot
 Auto-run the application
 Collect and analysis result after turn off
application

Intel Confidential * Auto-link the symbol file to do source analysis


10
Copyright © 2015, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others. Optimization Notice
Legal Disclaimer & Optimization Notice
INFORMATION IN THIS DOCUMENT IS PROVIDED “AS IS”. NO LICENSE, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, TO
ANY INTELLECTUAL PROPERTY RIGHTS IS GRANTED BY THIS DOCUMENT. INTEL ASSUMES NO LIABILITY WHATSOEVER AND
INTEL DISCLAIMS ANY EXPRESS OR IMPLIED WARRANTY, RELATING TO THIS INFORMATION INCLUDING LIABILITY OR
WARRANTIES RELATING TO FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR INFRINGEMENT OF ANY PATENT,
COPYRIGHT OR OTHER INTELLECTUAL PROPERTY RIGHT.

Software and workloads used in performance tests may have been optimized for performance only on Intel microprocessors.
Performance tests, such as SYSmark and MobileMark, are measured using specific computer systems, components, software,
operations and functions. Any change to any of those factors may cause the results to vary. You should consult other
information and performance tests to assist you in fully evaluating your contemplated purchases, including the performance of
that product when combined with other products.

Copyright © 2014, Intel Corporation. All rights reserved. Intel, Pentium, Xeon, Xeon Phi, Core, VTune, Cilk, and the Intel logo are
trademarks of Intel Corporation in the U.S. and other countries.

Optimization Notice
Intel’s compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel
microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the
availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent
optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture
are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the
specific instruction sets covered by this notice.
Notice revision #20110804

Intel Confidential
11
Copyright © 2015, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others. Optimization Notice

Vous aimerez peut-être aussi