C++ Expression Templates for Specifying Compile-time DSP Structures - Matthew Robbetts - ADC21
ฝัง
- เผยแพร่เมื่อ 22 มิ.ย. 2022
- Slides: data.audio.dev/talks/2021/cpp...
audio.dev/ -- @audiodevcon
Organized and produced by JUCE: juce.com/
---
C++ Expression Templates for Specifying Compile-time DSP Structures
We explore the use of expression templates for the zero-overhead composition of small units of DSP.
Our primary aim is to approach the low-friction, fine-granularity expressiveness of DSL systems like FAUST, while staying fully within the confines of C++ and allowing the full use of its type system. With this, the final graph construct is a simple C++ class, which can be instantiated and exercised without any scaffolding or external tooling. The conceptual machinery can be uniform, where tunable algorithm parameters quickly reduce to ordinary graph data and are processed themselves in one flat graph space.
The idea naturally extends to the processing of arbitrary data types through the graph - such as abstract control types, and types supporting block-based and frequency-domain processing. Further, it is trivial to embed the resulting classes into plugins via template adapters. Finally, the expression-template paradigm enables global optimization of the result.
When using such a system, development can be a very low-friction process, granularity can be fine, and the exact same user code can be embedded into both real-time and offline contexts without special affordances.
---
Matthew Robbetts
Matthew is a C++-focused audio developer with a passion for bringing highly expressive, functional-programming approaches to real-time systems.
He previously worked for Apple, where he was responsible for audio/telephony DSP algorithm development; and currently works for Syng, on their audio DSP and architecture stack.
---
Streamed & Edited by Digital Medium Ltd - online.digital-medium.co.uk
---
Special thanks to the ADC21 Team:
Lina Berzinskas
Sophie Carus
Timur Doumler
Derek Heimlich
Josh Hodge
Andrew Kirk
Bobby Lombardi
Tom Poole
Ralph Richbourg
Jim Roper
Jonathan Roper - วิทยาศาสตร์และเทคโนโลยี
There is not going to be just one alllocation when you use push_back in isolation; you need to call reserve() to pre-allocate the number of elements.