Balancing Efficiency and Flexibility: Cost of Abstractions in Embedded Systems
GPIO_MODE_INPUT; GPIO_Init(&conf) ; while (1) { } }Building Layers of Abstractions 8C code Building Layers of Abstractions 9 temp = OSPEEDR; temp &= ~(OSPEEDR_MASK << (conf->pin * 2u)); temp |= 49Static Polymorphism Compiles to the same binary. 50Architecture Matters 51Building Layers of Abstractions 52 C++ Wrapper C codeArchitecture Matters 53 0 1 0 1 1 1 0 0 Output Data Register x x template parameter74 Conclusions Zero-cost abstractions Encapsulation Inheritance Dynamic Polymorphism Static Polymorphism Negative-cost abstractions More C++ for the embedded world! Architecture0 码力 | 75 页 | 2.12 MB | 5 月前3C++ zero-cost abstractions на примере хеш-таблиц в ClickHouse
Максим Кита Старший разработчик ClickHouse C++ zero-cost abstractions на примере хеш-таблиц в ClickHouse Введение в хеш-таблицы Содержание 01 Основные вопросы дизайна 02 Бенчмарки 03 C++ дизайн0 码力 | 49 页 | 2.73 MB | 1 年前3ivan cukic cppcon 2021
ALTERNATE UNIVERSE INTRODUCTION DATA FUNCTIONS AND DATA ABSTRACTIONS FUNCTIONS Ivan Čukić KDAB CppCon 2021 INTRODUCTION DATA FUNCTIONS AND DATA ABSTRACTIONS FUNCTIONS ABOUT ME KDAB senior software engineer Software INTRODUCTION DATA FUNCTIONS AND DATA ABSTRACTIONS FUNCTIONS COMPOSITION Doug McIlroy and Dennis Ritchie Ivan Čukić KDAB CppCon 2021 INTRODUCTION DATA FUNCTIONS AND DATA ABSTRACTIONS FUNCTIONS COMPOSITION tr -cs uniq -c | sort -rn | sed ${1}q Ivan Čukić KDAB CppCon 2021 INTRODUCTION DATA FUNCTIONS AND DATA ABSTRACTIONS FUNCTIONS Doug McIlroy, Bell System Technical Journal, 1978: Make each program do one thing well0 码力 | 77 页 | 3.33 MB | 5 月前3The Absurdity of Error Handling
every time? Language safety is nice, but …© 2023 Codeplay Software Ltd. Definition of Safety — Abstractions 10 Hardware: Easy to use incorrectly; hard to use correctly Assembly language is difficult detail© 2023 Codeplay Software Ltd. Definition of Safety — Abstractions 11 Abstractions separate humans from hardware complexity Abstractions create abstract machines that are easier to reason about Definition of Safety — Abstractions 12© 2023 Codeplay Software Ltd. Definition of Safety — Abstractions 13 Abstractions = language features & guarantees I work hard to design abstractions© 2023 Codeplay0 码力 | 43 页 | 1.39 MB | 5 月前3Agda User Manual v2.5.2
where block of an abstract definition are abstract as well. This means, they can see through the abstractions of their uncles: module Where where abstract x : Nat x = 0 y : Nat y = x where (x y : A): (A : Set) (n : Nat)(u v : Vec A n) → Vec A n Functions are constructed by lambda abstractions, which can be either typed or untyped. For instance, both expressions below have type (A : Set) y → C x → C y y4 {x} {y} = subst C {_} {_} y5 = subst C It is also possible to write lambda abstractions with implicit arguments. For example, given id : (A : Set) → A → A, we can define the identity0 码力 | 151 页 | 152.49 KB | 1 年前3Agda User Manual v2.5.2
where block of an abstract definition are abstract as well. This means, they can see through the abstractions of their uncles: module Where where abstract x : Nat x = 0 y : Nat y = x where xy : x 0 xy 3. Language Reference Agda Documentation, Release 2.5.2 Functions are constructed by lambda abstractions, which can be either typed or untyped. For instance, both expressions below have type (A : Set) y → C x → C y y4 {x} {y} = subst C {_} {_} y5 = subst C It is also possible to write lambda abstractions with implicit arguments. For example, given id : (A : Set) → A → A, we can define the identity0 码力 | 107 页 | 510.49 KB | 1 年前3Agda User Manual v2.5.3
where block of an abstract definition are abstract as well. This means, they can see through the abstractions of their uncles: module Where where abstract x : Nat x = 0 y : Nat y = x where xy : x 0 xy (x y : A): (A : Set) (n : Nat)(u v : Vec A n) → Vec A n Functions are constructed by lambda abstractions, which can be either typed or untyped. For instance, both expressions below have type (A : Set) y → C x → C y y4 {x} {y} = subst C {_} {_} y5 = subst C It is also possible to write lambda abstractions with implicit arguments. For example, given id : (A : Set) → A → A, we can define the identity0 码力 | 135 页 | 600.40 KB | 1 年前3Agda User Manual v2.5.3
where block of an abstract definition are abstract as well. This means, they can see through the abstractions of their uncles: module Where where abstract x : Nat x = 0 y : Nat y = x where (x y : A): (A : Set) (n : Nat)(u v : Vec A n) → Vec A n Functions are constructed by lambda abstractions, which can be either typed or untyped. For instance, both expressions below have type (A : Set) y → C x → C y y4 {x} {y} = subst C {_} {_} y5 = subst C It is also possible to write lambda abstractions with implicit arguments. For example, given id : (A : Set) → A → A, we can define the identity0 码力 | 185 页 | 185.00 KB | 1 年前3Agda User Manual v2.5.4.2
where block of an abstract definition are abstract as well. This means, they can see through the abstractions of their uncles: module Where where abstract x : Nat x = 0 y : Nat y = x where (x y : A): (A : Set) (n : Nat)(u v : Vec A n) → Vec A n Functions are constructed by lambda abstractions, which can be either typed or untyped. For instance, both expressions below have type (A : Set) y → C x → C y y4 {x} {y} = subst C {_} {_} y5 = subst C It is also possible to write lambda abstractions with implicit arguments. For example, given id : (A : Set) → A → A, we can define the identity0 码力 | 216 页 | 207.61 KB | 1 年前3Agda User Manual v2.5.4
where block of an abstract definition are abstract as well. This means, they can see through the abstractions of their uncles: module Where where abstract x : Nat x = 0 y : Nat y = x where xy : x 0 xy (x y : A): (A : Set) (n : Nat)(u v : Vec A n) → Vec A n Functions are constructed by lambda abstractions, which can be either typed or untyped. For instance, both expressions below have type (A : Set) y → C x → C y y4 {x} {y} = subst C {_} {_} y5 = subst C It is also possible to write lambda abstractions with implicit arguments. For example, given id : (A : Set) → A → A, we can define the identity0 码力 | 155 页 | 668.67 KB | 1 年前3
共 646 条
- 1
- 2
- 3
- 4
- 5
- 6
- 65