discuss-gnuradio
[Top][All Lists]
Advanced

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

[Discuss-gnuradio] Work function template for vector I/O


From: Randall Poe
Subject: [Discuss-gnuradio] Work function template for vector I/O
Date: Tue, 11 Feb 2014 12:57:28 -0500

I'm sure this must exist somewhere but I've been unable to find it among the tutorials and mailing lists.
 
I've got the basics of writing blocks down. I've successfully created a C++ block with float input and output streams, and gotten it to load into GRC.
 
Now I'd like to do something more interesting with vector I/O, probably complex vectors. It's my understanding that each input or output item can be an entire vector<float>, correct? and that consuming or generating one item means consuming or generating that entire array?
 
Does anyone have a source example? I'm uncertain about things like what the cast of input_items and output_items should look like. Also the memory allocation. Do I create a new vector for each output item and trust that GRC will destroy it somewhere downstream? I'm talking about vectors that may potentially contain megabytes, so I want to make sure I do the memory management right.
 
        Randy

reply via email to

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