Forum: GNU Radio Using Vectors instead of Arrays

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Garrett Mcgrath (Guest)
on 2006-04-22 11:17
(Received via mailing list)
I'm not sure if this has been address but someone else must have thought
along this line at some point.  Is there any way to pass the arguments
into
and out of c++ block code using c++ vector objects instead of array
types.
I need to write a bunch of helper functions that actually do my work and
all
this array data passing was killing me.  As such I've converted to a
vector
system (also enjoying the higher readability and direct assignment
constructor.)  However I've not got to convert out of a vector and into
a
string to output at the end of my code.  Any suggestions?

-Garrett McGrath
Eric B. (Guest)
on 2006-04-22 11:29
(Received via mailing list)
On Sat, Apr 22, 2006 at 03:15:01AM -0400, Garrett Mcgrath wrote:
> I'm not sure if this has been address but someone else must have thought
> along this line at some point.  Is there any way to pass the arguments into
> and out of c++ block code using c++ vector objects instead of array types.
> I need to write a bunch of helper functions that actually do my work and all
> this array data passing was killing me.  As such I've converted to a vector
> system (also enjoying the higher readability and direct assignment
> constructor.)  However I've not got to convert out of a vector and into a
> string to output at the end of my code.  Any suggestions?

We've tried hard to avoid copying data around, hence the use of
pointers instead of vector types for the i/o to blocks.  Also, behind
the scenes we doing some fairly fancy management of the underlying raw
memory.  We implement what is effectivly a circular buffer, but do it
in such a way that no user code needs to check for the wrapping
condition.  We do it by mapping a chunk of memory into the virtual
address space twice.

Regarding your last question, vector of what to string of what?

Eric
This topic is locked and can not be replied to.