Tracy: A Profiler You Don't Want to Misscapabilities (sampling and/or instrumentation) (CPU and GPU instrumentation) Tracing capabilities (values, messages, plots, allocations, …) Hassle-free integration (single source* file, and header*) Free WASM*) Hybrid profiling capabilities (sampling and/or instrumentation) Tracing capabilities (values, messages, plots, allocations, …) Free and Open source Kudos to Bartosz Taudul creator and maintainer WASM*) Hybrid profiling capabilities (sampling and/or instrumentation) Tracing capabilities (values, messages, plots, allocations, …) Free and Open source Kudos to David Farrell . for demonstrating0 码力 | 84 页 | 8.70 MB | 6 月前3
Tracy: A Profiler You Don't Want to Misscapabilities (sampling and/or instrumentation) (CPU and GPU instrumentation) Tracing capabilities (values, messages, plots, allocations, …) Hassle-free integration (single source* file, and header*) Free WASM*) Hybrid profiling capabilities (sampling and/or instrumentation) Tracing capabilities (values, messages, plots, allocations, …) Free and Open source Kudos to Bartosz Taudul creator and maintainer WASM*) Hybrid profiling capabilities (sampling and/or instrumentation) Tracing capabilities (values, messages, plots, allocations, …) Free and Open source Kudos to David Farrell . for demonstrating0 码力 | 85 页 | 6.51 MB | 6 月前3
Cooperative C++ Evolutionwhen using existing types from Cpp2 Guaranteed initialization-before use with program-meaningful values And: contracts (pre, post, assert), default const, default nodiscard, default new is make_unique “Zero-overhead” backward compatibility Declarative parameter passing, multiple/named return values Unified safe conversions (is, as) and pattern matching (inspect) Unified function call: x.f(y) enumerators are scoped, no implicit conversion .29 C: Special enum language type C++11: extended enum and added enum class Can specify underlying type, enumerators are scoped, no implicit conversion0 码力 | 85 页 | 5.73 MB | 6 月前3
C++ Exceptions for Smaller Firmware0.error()); } { auto scoped_result = instance_0.value().trigger(); if (!scoped_result) { return std::unexpected(scoped_result.error()); } } { auto scoped_result = instance_0.value() if (!scoped_result) { return std::unexpected(scoped_result.error()); } } { auto scoped_result = instance_0.value().trigger(); if (!scoped_result) { return std::unexpected(scoped_result Registers & Calling Convention Registers Info R0 Scratch Registers: Used to pass parameters & return values Additional parameters will be passed on the stack if the inputs exceed what can be passed in the0 码力 | 237 页 | 6.74 MB | 6 月前3
Continuous Regression Testing for Safer and Faster RefactoringRequires describing the expected behavior for each test input. Mismatches against the expected values indicate failure. Tests are dif�cult to maintain, scale, and automate. Testing for Regression tests that are cheap to write, fast to run, and easy to modify. Flexible Designed for capturing values of variables and runtime of functions. Should handle data points with primitive or user-de�ned data Innovation Writing tests Test your complex software work�ows for any number of inputs by capturing values of variables and runtime of functions.33 Aurora Innovation Running tests Run your tests for each0 码力 | 85 页 | 11.66 MB | 6 月前3
C++20: An (Almost) Complete Overviewrange: lazily evaluated, non-owning, non- mutating Range factories: construct views to produce values on demand E.g. sequence of integers Pipelining: Views can be chained using pipes |13 Ranges loops (C++20): struct Foo { std::vectorvalues; }; Foo GetData() { return Foo(); } int main() { for (auto data { GetData() }; auto& value : data.values) { // Use 'data' } }56 Non-Type Template … Standard Library feature test macros __cpp_lib_concepts __cpp_lib_ranges __cpp_lib_scoped_lock …69 Feature Testing Macros Example: #if __has_include( ) #include 0 码力 | 85 页 | 512.18 KB | 6 月前3
Back to Basics: Pointersalso points to michael will be updated! ○ Nice-- 1 write/update (in a sense) results in 3 updated values! Pointers and sharing data (5/6)58 ● Pointers and sharing data (6/6)Pointers and sharing data (1/3) ● Again, pass-by-pointer is equivalent to pass-by-value, except you are able to mutate values through the address a pointer stores ○ (Teacher note: I like giving this a different name so it’s happens when we create an array of data? Then of course, we want to initialize our memory with some values--for now, ‘i’ is fine. 0 1 2 3 4 5Visualizing Arrays (4/8) 80 ● So if I create a short* p_s, based0 码力 | 152 页 | 5.61 MB | 6 月前3
simd: How to Express Inherent Parallelism Efficiently Via Data-Parallel TypesImage Processing Programming Models Outlook Summary Data-Parallel Types One variable stores WT values. One operator signifies WT operations (element-wise). W for “width”; depends on type T int x = data-parallelism We failed to express the “interesting” parallelism. Instead we expressed only 4 independent values and had to reduce to a scalar after a single SIMD op. Matthias Kretz CppCon ’23 27 GSI Helmholtz (abstract) example consider a function where 16 different values have to be processed in the same way • the developer notices each of the values can be processed independently of the other 15 • in other0 码力 | 160 页 | 8.82 MB | 6 月前3
Concurrencystd::for_each(std::execution::par, v.begin(), v.end(), [&sum, &mtx](std::int64_t x){ std::scoped_lock lock(mtx); sum += x; }); Loops to algorithms https://godbolt.org/z/on4KoejqxCppCon std::for_each(std::execution::par, v.begin(), v.end(), [&sum, &mtx](std::int64_t x){ std::scoped_lock lock(mtx); sum += x; }); Loops to algorithms Abysmal performance! Don’t do that the mutex is always releasedCppCon 2023 90 David Olsen - Back to Basics: Concurrency STD::SCOPED_LOCK Constructor takes one or more mutexes Calls lock() on each of the mutexes Destructor calls0 码力 | 160 页 | 2.91 MB | 6 月前3
Concurrency Patterns IDealing with Sharing ▪ Copied Value ▪ Thread-Specific Storage ▪ Future Dealing with Mutation ▪ Scoped Locking ▪ Strategized Locking ▪ Thread-Safe Interface ▪ Guarded Suspension Concurrent Architecture Dealing with Sharing ▪ Copied Value ▪ Thread-Specific Storage ▪ Future Dealing with Mutation ▪ Scoped Locking ▪ Strategized Locking ▪ Thread-Safe Interface ▪ Guarded Suspension Concurrent Architecture with Mutation ▪ Scoped Locking ▪ Strategized Locking ▪ Thread-Safe Interface ▪ Guarded Suspension Concurrent Architecture Active Object Monitor Object ReactorScoped Locking Scoped Locking is RAII0 码力 | 39 页 | 1.14 MB | 6 月前3
共 232 条
- 1
- 2
- 3
- 4
- 5
- 6
- 24













