[Webkit-unassigned] [Bug 74048] A function of vector multiply with SSE optimization is needed in VectorMath.cpp

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Dec 10 05:18:08 PST 2011


https://bugs.webkit.org/show_bug.cgi?id=74048





--- Comment #3 from xingnan.wang at intel.com  2011-12-10 05:18:08 PST ---
(In reply to comment #2)
> (From update of attachment 118323 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=118323&action=review
> 
> Please include a Changelog entry too.
> 
> > Source/WebCore/platform/audio/VectorMath.cpp:231
> >  
> 
> Add comment saying vmmul performs an element-by-element multiply of two vectors, with user-specified strides for the sources and destination.
> 
> > Source/WebCore/platform/audio/VectorMath.cpp:232
> > +void vmmul(const float* source1P, int sourceStride1, const float* source2P, int sourceStride2, float* destP, int destStride, size_t framesToProcess)
> 
> Why is it named vmmul instead of vmul?  What does the extra m mean?
> 
> > Source/WebCore/platform/audio/VectorMath.cpp:237
> > +        int n = framesToProcess;
> 
> Since this is common to both SSE and non-SSE, move it to the top?  Also, why do we need the extra variable n?  Can't we use framesToProcess?
> 
> > Source/WebCore/platform/audio/VectorMath.cpp:265
> > +                destP += 4;
> 
> As mentioned in another patch, it might be useful to add a macro to encapsulate the very similar code here and the branches below.  Something like
> 
> #define SSE2_MULT(s1Load, s2Load, dstore) \
>   pSource1 = _mm_##s1Load##_ps(source1P); \
>   pSource2 = _mm_##s2Load##_ps(source2P); \
>   dest = __mm_mul_ps(pSource1, pSource2); \
>   _mm_##dstore##_ps(destP, dest); \
>   source1P += 4; \
>   source2P += 4; \
>   destP += 4\
> 
> Then use it:
>   SSE2_MULT(load, load, store);
> 
> And SSE2_MULT(load,load, storeu); below and so on.
> 
> I think it makes it easier to see the similarity and differences between the branches.  Up to you do include this or not.
Hi Raymond,
    Do you have the privilege to assign the bug to me? Because I cannot upload the patch by webkit-patch script if I am not the assignee. Thank you.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list