September 2023 - Update 1

This commit is contained in:
Federico
2023-09-14 16:30:21 -07:00
parent 36fe069450
commit 8efcf6db2a
19 changed files with 52 additions and 49 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

101
README.md
View File

@ -42,29 +42,29 @@ If you enjoy the course or you find it useful, please add a **Star**
## CHAPTERS
| | TITLE | MAIN FOCUS |
| ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------- |
| **1** | **[Introduction](https://github.com/federico-busato/Modern-CPP-Programming/blob/master/01.Introduction.pdf)** | History of C/C++, Areas of Applications, Course introduction |
| **2** | **[Basic Concepts I - Fundamental Types](https://github.com/federico-busato/Modern-CPP-Programming/blob/master/02.Basic_Concepts_I.pdf)** | Integral data types, floating-point, operators, and conversion |
| **3** | **[Basic Concepts II - Entities and Control Flow](https://github.com/federico-busato/Modern-CPP-Programming/blob/master/03.Basic_Concepts_II.pdf)** | Enumerators, structures, control flow statements |
| **4** | **[Basic Concepts III - Memory Management](https://github.com/federico-busato/Modern-CPP-Programming/blob/master/04.Basic_Concepts_III.pdf)** | Heap, Stack, pointers, references, const properties, conversion operators |
| **5** | **[Basic Concepts IV - Functions and Preprocessing](https://github.com/federico-busato/Modern-CPP-Programming/blob/master/05.Basic_Concepts_IV.pdf)** | Functions, lambda expressions, preprocessing directives |
| **6** | **[C++ Object Oriented Programming I - Class Concepts](https://github.com/federico-busato/Modern-CPP-Programming/blob/master/06.Object_Oriented_I.pdf)** | Class hierarchy, constructor, destructor, class keywords |
| **7** | **[C++ Object Oriented Programming II - Polymorphism and Operator Overloading](https://github.com/federico-busato/Modern-CPP-Programming/blob/master/07.Object_Oriented_II.pdf)** | Polymorphism, operators overloading |
| **8** | **[C++ Templates and Meta-programming I - Function Templates and Compile-Time Utilities](https://github.com/federico-busato/Modern-CPP-Programming/blob/master/08.Templates_I.pdf)** | Function template, type traits |
| **9** | **[C++ Templates and Meta-programming II - Class Templates and SFINAE](https://github.com/federico-busato/Modern-CPP-Programming/blob/master/09.Templates_II.pdf)** | Class template, SFINAE |
| **10** | **[Translation Units I](https://github.com/federico-busato/Modern-CPP-Programming/blob/master/10.Translation_Units_I.pdf)** | Linkage and One Definition Rule |
| **11** | **[Translation Units II](https://github.com/federico-busato/Modern-CPP-Programming/blob/master/11.Translation_Units_II.pdf)** | Dealing with multiple translation units and files,  `#include`, and modules |
| **12** | **[Code Conventions](https://github.com/federico-busato/Modern-CPP-Programming/blob/master/12.Code_Convention.pdf)** | Project organization and main code conventions |
| **13** | **[Ecosystem I](https://github.com/federico-busato/Modern-CPP-Programming/blob/master/13.Ecosystem_I.pdf)** | Debugging, and testing |
| **14** | **[Ecosystem II](https://github.com/federico-busato/Modern-CPP-Programming/blob/master/14.Ecosystem_II.pdf)** | Cmake, documenting, and other Tools |
| **15** | **[Utilities](https://github.com/federico-busato/Modern-CPP-Programming/blob/master/15.Utilities.pdf)** | Main `std` libraries |
| **16** | **[Containers, Iterators, and Algorithms](https://github.com/federico-busato/Modern-CPP-Programming/blob/master/16.Iterators_Containers_Alg.pdf)** | Containers, iterators, algorithms, ranges |
| **17** | **[Advanced Topics I](https://github.com/federico-busato/Modern-CPP-Programming/blob/master/17.Advanced_Topics_I.pdf)** | Move semantics, universal reference, type deduction |
| **18** | **[Advanced Topics II](https://github.com/federico-busato/Modern-CPP-Programming/blob/master/18.Advanced_Topics_II.pdf)** | Error handling, C++ idioms, smart pointers |
| **19** | **[Optimization I - Basic Concepts](https://github.com/federico-busato/Modern-CPP-Programming/blob/master/19.Optimization_I.pdf)** | Ahmdal Law, performance bounds, architecture concepts (ILP, SIMD, etc.), memory hierarchy |
| **20** | **[Optimization II - Code Optimization](https://github.com/federico-busato/Modern-CPP-Programming/blob/master/20.Optimization_II.pdf)** | Arithmetic optimizations, memory optimizations, etc. |
| **21** | **[Optimization III - Non-Coding Optimizations and Benchmarking](https://github.com/federico-busato/Modern-CPP-Programming/blob/master/21.Optimization_III.pdf)** | Compiler optimizations, profiling and benchmarking tools |
| | TITLE | MAIN FOCUS |
| ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
| **1** | **[Introduction](https://github.com/federico-busato/Modern-CPP-Programming/blob/master/01.Introduction.pdf)** | History of C/C++, Areas of Applications, Course introduction |
| **2** | **[Basic Concepts I - Fundamental Types](https://github.com/federico-busato/Modern-CPP-Programming/blob/master/02.Basic_Concepts_I.pdf)** | Integral data types, floating-point, operators, and conversion |
| **3** | **[Basic Concepts II - Entities and Control Flow](https://github.com/federico-busato/Modern-CPP-Programming/blob/master/03.Basic_Concepts_II.pdf)** | Enumerators, structures, control flow statements |
| **4** | **[Basic Concepts III - Memory Management](https://github.com/federico-busato/Modern-CPP-Programming/blob/master/04.Basic_Concepts_III.pdf)** | Heap, Stack, pointers, references, const properties, conversion operators |
| **5** | **[Basic Concepts IV - Functions and Preprocessing](https://github.com/federico-busato/Modern-CPP-Programming/blob/master/05.Basic_Concepts_IV.pdf)** | Functions, lambda expressions, preprocessing directives |
| **6** | **[Object Oriented Programming I - Class Concepts](https://github.com/federico-busato/Modern-CPP-Programming/blob/master/06.Object_Oriented_I.pdf)** | Class hierarchy, constructor, destructor, class keywords |
| **7** | **[Object Oriented Programming II - Polymorphism and Operator Overloading](https://github.com/federico-busato/Modern-CPP-Programming/blob/master/07.Object_Oriented_II.pdf)** | Polymorphism, operators overloading |
| **8** | **[Templates and Meta-programming I - Function Templates and Compile-Time Utilities](https://github.com/federico-busato/Modern-CPP-Programming/blob/master/08.Templates_I.pdf)** | Function template, type traits |
| **9** | **[Templates and Meta-programming II - Class Templates and SFINAE](https://github.com/federico-busato/Modern-CPP-Programming/blob/master/09.Templates_II.pdf)** | Class template, SFINAE |
| **10** | **[Translation Units I](https://github.com/federico-busato/Modern-CPP-Programming/blob/master/10.Translation_Units_I.pdf)** | Linkage and One Definition Rule |
| **11** | **[Translation Units II](https://github.com/federico-busato/Modern-CPP-Programming/blob/master/11.Translation_Units_II.pdf)** | Dealing with multiple translation units and files,  `#include`, and modules |
| **12** | **[Code Conventions](https://github.com/federico-busato/Modern-CPP-Programming/blob/master/12.Code_Convention.pdf)** | Project organization and main code conventions |
| **13** | **[Ecosystem I](https://github.com/federico-busato/Modern-CPP-Programming/blob/master/13.Ecosystem_I.pdf)** | Debugging, and testing |
| **14** | **[Ecosystem II](https://github.com/federico-busato/Modern-CPP-Programming/blob/master/14.Ecosystem_II.pdf)** | Cmake, documenting, and other Tools |
| **15** | **[Utilities](https://github.com/federico-busato/Modern-CPP-Programming/blob/master/15.Utilities.pdf)** | Main `std` libraries |
| **16** | **[Containers, Iterators, and Algorithms](https://github.com/federico-busato/Modern-CPP-Programming/blob/master/16.Iterators_Containers_Alg.pdf)** | Containers, iterators, algorithms, ranges |
| **17** | **[Advanced Topics I](https://github.com/federico-busato/Modern-CPP-Programming/blob/master/17.Advanced_Topics_I.pdf)** | Move semantics, universal reference, type deduction |
| **18** | **[Advanced Topics II](https://github.com/federico-busato/Modern-CPP-Programming/blob/master/18.Advanced_Topics_II.pdf)** | Error handling, C++ idioms, smart pointers |
| **19** | **[Optimization I - Basic Concepts](https://github.com/federico-busato/Modern-CPP-Programming/blob/master/19.Optimization_I.pdf)** | Ahmdal Law, performance bounds, architecture concepts (ILP, SIMD, etc.), memory hierarchy |
| **20** | **[Optimization II - Code Optimization](https://github.com/federico-busato/Modern-CPP-Programming/blob/master/20.Optimization_II.pdf)** | Arithmetic optimizations, memory optimizations, etc. |
| **21** | **[Optimization III - Non-Coding Optimizations and Benchmarking](https://github.com/federico-busato/Modern-CPP-Programming/blob/master/21.Optimization_III.pdf)** | Compiler optimizations, profiling and benchmarking tools |
## TOPICS IN DETAILS
@ -84,8 +84,8 @@ If you enjoy the course or you find it useful, please add a **Star**
* **C++ Fundamental Types Overview**: Arithmetic types, Non-standard arithmetic types, `void` type, Pointer type and `nullptr`
* **Conversion Rules**
* **`auto` declaration**
* **C++ Operators**: Operators precedence, Prefix/Postfix increment/decrement, Assignment, Compound , and comma operators, Spaceship operator `<=>` , Safe Comparison Operators
* **Integral Data Types**: Fixed width integers and `size_t`, When use signed/unsigned integer? Promotion, Truncation, Undefined behavior
* **C++ Operators**: Operators precedence, Prefix/Postfix increment/decrement, Assignment, Compound , and Comma operators, Spaceship operator `<=>` , Safe Comparison Operators
* **Integral Data Types**: Fixed width integers, `size_t` and`ptrdiff_t`, When use signed/unsigned integer? Promotion, Truncation, Undefined behavior
* **Floating-point Types and Arithmetic**: Normal/Denormal values, Infinity, Not a Number (`NaN`), Summary, Properties
* **Floating-point Issues**: Catastrophic cancellation, Floating-point comparison
@ -98,49 +98,49 @@ If you enjoy the course or you find it useful, please add a **Star**
**[4. Basic Concepts III - Memory Management](https://github.com/federico-busato/Modern-CPP-Programming/blob/master/04.Basic_Concepts_III.pdf)**
* **Heap and Stack**: Stack Memory, `new`, `delete`, Non-allocating placement allocation, Non-throwing allocation, Memory leak
* **Initialization**: Variable initialization, Uniform initialization, Fixed-size array initialization, Structure initialization, Dynamic array initialization
* **Initialization**: Variable initialization, Uniform initialization, Fixed-size array initialization, Structure initialization, Dynamic memory initialization
* **Pointers and References**: Pointer Operations, Address-of operator `&`, Reference
* **Constant and Literals, `const`, `constexpr`, `consteval`, `constinit`**
* **Constant and Literals, `const`, `constexpr`, `consteval`, `constinit`**, `if constexpr`, `std::is constant evaluated()`, `if consteval`
* **Explicit Type Conversion**: `static_cast`, `const_cast`, `reinterpret_cast`, Type punning
* `sizeof` Operator
**[5. Basic Concepts IV - Functions and Preprocessing](https://github.com/federico-busato/Modern-CPP-Programming/blob/master/05.Basic_Concepts_IV.pdf)**
* **Declaration and Definition**
* **Functions**: Pass by-value, Pass by-pointer, Pass by-reference, Function signature and Overloading, Default parameters, Attributes
* **Function Objects and Lambda Expressions**: Function pointer, Function object (or Functor), Capture list, Other features, Capture list and classes
* **Preprocessing**: Preprocessors, Common errors, Useful macro, Stringizing operator (`#`), `#pragma` and `#error`, Token-Pasting Operator (`##`), Variadic Macro
* **Functions**: Pass by-value, Pass by-pointer, Pass by-reference, Function signature and Overloading, Overloading and `=delete`, Default parameters, Attributes
* **Function Pointer and Function Objects**
* **Lambda Expressions**: Capture list, Other features, Capture list and classes
* **Preprocessing**: Preprocessors, Common errors, Useful macro, Stringizing operator (`#`), `#error` and `warning`, `#pragma`, Token-Pasting Operator (`##`), Variadic Macro
**[6. C++ Object-Oriented Programming I - Class Concepts](https://github.com/federico-busato/Modern-CPP-Programming/blob/master/06.Object_Oriented_I.pdf)**
**[6. Object-Oriented Programming I - Class Concepts](https://github.com/federico-busato/Modern-CPP-Programming/blob/master/06.Object_Oriented_I.pdf)**
* **C++ Classes**: RAII Idiom
* **Class Hierarchy**: Access specifiers, Inheritance access specifiers
* **Class Constructor**: Default constructor, Class initialization, Uniform initialization, Delegate constructor, `explicit` keyword
* **Class Constructor**: Default constructor, Class initialization, Uniform initialization, Delegate constructor, `explicit` keyword, `[[nodiscard]]` and classes
* **Copy Constructor**
* **Class Destructor**
* **Defaulted Members** (`= default`)
* **Defaulted Constructors, Destructor, and Operators** (`= default`)
* **Class Keywords**: `this`, `static`, `const`, `mutable`, `using`, `friend`, `delete`
**[7. C++ Object-Oriented Programming II - Polymorphism and Operator Overloading](https://github.com/federico-busato/Modern-CPP-Programming/blob/master/07.Object_Oriented_II.pdf)**
**[7. Object-Oriented Programming II - Polymorphism and Operator Overloading](https://github.com/federico-busato/Modern-CPP-Programming/blob/master/07.Object_Oriented_II.pdf)**
* **Polymorphism**: `virtual` methods, Virtual table, `override` keyword, `final` keyword, Common errors, Pure virtual method, Abstract class and interface
* **Inheritance Casting and Run-time Type Identification**
* **Operator Overloading**: Overview, Subscript operator `[]`, Comparison operator `<`, Spaceship operator `<=>`, Function call operator `()`, Conversion operator `T()`, Return type overloading resolution, Increment and decrement operators `++`/`--`, Assignment operator `=`, Stream operator `<<`, Operator Notes
* **Operator Overloading**: Overview, Comparison operator `<`, Spaceship operator `<=>`, Subscript operator `[]`, Multidimensional Subscript operator `[]`, Function call operator `()`, static operator `[]` and operator `()`, Conversion operator `T()`, Return type overloading resolution, Increment and decrement operators `++`/`--`, Assignment operator `=`, Stream operator `<<`, Operator Notes
* **C++ Special Objects**: Aggregate, Trivial class, Standard-layout class, Plain old data (POD), Hierarchy
**[8. C++ Templates and Meta-programming I - Function Templates and Compile-Time Utilities](https://github.com/federico-busato/Modern-CPP-Programming/blob/master/08.Templates_I.pdf)**
**[8. Templates and Meta-programming I - Function Templates and Compile-Time Utilities](https://github.com/federico-busato/Modern-CPP-Programming/blob/master/08.Templates_I.pdf)**
* **Function Template**: Overview, Template parameters, Template parameter - default value, Specialization, Overloading
* **Template Variable**
* **Template Parameter Types**: Template Parameter Types, Generic Type Notes,
`auto` Placeholder, Class template parameter type, Array and pointer types, Function type
* **Template Parameter Types**: Generic Type Notes, `auto` Placeholder, Class template parameter type, Array and pointer types, Function type
* **Compile-Time Utilities**: `static_assert`, `decltype` Keyword, `using` Keyword
* **Type Traits**: Overview, Type traits library, Type manipulation
**[9. C++ Templates and Meta-programming II -  - Class Templates and SFINAE](https://github.com/federico-busato/Modern-CPP-Programming/blob/master/09.Templates_II.pdf)**
**[9. Templates and Meta-programming II -  - Class Templates and SFINAE](https://github.com/federico-busato/Modern-CPP-Programming/blob/master/09.Templates_II.pdf)**
* **Class Template**: Class specialization
* **Class Template - Advanced Concepts**: Class + Function - Specialization, Dependent Names - `typename` and `template` Keywords, `friend` Keyword, Template Template Arguments
* **Class Template**: Class specialization, Template class constructor
* **Class Template - Advanced Concepts**: Class + Function - Specialization, Dependent Names - `typename` and `template` Keywords, Class template hierarchy and `using`, `friend` Keyword, Template Template Arguments
* **Template Meta-Programming**
* **SFINAE: Substitution Failure Is Not An Error**: Function SFINAE, Class SFINAE, Class + Function SFINAE
* **Variadic Template**: Folding Expression, Variadic class template
@ -167,7 +167,7 @@ If you enjoy the course or you find it useful, please add a **Star**
**[12. Code Conventions](https://github.com/federico-busato/Modern-CPP-Programming/blob/master/12.Code_Convention.pdf)**
* **C++ Project Organization**: Project directories, Project files, `src/include` directories
* **C++ Project Organization**: Project directories, Project files, `src/include` directories, Alternative project organization
* **Coding Styles and Conventions**
* **`#include`**
* **Macro and Preprocessing**
@ -178,7 +178,8 @@ If you enjoy the course or you find it useful, please add a **Star**
* **Control Flow**
* **Modern C++ Features**
* **Maintainability**
* **Naming and Formatting**
* **Naming**
* **Reabability and Formatting**
* **Code Documentation**
**[13. Ecosystem I](https://github.com/federico-busato/Modern-CPP-Programming/blob/master/13.Ecosystem_I.pdf)**
@ -189,8 +190,9 @@ If you enjoy the course or you find it useful, please add a **Star**
* **Memory Debugging**: `valgrind`, Stack protection
* **Sanitizers**: Address sanitizer, Leak sanitizer, Memory sanitizers, Undefined behavior sanitizer
* **Debugging Summary**
* **Code Checking and Analysis**: Compiler warnings, Static analyzers
* **Code Testing**: Unit test, Test-Driven Development (TDD), Code coverage, Fuzz testing
* **Compiler Warnings**
* **Static Analysis**
* **Code Testing**: Unit test, Code coverage, Fuzz testing
* **Code Quality**: `clang-tidy`
**[14. Ecosystem II](https://github.com/federico-busato/Modern-CPP-Programming/blob/master/14.Ecosystem_II.pdf)**
@ -204,7 +206,7 @@ If you enjoy the course or you find it useful, please add a **Star**
* **I/O Stream**: Manipulator, `ofstream/ifstream`
* **Math Libraries**
* **Strings**: `std::string`, Conversion from/to numeric balues, `std::string_view`, `std::format`
* **Strings**: `std::string`, Conversion from/to numeric balues, `std::string_view`, `std::format`, `std::print`
* **Random Number**: Basic Concepts, C++ `<random>`, Seed, PRNG period and quality, Distribution, Quasi-random
* **Time Measuring**: Wall-Clock time, User time, System time
* **Std Template Classes**: `std::byte` `std::pair`, `std::tuple`, `std::variant`, `std::optional`, `std::any`
@ -244,24 +246,25 @@ If you enjoy the course or you find it useful, please add a **Star**
* **Overview**
* **Basic Concepts**: Asymptotic complexity, Time-Memory Trade-off, Developing Cycle, Ahmdal's law, Throughput, Bandwidth, Latency, Performance bounds, Arithmetic intensity
* **Basic Architecture Concepts**: Instruction-level parallelism, Littles law, Data-level parallelism, Thread-level parallelism, RISC, CISC Instruction sets
* **Basic Architecture Concepts**: Instruction-level parallelism (ILP), Littles law, Data-level parallelism (SIMD), Thread-level parallelism (TLP), Single Instruction Multiple Threads (SIMT), RISC, CISC Instruction sets
* **Memory Hierarchy**: Memory hierarchy concepts, Memory locality
**[20. Optimization II - Code Optmization](https://github.com/federico-busato/Modern-CPP-Programming/blob/master/20.Optimization_II.pdf)**
* **I/O Operations**: `printf`, Memory mapped I/O, Speed up raw data loading
* **Memory Optimizations**: Heap memory, Stack memory, Cache utilization, data alignment, memory prefecth
* **Memory Optimizations**: Heap memory, Stack memory, Cache utilization, data alignment, Memory Prefetch
* **Arithmetic**: Data types, Operations, Conversion, Floating-point, Compiler intrinsic functions, Value in a range, Lookup table
* **Control Flow**: Loop hoisting, Loop unrolling, Branch hints, Compiler hints, Recursion
* **Functions**: Function call cost, Argument passing, Function optimizations, Function inlining, Pointers aliasing
* **C++ Objects**: Object RAII optimizations
* **Std Library and Other Language Aspects**
**[21. Optimization III - Non-Coding Optimizations and Benchmarking](https://github.com/federico-busato/Modern-CPP-Programming/blob/master/21.Optimization_III.pdf)**
* **Compiler Optimizations**: About the compiler, Architecture flags, Optimization flags, Help the Compiler to produce better code, Profile guided optimization (PGO), Post-Processing Binary Optimizer
* **Compiler Transformation Techniques**
* **Libraries and Data Structures**: External libraries, Std library
* **Performance Benchmarking**: What to test?, Workload/Dataset quality, Cache behavior, Stable CPU performance, Program memory layout, Measurement overhead and compiler Optimizations, Metric evaluation
* **Performance Benchmarking**: What to test?, Workload/Dataset quality, Cache behavior, Stable CPU performance, Program memory layout, Measurement overhead and compiler optimizations, Metric evaluation
* **Profiling**: `gprof`, `uftrace`, `callgrind`, `cachegrind`, `perf` Linux profiler
* **Parallel Computing**: Concurrency vs. Parallelism, Performance scaling, Gustafsons Law, Parallel programming languages