~/talk

Multidimensional Iterators

Talkat C++Now 2017 · 2017-05-15..05-20· [c-and-cpp]
slides:none on file

Attempts to abstract nested loops into reusable iterators usually kill vectorization, but here a generate_indices range implemented with C++ coroutines emits the actual nested-for code at the call site, producing identical assembly to the original hand-written loops. It requires compiler coroutine inlining/optimization and a few small tweaks to get full vectorization (Intel compilers previously vectorized only indexing), but the implementation reproduces performance while letting iteration order and layout change by swapping the index generator.

AI-written summary · about

~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.