-
ITERATION REVISITED
ITERATION BASICS
int arr[] = {1, 2, 3, 4, 5};
size_t sz = 5;
for (size_t i = 0; i < sz; i�++) {
do_something(arr[i]);
}
2ITERATION REVISITED
ITERATION BASICS
for (size_t do_something(arr[i]);
}
3ITERATION REVISITED
ITERATION BASICS
for (int* p = arr; p �!= arr + sz; �++p) {
do_something(*p);
}
4ITERATION REVISITED
ITERATION BASICS
for (int* p = std�::begin(arr); do_something(*p);
}
5ITERATION REVISITED
ITERATION BASICS
for (auto iter = std�::begin(arr);
iter �!= std�::end(arr);
�++iter) {
do_something(*iter);
}
6ITERATION REVISITED
STL ITERATORS
▸
0 码力 |
56 页 |
5.27 MB
| 5 月前 3
-
2023 Victor Ciura | @ciura_victor - Regular, Revisited
X
Abstract
“Regular” is not exactly a new concept. If we reflect back on STL and its design principles, as
best described by Alexander with examples, common pitfalls and guidance.2023 Victor Ciura | @ciura_victor - Regular, Revisited
X
About me
Advanced Installer
Clang Power Tools
Visual C++
@ciura_victor
🐘 @ciura_victor@hachyderm Principal Engineer
Visual C++
🐘 @ciura_victor@hachyderm.io
Regular, Revisited2023 Victor Ciura | @ciura_victor - Regular, Revisited
8
Classified
The classes we write:
RAII
Utility
Callable
0 码力 |
180 页 |
19.96 MB
| 5 月前 3
-
• Reclaim matching objects
• Why lock? Concurrent cohort destructors.
Asynchronous Reclamation Revisited
Hazard Pointer Synchronous Reclamation Beyond Concurrency TS2 – Maged Michael
•
Pop all objects •
Push matched objects back into domain cohort object list and unlock list.
LockedHeadOnlyList (revisited):
• Reentrant lock:
• Why? Asynchronous reclamation of objects that lead to destruction
of a cohorts Hazard Pointer Synchronous Reclamation Beyond Concurrency TS2 – Maged Michael
Cohort Structures Revisited
Hazard Pointer Synchronous Reclamation Beyond Concurrency TS2 – Maged Michael
class hazard_pointer_cohort
0 码力 |
31 页 |
856.38 KB
| 5 月前 3
-
always_t */) {
11: return r;
12: } else {
13: return and_t{l, r};
14: }
15: }
76Simplify, revisited (and)
This is what it looks like now.
1: template
2: constexpr auto simplify(and_trevisited (or)
The overload for or_t is the dual of that for and_t.
1: template
0 码力 |
103 页 |
4.37 MB
| 5 月前 3
-
globals can be added - and will be initialized properly 46 The initial HCR example revisited The initial HCR example revisited # main.nim import hotcodereloading # for reload import other while true:
0 码力 |
63 页 |
2.91 MB
| 1 年前 3
-
Verification Condition Generator . . . . . . . . . . . . . . . . . . . . . 151 9.8 Second Program Revisited: Adding Two Numbers . . . . . . . . . . . . 153 9.9 Hoare Triples for Total Correctness . . . . then ‘‘partial_hoare.while_inv_intro else ‘‘partial_hoare.while_inv_intro’); 9.8. Second Program Revisited: Adding Two Numbers 153 vcg | _ := tactic.fail (to_fmt "cannot analyze " + + to_fmt S) end emerging subgoals (via the tactic combinator ;) for the compound statements. 9.8 Second Program Revisited: Adding Two Numbers Using the verification condition generator, we can revisit the correctness
0 码力 |
215 页 |
1.95 MB
| 1 年前 3
-
Code Can Help You Develop More Efficiently in C++ – Alexandra
Kemper & Sinem Akinci
• Regular, Revisited – Victor Ciura
Friday 6th
• Getting Started with C++ – Michael PriceMicrosoft C++
Questions?
0 码力 |
31 页 |
2.76 MB
| 5 月前 3
-
�����T���������������I��� � +�Dong Chen, Xudong Cao, Liwei Wang, Fang Wen, Jian Sun. Bayesian face revisited: a joint formulation. 2012, european conference on computer vision. MSRA “Feature Master” �� ��3����
0 码力 |
81 页 |
12.64 MB
| 1 年前 3
-
This is child body!