|
From: | Johannes Demel |
Subject: | Re: Problem using volk_32fc_s32fc_multiply_32fc function with vector params |
Date: | Tue, 3 May 2022 09:44:41 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 |
Hi George,All VOLK functions require pointers as you already noticed. You can access the underlying data structure of a vector via its `.data()` method as Brian noted. Moreover, you can use `volk::vector` if you want your vectors to be aligned. `volk::vector` is almost a `std::vector` but uses its own allocator that ensures alignment. `volk::vector` is available in `volk/volk_alloc.hh`. Since it is a C++ only feature.
Cheers Johannes On 03.05.22 04:28, George Edwards wrote:
Hello GNURadio Community,I am having a problem using the above function with vector parameters. If I use an array say:gr_complex my_val[240]; volk_32fc_s32fc_multiply_32fc(my_val, my_val, scale, 240); It works! But if I change my_val to be a vector like below, it fails: std::vector <gr_complex> my_val(240);The reason I need to use a vector is that with arrays, the size must be known at compile time, while with vectors one can build it at runtime.I would appreciate any suggestions. Thank you! George
[Prev in Thread] | Current Thread | [Next in Thread] |