GNU Radio 3.6.5 C++ API

gr_vector_map Class Reference

Maps elements from a set of input vectors to a set of output vectors. More...

#include <gr_vector_map.h>

Inheritance diagram for gr_vector_map:
gr_sync_block gr_block gr_basic_block gr_msg_accepter gruel::msg_accepter

List of all members.

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)

Detailed Description

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).

Parameters:
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

Constructor & Destructor Documentation

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]

Member Function Documentation

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.


Friends And Related Function Documentation

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]

The documentation for this class was generated from the following file: