On Tue, May 26, 2015 at 7:37 PM, John Malsbury <jmalsbury.perso...@gmail.com
> wrote:

> I have a  complex phase rotation function that uses a pre-generated
> sin/cos LUT and some basic multiple/adds.
>
> As it turns out, the rotation calc, which uses "straight" C/C++ math is
> still the bottleneck in a demod.
>
> I was wondering, is there some uber-efficient rotation block/class I
> should be using?   I notice there is a volk kernel for the job and
> gr_rotator.  But I also should mention that the phase rotation operation
> must happen one sample at a time.  This is due to the sequential nature of
> the algorithm - ie.  I can't align and call a kernel with hundreds of
> nicely-aligned samples.
>
> Any advice?
>
> -John
>

 To follow-up on Sylvain's questions: is the restriction really on doing
single-sample rotation (because of some intermediate calculation to
generate the phase advance for the next sample), or on the alignment? I'll
note that *in general* intel doesn't take much (including, often, a
non-measurable) hit on non-aligned SIMD operations. Also - even if you
aren't operating in the hundreds of sample range, that the SIMD kernel can
save you if you're operating on e.g. several sample as a time (for SSE it's
only doing two at a time anyways, with a clean-up loop for an odd-number of
samples, and AVX does four at a time, with a clean-up loop for
non-multiples of four).
 Besides, who can resist looking at something called the rotatorpuppet for
inspiration on how to call the main kernel?

 I'll also point out that the gr::blocks::rotator (which is not a block,
i.e. separate from the rotator_cc, which is a block) has both a rotate()
method that operates on a single sample, and a rotateN() method that
operates on n samples. It is the later that calls down into the volk
rotator kernel.

-- 
Doug Geiger
doug.gei...@bioradiation.net
_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to