Loading…
C++Now 2021 has ended
Back To Schedule
Thursday, May 6 • 1:30pm - 3:00pm
STL Algorithms as Expressions

Log in to save this to your schedule, view media, leave feedback and see who's attending!

This talk started as an effort to implement Computational Geometry algorithms (used in Computer Vision and Graphics) in the Generic Programming style. Because they have many more customization points than STL algorithms, the common approaches used in STL are not sufficient. This led to discoveries that can have surprisingly broad application to STL range algorithms and the way generic code is written. Expression Templates have been used by all of the Linear Algebra libraries for years, but mostly to avoid temporary buffer allocations. However, with a few extensions, they can achieve much more:
* Expressions constructed using the function call syntax provide a natural and expressive way of composition.
* Expression Templates typically support only data types as their template parameters, but allowing function object parameters makes the expression a function object itself. We’ll see how this definition syntax avoids all the boilerplate of function definitions and even lamdba expressions.
* Expressions can be customized using policies, where each policy specifies how it affects certain operations. We’ll discuss the benefits of a customization mechanism that applies given policies to all the operations in the expression.

Speakers
avatar for Oleksandr Bacherikov

Oleksandr Bacherikov

Software engineer, Snap Inc


Thursday May 6, 2021 1:30pm - 3:00pm MDT
A