genn-team / pynn_genn

PyNN interface to GeNN
GNU General Public License v2.0
9 stars 3 forks source link

Fix for special case of AdExp where deltaT==0 #28

Closed neworderofjamie closed 5 years ago

neworderofjamie commented 5 years ago

If delta_t is zero, two things should happen (based on NEST source):

  1. $(V) > $(vThresh) should be used as threshold condition
  2. ($(deltaT) * exp(((V) - $(vThresh)) / $(deltaT))) term should be removed from dV/dt

The result is a bit gross, but I can't think of a nicer way of expressing this so (theoretically) different neurons can have different deltaT - I'm the unused path will get entirely compiled away in the sane case where deltaT is known at compile time. Fix for #25

tnowotny commented 5 years ago

I think you can go ahead and merge.

neworderofjamie commented 5 years ago

It is definitely that smart - in the test it was definitely compiling if((0.0) == 0.0) {

tnowotny commented 5 years ago

Good. The other branch certainly gets removed by the compiler in this case.