GNU Radio 3.6.5 C++ API
|
Maps elements from a set of input vectors to a set of output vectors. More...
#include <gr_vector_map.h>
Public Member Functions | |
int | work (int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items) |
just like gr_block::general_work, only this arranges to call consume_each for you | |
void | set_mapping (std::vector< std::vector< std::vector< size_t > > > mapping) |
Protected Member Functions | |
gr_vector_map (size_t item_size, std::vector< size_t > in_vlens, std::vector< std::vector< std::vector< size_t > > > mapping) | |
Friends | |
GR_CORE_API gr_vector_map_sptr | gr_make_vector_map (size_t item_size, std::vector< size_t > in_vlens, std::vector< std::vector< std::vector< size_t > > > mapping) |
Maps elements from a set of input vectors to a set of output vectors.
If in[i] is the input vector in the i'th stream then the output vector in the j'th stream is:
out[j][k] = in[mapping[j][k][0]][mapping[j][k][1]]
That is mapping is of the form (out_stream1_mapping, out_stream2_mapping, ...) and out_stream1_mapping is of the form (element1_mapping, element2_mapping, ...) and element1_mapping is of the form (in_stream, in_element).
item_size | (integer) size of vector elements |
in_vlens | (vector of integers) number of elements in each input vector |
mapping | (vector of vectors of vectors of integers) how to map elements from input to output vectors |
gr_vector_map::gr_vector_map | ( | size_t | item_size, |
std::vector< size_t > | in_vlens, | ||
std::vector< std::vector< std::vector< size_t > > > | mapping | ||
) | [protected] |
void gr_vector_map::set_mapping | ( | std::vector< std::vector< std::vector< size_t > > > | mapping | ) |
int gr_vector_map::work | ( | int | noutput_items, |
gr_vector_const_void_star & | input_items, | ||
gr_vector_void_star & | output_items | ||
) | [virtual] |
just like gr_block::general_work, only this arranges to call consume_each for you
The user must override work to define the signal processing code
Implements gr_sync_block.
GR_CORE_API gr_vector_map_sptr gr_make_vector_map | ( | size_t | item_size, |
std::vector< size_t > | in_vlens, | ||
std::vector< std::vector< std::vector< size_t > > > | mapping | ||
) | [friend] |