discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] VOLK: fast way to log10()?


From: West, Nathan
Subject: Re: [Discuss-gnuradio] VOLK: fast way to log10()?
Date: Wed, 16 Sep 2015 16:29:52 -0400

On Wed, Sep 16, 2015 at 3:58 PM, Dennis Glatting <address@hidden> wrote:

It would also be nice to have a VOLK kernel that multiples a vector by a constant:

   void 
   volk_32f_s32f_multiply( float* vecbuffer, 
                           const float scalar
                           unsigned int num_points )

There is a volk_32f_s32f_multiply_32f. It doesn't operate in-place, but almost none of the VOLK kernels do. I think it's safe to give the same output buffer as input buffer. (I've heard that doing stuff in-place is noticeably better, but I've never tested this and I'm a tad skeptical. I'll buy someone a beer whenever I see them if they prove me wrong with >= 5 kernels)
 

And an alias for volk_32f_s32f_normalize(): volk_32f_s32f_divide().

You could call volk_32f_s32f_multiply_32f and have the constant be 1/scalar... In a VOLK kernel that's what we would do anyway since multiplication operations don't exist in every ISA we care about and when they do sometimes multiplication is still faster (again, talking floats here).
 

These would somewhat map to operations in MATLAB with less learners asking "how do I...?".


I suppose you're right that for completeness it might make sense to add a float divide scalar kernel, but it would do exactly the multiple kernel except first divide 1/scalar.

nw

reply via email to

[Prev in Thread] Current Thread [Next in Thread]