C++高性能并行编程与优化 - 课件 - 14 C++ 标准库系列课 - 你所不知道的 set 容器C++ 标准库系列课 - 你所不知道的 set 容 器 by 小彭老师( @archibate ) 课件 & 代码: https://github.com/parallel101/course 上期回顾: https://www.bilibili.com/video/BV1qF411T7sd 课程安排 1. vector 容器初体验 & 迭代器入门 (BV1qF411T7sd) 2. 你所不知道的 , const char * 的爱恨纠葛 4. 万能的 map 容器全家桶及其妙用举例 5. 函子 functor 与 lambda 表达式知多少 6. 通过实战案例来学习 STL 算法库 7. C++ 标准输入输出流 & 字符串格式化 8. traits 技术,用户自定义迭代器与算法 9. allocator ,内存管理与对象生命周期 set 和 vector 的区别 • 都是能存储一连串数据的容器 拟出来的 + n 复杂度为 O(n) 。虽然低效,但至少可 以用了。 std::next 等价于 + • 但是这样手写三个 ++ 太麻烦了 ,而且是就地操作,会改变迭代 器本身。 • 因此标准库提供了 std::next 函 数,他的内部实现相当于这样: • 没错,他会自动判断迭代器是否 支持 + 运算,如果不支持,会 改为比较低效的调用 n 次 ++ 。 std::advance0 码力 | 83 页 | 10.23 MB | 1 年前3
This is C++object, but its runtime value is not fully formedThis isThis isUndefined Behavior!Is C++ safe?Modern C++: move semantics rvalue reference syntaxThis isWidget::Widget( std::list&& inGL member functions to “fake” something when moved From */ ~~~~ };Summary ✦What is C++? ✦Uncompromised performance. ✦Achieved by: living with UB, accepting a safety trade-off 0 码力 | 67 页 | 8.25 MB | 6 月前3
Contracts for C++Version 1.0 (pre-Wrocław Edition) Timur Doumler CppCon 18 September 2024 Contracts for C++ The Swan, The Pike, and The Crab – Fable by Ivan Krylov, 18143 Copyright (c) Timur Doumler | post (w: w.index() == i); // postcondition assertion Proposal: add contract assertions to C++ Function contract assertions5 Copyright (c) Timur Doumler | @timur_audio | https://timur We are here 2004 First C++ proposal ("D-like Contracts") Ottosen, Crowl14 Copyright (c) Timur Doumler | @timur_audio | https://timur.audio 2004 First C++ proposal ("D-like Contracts")0 码力 | 181 页 | 4.44 MB | 6 月前3
Irksome C++Irksome C++ Copyright © 2022-2024 by Walter E. Brown. All rights reserved. 1 ACCELERATED EFFECTIVE INEFFECTIVE IRKSOME C++ Walter E. Brown, Ph.D. < webrown.cpp @ gmail.com > Edi$on: 2024-09-19 cs); M.S., Ph.D. (computer science). • Professional programmer for over 60 years, programming in C++ since 1982. • Experienced in industry, academia, consul,ng, and research: � Founded a Computer Science lectured interna?onally. � Re?red from the Scien?fic Compu?ng Division at Fermilab, with specialty in C++ programming and in-house consul?ng. • Not dead! ☺ — s,ll doing training & consul,ng. (Email me!)0 码力 | 15 页 | 3.03 MB | 6 月前3
COMPOSABLE C++COMPOSABLE C++ COMPOSABLE C++ BEN DEANE / BEN DEANE / CPPCON 2021 CPPCON 2021 @ben_deane @ben_deaneIN THIS TALK IN THIS TALK 1. Composability de�ned 2. Composable types 3. Objects and patterns 4 LOGGING From "Easy to Use, Hard to Misuse: Declarative Style in C++" (CppCon 2018) From "Easy to Use, Hard to Misuse: Declarative Style in C++" (CppCon 2018) The The bool bool return type is the key to };"FUNCTIONAL PROGRAMMING" "FUNCTIONAL PROGRAMMING" Functional programming in C++? Polarising? Functional programming in C++? Polarising? Higher order functions that take functions as arguments and return0 码力 | 124 页 | 8.28 MB | 6 月前3
Exceptional C++Engineer CppCon 2021 October 25th Exceptional C++2021 Victor Ciura | @ciura_victor - Exceptional C++ X Abstract When writing code we usually focus our attention on the happy paths - that’s where Ciura | @ciura_victor - Exceptional C++ 3 About me Advanced Installer Clang Power Tools @ciura_victor2021 Victor Ciura | @ciura_victor - Exceptional C++ 4 Online presentation Q & A Use the Exceptional C++ 5 Exceptional C++ When writing code we usually focus our attention on the happy paths - that’s where the interesting stuff happens2021 Victor Ciura | @ciura_victor - Exceptional C++ 6 Exceptional0 码力 | 113 页 | 24.39 MB | 6 月前3
C++ in the CloudC++ in the Cloud One NIF at a Time with Elixir Sakshi Verma | Senior Software Engineerhttps://www.linkedin.com/in/sakverma Functional, concurrent language built for scalability. Ideal for managing Here comes the NIFshttps://www.linkedin.com/in/sakverma Native Implemented Functions (NIFs) Call C/C++ from Elixir Compiles to a shared library Loaded into Erlang VM at startuphttps://www.linkedin.com/in/sakverma } else { return enif_make_badarg(env); } } // NIF initialization (maps Elixir function to C++ function) static ErlNifFunc nif_funcs[] = { {"xgboost_build_info", 0 , xgboost_build_info} };0 码力 | 14 页 | 609.86 KB | 6 月前3
Dependency Injection in C++Injection in C++: A Practical Guide CppCon 2024 September 18, 2024 Pete Muldoon Senior Engineering LeadBloomberg 4 Questions #includeHereWho Am I? Bloomberg 5 • Started using C++ professionally Systems Exceptionally Bad : The Story on the Misuse of Exceptions and How to Do Better (Exceptions in C++ : Better Design Through Analysis of Real-World Usage) Software Development Completeness : Knowing when 0 码力 | 106 页 | 1.76 MB | 6 月前3
Deciphering C++ Coroutines20243/55 About me - Andreas Weis (he/him) ComicSansMS cpp@andreas-weis.net Co-organizer of the Munich C++ User Group4/55 The story so far...5/55 Where we left off...6/55 The coroutine return type ReturnType7/55 C++26 senders/receivers are a first step in this direction, but a lot is still in development there C++ Coroutines are much more flexible than async/await in other languages. It is not yet clear what the0 码力 | 156 页 | 1.79 MB | 6 月前3
Fast and small C++Andreas Fertig Write unique code! Fast and small C++ When efficiency matters Presentation Material CppCon, Aurora CO, 2024-09-17© 2024 Andreas Fertig AndreasFertig.com All rights reserved All programs Franziska Panter https://franziskapanter.com Production and publishing: Andreas FertigFast and small C++ Style and conventions The following shows the execution of a program. I used the Linux way here and resulting in a.out as the program name. $ ./a.out Hello, C++! •stands for a header file with the name string • [[xyz]] marks a C++ attribute with the name xyz. © 2024 Andreas Fertig https://AndreasFertig 0 码力 | 17 页 | 790.91 KB | 6 月前3
共 391 条
- 1
- 2
- 3
- 4
- 5
- 6
- 40













