A Journey Into Non-Virtual PolymorphismRud Merriam | A Journey into Non-Virtual Polymorphism 2 Who Doesn’t Recognize This?? 1990 Borland Turbo C++Cppcon 2023 | Rud Merriam | A Journey into Non-Virtual Polymorphism 3 Background ● Experience – Medium.com (https://medium.com/@rudmerriam)Cppcon 2023 | Rud Merriam | A Journey into Non-Virtual Polymorphism 4 Polymorphism ● Greek: “many forms” (Obligatory statement) ● The use of a single variableCppcon 2023 | Rud Merriam | A Journey into Non-Virtual Polymorphism 5 Polymorphic Variables ● Base class pointer to derived class – Virtual functions are not bad! ● Standard Template Library0 码力 | 43 页 | 536.84 KB | 6 月前3
Back to Basics: The Abstract MachineBack to Basics: The Abstract Machine Bob Steagall CppCon 2020 K E W B C O M P U T I N GCopyright © 2020 Bob Steagall K E W B C O M P U T I N G Overview/Goals • Describe abstract machines in general general • Describe the C++ abstract machine specifically • Language goals that drive its design • Role in program development and execution • Important definitions and characteristics • Important components components of the abstract machine, and their relationships • Provide a useful overview of the C++ abstract machine CppCon 2020 - The Abstract Machine 2Copyright © 2020 Bob Steagall K E W B C O M P U T I0 码力 | 91 页 | 538.90 KB | 6 月前3
Optimizing Away Virtual Functions May Be PointlesscarePhoto by Tech Nick on unsplashSimple benchmark class Base { public: int concrete() const; virtual int virt() const; }; void benchmark(Base *b, size_t num_iterations) { auto start = Clock::now(); virt_duration = end-start;There are interesting technical details and surprising conclusions that virtual functions can be actually faster. Since CPU architectures are mentioned, I'd expect to see deep nt-vs-inheritance-vs-other- ways-performanceDoes it even matter?Conclusions ● The notion that “virtual functions are slower” is flat out wrong. ○ Which is not to say they are faster ○ Some of the suggested0 码力 | 20 页 | 1.19 MB | 6 月前3
BehaviorTree.CPP: Task Planning for Robots and Virtual Agentsto appreciate the power of Decorators, and the complexity of implementing the same in a State Machine! More examples: ● ForceFailure / ForceSuccess ● Repeat ● Timeout ● RunOnceExample: if-then-else name, const NodeConfig& config) : SyncActionNode(name, config) {} // You must override this virtual function NodeStatus tick() override { std::cout << "Type: [ApproachEnemy]. Instance:" <<0 码力 | 59 页 | 7.97 MB | 6 月前3
Leveraging the Power of C++ for Efficient Machine Learning on Embedded DevicesLeveraging the power of C++ for efficient machine learning on embedded devices Adrian Stanciu adrian.stanciu.pub@gmail.com CppCon, 2023 1 / 50About me ◮ I am a software engineer from Romania ◮ I have Motivation ◮ Image classification ◮ Hand gesture recognition ◮ Summary ◮ Q&A 4 / 50Motivation 5 / 50Machine Learning (ML) ◮ Subfield of Artificial Inteligence (AI) ◮ Enables computers to learn from data and consumption ◮ May have real-time performance constraints 7 / 50Machine learning on embedded devices ◮ Alternative to cloud-based machine learning ◮ Advantages: ◮ Real-time processing ◮ Low latency ◮0 码力 | 51 页 | 1.78 MB | 6 月前3
micrograd++: A 500 line C++ Machine Learning Librarymicrograd++: A 500 line C++ Machine Learning Library Gautam Sharma Independent Researcher gautamsharma2813@gmail.com Abstract—micrograd++ is a pure C++ machine learning li- brary inspired by Andrej Karpathy’s framework for building and training machine learning models. By leveraging the performance efficiency of C++, micro- grad++ offers a robust solution for integrating machine learning capabilities directly into Traditionally, all machine learning libraries are extremely bulky and very hard to integrate as third party dependencies. This aspect scares practitioners to adopt a C++ based machine learning library for0 码力 | 3 页 | 1.73 MB | 6 月前3
Oracle VM VirtualBox 4.1.40 User Manual. . . . . . . . . . . 16 1.7 Creating your first virtual machine . . . . . . . . . . . . . . . . . . . . . . . . . 17 1.8 Running your virtual machine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 1.8.5 Resizing the machine’s window . . . . . . . . . . . . . . . . . . . . . . 23 1.8.6 Saving the state of the machine . . . . . . . . . . . . . . . . . . . . . . 23 1.9 . . . . . . . . . . . . . . . . . . 26 1.10 Virtual machine configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 1.11 Removing virtual machines . . . . . . . . . . . . . . . . . .0 码力 | 310 页 | 4.87 MB | 6 月前3
Oracle VM VirtualBox 4.1.40 Programming Guide and ReferenceObtaining basic machine information. Reading attributes . . . . . . . . . . . . . 39 3.2 Changing machine settings. Sessions . . . . . . . . . . . . . . . . . . . . . . . . 39 3.3 Launching virtual machines . . . . . . . . . . . . . . . . . . . . . . . . 284 7 Host-Guest Communication Manager 285 7.1 Virtual hardware implementation . . . . . . . . . . . . . . . . . . . . . . . . . . 285 7.2 Protocol specification stack resides the hypervisor – the core of the virtualization engine, con- trolling execution of the virtual machines and making sure they do not conflict with each other or whatever the host computer is doing0 码力 | 306 页 | 1.92 MB | 6 月前3
Oracle VM VirtualBox 4.2.32 User Manual. . . . . . . . . . . 17 1.7 Creating your first virtual machine . . . . . . . . . . . . . . . . . . . . . . . . . 18 1.8 Running your virtual machine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 1.8.5 Resizing the machine’s window . . . . . . . . . . . . . . . . . . . . . . 24 1.8.6 Saving the state of the machine . . . . . . . . . . . . . . . . . . . . . . 24 1.9 . . . . . . . . . . . . . . . . . . 28 1.11 Virtual machine configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 1.12 Removing virtual machines . . . . . . . . . . . . . . . . . .0 码力 | 348 页 | 5.93 MB | 6 月前3
Oracle VM VirtualBox 4.2.32 Programming Guide and ReferenceObtaining basic machine information. Reading attributes . . . . . . . . . . . . . 39 3.2 Changing machine settings. Sessions . . . . . . . . . . . . . . . . . . . . . . . . 39 3.3 Launching virtual machines . . . . . . . . . . . . . . . . . . 314 15 Contents 7 Host-Guest Communication Manager 315 7.1 Virtual hardware implementation . . . . . . . . . . . . . . . . . . . . . . . . . . 315 7.2 Protocol specification stack resides the hypervisor – the core of the virtualization engine, con- trolling execution of the virtual machines and making sure they do not conflict with each other or whatever the host computer is doing0 码力 | 339 页 | 2.07 MB | 6 月前3
共 280 条
- 1
- 2
- 3
- 4
- 5
- 6
- 28













