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

แชร์
ฝัง
  • เผยแพร่เมื่อ 25 ม.ค. 2025

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

  • @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 8 หลายเดือนก่อน +1

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

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

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

  • @auditiv0276
    @auditiv0276 3 หลายเดือนก่อน

    If you want to make sure to compile using SIMD instructions specific for the HostCPU you can use llvm bindings for the language of your choice and then compile through llvm. Interesting vid!

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

    Thank you Jan!

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

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

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

    Great job explaining, and demonstrating. Thank you.

  • @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ż!

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

    Line 13 is killing me lol

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

    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?

  • @davidminnix
    @davidminnix 3 หลายเดือนก่อน

    many dsp algorithms contain single sample feedback. can anything be done to vectorize these algorithms? It seems like the feedback complicates any attempt to use block processing to vectorize.

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

    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 2 ปีที่แล้ว

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

  • @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?

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

    Yes, you helped a lot ^_^

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

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

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

      Late reply, you probably already have figured it out by now. Responding anyway for others with the same question.
      That's like saying planes are pointless for traveling large distances, because you still need to walk the short distance to your destination from the airport.
      SIMD will do a large portion of the work, in this case it will do it in multiples of 8, and the regular loop will finish the remaining amount
      so for normal loop you are looking at:
      N*scalar
      while for SIMD you are getting:
      floor(N/8)*SIMD + (N%8)*scalar
      Since by design 1*SIMD will be faster than 8*scalar, for sizes greater or equal to 8, the second algorithm will be faster than just doing the first loop. Otherwise, for sizes smaller than 8, it will be the same as the first loop + some overhead because of the division by 8.