Release v1.8.0

This commit is contained in:
Federico
2024-11-07 21:55:20 -08:00
parent 4da0bcc6cb
commit 5cec82a8f4
57 changed files with 60285 additions and 54186 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.

BIN
15.Code_Convention_II.pdf Normal file

Binary file not shown.

Binary file not shown.

BIN
25.Software_Design_I.pdf Normal file

Binary file not shown.

159
README.md
View File

@ -35,7 +35,7 @@ This *open-access* course is directed at those who are already familiar with C a
**Key features**:
- *Free and frequently updated*
- *25 lectures, 1600+ slides*
- *26 lectures, 1800+ slides*
- Include the *last language standard* concepts and features
- *Practical teaching*: non-verbose, short structured descriptions associated with code
- *Minimal code examples* for showing just a specific feature or issue without digressing
@ -49,7 +49,7 @@ This *open-access* course is directed at those who are already familiar with C a
## CHAPTERS
| # | TITLE | MAIN FOCUS |
| ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------|
| ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
| **1** | [**Introduction**](01.Introduction.pdf) ([html](https://federico-busato.github.io/Modern-CPP-Programming/htmls/01.Introduction.html)) | History of C/C++, Areas of applications, Course introduction |
| **2** | [**Preparation**](02.Preparation.pdf) ([html](https://federico-busato.github.io/Modern-CPP-Programming/htmls/02.Preparation.html)) | Books, How to compile, Hello world |
| **3** | [**Basic Concepts I**](03.Basic_Concepts_I.pdf) ([html](https://federico-busato.github.io/Modern-CPP-Programming/htmls/03.Basic_Concepts_I.html)) | Type System, Fundamental types, and Operators |
@ -63,18 +63,19 @@ This *open-access* course is directed at those who are already familiar with C a
| **11** | [**Templates and Meta-programming II**](11.Templates_II.pdf) ([html](https://federico-busato.github.io/Modern-CPP-Programming/htmls/11.Templates_II.html)) | Class template, SFINAE |
| **12** | [**Translation Units I**](12.Translation_Units_I.pdf) ([html](https://federico-busato.github.io/Modern-CPP-Programming/htmls/12.Translation_Units_I.html)) | Linkage and One Definition Rule |
| **13** | [**Translation Units II**](13.Translation_Units_II.pdf) ([html](https://federico-busato.github.io/Modern-CPP-Programming/htmls/13.Translation_Units_II.html)) | Dealing with multiple translation units and files,`#include`, Modules |
| **14** | [**Code Conventions**](14.Code_Convention.pdf) ([html](https://federico-busato.github.io/Modern-CPP-Programming/htmls/14.Code_Convention.html)) | Project organization, Main code conventions |
| **15** | [**Debugging and Testing**](15.Debugging.pdf) ([html](https://federico-busato.github.io/Modern-CPP-Programming/htmls/15.Debugging.html)) | Execution/memory debugging, Sanitizers, Harding techniques, Unit test, Test-Driven Development |
| **16** | [**Ecosystem**](16.Ecosystem.pdf) ([html](https://federico-busato.github.io/Modern-CPP-Programming/htmls/16.Ecosystem.html)) | Cmake, Documenting, and Other Tools |
| **17** | [**Utilities**](17.Utilities.pdf) ([html](https://federico-busato.github.io/Modern-CPP-Programming/htmls/17.Utilities.html)) | Main `std` libraries |
| **18** | [**Containers, Iterators, and Algorithms**](18.Iterators_Containers_Alg.pdf) ([html](https://federico-busato.github.io/Modern-CPP-Programming/htmls/18.Iterators_Containers_Alg.html)) | Containers, Iterators, Algorithms, Ranges |
| **19** | [**Advanced Topics I**](19.Advanced_Topics_I.pdf) ([html](https://federico-busato.github.io/Modern-CPP-Programming/htmls/19.Advanced_Topics_I.html)) | Move semantics, Universal reference, Type deduction |
| **20** | [**Advanced Topics II**](20.Advanced_Topics_II.pdf) ([html](https://federico-busato.github.io/Modern-CPP-Programming/htmls/20.Advanced_Topics_II.html)) | Error handling, C++ idioms, Smart pointers |
| **21** | [**Performance Optimizations I**](21.Optimization_I.pdf) ([html](https://federico-busato.github.io/Modern-CPP-Programming/htmls/21.Optimization_I.html)) | Ahmdal Law, Performance bounds, Architecture concepts (ILP, SIMD, etc.), Memory hierarchy |
| **22** | [**Performance Optimizations II**](22.Optimization_II.pdf) ([html](https://federico-busato.github.io/Modern-CPP-Programming/htmls/22.Optimization_II.html)) | Arithmetic optimizations, Memory optimizations, etc. |
| **23** | [**Performance Optimizations III**](23.Optimization_III.pdf) ([html](https://federico-busato.github.io/Modern-CPP-Programming/htmls/23.Optimization_III.html)) | Compiler optimizations, Profiling, Benchmarking tools |
| **24** | [**Software Design I**](24.Software_Design_I.pdf) ([html](https://federico-busato.github.io/Modern-CPP-Programming/htmls/24.Software_Design_I.html)) | Basic Concepts, Principles, Use cases |
| **25** | [**Software Design II**](25.Software_Design_II.pdf) ([html](https://federico-busato.github.io/Modern-CPP-Programming/htmls/25.Software_Design_II.html)) | Design Patterns and Idioms |
| **14** | [**Code Conventions I**](14.Code_Convention_I.pdf) ([html](https://federico-busato.github.io/Modern-CPP-Programming/htmls/14.Code_Convention_I.html)) | Project organization, code conventions intro, entities conventions |
| **15** | [**Code Conventions II**](15.Code_Convention_II.pdf) ([html](https://federico-busato.github.io/Modern-CPP-Programming/htmls/15.Code_Convention_II.html)) | Template, namespace, modern c++, maintainability , naming, and formatting conventions |
| **16** | [**Debugging and Testing**](16.Debugging.pdf) ([html](https://federico-busato.github.io/Modern-CPP-Programming/htmls/16.Debugging.html)) | Execution/memory debugging, Sanitizers, Harding techniques, Unit test, Test-Driven Development |
| **17** | [**Ecosystem**](17.Ecosystem.pdf) ([html](https://federico-busato.github.io/Modern-CPP-Programming/htmls/17.Ecosystem.html)) | Cmake, Documenting, and Other Tools |
| **18** | [**Utilities**](18.Utilities.pdf) ([html](https://federico-busato.github.io/Modern-CPP-Programming/htmls/18.Utilities.html)) | Main `std` libraries |
| **19** | [**Containers, Iterators, and Algorithms**](19.Iterators_Containers_Alg.pdf) ([html](https://federico-busato.github.io/Modern-CPP-Programming/htmls/19.Iterators_Containers_Alg.html)) | Containers, Iterators, Algorithms, Ranges |
| **20** | [**Advanced Topics I**](20.Advanced_Topics_I.pdf) ([html](https://federico-busato.github.io/Modern-CPP-Programming/htmls/20.Advanced_Topics_I.html)) | Move semantics, Universal reference, Type deduction |
| **21** | [**Advanced Topics II**](21.Advanced_Topics_II.pdf) ([html](https://federico-busato.github.io/Modern-CPP-Programming/htmls/21.Advanced_Topics_II.html)) | Error handling, C++ idioms, Smart pointers |
| **22** | [**Performance Optimizations I**](22.Optimization_I.pdf) ([html](https://federico-busato.github.io/Modern-CPP-Programming/htmls/22.Optimization_I.html)) | Ahmdal Law, Performance bounds, Architecture concepts (ILP, SIMD, etc.), Memory hierarchy |
| **23** | [**Performance Optimizations II**](23.Optimization_II.pdf) ([html](https://federico-busato.github.io/Modern-CPP-Programming/htmls/23.Optimization_II.html)) | Arithmetic optimizations, Memory optimizations, etc. |
| **24** | [**Performance Optimizations III**](24.Optimization_III.pdf) ([html](https://federico-busato.github.io/Modern-CPP-Programming/htmls/24.Optimization_III.html)) | Compiler optimizations, Profiling, Benchmarking tools |
| **25** | [**Software Design I**](25.Software_Design_I.pdf) ([html](https://federico-busato.github.io/Modern-CPP-Programming/htmls/25.Software_Design_I.html)) | Basic Concepts, Principles, Use cases |
| **26** | [**Software Design II**](26.Software_Design_II.pdf) ([html](https://federico-busato.github.io/Modern-CPP-Programming/htmls/26.Software_Design_II.html)) | Design Patterns and Idioms |
***ALL-IN-ONE BOOK***: [**modern-cpp.pdf**](modern-cpp.pdf) (could be a few commits behind), [html](https://federico-busato.github.io/Modern-CPP-Programming/htmls/modern-cpp.html)
@ -101,12 +102,12 @@ This *open-access* course is directed at those who are already familiar with C a
* **The C++ Type System**: Type categories, Type properties
* **C++ Fundamental Types Overview**: Arithmetic types, Suffix and prefix, Non-standard arithmetic types, `void` type, `nullptr`
* **Conversion Rules**
* **`auto` declaration**
* **C++ Operators**: Operators precedence, Prefix/Postfix increment/decrement, Assignment, compound, and comma operators, Spaceship operator `<=>` , Safe comparison operators
* **`auto` Keyword**
* **C++ Operators**: Operators precedence, Prefix/Postfix increment/decrement semantic, Assignment, compound, and comma operators, Spaceship operator `<=>` , Safe comparison operators
**[4. Basic Concepts II - Integral and Floating-point Types](04.Basic_Concepts_II.pdf)**
* **Integral Data Types**: Fixed width integers, `size_t` and `ptrdiff_t`, Signed/Unsigned integer characteristics, Promotion, Truncation, Undefined behavior
* **Integral Data Types**: Fixed width integers, `size_t`, `ptrdiff_t`, `uintptr_t`, Arithmetic Operation Semantics, Promotion, Truncation, Undefined behavior, Saturation Arithmentic
* **Floating-point Types and Arithmetic**: IEEE Floating-point standard and other representations, Normal/Denormal values, Infinity, Not a Number (`NaN`), Machine Epsilon, Units at the Last Place (ULP), Cheatsheet, Limits and useful functions, Arithmetic properties, Special values behavior, Undefined behavior, Detect floating-point errors
* **Floating-point Issues**: Catastrophic cancellation, Floating-point comparison
@ -116,25 +117,27 @@ This *open-access* course is directed at those who are already familiar with C a
* **Declaration and Definition**
* **Enumerators**
* **`struct`, Bitfield, `union`**
* **`[[deprecated]]` Attribute**
* **Control Flow**: `if` statement, `for` loop, Range-base `for` loop, `switch`, `goto`, Avoid unused variable warning
* **Control Flow**: `if` statement, `for` and `while` loops, Range-base `for` loop, `switch`, `goto`, Avoid unused variable warning
* **Namespace**: Explicit global namespace, namespace alias, `using`-declaration, `using namespace`-directive, `inline` namespace
* **Attributes**: `[[nodiscard]]`, `[[maybe_unused]]`, `[[deprecated]]`, `[[noreturn]]`
**[6. Basic Concepts IV - Memory Concepts](06.Basic_Concepts_IV.pdf)**
* **Pointers**: Pointer operations, Address-of operator `&`
* **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 memory initialization
* **Pointers and References**: Pointer operations, Address-of operator `&`, Reference
* **Constant and Literals, `const`, `constexpr`, `consteval`, `constinit`**, `if constexpr`, `std::is constant evaluated()`, `if consteval`
* **Initialization**: Variable initialization, Uniform initialization, Array initialization, Structure initialization, Structure Binding, Dynamic memory initialization
* **References**
* **`Const` and Constant Expressions**: Contants and literals, `const`, `constexpr`, `consteval`, `constinit`, `if constexpr`, `std::is constant evaluated()`, `if consteval`
* **`volatile` keyword**
* **Explicit Type Conversion**: `static_cast`, `const_cast`, `reinterpret_cast`, Type punning
* **Explicit Type Conversion**: `static_cast`, `const_cast`, `reinterpret_cast`, Type punning, `std::bit_cast`, Uniform initialization conversion, `gls::narrow_cast`
* **`sizeof` Operator**: overview, `[[no_unique_address]]`
**[7. Basic Concepts V - Functions and Preprocessing](07.Basic_Concepts_V.pdf)**
* **Functions**: Pass by-value, Pass by-pointer, Pass by-reference, Function signature and overloading, Overloading and `=delete`, Default parameters, Attributes `[[attributes]]`
* **Functions**: Pass-by-value, Pass-by-pointer, Pass-by-reference, Function signature and overloading, Overloading and `=delete`, Default parameters
* **Function Pointer and Function Objects**
* **Lambda Expressions**: Capture list, Parameters, Composability, `constexpr/consteval`, `template`, `mutable`, `[[nodiscard]]`, Capture list and classes
* **Preprocessing**: Preprocessors, Common errors, Source location macros, Conditional compiling macros, Stringizing operator (`#`), `#error` and `warning`, `#pragma`, Token-pasting operator (`##`), Variadic macro
* **Lambda Expressions**: Capture list, Lambda expression and function relation, Parameter notes, Composability, Recursion, `constexpr/consteval`, `template`, `mutable`, `[[nodiscard]]`, Capture list and classes
* **Preprocessing**: Preprocessors, Common errors, Source location macros, Conditional compiling macros, Stringizing operator (`#`), `#error` and `#warning`, `#pragma`, Token-pasting operator `##`, Variadic macro
**[8. Object-Oriented Programming I - Class Concepts](08.Object_Oriented_I.pdf)**
@ -149,17 +152,17 @@ This *open-access* course is directed at those who are already familiar with C a
**[9. Object-Oriented Programming II - Polymorphism and Operator Overloading](09.Object_Oriented_II.pdf)**
* **Polymorphism**: `virtual` methods, Virtual table, `override` keyword, `final` keyword, Common errors, Pure virtual method, Abstract class and interface
* **Polymorphism**: C++ mechanisms for 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, 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++ Object Layout**: Aggregate, Trivial class, Standard-layout class, Plain old data (POD), Hierarchy
**[10. Templates and Meta-programming I - Function Templates and Compile-Time Utilities](10.Templates_I.pdf)**
* **Function Template**: Overview, Template parameters,Template instantiation, Template parameter - default value, Overloading, Specialization
* **Function Template**: Overview, Template instantiation, Templat parameters, Template parameter - default value, Overloading, Specialization
* **Template Variable**
* **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
* **Compile-Time Utilities**: `static_assert`, `using` keyword, `decltype` keyword
* **Type Traits**: Overview, Type traits library, Type manipulation
**[11. Templates and Meta-programming II - Class Templates and SFINAE](11.Templates_II.pdf)**
@ -171,11 +174,12 @@ This *open-access* course is directed at those who are already familiar with C a
* **SFINAE: Substitution Failure Is Not An Error**: Function SFINAE, Class SFINAE
* **Variadic Template**: Folding expression, Variadic class template
* **C++20 Concepts**: Overview, `concept` keyword, `requires` clause, `requires` expression, `requires` expression + clause, `requires` clause + expression, `requires` and `constexpr`, Nested `requires`
* **Template Debugging**
**[12. Translation Units I - Linkage and One Definition Rule](12.Translation_Units_I.pdf)**
* **Basic Concepts**: Translation unit, Local and global scope, Linkage
* **Storage Class and Duration**: Storage duration, Storage class, `static` and `extern` keywords, Internal/External linkage examples
* **Storage Class and Duration**: Storage duration, Storage class, `static` keyword, Anonymous namespace, `extern` keywords
* **Linkage of `const` and `constexpr`**: Static initialization order fiasco
* **Linkage Summary**
* **Dealing with Multiple Translation Units**: Class in multiple translation units
@ -188,131 +192,138 @@ This *open-access* course is directed at those who are already familiar with C a
- **`#include` Issues**: Include guard, Forward declaration, Circular dependencies, Common linking errors
- **C++20 Modules**: Overview, Terminology, Visibility and reachability, Module unit types, Keywords, Global module fragment, Private module fragment, Header module unit, Module partitions
- **Namespace**: Namespace functions vs. `static` methods, Namespace alias, Anonymous namespace, `inline` namespace, Attributes and namespace
- **Compiling Multiple Translation Units**: Fundamental compiler flags, Compile Methods, Deal with libraries, Build static/dynamic libraries, Find dynamic library dependencies, Analyze object/executable symbols
- **Compiling Multiple Translation Units**: Fundamental compiler flags, Compile Methods
- **Libraries in C++**: Static library, Build static libraries, Using static libraries, Dynamic library, Build dynamic libraries, Using dynamic libraries, Application binary interface (ABI), Demangling, Find Dynamic library dependencies, Analyze object/executable symbols
**[14. Code Conventions](14.Code_Convention.pdf)**
**[14. Code Conventions I](14.Code_Convention_I.pdf)**
* **C++ Project Organization**: Project directories, Project files, "Common" project organization notes, Alternative - “Canonical” project organization
* **Coding Styles and Conventions**
* **`#include`**
* **Macro and Preprocessing**
* **Namespace**
* **Variables and Arithmetic Types**
* **Functions**
* **Structs and Classes**
* **Control Flow**
* **Modern C++ Features**
* **Maintainability**
* **Naming**
* **Readability and Formatting**
* **Code Documentation**
* **Coding Styles and Conventions**: Overview, Popular coding styles
* **Header Files and `#include`**: `#include` guard, `#include` syntax, order of `#include`, Common header/source filename conventions
* **Preprocessing**: Macro, Preprocessing statements
* **Variables**: `static` global variables, conversions
* **Enumerators**
* **Arithmetic Types**: Signed vs. unsigned integral types, integral types conversion, Integral types: size and other issues, Floating-point types
* **Functions**: Function parameters, Function arguments, function return values, Function specifiers, lambda expressions
* **Structs and Classes**: `struct` vs `class`, Initialization, Braced initializer lists, Special member functions, `=default`, `=delete`, Other issues, Inheritance, Style
**[15. Debugging and Testing](15.Debugging.pdf)**
**[15. Code Conventions II](15.Code_Convention_II.pdf)**
* **Debugging**
* **Assertion**
* **Execution debugging**: Breakpoints, Watchpoints / Catchpoints, Control flow, Stack and Info, Print, Disassemble
- **`auto`**
- **Templates and Type Deduction**
- **Control Flow**: Redundant control flow , `if/else`, Comparison, `switch`, `for/while`
- **Namespace**: `using namespace` directive, Anoymous/unnamed namespace, Namespace and class design, Style
- **Modern C++ Features**: Keywords, Features, Class, Library
- **Maintainability**: Code comprehension, Functions, Template and Debuction, Library
- Portability
- **Naming**: Entities, Variables, Functions, Style conventions, Enforcing naming styles
- **Readability and Formatting**: Horizontal spacing, Pointers/References, Vertical spacing, Braces, Type decorators, Reduce code verbosity, Other issues
- **Code Documentation**: Function documentation, Comment syntax, File documentation
**[16. Debugging and Testing](16.Debugging.pdf)**
* **Debugging Overview**
* **Assertions**
* **Execution debugging**: Breakpoints, Watchpoints / Catchpoints, Control flow, Stack and info, Print, Disassemble, `std::breakpoint`
* **Memory Debugging**: `valgrind`
* **Hardening Techniques**: Stack usage, Standard library checks, Undefined behavior protections, Control flow protections
* **Sanitizers**: Address sanitizer, Leak sanitizer, Memory sanitizers, Undefined behavior sanitizer
* **Sanitizers**: Address sanitizer, Leak sanitizer, Memory sanitizers, Undefined behavior sanitizer, Sampling-baed sanitizer
* **Debugging Summary**
* **Compiler Warnings**
* **Static Analysis**
* **Code Testing**: Unit test, Test-Driven Development (TDD), Code coverage, Fuzz testing
* **Code Testing**: Unit testing, Test-Driven Development (TDD), Code coverage, Fuzz testing
* **Code Quality**: `clang-tidy`
**[16. Ecosystem - Cmake and Other Tools](16.Ecosystem.pdf)**
**[17. Ecosystem - Cmake and Other Tools](17.Ecosystem.pdf)**
- **CMake**: `cmake` and `ctest`
- **Code Documentation**: `doxygen`
- **Code Statistics**: Count lines of code, Cyclomatic complexity analyzer
- **Other Tools**: Code formatting - `clang-format`, `Compiler Explorer`, Code transformation - `CppInsights`, Code autocompletion - `GitHub Co-Pilot/TabNine/Kite`, Local code search - `ugrep`, `ripgrep`, `hypergrep`, Code search engine - `searchcode/grep.app`, Code benchmarking - `Quick-Bench`, Font for coding
- **Other Tools**: Code formatting - `clang-format`, `Compiler Explorer`, Code transformation - `CppInsights`, AI-powered code completion -Local code search - `ugrep`, `ripgrep`, `hypergrep`, Code search engine - `searchcode/grep.app`, Code benchmarking - `Quick-Bench`, Font for coding
**[17. Utilities](17.Utilities.pdf)**
**[18. Utilities](18.Utilities.pdf)**
* **I/O Stream**: Manipulator, `ofstream/ifstream`
* **Strings**: `std::string`, Conversion from/to numeric values, `std::string_view`, `std::format`, `std::print`
* **View**: `std::span`
* **Math Libraries**
* **Random Number**: Basic concepts, C++ `<random>`, Seed, PRNG period and quality, Distribution, Quasi-random
* **Random Number**: Basic concepts, C++ `<random>`, Seed, PRNG period and quality, Distribution, Recent algorithms and Performance, Quasi-random
* **Time Measuring**: Wall-Clock time, User time, System time
* **Std Class Templates**: `std::pair`, `std::tuple`, `std::variant`, `std::optional`, `std::any`, `std::stacktrace`
* **Filesystem Library**: Query methods, Modify methods
**[18. Containers, Iterators, and Algorithms](18.Iterators_Containers_Alg.pdf)**
**[19. Containers, Iterators, and Algorithms](19.Iterators_Containers_Alg.pdf)**
* **Containers and Iterators**
* **Sequence Containers**: `std::array`, `std::vector`, `std::list`, `std::deque`, `std::forward_list`
* **Sequence Containers**: `std::array`, `std::vector`, `std::deque`, `std::list`, `std::forward_list`
* **Associative Containers**: `std::set`, `std::map`, `std::multiset`
* **Container Adaptors**: `std::stack`, `std::queue`, `std::priority_queue`
* **View**: `std::span`
* **Implement a Custom Iterator**: Semantic, Implement a simple Iterator
* **Implement a Custom Iterator**: Implement a simple Iterator
* **Iterator Notes**:
* **Iterator Utility Methods**: `std::advance`, `std::next`, `std::prev`, `std::distance`, Container access methods, Iterator traits
* **Algorithms Library**: `std::find_if`, `std::sort`, `std::accumulate`, `std::generate`, `std::remove_if`
* **C++20 Ranges**: Key concepts, Range view, Range adaptor, Range factory, Range algorithms, Range actions
**[19. Advanced Topics I](19.Advanced_Topics_I.pdf)**
**[20. Advanced Topics I](20.Advanced_Topics_I.pdf)**
* **Move Semantic**: `lvalues` and `rvalues` references, Move semantic, `std::move`, Class declaration semantic
* **Universal Reference and Perfect Forwarding**: Universal reference, Reference collapsing rules, Perfect forwarding
* **Value Categories**
* **`&`, `&&` Ref-qualifiers and `volatile` Overloading**
* **Copy Elision and RVO**
* **Type Deduction**: Pass by-reference, Pass by-pointer, Pass by-value, `auto` deduction, `auto(x)`: Decay-copy
* **Type Deduction**: Pass by-reference, Pass-by-pointer, Pass-by-value, `auto` deduction, `auto(x)`: Decay-copy
* **`const` Correctness**
**[20. Advanced Topics II](20.Advanced_Topics_II.pdf)**
**[21. Advanced Topics II](21.Advanced_Topics_II.pdf)**
- **Undefined Behavior:** Illegal behavior, Platform specific behavior, unspecified behavior, Detecting undefined behavior
- **Error Handling**: Recoverable error handing, Return code, C++ Exceptions, Defining custom exceptions, `noexcept` keyword, Memory allocation issues, Return code and exception summary, `std::expected`, Alternative error handling approaches
- **Smart pointers**: `std::unique_ptr`, `std::shared_ptr`, `std::weak_ptr`
- **Concurrency**: Thread methods, Mutex, Atomic, Task-based parallelism
**[21. Optimization I - Basic Concepts](21.Optimization_I.pdf)**
**[22. Optimization I - Basic Concepts](22.Optimization_I.pdf)**
* **Introduction**: Moore's Law, Moore's Law limitations, Reasons for optimizing
* **Basic Concepts**: Asymptotic complexity, Time-Memory trade-off, Developing cycle, Ahmdal's law, Throughput, Bandwidth, Latency, Performance bounds, Arithmetic intensity
* **Basic Architecture Concepts**: Instruction throughput, In-Order, and Out-of-Order Execution, Instruction pipelining, Instruction-level parallelism (ILP), Littles law, Data-level parallelism (DLP) and SIMD, Thread-level parallelism (TLP), Single Instruction Multiple Threads (SIMT), RISC, CISC instruction sets
* **Basic Architecture Concepts**: Instruction throughput (IPC), In-Order, and Out-of-Order Execution, Instruction pipelining, Instruction-level parallelism (ILP), Littles law, Data-level parallelism (DLP) and vector instructions (SIMD), Thread-level parallelism (TLP), Single Instruction Multiple Threads (SIMT), RISC, CISC instruction sets
* **Memory Hierarchy**: Memory hierarchy concepts, Memory locality, Core-to-core latency and thread affinity, Memory ordering model
**[22. Optimization II - Code Optimization](22.Optimization_II.pdf)**
**[23. Optimization II - Code Optimization](23.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 Prefetch
* **Arithmetic Types**: Data types, Arithmetic operations, Conversion, Floating-point, Compiler intrinsic functions, Value in a range, Lookup table
* **Control Flow**: Branch Hints - `[[likely]]` / `[[unlikely]]`, Signed/Unsigned integers, Loops, Loop hoisting, Loop unrolling, Assertions, Compiler hints `[[assume]]`, Recursion
* **Control Flow**: Branhes, Branch Hints - `[[likely]]` / `[[unlikely]]`, Signed/Unsigned integers, Loops, Loop hoisting, Loop unrolling, Assertions, Compiler hints `[[assume]]/std::unreacheable()`, Recursion
* **Functions**: Function call cost, Argument passing, Function inlining, Function attributes, Pointers aliasing
* **Object-Oriented Programming**
* **Std Library and Other Language Aspects**
**[23. Optimization III - Non-Coding Optimizations and Benchmarking](23.Optimization_III.pdf)**
**[24. Optimization III - Non-Coding Optimizations and Benchmarking](24.Optimization_III.pdf)**
* **Compiler Optimizations**: About the compiler, Compiler optimization flags, Floating-point optimization flags, Linker optimization flags, Architecture flags, Help the compiler to produce better code, Profile guided optimization (PGO), Post-processing binary optimizer
* **Compiler Optimizations**: About the compiler, Compiler optimization flags, Floating-point optimization flags, Linker optimization flags, Architecture flags, Help the compiler to produce better code, Profile guided optimization (PGO), Post-processing binary optimizer, Polyhedral optimizations
* **Compiler Transformation Techniques**: Basic transformations, Loop unswitching, Loop fusion, Loop fission, Loop interchange, Loop tiling
* **Libraries and Data Structures**: External libraries
* **Libraries and Data Structures**
* **Performance Benchmarking**: What to test?, Workload/Dataset quality, Cache behavior, Stable CPU performance, Multi-threads considerations, Program memory layout, Measurement overhead, Compiler optimizations, Metric evaluation
* **Profiling**: `gprof`, `uftrace`, `callgrind`, `cachegrind`, `perf` Linux profiler
* **Parallel Computing**: Concurrency vs. parallelism, Performance scaling, Gustafson's Law, Parallel programming languages
**[24. Software Design I - Basic Concepts (DRAFT)](24.Software_Design_I.pdf)**
**[25. Software Design I - Basic Concepts (DRAFT)](25.Software_Design_I.pdf)**
- **Books and References**
- **Basic Concepts**: Abstraction, interface, and module, Class Invariant
- **Software Design Principles**: Separation of concern, Low coupling, high cohesion, Encapsulation and information hiding, Design by contract, Problem decomposition, Code reuse
- **Software Complexity**: Software entropy, Technical debt
- **The SOLID Design Principles**
- **Member Functions vs. Free Functions**
- **Class Design**: The class interface principle, Member functions vs. free functions, namespace functions vs. class static methods
- **BLAS GEMM Case Study**
- **Owning Objects and Views**
- **Value vs. Reference Semantic**
- **Global Variables**
**[25. Software Design II - Design Patterns and Idioms (DRAFT)](25.Software_Design_II.pdf)**
**[26. Software Design II - Design Patterns and Idioms (DRAFT)](26.Software_Design_II.pdf)**
- **C++ Idioms**: Rule of Zero, Rule of Three, Rule of Five
- **Design Pattern**: Singleton, PIMPL, Curiously Recurring Template Pattern (CRTP), Template virtual functions
- **Design Pattern**: Singleton, Pointer to implementation (PIMPL), Curiously Recurring Template Pattern (CRTP), Template virtual functions
### Roadmap

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.