From: Pecevski D. <de...@ig...> - 2009-07-17 09:08:51
|
Hi Nabeelah, The problem that you reported occurs while downcasting of objects within the extension module C++ code, which are created from classes defined in the main PCSIM library. If the class defined in the main pcsim library has multiple inheritance, like in the case of LifNeuron (inherited from LifNeuronBase and CurrentInputTarget) then it seems that the downcasting to CurrentInputTarget doesn't work properly. Whether the class is defined through templates or not should not make any difference. I've changed the code so that the downcasting always occurs in the main PCSIM library, checkout the latest revision from the repository. If you want to implement your own synapse, for downcasting use the functions downcastCurrentInputTarget and downcastConductanceInputTarget. See how it is done in GenericCurrentBasedSpikingSynapse for an example. regards, Dejan Miss Nabeelah Ali wrote: > Hi all, > > I am creating a new synapse class as an extension, however I cannot > use any synapses that I've > created and compiled from the extension module. > > > In fact, I cannot even use the DynamicCurrSquareSynapse that is > provided as an example. When I attempt to use it in a Python program, > for example, this: > > net = SingleThreadNetwork() > inp_nrn = net.create(SpikingInputNeuron([some input spike times here])) > syn = DynamicCurrSquareSynapse # This runs. > out_nrn = net.create(LifNeuron()) > net.connect(inp_nrn, out_nrn, syn) # Gives a runtime error. > > The error I consistently get from net.connect() is: > Unidentifiable C++ exception > > Neurons I create with the extension module work correctly, however. I > experimented with creating different synapse types, and I only get > this error if the synapse is based off templates. So, for example, the > synapse I wanted to create was based off: > > GenericCurrentBasedSpikingSynase<ExponentialDecaySpikeResponse> > > and this synapse gives me the same unidentifiable C++ exception. > > > If I don't use templates to create a synapse, then the synapse will > compile and not give any errors when I try to use it in a Python > script, however it doesn't seem to connect properly to the > postsynaptic neuron: it won't inject current into it. I've attached my > 'experimental' synapse type that I was using to test whether I could > get any synapse to work correctly (because any template-based synapse > gives me errors, I just copied code from the templates and created a > class that directly derives from ExponentialDecaySpikeResponse). > > Any ideas? > > Thanks, > Nabeelah > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------------ > Enter the BlackBerry Developer Challenge > This is your chance to win up to $100,000 in prizes! For a limited time, > vendors submitting new applications to BlackBerry App World(TM) will have > the opportunity to enter the BlackBerry Developer Challenge. See full prize > details at: http://p.sf.net/sfu/Challenge > ------------------------------------------------------------------------ > > _______________________________________________ > Pcsim-users mailing list > Pcs...@li... > https://lists.sourceforge.net/lists/listinfo/pcsim-users > -- _______________________________________________ Dejan Pecevski Institute for Theoretical Computer Science Graz University of Technology Inffeldgasse 16b, A-8010 Graz, Austria Tel. +43 316 873 5849 |