what’s new in visual studio 2013 for c++ developers
DESCRIPTION
What’s New in Visual Studio 2013 for C++ Developers. Tarek Madkour Group Program Manager – Visual C++ 2-305. performance. compatibility. portability. Agenda. 0.Windows 8.1 Tools 4.Productivity. 1.Performance 2.Compatibility 3.Portability. Agenda. 0.Windows 8.1 Tools - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: What’s New in Visual Studio 2013 for C++ Developers](https://reader036.vdocuments.site/reader036/viewer/2022062222/56816664550346895dd9f473/html5/thumbnails/1.jpg)
![Page 2: What’s New in Visual Studio 2013 for C++ Developers](https://reader036.vdocuments.site/reader036/viewer/2022062222/56816664550346895dd9f473/html5/thumbnails/2.jpg)
What’s New in Visual Studio 2013 for C++ DevelopersTarek MadkourGroup Program Manager – Visual C++2-305
![Page 3: What’s New in Visual Studio 2013 for C++ Developers](https://reader036.vdocuments.site/reader036/viewer/2022062222/56816664550346895dd9f473/html5/thumbnails/3.jpg)
![Page 4: What’s New in Visual Studio 2013 for C++ Developers](https://reader036.vdocuments.site/reader036/viewer/2022062222/56816664550346895dd9f473/html5/thumbnails/4.jpg)
performancecompatibilityportability
![Page 5: What’s New in Visual Studio 2013 for C++ Developers](https://reader036.vdocuments.site/reader036/viewer/2022062222/56816664550346895dd9f473/html5/thumbnails/5.jpg)
1. Performance2. Compatibility3. Portability
Agenda
0. Windows 8.1 Tools
4. Productivity
![Page 6: What’s New in Visual Studio 2013 for C++ Developers](https://reader036.vdocuments.site/reader036/viewer/2022062222/56816664550346895dd9f473/html5/thumbnails/6.jpg)
0. Windows 8.1 Tools1. Performance2. Compatibility3. Portability4. Productivity
Agenda
![Page 7: What’s New in Visual Studio 2013 for C++ Developers](https://reader036.vdocuments.site/reader036/viewer/2022062222/56816664550346895dd9f473/html5/thumbnails/7.jpg)
Connected Windows Store AppsVisual Studio 2013 makes it easier to:• Update your app tile using mobile services• Send push notifications to your Windows Store app• Accessing Azure mobile services backend capabilities
How?• New C++ library for Azure mobile services• Integrated VS tools
![Page 8: What’s New in Visual Studio 2013 for C++ Developers](https://reader036.vdocuments.site/reader036/viewer/2022062222/56816664550346895dd9f473/html5/thumbnails/8.jpg)
Better XAML DesignerNew and updated templatesImproved XAML editorRulers and dynamic guidesNew Windows 8.1 controlsImproved Designer performanceBetter in-place style and template editing
![Page 9: What’s New in Visual Studio 2013 for C++ Developers](https://reader036.vdocuments.site/reader036/viewer/2022062222/56816664550346895dd9f473/html5/thumbnails/9.jpg)
Powerful Graphics DebuggingVS2012 introduced DirectX-based Graphics debugging tools in VS Professional, Premium and Ultimate
VS2013 adds:• Support in VS Express• Capturing frames from
remote machines• Compute shader
debugging• Faster frame capture
![Page 10: What’s New in Visual Studio 2013 for C++ Developers](https://reader036.vdocuments.site/reader036/viewer/2022062222/56816664550346895dd9f473/html5/thumbnails/10.jpg)
Deeper DiagnosticsDiagnostics hub• XAML UI responsiveness profiling• Energy profiler• CPU profilingBetter WinRT Exception debugging‘Just My Code’ debuggingImproved Async debuggingJavaScript/C++ interop debuggingC#/C++ interop debugging *ARM dump debugging *
![Page 11: What’s New in Visual Studio 2013 for C++ Developers](https://reader036.vdocuments.site/reader036/viewer/2022062222/56816664550346895dd9f473/html5/thumbnails/11.jpg)
C++/CX• Boxed types in WinRT structs value struct Person { IBox<int>^ Age; }
• Overriding ToString() ref struct Person { public: String^ Name; virtual String^ ToString() override { return Name; } }
• Improved WinRT exceptions• Retains stack trace and message
string across the ABI• Developers can specify custom
message strings
• Faster performance• Ref classes instantiate faster, have
more compact layouts in memory• Boxing and factory caching
improved to speed up XAML scenarios
• Facilitated inlining and other code optimizations
![Page 12: What’s New in Visual Studio 2013 for C++ Developers](https://reader036.vdocuments.site/reader036/viewer/2022062222/56816664550346895dd9f473/html5/thumbnails/12.jpg)
Windows 8.1 Toolsdemo
![Page 13: What’s New in Visual Studio 2013 for C++ Developers](https://reader036.vdocuments.site/reader036/viewer/2022062222/56816664550346895dd9f473/html5/thumbnails/13.jpg)
0. Windows 8.1 Tools1. Performance2. Compatibility3. Portability4. Productivity
Agenda
![Page 14: What’s New in Visual Studio 2013 for C++ Developers](https://reader036.vdocuments.site/reader036/viewer/2022062222/56816664550346895dd9f473/html5/thumbnails/14.jpg)
Performance Optimizations RecapCompilation Unit Optimizations• /O2 and friends
Whole Program Optimizations• /GL and /LTCG
.cpp
.cpp .obj
.obj.exe
.cpp
.cpp .obj
.obj.exe
.cpp
.cpp .obj
.obj.exe
Run TrainingScenario
s.exe
Profile-Guided Optimizations• /LTCG:PGI and /LTCG:PGO
![Page 15: What’s New in Visual Studio 2013 for C++ Developers](https://reader036.vdocuments.site/reader036/viewer/2022062222/56816664550346895dd9f473/html5/thumbnails/15.jpg)
Automatic VectorizationVS 2012:• Uses “vector” instructions where
possible in loops
VS 2013 adds:• Statement level vectorization• Permutation of perfect loop nests• Range propagation optimizations• Support for more operations:
min/max, converts, shifts, byteswap, averaging
• Reductions into array elements• __restrict support for vector alias
checking• Improvements to data dependence
analysis• C++ pointer vectorization• Gather / scatter optimizations
for (i = 0; i < 1000; i++) { A[i] = B[i] + C[i];}
+r1 r2
r3
add r3, r1, r2
SCALAR(1 operation)
v1 v2
v3+
vectorlength
vadd v3, v1, v2
VECTOR(N operations)
![Page 16: What’s New in Visual Studio 2013 for C++ Developers](https://reader036.vdocuments.site/reader036/viewer/2022062222/56816664550346895dd9f473/html5/thumbnails/16.jpg)
Automatic Vectorization// STL – pointers everywhere; not even a loop counter variablevoid transform1(const int * first1, const int * last1, const int * first2, int * result) { while (first1 != last1) { //converted to integer *result++ = *first1++ + *first2++; // make these array references }}// DirectX – no loops here! Vectorize operations on adjacent memory cellsvoid four_vector_example(XMVECTOR V) { XMVECTOR Result; Result.vector4_f32[0] = 1.f / V.vector4_f32[0]; Result.vector4_f32[1] = 1.f / V.vector4_f32[1]; Result.vector4_f32[2] = 1.f / V.vector4_f32[2]; Result.vector4_f32[3] = 1.f / V.vector4_f32[3]; return Result;}
// Machine Vision Libraryvoid machine_vision_filter_example (int *A, int boxStart) { for (int i = 0; i < 100; i++) A[boxStart + i] = A[boxStart + i] + 1;}
![Page 17: What’s New in Visual Studio 2013 for C++ Developers](https://reader036.vdocuments.site/reader036/viewer/2022062222/56816664550346895dd9f473/html5/thumbnails/17.jpg)
Vector Calling Conventionstruct Particle { __m256 x; __m256 y; __m256 z; __m256 w; };Particle __vectorcall foo(Particle a, __m256 scale){ Particle t; t.x = _mm256_mul_ps(a.x, scale); t.y = _mm256_mul_ps(a.y, scale); t.z = _mm256_mul_ps(a.z, scale); t.w = _mm256_mul_ps(a.w, scale); return t;}
Reduces instruction count
Minimizes stack allocation
Use /Gv for whole module
![Page 18: What’s New in Visual Studio 2013 for C++ Developers](https://reader036.vdocuments.site/reader036/viewer/2022062222/56816664550346895dd9f473/html5/thumbnails/18.jpg)
C++ AMPIn VS2012:• Programming model for heterogeneous computing• Allowed C++ code to run on the GPU for general-purpose computation• STL-like library for multidimensional data
VS2013 adds:• Shared memory support to eliminate/reduce copying of data between CPU and GPU• Enhanced texture support: texture sampling, mipmap support and staging textures• C++ AMP debugging on Win7 and side-by-side CPU/GPU debugging• Faster C++ AMP runtime: improved copy performance, reduce launch overhead• Better DirectX interop support• Improved C++ AMP runtime diagnostics• Improvements to array_view APIs
![Page 19: What’s New in Visual Studio 2013 for C++ Developers](https://reader036.vdocuments.site/reader036/viewer/2022062222/56816664550346895dd9f473/html5/thumbnails/19.jpg)
0. Windows 8.1 Tools1. Performance2. Compatibility3. Portability4. Productivity
Agenda
![Page 20: What’s New in Visual Studio 2013 for C++ Developers](https://reader036.vdocuments.site/reader036/viewer/2022062222/56816664550346895dd9f473/html5/thumbnails/20.jpg)
C++11
We have a lot here …
see Herb’s talk on Friday at noon.
![Page 21: What’s New in Visual Studio 2013 for C++ Developers](https://reader036.vdocuments.site/reader036/viewer/2022062222/56816664550346895dd9f473/html5/thumbnails/21.jpg)
0. Windows 8.1 Tools1. Performance2. Compatibility3. Portability4. Productivity
Agenda
![Page 22: What’s New in Visual Studio 2013 for C++ Developers](https://reader036.vdocuments.site/reader036/viewer/2022062222/56816664550346895dd9f473/html5/thumbnails/22.jpg)
C++ REST SDKCloud-based client-server communications library for C++
Basics:• Connecting and interacting with RESTful services• Uncompromised performance and productivity• Asynchrony for responsiveness and scalability• Uses modern C++11 patterns• Cross-platform enabled and OSS
![Page 23: What’s New in Visual Studio 2013 for C++ Developers](https://reader036.vdocuments.site/reader036/viewer/2022062222/56816664550346895dd9f473/html5/thumbnails/23.jpg)
C++ REST SDKHTTP Client to send requests and handle responsesJSON library for constructing, parsing and serializing JSON objects.Asynchronous Streams and Stream Buffers for reading/writing bytes to/from an underlying medium.
http://casablanca.codeplex.com
![Page 24: What’s New in Visual Studio 2013 for C++ Developers](https://reader036.vdocuments.site/reader036/viewer/2022062222/56816664550346895dd9f473/html5/thumbnails/24.jpg)
Basic HTTP Clienthttp_client client(L"http://www.myhttpserver.com");http_request request(methods::GET);
client.request(request).then([](http_response response){ // Perform actions here to inspect the HTTP response... if(response.status_code() == status_codes::OK) { }});
![Page 25: What’s New in Visual Studio 2013 for C++ Developers](https://reader036.vdocuments.site/reader036/viewer/2022062222/56816664550346895dd9f473/html5/thumbnails/25.jpg)
Make an HTTP request to get a JSON valuevoid RequestJSONValue()
{ http_client client(L"http://www.myhttpserver.com"); client.request(methods::GET).then([](http_response response) { if(response.status_code() == status_codes::OK) { return response.extract_json(); } // Handle error cases, for now return null json value... return task_from_result(json::value()); }) .then([](json::value v) { // Perform actions here to process the JSON value... });}
![Page 26: What’s New in Visual Studio 2013 for C++ Developers](https://reader036.vdocuments.site/reader036/viewer/2022062222/56816664550346895dd9f473/html5/thumbnails/26.jpg)
C++ REST SDKdemo
![Page 27: What’s New in Visual Studio 2013 for C++ Developers](https://reader036.vdocuments.site/reader036/viewer/2022062222/56816664550346895dd9f473/html5/thumbnails/27.jpg)
0. Windows 8.1 Tools1. Performance2. Compatibility3. Portability4. Productivity
Agenda
![Page 28: What’s New in Visual Studio 2013 for C++ Developers](https://reader036.vdocuments.site/reader036/viewer/2022062222/56816664550346895dd9f473/html5/thumbnails/28.jpg)
NuGetEasy acquisition and usage of compatible libraries in C++ projects
Library vendors can expose their libraries as NuGet packages using available toolshttp://blogs.msdn.com/b/vcblog/archive/2013/04/26/nuget-for-c.aspx
![Page 29: What’s New in Visual Studio 2013 for C++ Developers](https://reader036.vdocuments.site/reader036/viewer/2022062222/56816664550346895dd9f473/html5/thumbnails/29.jpg)
IDE Enhancementsdemo
![Page 30: What’s New in Visual Studio 2013 for C++ Developers](https://reader036.vdocuments.site/reader036/viewer/2022062222/56816664550346895dd9f473/html5/thumbnails/30.jpg)
Code Formatting
Configurable options for indentation, space, new lines and wrapping
Automatically applied while typing, pasting or formatting
![Page 31: What’s New in Visual Studio 2013 for C++ Developers](https://reader036.vdocuments.site/reader036/viewer/2022062222/56816664550346895dd9f473/html5/thumbnails/31.jpg)
Header / Code Switching
Brace Completion
![Page 32: What’s New in Visual Studio 2013 for C++ Developers](https://reader036.vdocuments.site/reader036/viewer/2022062222/56816664550346895dd9f473/html5/thumbnails/32.jpg)
Code PeekView type definitions without leaving the current open file
![Page 33: What’s New in Visual Studio 2013 for C++ Developers](https://reader036.vdocuments.site/reader036/viewer/2022062222/56816664550346895dd9f473/html5/thumbnails/33.jpg)
Code Analysis UI Enhancements
Filter on categories and sort on various fields to help focus on important problems first
![Page 34: What’s New in Visual Studio 2013 for C++ Developers](https://reader036.vdocuments.site/reader036/viewer/2022062222/56816664550346895dd9f473/html5/thumbnails/34.jpg)
Async DebuggingSupports Windows Store and Desktop appsRequires Windows 8.1Enhancements to the Call Stack and Tasks window Answers the questions “Why am I here?” & “What is going on right now?”
![Page 35: What’s New in Visual Studio 2013 for C++ Developers](https://reader036.vdocuments.site/reader036/viewer/2022062222/56816664550346895dd9f473/html5/thumbnails/35.jpg)
“Just My Code” debuggingHelps developer focus on code they authored
Call Stack window hides non-user code
Non-user code defined in configurable .natjmc file
Not used during stepping
![Page 36: What’s New in Visual Studio 2013 for C++ Developers](https://reader036.vdocuments.site/reader036/viewer/2022062222/56816664550346895dd9f473/html5/thumbnails/36.jpg)
Interop debuggingMultiple flavors of interop debugging enabled:• JavaScript / C++• C# / VB / C++ • CPython / C++• GPU / CPU
Enable by choosing an option in the Project PropertiesBreak in the debugger in either C++ or JS/C#/VB/Python code• Breakpoint | Exception | Break All (pause icon)Inspect state, e.g. in Locals, Call Stack
![Page 37: What’s New in Visual Studio 2013 for C++ Developers](https://reader036.vdocuments.site/reader036/viewer/2022062222/56816664550346895dd9f473/html5/thumbnails/37.jpg)
ResourcesVisual C++ Blog
http://blogs.msdn.com/vcblog
Visual C++ Developer Centerhttp://msdn.microsoft.com/en-us/visualc/default.aspx
Other C++ Sessions at //BUILDThu 11:30am
3-141 DirectX Graphics Debugging Tools
Fri 10:30am
4-329 Native Code Performance and Memory: The Elephant in the CPU
2-211 Windows Phone: Using Native (C++) Code in Your Apps
Fri 12:00pm
2-306 The Future of C++
3-308 C++/CX Best Practices
![Page 38: What’s New in Visual Studio 2013 for C++ Developers](https://reader036.vdocuments.site/reader036/viewer/2022062222/56816664550346895dd9f473/html5/thumbnails/38.jpg)
What?• Are you interested
in having an impact on the future user experiences in Visual Studio? Come help us shape the future.
Give us your feedback!When & Where?• Schedule a time
with us [email protected]
• Room 254 South
Moscone, West Mezzanine Level
Why?• Your input and
feedback will influence future Microsoft Visual Studio tools
Give us your feedback!
![Page 39: What’s New in Visual Studio 2013 for C++ Developers](https://reader036.vdocuments.site/reader036/viewer/2022062222/56816664550346895dd9f473/html5/thumbnails/39.jpg)
Evaluate this session
Scan this QR code to evaluate this session and be automatically entered in a drawing to win a prize!
![Page 40: What’s New in Visual Studio 2013 for C++ Developers](https://reader036.vdocuments.site/reader036/viewer/2022062222/56816664550346895dd9f473/html5/thumbnails/40.jpg)
© 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.