Challenges in customizing advanced algorithms on the example of Computational Geometry
3
Customization mechanism is CGAL
4
Motivating example: vectors addition
5
Expression Templates in the Linear Algebra libraries
6
Vectors addition with Expression Templates
7
Expressions in the C++ Standard Library
8
What the Standard Library provides
9
Scalar operations in the Eigen Linear Algebra library
10
Extensible plus with expressions support
11
Operation base class
12
What do such operations enable?
13
Input-output parameter wrapper
14
Expression implementation
15
Simplifying Ranges example
16
Simplifying Ranges projections
17
Fold operations
18
Examples outside vector arithmetic
19
Weirder operation expression example
20
Existing analogues
21
Evaluation of operation expression
22
We can implement even some basic operations in terms of others
23
Comparison to the Abbreviated Lambdas proposal
24
Expressive binary search syntax
25
Motivating example: when operator == is not enough
Description:
Explore an innovative approach to implementing and customizing STL algorithms using Expression Templates in this CppNow 2021 conference talk by Oleksandr Bacherikov. Delve into the application of Generic Programming techniques to Computational Geometry algorithms, uncovering discoveries with broad implications for STL range algorithms and generic code writing. Learn how Expression Templates can be extended beyond their traditional use in Linear Algebra libraries to achieve greater flexibility and expressiveness. Discover how function call syntax can be used for natural composition, how incorporating function object parameters transforms expressions into function objects themselves, and how policy-based customization can be applied across entire expressions. Gain insights into simplifying Ranges examples, implementing fold operations, and creating expressive binary search syntax. Compare this approach to the Abbreviated Lambdas proposal and explore its potential to revolutionize the way generic code is written in C++.
Read more