Exploration of Strongly-typed Units: A Case Study from Digital Audiounit libraries for us? …yes!Are physical unit libraries for us? ● “Physical units don’t cover our use cases” ○ Not just about “physical” quantities/units ● “Don’t handle non-linear units” ○ nholthaus …Digital audio considerations… ● Mostly operating on float ● Don’t want unnecessary conversions ● Use 3rd party APIs (float, unsigned) ● “Modulation rate” is a frequency (Hz)Musical tempo …MIDI example PCM²}What’s next?Are physical unit libraries for us? ● Do all my examples work in Xcode 15? ● Should we use Au in the meantime? ● Contribute to decibel units in mp-units ● Experiment with FFT and complex numbers0 码力 | 106 页 | 5.66 MB | 6 月前3
Writing Python Bindings for C++ Libraries: Easy-to-use PerformancePython? ● Writing extensive APIs in Python - low boilerplate ● Familiar for domain experts ● Easy to use ○ Amazing interactive support out of the box (IPython) ○ Jupyter notebooks provide a great research time, others use python to do that Everything compiled with clang++12 -fPIC -O3Some perf numbers: per increment runtime https://news.ycombinator.com/item?id=34663930 Out in the wild case of noticing high boost::python::object ○ boost::python::object is a smart pointer around a PyObject* ○ Only useful to use bpy::object if you’re going to keep it around ○ Why would we want to do this?Arguments to functions0 码力 | 118 页 | 2.18 MB | 6 月前3
Coroutine Patterns and How to Use Them: Problems and Solutions Using Coroutines in a Modern CodebaseFrancesco Zoffoli - Coroutine Patterns and How to Use Them - CppCon 2023 2About Me • Software engineer building monitoring systems at • Passionate about C++ • Author of the book “C++ Fundamentals” – Packt Packt • I like writing and talking about C++ Francesco Zoffoli - Coroutine Patterns and How to Use Them - CppCon 2023 3 makers.f.dev@gmail.comOutline • Motivation • Overview • Patterns • Lifetime Coroutine Patterns and How to Use Them - CppCon 2023 4Motivation • 40 years of • Experience • Accumulated knowledge Francesco Zoffoli - Coroutine Patterns and How to Use Them - CppCon 2023 5Motivation0 码力 | 70 页 | 1.45 MB | 6 月前3
A Case-study in Rewriting a Legacy GUI Library for Real-time Audio Software in Modern C++0 码力 | 138 页 | 2.75 MB | 6 月前3
Contracts for C++Copyright (c) Timur Doumler | @timur_audio | https://timur.audio SG21 identified 196 use cases for Contracts39 Copyright (c) Timur Doumler | @timur_audio | https://timur.audio Build engineer / owner of main() enables & configures contract checks decides what happens in case of contract violation67 Copyright (c) Timur Doumler | @timur_audio | https://timur.audio Build engineer / owner of main() enables & configures contract checks decides what happens in case of contract violation117 Copyright (c) Timur Doumler | @timur_audio | https://timur0 码力 | 181 页 | 4.44 MB | 6 月前3
Back to Basics: Design Patternsstart this talk by introducing the taxonomy of design patterns at a high level, how to read a UML diagram (as a quick refresher), a refresher on inheritance vs composition, and then spend the rest of the implementation of several design patterns. Attendees will leave this talk ready to implement and use design patterns in C++. 4 The abstract that you read and enticed you to join me is here!Who Am I them ● Pragmatically ○ How to implement/use a Creational Pattern ■ Singleton in C++ ○ How to implement/use a Structural Pattern ■ Adapter in C++ ○ How to use a Behavior Pattern ■ Iterator in C++ 6What0 码力 | 96 页 | 2.10 MB | 6 月前3
Using Modern C++ to Build XOffsetDatastructureXOffsetDatastructure • X + Offset + Datastructure • Offset • Offset-based Pointers • Memcopyable // We use Offset-based pointers instead of raw pointers. This approach allows us to create data structures that XOffsetDatastructure • X + Offset + Datastructure • Offset • Offset-based Pointers • Memcopyable // We use Offset-based pointers instead of raw pointers. This approach allows us to create data structures that structures, including: • Base Types, Custom Types, Different Containers, Nested Types. • The diagram shows how these base types and containers can be combined to form complex data structures. Fanchen0 码力 | 111 页 | 3.03 MB | 6 月前3
Multi Producer, Multi Consumer, Lock Free, Atomic QueueOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. Lockfree, MPMC Queue - Legal CppCon 2024 | Erez Strauss | Lockfree MPMC Queue - The requirements ● Minimal latency for all message, not just good average ● Worst case scenario, as close as possible to average ● Multi producers threads - on multiple cpu-cores ● Multi com/erez-strauss/lockfree_mpmc_queueLockfree, MPMC Queue - Unique Requirements ● Strict ordering: prevents the use queues with relaxed ordering - multiple send queues (spmc) ● Guaranteed progress: no blocking due0 码力 | 54 页 | 886.12 KB | 6 月前3
Back to Basics: Templates Part 2Specialization Specialization Instantiation (Implicit Specialization) Implicit Instantiation Diagram courtesy of Dan Saks Back to Basics: Function and Class Templates CppCon 2019 Note: arrow means Specialization Specialization Instantiation (Implicit Specialization) Implicit Instantiation Diagram courtesy of Dan Saks Back to Basics: Function and Class Templates CppCon 2019 Note: arrow means specialization upon seeing its use in code 11 Explicit Instantiation Explicit Specialization Specialization Instantiation (Implicit Specialization) Implicit Instantiation Diagram courtesy of Dan Saks Back0 码力 | 80 页 | 490.15 KB | 6 月前3
Back to Basics: Algebraic Data Typessay “algebraic”? Okay, that was product types. But there’s another mathematical operation we can use! tupleholds a char value and a bool value. variant holds a char value or a MSVC all use this same layout, with a 4-byte index field.Finally, optional is another sum type optional is the other sum type. Like pair, optional has been optimized for certain common use-cases. An arrived in C++17, alongside optional and variant . ● It is not an algebraic type. We can’t use math to say anything interesting about its domain, which is “union of all copyable types.” ● std::any 0 码力 | 73 页 | 267.05 KB | 6 月前3
共 370 条
- 1
- 2
- 3
- 4
- 5
- 6
- 37
相关搜索词
ExplorationofStronglytypedUnitsCaseStudyfromDigitalAudioWritingPythonBindingsforC++LibrariesEasytousePerformanceCoroutinePatternsandHowUseThemProblemsSolutionsUsingCoroutinesinModernCodebasestudyRewritingLegacyGUILibraryRealtimeSoftwareContractsBackBasicsDesignBuildXOffsetDatastructureMultiProducerConsumerLockFreeAtomicQueueTemplatesPartAlgebraicDataTypes













