Containers with continuous storage are basic abstract building blocks for many applications. The C++ 20 standard library offers us two popular ones which are std::vector and std::array along with std::span as a view to continuous data stored anywhere. While they are great at storing data, we often missed features like - Functionality to transform the data stored in them - Performing mathematical operations on numerical vectors with an expressive syntax – at best using SIMD accelerated implementations in the background if available - Copying data without having to bother about heap allocation on the audio thread - Being able to perform all operations mentioned above in a constexpr context
VCTR is our in-house solution to all these challenges. It is a set of wrapper classes around the three standard library classes and adds a bunch of functionalities to them. Depending on the actual template type it enables or disables features and member functions and adds some handy constructors. A Vector of unique ptrs will have other functions as a vector of numerical values. A vector of complex numbers will have other functions than a vector of real-valued numbers. A mathematical operation might use a different implementation strategy depending on the platform it’s built for. And all that wrapped behind a beautiful intuitive API.
What evolved into a somewhat cumbersome bunch of SFINAE constructs over the last few years is now completely rewritten using C++ 20 concepts resulting in a much cleaner implementation that will be open sourced after ADC. The talk will show you how we use concepts, smart expression templates and other template trickery to create a powerful, yet easy to use class and will present you a few core features of the class.
IF YOU ARE ATTENDING ONLINE, ALL TALK SESSIONS CAN BE ACCESSED FROM THE MAIN LOBBY:
https://conference.audio.dev