generic graph libraries## Generic Graph Libraries in C++20 ## ANDREW LUMSDAINE, PHIL RATZLOFF 20 21 October 24-29 ## About Us  ## • Andrew many different practical (concrete) problems – theory reuse • Goes hand-in-glove with goals of generic software libraries  interfaces to generic algorithms (codified as concepts) • Our claim: The standard library already provides sufficient capability to support generic graph algorithms and data structures • Generic graph algorithms0 码力 | 76 页 | 6.59 MB | 1 年前3
Constructing Generic Algorithms## CONSTRUCTING GENERIC ALGORITHMS ## algorithm noun al·go·rithm | \ 'al-gə-,ri-thəm ## Definition of algorithm : a procedure for solving a mathematical problem (as of finding the greatest common Parent The original standard set of algorithms is designed to support stable_sort. ## WHY WRITE GENERIC ALGORITHMS? Isn't the standard set good enough? Frequently, yes. But not always. And the standard point of the STL is that decoupling containers (with the iterator abstraction) allows us to write generic algorithms that work on all containers. So let's write some! ## THE PROBLEM Given an array0 码力 | 145 页 | 8.44 MB | 1 年前3
Back to Basics: Generic Programming## +24 ## Back To Basics Generic Programming ## DAVID OLSEN ## 20 24 September 15 - 20 # Back to Basics: Generic Programming David Olsen, Compiler Engineer, NVIDIA CppCon, 18 Sep 2024  ## Generic Programming ## Generic Programming Same code works on different, unrelated types ## Generic Programming Same code works on different, unrelated value : container) { result += value; } return result; } ## Generic Programming Static polymorphism ## Generic Programming Same code works on different, unrelated types Static polymorphism0 码力 | 175 页 | 1.16 MB | 1 年前3
Hidden Overhead of a Function API## +24 ## Hidden Overhead of a Function API ## OLEKSANDR BACHERIKOV ## What we do at Snap with C++  Neural style transfer d5d/p5_1.jpg) Tony Van Eerd Value Oriented Programming Part 1 You Say You Want to Write a Function The Meaning of Life... ...people are not writing enough functions  Tony Van Eerd Value Oriented Programming Part 1 You Say You Want to Write a Function ###### The Meaning of Life... ...people are not writing enough functions ## Tony Van Eerd: “people0 码力 | 158 页 | 2.46 MB | 1 年前3
Limitations and Problems in std::function and Similar## +24 ## Limitations and Problems in std::function and Similar Mitigations and Alternatives ## AMANDEEP CHAWLA ## Limitations and Problems in std::function and similar constructs Amandeep Chawla | Sr ConfigurationSettings settings, TaskQueuePtr syncTQ, TaskQueuePtr bgTQ, TaskQueuePtr notifyTQ, std::function)> callback ); ## Lambdas // print all the using a lambda function std::sort(v.begin(), v.end(), [](int a, int b) { return a < b; }); // find the object with id "c" in a vector of objects // having an id() function returning string0 码力 | 62 页 | 3.57 MB | 1 年前3
Back to Basics - Function Call Resolution## Back To Basics Function Call Resolution BEN SAKS ## Saks & Associates These notes are Copyright © 2024 by Ben Saks and Dan Saks and distributed with their permission by: Saks & Associates hiding • function overloading • function templates ■ When a compiler encounters an expression like $ f(x, y, z) $ , it must consider each of these language features to determine which f function to call session will examine each of these features in turn: • Function overloading and overload resolution • Name lookup • Default function arguments • Function templates For each feature, we’ll explain first how0 码力 | 44 页 | 1.30 MB | 1 年前3
Reusable Code & Reusable Data Structuresonly minimal concepts 2. vertical center is more generic, easier to use 3. Reduced dependencies ## SHARED ALGORITHM, DIFFERENT DATA: GENERIC FUNCTION • Define minimal required operations as concepts Don't generalize from single use case CUSTOMIZING GENERIC FUNCTIONS Client code → generic library code → client code ### 1. DISPATCH TO FUNCTION OVERLOADS void place(rect r, great_widget); void place(rect place_items(rect{}, std::vector()); } ### 1. DISPATCH TO FUNCTION OVERLOADS void place(rect r, great_widget); void place(rect r, awesome_widget); void place_items(rect0 码力 | 132 页 | 14.20 MB | 1 年前3
10 为Python Function自动生成Web UI 彭未康 ## 为 Python Function 自动生成 Web UI 彭未康 ## Touch-Callable The web framework for less serious application. (venv3.6)$ pip [Image](/uploads/documents/0/e/f/2/0ef2dc85a2a8c5cd710f26461146a99b/p9_2.jpg) ## 大胆的想法: • 直接使用 Function 构建小型应用的管理后台? • Serverless 管理后台?  - At the end of the function, the stack frame is deleted Function in mathematic != Function in programming ## Pure Function ## Pure Function (Mathematical function) - Produce the same result0 码力 | 29 页 | 510.47 KB | 1 年前3
Back to Basics: Object-Oriented Programmingjpg) ## The keywords for polymorphic classes ■ virtual: Marks a function as replaceable by a derived class. ■ override: A function with the exact name and signature must exist in one of the base classes this implementation. ■ final: A class cannot be used as a base class after this point. Or a member function cannot be replaced anymore. ## V irtual functions struct Fruit { double mWeight}; virtual functions that you override from a base class with override. Never override a non-virtual member function. ■ Prefer class when there is a constructor that checks the invariant, otherwise struct. ## I am0 码力 | 20 页 | 1.04 MB | 1 年前3
共 1000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 100
相关搜索词
C++20图Boost Graph Library概念范围algorithmgeneric algorithmsiterator abstractionSTLconceptsGeneric ProgrammingConstraintsStatic PolymorphismC++ TemplatesKISS Principle函数APIstd::function性能优化C++23SnapMitigationsAlternativesPerformanceOptimization函数重载名称查找默认参数函数模板解析Reusable CodeDRYGeneric FunctionGeneric ClassesAbstract ConceptTouch-CallablePython FunctionWeb UI用户生成数据类型CallableFunctionCoroutineLambda ExpressionFunction Overloadingclassconstructormember functionaccess specifiervirtual function













