discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] VOLK - vector multiplication


From: Nasi
Subject: Re: [Discuss-gnuradio] VOLK - vector multiplication
Date: Thu, 20 Mar 2014 20:51:13 +0400

Thanks!

As I see you apply it to the first element of x as in volk_32fc_something_32fc(&x[0], ...);.
I want to multiply the whole vector like as a inner product of two vectors. Is it possible?

-
NE


Четверг, 20 марта 2014, 10:28 -04:00 от Tom Rondeau <address@hidden>:
On Thu, Mar 20, 2014 at 10:09 AM, Aditya Dhananjay <address@hidden> wrote:
> I had the same question. Thanks! :)

One thing that I forgot to mention is that VOLK is written purely in
C, so C++ vectors as-is won't work. You need to index them, but
luckily, std::vector's are guaranteed to be contiguous in memory when
indexed.

In other words:

std::vector<gr_complex> x;
volk_32fc_something_32fc(&x[0], ...);

Tom



> On Thu, Mar 20, 2014 at 10:07 AM, Tom Rondeau <address@hidden> wrote:
>>
>> On Thu, Mar 20, 2014 at 7:05 AM, Nasi <address@hidden> wrote:
>> > Hi all,
>> >
>> > I am using ubuntu 13.04, GNUradio 3.7.
>> > I have a question related to VOLK library.
>> >
>> > When I create a vector, lets say:
>> >
>> > vector<gr_complex> y1;
>> >
>> > Can I multiply this vector to another vector using VOLK?
>> > Is there any good documentation for this?
>> >
>> > --
>> > NE
>>
>> Myself and Nick McCarthy have published and presented on VOLK. Here's
>> a pretty good overview video of using it:
>> http://www.trondeau.com/blog/2013/6/12/nearly-50-minutes-of-volk.html
>>
>> To answer your question, yes, building a vector like that is
>> acceptable for use with volk kernels as long as you are using the
>> correct data types. Be aware of alignment requirements, though, which
>> the link above explains.
>>
>> Tom
>>
>> _______________________________________________
>> Discuss-gnuradio mailing list
>> address@hidden
>> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
>>
>


--
NE

reply via email to

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