What Are SIMD Instructions? (With a Code Example) [DSP #14]

แชร์
ฝัง
  • เผยแพร่เมื่อ 14 มิ.ย. 2024
  • ✅ Check out the full article on TheWolfSound.com: www.thewolfsound.com/simd-in-...
    ➡️ Data alignment explained: • What is data alignment...
    ✅ Sign up for WolfSound's newsletter: thewolfsound.com/newsletter/
    ✅ Please subscribe to WolfSound to let the little Wolf 🐺 grow:
    th-cam.com/users/WolfSoundAu...
    🎧 Listen to my music: thewolfofficial.com/
    Hi, my name is Jan Wilczek and I am an audio programmer and a researcher. Welcome to WolfSound!
    WolfSound's mission is to provide high-quality, informative, and entertaining videos, articles, and courses on how to process sound by exploring mathematics, applying algorithms, and creating code in various programming languages. Topics include sound synthesis, digital signal processing, programming languages for audio (C, C++, Python, Rust), and audio effects. I am also sharing tips on how to learn fast and effectively. Make sure to visit www.thewolfsound.com/.
    WolfSound enables everybody to learn about audio programming!
    ABOUT THE VIDEO
    In this video, I explain what is Single Instruction, Multiple Data (SIMD), how is it useful in DSP, and show a small example of code using SIMD that adds two vectors together.
    💡 In short, SIMD instructions let us perform operations on more than one variable at once using dedicated processor registers.
    💡 Different processor architectures and models have different SIMD instructions available.
    💡 SIMD instructions can make your DSP code significantly faster at the cost of
    ➡️ code complexity.
    ➡️ portability,
    ➡️ expert knowledge on processors.
    In case of any doubt in understanding, please, refer to the article above or ask a question in the comments 🙂
    Video edited by Jorge Jimenez.
    ABOUT ME
    My name is Jan Wilczek. I am an audio programmer, a researcher in the field of music technology, and a musician. Through articles and videos from WolfSound, you will easily understand the main concepts of sound processing using software. My full story: • How I Got Started With...
    FOLLOW WOLFSOUND ONLINE
    ✅ Blog: www.thewolfsound.com/
    ✅ LinkedIn: / jan-wilczek-audio-prog...
    ✅ Twitter: / wilczek_jan
    ✅ Facebook: / janwilczekwolfsound
    ✅ Instagram: / janwolfwilczek
    ✅ Pinterest: / jawitrle
    TIME CODES
    00:00 Introduction
    00:47 Why do we need fast processing in audio?
    01:38 What is SIMD?
    02:14 Typical SIMD instructions
    03:52 How can we access SIMD instructions?
    06:28 Most popular SIMD instruction sets
    08:30 Why is SIMD useful in DSP?
    10:22 Disadvantages of SIMD
    13:24 Code example: vector addition using SIMD
    21:04 Summary
    #simd #dsp
  • แนวปฏิบัติและการใช้ชีวิต

ความคิดเห็น • 18

  • @WolfSoundAudio
    @WolfSoundAudio  2 ปีที่แล้ว +2

    Have I helped you with this video? If yes, please, consider buying me a ☕ coffee at www.buymeacoffee.com/janwilczek
    Thanks! 🙂

  • @chen-kim9440
    @chen-kim9440 25 วันที่ผ่านมา +1

    Thanks for your great introduction and lively demo! I really like your pace!

  • @niranjanm5942
    @niranjanm5942 10 หลายเดือนก่อน +2

    Thanks this was great intro on this topic. I wanted to get started on SIMD and this will put me in right way

  • @cliffmathew
    @cliffmathew ปีที่แล้ว

    Great job explaining, and demonstrating. Thank you.

  • @alldyallnite
    @alldyallnite 2 ปีที่แล้ว +1

    Thank you Jan!

  • @theruisu21
    @theruisu21 ปีที่แล้ว

    great video!. looking forward the next one. for the next time, could include more on the arm and risc v case?

  • @Hobo10000000000
    @Hobo10000000000 ปีที่แล้ว +3

    Line 13 is killing me lol

  • @NecdetSanli
    @NecdetSanli ปีที่แล้ว

    You made the concept easy to understand, thank you. Would like to see some C examples if it's possible too.

  • @moliver_xxii
    @moliver_xxii 2 ปีที่แล้ว +2

    hej, to jest trudny temat, nic nie można znaleść na Internet, cieli dziękuję ci Jan!

    • @WolfSoundAudio
      @WolfSoundAudio  2 ปีที่แล้ว +2

      Bardzo się cieszę, dzięki również!

  • @KeypleezerOfficial
    @KeypleezerOfficial ปีที่แล้ว

    Nice video & nicely paced and clear. Just what I needed to get this topic a bit more. Just need some more examples of calculations actually taken care of by the SIMD extension sets, and perhaps some alternative SIMD/FFT libraries with info about what does what and how, that would be epic. Not many people teaching this in audio with such good phrasing! Keep up the great work! 👍

    • @KeypleezerOfficial
      @KeypleezerOfficial ปีที่แล้ว

      I didn´t read the article about this topic you wrote before. It is great, much more info there giving more depth, thanks!

  • @przekladanki
    @przekladanki 2 ปีที่แล้ว +2

    Yes, you helped a lot ^_^

  • @moisascholar
    @moisascholar 6 หลายเดือนก่อน

    Very helpful video. I was working on a particle system/simulation, and I use GL to draw the particles. Was wondering with SIMD and GL, how can I draw multiple particles at once? Or is this something more to do with GL buffers?

  • @BalakrishnanIrudhayaraman
    @BalakrishnanIrudhayaraman ปีที่แล้ว

    I can understand the concept of simd. But, in the code I can see that you are adding each value when it is added to the register. I see that which is equivalent to scalar addition, I think inorder to avoid one more for loop to store the addition values into the result array which makes sense. This points me to ask whether the intrinsic function performs the addition, only when all the 256bits are filled with values or it can also perform otherwise?

  • @omnisepher
    @omnisepher ปีที่แล้ว

    Great job,
    but didn't second for-loop killed the entire reason of using SIMD?