On Wed, 2015-09-16 at 16:29 -0400, West, Nathan wrote: > On Wed, Sep 16, 2015 at 3:58 PM, Dennis Glatting <gnura...@pki2.com> > 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) > I just looked at the low level code. For the kernels I am using I can use the same buffer. I'll have to go back and look at the VOLK samples because I was confused on this matter. > > > > 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 >
_______________________________________________ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org https://lists.gnu.org/mailman/listinfo/discuss-gnuradio