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

Re: FOR_ITR_GP Con_Group doesn't iterate

"Joshua W. Brown" <jwbrown@artsci.wustl.edu> writes:
> I am writing a new pdp++ module to add real-time simulation capabilities (e.g., 
> to model certain electrophysiological cell types as a system of finite 
> difference equations), and I can't get the FOR_ITR_GP() macro to iterate over a 
> class instance derived from Con_Group.  It is as if the instance is empty, but 
> I haven't been able to figure out how to fix it after days of trying and 
> searching the pdp-discuss archives.  The code is at

FOR_ITR_GP only loops over groups that actually have connections in
them -- it skips empty subgroups.  So, if you are debugging things
w/out having connections in your groups, that is likely the problem.
As you can tell, this same macro works fine on lots of other code so I
can't imagine it is a problem with the macro, but rather something
about the way your connections are created.  It expects one Con_Group
per projection into the unit, so to debug you should look at
u->recv.gp.size and then look at how many connections are in each gp:
u->recv.gp[i].size.. if it has connections and its still not working,
then somehow the leaf groups are not updated properly..

				- Randy