discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] Using Vectors instead of Arrays


From: Eric Blossom
Subject: Re: [Discuss-gnuradio] Using Vectors instead of Arrays
Date: Sat, 22 Apr 2006 00:25:22 -0700
User-agent: Mutt/1.5.9i

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




reply via email to

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