Big Technical Note: From C++1998 to C++2020

For people who are not entirely new to C/C++, here is an attempt to systematize language features of various C/C++ standards 03/11/14/17/20:

It’s an early draft of the note. In the future, some things that are tightly bound to C/C++ will be added.

Why does it have a connection to Deep Learning?

Most software in this world (after various wrappers) is written in C/C++. As a subset, it also includes tools, libraries, and frameworks for Deep Learning including PyTorch.

The famous (standard) Python interpreter used for prototyping (and sometimes beyond) Python is also written in C/C++ and highly leverages into libraries written in C/C++. Underlying libraries for PyTorch are also written in C/C++ (or variations).

Two example scenarios when you need C++:

  • Your project may require using C/C++ API from PyTorch for reasons of C++. So you also need to know that language in that case to some extent. Unfortunately, C/C++ was a complex language in the past, and that languages are still tricky for new adepts. That note systematizes features of the language.

  • Sometimes, when you want to go beyond existing methods and functionality, you may need to modify one of the mentioned projects for your needs (if the project is open source like PyTorch). For that purpose, you need to learn C/C++, whether you like it or not. C++ Language is the first step because frameworks are enormous, e.g., PyTorch has 5M lines of code. And once you go into details of the internal organization, it would not be an easy time. But you may need it.