How to use VOLK instructions with shorts

Dear all,

we are looking into the implementation of correlators in which the two
sequences to correlate are vectors of std::complex. For
gr_complex, we use:

volk_32fc_x2_dot_prod_32fc_a

but for shorts we would need something like
volk_16ic_x2_dot_prod_16ic_a, which does not exist. What is the best
way to go? It makes sense to implement such a function, or there is
not much gain expected with this specific data format?

Any advice will be greatly appreciated!

Best regards,
Carles

On 07/31/2012 06:00 AM, Carles Fernandez wrote:

way to go? It makes sense to implement such a function, or there is
not much gain expected with this specific data format?

typically the model is to add the kernel to volk, its just another
header in volk/include/volk/volk_32fc_x2_dot_prod_32fc_a.h

Write the generic (C only) implementation, and use this in your block,
test it, make sure it works. Then write another implementation using
SIMD intrinsics.

Any advice will be greatly appreciated!

gnuradio often focuses on floats and x86. It would be wonderful to see
some more fixed point contributions. go for it!

As far as performance, it depends on your CPU. For arm, fixed point
computation could be beneficial. For x86, floating point is already
pretty optimized, so less of a performance gain I assume.

-josh

PS dont listen to me, let the benchmarking decide what performs best :slight_smile:

On Tue, Jul 31, 2012 at 05:48:50PM -0700, Josh B. wrote:

As far as performance, it depends on your CPU. For arm, fixed point
computation could be beneficial. For x86, floating point is already
pretty optimized, so less of a performance gain I assume.

-josh

PS dont listen to me, let the benchmarking decide what performs best :slight_smile:

In general, I’d encourage the reader of discuss-gnuradio to listen to
Josh, though.

MB


Karlsruhe Institute of Technology (KIT)
Communications Engineering Lab (CEL)

Dipl.-Ing. Martin B.
Research Associate

Kaiserstraße 12
Building 05.01
76131 Karlsruhe

Phone: +49 721 608-43790
Fax: +49 721 608-46071
www.cel.kit.edu

KIT – University of the State of Baden-Württemberg and
National Laboratory of the Helmholtz Association

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs