Making Libraries Consumable for Non-C++ Developersin-process interoperability.Run down of some approaches Just be like C? – post-1972 Common Object Model (COM) – 1993 Foreign function interface (libffi) – 1996 Simplified Wrapper and Interface Generator failure to open, returns SIZE_MAX. */ size_t open_device(char const* dev); size_t open_device(std::wstring_view const dev); The types char and wchar_t do not indicate encoding. The size of wchar_t: • Windows are being made? void get_size(size_t dev, long* size); Non-C/C++ language. Caller of get_size(). C/C++ binary. Provides get_size(). gcc and clang, sizeof(long) == sizeof(size_t) MSVC, sizeof(long) ==0 码力 | 29 页 | 1.21 MB | 6 月前3
Working with Asynchrony Generically: A Tour of C++ Executors→ sender … packages all possible results of input sender into a variant of tuples. bulk(sender, size, fn) → sender … launches a bulk operation. split(sender) → sender … permits multiple receivers to keyboard events and plays Model M clicky sounds.83 MODEL M SIMULATOR: STRATEGY 1. Model a key click as a sender 2. Model keyboard input as a range of senders 3. Model interrupt (e.g., Ctrl-C) as into clicky noises until interrupt sender completes. 5. ??? 6. Profit!84 Step 1: Model key click as a sender85 MODEL KEYCLICK AS SENDER: STRATEGY 1. Assume system API for registering keyboard callback0 码力 | 121 页 | 7.73 MB | 6 月前3
唐刚 - Use Rust to Develop the Decentralized Open Data Application - RustChinaConf2023financial computation/storage model to general cases • Limites of On-chain VM computation • Limites of MPT • Limites of K-V db Problems of Web3: Technical Viewpoint Financial Model: Account=>Balance ➔ Relatively Relatively closed dataset, linear increasement against account set ➔ One dimension Internet Model: Any ➔ Open dataset, data will increase quickly on any dimension. ➔ Multiple dimensions Dataset Models platform, but open its data to everyone. ➔ Why we need open data? The business of the closed data model has been at the end. A New Proposal: Open Data Application The Road to Open Web ➔ From the user0 码力 | 30 页 | 2.53 MB | 1 年前3
新一代分布式高性能图数据库的构建 - 沈游人tools • Lots of amazing libraries Rust 编译通过了 bug 比 cpp 少上 百倍 !!! 图模型—— Labeled Property Graph Model Arbitrary (key,value) pairs where key identifies a property and value is the corresponding value Optimization rules: MATCH -> pushdown Planning Strategies Graph Execution Code Gen JIT Cost model Storage backend ( Property Graph KV store ) Pushdown filter Cypher (a)-[:LIKES]->(b) 计算下推:面向图应用特征设计0 码力 | 38 页 | 24.68 MB | 1 年前3
Coaching Agile Teamsoutcomes • Take it to the team • Be a mirror • Master your words & face • Let there be silence • Model being outrageous • Let the team fail • Be their biggest fan Lyssa Adkins Self-Assess FirstSelf0 码力 | 15 页 | 608.54 KB | 6 月前3
RustBelt - Rust 的形式化语义模型type “τ”; ∗¿full ⟦? ⟧ (∃?.ℓ↦ ?∗⟦ ? ⟧ .???(?)) ℓ ↦∗ ⟦τ ⟧.own ℓ ↦∗ ⟦τ ⟧.own Rc(simplified model, without weak references) Examples It owns a location value “ℓ”; : partially owned (.i.e. can alias) 0 码力 | 21 页 | 2.63 MB | 1 年前3
THE FIRST EXPLORATION OF PROJECT SPARROWBackground HW SW I. Background https://www.raspberrypi.com/products/raspberry-pi-3-model-b-plus/ HW SW RPi3 B+ (1G LPDDR2) 1) CantripOS(KataOS) 1.1 Getting started0 码力 | 68 页 | 13.14 MB | 1 年前3
C++高性能并行编程与优化 - 课件 - 15 C++ 系列课:字符与字符串• string(“hello”) + string(“world”) == string(“helloworld”) • string 符合 vector 的接口,例如 begin/end/size/resize…… • string 有一系列成员函数,例如 find/replace/substr…… • string 可以通过 s.c_str() 重新转换回古板的 const char C++ 字符串和 C 字符串的不同 • C 语言字符串是单独一个 char *ptr ,自动以 ‘ \0’ 结尾。 • C++ 字符串是 string 类,其成员有两个: char *ptr; size_t len; • 第二个成员用来确定结尾的位置,不需要 ‘ \0’ 结尾。 • 因此 string 类从 C 字符串构造时,可以额外指定一个长度: • string(“hello”, 3) 会得到 会自动识别参数的类型,帮你调用相应的格式化函数。 c_str 和 data 的区别 • s.c_str() 保证返回的是以 0 结尾的字符串首地址指针,总长度为 s.size() + 1 。 • s.data() 只保证返回长度为 s.size() 的连续内存的首地址指针,不保证 0 结 尾。 • 把 C++ 的 string 作为参数传入像 printf 这种 C 语言函数时,需要用 s.c_str()0 码力 | 162 页 | 40.20 MB | 1 年前3
C++23: An Overview of Almost All New and Updated Featuresconsteval Multidimensional Subscript Operator Attributes on Lambda-Expressions Literal Suffix for size_t auto(x): decay-copy in The Language #elifdef, #elifndef, and #warning Marking Unreachable consteval Multidimensional Subscript Operator Attributes on Lambda-Expressions Literal Suffix for size_t auto(x): decay-copy in The Language #elifdef, #elifndef, and #warning Marking Unreachable consteval Multidimensional Subscript Operator Attributes on Lambda-Expressions Literal Suffix for size_t auto(x): decay-copy in The Language #elifdef, #elifndef, and #warning Marking Unreachable0 码力 | 105 页 | 759.96 KB | 6 月前3
C++高性能并行编程与优化 - 课件 - 13 C++ STL 容器全解之 vectorvector 容器:构造函数和 size • vector 可以在构造时指定初始长度。 • explicit vector(size_t n); • 例如,要创建一个长度为 4 的 int 型数组 : • vectora(4); • 之后可以通过 a.size() 获得数组的长度。 • 比如右边这段代码会得到 4 。 • size_t size() const noexcept; a[0] 访问第 0 个元素(人类的第一 个) • 例如 a[1] 访问第 1 个元素(人类的第二 个) • int &operator[](size_t i) noexcept; • int const &operator[](size_t i) const noexcept; vector 容器: operator[] • 值得注意的是, [] 运算符在索引超出数组大 小时并不会直接报错,这是为了性能的考虑。 • int &operator[](size_t i) noexcept; • int const &operator[](size_t i) const noexcept; vector 容器: at • 为了防止不小心越界,可以用 a.at(i) 替代 a[i] , at 函数会检测索引 i 是否越界,如果他 发现索引 i >= a.size() 则会抛出异常 std::out_of_range 0 码力 | 90 页 | 4.93 MB | 1 年前3
共 32 条
- 1
- 2
- 3
- 4
相关搜索词
MakingLibrariesConsumableforNonC++DevelopersWorkingwithAsynchronyGenericallyTourofExecutors唐刚UseRusttoDeveloptheDecentralizedOpenDataApplicationRustChinaConf2023游人RustCCAtlasGraphCoachingAgileTeams王俊吉RustConf2023RustBelt李枫2023RustChinaConf__SparrowFengLi20230614aofficialtemplate高性性能高性能并行编程优化课件1523AnOverviewAlmostAllNewandUpdatedFeatures13













