[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Discuss-gnuradio] "vector size" instead of the "regular size" in cl
From: |
Tom Rondeau |
Subject: |
Re: [Discuss-gnuradio] "vector size" instead of the "regular size" in class/object definition |
Date: |
Thu, 31 Oct 2013 10:56:25 -0400 |
On Wed, Oct 30, 2013 at 7:36 PM, Arturo Rinaldi <address@hidden> wrote:
> Hi folks,
>
> is it possible to modify the input size at python level by using vectors ?
> What I specifically mean is that I want to build a hierachical block and
> giving it as input two vectors :
>
> class error_rate_vector_iif(gr.hier_block2):
>
> #init
> gr.hier_block2.__init__(
> self, 'error_rate_vector_iif',
> gr.io_signature(2, 2, gr.sizeof_int,
> gr.io_signature(1, 1, gr.sizeof_float),
> )
>
> So my question is, is there a way to use a sort of "fictional"
> gr.sizeofvector_int instead of gr.sizeof_int size in the definition of my
> python class ? Basically, I need to compare two vectors and increase a
> counter while a difference between their elements is spotted......can
> anybody help me ?
>
> thank you in advance as always
>
> Kind Regards,
>
> Arturo
If I'm understanding correctly, you should just be able to multiply
the gr.sizeof_int with the vector size (N):
gr.hier_block2.__init__(
self, 'error_rate_vector_iif',
gr.io_signature(2, 2, N*gr.sizeof_int),
gr.io_signature(1, 1, gr.sizeof_float),
)
Tom