C++ Team Blog
The latest in C++, Visual Studio, VS Code, and vcpkg from the MSFT C++ team
Latest posts
AVX2 floating point improvements in Visual Studio 2019 version 16.5
Visual Studio version 16.2 provided a number of improvements to C++ video game development through vector optimizations. Visual Studio version 16.5 builds on these changes to improve the performance of even more vector operations.
AVX-512 Auto-Vectorization in MSVC
In Visual Studio 2019 version 16.3 we added AVX-512 support to the auto-vectorizer of the MSVC compiler. This post will show some examples and help you enable it in your projects. What is the auto vectorizer? The compiler’s auto vectorizer analyzes loops in the user’s source code and generates vectorized code for a vectorization target where feasible and beneficial. For example, if I build the code above using cl.exe /O2 /fp:fast /arch:AVX2 targeting AVX2, I get the following assembly. The lines 11-15 are the vectorized loop using ymm registers. The lines 16-21 are to calculate the scalar value sum from vect...
Custom AI-Assisted IntelliSense for your team
As you’ve been editing code, you may have noticed IntelliCode’s starred recommendations in your autocompletion lists. Our previous IntelliCode blog post explains that these smarter suggestions were machine-learned over thousands of open sourced GitHub repos. Using community knowledge is great for public APIs like the Standard Library, but what if you want IntelliCode suggestions for your APIs and other libraries that wouldn’t commonly be found in open-source code? To address this, in Visual Studio 2019 version 16.5 Preview 3 you can now train custom IntelliCode models on your own codebases. This generates somethi...
Qt to support Visual Studio Linux projects
Qt is a popular cross-platform framework for application development and user interface design. Its various libraries and toolsets can be used to create, test, and deploy applications that target multiple platforms and operating systems including Linux, Windows, macOS and embedded/microcontroller systems. Qt recently announced its plan to support Visual Studio Linux projects in an upcoming release of the Qt Visual Studio Tools extension, scheduled for this summer. “Since the introduction of the C++ Linux workload, users have had the possibility of working on Linux development in Visual Studio. This featur...
Visual Studio Code CMake Tools Extension: Multi-root workspaces and file-based API
The February 2020 update of the Visual Studio Code CMake Tools extension is now available. This release includes two of the extension’s top feature requests: file-based API support and multi-root workspaces. For a full list of this release’s improvements check out the release notes on GitHub. Multi-root workspace support The latest release of the CMake Tools extension comes with support for multi-root workspaces. This means you can have two or more folders containing a root CMakeLists.txt open side-by-side in Visual Studio Code. When a workspace contains multiple folders, the CMake Tools extension will display ...
Easily Add, Remove, and Rename Files and Targets in CMake Projects
It’s easier than ever to work with CMake projects in Visual Studio 2019 16.5 Preview 2. Now you can add, remove, and rename source files and targets in your CMake projects from the IDE without manually editing your CMake scripts. When you add or remove files with the Solution Explorer, Visual Studio will automatically edit your CMake project. You can also add, remove, and rename the project’s targets from the Solution Explorer’s targets view. C and C++ Source Files Visual Studio now tracks C and C++ source files as they are added, renamed, or removed from the Solution Explorer, automatically modifying the u...
Code Navigation for CMake Scripts
Visual Studio 2019 16.5 Preview 2 makes it easy to make sense of complex CMake projects. Code navigation features such as Go To Definition and Find All References are now supported for variables, functions, and targets in CMake script files. This can be a huge timesaver because CMake projects with more than a handful of source files are often organized into several CMake scripts to encapsulate each part of the project. These navigation features work across your entire CMake project to offer more productivity than naïve text search across files and folders. They are also integrated with other IDE productivity f...
JCC Erratum Mitigation in MSVC
The content of this blog was provided by Gautham Beeraka from Intel Corporation. Intel recently announced Jump Conditional Code (JCC) Erratum which can occur in some of its processors. The MSVC team has been working with Intel to provide a software fix in the compiler to mitigate the performance impact of the microcode update that prevents the erratum. Introduction There are three things one should know about JCC erratum: Each of these topics are explained below. JCC Erratum The processors listed in Intel’s white paper referenced above have an erratum which can occur under certain cond...
Improve Parallelism in MSBuild
Starting in Visual Studio 2019 16.3, we have been adding features to improve build parallelism.