Constructing Generic Algorithmsdesigned to be complete. The whole 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 CATEGORIES (CONCEPTS) • input_iterator • output_iterator • forward_iterator • bidirectional_iterator • random_access_iterator • contiguous_iterator ## C++17 iterator categories got a concepts specification specification in C++20 All of these expose iterator_traits:value_type. ## I TERATOR CONCEPT QUESTIONS ## I TERATOR CONCEPT QUESTIONS 1. Am I using any standard algorithms? Which concept(s) do they0 码力 | 145 页 | 8.44 MB | 1 年前3
POCOAS in C++: A Portable Abstraction for Distributed Data Structures## +21 ## PGAS in C++: A Portable Abstraction for Distributed Data Structures ## BENJAMIN BROCK 20 21 October 24-29 ## About Me - PhD candidate at Berkeley - Advised by Kathy Yelick and Aydın Buluç 64>>(cuda::dmatrix_view(a)); ## Wrap-Up - Remote pointer types are a useful abstraction for implementing distributed data structures - Extendable to multi-GPU data structures both intra-node0 码力 | 128 页 | 2.03 MB | 1 年前3
Is std::mdspan a Zero-overhead Abstraction? - Oleksandr Bakirov - CppCon## +23 ## I s std::mdspan a Zero-overhead Abstraction? ## OLEKSANDR BACHERIKOV ## I s std::mdspan a Zero-overhead Abstraction? Oleksandr Bacherikov Snap Inc ## What is std::mdspan? It's a view0 码力 | 75 页 | 1.04 MB | 1 年前3
Building resilient systems inside the mesh:
abstraction and automation of Virtual Service
generation## Building resilient systems inside the mesh: abstraction and automation of Virtual Service generation Vladimir Georgiev, Thought Machine ## I stioCon ## Sync calls failures inside the mesh - Everyone manage Virtual Service configs. - Virtual Service configs become a release artifact. - Easy abstraction for defining timeouts and retries in a language agnostic way. - Application developers using Istio/Envoy0 码力 | 9 页 | 1.04 MB | 1 年前3
BehaviorTree.CPP: Task Planning for Robots and Virtual Agents/p7_1.jpg) ## Robot Behaviors This Coordinator or Task Planner is also the highest level of abstraction of our system, where we focus on WHAT the robot does (or should do) and not on HOW it does it (Skills Trees (and State Machines, to be fair) is that: 1. They allow us to reason at a higher level of abstraction. 2. It allows people that are not domain experts or C++ developers to design or understand the0 码力 | 59 页 | 7.97 MB | 1 年前3
The Rust Programming Language,2nd EditionString to an array of bytes using the as_bytes method: let bytes = s.as_bytes(); Next, we create an iterator over the array of bytes using the iter method : 100 for (i, &item) in bytes.iter().enumerate() places to update the logic if we need to change it. To eliminate this duplication, we can create an abstraction, which in this case will be in the form of a function that operates on any list of integers given at runtime. 229 4.3 Traits: Defining Shared Behavior Traits allow us to use another kind of abstraction: they let us abstract over behavior that types can have in common. A trait tells the Rust compiler0 码力 | 617 页 | 1.54 MB | 2 年前3
Back to Basics: Design PatternsC++ How to implement/use a Structural Pattern ☐ Adapter in C++ How to use a Behavior Pattern ■ Iterator in C++ ## What you are going to learn today (So you know what to pay attention to) - What Design How to implement/use a Structural Pattern ☐ Adapter in C++ ☐ How to use a Behavior Pattern ☑ Iterator in C++ • My expectations are you: Have written some C++ (understand memory allocation, object These concern class and object compo • Adapter allows classes with incomp • Bridge decouples an abstraction fro • Composite composes zero-or-more • Decorator dynamically adds/overrid • Facade provides0 码力 | 96 页 | 2.10 MB | 1 年前3
Design Patterns: Facts and Misconceptionsstd::make_unique() ... ... does not resolve any dependency; … does not provide any (semantic) abstraction (no customization); ... has nothing to do with software design; ... has nothing to do with design \[edit]In class-based programming, a factory is an abstraction of a constructor of a class, while in prototype-based programming a factory is an abstraction of a prototype object. A constructor is concrete constructors but an ordinary method call to invoke factories; in these languages factories are an abstraction of constructors but not strictly a generalization, as constructors are not themselves factories0 码力 | 88 页 | 17.31 MB | 1 年前3
generic graph librariesjpg) istream istream_ iterator  ostream merge ostream_ iterator 日 reverse iterator ++ Increment ==, & captures all accumulation: • Any kind of data (int, float, string) Sum of a range of T (requires: iterator range, $ T + T $ ) • Any kind of sequence (array, list, file, network) • Any operation (add, initialize, UnaryFunction2 merge, BinaryFunction1 combine, BinaryFunction2 reduce); ## Abstraction Penalty Measurements • Compare different traversals of graph (sparse matrix-vector product) for(vertex_id_t0 码力 | 76 页 | 6.59 MB | 1 年前3
Back to Basics: The Factory Pattern'compile-time' what object should be created. What we would like, is to have a layer of abstraction, or somewhat to create objects at run-time to reflect the dynamic nature of some C++ programs. These concern class and object compo • Adapter allows classes with incomp • Bridge decouples an abstraction fro • Composite composes zero-or-more • Decorator dynamically adds/overrid • Facade provides responsibility delegates co • Command creates objects which en • Interpreter implements a specialized • Iterator accesses the elements of a • Mediator allows loose coupling between • Memento provides the ability0 码力 | 93 页 | 3.92 MB | 1 年前3
共 1000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 100
相关搜索词
algorithmgeneric algorithmsiterator abstractionSTLconcepts分布式数据结构远程指针类型数据分布性能抽象实现std::mdspanzero-overhead abstractionmulti-dimensional arraysChandler CarruthC++ ConferenceIstioService MeshVirtual ServicegRPCKubernetesBehavior TreesC++abstractionmodularityscripting languageRust编程语言所有权结构体变量类型设计模式创建型结构型行为型Gang of Four设计模式误解设计模式分类设计模式文档设计模式批评C++20图Boost Graph Library概念范围工厂模式工厂方法模式抽象工厂模式创建对象枚举类













