justin = { main feed , music , code , askjf , pubkey };
Ask Justin Frankel
No reasonable question unanswered since 2009!

Suggested topics: programming, music, sleep, coffee, etc.

Note: please do not ask questions about REAPER features, bugs or scheduling, use the forums instead.


Name: Ask: Human (enter yes):
[back to index] | [unreplied] | [replied] | [recent comments] | [all]

Question: are WDL_HeapBuf/WDL_TypedBuf are good for SIMD processing? any quick way to make them 16byte align?
Asked by olilarkin (93.158.79.x) on April 10 2013, 4:12pm
Reply on April 10 2013, 8:06pm:
    Not directly, you can easily do:
    class AlignedHeapBuf : public WDL_HeapBuf
    {
    public:
      void *getAligned(int alignAmt)
      {
        char *a = (char *)Get();
        INT_PTR off = (((INT_PTR)a) & (alignAmt-1));
        if (off) a += alignAmt-off;
        return a;
      }
    }
    
    Then call hb.Resize(size+15) and hb.getAligned(16) etc. not ideal, I know... :/

Comment:
    Your Name:   -- Site Owner's Name:  (for human-verification)

    Comment:    

    
  
[back to index] | [unreplied] | [replied] | [recent comments] | [all]
Copyright 2025 Justin Frankel. | RSS