2 ms·
I wrote a multi-target SIMD-using synthesizer, and I don't think I would've had as much success if I were just using someone else's library - its been especiall
by MomsAVoxell 2mo ago
I wrote a multi-target SIMD-using synthesizer, and I don't think I would've had as much success if I were just using someone else's library - its been especially important to have the SIMD instructions for both architectures I'm supporting (ARM and x86) directly available in the code, since a synthesizer necessarily involves a working pipeline from one stage to the other. I wonder how much easier/better the code would have been to write with portable_simd ..
https://github.com/seclorum/SIMDSynth https://github.com/seclorum/SIMDSynth
(uses SIMD for optimizing voice allocation and filter calculations on both ARM and x86, same codebase ..)
- exDM69 2mo ago> I wonder how much easier/better the code would have been to write with portable_simd .. I had a quick glance of the code and it seems to use mostly basic arithmetic instructions on fixed width simd vectors using some helper macros like SIMD_MUL(x, y) for _mm_mul_ps, etc. Some explicit simd intrinsics code for stuff like sin. That would've been pretty easy to write with portable_simd in Rust or the equivalent C/C++ language extensions (or maybe C++26 std::simd). You'd just use f32x4 (or add a typedef with attribute in C++) and then use x*y instead of SIMD_MUL. For basic stuff like this, you should get the exact same generated code. https://clang.llvm.org/docs/LanguageExtensions.html#vectors-and-extended-vectors https://clang.llvm.org/docs/LanguageExtensions.html#vectors-...