> In The General Work Function I wanted to create 4 outputs this way: > > int > Layer_Mapper_Transmit_Diversity_cc_impl::general_work (int > noutput_items, > gr_vector_int &ninput_items, > gr_vector_const_void_star &input_items, > gr_vector_void_star &output_items) > { > const float **in = (const float **) input_items[0]; > float **out0 = (float **) output_items[0]; > float **out1 = (float **) output_items[1]; > float **out2 = (float **) output_items[2]; > float **out3 = (float **) output_items[3]; > > Because the inputs and outputs are arrays so I declared them as matrices , > does GnuRadio accept this ? > >
So input_items[0] or output_items[1] for example, is a pointer to a linear chunk of memory. Casting it to a float ** might imply that its an array of pointers which each point to a linear row/column of a matrix. But that isnt the case, so things will likely segfault. You could cast the pointer to a C matrix with the double brackets and the fixed widths like a [64][4] for example, I think C will map those double bracketed access nicely to a linear chunk of memory. I hope that helps! -josh > > _______________________________________________ > Discuss-gnuradio mailing list > Discuss-gnuradio@gnu.org > https://lists.gnu.org/mailman/listinfo/discuss-gnuradio > _______________________________________________ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org https://lists.gnu.org/mailman/listinfo/discuss-gnuradio