2021-11-05 15:14:34,262 DIAGNOSTIC brian2: Logging to file: /tmp/brian_debug_q7mz5oe4.log, copy of main script saved as: /tmp/brian_script_tapnrtig.py 2021-11-05 15:14:34,262 DIAGNOSTIC brian2: Python interpreter: /usr/bin/python3 2021-11-05 15:14:34,262 DIAGNOSTIC brian2: Platform: linux 2021-11-05 15:14:34,262 DIAGNOSTIC brian2: brian version is: 2.4.2 2021-11-05 15:14:34,262 DIAGNOSTIC brian2: numpy version is: 1.20.3 2021-11-05 15:14:34,262 DIAGNOSTIC brian2: scipy version is: 1.7.1 2021-11-05 15:14:34,262 DIAGNOSTIC brian2: sympy version is: 1.8 2021-11-05 15:14:34,262 DIAGNOSTIC brian2: python version is: 3.9.7 (default, Sep 10 2021, 14:59:43) [GCC 11.2.0] 2021-11-05 15:14:34,282 INFO brian2: Cache size for target "cython": 2639 MB. You can call "clear_cache('cython')" to delete all files from the cache or manually delete files in the "/home/nikos/.cython/brian_extensions" directory. 2021-11-05 15:14:34,369 DIAGNOSTIC brian2.core.names: Created object of class NeuronGroup with name EC_pyCAN 2021-11-05 15:14:34,370 DIAGNOSTIC brian2.core.base: Created BrianObject with name EC_pyCAN, clock=Clock(dt=100. * usecond, name='defaultclock'), when=start, order=0 2021-11-05 15:14:34,547 DIAGNOSTIC brian2.groups.neurongroup: Creating NeuronGroup of size 10000, equations alphamCaL = (0.055 * mV ** -1) * ((-27 * mV) - v) / (exp(((-27 * mV) - v) / (3.8 * mV)) - 1.) / ms : Hz I_M = ((gM) * (size)) * p * (v - Ek) : A alphah = 0.128 * exp(- (v - (-55 * mV) - 17 * mV) / (18 * mV)) / ms : Hz betan = 0.5 * exp( - (v - (-55 * mV) - 10 * mV) / (40 * mV)) / ms : Hz I_SynHipp = + ge_hipp * (v - (0 * mV)) : A alphan = - 0.032 * (mV ** -1) * (v - (-55 * mV) - 15 * mV) / (exp(- (v - (-55 * mV) - 15 * mV) / (5 * mV)) - 1.) / ms : Hz I_Na = ((50 * msiemens * cm ** -2) * (size)) * (m ** 3) * h * (v - (50 * mV)) : A betahCaL = 0.0065 / (exp(((-15 * mV) - v) / (28 * mV)) + 1.) / ms : Hz I_CAN = ((gCAN) * (size)) * mCAN ** 2 * (v - (-20 * mV)) : A I_SynExt = + ge_ext * (v - (0 * mV)) : A pInf = 1. / (1 + exp(- (v + (35 * mV)) / (10 * mV))) : 1 I_stim = inputs_stim(t) : A alpha2 = (0.0002 * ms ** -1) * (Ca_i / (5e-4 * mole * metre ** -3)) ** 2 : Hz pTau = (1000 * ms) / (3.3 * exp((v + (35 * mV)) / (20 * mV)) + exp(- (v + (35 * mV)) / (20 * mV))) : s I_Ca = ((1e-4 * siemens * cm ** -2) * (size)) * (mCaL ** 2) * hCaL * (v - (120 * mV)) : A I_SynI = + gi*(v - 0 * mV)*int(Cl>0.5) + gi*(v - (-80 * mV))*int(Cl<=0.5) : A I_K = ((5 * msiemens * cm ** -2) * (size)) * (n ** 4) * (v - Ek) : A betam = 0.28 * (mV ** -1) * (v - (-55 * mV) - 40 * mV) / (exp((v - (-55 * mV) - 40 * mV) / (5 * mV)) - 1.) / ms : Hz I_SynE = + ge * (v - (0 * mV)) : A betamCaL = 0.94 * exp(((-75 * mV) - v) / (17 * mV)) / ms : Hz alpham = - 0.32 * (mV ** -1) * (v - (-55 * mV) - 13 * mV) / (exp(- (v - (-55 * mV) - 13 * mV) / (4 * mV)) - 1.) / ms : Hz mCANInf = alpha2 / (alpha2 + (0.0002 * ms ** -1)) : 1 I_leak = ((1e-5 * siemens * cm ** -2) * (size)) * (v - (-70*mV)) : A alphahCaL = 0.000457 * exp(((-13 * mV) - v) / (50 * mV)) / ms : Hz mCANTau = 1. / (alpha2 + (0.0002 * ms ** -1)) / (3.0 ** ((36. -22) / 10)) : s G_sin = 1.5*int(z_soma<100*scale)*int(z_soma>0*scale) : 1 betah = 4. / (1 + exp(- (v - (-55 * mV) - 40 * mV) / (5 * mV))) / ms : Hz driveChannel = (-(1e4) * I_Ca / (cm ** 2)) / (2 * (96489 * coulomb * mole ** -1) * (1 * umetre)) : mol m^-3 Hz Vm = ( - I_CAN - I_M - I_leak - I_K - I_Na - I_Ca) / ((1 * ufarad * cm ** -2) * (size))*tstep : V dCa_i/dt = driveChannel + ((2.4e-4 * mole * metre**-3) - Ca_i) / (200 * ms) : mM dCl/dt = -Cl/tau_Cl : 1 dge/dt = (-ge+he) * (1. / (0.3 * ms)) : S dge_ext/dt = (-ge_ext+he_ext) * (1. / (0.3 * ms)) : S dge_hipp/dt = (-ge_hipp+he_hipp) * (1. / (0.3 * ms)) : S dgi/dt = (-gi+hi) * (1. / (1 * ms)) : S dglu/dt = (1-glu)/(3*second) : 1 dh/dt = alphah * (1 - h) - betah * h : 1 dhCaL/dt = (alphahCaL * (1 - hCaL)) - (betahCaL * hCaL) : 1 dhe/dt = -he/(5*ms) : S dhe_ext/dt = -he_ext/(5*ms) : S dhe_hipp/dt = -he_hipp/(5*ms) : S dhi/dt = -hi/(10*ms) : S dm/dt = alpham * (1 - m) - betam * m : 1 dmCAN/dt = (mCANInf - mCAN) / mCANTau : 1 dmCaL/dt = (alphamCaL * (1 - mCaL)) - (betamCaL * mCaL) : 1 dn/dt = alphan * (1 - n) - betan * n : 1 dp/dt = (pInf - p) / pTau : 1 dv/dt = ( - I_CAN - I_M - I_leak - I_K - I_Na - I_Ca - I_SynE - I_SynExt - I_SynI - I_SynHipp + G_sin*I_exc + r*I_stim) / ((1 * ufarad * cm ** -2) * (size)) + noise : V I_exc : A (linked) lastspike : s noise : V/s not_refractory : 1 r : 1 size : m^2 x_dendrite : m x_soma : m y_dendrite : m y_soma : m z_dendrite : m z_soma : m. 2021-11-05 15:14:34,549 DIAGNOSTIC brian2.core.names: Created object of class Thresholder with name EC_pyCAN_thresholder 2021-11-05 15:14:34,549 DIAGNOSTIC brian2.core.base: Created BrianObject with name EC_pyCAN_thresholder, clock=Clock(dt=100. * usecond, name='defaultclock'), when=thresholds, order=0 2021-11-05 15:14:34,549 DIAGNOSTIC brian2.core.names: Created object of class Resetter with name EC_pyCAN_resetter 2021-11-05 15:14:34,549 DIAGNOSTIC brian2.core.base: Created BrianObject with name EC_pyCAN_resetter, clock=Clock(dt=100. * usecond, name='defaultclock'), when=resets, order=0 2021-11-05 15:14:34,549 DIAGNOSTIC brian2.core.names: Created object of class StateUpdater with name EC_pyCAN_stateupdater 2021-11-05 15:14:34,550 DIAGNOSTIC brian2.core.base: Created BrianObject with name EC_pyCAN_stateupdater, clock=Clock(dt=100. * usecond, name='defaultclock'), when=groups, order=0 2021-11-05 15:14:34,550 DIAGNOSTIC brian2.core.names: Created object of class SubexpressionUpdater with name EC_pyCAN_subexpression_update 2021-11-05 15:14:34,550 DIAGNOSTIC brian2.core.base: Created BrianObject with name EC_pyCAN_subexpression_update, clock=Clock(dt=100. * usecond, name='defaultclock'), when=before_start, order=0 2021-11-05 15:14:37,079 DIAGNOSTIC brian2.core.names: Created object of class NeuronGroup with name EC_inh 2021-11-05 15:14:37,080 DIAGNOSTIC brian2.core.base: Created BrianObject with name EC_inh, clock=Clock(dt=100. * usecond, name='defaultclock'), when=start, order=0 2021-11-05 15:14:37,123 DIAGNOSTIC brian2.groups.neurongroup: Creating NeuronGroup of size 1000, equations betam = 4 * exp(- (v + 60 * mV) / (18 * mV)) / ms : Hz I_Na = ((35e-3 * siemens * cm ** -2) * (size)) * (m ** 3) * h * (v - (55 * mV)) : A I_SynE = + ge * (v - (0 * mV)) : A I_leak = ((0.1e-3 * siemens * cm ** -2) * (size)) * (v - (-65 * mV)) : A I_SynExt = + ge_ext * (v - (0 * mV)) : A alphah = 0.07 * exp(- (v + 58 * mV) / (20 * mV)) / ms : Hz I_stim = inputs_stim(t) : A betan = 0.125 * exp( - (v + 44 * mV) / (80 * mV)) / ms : Hz I_SynHipp = + ge_hipp * (v - (0 * mV)) : A I_SynI = + gi * (v - (-80 * mV)) : A alpham = 0.1 * (mV ** -1) * (v + 35 * mV) / (1. - exp(- (v + 35 * mV) / (10 * mV))) / ms : Hz alphan = 0.01 * (mV ** -1) * (v + 34 * mV) / (1. - exp(- 0.1 * (mV ** -1) * (v + 34 * mV))) / ms : Hz G_sin = 1.5*int(z_soma<100*scale)*int(z_soma>0*scale) : 1 m_inf = alpham / (alpham + betam) : 1 n_inf = alphan / (alphan + betan) : 1 I_K = ((9e-3 * siemens * cm ** -2) * (size)) * (n ** 4) * (v - (-90 * mV)) : A betah = 1. / (exp((- 0.1 * (mV ** -1)) * (v + 28 * mV)) + 1.) / ms : Hz Vm = (- I_leak - I_K - I_Na) / ((1 * ufarad * cm ** -2) * (size))*tstep : V tau_n = 0.2 / (alphan + betan) : s tau_m = 0.2 / (alpham + betam) : s tau_h = 0.2 / (alphah + betah) : s h_inf = alphah / (alphah + betah) : 1 dge/dt = (-ge+he) * (1. / (0.3 * ms)) : S dge_ext/dt = (-ge_ext+he_ext) * (1. / (0.3 * ms)) : S dge_hipp/dt = (-ge_hipp+he_hipp) * (1. / (0.3 * ms)) : S dgi/dt = (-gi+hi) * (1. / (1 * ms)) : S dh/dt = (h_inf - h) / tau_h : 1 dhe/dt = -he/(5*ms) : S dhe_ext/dt = -he_ext/(5*ms) : S dhe_hipp/dt = -he_hipp/(5*ms) : S dhi/dt = -hi/(10*ms) : S dm/dt = (m_inf - m) / tau_m : 1 dn/dt = (n_inf - n) / tau_n : 1 dv/dt = ( - I_leak - I_K - I_Na - I_SynE - I_SynExt - I_SynHipp - I_SynI + G_sin*I_exc + r*I_stim) / ((1 * ufarad * cm ** -2) * (size)) + noise : V I_exc : A (linked) lastspike : s noise : V/s not_refractory : 1 r : 1 size : m^2 x_soma : m y_soma : m z_soma : m. 2021-11-05 15:14:37,124 DIAGNOSTIC brian2.core.names: Created object of class Thresholder with name EC_inh_thresholder 2021-11-05 15:14:37,124 DIAGNOSTIC brian2.core.base: Created BrianObject with name EC_inh_thresholder, clock=Clock(dt=100. * usecond, name='defaultclock'), when=thresholds, order=0 2021-11-05 15:14:37,124 DIAGNOSTIC brian2.core.names: Created object of class StateUpdater with name EC_inh_stateupdater 2021-11-05 15:14:37,124 DIAGNOSTIC brian2.core.base: Created BrianObject with name EC_inh_stateupdater, clock=Clock(dt=100. * usecond, name='defaultclock'), when=groups, order=0 2021-11-05 15:14:37,124 DIAGNOSTIC brian2.core.names: Created object of class SubexpressionUpdater with name EC_inh_subexpression_update 2021-11-05 15:14:37,124 DIAGNOSTIC brian2.core.base: Created BrianObject with name EC_inh_subexpression_update, clock=Clock(dt=100. * usecond, name='defaultclock'), when=before_start, order=0 2021-11-05 15:14:37,370 DIAGNOSTIC brian2.core.names: Created object of class NeuronGroup with name DG_py 2021-11-05 15:14:37,370 DIAGNOSTIC brian2.core.base: Created BrianObject with name DG_py, clock=Clock(dt=100. * usecond, name='defaultclock'), when=start, order=0 2021-11-05 15:14:37,392 DIAGNOSTIC brian2.groups.neurongroup: Creating NeuronGroup of size 10000, equations alphamCaL = (0.055 * mV ** -1) * ((-27 * mV) - v) / (exp(((-27 * mV) - v) / (3.8 * mV)) - 1.) / ms : Hz I_M = ((gM) * (size)) * p * (v - Ek) : A alphah = 0.128 * exp(- (v - (-55 * mV) - 17 * mV) / (18 * mV)) / ms : Hz betan = 0.5 * exp( - (v - (-55 * mV) - 10 * mV) / (40 * mV)) / ms : Hz I_SynHipp = + ge_hipp * (v - (0 * mV)) : A alphan = - 0.032 * (mV ** -1) * (v - (-55 * mV) - 15 * mV) / (exp(- (v - (-55 * mV) - 15 * mV) / (5 * mV)) - 1.) / ms : Hz I_Na = ((50 * msiemens * cm ** -2) * (size)) * (m ** 3) * h * (v - (50 * mV)) : A betahCaL = 0.0065 / (exp(((-15 * mV) - v) / (28 * mV)) + 1.) / ms : Hz I_SynExt = + ge_ext * (v - (0 * mV)) : A pInf = 1. / (1 + exp(- (v + (35 * mV)) / (10 * mV))) : 1 I_stim = inputs_stim(t) : A pTau = (1000 * ms) / (3.3 * exp((v + (35 * mV)) / (20 * mV)) + exp(- (v + (35 * mV)) / (20 * mV))) : s I_Ca = ((1e-4 * siemens * cm ** -2) * (size)) * (mCaL ** 2) * hCaL * (v - (120 * mV)) : A I_SynI = + gi*(v - 0 * mV)*int(Cl>0.5) + gi*(v - (-80 * mV))*int(Cl<=0.5) : A I_K = ((5 * msiemens * cm ** -2) * (size)) * (n ** 4) * (v - Ek) : A betam = 0.28 * (mV ** -1) * (v - (-55 * mV) - 40 * mV) / (exp((v - (-55 * mV) - 40 * mV) / (5 * mV)) - 1.) / ms : Hz I_SynE = + ge * (v - (0 * mV)) : A betamCaL = 0.94 * exp(((-75 * mV) - v) / (17 * mV)) / ms : Hz alpham = - 0.32 * (mV ** -1) * (v - (-55 * mV) - 13 * mV) / (exp(- (v - (-55 * mV) - 13 * mV) / (4 * mV)) - 1.) / ms : Hz I_leak = ((1e-5 * siemens * cm ** -2) * (size)) * (v - (-70*mV)) : A alphahCaL = 0.000457 * exp(((-13 * mV) - v) / (50 * mV)) / ms : Hz betah = 4. / (1 + exp(- (v - (-55 * mV) - 40 * mV) / (5 * mV))) / ms : Hz driveChannel = (-(1e4) * I_Ca / (cm ** 2)) / (2 * (96489 * coulomb * mole ** -1) * (1 * umetre)) : mol m^-3 Hz Vm = ( - I_M - I_leak - I_K - I_Na - I_Ca) / ((1 * ufarad * cm ** -2) * (size))*tstep : V dCa_i/dt = driveChannel + ((2.4e-4 * mole * metre**-3) - Ca_i) / (200 * ms) : mM dCl/dt = -Cl/tau_Cl : 1 dge/dt = (-ge+he) * (1. / (0.3 * ms)) : S dge_ext/dt = (-ge_ext+he_ext) * (1. / (0.3 * ms)) : S dge_hipp/dt = (-ge_hipp+he_hipp) * (1. / (0.3 * ms)) : S dgi/dt = (-gi+hi) * (1. / (1 * ms)) : S dglu/dt = (1-glu)/(3*second) : 1 dh/dt = alphah * (1 - h) - betah * h : 1 dhCaL/dt = (alphahCaL * (1 - hCaL)) - (betahCaL * hCaL) : 1 dhe/dt = -he/(5*ms) : S dhe_ext/dt = -he_ext/(5*ms) : S dhe_hipp/dt = -he_hipp/(5*ms) : S dhi/dt = -hi/(10*ms) : S dm/dt = alpham * (1 - m) - betam * m : 1 dmCaL/dt = (alphamCaL * (1 - mCaL)) - (betamCaL * mCaL) : 1 dn/dt = alphan * (1 - n) - betan * n : 1 dp/dt = (pInf - p) / pTau : 1 dv/dt = ( - I_M - I_leak - I_K - I_Na - I_Ca - I_SynE - I_SynExt - I_SynI - I_SynHipp + r*I_stim) / ((1 * ufarad * cm ** -2) * (size)) + noise : V lastspike : s noise : V/s not_refractory : 1 r : 1 size : m^2 x_dendrite : m x_soma : m y_dendrite : m y_soma : m z_dendrite : m z_soma : m. 2021-11-05 15:14:37,394 DIAGNOSTIC brian2.core.names: Created object of class Thresholder with name DG_py_thresholder 2021-11-05 15:14:37,394 DIAGNOSTIC brian2.core.base: Created BrianObject with name DG_py_thresholder, clock=Clock(dt=100. * usecond, name='defaultclock'), when=thresholds, order=0 2021-11-05 15:14:37,394 DIAGNOSTIC brian2.core.names: Created object of class Resetter with name DG_py_resetter 2021-11-05 15:14:37,394 DIAGNOSTIC brian2.core.base: Created BrianObject with name DG_py_resetter, clock=Clock(dt=100. * usecond, name='defaultclock'), when=resets, order=0 2021-11-05 15:14:37,394 DIAGNOSTIC brian2.core.names: Created object of class StateUpdater with name DG_py_stateupdater 2021-11-05 15:14:37,394 DIAGNOSTIC brian2.core.base: Created BrianObject with name DG_py_stateupdater, clock=Clock(dt=100. * usecond, name='defaultclock'), when=groups, order=0 2021-11-05 15:14:37,395 DIAGNOSTIC brian2.core.names: Created object of class SubexpressionUpdater with name DG_py_subexpression_update 2021-11-05 15:14:37,395 DIAGNOSTIC brian2.core.base: Created BrianObject with name DG_py_subexpression_update, clock=Clock(dt=100. * usecond, name='defaultclock'), when=before_start, order=0 2021-11-05 15:14:39,982 DIAGNOSTIC brian2.core.names: Created object of class NeuronGroup with name DG_inh 2021-11-05 15:14:39,983 DIAGNOSTIC brian2.core.base: Created BrianObject with name DG_inh, clock=Clock(dt=100. * usecond, name='defaultclock'), when=start, order=0 2021-11-05 15:14:39,999 DIAGNOSTIC brian2.groups.neurongroup: Creating NeuronGroup of size 100, equations betam = 4 * exp(- (v + 60 * mV) / (18 * mV)) / ms : Hz I_Na = ((35e-3 * siemens * cm ** -2) * (size)) * (m ** 3) * h * (v - (55 * mV)) : A I_SynE = + ge * (v - (0 * mV)) : A I_leak = ((0.1e-3 * siemens * cm ** -2) * (size)) * (v - (-65 * mV)) : A I_SynExt = + ge_ext * (v - (0 * mV)) : A alphah = 0.07 * exp(- (v + 58 * mV) / (20 * mV)) / ms : Hz I_stim = inputs_stim(t) : A betan = 0.125 * exp( - (v + 44 * mV) / (80 * mV)) / ms : Hz I_SynHipp = + ge_hipp * (v - (0 * mV)) : A alpham = 0.1 * (mV ** -1) * (v + 35 * mV) / (1. - exp(- (v + 35 * mV) / (10 * mV))) / ms : Hz alphan = 0.01 * (mV ** -1) * (v + 34 * mV) / (1. - exp(- 0.1 * (mV ** -1) * (v + 34 * mV))) / ms : Hz I_SynI = + gi * (v - (-80 * mV)) : A m_inf = alpham / (alpham + betam) : 1 I_K = ((9e-3 * siemens * cm ** -2) * (size)) * (n ** 4) * (v - (-90 * mV)) : A betah = 1. / (exp((- 0.1 * (mV ** -1)) * (v + 28 * mV)) + 1.) / ms : Hz Vm = (- I_leak - I_K - I_Na) / ((1 * ufarad * cm ** -2) * (size))*tstep : V tau_n = 0.2 / (alphan + betan) : s tau_m = 0.2 / (alpham + betam) : s tau_h = 0.2 / (alphah + betah) : s h_inf = alphah / (alphah + betah) : 1 n_inf = alphan / (alphan + betan) : 1 dge/dt = (-ge+he) * (1. / (0.3 * ms)) : S dge_ext/dt = (-ge_ext+he_ext) * (1. / (0.3 * ms)) : S dge_hipp/dt = (-ge_hipp+he_hipp) * (1. / (0.3 * ms)) : S dgi/dt = (-gi+hi) * (1. / (1 * ms)) : S dh/dt = (h_inf - h) / tau_h : 1 dhe/dt = -he/(5*ms) : S dhe_ext/dt = -he_ext/(5*ms) : S dhe_hipp/dt = -he_hipp/(5*ms) : S dhi/dt = -hi/(10*ms) : S dm/dt = (m_inf - m) / tau_m : 1 dn/dt = (n_inf - n) / tau_n : 1 dv/dt = ( - I_leak - I_K - I_Na - I_SynE - I_SynExt - I_SynHipp - I_SynI + r*I_stim) / ((1 * ufarad * cm ** -2) * (size)) + noise : V lastspike : s noise : V/s not_refractory : 1 r : 1 size : m^2 x_soma : m y_soma : m z_soma : m. 2021-11-05 15:14:40,000 DIAGNOSTIC brian2.core.names: Created object of class Thresholder with name DG_inh_thresholder 2021-11-05 15:14:40,000 DIAGNOSTIC brian2.core.base: Created BrianObject with name DG_inh_thresholder, clock=Clock(dt=100. * usecond, name='defaultclock'), when=thresholds, order=0 2021-11-05 15:14:40,001 DIAGNOSTIC brian2.core.names: Created object of class StateUpdater with name DG_inh_stateupdater 2021-11-05 15:14:40,001 DIAGNOSTIC brian2.core.base: Created BrianObject with name DG_inh_stateupdater, clock=Clock(dt=100. * usecond, name='defaultclock'), when=groups, order=0 2021-11-05 15:14:40,001 DIAGNOSTIC brian2.core.names: Created object of class SubexpressionUpdater with name DG_inh_subexpression_update 2021-11-05 15:14:40,001 DIAGNOSTIC brian2.core.base: Created BrianObject with name DG_inh_subexpression_update, clock=Clock(dt=100. * usecond, name='defaultclock'), when=before_start, order=0 2021-11-05 15:14:40,028 DIAGNOSTIC brian2.core.names: Created object of class NeuronGroup with name CA3_pyCAN 2021-11-05 15:14:40,028 DIAGNOSTIC brian2.core.base: Created BrianObject with name CA3_pyCAN, clock=Clock(dt=100. * usecond, name='defaultclock'), when=start, order=0 2021-11-05 15:14:40,049 DIAGNOSTIC brian2.groups.neurongroup: Creating NeuronGroup of size 1000, equations alphamCaL = (0.055 * mV ** -1) * ((-27 * mV) - v) / (exp(((-27 * mV) - v) / (3.8 * mV)) - 1.) / ms : Hz I_M = ((gM) * (size)) * p * (v - Ek) : A alphah = 0.128 * exp(- (v - (-55 * mV) - 17 * mV) / (18 * mV)) / ms : Hz betan = 0.5 * exp( - (v - (-55 * mV) - 10 * mV) / (40 * mV)) / ms : Hz I_SynHipp = + ge_hipp * (v - (0 * mV)) : A alphan = - 0.032 * (mV ** -1) * (v - (-55 * mV) - 15 * mV) / (exp(- (v - (-55 * mV) - 15 * mV) / (5 * mV)) - 1.) / ms : Hz I_Na = ((50 * msiemens * cm ** -2) * (size)) * (m ** 3) * h * (v - (50 * mV)) : A betahCaL = 0.0065 / (exp(((-15 * mV) - v) / (28 * mV)) + 1.) / ms : Hz I_CAN = ((gCAN) * (size)) * mCAN ** 2 * (v - (-20 * mV)) : A I_SynExt = + ge_ext * (v - (0 * mV)) : A pInf = 1. / (1 + exp(- (v + (35 * mV)) / (10 * mV))) : 1 I_stim = inputs_stim(t) : A alpha2 = (0.0002 * ms ** -1) * (Ca_i / (5e-4 * mole * metre ** -3)) ** 2 : Hz pTau = (1000 * ms) / (3.3 * exp((v + (35 * mV)) / (20 * mV)) + exp(- (v + (35 * mV)) / (20 * mV))) : s I_Ca = ((1e-4 * siemens * cm ** -2) * (size)) * (mCaL ** 2) * hCaL * (v - (120 * mV)) : A I_SynI = + gi*(v - 0 * mV)*int(Cl>0.5) + gi*(v - (-80 * mV))*int(Cl<=0.5) : A I_K = ((5 * msiemens * cm ** -2) * (size)) * (n ** 4) * (v - Ek) : A betam = 0.28 * (mV ** -1) * (v - (-55 * mV) - 40 * mV) / (exp((v - (-55 * mV) - 40 * mV) / (5 * mV)) - 1.) / ms : Hz I_SynE = + ge * (v - (0 * mV)) : A betamCaL = 0.94 * exp(((-75 * mV) - v) / (17 * mV)) / ms : Hz alpham = - 0.32 * (mV ** -1) * (v - (-55 * mV) - 13 * mV) / (exp(- (v - (-55 * mV) - 13 * mV) / (4 * mV)) - 1.) / ms : Hz mCANInf = alpha2 / (alpha2 + (0.0002 * ms ** -1)) : 1 I_leak = ((1e-5 * siemens * cm ** -2) * (size)) * (v - (-70*mV)) : A alphahCaL = 0.000457 * exp(((-13 * mV) - v) / (50 * mV)) / ms : Hz mCANTau = 1. / (alpha2 + (0.0002 * ms ** -1)) / (3.0 ** ((36. -22) / 10)) : s betah = 4. / (1 + exp(- (v - (-55 * mV) - 40 * mV) / (5 * mV))) / ms : Hz driveChannel = (-(1e4) * I_Ca / (cm ** 2)) / (2 * (96489 * coulomb * mole ** -1) * (1 * umetre)) : mol m^-3 Hz Vm = ( - I_CAN - I_M - I_leak - I_K - I_Na - I_Ca) / ((1 * ufarad * cm ** -2) * (size))*tstep : V dCa_i/dt = driveChannel + ((2.4e-4 * mole * metre**-3) - Ca_i) / (200 * ms) : mM dCl/dt = -Cl/tau_Cl : 1 dge/dt = (-ge+he) * (1. / (0.3 * ms)) : S dge_ext/dt = (-ge_ext+he_ext) * (1. / (0.3 * ms)) : S dge_hipp/dt = (-ge_hipp+he_hipp) * (1. / (0.3 * ms)) : S dgi/dt = (-gi+hi) * (1. / (1 * ms)) : S dglu/dt = (1-glu)/(3*second) : 1 dh/dt = alphah * (1 - h) - betah * h : 1 dhCaL/dt = (alphahCaL * (1 - hCaL)) - (betahCaL * hCaL) : 1 dhe/dt = -he/(5*ms) : S dhe_ext/dt = -he_ext/(5*ms) : S dhe_hipp/dt = -he_hipp/(5*ms) : S dhi/dt = -hi/(10*ms) : S dm/dt = alpham * (1 - m) - betam * m : 1 dmCAN/dt = (mCANInf - mCAN) / mCANTau : 1 dmCaL/dt = (alphamCaL * (1 - mCaL)) - (betamCaL * mCaL) : 1 dn/dt = alphan * (1 - n) - betan * n : 1 dp/dt = (pInf - p) / pTau : 1 dv/dt = ( - I_CAN - I_M - I_leak - I_K - I_Na - I_Ca - I_SynE - I_SynExt - I_SynI - I_SynHipp + r*I_stim) / ((1 * ufarad * cm ** -2) * (size)) + noise : V lastspike : s noise : V/s not_refractory : 1 r : 1 size : m^2 x_dendrite : m x_soma : m y_dendrite : m y_soma : m z_dendrite : m z_soma : m. 2021-11-05 15:14:40,050 DIAGNOSTIC brian2.core.names: Created object of class Thresholder with name CA3_pyCAN_thresholder 2021-11-05 15:14:40,050 DIAGNOSTIC brian2.core.base: Created BrianObject with name CA3_pyCAN_thresholder, clock=Clock(dt=100. * usecond, name='defaultclock'), when=thresholds, order=0 2021-11-05 15:14:40,050 DIAGNOSTIC brian2.core.names: Created object of class Resetter with name CA3_pyCAN_resetter 2021-11-05 15:14:40,050 DIAGNOSTIC brian2.core.base: Created BrianObject with name CA3_pyCAN_resetter, clock=Clock(dt=100. * usecond, name='defaultclock'), when=resets, order=0 2021-11-05 15:14:40,051 DIAGNOSTIC brian2.core.names: Created object of class StateUpdater with name CA3_pyCAN_stateupdater 2021-11-05 15:14:40,051 DIAGNOSTIC brian2.core.base: Created BrianObject with name CA3_pyCAN_stateupdater, clock=Clock(dt=100. * usecond, name='defaultclock'), when=groups, order=0 2021-11-05 15:14:40,051 DIAGNOSTIC brian2.core.names: Created object of class SubexpressionUpdater with name CA3_pyCAN_subexpression_update 2021-11-05 15:14:40,051 DIAGNOSTIC brian2.core.base: Created BrianObject with name CA3_pyCAN_subexpression_update, clock=Clock(dt=100. * usecond, name='defaultclock'), when=before_start, order=0 2021-11-05 15:14:40,292 DIAGNOSTIC brian2.core.names: Created object of class NeuronGroup with name CA3_inh 2021-11-05 15:14:40,293 DIAGNOSTIC brian2.core.base: Created BrianObject with name CA3_inh, clock=Clock(dt=100. * usecond, name='defaultclock'), when=start, order=0 2021-11-05 15:14:40,295 DIAGNOSTIC brian2.groups.neurongroup: Creating NeuronGroup of size 100, equations betam = 4 * exp(- (v + 60 * mV) / (18 * mV)) / ms : Hz I_Na = ((35e-3 * siemens * cm ** -2) * (size)) * (m ** 3) * h * (v - (55 * mV)) : A I_SynE = + ge * (v - (0 * mV)) : A I_leak = ((0.1e-3 * siemens * cm ** -2) * (size)) * (v - (-65 * mV)) : A I_SynExt = + ge_ext * (v - (0 * mV)) : A alphah = 0.07 * exp(- (v + 58 * mV) / (20 * mV)) / ms : Hz I_stim = inputs_stim(t) : A betan = 0.125 * exp( - (v + 44 * mV) / (80 * mV)) / ms : Hz I_SynHipp = + ge_hipp * (v - (0 * mV)) : A alpham = 0.1 * (mV ** -1) * (v + 35 * mV) / (1. - exp(- (v + 35 * mV) / (10 * mV))) / ms : Hz alphan = 0.01 * (mV ** -1) * (v + 34 * mV) / (1. - exp(- 0.1 * (mV ** -1) * (v + 34 * mV))) / ms : Hz I_SynI = + gi * (v - (-80 * mV)) : A m_inf = alpham / (alpham + betam) : 1 I_K = ((9e-3 * siemens * cm ** -2) * (size)) * (n ** 4) * (v - (-90 * mV)) : A betah = 1. / (exp((- 0.1 * (mV ** -1)) * (v + 28 * mV)) + 1.) / ms : Hz Vm = (- I_leak - I_K - I_Na) / ((1 * ufarad * cm ** -2) * (size))*tstep : V tau_n = 0.2 / (alphan + betan) : s tau_m = 0.2 / (alpham + betam) : s tau_h = 0.2 / (alphah + betah) : s h_inf = alphah / (alphah + betah) : 1 n_inf = alphan / (alphan + betan) : 1 dge/dt = (-ge+he) * (1. / (0.3 * ms)) : S dge_ext/dt = (-ge_ext+he_ext) * (1. / (0.3 * ms)) : S dge_hipp/dt = (-ge_hipp+he_hipp) * (1. / (0.3 * ms)) : S dgi/dt = (-gi+hi) * (1. / (1 * ms)) : S dh/dt = (h_inf - h) / tau_h : 1 dhe/dt = -he/(5*ms) : S dhe_ext/dt = -he_ext/(5*ms) : S dhe_hipp/dt = -he_hipp/(5*ms) : S dhi/dt = -hi/(10*ms) : S dm/dt = (m_inf - m) / tau_m : 1 dn/dt = (n_inf - n) / tau_n : 1 dv/dt = ( - I_leak - I_K - I_Na - I_SynE - I_SynExt - I_SynHipp - I_SynI + r*I_stim) / ((1 * ufarad * cm ** -2) * (size)) + noise : V lastspike : s noise : V/s not_refractory : 1 r : 1 size : m^2 x_soma : m y_soma : m z_soma : m. 2021-11-05 15:14:40,296 DIAGNOSTIC brian2.core.names: Created object of class Thresholder with name CA3_inh_thresholder 2021-11-05 15:14:40,296 DIAGNOSTIC brian2.core.base: Created BrianObject with name CA3_inh_thresholder, clock=Clock(dt=100. * usecond, name='defaultclock'), when=thresholds, order=0 2021-11-05 15:14:40,297 DIAGNOSTIC brian2.core.names: Created object of class StateUpdater with name CA3_inh_stateupdater 2021-11-05 15:14:40,297 DIAGNOSTIC brian2.core.base: Created BrianObject with name CA3_inh_stateupdater, clock=Clock(dt=100. * usecond, name='defaultclock'), when=groups, order=0 2021-11-05 15:14:40,297 DIAGNOSTIC brian2.core.names: Created object of class SubexpressionUpdater with name CA3_inh_subexpression_update 2021-11-05 15:14:40,297 DIAGNOSTIC brian2.core.base: Created BrianObject with name CA3_inh_subexpression_update, clock=Clock(dt=100. * usecond, name='defaultclock'), when=before_start, order=0 2021-11-05 15:14:40,322 DIAGNOSTIC brian2.core.names: Created object of class NeuronGroup with name CA1_pyCAN 2021-11-05 15:14:40,322 DIAGNOSTIC brian2.core.base: Created BrianObject with name CA1_pyCAN, clock=Clock(dt=100. * usecond, name='defaultclock'), when=start, order=0 2021-11-05 15:14:40,326 DIAGNOSTIC brian2.groups.neurongroup: Creating NeuronGroup of size 10000, equations alphamCaL = (0.055 * mV ** -1) * ((-27 * mV) - v) / (exp(((-27 * mV) - v) / (3.8 * mV)) - 1.) / ms : Hz I_M = ((gM) * (size)) * p * (v - Ek) : A alphah = 0.128 * exp(- (v - (-55 * mV) - 17 * mV) / (18 * mV)) / ms : Hz betan = 0.5 * exp( - (v - (-55 * mV) - 10 * mV) / (40 * mV)) / ms : Hz I_SynHipp = + ge_hipp * (v - (0 * mV)) : A alphan = - 0.032 * (mV ** -1) * (v - (-55 * mV) - 15 * mV) / (exp(- (v - (-55 * mV) - 15 * mV) / (5 * mV)) - 1.) / ms : Hz I_Na = ((50 * msiemens * cm ** -2) * (size)) * (m ** 3) * h * (v - (50 * mV)) : A betahCaL = 0.0065 / (exp(((-15 * mV) - v) / (28 * mV)) + 1.) / ms : Hz I_CAN = ((gCAN) * (size)) * mCAN ** 2 * (v - (-20 * mV)) : A I_SynExt = + ge_ext * (v - (0 * mV)) : A pInf = 1. / (1 + exp(- (v + (35 * mV)) / (10 * mV))) : 1 I_stim = inputs_stim(t) : A alpha2 = (0.0002 * ms ** -1) * (Ca_i / (5e-4 * mole * metre ** -3)) ** 2 : Hz pTau = (1000 * ms) / (3.3 * exp((v + (35 * mV)) / (20 * mV)) + exp(- (v + (35 * mV)) / (20 * mV))) : s I_Ca = ((1e-4 * siemens * cm ** -2) * (size)) * (mCaL ** 2) * hCaL * (v - (120 * mV)) : A I_SynI = + gi*(v - 0 * mV)*int(Cl>0.5) + gi*(v - (-80 * mV))*int(Cl<=0.5) : A I_K = ((5 * msiemens * cm ** -2) * (size)) * (n ** 4) * (v - Ek) : A betam = 0.28 * (mV ** -1) * (v - (-55 * mV) - 40 * mV) / (exp((v - (-55 * mV) - 40 * mV) / (5 * mV)) - 1.) / ms : Hz I_SynE = + ge * (v - (0 * mV)) : A betamCaL = 0.94 * exp(((-75 * mV) - v) / (17 * mV)) / ms : Hz alpham = - 0.32 * (mV ** -1) * (v - (-55 * mV) - 13 * mV) / (exp(- (v - (-55 * mV) - 13 * mV) / (4 * mV)) - 1.) / ms : Hz mCANInf = alpha2 / (alpha2 + (0.0002 * ms ** -1)) : 1 I_leak = ((1e-5 * siemens * cm ** -2) * (size)) * (v - (-70*mV)) : A alphahCaL = 0.000457 * exp(((-13 * mV) - v) / (50 * mV)) / ms : Hz mCANTau = 1. / (alpha2 + (0.0002 * ms ** -1)) / (3.0 ** ((36. -22) / 10)) : s betah = 4. / (1 + exp(- (v - (-55 * mV) - 40 * mV) / (5 * mV))) / ms : Hz driveChannel = (-(1e4) * I_Ca / (cm ** 2)) / (2 * (96489 * coulomb * mole ** -1) * (1 * umetre)) : mol m^-3 Hz Vm = ( - I_CAN - I_M - I_leak - I_K - I_Na - I_Ca) / ((1 * ufarad * cm ** -2) * (size))*tstep : V dCa_i/dt = driveChannel + ((2.4e-4 * mole * metre**-3) - Ca_i) / (200 * ms) : mM dCl/dt = -Cl/tau_Cl : 1 dge/dt = (-ge+he) * (1. / (0.3 * ms)) : S dge_ext/dt = (-ge_ext+he_ext) * (1. / (0.3 * ms)) : S dge_hipp/dt = (-ge_hipp+he_hipp) * (1. / (0.3 * ms)) : S dgi/dt = (-gi+hi) * (1. / (1 * ms)) : S dglu/dt = (1-glu)/(3*second) : 1 dh/dt = alphah * (1 - h) - betah * h : 1 dhCaL/dt = (alphahCaL * (1 - hCaL)) - (betahCaL * hCaL) : 1 dhe/dt = -he/(5*ms) : S dhe_ext/dt = -he_ext/(5*ms) : S dhe_hipp/dt = -he_hipp/(5*ms) : S dhi/dt = -hi/(10*ms) : S dm/dt = alpham * (1 - m) - betam * m : 1 dmCAN/dt = (mCANInf - mCAN) / mCANTau : 1 dmCaL/dt = (alphamCaL * (1 - mCaL)) - (betamCaL * mCaL) : 1 dn/dt = alphan * (1 - n) - betan * n : 1 dp/dt = (pInf - p) / pTau : 1 dv/dt = ( - I_CAN - I_M - I_leak - I_K - I_Na - I_Ca - I_SynE - I_SynExt - I_SynI - I_SynHipp + r*I_stim) / ((1 * ufarad * cm ** -2) * (size)) + noise : V lastspike : s noise : V/s not_refractory : 1 r : 1 size : m^2 x_dendrite : m x_soma : m y_dendrite : m y_soma : m z_dendrite : m z_soma : m. 2021-11-05 15:14:40,328 DIAGNOSTIC brian2.core.names: Created object of class Thresholder with name CA1_pyCAN_thresholder 2021-11-05 15:14:40,328 DIAGNOSTIC brian2.core.base: Created BrianObject with name CA1_pyCAN_thresholder, clock=Clock(dt=100. * usecond, name='defaultclock'), when=thresholds, order=0 2021-11-05 15:14:40,328 DIAGNOSTIC brian2.core.names: Created object of class Resetter with name CA1_pyCAN_resetter 2021-11-05 15:14:40,329 DIAGNOSTIC brian2.core.base: Created BrianObject with name CA1_pyCAN_resetter, clock=Clock(dt=100. * usecond, name='defaultclock'), when=resets, order=0 2021-11-05 15:14:40,329 DIAGNOSTIC brian2.core.names: Created object of class StateUpdater with name CA1_pyCAN_stateupdater 2021-11-05 15:14:40,329 DIAGNOSTIC brian2.core.base: Created BrianObject with name CA1_pyCAN_stateupdater, clock=Clock(dt=100. * usecond, name='defaultclock'), when=groups, order=0 2021-11-05 15:14:40,329 DIAGNOSTIC brian2.core.names: Created object of class SubexpressionUpdater with name CA1_pyCAN_subexpression_update 2021-11-05 15:14:40,329 DIAGNOSTIC brian2.core.base: Created BrianObject with name CA1_pyCAN_subexpression_update, clock=Clock(dt=100. * usecond, name='defaultclock'), when=before_start, order=0 2021-11-05 15:14:42,756 DIAGNOSTIC brian2.core.names: Created object of class NeuronGroup with name CA1_inh 2021-11-05 15:14:42,756 DIAGNOSTIC brian2.core.base: Created BrianObject with name CA1_inh, clock=Clock(dt=100. * usecond, name='defaultclock'), when=start, order=0 2021-11-05 15:14:42,758 DIAGNOSTIC brian2.groups.neurongroup: Creating NeuronGroup of size 1000, equations betam = 4 * exp(- (v + 60 * mV) / (18 * mV)) / ms : Hz I_Na = ((35e-3 * siemens * cm ** -2) * (size)) * (m ** 3) * h * (v - (55 * mV)) : A I_SynE = + ge * (v - (0 * mV)) : A I_leak = ((0.1e-3 * siemens * cm ** -2) * (size)) * (v - (-65 * mV)) : A I_SynExt = + ge_ext * (v - (0 * mV)) : A alphah = 0.07 * exp(- (v + 58 * mV) / (20 * mV)) / ms : Hz I_stim = inputs_stim(t) : A betan = 0.125 * exp( - (v + 44 * mV) / (80 * mV)) / ms : Hz I_SynHipp = + ge_hipp * (v - (0 * mV)) : A alpham = 0.1 * (mV ** -1) * (v + 35 * mV) / (1. - exp(- (v + 35 * mV) / (10 * mV))) / ms : Hz alphan = 0.01 * (mV ** -1) * (v + 34 * mV) / (1. - exp(- 0.1 * (mV ** -1) * (v + 34 * mV))) / ms : Hz I_SynI = + gi * (v - (-80 * mV)) : A m_inf = alpham / (alpham + betam) : 1 I_K = ((9e-3 * siemens * cm ** -2) * (size)) * (n ** 4) * (v - (-90 * mV)) : A betah = 1. / (exp((- 0.1 * (mV ** -1)) * (v + 28 * mV)) + 1.) / ms : Hz Vm = (- I_leak - I_K - I_Na) / ((1 * ufarad * cm ** -2) * (size))*tstep : V tau_n = 0.2 / (alphan + betan) : s tau_m = 0.2 / (alpham + betam) : s tau_h = 0.2 / (alphah + betah) : s h_inf = alphah / (alphah + betah) : 1 n_inf = alphan / (alphan + betan) : 1 dge/dt = (-ge+he) * (1. / (0.3 * ms)) : S dge_ext/dt = (-ge_ext+he_ext) * (1. / (0.3 * ms)) : S dge_hipp/dt = (-ge_hipp+he_hipp) * (1. / (0.3 * ms)) : S dgi/dt = (-gi+hi) * (1. / (1 * ms)) : S dh/dt = (h_inf - h) / tau_h : 1 dhe/dt = -he/(5*ms) : S dhe_ext/dt = -he_ext/(5*ms) : S dhe_hipp/dt = -he_hipp/(5*ms) : S dhi/dt = -hi/(10*ms) : S dm/dt = (m_inf - m) / tau_m : 1 dn/dt = (n_inf - n) / tau_n : 1 dv/dt = ( - I_leak - I_K - I_Na - I_SynE - I_SynExt - I_SynHipp - I_SynI + r*I_stim) / ((1 * ufarad * cm ** -2) * (size)) + noise : V lastspike : s noise : V/s not_refractory : 1 r : 1 size : m^2 x_soma : m y_soma : m z_soma : m. 2021-11-05 15:14:42,760 DIAGNOSTIC brian2.core.names: Created object of class Thresholder with name CA1_inh_thresholder 2021-11-05 15:14:42,761 DIAGNOSTIC brian2.core.base: Created BrianObject with name CA1_inh_thresholder, clock=Clock(dt=100. * usecond, name='defaultclock'), when=thresholds, order=0 2021-11-05 15:14:42,761 DIAGNOSTIC brian2.core.names: Created object of class StateUpdater with name CA1_inh_stateupdater 2021-11-05 15:14:42,761 DIAGNOSTIC brian2.core.base: Created BrianObject with name CA1_inh_stateupdater, clock=Clock(dt=100. * usecond, name='defaultclock'), when=groups, order=0 2021-11-05 15:14:42,761 DIAGNOSTIC brian2.core.names: Created object of class SubexpressionUpdater with name CA1_inh_subexpression_update 2021-11-05 15:14:42,761 DIAGNOSTIC brian2.core.base: Created BrianObject with name CA1_inh_subexpression_update, clock=Clock(dt=100. * usecond, name='defaultclock'), when=before_start, order=0 2021-11-05 15:14:43,003 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=EC_pyCAN, template name=group_variable_set_conditional) for abstract code: Key condition: _cond = True Key statement: v = -60.*mvolt-rand()*10*mvolt 2021-11-05 15:14:43,015 DIAGNOSTIC brian2.devices.device: EC_pyCAN_group_variable_set_conditional_codeobject abstract code: Key condition: _cond = True Key statement: v = -60.*mvolt-rand()*10*mvolt 2021-11-05 15:14:43,016 DIAGNOSTIC brian2.devices.device: EC_pyCAN_group_variable_set_conditional_codeobject snippet (scalar): Key condition: Key statement: _lio_statement_1 = (- 60.0) * mvolt _lio_statement_2 = 10.0 * mvolt 2021-11-05 15:14:43,016 DIAGNOSTIC brian2.devices.device: EC_pyCAN_group_variable_set_conditional_codeobject snippet (vector): Key condition: _cond = True Key statement: v = _lio_statement_1 - (_lio_statement_2 * rand(_vectorisation_idx)) _array_EC_pyCAN_v[_idx] = v 2021-11-05 15:14:43,018 DIAGNOSTIC brian2.devices.device: EC_pyCAN_group_variable_set_conditional_codeobject code: run: import numpy as _numpy from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange numpy_False = _numpy.bool_(False) numpy_True = _numpy.bool_(True) # Phase 1: we compute the indices where the conditional setting is to # be applied, and to do this we want to vectorise over all the values, # but we don't want to do the iterate all protocol, so we explicitly # set the idx to be slice(None) # scalar code _vectorisation_idx = 1 # vector code _idx = slice(None) _vectorisation_idx = LazyArange(N) _cond = True # Phase 2: having computed _cond, the boolean array of points where # the setting is to be applied, we want to vectorise over idx being # only these values. # scalar code _vectorisation_idx = 1 _lio_statement_1 = (- 60.0) * mvolt _lio_statement_2 = 10.0 * mvolt # vector code if _cond is True or _cond is numpy_True: _idx = slice(None) _vectorisation_idx = LazyArange(N) elif _cond is False or _cond is numpy_False: _idx = [] _vectorisation_idx = _numpy.array([], dtype=_numpy.int32) else: _vectorisation_idx = _idx = _numpy.nonzero(_cond)[0] v = _lio_statement_1 - (_lio_statement_2 * rand(_vectorisation_idx)) _array_EC_pyCAN_v[_idx] = v before_run: import numpy as _numpy from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange # EMPTY_CODE_BLOCK -- overwrite in child template after_run: import numpy as _numpy from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange # EMPTY_CODE_BLOCK -- overwrite in child template 2021-11-05 15:14:43,018 DIAGNOSTIC brian2.core.names: Created object of class NumpyCodeObject with name EC_pyCAN_group_variable_set_conditional_codeobject 2021-11-05 15:14:43,018 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=EC_inh, template name=group_variable_set_conditional) for abstract code: Key condition: _cond = True Key statement: v = -60.*mvolt-rand()*10*mvolt 2021-11-05 15:14:43,023 DIAGNOSTIC brian2.devices.device: EC_inh_group_variable_set_conditional_codeobject abstract code: Key condition: _cond = True Key statement: v = -60.*mvolt-rand()*10*mvolt 2021-11-05 15:14:43,025 DIAGNOSTIC brian2.devices.device: EC_inh_group_variable_set_conditional_codeobject snippet (scalar): Key condition: Key statement: _lio_statement_1 = (- 60.0) * mvolt _lio_statement_2 = 10.0 * mvolt 2021-11-05 15:14:43,025 DIAGNOSTIC brian2.devices.device: EC_inh_group_variable_set_conditional_codeobject snippet (vector): Key condition: _cond = True Key statement: v = _lio_statement_1 - (_lio_statement_2 * rand(_vectorisation_idx)) _array_EC_inh_v[_idx] = v 2021-11-05 15:14:43,025 DIAGNOSTIC brian2.devices.device: EC_inh_group_variable_set_conditional_codeobject code: run: import numpy as _numpy from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange numpy_False = _numpy.bool_(False) numpy_True = _numpy.bool_(True) # Phase 1: we compute the indices where the conditional setting is to # be applied, and to do this we want to vectorise over all the values, # but we don't want to do the iterate all protocol, so we explicitly # set the idx to be slice(None) # scalar code _vectorisation_idx = 1 # vector code _idx = slice(None) _vectorisation_idx = LazyArange(N) _cond = True # Phase 2: having computed _cond, the boolean array of points where # the setting is to be applied, we want to vectorise over idx being # only these values. # scalar code _vectorisation_idx = 1 _lio_statement_1 = (- 60.0) * mvolt _lio_statement_2 = 10.0 * mvolt # vector code if _cond is True or _cond is numpy_True: _idx = slice(None) _vectorisation_idx = LazyArange(N) elif _cond is False or _cond is numpy_False: _idx = [] _vectorisation_idx = _numpy.array([], dtype=_numpy.int32) else: _vectorisation_idx = _idx = _numpy.nonzero(_cond)[0] v = _lio_statement_1 - (_lio_statement_2 * rand(_vectorisation_idx)) _array_EC_inh_v[_idx] = v before_run: import numpy as _numpy from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange # EMPTY_CODE_BLOCK -- overwrite in child template after_run: import numpy as _numpy from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange # EMPTY_CODE_BLOCK -- overwrite in child template 2021-11-05 15:14:43,025 DIAGNOSTIC brian2.core.names: Created object of class NumpyCodeObject with name EC_inh_group_variable_set_conditional_codeobject 2021-11-05 15:14:43,025 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=DG_py, template name=group_variable_set_conditional) for abstract code: Key condition: _cond = True Key statement: v = -60.*mvolt-rand()*10*mvolt 2021-11-05 15:14:43,030 DIAGNOSTIC brian2.devices.device: DG_py_group_variable_set_conditional_codeobject abstract code: Key condition: _cond = True Key statement: v = -60.*mvolt-rand()*10*mvolt 2021-11-05 15:14:43,031 DIAGNOSTIC brian2.devices.device: DG_py_group_variable_set_conditional_codeobject snippet (scalar): Key condition: Key statement: _lio_statement_1 = (- 60.0) * mvolt _lio_statement_2 = 10.0 * mvolt 2021-11-05 15:14:43,031 DIAGNOSTIC brian2.devices.device: DG_py_group_variable_set_conditional_codeobject snippet (vector): Key condition: _cond = True Key statement: v = _lio_statement_1 - (_lio_statement_2 * rand(_vectorisation_idx)) _array_DG_py_v[_idx] = v 2021-11-05 15:14:43,031 DIAGNOSTIC brian2.devices.device: DG_py_group_variable_set_conditional_codeobject code: run: import numpy as _numpy from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange numpy_False = _numpy.bool_(False) numpy_True = _numpy.bool_(True) # Phase 1: we compute the indices where the conditional setting is to # be applied, and to do this we want to vectorise over all the values, # but we don't want to do the iterate all protocol, so we explicitly # set the idx to be slice(None) # scalar code _vectorisation_idx = 1 # vector code _idx = slice(None) _vectorisation_idx = LazyArange(N) _cond = True # Phase 2: having computed _cond, the boolean array of points where # the setting is to be applied, we want to vectorise over idx being # only these values. # scalar code _vectorisation_idx = 1 _lio_statement_1 = (- 60.0) * mvolt _lio_statement_2 = 10.0 * mvolt # vector code if _cond is True or _cond is numpy_True: _idx = slice(None) _vectorisation_idx = LazyArange(N) elif _cond is False or _cond is numpy_False: _idx = [] _vectorisation_idx = _numpy.array([], dtype=_numpy.int32) else: _vectorisation_idx = _idx = _numpy.nonzero(_cond)[0] v = _lio_statement_1 - (_lio_statement_2 * rand(_vectorisation_idx)) _array_DG_py_v[_idx] = v before_run: import numpy as _numpy from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange # EMPTY_CODE_BLOCK -- overwrite in child template after_run: import numpy as _numpy from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange # EMPTY_CODE_BLOCK -- overwrite in child template 2021-11-05 15:14:43,031 DIAGNOSTIC brian2.core.names: Created object of class NumpyCodeObject with name DG_py_group_variable_set_conditional_codeobject 2021-11-05 15:14:43,031 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=DG_inh, template name=group_variable_set_conditional) for abstract code: Key condition: _cond = True Key statement: v = -60.*mvolt-rand()*10*mvolt 2021-11-05 15:14:43,036 DIAGNOSTIC brian2.devices.device: DG_inh_group_variable_set_conditional_codeobject abstract code: Key condition: _cond = True Key statement: v = -60.*mvolt-rand()*10*mvolt 2021-11-05 15:14:43,038 DIAGNOSTIC brian2.devices.device: DG_inh_group_variable_set_conditional_codeobject snippet (scalar): Key condition: Key statement: _lio_statement_1 = (- 60.0) * mvolt _lio_statement_2 = 10.0 * mvolt 2021-11-05 15:14:43,038 DIAGNOSTIC brian2.devices.device: DG_inh_group_variable_set_conditional_codeobject snippet (vector): Key condition: _cond = True Key statement: v = _lio_statement_1 - (_lio_statement_2 * rand(_vectorisation_idx)) _array_DG_inh_v[_idx] = v 2021-11-05 15:14:43,038 DIAGNOSTIC brian2.devices.device: DG_inh_group_variable_set_conditional_codeobject code: run: import numpy as _numpy from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange numpy_False = _numpy.bool_(False) numpy_True = _numpy.bool_(True) # Phase 1: we compute the indices where the conditional setting is to # be applied, and to do this we want to vectorise over all the values, # but we don't want to do the iterate all protocol, so we explicitly # set the idx to be slice(None) # scalar code _vectorisation_idx = 1 # vector code _idx = slice(None) _vectorisation_idx = LazyArange(N) _cond = True # Phase 2: having computed _cond, the boolean array of points where # the setting is to be applied, we want to vectorise over idx being # only these values. # scalar code _vectorisation_idx = 1 _lio_statement_1 = (- 60.0) * mvolt _lio_statement_2 = 10.0 * mvolt # vector code if _cond is True or _cond is numpy_True: _idx = slice(None) _vectorisation_idx = LazyArange(N) elif _cond is False or _cond is numpy_False: _idx = [] _vectorisation_idx = _numpy.array([], dtype=_numpy.int32) else: _vectorisation_idx = _idx = _numpy.nonzero(_cond)[0] v = _lio_statement_1 - (_lio_statement_2 * rand(_vectorisation_idx)) _array_DG_inh_v[_idx] = v before_run: import numpy as _numpy from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange # EMPTY_CODE_BLOCK -- overwrite in child template after_run: import numpy as _numpy from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange # EMPTY_CODE_BLOCK -- overwrite in child template 2021-11-05 15:14:43,038 DIAGNOSTIC brian2.core.names: Created object of class NumpyCodeObject with name DG_inh_group_variable_set_conditional_codeobject 2021-11-05 15:14:43,038 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=CA3_pyCAN, template name=group_variable_set_conditional) for abstract code: Key condition: _cond = True Key statement: v = -60.*mvolt-rand()*10*mvolt 2021-11-05 15:14:43,044 DIAGNOSTIC brian2.devices.device: CA3_pyCAN_group_variable_set_conditional_codeobject abstract code: Key condition: _cond = True Key statement: v = -60.*mvolt-rand()*10*mvolt 2021-11-05 15:14:43,045 DIAGNOSTIC brian2.devices.device: CA3_pyCAN_group_variable_set_conditional_codeobject snippet (scalar): Key condition: Key statement: _lio_statement_1 = (- 60.0) * mvolt _lio_statement_2 = 10.0 * mvolt 2021-11-05 15:14:43,045 DIAGNOSTIC brian2.devices.device: CA3_pyCAN_group_variable_set_conditional_codeobject snippet (vector): Key condition: _cond = True Key statement: v = _lio_statement_1 - (_lio_statement_2 * rand(_vectorisation_idx)) _array_CA3_pyCAN_v[_idx] = v 2021-11-05 15:14:43,045 DIAGNOSTIC brian2.devices.device: CA3_pyCAN_group_variable_set_conditional_codeobject code: run: import numpy as _numpy from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange numpy_False = _numpy.bool_(False) numpy_True = _numpy.bool_(True) # Phase 1: we compute the indices where the conditional setting is to # be applied, and to do this we want to vectorise over all the values, # but we don't want to do the iterate all protocol, so we explicitly # set the idx to be slice(None) # scalar code _vectorisation_idx = 1 # vector code _idx = slice(None) _vectorisation_idx = LazyArange(N) _cond = True # Phase 2: having computed _cond, the boolean array of points where # the setting is to be applied, we want to vectorise over idx being # only these values. # scalar code _vectorisation_idx = 1 _lio_statement_1 = (- 60.0) * mvolt _lio_statement_2 = 10.0 * mvolt # vector code if _cond is True or _cond is numpy_True: _idx = slice(None) _vectorisation_idx = LazyArange(N) elif _cond is False or _cond is numpy_False: _idx = [] _vectorisation_idx = _numpy.array([], dtype=_numpy.int32) else: _vectorisation_idx = _idx = _numpy.nonzero(_cond)[0] v = _lio_statement_1 - (_lio_statement_2 * rand(_vectorisation_idx)) _array_CA3_pyCAN_v[_idx] = v before_run: import numpy as _numpy from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange # EMPTY_CODE_BLOCK -- overwrite in child template after_run: import numpy as _numpy from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange # EMPTY_CODE_BLOCK -- overwrite in child template 2021-11-05 15:14:43,045 DIAGNOSTIC brian2.core.names: Created object of class NumpyCodeObject with name CA3_pyCAN_group_variable_set_conditional_codeobject 2021-11-05 15:14:43,045 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=CA3_inh, template name=group_variable_set_conditional) for abstract code: Key condition: _cond = True Key statement: v = -60.*mvolt-rand()*10*mvolt 2021-11-05 15:14:43,049 DIAGNOSTIC brian2.devices.device: CA3_inh_group_variable_set_conditional_codeobject abstract code: Key condition: _cond = True Key statement: v = -60.*mvolt-rand()*10*mvolt 2021-11-05 15:14:43,050 DIAGNOSTIC brian2.devices.device: CA3_inh_group_variable_set_conditional_codeobject snippet (scalar): Key condition: Key statement: _lio_statement_1 = (- 60.0) * mvolt _lio_statement_2 = 10.0 * mvolt 2021-11-05 15:14:43,050 DIAGNOSTIC brian2.devices.device: CA3_inh_group_variable_set_conditional_codeobject snippet (vector): Key condition: _cond = True Key statement: v = _lio_statement_1 - (_lio_statement_2 * rand(_vectorisation_idx)) _array_CA3_inh_v[_idx] = v 2021-11-05 15:14:43,050 DIAGNOSTIC brian2.devices.device: CA3_inh_group_variable_set_conditional_codeobject code: run: import numpy as _numpy from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange numpy_False = _numpy.bool_(False) numpy_True = _numpy.bool_(True) # Phase 1: we compute the indices where the conditional setting is to # be applied, and to do this we want to vectorise over all the values, # but we don't want to do the iterate all protocol, so we explicitly # set the idx to be slice(None) # scalar code _vectorisation_idx = 1 # vector code _idx = slice(None) _vectorisation_idx = LazyArange(N) _cond = True # Phase 2: having computed _cond, the boolean array of points where # the setting is to be applied, we want to vectorise over idx being # only these values. # scalar code _vectorisation_idx = 1 _lio_statement_1 = (- 60.0) * mvolt _lio_statement_2 = 10.0 * mvolt # vector code if _cond is True or _cond is numpy_True: _idx = slice(None) _vectorisation_idx = LazyArange(N) elif _cond is False or _cond is numpy_False: _idx = [] _vectorisation_idx = _numpy.array([], dtype=_numpy.int32) else: _vectorisation_idx = _idx = _numpy.nonzero(_cond)[0] v = _lio_statement_1 - (_lio_statement_2 * rand(_vectorisation_idx)) _array_CA3_inh_v[_idx] = v before_run: import numpy as _numpy from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange # EMPTY_CODE_BLOCK -- overwrite in child template after_run: import numpy as _numpy from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange # EMPTY_CODE_BLOCK -- overwrite in child template 2021-11-05 15:14:43,050 DIAGNOSTIC brian2.core.names: Created object of class NumpyCodeObject with name CA3_inh_group_variable_set_conditional_codeobject 2021-11-05 15:14:43,050 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=CA1_pyCAN, template name=group_variable_set_conditional) for abstract code: Key condition: _cond = True Key statement: v = -60.*mvolt-rand()*10*mvolt 2021-11-05 15:14:43,056 DIAGNOSTIC brian2.devices.device: CA1_pyCAN_group_variable_set_conditional_codeobject abstract code: Key condition: _cond = True Key statement: v = -60.*mvolt-rand()*10*mvolt 2021-11-05 15:14:43,056 DIAGNOSTIC brian2.devices.device: CA1_pyCAN_group_variable_set_conditional_codeobject snippet (scalar): Key condition: Key statement: _lio_statement_1 = (- 60.0) * mvolt _lio_statement_2 = 10.0 * mvolt 2021-11-05 15:14:43,056 DIAGNOSTIC brian2.devices.device: CA1_pyCAN_group_variable_set_conditional_codeobject snippet (vector): Key condition: _cond = True Key statement: v = _lio_statement_1 - (_lio_statement_2 * rand(_vectorisation_idx)) _array_CA1_pyCAN_v[_idx] = v 2021-11-05 15:14:43,056 DIAGNOSTIC brian2.devices.device: CA1_pyCAN_group_variable_set_conditional_codeobject code: run: import numpy as _numpy from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange numpy_False = _numpy.bool_(False) numpy_True = _numpy.bool_(True) # Phase 1: we compute the indices where the conditional setting is to # be applied, and to do this we want to vectorise over all the values, # but we don't want to do the iterate all protocol, so we explicitly # set the idx to be slice(None) # scalar code _vectorisation_idx = 1 # vector code _idx = slice(None) _vectorisation_idx = LazyArange(N) _cond = True # Phase 2: having computed _cond, the boolean array of points where # the setting is to be applied, we want to vectorise over idx being # only these values. # scalar code _vectorisation_idx = 1 _lio_statement_1 = (- 60.0) * mvolt _lio_statement_2 = 10.0 * mvolt # vector code if _cond is True or _cond is numpy_True: _idx = slice(None) _vectorisation_idx = LazyArange(N) elif _cond is False or _cond is numpy_False: _idx = [] _vectorisation_idx = _numpy.array([], dtype=_numpy.int32) else: _vectorisation_idx = _idx = _numpy.nonzero(_cond)[0] v = _lio_statement_1 - (_lio_statement_2 * rand(_vectorisation_idx)) _array_CA1_pyCAN_v[_idx] = v before_run: import numpy as _numpy from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange # EMPTY_CODE_BLOCK -- overwrite in child template after_run: import numpy as _numpy from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange # EMPTY_CODE_BLOCK -- overwrite in child template 2021-11-05 15:14:43,057 DIAGNOSTIC brian2.core.names: Created object of class NumpyCodeObject with name CA1_pyCAN_group_variable_set_conditional_codeobject 2021-11-05 15:14:43,057 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=CA1_inh, template name=group_variable_set_conditional) for abstract code: Key condition: _cond = True Key statement: v = -60.*mvolt-rand()*10*mvolt 2021-11-05 15:14:43,061 DIAGNOSTIC brian2.devices.device: CA1_inh_group_variable_set_conditional_codeobject abstract code: Key condition: _cond = True Key statement: v = -60.*mvolt-rand()*10*mvolt 2021-11-05 15:14:43,061 DIAGNOSTIC brian2.devices.device: CA1_inh_group_variable_set_conditional_codeobject snippet (scalar): Key condition: Key statement: _lio_statement_1 = (- 60.0) * mvolt _lio_statement_2 = 10.0 * mvolt 2021-11-05 15:14:43,061 DIAGNOSTIC brian2.devices.device: CA1_inh_group_variable_set_conditional_codeobject snippet (vector): Key condition: _cond = True Key statement: v = _lio_statement_1 - (_lio_statement_2 * rand(_vectorisation_idx)) _array_CA1_inh_v[_idx] = v 2021-11-05 15:14:43,062 DIAGNOSTIC brian2.devices.device: CA1_inh_group_variable_set_conditional_codeobject code: run: import numpy as _numpy from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange numpy_False = _numpy.bool_(False) numpy_True = _numpy.bool_(True) # Phase 1: we compute the indices where the conditional setting is to # be applied, and to do this we want to vectorise over all the values, # but we don't want to do the iterate all protocol, so we explicitly # set the idx to be slice(None) # scalar code _vectorisation_idx = 1 # vector code _idx = slice(None) _vectorisation_idx = LazyArange(N) _cond = True # Phase 2: having computed _cond, the boolean array of points where # the setting is to be applied, we want to vectorise over idx being # only these values. # scalar code _vectorisation_idx = 1 _lio_statement_1 = (- 60.0) * mvolt _lio_statement_2 = 10.0 * mvolt # vector code if _cond is True or _cond is numpy_True: _idx = slice(None) _vectorisation_idx = LazyArange(N) elif _cond is False or _cond is numpy_False: _idx = [] _vectorisation_idx = _numpy.array([], dtype=_numpy.int32) else: _vectorisation_idx = _idx = _numpy.nonzero(_cond)[0] v = _lio_statement_1 - (_lio_statement_2 * rand(_vectorisation_idx)) _array_CA1_inh_v[_idx] = v before_run: import numpy as _numpy from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange # EMPTY_CODE_BLOCK -- overwrite in child template after_run: import numpy as _numpy from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange # EMPTY_CODE_BLOCK -- overwrite in child template 2021-11-05 15:14:43,062 DIAGNOSTIC brian2.core.names: Created object of class NumpyCodeObject with name CA1_inh_group_variable_set_conditional_codeobject 2021-11-05 15:14:43,062 DIAGNOSTIC brian2.core.names: Created object of class Synapses with name EC_pyCANtoEC_inh 2021-11-05 15:14:43,063 DIAGNOSTIC brian2.core.base: Created BrianObject with name EC_pyCANtoEC_inh, clock=Clock(dt=100. * usecond, name='defaultclock'), when=start, order=0 2021-11-05 15:14:43,066 DIAGNOSTIC brian2.core.names: Created object of class SynapticPathway with name EC_pyCANtoEC_inh_pre 2021-11-05 15:14:43,067 DIAGNOSTIC brian2.core.base: Created BrianObject with name EC_pyCANtoEC_inh_pre, clock=Clock(dt=100. * usecond, name='defaultclock'), when=synapses, order=-1 2021-11-05 15:14:43,078 DIAGNOSTIC brian2.devices.device: Using the C++ SpikeQueue 2021-11-05 15:14:43,079 DEBUG brian2.synapses.synapses: Creating synapses from group 'EC_pyCAN' to group 'EC_inh', using generator '_k for _k in range(N_post) if (i!=_k) and rand()<0.37*exp(-((x_soma_pre-x_soma_post)**2+(y_soma_pre-y_soma_post)**2+(z_soma_pre-z_soma_post)**2)/(2*(2500*umetre)**2))' 2021-11-05 15:14:43,079 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=EC_pyCANtoEC_inh, template name=synapses_create_generator) for abstract code: Key setup_iterator: _iter_low = 0 _iter_high = N_post _iter_step = 1 Key create_j: _pre_idx = _raw_pre_idx _j = _k Key create_cond: _post_idx = _raw_post_idx _cond = (i != _k) and (rand() < (0.37 * exp((- ((((x_soma_pre - x_soma_post) ** 2) + ((y_soma_pre - y_soma_post) ** 2)) + ((z_soma_pre - z_soma_post) ** 2))) / (2 * ((2500 * umetre) ** 2))))) Key update_post: _post_idx = _raw_post_idx _n = 1 2021-11-05 15:14:43,084 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140606325957056 on /home/nikos/.cython/brian_extensions/_cython_magic_94fdd1b0903613683f5e0baa82d67af9.lock 2021-11-05 15:14:43,084 DEBUG brian2.utils.filelock: Lock 140606325957056 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_94fdd1b0903613683f5e0baa82d67af9.lock 2021-11-05 15:14:43,084 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140606325957056 on /home/nikos/.cython/brian_extensions/_cython_magic_94fdd1b0903613683f5e0baa82d67af9.lock 2021-11-05 15:14:43,084 DEBUG brian2.utils.filelock: Lock 140606325957056 released on /home/nikos/.cython/brian_extensions/_cython_magic_94fdd1b0903613683f5e0baa82d67af9.lock 2021-11-05 15:14:43,084 DEBUG brian2.devices.device: Chosing 'cython' as the code generation target. 2021-11-05 15:14:43,146 DIAGNOSTIC brian2.devices.device: EC_pyCANtoEC_inh_synapses_create_generator_codeobject abstract code: Key setup_iterator: _iter_low = 0 _iter_high = N_post _iter_step = 1 Key create_j: _pre_idx = _raw_pre_idx _j = _k Key create_cond: _post_idx = _raw_post_idx _cond = (i != _k) and (rand() < (0.37 * exp((- ((((x_soma_pre - x_soma_post) ** 2) + ((y_soma_pre - y_soma_post) ** 2)) + ((z_soma_pre - z_soma_post) ** 2))) / (2 * ((2500 * umetre) ** 2))))) Key update_post: _post_idx = _raw_post_idx _n = 1 2021-11-05 15:14:43,151 DIAGNOSTIC brian2.devices.device: EC_pyCANtoEC_inh_synapses_create_generator_codeobject snippet (scalar): Key setup_iterator: Key create_j: Key create_cond: _lio_create_cond_1 = 0.5 / ((2500.0 * umetre) ** 2) Key update_post: 2021-11-05 15:14:43,151 DIAGNOSTIC brian2.devices.device: EC_pyCANtoEC_inh_synapses_create_generator_codeobject snippet (vector): Key setup_iterator: _iter_low = 0 _iter_high = N_post _iter_step = 1 Key create_j: _pre_idx = _raw_pre_idx _j = _k Key create_cond: y_soma_post = _array_EC_inh_y_soma[_raw_post_idx] y_soma_pre = _array_EC_pyCAN_y_soma[_raw_pre_idx] z_soma_pre = _array_EC_pyCAN_z_soma[_raw_pre_idx] x_soma_post = _array_EC_inh_x_soma[_raw_post_idx] x_soma_pre = _array_EC_pyCAN_x_soma[_raw_pre_idx] z_soma_post = _array_EC_inh_z_soma[_raw_post_idx] _post_idx = _raw_post_idx i = _i _cond = (i != _k) and (_rand(_vectorisation_idx) < (0.37 * exp(_lio_create_cond_1 * (- ((((x_soma_pre - x_soma_post) ** 2) + ((y_soma_pre - y_soma_post) ** 2)) + ((z_soma_pre - z_soma_post) ** 2)))))) Key update_post: _post_idx = _raw_post_idx _n = 1 2021-11-05 15:14:43,154 DIAGNOSTIC brian2.devices.device: EC_pyCANtoEC_inh_synapses_create_generator_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code cdef int64_t *_namespace_rand_buffer cdef int32_t *_namespace_rand_buffer_index cdef double _rand(int _idx): cdef double **buffer_pointer = _namespace_rand_buffer cdef double *buffer = buffer_pointer[0] cdef _numpy.ndarray _new_rand if(_namespace_rand_buffer_index[0] == 0): if buffer != NULL: free(buffer) _new_rand = _numpy.random.rand(20000) buffer = _numpy.PyArray_DATA(_new_rand) PyArray_CLEARFLAGS(<_numpy.PyArrayObject*>_new_rand, _numpy.NPY_OWNDATA) buffer_pointer[0] = buffer cdef double val = buffer[_namespace_rand_buffer_index[0]] _namespace_rand_buffer_index[0] += 1 if _namespace_rand_buffer_index[0] == 20000: _namespace_rand_buffer_index[0] = 0 return val # template-specific support code cdef int _buffer_size = 1024 cdef int[:] _prebuf = _numpy.zeros(_buffer_size, dtype=_numpy.int32) cdef int[:] _postbuf = _numpy.zeros(_buffer_size, dtype=_numpy.int32) cdef int _curbuf = 0 cdef int _raw_pre_idx cdef int _raw_post_idx cdef void _flush_buffer(buf, dynarr, int buf_len): cdef size_t _curlen = dynarr.shape[0] cdef size_t _newlen = _curlen+buf_len # Resize the array dynarr.resize(_newlen) # Get the potentially newly created underlying data arrays data = dynarr.data data[_curlen:_curlen+buf_len] = buf[:buf_len] def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoEC_inh_N = _namespace['_array_EC_pyCANtoEC_inh_N'] cdef int32_t * _array_EC_pyCANtoEC_inh_N = _buf__array_EC_pyCANtoEC_inh_N.data cdef int32_t N = _namespace["N"] _var_N_post = _namespace["_var_N_post"] cdef int64_t N_post = _namespace["N_post"] _var_N_pre = _namespace["_var_N_pre"] cdef int64_t N_pre = _namespace["N_pre"] cdef bool _cond cdef int32_t _i cdef int32_t _iter_high cdef int32_t _iter_low cdef int32_t _iter_step cdef int32_t _j cdef int32_t _k cdef int32_t _n cdef int32_t _post_idx cdef int32_t _pre_idx cdef int32_t _raw_post_idx cdef int32_t _raw_pre_idx _var__source_offset = _namespace["_var__source_offset"] cdef int64_t _source_offset = _namespace["_source_offset"] _var__synaptic_post = _namespace["_var__synaptic_post"] _dynamic_array_EC_pyCANtoEC_inh__synaptic_post = _namespace["_dynamic_array_EC_pyCANtoEC_inh__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoEC_inh__synaptic_post = _namespace['_array_EC_pyCANtoEC_inh__synaptic_post'] cdef int32_t * _array_EC_pyCANtoEC_inh__synaptic_post = _buf__array_EC_pyCANtoEC_inh__synaptic_post.data cdef size_t _num_array_EC_pyCANtoEC_inh__synaptic_post = len(_namespace['_array_EC_pyCANtoEC_inh__synaptic_post']) cdef int32_t _synaptic_post _var__synaptic_pre = _namespace["_var__synaptic_pre"] _dynamic_array_EC_pyCANtoEC_inh__synaptic_pre = _namespace["_dynamic_array_EC_pyCANtoEC_inh__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoEC_inh__synaptic_pre = _namespace['_array_EC_pyCANtoEC_inh__synaptic_pre'] cdef int32_t * _array_EC_pyCANtoEC_inh__synaptic_pre = _buf__array_EC_pyCANtoEC_inh__synaptic_pre.data cdef size_t _num_array_EC_pyCANtoEC_inh__synaptic_pre = len(_namespace['_array_EC_pyCANtoEC_inh__synaptic_pre']) cdef int32_t _synaptic_pre _var__target_offset = _namespace["_var__target_offset"] cdef int64_t _target_offset = _namespace["_target_offset"] cdef int32_t i # namespace for function rand global _namespace_rand_buffer global _namespace_num_rand_buffer cdef _numpy.ndarray[int64_t, ndim=1, mode='c'] _buf__rand_buffer = _namespace['_rand_buffer'] _namespace_rand_buffer = _buf__rand_buffer.data _namespace_num_rand_buffer = len(_namespace['_rand_buffer']) # namespace for function rand global _namespace_rand_buffer_index global _namespace_num_rand_buffer_index cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__rand_buffer_index = _namespace['_rand_buffer_index'] _namespace_rand_buffer_index = _buf__rand_buffer_index.data _namespace_num_rand_buffer_index = len(_namespace['_rand_buffer_index']) _var_umetre = _namespace["_var_umetre"] cdef double umetre = _namespace["umetre"] _var_x_soma_post = _namespace["_var_x_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_inh_x_soma = _namespace['_array_EC_inh_x_soma'] cdef double * _array_EC_inh_x_soma = _buf__array_EC_inh_x_soma.data cdef size_t _num_array_EC_inh_x_soma = len(_namespace['_array_EC_inh_x_soma']) cdef double x_soma_post _var_x_soma_pre = _namespace["_var_x_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_x_soma = _namespace['_array_EC_pyCAN_x_soma'] cdef double * _array_EC_pyCAN_x_soma = _buf__array_EC_pyCAN_x_soma.data cdef size_t _num_array_EC_pyCAN_x_soma = len(_namespace['_array_EC_pyCAN_x_soma']) cdef double x_soma_pre _var_y_soma_post = _namespace["_var_y_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_inh_y_soma = _namespace['_array_EC_inh_y_soma'] cdef double * _array_EC_inh_y_soma = _buf__array_EC_inh_y_soma.data cdef size_t _num_array_EC_inh_y_soma = len(_namespace['_array_EC_inh_y_soma']) cdef double y_soma_post _var_y_soma_pre = _namespace["_var_y_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_y_soma = _namespace['_array_EC_pyCAN_y_soma'] cdef double * _array_EC_pyCAN_y_soma = _buf__array_EC_pyCAN_y_soma.data cdef size_t _num_array_EC_pyCAN_y_soma = len(_namespace['_array_EC_pyCAN_y_soma']) cdef double y_soma_pre _var_z_soma_post = _namespace["_var_z_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_inh_z_soma = _namespace['_array_EC_inh_z_soma'] cdef double * _array_EC_inh_z_soma = _buf__array_EC_inh_z_soma.data cdef size_t _num_array_EC_inh_z_soma = len(_namespace['_array_EC_inh_z_soma']) cdef double z_soma_post _var_z_soma_pre = _namespace["_var_z_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_z_soma = _namespace['_array_EC_pyCAN_z_soma'] cdef double * _array_EC_pyCAN_z_soma = _buf__array_EC_pyCAN_z_soma.data cdef size_t _num_array_EC_pyCAN_z_soma = len(_namespace['_array_EC_pyCAN_z_soma']) cdef double z_soma_pre cdef double _lio_create_cond_1 if '_owner' in _namespace: _owner = _namespace['_owner'] cdef int* _prebuf_ptr = &(_prebuf[0]) cdef int* _postbuf_ptr = &(_postbuf[0]) global _curbuf cdef size_t oldsize = len(_dynamic_array_EC_pyCANtoEC_inh__synaptic_pre) cdef size_t newsize # The following variables are only used for probabilistic connections cdef bool _jump_algo cdef double _log1p, _pconst cdef size_t _jump # scalar code _vectorisation_idx = 1 _lio_create_cond_1 = 0.5 / ((2500.0 * umetre) ** 2) for _i in range(N_pre): _raw_pre_idx = _i + _source_offset _iter_low = 0 _iter_high = N_post _iter_step = 1 for _k in range(_iter_low, _iter_high, _iter_step): _pre_idx = _raw_pre_idx _j = _k _raw_post_idx = _j + _target_offset if _j<0 or _j>=N_post: raise IndexError("index j=%d outside allowed range from 0 to %d" % (_j, N_post-1)) y_soma_post = _array_EC_inh_y_soma[_raw_post_idx] y_soma_pre = _array_EC_pyCAN_y_soma[_raw_pre_idx] z_soma_pre = _array_EC_pyCAN_z_soma[_raw_pre_idx] x_soma_post = _array_EC_inh_x_soma[_raw_post_idx] x_soma_pre = _array_EC_pyCAN_x_soma[_raw_pre_idx] z_soma_post = _array_EC_inh_z_soma[_raw_post_idx] _post_idx = _raw_post_idx i = _i _cond = (i != _k) and (_rand(_vectorisation_idx) < (0.37 * exp(_lio_create_cond_1 * (- ((((x_soma_pre - x_soma_post) ** 2) + ((y_soma_pre - y_soma_post) ** 2)) + ((z_soma_pre - z_soma_post) ** 2)))))) if not _cond: continue _post_idx = _raw_post_idx _n = 1 for _repetition in range(_n): _prebuf_ptr[_curbuf] = _pre_idx _postbuf_ptr[_curbuf] = _post_idx _curbuf += 1 # Flush buffer if _curbuf==_buffer_size: _flush_buffer(_prebuf, _dynamic_array_EC_pyCANtoEC_inh__synaptic_pre, _curbuf) _flush_buffer(_postbuf, _dynamic_array_EC_pyCANtoEC_inh__synaptic_post, _curbuf) _curbuf = 0 # Final buffer flush _flush_buffer(_prebuf, _dynamic_array_EC_pyCANtoEC_inh__synaptic_pre, _curbuf) _flush_buffer(_postbuf, _dynamic_array_EC_pyCANtoEC_inh__synaptic_post, _curbuf) _curbuf = 0 # reset the buffer for the next run newsize = len(_dynamic_array_EC_pyCANtoEC_inh__synaptic_pre) # now we need to resize all registered variables and set the total number # of synapse (via Python) _owner._resize(newsize) # And update N_incoming, N_outgoing and synapse_number _owner._update_synapse_numbers(oldsize) before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoEC_inh_N = _namespace['_array_EC_pyCANtoEC_inh_N'] cdef int32_t * _array_EC_pyCANtoEC_inh_N = _buf__array_EC_pyCANtoEC_inh_N.data cdef int32_t N = _namespace["N"] _var_N_post = _namespace["_var_N_post"] cdef int64_t N_post = _namespace["N_post"] _var_N_pre = _namespace["_var_N_pre"] cdef int64_t N_pre = _namespace["N_pre"] cdef bool _cond cdef int32_t _i cdef int32_t _iter_high cdef int32_t _iter_low cdef int32_t _iter_step cdef int32_t _j cdef int32_t _k cdef int32_t _n cdef int32_t _post_idx cdef int32_t _pre_idx cdef int32_t _raw_post_idx cdef int32_t _raw_pre_idx _var__source_offset = _namespace["_var__source_offset"] cdef int64_t _source_offset = _namespace["_source_offset"] _var__synaptic_post = _namespace["_var__synaptic_post"] _dynamic_array_EC_pyCANtoEC_inh__synaptic_post = _namespace["_dynamic_array_EC_pyCANtoEC_inh__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoEC_inh__synaptic_post = _namespace['_array_EC_pyCANtoEC_inh__synaptic_post'] cdef int32_t * _array_EC_pyCANtoEC_inh__synaptic_post = _buf__array_EC_pyCANtoEC_inh__synaptic_post.data cdef size_t _num_array_EC_pyCANtoEC_inh__synaptic_post = len(_namespace['_array_EC_pyCANtoEC_inh__synaptic_post']) cdef int32_t _synaptic_post _var__synaptic_pre = _namespace["_var__synaptic_pre"] _dynamic_array_EC_pyCANtoEC_inh__synaptic_pre = _namespace["_dynamic_array_EC_pyCANtoEC_inh__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoEC_inh__synaptic_pre = _namespace['_array_EC_pyCANtoEC_inh__synaptic_pre'] cdef int32_t * _array_EC_pyCANtoEC_inh__synaptic_pre = _buf__array_EC_pyCANtoEC_inh__synaptic_pre.data cdef size_t _num_array_EC_pyCANtoEC_inh__synaptic_pre = len(_namespace['_array_EC_pyCANtoEC_inh__synaptic_pre']) cdef int32_t _synaptic_pre _var__target_offset = _namespace["_var__target_offset"] cdef int64_t _target_offset = _namespace["_target_offset"] cdef int32_t i # namespace for function rand global _namespace_rand_buffer global _namespace_num_rand_buffer cdef _numpy.ndarray[int64_t, ndim=1, mode='c'] _buf__rand_buffer = _namespace['_rand_buffer'] _namespace_rand_buffer = _buf__rand_buffer.data _namespace_num_rand_buffer = len(_namespace['_rand_buffer']) # namespace for function rand global _namespace_rand_buffer_index global _namespace_num_rand_buffer_index cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__rand_buffer_index = _namespace['_rand_buffer_index'] _namespace_rand_buffer_index = _buf__rand_buffer_index.data _namespace_num_rand_buffer_index = len(_namespace['_rand_buffer_index']) _var_umetre = _namespace["_var_umetre"] cdef double umetre = _namespace["umetre"] _var_x_soma_post = _namespace["_var_x_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_inh_x_soma = _namespace['_array_EC_inh_x_soma'] cdef double * _array_EC_inh_x_soma = _buf__array_EC_inh_x_soma.data cdef size_t _num_array_EC_inh_x_soma = len(_namespace['_array_EC_inh_x_soma']) cdef double x_soma_post _var_x_soma_pre = _namespace["_var_x_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_x_soma = _namespace['_array_EC_pyCAN_x_soma'] cdef double * _array_EC_pyCAN_x_soma = _buf__array_EC_pyCAN_x_soma.data cdef size_t _num_array_EC_pyCAN_x_soma = len(_namespace['_array_EC_pyCAN_x_soma']) cdef double x_soma_pre _var_y_soma_post = _namespace["_var_y_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_inh_y_soma = _namespace['_array_EC_inh_y_soma'] cdef double * _array_EC_inh_y_soma = _buf__array_EC_inh_y_soma.data cdef size_t _num_array_EC_inh_y_soma = len(_namespace['_array_EC_inh_y_soma']) cdef double y_soma_post _var_y_soma_pre = _namespace["_var_y_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_y_soma = _namespace['_array_EC_pyCAN_y_soma'] cdef double * _array_EC_pyCAN_y_soma = _buf__array_EC_pyCAN_y_soma.data cdef size_t _num_array_EC_pyCAN_y_soma = len(_namespace['_array_EC_pyCAN_y_soma']) cdef double y_soma_pre _var_z_soma_post = _namespace["_var_z_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_inh_z_soma = _namespace['_array_EC_inh_z_soma'] cdef double * _array_EC_inh_z_soma = _buf__array_EC_inh_z_soma.data cdef size_t _num_array_EC_inh_z_soma = len(_namespace['_array_EC_inh_z_soma']) cdef double z_soma_post _var_z_soma_pre = _namespace["_var_z_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_z_soma = _namespace['_array_EC_pyCAN_z_soma'] cdef double * _array_EC_pyCAN_z_soma = _buf__array_EC_pyCAN_z_soma.data cdef size_t _num_array_EC_pyCAN_z_soma = len(_namespace['_array_EC_pyCAN_z_soma']) cdef double z_soma_pre cdef double _lio_create_cond_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoEC_inh_N = _namespace['_array_EC_pyCANtoEC_inh_N'] cdef int32_t * _array_EC_pyCANtoEC_inh_N = _buf__array_EC_pyCANtoEC_inh_N.data cdef int32_t N = _namespace["N"] _var_N_post = _namespace["_var_N_post"] cdef int64_t N_post = _namespace["N_post"] _var_N_pre = _namespace["_var_N_pre"] cdef int64_t N_pre = _namespace["N_pre"] cdef bool _cond cdef int32_t _i cdef int32_t _iter_high cdef int32_t _iter_low cdef int32_t _iter_step cdef int32_t _j cdef int32_t _k cdef int32_t _n cdef int32_t _post_idx cdef int32_t _pre_idx cdef int32_t _raw_post_idx cdef int32_t _raw_pre_idx _var__source_offset = _namespace["_var__source_offset"] cdef int64_t _source_offset = _namespace["_source_offset"] _var__synaptic_post = _namespace["_var__synaptic_post"] _dynamic_array_EC_pyCANtoEC_inh__synaptic_post = _namespace["_dynamic_array_EC_pyCANtoEC_inh__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoEC_inh__synaptic_post = _namespace['_array_EC_pyCANtoEC_inh__synaptic_post'] cdef int32_t * _array_EC_pyCANtoEC_inh__synaptic_post = _buf__array_EC_pyCANtoEC_inh__synaptic_post.data cdef size_t _num_array_EC_pyCANtoEC_inh__synaptic_post = len(_namespace['_array_EC_pyCANtoEC_inh__synaptic_post']) cdef int32_t _synaptic_post _var__synaptic_pre = _namespace["_var__synaptic_pre"] _dynamic_array_EC_pyCANtoEC_inh__synaptic_pre = _namespace["_dynamic_array_EC_pyCANtoEC_inh__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoEC_inh__synaptic_pre = _namespace['_array_EC_pyCANtoEC_inh__synaptic_pre'] cdef int32_t * _array_EC_pyCANtoEC_inh__synaptic_pre = _buf__array_EC_pyCANtoEC_inh__synaptic_pre.data cdef size_t _num_array_EC_pyCANtoEC_inh__synaptic_pre = len(_namespace['_array_EC_pyCANtoEC_inh__synaptic_pre']) cdef int32_t _synaptic_pre _var__target_offset = _namespace["_var__target_offset"] cdef int64_t _target_offset = _namespace["_target_offset"] cdef int32_t i # namespace for function rand global _namespace_rand_buffer global _namespace_num_rand_buffer cdef _numpy.ndarray[int64_t, ndim=1, mode='c'] _buf__rand_buffer = _namespace['_rand_buffer'] _namespace_rand_buffer = _buf__rand_buffer.data _namespace_num_rand_buffer = len(_namespace['_rand_buffer']) # namespace for function rand global _namespace_rand_buffer_index global _namespace_num_rand_buffer_index cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__rand_buffer_index = _namespace['_rand_buffer_index'] _namespace_rand_buffer_index = _buf__rand_buffer_index.data _namespace_num_rand_buffer_index = len(_namespace['_rand_buffer_index']) _var_umetre = _namespace["_var_umetre"] cdef double umetre = _namespace["umetre"] _var_x_soma_post = _namespace["_var_x_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_inh_x_soma = _namespace['_array_EC_inh_x_soma'] cdef double * _array_EC_inh_x_soma = _buf__array_EC_inh_x_soma.data cdef size_t _num_array_EC_inh_x_soma = len(_namespace['_array_EC_inh_x_soma']) cdef double x_soma_post _var_x_soma_pre = _namespace["_var_x_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_x_soma = _namespace['_array_EC_pyCAN_x_soma'] cdef double * _array_EC_pyCAN_x_soma = _buf__array_EC_pyCAN_x_soma.data cdef size_t _num_array_EC_pyCAN_x_soma = len(_namespace['_array_EC_pyCAN_x_soma']) cdef double x_soma_pre _var_y_soma_post = _namespace["_var_y_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_inh_y_soma = _namespace['_array_EC_inh_y_soma'] cdef double * _array_EC_inh_y_soma = _buf__array_EC_inh_y_soma.data cdef size_t _num_array_EC_inh_y_soma = len(_namespace['_array_EC_inh_y_soma']) cdef double y_soma_post _var_y_soma_pre = _namespace["_var_y_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_y_soma = _namespace['_array_EC_pyCAN_y_soma'] cdef double * _array_EC_pyCAN_y_soma = _buf__array_EC_pyCAN_y_soma.data cdef size_t _num_array_EC_pyCAN_y_soma = len(_namespace['_array_EC_pyCAN_y_soma']) cdef double y_soma_pre _var_z_soma_post = _namespace["_var_z_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_inh_z_soma = _namespace['_array_EC_inh_z_soma'] cdef double * _array_EC_inh_z_soma = _buf__array_EC_inh_z_soma.data cdef size_t _num_array_EC_inh_z_soma = len(_namespace['_array_EC_inh_z_soma']) cdef double z_soma_post _var_z_soma_pre = _namespace["_var_z_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_z_soma = _namespace['_array_EC_pyCAN_z_soma'] cdef double * _array_EC_pyCAN_z_soma = _buf__array_EC_pyCAN_z_soma.data cdef size_t _num_array_EC_pyCAN_z_soma = len(_namespace['_array_EC_pyCAN_z_soma']) cdef double z_soma_pre cdef double _lio_create_cond_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:14:43,154 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name EC_pyCANtoEC_inh_synapses_create_generator_codeobject 2021-11-05 15:14:43,155 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "EC_pyCANtoEC_inh_synapses_create_generator" using Cython module "_cython_magic_6d58a9fd19a7e97b9d98616568f5777d" 2021-11-05 15:14:43,155 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140605447810928 on /home/nikos/.cython/brian_extensions/_cython_magic_6d58a9fd19a7e97b9d98616568f5777d.lock 2021-11-05 15:14:43,155 DEBUG brian2.utils.filelock: Lock 140605447810928 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_6d58a9fd19a7e97b9d98616568f5777d.lock 2021-11-05 15:14:43,157 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140605447810928 on /home/nikos/.cython/brian_extensions/_cython_magic_6d58a9fd19a7e97b9d98616568f5777d.lock 2021-11-05 15:14:43,157 DEBUG brian2.utils.filelock: Lock 140605447810928 released on /home/nikos/.cython/brian_extensions/_cython_magic_6d58a9fd19a7e97b9d98616568f5777d.lock 2021-11-05 15:14:43,420 DIAGNOSTIC brian2.core.names: Created object of class Synapses with name EC_inhtoEC_pyCAN 2021-11-05 15:14:43,420 DIAGNOSTIC brian2.core.base: Created BrianObject with name EC_inhtoEC_pyCAN, clock=Clock(dt=100. * usecond, name='defaultclock'), when=start, order=0 2021-11-05 15:14:43,423 DIAGNOSTIC brian2.core.names: Created object of class SynapticPathway with name EC_inhtoEC_pyCAN_pre 2021-11-05 15:14:43,423 DIAGNOSTIC brian2.core.base: Created BrianObject with name EC_inhtoEC_pyCAN_pre, clock=Clock(dt=100. * usecond, name='defaultclock'), when=synapses, order=-1 2021-11-05 15:14:43,436 DEBUG brian2.synapses.synapses: Creating synapses from group 'EC_inh' to group 'EC_pyCAN', using generator '_k for _k in range(N_post) if (i!=_k) and rand()<0.54*exp(-((x_soma_pre-x_soma_post)**2+(y_soma_pre-y_soma_post)**2+(z_soma_pre-z_soma_post)**2)/(2*(350*umetre)**2))' 2021-11-05 15:14:43,436 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=EC_inhtoEC_pyCAN, template name=synapses_create_generator) for abstract code: Key setup_iterator: _iter_low = 0 _iter_high = N_post _iter_step = 1 Key create_j: _pre_idx = _raw_pre_idx _j = _k Key create_cond: _post_idx = _raw_post_idx _cond = (i != _k) and (rand() < (0.54 * exp((- ((((x_soma_pre - x_soma_post) ** 2) + ((y_soma_pre - y_soma_post) ** 2)) + ((z_soma_pre - z_soma_post) ** 2))) / (2 * ((350 * umetre) ** 2))))) Key update_post: _post_idx = _raw_post_idx _n = 1 2021-11-05 15:14:43,499 DIAGNOSTIC brian2.devices.device: EC_inhtoEC_pyCAN_synapses_create_generator_codeobject abstract code: Key setup_iterator: _iter_low = 0 _iter_high = N_post _iter_step = 1 Key create_j: _pre_idx = _raw_pre_idx _j = _k Key create_cond: _post_idx = _raw_post_idx _cond = (i != _k) and (rand() < (0.54 * exp((- ((((x_soma_pre - x_soma_post) ** 2) + ((y_soma_pre - y_soma_post) ** 2)) + ((z_soma_pre - z_soma_post) ** 2))) / (2 * ((350 * umetre) ** 2))))) Key update_post: _post_idx = _raw_post_idx _n = 1 2021-11-05 15:14:43,504 DIAGNOSTIC brian2.devices.device: EC_inhtoEC_pyCAN_synapses_create_generator_codeobject snippet (scalar): Key setup_iterator: Key create_j: Key create_cond: _lio_create_cond_1 = 0.5 / ((350.0 * umetre) ** 2) Key update_post: 2021-11-05 15:14:43,504 DIAGNOSTIC brian2.devices.device: EC_inhtoEC_pyCAN_synapses_create_generator_codeobject snippet (vector): Key setup_iterator: _iter_low = 0 _iter_high = N_post _iter_step = 1 Key create_j: _pre_idx = _raw_pre_idx _j = _k Key create_cond: y_soma_post = _array_EC_pyCAN_y_soma[_raw_post_idx] y_soma_pre = _array_EC_inh_y_soma[_raw_pre_idx] z_soma_pre = _array_EC_inh_z_soma[_raw_pre_idx] x_soma_post = _array_EC_pyCAN_x_soma[_raw_post_idx] x_soma_pre = _array_EC_inh_x_soma[_raw_pre_idx] z_soma_post = _array_EC_pyCAN_z_soma[_raw_post_idx] _post_idx = _raw_post_idx i = _i _cond = (i != _k) and (_rand(_vectorisation_idx) < (0.54 * exp(_lio_create_cond_1 * (- ((((x_soma_pre - x_soma_post) ** 2) + ((y_soma_pre - y_soma_post) ** 2)) + ((z_soma_pre - z_soma_post) ** 2)))))) Key update_post: _post_idx = _raw_post_idx _n = 1 2021-11-05 15:14:43,504 DIAGNOSTIC brian2.devices.device: EC_inhtoEC_pyCAN_synapses_create_generator_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code cdef int64_t *_namespace_rand_buffer cdef int32_t *_namespace_rand_buffer_index cdef double _rand(int _idx): cdef double **buffer_pointer = _namespace_rand_buffer cdef double *buffer = buffer_pointer[0] cdef _numpy.ndarray _new_rand if(_namespace_rand_buffer_index[0] == 0): if buffer != NULL: free(buffer) _new_rand = _numpy.random.rand(20000) buffer = _numpy.PyArray_DATA(_new_rand) PyArray_CLEARFLAGS(<_numpy.PyArrayObject*>_new_rand, _numpy.NPY_OWNDATA) buffer_pointer[0] = buffer cdef double val = buffer[_namespace_rand_buffer_index[0]] _namespace_rand_buffer_index[0] += 1 if _namespace_rand_buffer_index[0] == 20000: _namespace_rand_buffer_index[0] = 0 return val # template-specific support code cdef int _buffer_size = 1024 cdef int[:] _prebuf = _numpy.zeros(_buffer_size, dtype=_numpy.int32) cdef int[:] _postbuf = _numpy.zeros(_buffer_size, dtype=_numpy.int32) cdef int _curbuf = 0 cdef int _raw_pre_idx cdef int _raw_post_idx cdef void _flush_buffer(buf, dynarr, int buf_len): cdef size_t _curlen = dynarr.shape[0] cdef size_t _newlen = _curlen+buf_len # Resize the array dynarr.resize(_newlen) # Get the potentially newly created underlying data arrays data = dynarr.data data[_curlen:_curlen+buf_len] = buf[:buf_len] def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_inhtoEC_pyCAN_N = _namespace['_array_EC_inhtoEC_pyCAN_N'] cdef int32_t * _array_EC_inhtoEC_pyCAN_N = _buf__array_EC_inhtoEC_pyCAN_N.data cdef int32_t N = _namespace["N"] _var_N_post = _namespace["_var_N_post"] cdef int64_t N_post = _namespace["N_post"] _var_N_pre = _namespace["_var_N_pre"] cdef int64_t N_pre = _namespace["N_pre"] cdef bool _cond cdef int32_t _i cdef int32_t _iter_high cdef int32_t _iter_low cdef int32_t _iter_step cdef int32_t _j cdef int32_t _k cdef int32_t _n cdef int32_t _post_idx cdef int32_t _pre_idx cdef int32_t _raw_post_idx cdef int32_t _raw_pre_idx _var__source_offset = _namespace["_var__source_offset"] cdef int64_t _source_offset = _namespace["_source_offset"] _var__synaptic_post = _namespace["_var__synaptic_post"] _dynamic_array_EC_inhtoEC_pyCAN__synaptic_post = _namespace["_dynamic_array_EC_inhtoEC_pyCAN__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_inhtoEC_pyCAN__synaptic_post = _namespace['_array_EC_inhtoEC_pyCAN__synaptic_post'] cdef int32_t * _array_EC_inhtoEC_pyCAN__synaptic_post = _buf__array_EC_inhtoEC_pyCAN__synaptic_post.data cdef size_t _num_array_EC_inhtoEC_pyCAN__synaptic_post = len(_namespace['_array_EC_inhtoEC_pyCAN__synaptic_post']) cdef int32_t _synaptic_post _var__synaptic_pre = _namespace["_var__synaptic_pre"] _dynamic_array_EC_inhtoEC_pyCAN__synaptic_pre = _namespace["_dynamic_array_EC_inhtoEC_pyCAN__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_inhtoEC_pyCAN__synaptic_pre = _namespace['_array_EC_inhtoEC_pyCAN__synaptic_pre'] cdef int32_t * _array_EC_inhtoEC_pyCAN__synaptic_pre = _buf__array_EC_inhtoEC_pyCAN__synaptic_pre.data cdef size_t _num_array_EC_inhtoEC_pyCAN__synaptic_pre = len(_namespace['_array_EC_inhtoEC_pyCAN__synaptic_pre']) cdef int32_t _synaptic_pre _var__target_offset = _namespace["_var__target_offset"] cdef int64_t _target_offset = _namespace["_target_offset"] cdef int32_t i # namespace for function rand global _namespace_rand_buffer global _namespace_num_rand_buffer cdef _numpy.ndarray[int64_t, ndim=1, mode='c'] _buf__rand_buffer = _namespace['_rand_buffer'] _namespace_rand_buffer = _buf__rand_buffer.data _namespace_num_rand_buffer = len(_namespace['_rand_buffer']) # namespace for function rand global _namespace_rand_buffer_index global _namespace_num_rand_buffer_index cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__rand_buffer_index = _namespace['_rand_buffer_index'] _namespace_rand_buffer_index = _buf__rand_buffer_index.data _namespace_num_rand_buffer_index = len(_namespace['_rand_buffer_index']) _var_umetre = _namespace["_var_umetre"] cdef double umetre = _namespace["umetre"] _var_x_soma_post = _namespace["_var_x_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_x_soma = _namespace['_array_EC_pyCAN_x_soma'] cdef double * _array_EC_pyCAN_x_soma = _buf__array_EC_pyCAN_x_soma.data cdef size_t _num_array_EC_pyCAN_x_soma = len(_namespace['_array_EC_pyCAN_x_soma']) cdef double x_soma_post _var_x_soma_pre = _namespace["_var_x_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_inh_x_soma = _namespace['_array_EC_inh_x_soma'] cdef double * _array_EC_inh_x_soma = _buf__array_EC_inh_x_soma.data cdef size_t _num_array_EC_inh_x_soma = len(_namespace['_array_EC_inh_x_soma']) cdef double x_soma_pre _var_y_soma_post = _namespace["_var_y_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_y_soma = _namespace['_array_EC_pyCAN_y_soma'] cdef double * _array_EC_pyCAN_y_soma = _buf__array_EC_pyCAN_y_soma.data cdef size_t _num_array_EC_pyCAN_y_soma = len(_namespace['_array_EC_pyCAN_y_soma']) cdef double y_soma_post _var_y_soma_pre = _namespace["_var_y_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_inh_y_soma = _namespace['_array_EC_inh_y_soma'] cdef double * _array_EC_inh_y_soma = _buf__array_EC_inh_y_soma.data cdef size_t _num_array_EC_inh_y_soma = len(_namespace['_array_EC_inh_y_soma']) cdef double y_soma_pre _var_z_soma_post = _namespace["_var_z_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_z_soma = _namespace['_array_EC_pyCAN_z_soma'] cdef double * _array_EC_pyCAN_z_soma = _buf__array_EC_pyCAN_z_soma.data cdef size_t _num_array_EC_pyCAN_z_soma = len(_namespace['_array_EC_pyCAN_z_soma']) cdef double z_soma_post _var_z_soma_pre = _namespace["_var_z_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_inh_z_soma = _namespace['_array_EC_inh_z_soma'] cdef double * _array_EC_inh_z_soma = _buf__array_EC_inh_z_soma.data cdef size_t _num_array_EC_inh_z_soma = len(_namespace['_array_EC_inh_z_soma']) cdef double z_soma_pre cdef double _lio_create_cond_1 if '_owner' in _namespace: _owner = _namespace['_owner'] cdef int* _prebuf_ptr = &(_prebuf[0]) cdef int* _postbuf_ptr = &(_postbuf[0]) global _curbuf cdef size_t oldsize = len(_dynamic_array_EC_inhtoEC_pyCAN__synaptic_pre) cdef size_t newsize # The following variables are only used for probabilistic connections cdef bool _jump_algo cdef double _log1p, _pconst cdef size_t _jump # scalar code _vectorisation_idx = 1 _lio_create_cond_1 = 0.5 / ((350.0 * umetre) ** 2) for _i in range(N_pre): _raw_pre_idx = _i + _source_offset _iter_low = 0 _iter_high = N_post _iter_step = 1 for _k in range(_iter_low, _iter_high, _iter_step): _pre_idx = _raw_pre_idx _j = _k _raw_post_idx = _j + _target_offset if _j<0 or _j>=N_post: raise IndexError("index j=%d outside allowed range from 0 to %d" % (_j, N_post-1)) y_soma_post = _array_EC_pyCAN_y_soma[_raw_post_idx] y_soma_pre = _array_EC_inh_y_soma[_raw_pre_idx] z_soma_pre = _array_EC_inh_z_soma[_raw_pre_idx] x_soma_post = _array_EC_pyCAN_x_soma[_raw_post_idx] x_soma_pre = _array_EC_inh_x_soma[_raw_pre_idx] z_soma_post = _array_EC_pyCAN_z_soma[_raw_post_idx] _post_idx = _raw_post_idx i = _i _cond = (i != _k) and (_rand(_vectorisation_idx) < (0.54 * exp(_lio_create_cond_1 * (- ((((x_soma_pre - x_soma_post) ** 2) + ((y_soma_pre - y_soma_post) ** 2)) + ((z_soma_pre - z_soma_post) ** 2)))))) if not _cond: continue _post_idx = _raw_post_idx _n = 1 for _repetition in range(_n): _prebuf_ptr[_curbuf] = _pre_idx _postbuf_ptr[_curbuf] = _post_idx _curbuf += 1 # Flush buffer if _curbuf==_buffer_size: _flush_buffer(_prebuf, _dynamic_array_EC_inhtoEC_pyCAN__synaptic_pre, _curbuf) _flush_buffer(_postbuf, _dynamic_array_EC_inhtoEC_pyCAN__synaptic_post, _curbuf) _curbuf = 0 # Final buffer flush _flush_buffer(_prebuf, _dynamic_array_EC_inhtoEC_pyCAN__synaptic_pre, _curbuf) _flush_buffer(_postbuf, _dynamic_array_EC_inhtoEC_pyCAN__synaptic_post, _curbuf) _curbuf = 0 # reset the buffer for the next run newsize = len(_dynamic_array_EC_inhtoEC_pyCAN__synaptic_pre) # now we need to resize all registered variables and set the total number # of synapse (via Python) _owner._resize(newsize) # And update N_incoming, N_outgoing and synapse_number _owner._update_synapse_numbers(oldsize) before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_inhtoEC_pyCAN_N = _namespace['_array_EC_inhtoEC_pyCAN_N'] cdef int32_t * _array_EC_inhtoEC_pyCAN_N = _buf__array_EC_inhtoEC_pyCAN_N.data cdef int32_t N = _namespace["N"] _var_N_post = _namespace["_var_N_post"] cdef int64_t N_post = _namespace["N_post"] _var_N_pre = _namespace["_var_N_pre"] cdef int64_t N_pre = _namespace["N_pre"] cdef bool _cond cdef int32_t _i cdef int32_t _iter_high cdef int32_t _iter_low cdef int32_t _iter_step cdef int32_t _j cdef int32_t _k cdef int32_t _n cdef int32_t _post_idx cdef int32_t _pre_idx cdef int32_t _raw_post_idx cdef int32_t _raw_pre_idx _var__source_offset = _namespace["_var__source_offset"] cdef int64_t _source_offset = _namespace["_source_offset"] _var__synaptic_post = _namespace["_var__synaptic_post"] _dynamic_array_EC_inhtoEC_pyCAN__synaptic_post = _namespace["_dynamic_array_EC_inhtoEC_pyCAN__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_inhtoEC_pyCAN__synaptic_post = _namespace['_array_EC_inhtoEC_pyCAN__synaptic_post'] cdef int32_t * _array_EC_inhtoEC_pyCAN__synaptic_post = _buf__array_EC_inhtoEC_pyCAN__synaptic_post.data cdef size_t _num_array_EC_inhtoEC_pyCAN__synaptic_post = len(_namespace['_array_EC_inhtoEC_pyCAN__synaptic_post']) cdef int32_t _synaptic_post _var__synaptic_pre = _namespace["_var__synaptic_pre"] _dynamic_array_EC_inhtoEC_pyCAN__synaptic_pre = _namespace["_dynamic_array_EC_inhtoEC_pyCAN__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_inhtoEC_pyCAN__synaptic_pre = _namespace['_array_EC_inhtoEC_pyCAN__synaptic_pre'] cdef int32_t * _array_EC_inhtoEC_pyCAN__synaptic_pre = _buf__array_EC_inhtoEC_pyCAN__synaptic_pre.data cdef size_t _num_array_EC_inhtoEC_pyCAN__synaptic_pre = len(_namespace['_array_EC_inhtoEC_pyCAN__synaptic_pre']) cdef int32_t _synaptic_pre _var__target_offset = _namespace["_var__target_offset"] cdef int64_t _target_offset = _namespace["_target_offset"] cdef int32_t i # namespace for function rand global _namespace_rand_buffer global _namespace_num_rand_buffer cdef _numpy.ndarray[int64_t, ndim=1, mode='c'] _buf__rand_buffer = _namespace['_rand_buffer'] _namespace_rand_buffer = _buf__rand_buffer.data _namespace_num_rand_buffer = len(_namespace['_rand_buffer']) # namespace for function rand global _namespace_rand_buffer_index global _namespace_num_rand_buffer_index cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__rand_buffer_index = _namespace['_rand_buffer_index'] _namespace_rand_buffer_index = _buf__rand_buffer_index.data _namespace_num_rand_buffer_index = len(_namespace['_rand_buffer_index']) _var_umetre = _namespace["_var_umetre"] cdef double umetre = _namespace["umetre"] _var_x_soma_post = _namespace["_var_x_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_x_soma = _namespace['_array_EC_pyCAN_x_soma'] cdef double * _array_EC_pyCAN_x_soma = _buf__array_EC_pyCAN_x_soma.data cdef size_t _num_array_EC_pyCAN_x_soma = len(_namespace['_array_EC_pyCAN_x_soma']) cdef double x_soma_post _var_x_soma_pre = _namespace["_var_x_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_inh_x_soma = _namespace['_array_EC_inh_x_soma'] cdef double * _array_EC_inh_x_soma = _buf__array_EC_inh_x_soma.data cdef size_t _num_array_EC_inh_x_soma = len(_namespace['_array_EC_inh_x_soma']) cdef double x_soma_pre _var_y_soma_post = _namespace["_var_y_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_y_soma = _namespace['_array_EC_pyCAN_y_soma'] cdef double * _array_EC_pyCAN_y_soma = _buf__array_EC_pyCAN_y_soma.data cdef size_t _num_array_EC_pyCAN_y_soma = len(_namespace['_array_EC_pyCAN_y_soma']) cdef double y_soma_post _var_y_soma_pre = _namespace["_var_y_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_inh_y_soma = _namespace['_array_EC_inh_y_soma'] cdef double * _array_EC_inh_y_soma = _buf__array_EC_inh_y_soma.data cdef size_t _num_array_EC_inh_y_soma = len(_namespace['_array_EC_inh_y_soma']) cdef double y_soma_pre _var_z_soma_post = _namespace["_var_z_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_z_soma = _namespace['_array_EC_pyCAN_z_soma'] cdef double * _array_EC_pyCAN_z_soma = _buf__array_EC_pyCAN_z_soma.data cdef size_t _num_array_EC_pyCAN_z_soma = len(_namespace['_array_EC_pyCAN_z_soma']) cdef double z_soma_post _var_z_soma_pre = _namespace["_var_z_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_inh_z_soma = _namespace['_array_EC_inh_z_soma'] cdef double * _array_EC_inh_z_soma = _buf__array_EC_inh_z_soma.data cdef size_t _num_array_EC_inh_z_soma = len(_namespace['_array_EC_inh_z_soma']) cdef double z_soma_pre cdef double _lio_create_cond_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_inhtoEC_pyCAN_N = _namespace['_array_EC_inhtoEC_pyCAN_N'] cdef int32_t * _array_EC_inhtoEC_pyCAN_N = _buf__array_EC_inhtoEC_pyCAN_N.data cdef int32_t N = _namespace["N"] _var_N_post = _namespace["_var_N_post"] cdef int64_t N_post = _namespace["N_post"] _var_N_pre = _namespace["_var_N_pre"] cdef int64_t N_pre = _namespace["N_pre"] cdef bool _cond cdef int32_t _i cdef int32_t _iter_high cdef int32_t _iter_low cdef int32_t _iter_step cdef int32_t _j cdef int32_t _k cdef int32_t _n cdef int32_t _post_idx cdef int32_t _pre_idx cdef int32_t _raw_post_idx cdef int32_t _raw_pre_idx _var__source_offset = _namespace["_var__source_offset"] cdef int64_t _source_offset = _namespace["_source_offset"] _var__synaptic_post = _namespace["_var__synaptic_post"] _dynamic_array_EC_inhtoEC_pyCAN__synaptic_post = _namespace["_dynamic_array_EC_inhtoEC_pyCAN__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_inhtoEC_pyCAN__synaptic_post = _namespace['_array_EC_inhtoEC_pyCAN__synaptic_post'] cdef int32_t * _array_EC_inhtoEC_pyCAN__synaptic_post = _buf__array_EC_inhtoEC_pyCAN__synaptic_post.data cdef size_t _num_array_EC_inhtoEC_pyCAN__synaptic_post = len(_namespace['_array_EC_inhtoEC_pyCAN__synaptic_post']) cdef int32_t _synaptic_post _var__synaptic_pre = _namespace["_var__synaptic_pre"] _dynamic_array_EC_inhtoEC_pyCAN__synaptic_pre = _namespace["_dynamic_array_EC_inhtoEC_pyCAN__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_inhtoEC_pyCAN__synaptic_pre = _namespace['_array_EC_inhtoEC_pyCAN__synaptic_pre'] cdef int32_t * _array_EC_inhtoEC_pyCAN__synaptic_pre = _buf__array_EC_inhtoEC_pyCAN__synaptic_pre.data cdef size_t _num_array_EC_inhtoEC_pyCAN__synaptic_pre = len(_namespace['_array_EC_inhtoEC_pyCAN__synaptic_pre']) cdef int32_t _synaptic_pre _var__target_offset = _namespace["_var__target_offset"] cdef int64_t _target_offset = _namespace["_target_offset"] cdef int32_t i # namespace for function rand global _namespace_rand_buffer global _namespace_num_rand_buffer cdef _numpy.ndarray[int64_t, ndim=1, mode='c'] _buf__rand_buffer = _namespace['_rand_buffer'] _namespace_rand_buffer = _buf__rand_buffer.data _namespace_num_rand_buffer = len(_namespace['_rand_buffer']) # namespace for function rand global _namespace_rand_buffer_index global _namespace_num_rand_buffer_index cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__rand_buffer_index = _namespace['_rand_buffer_index'] _namespace_rand_buffer_index = _buf__rand_buffer_index.data _namespace_num_rand_buffer_index = len(_namespace['_rand_buffer_index']) _var_umetre = _namespace["_var_umetre"] cdef double umetre = _namespace["umetre"] _var_x_soma_post = _namespace["_var_x_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_x_soma = _namespace['_array_EC_pyCAN_x_soma'] cdef double * _array_EC_pyCAN_x_soma = _buf__array_EC_pyCAN_x_soma.data cdef size_t _num_array_EC_pyCAN_x_soma = len(_namespace['_array_EC_pyCAN_x_soma']) cdef double x_soma_post _var_x_soma_pre = _namespace["_var_x_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_inh_x_soma = _namespace['_array_EC_inh_x_soma'] cdef double * _array_EC_inh_x_soma = _buf__array_EC_inh_x_soma.data cdef size_t _num_array_EC_inh_x_soma = len(_namespace['_array_EC_inh_x_soma']) cdef double x_soma_pre _var_y_soma_post = _namespace["_var_y_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_y_soma = _namespace['_array_EC_pyCAN_y_soma'] cdef double * _array_EC_pyCAN_y_soma = _buf__array_EC_pyCAN_y_soma.data cdef size_t _num_array_EC_pyCAN_y_soma = len(_namespace['_array_EC_pyCAN_y_soma']) cdef double y_soma_post _var_y_soma_pre = _namespace["_var_y_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_inh_y_soma = _namespace['_array_EC_inh_y_soma'] cdef double * _array_EC_inh_y_soma = _buf__array_EC_inh_y_soma.data cdef size_t _num_array_EC_inh_y_soma = len(_namespace['_array_EC_inh_y_soma']) cdef double y_soma_pre _var_z_soma_post = _namespace["_var_z_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_z_soma = _namespace['_array_EC_pyCAN_z_soma'] cdef double * _array_EC_pyCAN_z_soma = _buf__array_EC_pyCAN_z_soma.data cdef size_t _num_array_EC_pyCAN_z_soma = len(_namespace['_array_EC_pyCAN_z_soma']) cdef double z_soma_post _var_z_soma_pre = _namespace["_var_z_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_inh_z_soma = _namespace['_array_EC_inh_z_soma'] cdef double * _array_EC_inh_z_soma = _buf__array_EC_inh_z_soma.data cdef size_t _num_array_EC_inh_z_soma = len(_namespace['_array_EC_inh_z_soma']) cdef double z_soma_pre cdef double _lio_create_cond_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:14:43,504 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name EC_inhtoEC_pyCAN_synapses_create_generator_codeobject 2021-11-05 15:14:43,505 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "EC_inhtoEC_pyCAN_synapses_create_generator" using Cython module "_cython_magic_31e3e002dbe95726e7274de85941bf47" 2021-11-05 15:14:43,505 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140606323544800 on /home/nikos/.cython/brian_extensions/_cython_magic_31e3e002dbe95726e7274de85941bf47.lock 2021-11-05 15:14:43,505 DEBUG brian2.utils.filelock: Lock 140606323544800 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_31e3e002dbe95726e7274de85941bf47.lock 2021-11-05 15:14:43,506 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140606323544800 on /home/nikos/.cython/brian_extensions/_cython_magic_31e3e002dbe95726e7274de85941bf47.lock 2021-11-05 15:14:43,506 DEBUG brian2.utils.filelock: Lock 140606323544800 released on /home/nikos/.cython/brian_extensions/_cython_magic_31e3e002dbe95726e7274de85941bf47.lock 2021-11-05 15:14:43,763 DIAGNOSTIC brian2.core.names: Created object of class Synapses with name DG_pytoDG_inh 2021-11-05 15:14:43,764 DIAGNOSTIC brian2.core.base: Created BrianObject with name DG_pytoDG_inh, clock=Clock(dt=100. * usecond, name='defaultclock'), when=start, order=0 2021-11-05 15:14:43,766 DIAGNOSTIC brian2.core.names: Created object of class SynapticPathway with name DG_pytoDG_inh_pre 2021-11-05 15:14:43,767 DIAGNOSTIC brian2.core.base: Created BrianObject with name DG_pytoDG_inh_pre, clock=Clock(dt=100. * usecond, name='defaultclock'), when=synapses, order=-1 2021-11-05 15:14:43,777 DEBUG brian2.synapses.synapses: Creating synapses from group 'DG_py' to group 'DG_inh', using generator '_k for _k in range(N_post) if (i!=_k) and rand()<0.06*exp(-((x_soma_pre-x_soma_post)**2+(y_soma_pre-y_soma_post)**2+(z_soma_pre-z_soma_post)**2)/(2*(2500*umetre)**2))' 2021-11-05 15:14:43,777 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=DG_pytoDG_inh, template name=synapses_create_generator) for abstract code: Key setup_iterator: _iter_low = 0 _iter_high = N_post _iter_step = 1 Key create_j: _pre_idx = _raw_pre_idx _j = _k Key create_cond: _post_idx = _raw_post_idx _cond = (i != _k) and (rand() < (0.06 * exp((- ((((x_soma_pre - x_soma_post) ** 2) + ((y_soma_pre - y_soma_post) ** 2)) + ((z_soma_pre - z_soma_post) ** 2))) / (2 * ((2500 * umetre) ** 2))))) Key update_post: _post_idx = _raw_post_idx _n = 1 2021-11-05 15:14:43,829 DIAGNOSTIC brian2.devices.device: DG_pytoDG_inh_synapses_create_generator_codeobject abstract code: Key setup_iterator: _iter_low = 0 _iter_high = N_post _iter_step = 1 Key create_j: _pre_idx = _raw_pre_idx _j = _k Key create_cond: _post_idx = _raw_post_idx _cond = (i != _k) and (rand() < (0.06 * exp((- ((((x_soma_pre - x_soma_post) ** 2) + ((y_soma_pre - y_soma_post) ** 2)) + ((z_soma_pre - z_soma_post) ** 2))) / (2 * ((2500 * umetre) ** 2))))) Key update_post: _post_idx = _raw_post_idx _n = 1 2021-11-05 15:14:43,834 DIAGNOSTIC brian2.devices.device: DG_pytoDG_inh_synapses_create_generator_codeobject snippet (scalar): Key setup_iterator: Key create_j: Key create_cond: _lio_create_cond_1 = 0.5 / ((2500.0 * umetre) ** 2) Key update_post: 2021-11-05 15:14:43,834 DIAGNOSTIC brian2.devices.device: DG_pytoDG_inh_synapses_create_generator_codeobject snippet (vector): Key setup_iterator: _iter_low = 0 _iter_high = N_post _iter_step = 1 Key create_j: _pre_idx = _raw_pre_idx _j = _k Key create_cond: y_soma_post = _array_DG_inh_y_soma[_raw_post_idx] y_soma_pre = _array_DG_py_y_soma[_raw_pre_idx] z_soma_pre = _array_DG_py_z_soma[_raw_pre_idx] x_soma_post = _array_DG_inh_x_soma[_raw_post_idx] x_soma_pre = _array_DG_py_x_soma[_raw_pre_idx] z_soma_post = _array_DG_inh_z_soma[_raw_post_idx] _post_idx = _raw_post_idx i = _i _cond = (i != _k) and (_rand(_vectorisation_idx) < (0.06 * exp(_lio_create_cond_1 * (- ((((x_soma_pre - x_soma_post) ** 2) + ((y_soma_pre - y_soma_post) ** 2)) + ((z_soma_pre - z_soma_post) ** 2)))))) Key update_post: _post_idx = _raw_post_idx _n = 1 2021-11-05 15:14:43,835 DIAGNOSTIC brian2.devices.device: DG_pytoDG_inh_synapses_create_generator_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code cdef int64_t *_namespace_rand_buffer cdef int32_t *_namespace_rand_buffer_index cdef double _rand(int _idx): cdef double **buffer_pointer = _namespace_rand_buffer cdef double *buffer = buffer_pointer[0] cdef _numpy.ndarray _new_rand if(_namespace_rand_buffer_index[0] == 0): if buffer != NULL: free(buffer) _new_rand = _numpy.random.rand(20000) buffer = _numpy.PyArray_DATA(_new_rand) PyArray_CLEARFLAGS(<_numpy.PyArrayObject*>_new_rand, _numpy.NPY_OWNDATA) buffer_pointer[0] = buffer cdef double val = buffer[_namespace_rand_buffer_index[0]] _namespace_rand_buffer_index[0] += 1 if _namespace_rand_buffer_index[0] == 20000: _namespace_rand_buffer_index[0] = 0 return val # template-specific support code cdef int _buffer_size = 1024 cdef int[:] _prebuf = _numpy.zeros(_buffer_size, dtype=_numpy.int32) cdef int[:] _postbuf = _numpy.zeros(_buffer_size, dtype=_numpy.int32) cdef int _curbuf = 0 cdef int _raw_pre_idx cdef int _raw_post_idx cdef void _flush_buffer(buf, dynarr, int buf_len): cdef size_t _curlen = dynarr.shape[0] cdef size_t _newlen = _curlen+buf_len # Resize the array dynarr.resize(_newlen) # Get the potentially newly created underlying data arrays data = dynarr.data data[_curlen:_curlen+buf_len] = buf[:buf_len] def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_DG_pytoDG_inh_N = _namespace['_array_DG_pytoDG_inh_N'] cdef int32_t * _array_DG_pytoDG_inh_N = _buf__array_DG_pytoDG_inh_N.data cdef int32_t N = _namespace["N"] _var_N_post = _namespace["_var_N_post"] cdef int64_t N_post = _namespace["N_post"] _var_N_pre = _namespace["_var_N_pre"] cdef int64_t N_pre = _namespace["N_pre"] cdef bool _cond cdef int32_t _i cdef int32_t _iter_high cdef int32_t _iter_low cdef int32_t _iter_step cdef int32_t _j cdef int32_t _k cdef int32_t _n cdef int32_t _post_idx cdef int32_t _pre_idx cdef int32_t _raw_post_idx cdef int32_t _raw_pre_idx _var__source_offset = _namespace["_var__source_offset"] cdef int64_t _source_offset = _namespace["_source_offset"] _var__synaptic_post = _namespace["_var__synaptic_post"] _dynamic_array_DG_pytoDG_inh__synaptic_post = _namespace["_dynamic_array_DG_pytoDG_inh__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_DG_pytoDG_inh__synaptic_post = _namespace['_array_DG_pytoDG_inh__synaptic_post'] cdef int32_t * _array_DG_pytoDG_inh__synaptic_post = _buf__array_DG_pytoDG_inh__synaptic_post.data cdef size_t _num_array_DG_pytoDG_inh__synaptic_post = len(_namespace['_array_DG_pytoDG_inh__synaptic_post']) cdef int32_t _synaptic_post _var__synaptic_pre = _namespace["_var__synaptic_pre"] _dynamic_array_DG_pytoDG_inh__synaptic_pre = _namespace["_dynamic_array_DG_pytoDG_inh__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_DG_pytoDG_inh__synaptic_pre = _namespace['_array_DG_pytoDG_inh__synaptic_pre'] cdef int32_t * _array_DG_pytoDG_inh__synaptic_pre = _buf__array_DG_pytoDG_inh__synaptic_pre.data cdef size_t _num_array_DG_pytoDG_inh__synaptic_pre = len(_namespace['_array_DG_pytoDG_inh__synaptic_pre']) cdef int32_t _synaptic_pre _var__target_offset = _namespace["_var__target_offset"] cdef int64_t _target_offset = _namespace["_target_offset"] cdef int32_t i # namespace for function rand global _namespace_rand_buffer global _namespace_num_rand_buffer cdef _numpy.ndarray[int64_t, ndim=1, mode='c'] _buf__rand_buffer = _namespace['_rand_buffer'] _namespace_rand_buffer = _buf__rand_buffer.data _namespace_num_rand_buffer = len(_namespace['_rand_buffer']) # namespace for function rand global _namespace_rand_buffer_index global _namespace_num_rand_buffer_index cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__rand_buffer_index = _namespace['_rand_buffer_index'] _namespace_rand_buffer_index = _buf__rand_buffer_index.data _namespace_num_rand_buffer_index = len(_namespace['_rand_buffer_index']) _var_umetre = _namespace["_var_umetre"] cdef double umetre = _namespace["umetre"] _var_x_soma_post = _namespace["_var_x_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_inh_x_soma = _namespace['_array_DG_inh_x_soma'] cdef double * _array_DG_inh_x_soma = _buf__array_DG_inh_x_soma.data cdef size_t _num_array_DG_inh_x_soma = len(_namespace['_array_DG_inh_x_soma']) cdef double x_soma_post _var_x_soma_pre = _namespace["_var_x_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_x_soma = _namespace['_array_DG_py_x_soma'] cdef double * _array_DG_py_x_soma = _buf__array_DG_py_x_soma.data cdef size_t _num_array_DG_py_x_soma = len(_namespace['_array_DG_py_x_soma']) cdef double x_soma_pre _var_y_soma_post = _namespace["_var_y_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_inh_y_soma = _namespace['_array_DG_inh_y_soma'] cdef double * _array_DG_inh_y_soma = _buf__array_DG_inh_y_soma.data cdef size_t _num_array_DG_inh_y_soma = len(_namespace['_array_DG_inh_y_soma']) cdef double y_soma_post _var_y_soma_pre = _namespace["_var_y_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_y_soma = _namespace['_array_DG_py_y_soma'] cdef double * _array_DG_py_y_soma = _buf__array_DG_py_y_soma.data cdef size_t _num_array_DG_py_y_soma = len(_namespace['_array_DG_py_y_soma']) cdef double y_soma_pre _var_z_soma_post = _namespace["_var_z_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_inh_z_soma = _namespace['_array_DG_inh_z_soma'] cdef double * _array_DG_inh_z_soma = _buf__array_DG_inh_z_soma.data cdef size_t _num_array_DG_inh_z_soma = len(_namespace['_array_DG_inh_z_soma']) cdef double z_soma_post _var_z_soma_pre = _namespace["_var_z_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_z_soma = _namespace['_array_DG_py_z_soma'] cdef double * _array_DG_py_z_soma = _buf__array_DG_py_z_soma.data cdef size_t _num_array_DG_py_z_soma = len(_namespace['_array_DG_py_z_soma']) cdef double z_soma_pre cdef double _lio_create_cond_1 if '_owner' in _namespace: _owner = _namespace['_owner'] cdef int* _prebuf_ptr = &(_prebuf[0]) cdef int* _postbuf_ptr = &(_postbuf[0]) global _curbuf cdef size_t oldsize = len(_dynamic_array_DG_pytoDG_inh__synaptic_pre) cdef size_t newsize # The following variables are only used for probabilistic connections cdef bool _jump_algo cdef double _log1p, _pconst cdef size_t _jump # scalar code _vectorisation_idx = 1 _lio_create_cond_1 = 0.5 / ((2500.0 * umetre) ** 2) for _i in range(N_pre): _raw_pre_idx = _i + _source_offset _iter_low = 0 _iter_high = N_post _iter_step = 1 for _k in range(_iter_low, _iter_high, _iter_step): _pre_idx = _raw_pre_idx _j = _k _raw_post_idx = _j + _target_offset if _j<0 or _j>=N_post: raise IndexError("index j=%d outside allowed range from 0 to %d" % (_j, N_post-1)) y_soma_post = _array_DG_inh_y_soma[_raw_post_idx] y_soma_pre = _array_DG_py_y_soma[_raw_pre_idx] z_soma_pre = _array_DG_py_z_soma[_raw_pre_idx] x_soma_post = _array_DG_inh_x_soma[_raw_post_idx] x_soma_pre = _array_DG_py_x_soma[_raw_pre_idx] z_soma_post = _array_DG_inh_z_soma[_raw_post_idx] _post_idx = _raw_post_idx i = _i _cond = (i != _k) and (_rand(_vectorisation_idx) < (0.06 * exp(_lio_create_cond_1 * (- ((((x_soma_pre - x_soma_post) ** 2) + ((y_soma_pre - y_soma_post) ** 2)) + ((z_soma_pre - z_soma_post) ** 2)))))) if not _cond: continue _post_idx = _raw_post_idx _n = 1 for _repetition in range(_n): _prebuf_ptr[_curbuf] = _pre_idx _postbuf_ptr[_curbuf] = _post_idx _curbuf += 1 # Flush buffer if _curbuf==_buffer_size: _flush_buffer(_prebuf, _dynamic_array_DG_pytoDG_inh__synaptic_pre, _curbuf) _flush_buffer(_postbuf, _dynamic_array_DG_pytoDG_inh__synaptic_post, _curbuf) _curbuf = 0 # Final buffer flush _flush_buffer(_prebuf, _dynamic_array_DG_pytoDG_inh__synaptic_pre, _curbuf) _flush_buffer(_postbuf, _dynamic_array_DG_pytoDG_inh__synaptic_post, _curbuf) _curbuf = 0 # reset the buffer for the next run newsize = len(_dynamic_array_DG_pytoDG_inh__synaptic_pre) # now we need to resize all registered variables and set the total number # of synapse (via Python) _owner._resize(newsize) # And update N_incoming, N_outgoing and synapse_number _owner._update_synapse_numbers(oldsize) before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_DG_pytoDG_inh_N = _namespace['_array_DG_pytoDG_inh_N'] cdef int32_t * _array_DG_pytoDG_inh_N = _buf__array_DG_pytoDG_inh_N.data cdef int32_t N = _namespace["N"] _var_N_post = _namespace["_var_N_post"] cdef int64_t N_post = _namespace["N_post"] _var_N_pre = _namespace["_var_N_pre"] cdef int64_t N_pre = _namespace["N_pre"] cdef bool _cond cdef int32_t _i cdef int32_t _iter_high cdef int32_t _iter_low cdef int32_t _iter_step cdef int32_t _j cdef int32_t _k cdef int32_t _n cdef int32_t _post_idx cdef int32_t _pre_idx cdef int32_t _raw_post_idx cdef int32_t _raw_pre_idx _var__source_offset = _namespace["_var__source_offset"] cdef int64_t _source_offset = _namespace["_source_offset"] _var__synaptic_post = _namespace["_var__synaptic_post"] _dynamic_array_DG_pytoDG_inh__synaptic_post = _namespace["_dynamic_array_DG_pytoDG_inh__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_DG_pytoDG_inh__synaptic_post = _namespace['_array_DG_pytoDG_inh__synaptic_post'] cdef int32_t * _array_DG_pytoDG_inh__synaptic_post = _buf__array_DG_pytoDG_inh__synaptic_post.data cdef size_t _num_array_DG_pytoDG_inh__synaptic_post = len(_namespace['_array_DG_pytoDG_inh__synaptic_post']) cdef int32_t _synaptic_post _var__synaptic_pre = _namespace["_var__synaptic_pre"] _dynamic_array_DG_pytoDG_inh__synaptic_pre = _namespace["_dynamic_array_DG_pytoDG_inh__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_DG_pytoDG_inh__synaptic_pre = _namespace['_array_DG_pytoDG_inh__synaptic_pre'] cdef int32_t * _array_DG_pytoDG_inh__synaptic_pre = _buf__array_DG_pytoDG_inh__synaptic_pre.data cdef size_t _num_array_DG_pytoDG_inh__synaptic_pre = len(_namespace['_array_DG_pytoDG_inh__synaptic_pre']) cdef int32_t _synaptic_pre _var__target_offset = _namespace["_var__target_offset"] cdef int64_t _target_offset = _namespace["_target_offset"] cdef int32_t i # namespace for function rand global _namespace_rand_buffer global _namespace_num_rand_buffer cdef _numpy.ndarray[int64_t, ndim=1, mode='c'] _buf__rand_buffer = _namespace['_rand_buffer'] _namespace_rand_buffer = _buf__rand_buffer.data _namespace_num_rand_buffer = len(_namespace['_rand_buffer']) # namespace for function rand global _namespace_rand_buffer_index global _namespace_num_rand_buffer_index cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__rand_buffer_index = _namespace['_rand_buffer_index'] _namespace_rand_buffer_index = _buf__rand_buffer_index.data _namespace_num_rand_buffer_index = len(_namespace['_rand_buffer_index']) _var_umetre = _namespace["_var_umetre"] cdef double umetre = _namespace["umetre"] _var_x_soma_post = _namespace["_var_x_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_inh_x_soma = _namespace['_array_DG_inh_x_soma'] cdef double * _array_DG_inh_x_soma = _buf__array_DG_inh_x_soma.data cdef size_t _num_array_DG_inh_x_soma = len(_namespace['_array_DG_inh_x_soma']) cdef double x_soma_post _var_x_soma_pre = _namespace["_var_x_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_x_soma = _namespace['_array_DG_py_x_soma'] cdef double * _array_DG_py_x_soma = _buf__array_DG_py_x_soma.data cdef size_t _num_array_DG_py_x_soma = len(_namespace['_array_DG_py_x_soma']) cdef double x_soma_pre _var_y_soma_post = _namespace["_var_y_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_inh_y_soma = _namespace['_array_DG_inh_y_soma'] cdef double * _array_DG_inh_y_soma = _buf__array_DG_inh_y_soma.data cdef size_t _num_array_DG_inh_y_soma = len(_namespace['_array_DG_inh_y_soma']) cdef double y_soma_post _var_y_soma_pre = _namespace["_var_y_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_y_soma = _namespace['_array_DG_py_y_soma'] cdef double * _array_DG_py_y_soma = _buf__array_DG_py_y_soma.data cdef size_t _num_array_DG_py_y_soma = len(_namespace['_array_DG_py_y_soma']) cdef double y_soma_pre _var_z_soma_post = _namespace["_var_z_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_inh_z_soma = _namespace['_array_DG_inh_z_soma'] cdef double * _array_DG_inh_z_soma = _buf__array_DG_inh_z_soma.data cdef size_t _num_array_DG_inh_z_soma = len(_namespace['_array_DG_inh_z_soma']) cdef double z_soma_post _var_z_soma_pre = _namespace["_var_z_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_z_soma = _namespace['_array_DG_py_z_soma'] cdef double * _array_DG_py_z_soma = _buf__array_DG_py_z_soma.data cdef size_t _num_array_DG_py_z_soma = len(_namespace['_array_DG_py_z_soma']) cdef double z_soma_pre cdef double _lio_create_cond_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_DG_pytoDG_inh_N = _namespace['_array_DG_pytoDG_inh_N'] cdef int32_t * _array_DG_pytoDG_inh_N = _buf__array_DG_pytoDG_inh_N.data cdef int32_t N = _namespace["N"] _var_N_post = _namespace["_var_N_post"] cdef int64_t N_post = _namespace["N_post"] _var_N_pre = _namespace["_var_N_pre"] cdef int64_t N_pre = _namespace["N_pre"] cdef bool _cond cdef int32_t _i cdef int32_t _iter_high cdef int32_t _iter_low cdef int32_t _iter_step cdef int32_t _j cdef int32_t _k cdef int32_t _n cdef int32_t _post_idx cdef int32_t _pre_idx cdef int32_t _raw_post_idx cdef int32_t _raw_pre_idx _var__source_offset = _namespace["_var__source_offset"] cdef int64_t _source_offset = _namespace["_source_offset"] _var__synaptic_post = _namespace["_var__synaptic_post"] _dynamic_array_DG_pytoDG_inh__synaptic_post = _namespace["_dynamic_array_DG_pytoDG_inh__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_DG_pytoDG_inh__synaptic_post = _namespace['_array_DG_pytoDG_inh__synaptic_post'] cdef int32_t * _array_DG_pytoDG_inh__synaptic_post = _buf__array_DG_pytoDG_inh__synaptic_post.data cdef size_t _num_array_DG_pytoDG_inh__synaptic_post = len(_namespace['_array_DG_pytoDG_inh__synaptic_post']) cdef int32_t _synaptic_post _var__synaptic_pre = _namespace["_var__synaptic_pre"] _dynamic_array_DG_pytoDG_inh__synaptic_pre = _namespace["_dynamic_array_DG_pytoDG_inh__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_DG_pytoDG_inh__synaptic_pre = _namespace['_array_DG_pytoDG_inh__synaptic_pre'] cdef int32_t * _array_DG_pytoDG_inh__synaptic_pre = _buf__array_DG_pytoDG_inh__synaptic_pre.data cdef size_t _num_array_DG_pytoDG_inh__synaptic_pre = len(_namespace['_array_DG_pytoDG_inh__synaptic_pre']) cdef int32_t _synaptic_pre _var__target_offset = _namespace["_var__target_offset"] cdef int64_t _target_offset = _namespace["_target_offset"] cdef int32_t i # namespace for function rand global _namespace_rand_buffer global _namespace_num_rand_buffer cdef _numpy.ndarray[int64_t, ndim=1, mode='c'] _buf__rand_buffer = _namespace['_rand_buffer'] _namespace_rand_buffer = _buf__rand_buffer.data _namespace_num_rand_buffer = len(_namespace['_rand_buffer']) # namespace for function rand global _namespace_rand_buffer_index global _namespace_num_rand_buffer_index cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__rand_buffer_index = _namespace['_rand_buffer_index'] _namespace_rand_buffer_index = _buf__rand_buffer_index.data _namespace_num_rand_buffer_index = len(_namespace['_rand_buffer_index']) _var_umetre = _namespace["_var_umetre"] cdef double umetre = _namespace["umetre"] _var_x_soma_post = _namespace["_var_x_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_inh_x_soma = _namespace['_array_DG_inh_x_soma'] cdef double * _array_DG_inh_x_soma = _buf__array_DG_inh_x_soma.data cdef size_t _num_array_DG_inh_x_soma = len(_namespace['_array_DG_inh_x_soma']) cdef double x_soma_post _var_x_soma_pre = _namespace["_var_x_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_x_soma = _namespace['_array_DG_py_x_soma'] cdef double * _array_DG_py_x_soma = _buf__array_DG_py_x_soma.data cdef size_t _num_array_DG_py_x_soma = len(_namespace['_array_DG_py_x_soma']) cdef double x_soma_pre _var_y_soma_post = _namespace["_var_y_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_inh_y_soma = _namespace['_array_DG_inh_y_soma'] cdef double * _array_DG_inh_y_soma = _buf__array_DG_inh_y_soma.data cdef size_t _num_array_DG_inh_y_soma = len(_namespace['_array_DG_inh_y_soma']) cdef double y_soma_post _var_y_soma_pre = _namespace["_var_y_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_y_soma = _namespace['_array_DG_py_y_soma'] cdef double * _array_DG_py_y_soma = _buf__array_DG_py_y_soma.data cdef size_t _num_array_DG_py_y_soma = len(_namespace['_array_DG_py_y_soma']) cdef double y_soma_pre _var_z_soma_post = _namespace["_var_z_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_inh_z_soma = _namespace['_array_DG_inh_z_soma'] cdef double * _array_DG_inh_z_soma = _buf__array_DG_inh_z_soma.data cdef size_t _num_array_DG_inh_z_soma = len(_namespace['_array_DG_inh_z_soma']) cdef double z_soma_post _var_z_soma_pre = _namespace["_var_z_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_z_soma = _namespace['_array_DG_py_z_soma'] cdef double * _array_DG_py_z_soma = _buf__array_DG_py_z_soma.data cdef size_t _num_array_DG_py_z_soma = len(_namespace['_array_DG_py_z_soma']) cdef double z_soma_pre cdef double _lio_create_cond_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:14:43,835 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name DG_pytoDG_inh_synapses_create_generator_codeobject 2021-11-05 15:14:43,836 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "DG_pytoDG_inh_synapses_create_generator" using Cython module "_cython_magic_d8c105e2f2f64d5538586dc1093fe2f4" 2021-11-05 15:14:43,836 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140605446355072 on /home/nikos/.cython/brian_extensions/_cython_magic_d8c105e2f2f64d5538586dc1093fe2f4.lock 2021-11-05 15:14:43,836 DEBUG brian2.utils.filelock: Lock 140605446355072 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_d8c105e2f2f64d5538586dc1093fe2f4.lock 2021-11-05 15:14:43,839 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140605446355072 on /home/nikos/.cython/brian_extensions/_cython_magic_d8c105e2f2f64d5538586dc1093fe2f4.lock 2021-11-05 15:14:43,839 DEBUG brian2.utils.filelock: Lock 140605446355072 released on /home/nikos/.cython/brian_extensions/_cython_magic_d8c105e2f2f64d5538586dc1093fe2f4.lock 2021-11-05 15:14:43,861 DIAGNOSTIC brian2.core.names: Created object of class Synapses with name DG_inhtoDG_py 2021-11-05 15:14:43,861 DIAGNOSTIC brian2.core.base: Created BrianObject with name DG_inhtoDG_py, clock=Clock(dt=100. * usecond, name='defaultclock'), when=start, order=0 2021-11-05 15:14:43,864 DIAGNOSTIC brian2.core.names: Created object of class SynapticPathway with name DG_inhtoDG_py_pre 2021-11-05 15:14:43,865 DIAGNOSTIC brian2.core.base: Created BrianObject with name DG_inhtoDG_py_pre, clock=Clock(dt=100. * usecond, name='defaultclock'), when=synapses, order=-1 2021-11-05 15:14:43,875 DEBUG brian2.synapses.synapses: Creating synapses from group 'DG_inh' to group 'DG_py', using generator '_k for _k in range(N_post) if (i!=_k) and rand()<0.14*exp(-((x_soma_pre-x_soma_post)**2+(y_soma_pre-y_soma_post)**2+(z_soma_pre-z_soma_post)**2)/(2*(350*umetre)**2))' 2021-11-05 15:14:43,875 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=DG_inhtoDG_py, template name=synapses_create_generator) for abstract code: Key setup_iterator: _iter_low = 0 _iter_high = N_post _iter_step = 1 Key create_j: _pre_idx = _raw_pre_idx _j = _k Key create_cond: _post_idx = _raw_post_idx _cond = (i != _k) and (rand() < (0.14 * exp((- ((((x_soma_pre - x_soma_post) ** 2) + ((y_soma_pre - y_soma_post) ** 2)) + ((z_soma_pre - z_soma_post) ** 2))) / (2 * ((350 * umetre) ** 2))))) Key update_post: _post_idx = _raw_post_idx _n = 1 2021-11-05 15:14:43,929 DIAGNOSTIC brian2.devices.device: DG_inhtoDG_py_synapses_create_generator_codeobject abstract code: Key setup_iterator: _iter_low = 0 _iter_high = N_post _iter_step = 1 Key create_j: _pre_idx = _raw_pre_idx _j = _k Key create_cond: _post_idx = _raw_post_idx _cond = (i != _k) and (rand() < (0.14 * exp((- ((((x_soma_pre - x_soma_post) ** 2) + ((y_soma_pre - y_soma_post) ** 2)) + ((z_soma_pre - z_soma_post) ** 2))) / (2 * ((350 * umetre) ** 2))))) Key update_post: _post_idx = _raw_post_idx _n = 1 2021-11-05 15:14:43,934 DIAGNOSTIC brian2.devices.device: DG_inhtoDG_py_synapses_create_generator_codeobject snippet (scalar): Key setup_iterator: Key create_j: Key create_cond: _lio_create_cond_1 = 0.5 / ((350.0 * umetre) ** 2) Key update_post: 2021-11-05 15:14:43,934 DIAGNOSTIC brian2.devices.device: DG_inhtoDG_py_synapses_create_generator_codeobject snippet (vector): Key setup_iterator: _iter_low = 0 _iter_high = N_post _iter_step = 1 Key create_j: _pre_idx = _raw_pre_idx _j = _k Key create_cond: y_soma_post = _array_DG_py_y_soma[_raw_post_idx] y_soma_pre = _array_DG_inh_y_soma[_raw_pre_idx] z_soma_pre = _array_DG_inh_z_soma[_raw_pre_idx] x_soma_post = _array_DG_py_x_soma[_raw_post_idx] x_soma_pre = _array_DG_inh_x_soma[_raw_pre_idx] z_soma_post = _array_DG_py_z_soma[_raw_post_idx] _post_idx = _raw_post_idx i = _i _cond = (i != _k) and (_rand(_vectorisation_idx) < (0.14 * exp(_lio_create_cond_1 * (- ((((x_soma_pre - x_soma_post) ** 2) + ((y_soma_pre - y_soma_post) ** 2)) + ((z_soma_pre - z_soma_post) ** 2)))))) Key update_post: _post_idx = _raw_post_idx _n = 1 2021-11-05 15:14:43,934 DIAGNOSTIC brian2.devices.device: DG_inhtoDG_py_synapses_create_generator_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code cdef int64_t *_namespace_rand_buffer cdef int32_t *_namespace_rand_buffer_index cdef double _rand(int _idx): cdef double **buffer_pointer = _namespace_rand_buffer cdef double *buffer = buffer_pointer[0] cdef _numpy.ndarray _new_rand if(_namespace_rand_buffer_index[0] == 0): if buffer != NULL: free(buffer) _new_rand = _numpy.random.rand(20000) buffer = _numpy.PyArray_DATA(_new_rand) PyArray_CLEARFLAGS(<_numpy.PyArrayObject*>_new_rand, _numpy.NPY_OWNDATA) buffer_pointer[0] = buffer cdef double val = buffer[_namespace_rand_buffer_index[0]] _namespace_rand_buffer_index[0] += 1 if _namespace_rand_buffer_index[0] == 20000: _namespace_rand_buffer_index[0] = 0 return val # template-specific support code cdef int _buffer_size = 1024 cdef int[:] _prebuf = _numpy.zeros(_buffer_size, dtype=_numpy.int32) cdef int[:] _postbuf = _numpy.zeros(_buffer_size, dtype=_numpy.int32) cdef int _curbuf = 0 cdef int _raw_pre_idx cdef int _raw_post_idx cdef void _flush_buffer(buf, dynarr, int buf_len): cdef size_t _curlen = dynarr.shape[0] cdef size_t _newlen = _curlen+buf_len # Resize the array dynarr.resize(_newlen) # Get the potentially newly created underlying data arrays data = dynarr.data data[_curlen:_curlen+buf_len] = buf[:buf_len] def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_DG_inhtoDG_py_N = _namespace['_array_DG_inhtoDG_py_N'] cdef int32_t * _array_DG_inhtoDG_py_N = _buf__array_DG_inhtoDG_py_N.data cdef int32_t N = _namespace["N"] _var_N_post = _namespace["_var_N_post"] cdef int64_t N_post = _namespace["N_post"] _var_N_pre = _namespace["_var_N_pre"] cdef int64_t N_pre = _namespace["N_pre"] cdef bool _cond cdef int32_t _i cdef int32_t _iter_high cdef int32_t _iter_low cdef int32_t _iter_step cdef int32_t _j cdef int32_t _k cdef int32_t _n cdef int32_t _post_idx cdef int32_t _pre_idx cdef int32_t _raw_post_idx cdef int32_t _raw_pre_idx _var__source_offset = _namespace["_var__source_offset"] cdef int64_t _source_offset = _namespace["_source_offset"] _var__synaptic_post = _namespace["_var__synaptic_post"] _dynamic_array_DG_inhtoDG_py__synaptic_post = _namespace["_dynamic_array_DG_inhtoDG_py__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_DG_inhtoDG_py__synaptic_post = _namespace['_array_DG_inhtoDG_py__synaptic_post'] cdef int32_t * _array_DG_inhtoDG_py__synaptic_post = _buf__array_DG_inhtoDG_py__synaptic_post.data cdef size_t _num_array_DG_inhtoDG_py__synaptic_post = len(_namespace['_array_DG_inhtoDG_py__synaptic_post']) cdef int32_t _synaptic_post _var__synaptic_pre = _namespace["_var__synaptic_pre"] _dynamic_array_DG_inhtoDG_py__synaptic_pre = _namespace["_dynamic_array_DG_inhtoDG_py__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_DG_inhtoDG_py__synaptic_pre = _namespace['_array_DG_inhtoDG_py__synaptic_pre'] cdef int32_t * _array_DG_inhtoDG_py__synaptic_pre = _buf__array_DG_inhtoDG_py__synaptic_pre.data cdef size_t _num_array_DG_inhtoDG_py__synaptic_pre = len(_namespace['_array_DG_inhtoDG_py__synaptic_pre']) cdef int32_t _synaptic_pre _var__target_offset = _namespace["_var__target_offset"] cdef int64_t _target_offset = _namespace["_target_offset"] cdef int32_t i # namespace for function rand global _namespace_rand_buffer global _namespace_num_rand_buffer cdef _numpy.ndarray[int64_t, ndim=1, mode='c'] _buf__rand_buffer = _namespace['_rand_buffer'] _namespace_rand_buffer = _buf__rand_buffer.data _namespace_num_rand_buffer = len(_namespace['_rand_buffer']) # namespace for function rand global _namespace_rand_buffer_index global _namespace_num_rand_buffer_index cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__rand_buffer_index = _namespace['_rand_buffer_index'] _namespace_rand_buffer_index = _buf__rand_buffer_index.data _namespace_num_rand_buffer_index = len(_namespace['_rand_buffer_index']) _var_umetre = _namespace["_var_umetre"] cdef double umetre = _namespace["umetre"] _var_x_soma_post = _namespace["_var_x_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_x_soma = _namespace['_array_DG_py_x_soma'] cdef double * _array_DG_py_x_soma = _buf__array_DG_py_x_soma.data cdef size_t _num_array_DG_py_x_soma = len(_namespace['_array_DG_py_x_soma']) cdef double x_soma_post _var_x_soma_pre = _namespace["_var_x_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_inh_x_soma = _namespace['_array_DG_inh_x_soma'] cdef double * _array_DG_inh_x_soma = _buf__array_DG_inh_x_soma.data cdef size_t _num_array_DG_inh_x_soma = len(_namespace['_array_DG_inh_x_soma']) cdef double x_soma_pre _var_y_soma_post = _namespace["_var_y_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_y_soma = _namespace['_array_DG_py_y_soma'] cdef double * _array_DG_py_y_soma = _buf__array_DG_py_y_soma.data cdef size_t _num_array_DG_py_y_soma = len(_namespace['_array_DG_py_y_soma']) cdef double y_soma_post _var_y_soma_pre = _namespace["_var_y_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_inh_y_soma = _namespace['_array_DG_inh_y_soma'] cdef double * _array_DG_inh_y_soma = _buf__array_DG_inh_y_soma.data cdef size_t _num_array_DG_inh_y_soma = len(_namespace['_array_DG_inh_y_soma']) cdef double y_soma_pre _var_z_soma_post = _namespace["_var_z_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_z_soma = _namespace['_array_DG_py_z_soma'] cdef double * _array_DG_py_z_soma = _buf__array_DG_py_z_soma.data cdef size_t _num_array_DG_py_z_soma = len(_namespace['_array_DG_py_z_soma']) cdef double z_soma_post _var_z_soma_pre = _namespace["_var_z_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_inh_z_soma = _namespace['_array_DG_inh_z_soma'] cdef double * _array_DG_inh_z_soma = _buf__array_DG_inh_z_soma.data cdef size_t _num_array_DG_inh_z_soma = len(_namespace['_array_DG_inh_z_soma']) cdef double z_soma_pre cdef double _lio_create_cond_1 if '_owner' in _namespace: _owner = _namespace['_owner'] cdef int* _prebuf_ptr = &(_prebuf[0]) cdef int* _postbuf_ptr = &(_postbuf[0]) global _curbuf cdef size_t oldsize = len(_dynamic_array_DG_inhtoDG_py__synaptic_pre) cdef size_t newsize # The following variables are only used for probabilistic connections cdef bool _jump_algo cdef double _log1p, _pconst cdef size_t _jump # scalar code _vectorisation_idx = 1 _lio_create_cond_1 = 0.5 / ((350.0 * umetre) ** 2) for _i in range(N_pre): _raw_pre_idx = _i + _source_offset _iter_low = 0 _iter_high = N_post _iter_step = 1 for _k in range(_iter_low, _iter_high, _iter_step): _pre_idx = _raw_pre_idx _j = _k _raw_post_idx = _j + _target_offset if _j<0 or _j>=N_post: raise IndexError("index j=%d outside allowed range from 0 to %d" % (_j, N_post-1)) y_soma_post = _array_DG_py_y_soma[_raw_post_idx] y_soma_pre = _array_DG_inh_y_soma[_raw_pre_idx] z_soma_pre = _array_DG_inh_z_soma[_raw_pre_idx] x_soma_post = _array_DG_py_x_soma[_raw_post_idx] x_soma_pre = _array_DG_inh_x_soma[_raw_pre_idx] z_soma_post = _array_DG_py_z_soma[_raw_post_idx] _post_idx = _raw_post_idx i = _i _cond = (i != _k) and (_rand(_vectorisation_idx) < (0.14 * exp(_lio_create_cond_1 * (- ((((x_soma_pre - x_soma_post) ** 2) + ((y_soma_pre - y_soma_post) ** 2)) + ((z_soma_pre - z_soma_post) ** 2)))))) if not _cond: continue _post_idx = _raw_post_idx _n = 1 for _repetition in range(_n): _prebuf_ptr[_curbuf] = _pre_idx _postbuf_ptr[_curbuf] = _post_idx _curbuf += 1 # Flush buffer if _curbuf==_buffer_size: _flush_buffer(_prebuf, _dynamic_array_DG_inhtoDG_py__synaptic_pre, _curbuf) _flush_buffer(_postbuf, _dynamic_array_DG_inhtoDG_py__synaptic_post, _curbuf) _curbuf = 0 # Final buffer flush _flush_buffer(_prebuf, _dynamic_array_DG_inhtoDG_py__synaptic_pre, _curbuf) _flush_buffer(_postbuf, _dynamic_array_DG_inhtoDG_py__synaptic_post, _curbuf) _curbuf = 0 # reset the buffer for the next run newsize = len(_dynamic_array_DG_inhtoDG_py__synaptic_pre) # now we need to resize all registered variables and set the total number # of synapse (via Python) _owner._resize(newsize) # And update N_incoming, N_outgoing and synapse_number _owner._update_synapse_numbers(oldsize) before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_DG_inhtoDG_py_N = _namespace['_array_DG_inhtoDG_py_N'] cdef int32_t * _array_DG_inhtoDG_py_N = _buf__array_DG_inhtoDG_py_N.data cdef int32_t N = _namespace["N"] _var_N_post = _namespace["_var_N_post"] cdef int64_t N_post = _namespace["N_post"] _var_N_pre = _namespace["_var_N_pre"] cdef int64_t N_pre = _namespace["N_pre"] cdef bool _cond cdef int32_t _i cdef int32_t _iter_high cdef int32_t _iter_low cdef int32_t _iter_step cdef int32_t _j cdef int32_t _k cdef int32_t _n cdef int32_t _post_idx cdef int32_t _pre_idx cdef int32_t _raw_post_idx cdef int32_t _raw_pre_idx _var__source_offset = _namespace["_var__source_offset"] cdef int64_t _source_offset = _namespace["_source_offset"] _var__synaptic_post = _namespace["_var__synaptic_post"] _dynamic_array_DG_inhtoDG_py__synaptic_post = _namespace["_dynamic_array_DG_inhtoDG_py__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_DG_inhtoDG_py__synaptic_post = _namespace['_array_DG_inhtoDG_py__synaptic_post'] cdef int32_t * _array_DG_inhtoDG_py__synaptic_post = _buf__array_DG_inhtoDG_py__synaptic_post.data cdef size_t _num_array_DG_inhtoDG_py__synaptic_post = len(_namespace['_array_DG_inhtoDG_py__synaptic_post']) cdef int32_t _synaptic_post _var__synaptic_pre = _namespace["_var__synaptic_pre"] _dynamic_array_DG_inhtoDG_py__synaptic_pre = _namespace["_dynamic_array_DG_inhtoDG_py__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_DG_inhtoDG_py__synaptic_pre = _namespace['_array_DG_inhtoDG_py__synaptic_pre'] cdef int32_t * _array_DG_inhtoDG_py__synaptic_pre = _buf__array_DG_inhtoDG_py__synaptic_pre.data cdef size_t _num_array_DG_inhtoDG_py__synaptic_pre = len(_namespace['_array_DG_inhtoDG_py__synaptic_pre']) cdef int32_t _synaptic_pre _var__target_offset = _namespace["_var__target_offset"] cdef int64_t _target_offset = _namespace["_target_offset"] cdef int32_t i # namespace for function rand global _namespace_rand_buffer global _namespace_num_rand_buffer cdef _numpy.ndarray[int64_t, ndim=1, mode='c'] _buf__rand_buffer = _namespace['_rand_buffer'] _namespace_rand_buffer = _buf__rand_buffer.data _namespace_num_rand_buffer = len(_namespace['_rand_buffer']) # namespace for function rand global _namespace_rand_buffer_index global _namespace_num_rand_buffer_index cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__rand_buffer_index = _namespace['_rand_buffer_index'] _namespace_rand_buffer_index = _buf__rand_buffer_index.data _namespace_num_rand_buffer_index = len(_namespace['_rand_buffer_index']) _var_umetre = _namespace["_var_umetre"] cdef double umetre = _namespace["umetre"] _var_x_soma_post = _namespace["_var_x_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_x_soma = _namespace['_array_DG_py_x_soma'] cdef double * _array_DG_py_x_soma = _buf__array_DG_py_x_soma.data cdef size_t _num_array_DG_py_x_soma = len(_namespace['_array_DG_py_x_soma']) cdef double x_soma_post _var_x_soma_pre = _namespace["_var_x_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_inh_x_soma = _namespace['_array_DG_inh_x_soma'] cdef double * _array_DG_inh_x_soma = _buf__array_DG_inh_x_soma.data cdef size_t _num_array_DG_inh_x_soma = len(_namespace['_array_DG_inh_x_soma']) cdef double x_soma_pre _var_y_soma_post = _namespace["_var_y_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_y_soma = _namespace['_array_DG_py_y_soma'] cdef double * _array_DG_py_y_soma = _buf__array_DG_py_y_soma.data cdef size_t _num_array_DG_py_y_soma = len(_namespace['_array_DG_py_y_soma']) cdef double y_soma_post _var_y_soma_pre = _namespace["_var_y_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_inh_y_soma = _namespace['_array_DG_inh_y_soma'] cdef double * _array_DG_inh_y_soma = _buf__array_DG_inh_y_soma.data cdef size_t _num_array_DG_inh_y_soma = len(_namespace['_array_DG_inh_y_soma']) cdef double y_soma_pre _var_z_soma_post = _namespace["_var_z_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_z_soma = _namespace['_array_DG_py_z_soma'] cdef double * _array_DG_py_z_soma = _buf__array_DG_py_z_soma.data cdef size_t _num_array_DG_py_z_soma = len(_namespace['_array_DG_py_z_soma']) cdef double z_soma_post _var_z_soma_pre = _namespace["_var_z_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_inh_z_soma = _namespace['_array_DG_inh_z_soma'] cdef double * _array_DG_inh_z_soma = _buf__array_DG_inh_z_soma.data cdef size_t _num_array_DG_inh_z_soma = len(_namespace['_array_DG_inh_z_soma']) cdef double z_soma_pre cdef double _lio_create_cond_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_DG_inhtoDG_py_N = _namespace['_array_DG_inhtoDG_py_N'] cdef int32_t * _array_DG_inhtoDG_py_N = _buf__array_DG_inhtoDG_py_N.data cdef int32_t N = _namespace["N"] _var_N_post = _namespace["_var_N_post"] cdef int64_t N_post = _namespace["N_post"] _var_N_pre = _namespace["_var_N_pre"] cdef int64_t N_pre = _namespace["N_pre"] cdef bool _cond cdef int32_t _i cdef int32_t _iter_high cdef int32_t _iter_low cdef int32_t _iter_step cdef int32_t _j cdef int32_t _k cdef int32_t _n cdef int32_t _post_idx cdef int32_t _pre_idx cdef int32_t _raw_post_idx cdef int32_t _raw_pre_idx _var__source_offset = _namespace["_var__source_offset"] cdef int64_t _source_offset = _namespace["_source_offset"] _var__synaptic_post = _namespace["_var__synaptic_post"] _dynamic_array_DG_inhtoDG_py__synaptic_post = _namespace["_dynamic_array_DG_inhtoDG_py__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_DG_inhtoDG_py__synaptic_post = _namespace['_array_DG_inhtoDG_py__synaptic_post'] cdef int32_t * _array_DG_inhtoDG_py__synaptic_post = _buf__array_DG_inhtoDG_py__synaptic_post.data cdef size_t _num_array_DG_inhtoDG_py__synaptic_post = len(_namespace['_array_DG_inhtoDG_py__synaptic_post']) cdef int32_t _synaptic_post _var__synaptic_pre = _namespace["_var__synaptic_pre"] _dynamic_array_DG_inhtoDG_py__synaptic_pre = _namespace["_dynamic_array_DG_inhtoDG_py__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_DG_inhtoDG_py__synaptic_pre = _namespace['_array_DG_inhtoDG_py__synaptic_pre'] cdef int32_t * _array_DG_inhtoDG_py__synaptic_pre = _buf__array_DG_inhtoDG_py__synaptic_pre.data cdef size_t _num_array_DG_inhtoDG_py__synaptic_pre = len(_namespace['_array_DG_inhtoDG_py__synaptic_pre']) cdef int32_t _synaptic_pre _var__target_offset = _namespace["_var__target_offset"] cdef int64_t _target_offset = _namespace["_target_offset"] cdef int32_t i # namespace for function rand global _namespace_rand_buffer global _namespace_num_rand_buffer cdef _numpy.ndarray[int64_t, ndim=1, mode='c'] _buf__rand_buffer = _namespace['_rand_buffer'] _namespace_rand_buffer = _buf__rand_buffer.data _namespace_num_rand_buffer = len(_namespace['_rand_buffer']) # namespace for function rand global _namespace_rand_buffer_index global _namespace_num_rand_buffer_index cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__rand_buffer_index = _namespace['_rand_buffer_index'] _namespace_rand_buffer_index = _buf__rand_buffer_index.data _namespace_num_rand_buffer_index = len(_namespace['_rand_buffer_index']) _var_umetre = _namespace["_var_umetre"] cdef double umetre = _namespace["umetre"] _var_x_soma_post = _namespace["_var_x_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_x_soma = _namespace['_array_DG_py_x_soma'] cdef double * _array_DG_py_x_soma = _buf__array_DG_py_x_soma.data cdef size_t _num_array_DG_py_x_soma = len(_namespace['_array_DG_py_x_soma']) cdef double x_soma_post _var_x_soma_pre = _namespace["_var_x_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_inh_x_soma = _namespace['_array_DG_inh_x_soma'] cdef double * _array_DG_inh_x_soma = _buf__array_DG_inh_x_soma.data cdef size_t _num_array_DG_inh_x_soma = len(_namespace['_array_DG_inh_x_soma']) cdef double x_soma_pre _var_y_soma_post = _namespace["_var_y_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_y_soma = _namespace['_array_DG_py_y_soma'] cdef double * _array_DG_py_y_soma = _buf__array_DG_py_y_soma.data cdef size_t _num_array_DG_py_y_soma = len(_namespace['_array_DG_py_y_soma']) cdef double y_soma_post _var_y_soma_pre = _namespace["_var_y_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_inh_y_soma = _namespace['_array_DG_inh_y_soma'] cdef double * _array_DG_inh_y_soma = _buf__array_DG_inh_y_soma.data cdef size_t _num_array_DG_inh_y_soma = len(_namespace['_array_DG_inh_y_soma']) cdef double y_soma_pre _var_z_soma_post = _namespace["_var_z_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_z_soma = _namespace['_array_DG_py_z_soma'] cdef double * _array_DG_py_z_soma = _buf__array_DG_py_z_soma.data cdef size_t _num_array_DG_py_z_soma = len(_namespace['_array_DG_py_z_soma']) cdef double z_soma_post _var_z_soma_pre = _namespace["_var_z_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_inh_z_soma = _namespace['_array_DG_inh_z_soma'] cdef double * _array_DG_inh_z_soma = _buf__array_DG_inh_z_soma.data cdef size_t _num_array_DG_inh_z_soma = len(_namespace['_array_DG_inh_z_soma']) cdef double z_soma_pre cdef double _lio_create_cond_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:14:43,934 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name DG_inhtoDG_py_synapses_create_generator_codeobject 2021-11-05 15:14:43,935 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "DG_inhtoDG_py_synapses_create_generator" using Cython module "_cython_magic_2198b27d8b759ce614f8624fb99e3970" 2021-11-05 15:14:43,935 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140605443896080 on /home/nikos/.cython/brian_extensions/_cython_magic_2198b27d8b759ce614f8624fb99e3970.lock 2021-11-05 15:14:43,935 DEBUG brian2.utils.filelock: Lock 140605443896080 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_2198b27d8b759ce614f8624fb99e3970.lock 2021-11-05 15:14:43,939 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140605443896080 on /home/nikos/.cython/brian_extensions/_cython_magic_2198b27d8b759ce614f8624fb99e3970.lock 2021-11-05 15:14:43,939 DEBUG brian2.utils.filelock: Lock 140605443896080 released on /home/nikos/.cython/brian_extensions/_cython_magic_2198b27d8b759ce614f8624fb99e3970.lock 2021-11-05 15:14:43,978 DIAGNOSTIC brian2.core.names: Created object of class Synapses with name CA3_pyCANtoCA3_pyCAN 2021-11-05 15:14:43,978 DIAGNOSTIC brian2.core.base: Created BrianObject with name CA3_pyCANtoCA3_pyCAN, clock=Clock(dt=100. * usecond, name='defaultclock'), when=start, order=0 2021-11-05 15:14:43,981 DIAGNOSTIC brian2.core.names: Created object of class SynapticPathway with name CA3_pyCANtoCA3_pyCAN_pre 2021-11-05 15:14:43,981 DIAGNOSTIC brian2.core.base: Created BrianObject with name CA3_pyCANtoCA3_pyCAN_pre, clock=Clock(dt=100. * usecond, name='defaultclock'), when=synapses, order=-1 2021-11-05 15:14:43,995 DEBUG brian2.synapses.synapses: Creating synapses from group 'CA3_pyCAN' to group 'CA3_pyCAN', using generator '_k for _k in range(N_post) if (i!=_k) and rand()<0.56*exp(-((x_soma_pre-x_soma_post)**2+(y_soma_pre-y_soma_post)**2+(z_soma_pre-z_soma_post)**2)/(2*(2500*umetre)**2))' 2021-11-05 15:14:43,995 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=CA3_pyCANtoCA3_pyCAN, template name=synapses_create_generator) for abstract code: Key setup_iterator: _iter_low = 0 _iter_high = N_post _iter_step = 1 Key create_j: _pre_idx = _raw_pre_idx _j = _k Key create_cond: _post_idx = _raw_post_idx _cond = (i != _k) and (rand() < (0.56 * exp((- ((((x_soma_pre - x_soma_post) ** 2) + ((y_soma_pre - y_soma_post) ** 2)) + ((z_soma_pre - z_soma_post) ** 2))) / (2 * ((2500 * umetre) ** 2))))) Key update_post: _post_idx = _raw_post_idx _n = 1 2021-11-05 15:14:44,059 DIAGNOSTIC brian2.devices.device: CA3_pyCANtoCA3_pyCAN_synapses_create_generator_codeobject abstract code: Key setup_iterator: _iter_low = 0 _iter_high = N_post _iter_step = 1 Key create_j: _pre_idx = _raw_pre_idx _j = _k Key create_cond: _post_idx = _raw_post_idx _cond = (i != _k) and (rand() < (0.56 * exp((- ((((x_soma_pre - x_soma_post) ** 2) + ((y_soma_pre - y_soma_post) ** 2)) + ((z_soma_pre - z_soma_post) ** 2))) / (2 * ((2500 * umetre) ** 2))))) Key update_post: _post_idx = _raw_post_idx _n = 1 2021-11-05 15:14:44,063 DIAGNOSTIC brian2.devices.device: CA3_pyCANtoCA3_pyCAN_synapses_create_generator_codeobject snippet (scalar): Key setup_iterator: Key create_j: Key create_cond: _lio_create_cond_1 = 0.5 / ((2500.0 * umetre) ** 2) Key update_post: 2021-11-05 15:14:44,063 DIAGNOSTIC brian2.devices.device: CA3_pyCANtoCA3_pyCAN_synapses_create_generator_codeobject snippet (vector): Key setup_iterator: _iter_low = 0 _iter_high = N_post _iter_step = 1 Key create_j: _pre_idx = _raw_pre_idx _j = _k Key create_cond: y_soma_post = _array_CA3_pyCAN_y_soma[_raw_post_idx] y_soma_pre = _array_CA3_pyCAN_y_soma[_raw_pre_idx] z_soma_pre = _array_CA3_pyCAN_z_soma[_raw_pre_idx] x_soma_post = _array_CA3_pyCAN_x_soma[_raw_post_idx] x_soma_pre = _array_CA3_pyCAN_x_soma[_raw_pre_idx] z_soma_post = _array_CA3_pyCAN_z_soma[_raw_post_idx] _post_idx = _raw_post_idx i = _i _cond = (i != _k) and (_rand(_vectorisation_idx) < (0.56 * exp(_lio_create_cond_1 * (- ((((x_soma_pre - x_soma_post) ** 2) + ((y_soma_pre - y_soma_post) ** 2)) + ((z_soma_pre - z_soma_post) ** 2)))))) Key update_post: _post_idx = _raw_post_idx _n = 1 2021-11-05 15:14:44,064 DIAGNOSTIC brian2.devices.device: CA3_pyCANtoCA3_pyCAN_synapses_create_generator_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code cdef int64_t *_namespace_rand_buffer cdef int32_t *_namespace_rand_buffer_index cdef double _rand(int _idx): cdef double **buffer_pointer = _namespace_rand_buffer cdef double *buffer = buffer_pointer[0] cdef _numpy.ndarray _new_rand if(_namespace_rand_buffer_index[0] == 0): if buffer != NULL: free(buffer) _new_rand = _numpy.random.rand(20000) buffer = _numpy.PyArray_DATA(_new_rand) PyArray_CLEARFLAGS(<_numpy.PyArrayObject*>_new_rand, _numpy.NPY_OWNDATA) buffer_pointer[0] = buffer cdef double val = buffer[_namespace_rand_buffer_index[0]] _namespace_rand_buffer_index[0] += 1 if _namespace_rand_buffer_index[0] == 20000: _namespace_rand_buffer_index[0] = 0 return val # template-specific support code cdef int _buffer_size = 1024 cdef int[:] _prebuf = _numpy.zeros(_buffer_size, dtype=_numpy.int32) cdef int[:] _postbuf = _numpy.zeros(_buffer_size, dtype=_numpy.int32) cdef int _curbuf = 0 cdef int _raw_pre_idx cdef int _raw_post_idx cdef void _flush_buffer(buf, dynarr, int buf_len): cdef size_t _curlen = dynarr.shape[0] cdef size_t _newlen = _curlen+buf_len # Resize the array dynarr.resize(_newlen) # Get the potentially newly created underlying data arrays data = dynarr.data data[_curlen:_curlen+buf_len] = buf[:buf_len] def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_pyCANtoCA3_pyCAN_N = _namespace['_array_CA3_pyCANtoCA3_pyCAN_N'] cdef int32_t * _array_CA3_pyCANtoCA3_pyCAN_N = _buf__array_CA3_pyCANtoCA3_pyCAN_N.data cdef int32_t N = _namespace["N"] _var_N_post = _namespace["_var_N_post"] cdef int64_t N_post = _namespace["N_post"] _var_N_pre = _namespace["_var_N_pre"] cdef int64_t N_pre = _namespace["N_pre"] cdef bool _cond cdef int32_t _i cdef int32_t _iter_high cdef int32_t _iter_low cdef int32_t _iter_step cdef int32_t _j cdef int32_t _k cdef int32_t _n cdef int32_t _post_idx cdef int32_t _pre_idx cdef int32_t _raw_post_idx cdef int32_t _raw_pre_idx _var__source_offset = _namespace["_var__source_offset"] cdef int64_t _source_offset = _namespace["_source_offset"] _var__synaptic_post = _namespace["_var__synaptic_post"] _dynamic_array_CA3_pyCANtoCA3_pyCAN__synaptic_post = _namespace["_dynamic_array_CA3_pyCANtoCA3_pyCAN__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_pyCANtoCA3_pyCAN__synaptic_post = _namespace['_array_CA3_pyCANtoCA3_pyCAN__synaptic_post'] cdef int32_t * _array_CA3_pyCANtoCA3_pyCAN__synaptic_post = _buf__array_CA3_pyCANtoCA3_pyCAN__synaptic_post.data cdef size_t _num_array_CA3_pyCANtoCA3_pyCAN__synaptic_post = len(_namespace['_array_CA3_pyCANtoCA3_pyCAN__synaptic_post']) cdef int32_t _synaptic_post _var__synaptic_pre = _namespace["_var__synaptic_pre"] _dynamic_array_CA3_pyCANtoCA3_pyCAN__synaptic_pre = _namespace["_dynamic_array_CA3_pyCANtoCA3_pyCAN__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_pyCANtoCA3_pyCAN__synaptic_pre = _namespace['_array_CA3_pyCANtoCA3_pyCAN__synaptic_pre'] cdef int32_t * _array_CA3_pyCANtoCA3_pyCAN__synaptic_pre = _buf__array_CA3_pyCANtoCA3_pyCAN__synaptic_pre.data cdef size_t _num_array_CA3_pyCANtoCA3_pyCAN__synaptic_pre = len(_namespace['_array_CA3_pyCANtoCA3_pyCAN__synaptic_pre']) cdef int32_t _synaptic_pre _var__target_offset = _namespace["_var__target_offset"] cdef int64_t _target_offset = _namespace["_target_offset"] cdef int32_t i # namespace for function rand global _namespace_rand_buffer global _namespace_num_rand_buffer cdef _numpy.ndarray[int64_t, ndim=1, mode='c'] _buf__rand_buffer = _namespace['_rand_buffer'] _namespace_rand_buffer = _buf__rand_buffer.data _namespace_num_rand_buffer = len(_namespace['_rand_buffer']) # namespace for function rand global _namespace_rand_buffer_index global _namespace_num_rand_buffer_index cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__rand_buffer_index = _namespace['_rand_buffer_index'] _namespace_rand_buffer_index = _buf__rand_buffer_index.data _namespace_num_rand_buffer_index = len(_namespace['_rand_buffer_index']) _var_umetre = _namespace["_var_umetre"] cdef double umetre = _namespace["umetre"] _var_x_soma_post = _namespace["_var_x_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_x_soma = _namespace['_array_CA3_pyCAN_x_soma'] cdef double * _array_CA3_pyCAN_x_soma = _buf__array_CA3_pyCAN_x_soma.data cdef size_t _num_array_CA3_pyCAN_x_soma = len(_namespace['_array_CA3_pyCAN_x_soma']) cdef double x_soma_post _var_x_soma_pre = _namespace["_var_x_soma_pre"] _var_y_soma_post = _namespace["_var_y_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_y_soma = _namespace['_array_CA3_pyCAN_y_soma'] cdef double * _array_CA3_pyCAN_y_soma = _buf__array_CA3_pyCAN_y_soma.data cdef size_t _num_array_CA3_pyCAN_y_soma = len(_namespace['_array_CA3_pyCAN_y_soma']) cdef double y_soma_post _var_y_soma_pre = _namespace["_var_y_soma_pre"] _var_z_soma_post = _namespace["_var_z_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_z_soma = _namespace['_array_CA3_pyCAN_z_soma'] cdef double * _array_CA3_pyCAN_z_soma = _buf__array_CA3_pyCAN_z_soma.data cdef size_t _num_array_CA3_pyCAN_z_soma = len(_namespace['_array_CA3_pyCAN_z_soma']) cdef double z_soma_post _var_z_soma_pre = _namespace["_var_z_soma_pre"] cdef double _lio_create_cond_1 if '_owner' in _namespace: _owner = _namespace['_owner'] cdef int* _prebuf_ptr = &(_prebuf[0]) cdef int* _postbuf_ptr = &(_postbuf[0]) global _curbuf cdef size_t oldsize = len(_dynamic_array_CA3_pyCANtoCA3_pyCAN__synaptic_pre) cdef size_t newsize # The following variables are only used for probabilistic connections cdef bool _jump_algo cdef double _log1p, _pconst cdef size_t _jump # scalar code _vectorisation_idx = 1 _lio_create_cond_1 = 0.5 / ((2500.0 * umetre) ** 2) for _i in range(N_pre): _raw_pre_idx = _i + _source_offset _iter_low = 0 _iter_high = N_post _iter_step = 1 for _k in range(_iter_low, _iter_high, _iter_step): _pre_idx = _raw_pre_idx _j = _k _raw_post_idx = _j + _target_offset if _j<0 or _j>=N_post: raise IndexError("index j=%d outside allowed range from 0 to %d" % (_j, N_post-1)) y_soma_post = _array_CA3_pyCAN_y_soma[_raw_post_idx] y_soma_pre = _array_CA3_pyCAN_y_soma[_raw_pre_idx] z_soma_pre = _array_CA3_pyCAN_z_soma[_raw_pre_idx] x_soma_post = _array_CA3_pyCAN_x_soma[_raw_post_idx] x_soma_pre = _array_CA3_pyCAN_x_soma[_raw_pre_idx] z_soma_post = _array_CA3_pyCAN_z_soma[_raw_post_idx] _post_idx = _raw_post_idx i = _i _cond = (i != _k) and (_rand(_vectorisation_idx) < (0.56 * exp(_lio_create_cond_1 * (- ((((x_soma_pre - x_soma_post) ** 2) + ((y_soma_pre - y_soma_post) ** 2)) + ((z_soma_pre - z_soma_post) ** 2)))))) if not _cond: continue _post_idx = _raw_post_idx _n = 1 for _repetition in range(_n): _prebuf_ptr[_curbuf] = _pre_idx _postbuf_ptr[_curbuf] = _post_idx _curbuf += 1 # Flush buffer if _curbuf==_buffer_size: _flush_buffer(_prebuf, _dynamic_array_CA3_pyCANtoCA3_pyCAN__synaptic_pre, _curbuf) _flush_buffer(_postbuf, _dynamic_array_CA3_pyCANtoCA3_pyCAN__synaptic_post, _curbuf) _curbuf = 0 # Final buffer flush _flush_buffer(_prebuf, _dynamic_array_CA3_pyCANtoCA3_pyCAN__synaptic_pre, _curbuf) _flush_buffer(_postbuf, _dynamic_array_CA3_pyCANtoCA3_pyCAN__synaptic_post, _curbuf) _curbuf = 0 # reset the buffer for the next run newsize = len(_dynamic_array_CA3_pyCANtoCA3_pyCAN__synaptic_pre) # now we need to resize all registered variables and set the total number # of synapse (via Python) _owner._resize(newsize) # And update N_incoming, N_outgoing and synapse_number _owner._update_synapse_numbers(oldsize) before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_pyCANtoCA3_pyCAN_N = _namespace['_array_CA3_pyCANtoCA3_pyCAN_N'] cdef int32_t * _array_CA3_pyCANtoCA3_pyCAN_N = _buf__array_CA3_pyCANtoCA3_pyCAN_N.data cdef int32_t N = _namespace["N"] _var_N_post = _namespace["_var_N_post"] cdef int64_t N_post = _namespace["N_post"] _var_N_pre = _namespace["_var_N_pre"] cdef int64_t N_pre = _namespace["N_pre"] cdef bool _cond cdef int32_t _i cdef int32_t _iter_high cdef int32_t _iter_low cdef int32_t _iter_step cdef int32_t _j cdef int32_t _k cdef int32_t _n cdef int32_t _post_idx cdef int32_t _pre_idx cdef int32_t _raw_post_idx cdef int32_t _raw_pre_idx _var__source_offset = _namespace["_var__source_offset"] cdef int64_t _source_offset = _namespace["_source_offset"] _var__synaptic_post = _namespace["_var__synaptic_post"] _dynamic_array_CA3_pyCANtoCA3_pyCAN__synaptic_post = _namespace["_dynamic_array_CA3_pyCANtoCA3_pyCAN__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_pyCANtoCA3_pyCAN__synaptic_post = _namespace['_array_CA3_pyCANtoCA3_pyCAN__synaptic_post'] cdef int32_t * _array_CA3_pyCANtoCA3_pyCAN__synaptic_post = _buf__array_CA3_pyCANtoCA3_pyCAN__synaptic_post.data cdef size_t _num_array_CA3_pyCANtoCA3_pyCAN__synaptic_post = len(_namespace['_array_CA3_pyCANtoCA3_pyCAN__synaptic_post']) cdef int32_t _synaptic_post _var__synaptic_pre = _namespace["_var__synaptic_pre"] _dynamic_array_CA3_pyCANtoCA3_pyCAN__synaptic_pre = _namespace["_dynamic_array_CA3_pyCANtoCA3_pyCAN__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_pyCANtoCA3_pyCAN__synaptic_pre = _namespace['_array_CA3_pyCANtoCA3_pyCAN__synaptic_pre'] cdef int32_t * _array_CA3_pyCANtoCA3_pyCAN__synaptic_pre = _buf__array_CA3_pyCANtoCA3_pyCAN__synaptic_pre.data cdef size_t _num_array_CA3_pyCANtoCA3_pyCAN__synaptic_pre = len(_namespace['_array_CA3_pyCANtoCA3_pyCAN__synaptic_pre']) cdef int32_t _synaptic_pre _var__target_offset = _namespace["_var__target_offset"] cdef int64_t _target_offset = _namespace["_target_offset"] cdef int32_t i # namespace for function rand global _namespace_rand_buffer global _namespace_num_rand_buffer cdef _numpy.ndarray[int64_t, ndim=1, mode='c'] _buf__rand_buffer = _namespace['_rand_buffer'] _namespace_rand_buffer = _buf__rand_buffer.data _namespace_num_rand_buffer = len(_namespace['_rand_buffer']) # namespace for function rand global _namespace_rand_buffer_index global _namespace_num_rand_buffer_index cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__rand_buffer_index = _namespace['_rand_buffer_index'] _namespace_rand_buffer_index = _buf__rand_buffer_index.data _namespace_num_rand_buffer_index = len(_namespace['_rand_buffer_index']) _var_umetre = _namespace["_var_umetre"] cdef double umetre = _namespace["umetre"] _var_x_soma_post = _namespace["_var_x_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_x_soma = _namespace['_array_CA3_pyCAN_x_soma'] cdef double * _array_CA3_pyCAN_x_soma = _buf__array_CA3_pyCAN_x_soma.data cdef size_t _num_array_CA3_pyCAN_x_soma = len(_namespace['_array_CA3_pyCAN_x_soma']) cdef double x_soma_post _var_x_soma_pre = _namespace["_var_x_soma_pre"] _var_y_soma_post = _namespace["_var_y_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_y_soma = _namespace['_array_CA3_pyCAN_y_soma'] cdef double * _array_CA3_pyCAN_y_soma = _buf__array_CA3_pyCAN_y_soma.data cdef size_t _num_array_CA3_pyCAN_y_soma = len(_namespace['_array_CA3_pyCAN_y_soma']) cdef double y_soma_post _var_y_soma_pre = _namespace["_var_y_soma_pre"] _var_z_soma_post = _namespace["_var_z_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_z_soma = _namespace['_array_CA3_pyCAN_z_soma'] cdef double * _array_CA3_pyCAN_z_soma = _buf__array_CA3_pyCAN_z_soma.data cdef size_t _num_array_CA3_pyCAN_z_soma = len(_namespace['_array_CA3_pyCAN_z_soma']) cdef double z_soma_post _var_z_soma_pre = _namespace["_var_z_soma_pre"] cdef double _lio_create_cond_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_pyCANtoCA3_pyCAN_N = _namespace['_array_CA3_pyCANtoCA3_pyCAN_N'] cdef int32_t * _array_CA3_pyCANtoCA3_pyCAN_N = _buf__array_CA3_pyCANtoCA3_pyCAN_N.data cdef int32_t N = _namespace["N"] _var_N_post = _namespace["_var_N_post"] cdef int64_t N_post = _namespace["N_post"] _var_N_pre = _namespace["_var_N_pre"] cdef int64_t N_pre = _namespace["N_pre"] cdef bool _cond cdef int32_t _i cdef int32_t _iter_high cdef int32_t _iter_low cdef int32_t _iter_step cdef int32_t _j cdef int32_t _k cdef int32_t _n cdef int32_t _post_idx cdef int32_t _pre_idx cdef int32_t _raw_post_idx cdef int32_t _raw_pre_idx _var__source_offset = _namespace["_var__source_offset"] cdef int64_t _source_offset = _namespace["_source_offset"] _var__synaptic_post = _namespace["_var__synaptic_post"] _dynamic_array_CA3_pyCANtoCA3_pyCAN__synaptic_post = _namespace["_dynamic_array_CA3_pyCANtoCA3_pyCAN__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_pyCANtoCA3_pyCAN__synaptic_post = _namespace['_array_CA3_pyCANtoCA3_pyCAN__synaptic_post'] cdef int32_t * _array_CA3_pyCANtoCA3_pyCAN__synaptic_post = _buf__array_CA3_pyCANtoCA3_pyCAN__synaptic_post.data cdef size_t _num_array_CA3_pyCANtoCA3_pyCAN__synaptic_post = len(_namespace['_array_CA3_pyCANtoCA3_pyCAN__synaptic_post']) cdef int32_t _synaptic_post _var__synaptic_pre = _namespace["_var__synaptic_pre"] _dynamic_array_CA3_pyCANtoCA3_pyCAN__synaptic_pre = _namespace["_dynamic_array_CA3_pyCANtoCA3_pyCAN__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_pyCANtoCA3_pyCAN__synaptic_pre = _namespace['_array_CA3_pyCANtoCA3_pyCAN__synaptic_pre'] cdef int32_t * _array_CA3_pyCANtoCA3_pyCAN__synaptic_pre = _buf__array_CA3_pyCANtoCA3_pyCAN__synaptic_pre.data cdef size_t _num_array_CA3_pyCANtoCA3_pyCAN__synaptic_pre = len(_namespace['_array_CA3_pyCANtoCA3_pyCAN__synaptic_pre']) cdef int32_t _synaptic_pre _var__target_offset = _namespace["_var__target_offset"] cdef int64_t _target_offset = _namespace["_target_offset"] cdef int32_t i # namespace for function rand global _namespace_rand_buffer global _namespace_num_rand_buffer cdef _numpy.ndarray[int64_t, ndim=1, mode='c'] _buf__rand_buffer = _namespace['_rand_buffer'] _namespace_rand_buffer = _buf__rand_buffer.data _namespace_num_rand_buffer = len(_namespace['_rand_buffer']) # namespace for function rand global _namespace_rand_buffer_index global _namespace_num_rand_buffer_index cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__rand_buffer_index = _namespace['_rand_buffer_index'] _namespace_rand_buffer_index = _buf__rand_buffer_index.data _namespace_num_rand_buffer_index = len(_namespace['_rand_buffer_index']) _var_umetre = _namespace["_var_umetre"] cdef double umetre = _namespace["umetre"] _var_x_soma_post = _namespace["_var_x_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_x_soma = _namespace['_array_CA3_pyCAN_x_soma'] cdef double * _array_CA3_pyCAN_x_soma = _buf__array_CA3_pyCAN_x_soma.data cdef size_t _num_array_CA3_pyCAN_x_soma = len(_namespace['_array_CA3_pyCAN_x_soma']) cdef double x_soma_post _var_x_soma_pre = _namespace["_var_x_soma_pre"] _var_y_soma_post = _namespace["_var_y_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_y_soma = _namespace['_array_CA3_pyCAN_y_soma'] cdef double * _array_CA3_pyCAN_y_soma = _buf__array_CA3_pyCAN_y_soma.data cdef size_t _num_array_CA3_pyCAN_y_soma = len(_namespace['_array_CA3_pyCAN_y_soma']) cdef double y_soma_post _var_y_soma_pre = _namespace["_var_y_soma_pre"] _var_z_soma_post = _namespace["_var_z_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_z_soma = _namespace['_array_CA3_pyCAN_z_soma'] cdef double * _array_CA3_pyCAN_z_soma = _buf__array_CA3_pyCAN_z_soma.data cdef size_t _num_array_CA3_pyCAN_z_soma = len(_namespace['_array_CA3_pyCAN_z_soma']) cdef double z_soma_post _var_z_soma_pre = _namespace["_var_z_soma_pre"] cdef double _lio_create_cond_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:14:44,064 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name CA3_pyCANtoCA3_pyCAN_synapses_create_generator_codeobject 2021-11-05 15:14:44,064 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "CA3_pyCANtoCA3_pyCAN_synapses_create_generator" using Cython module "_cython_magic_9b72671506389c1ad7d43d0a80d55453" 2021-11-05 15:14:44,064 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140605427911984 on /home/nikos/.cython/brian_extensions/_cython_magic_9b72671506389c1ad7d43d0a80d55453.lock 2021-11-05 15:14:44,065 DEBUG brian2.utils.filelock: Lock 140605427911984 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_9b72671506389c1ad7d43d0a80d55453.lock 2021-11-05 15:14:44,068 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140605427911984 on /home/nikos/.cython/brian_extensions/_cython_magic_9b72671506389c1ad7d43d0a80d55453.lock 2021-11-05 15:14:44,068 DEBUG brian2.utils.filelock: Lock 140605427911984 released on /home/nikos/.cython/brian_extensions/_cython_magic_9b72671506389c1ad7d43d0a80d55453.lock 2021-11-05 15:14:44,109 DIAGNOSTIC brian2.core.names: Created object of class Synapses with name CA3_pyCANtoCA3_inh 2021-11-05 15:14:44,109 DIAGNOSTIC brian2.core.base: Created BrianObject with name CA3_pyCANtoCA3_inh, clock=Clock(dt=100. * usecond, name='defaultclock'), when=start, order=0 2021-11-05 15:14:44,112 DIAGNOSTIC brian2.core.names: Created object of class SynapticPathway with name CA3_pyCANtoCA3_inh_pre 2021-11-05 15:14:44,112 DIAGNOSTIC brian2.core.base: Created BrianObject with name CA3_pyCANtoCA3_inh_pre, clock=Clock(dt=100. * usecond, name='defaultclock'), when=synapses, order=-1 2021-11-05 15:14:44,121 DEBUG brian2.synapses.synapses: Creating synapses from group 'CA3_pyCAN' to group 'CA3_inh', using generator '_k for _k in range(N_post) if (i!=_k) and rand()<0.75*exp(-((x_soma_pre-x_soma_post)**2+(y_soma_pre-y_soma_post)**2+(z_soma_pre-z_soma_post)**2)/(2*(2500*umetre)**2))' 2021-11-05 15:14:44,121 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=CA3_pyCANtoCA3_inh, template name=synapses_create_generator) for abstract code: Key setup_iterator: _iter_low = 0 _iter_high = N_post _iter_step = 1 Key create_j: _pre_idx = _raw_pre_idx _j = _k Key create_cond: _post_idx = _raw_post_idx _cond = (i != _k) and (rand() < (0.75 * exp((- ((((x_soma_pre - x_soma_post) ** 2) + ((y_soma_pre - y_soma_post) ** 2)) + ((z_soma_pre - z_soma_post) ** 2))) / (2 * ((2500 * umetre) ** 2))))) Key update_post: _post_idx = _raw_post_idx _n = 1 2021-11-05 15:14:44,176 DIAGNOSTIC brian2.devices.device: CA3_pyCANtoCA3_inh_synapses_create_generator_codeobject abstract code: Key setup_iterator: _iter_low = 0 _iter_high = N_post _iter_step = 1 Key create_j: _pre_idx = _raw_pre_idx _j = _k Key create_cond: _post_idx = _raw_post_idx _cond = (i != _k) and (rand() < (0.75 * exp((- ((((x_soma_pre - x_soma_post) ** 2) + ((y_soma_pre - y_soma_post) ** 2)) + ((z_soma_pre - z_soma_post) ** 2))) / (2 * ((2500 * umetre) ** 2))))) Key update_post: _post_idx = _raw_post_idx _n = 1 2021-11-05 15:14:44,180 DIAGNOSTIC brian2.devices.device: CA3_pyCANtoCA3_inh_synapses_create_generator_codeobject snippet (scalar): Key setup_iterator: Key create_j: Key create_cond: _lio_create_cond_1 = 0.5 / ((2500.0 * umetre) ** 2) Key update_post: 2021-11-05 15:14:44,180 DIAGNOSTIC brian2.devices.device: CA3_pyCANtoCA3_inh_synapses_create_generator_codeobject snippet (vector): Key setup_iterator: _iter_low = 0 _iter_high = N_post _iter_step = 1 Key create_j: _pre_idx = _raw_pre_idx _j = _k Key create_cond: y_soma_post = _array_CA3_inh_y_soma[_raw_post_idx] y_soma_pre = _array_CA3_pyCAN_y_soma[_raw_pre_idx] z_soma_pre = _array_CA3_pyCAN_z_soma[_raw_pre_idx] x_soma_post = _array_CA3_inh_x_soma[_raw_post_idx] x_soma_pre = _array_CA3_pyCAN_x_soma[_raw_pre_idx] z_soma_post = _array_CA3_inh_z_soma[_raw_post_idx] _post_idx = _raw_post_idx i = _i _cond = (i != _k) and (_rand(_vectorisation_idx) < (0.75 * exp(_lio_create_cond_1 * (- ((((x_soma_pre - x_soma_post) ** 2) + ((y_soma_pre - y_soma_post) ** 2)) + ((z_soma_pre - z_soma_post) ** 2)))))) Key update_post: _post_idx = _raw_post_idx _n = 1 2021-11-05 15:14:44,181 DIAGNOSTIC brian2.devices.device: CA3_pyCANtoCA3_inh_synapses_create_generator_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code cdef int64_t *_namespace_rand_buffer cdef int32_t *_namespace_rand_buffer_index cdef double _rand(int _idx): cdef double **buffer_pointer = _namespace_rand_buffer cdef double *buffer = buffer_pointer[0] cdef _numpy.ndarray _new_rand if(_namespace_rand_buffer_index[0] == 0): if buffer != NULL: free(buffer) _new_rand = _numpy.random.rand(20000) buffer = _numpy.PyArray_DATA(_new_rand) PyArray_CLEARFLAGS(<_numpy.PyArrayObject*>_new_rand, _numpy.NPY_OWNDATA) buffer_pointer[0] = buffer cdef double val = buffer[_namespace_rand_buffer_index[0]] _namespace_rand_buffer_index[0] += 1 if _namespace_rand_buffer_index[0] == 20000: _namespace_rand_buffer_index[0] = 0 return val # template-specific support code cdef int _buffer_size = 1024 cdef int[:] _prebuf = _numpy.zeros(_buffer_size, dtype=_numpy.int32) cdef int[:] _postbuf = _numpy.zeros(_buffer_size, dtype=_numpy.int32) cdef int _curbuf = 0 cdef int _raw_pre_idx cdef int _raw_post_idx cdef void _flush_buffer(buf, dynarr, int buf_len): cdef size_t _curlen = dynarr.shape[0] cdef size_t _newlen = _curlen+buf_len # Resize the array dynarr.resize(_newlen) # Get the potentially newly created underlying data arrays data = dynarr.data data[_curlen:_curlen+buf_len] = buf[:buf_len] def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_pyCANtoCA3_inh_N = _namespace['_array_CA3_pyCANtoCA3_inh_N'] cdef int32_t * _array_CA3_pyCANtoCA3_inh_N = _buf__array_CA3_pyCANtoCA3_inh_N.data cdef int32_t N = _namespace["N"] _var_N_post = _namespace["_var_N_post"] cdef int64_t N_post = _namespace["N_post"] _var_N_pre = _namespace["_var_N_pre"] cdef int64_t N_pre = _namespace["N_pre"] cdef bool _cond cdef int32_t _i cdef int32_t _iter_high cdef int32_t _iter_low cdef int32_t _iter_step cdef int32_t _j cdef int32_t _k cdef int32_t _n cdef int32_t _post_idx cdef int32_t _pre_idx cdef int32_t _raw_post_idx cdef int32_t _raw_pre_idx _var__source_offset = _namespace["_var__source_offset"] cdef int64_t _source_offset = _namespace["_source_offset"] _var__synaptic_post = _namespace["_var__synaptic_post"] _dynamic_array_CA3_pyCANtoCA3_inh__synaptic_post = _namespace["_dynamic_array_CA3_pyCANtoCA3_inh__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_pyCANtoCA3_inh__synaptic_post = _namespace['_array_CA3_pyCANtoCA3_inh__synaptic_post'] cdef int32_t * _array_CA3_pyCANtoCA3_inh__synaptic_post = _buf__array_CA3_pyCANtoCA3_inh__synaptic_post.data cdef size_t _num_array_CA3_pyCANtoCA3_inh__synaptic_post = len(_namespace['_array_CA3_pyCANtoCA3_inh__synaptic_post']) cdef int32_t _synaptic_post _var__synaptic_pre = _namespace["_var__synaptic_pre"] _dynamic_array_CA3_pyCANtoCA3_inh__synaptic_pre = _namespace["_dynamic_array_CA3_pyCANtoCA3_inh__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_pyCANtoCA3_inh__synaptic_pre = _namespace['_array_CA3_pyCANtoCA3_inh__synaptic_pre'] cdef int32_t * _array_CA3_pyCANtoCA3_inh__synaptic_pre = _buf__array_CA3_pyCANtoCA3_inh__synaptic_pre.data cdef size_t _num_array_CA3_pyCANtoCA3_inh__synaptic_pre = len(_namespace['_array_CA3_pyCANtoCA3_inh__synaptic_pre']) cdef int32_t _synaptic_pre _var__target_offset = _namespace["_var__target_offset"] cdef int64_t _target_offset = _namespace["_target_offset"] cdef int32_t i # namespace for function rand global _namespace_rand_buffer global _namespace_num_rand_buffer cdef _numpy.ndarray[int64_t, ndim=1, mode='c'] _buf__rand_buffer = _namespace['_rand_buffer'] _namespace_rand_buffer = _buf__rand_buffer.data _namespace_num_rand_buffer = len(_namespace['_rand_buffer']) # namespace for function rand global _namespace_rand_buffer_index global _namespace_num_rand_buffer_index cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__rand_buffer_index = _namespace['_rand_buffer_index'] _namespace_rand_buffer_index = _buf__rand_buffer_index.data _namespace_num_rand_buffer_index = len(_namespace['_rand_buffer_index']) _var_umetre = _namespace["_var_umetre"] cdef double umetre = _namespace["umetre"] _var_x_soma_post = _namespace["_var_x_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_inh_x_soma = _namespace['_array_CA3_inh_x_soma'] cdef double * _array_CA3_inh_x_soma = _buf__array_CA3_inh_x_soma.data cdef size_t _num_array_CA3_inh_x_soma = len(_namespace['_array_CA3_inh_x_soma']) cdef double x_soma_post _var_x_soma_pre = _namespace["_var_x_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_x_soma = _namespace['_array_CA3_pyCAN_x_soma'] cdef double * _array_CA3_pyCAN_x_soma = _buf__array_CA3_pyCAN_x_soma.data cdef size_t _num_array_CA3_pyCAN_x_soma = len(_namespace['_array_CA3_pyCAN_x_soma']) cdef double x_soma_pre _var_y_soma_post = _namespace["_var_y_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_inh_y_soma = _namespace['_array_CA3_inh_y_soma'] cdef double * _array_CA3_inh_y_soma = _buf__array_CA3_inh_y_soma.data cdef size_t _num_array_CA3_inh_y_soma = len(_namespace['_array_CA3_inh_y_soma']) cdef double y_soma_post _var_y_soma_pre = _namespace["_var_y_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_y_soma = _namespace['_array_CA3_pyCAN_y_soma'] cdef double * _array_CA3_pyCAN_y_soma = _buf__array_CA3_pyCAN_y_soma.data cdef size_t _num_array_CA3_pyCAN_y_soma = len(_namespace['_array_CA3_pyCAN_y_soma']) cdef double y_soma_pre _var_z_soma_post = _namespace["_var_z_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_inh_z_soma = _namespace['_array_CA3_inh_z_soma'] cdef double * _array_CA3_inh_z_soma = _buf__array_CA3_inh_z_soma.data cdef size_t _num_array_CA3_inh_z_soma = len(_namespace['_array_CA3_inh_z_soma']) cdef double z_soma_post _var_z_soma_pre = _namespace["_var_z_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_z_soma = _namespace['_array_CA3_pyCAN_z_soma'] cdef double * _array_CA3_pyCAN_z_soma = _buf__array_CA3_pyCAN_z_soma.data cdef size_t _num_array_CA3_pyCAN_z_soma = len(_namespace['_array_CA3_pyCAN_z_soma']) cdef double z_soma_pre cdef double _lio_create_cond_1 if '_owner' in _namespace: _owner = _namespace['_owner'] cdef int* _prebuf_ptr = &(_prebuf[0]) cdef int* _postbuf_ptr = &(_postbuf[0]) global _curbuf cdef size_t oldsize = len(_dynamic_array_CA3_pyCANtoCA3_inh__synaptic_pre) cdef size_t newsize # The following variables are only used for probabilistic connections cdef bool _jump_algo cdef double _log1p, _pconst cdef size_t _jump # scalar code _vectorisation_idx = 1 _lio_create_cond_1 = 0.5 / ((2500.0 * umetre) ** 2) for _i in range(N_pre): _raw_pre_idx = _i + _source_offset _iter_low = 0 _iter_high = N_post _iter_step = 1 for _k in range(_iter_low, _iter_high, _iter_step): _pre_idx = _raw_pre_idx _j = _k _raw_post_idx = _j + _target_offset if _j<0 or _j>=N_post: raise IndexError("index j=%d outside allowed range from 0 to %d" % (_j, N_post-1)) y_soma_post = _array_CA3_inh_y_soma[_raw_post_idx] y_soma_pre = _array_CA3_pyCAN_y_soma[_raw_pre_idx] z_soma_pre = _array_CA3_pyCAN_z_soma[_raw_pre_idx] x_soma_post = _array_CA3_inh_x_soma[_raw_post_idx] x_soma_pre = _array_CA3_pyCAN_x_soma[_raw_pre_idx] z_soma_post = _array_CA3_inh_z_soma[_raw_post_idx] _post_idx = _raw_post_idx i = _i _cond = (i != _k) and (_rand(_vectorisation_idx) < (0.75 * exp(_lio_create_cond_1 * (- ((((x_soma_pre - x_soma_post) ** 2) + ((y_soma_pre - y_soma_post) ** 2)) + ((z_soma_pre - z_soma_post) ** 2)))))) if not _cond: continue _post_idx = _raw_post_idx _n = 1 for _repetition in range(_n): _prebuf_ptr[_curbuf] = _pre_idx _postbuf_ptr[_curbuf] = _post_idx _curbuf += 1 # Flush buffer if _curbuf==_buffer_size: _flush_buffer(_prebuf, _dynamic_array_CA3_pyCANtoCA3_inh__synaptic_pre, _curbuf) _flush_buffer(_postbuf, _dynamic_array_CA3_pyCANtoCA3_inh__synaptic_post, _curbuf) _curbuf = 0 # Final buffer flush _flush_buffer(_prebuf, _dynamic_array_CA3_pyCANtoCA3_inh__synaptic_pre, _curbuf) _flush_buffer(_postbuf, _dynamic_array_CA3_pyCANtoCA3_inh__synaptic_post, _curbuf) _curbuf = 0 # reset the buffer for the next run newsize = len(_dynamic_array_CA3_pyCANtoCA3_inh__synaptic_pre) # now we need to resize all registered variables and set the total number # of synapse (via Python) _owner._resize(newsize) # And update N_incoming, N_outgoing and synapse_number _owner._update_synapse_numbers(oldsize) before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_pyCANtoCA3_inh_N = _namespace['_array_CA3_pyCANtoCA3_inh_N'] cdef int32_t * _array_CA3_pyCANtoCA3_inh_N = _buf__array_CA3_pyCANtoCA3_inh_N.data cdef int32_t N = _namespace["N"] _var_N_post = _namespace["_var_N_post"] cdef int64_t N_post = _namespace["N_post"] _var_N_pre = _namespace["_var_N_pre"] cdef int64_t N_pre = _namespace["N_pre"] cdef bool _cond cdef int32_t _i cdef int32_t _iter_high cdef int32_t _iter_low cdef int32_t _iter_step cdef int32_t _j cdef int32_t _k cdef int32_t _n cdef int32_t _post_idx cdef int32_t _pre_idx cdef int32_t _raw_post_idx cdef int32_t _raw_pre_idx _var__source_offset = _namespace["_var__source_offset"] cdef int64_t _source_offset = _namespace["_source_offset"] _var__synaptic_post = _namespace["_var__synaptic_post"] _dynamic_array_CA3_pyCANtoCA3_inh__synaptic_post = _namespace["_dynamic_array_CA3_pyCANtoCA3_inh__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_pyCANtoCA3_inh__synaptic_post = _namespace['_array_CA3_pyCANtoCA3_inh__synaptic_post'] cdef int32_t * _array_CA3_pyCANtoCA3_inh__synaptic_post = _buf__array_CA3_pyCANtoCA3_inh__synaptic_post.data cdef size_t _num_array_CA3_pyCANtoCA3_inh__synaptic_post = len(_namespace['_array_CA3_pyCANtoCA3_inh__synaptic_post']) cdef int32_t _synaptic_post _var__synaptic_pre = _namespace["_var__synaptic_pre"] _dynamic_array_CA3_pyCANtoCA3_inh__synaptic_pre = _namespace["_dynamic_array_CA3_pyCANtoCA3_inh__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_pyCANtoCA3_inh__synaptic_pre = _namespace['_array_CA3_pyCANtoCA3_inh__synaptic_pre'] cdef int32_t * _array_CA3_pyCANtoCA3_inh__synaptic_pre = _buf__array_CA3_pyCANtoCA3_inh__synaptic_pre.data cdef size_t _num_array_CA3_pyCANtoCA3_inh__synaptic_pre = len(_namespace['_array_CA3_pyCANtoCA3_inh__synaptic_pre']) cdef int32_t _synaptic_pre _var__target_offset = _namespace["_var__target_offset"] cdef int64_t _target_offset = _namespace["_target_offset"] cdef int32_t i # namespace for function rand global _namespace_rand_buffer global _namespace_num_rand_buffer cdef _numpy.ndarray[int64_t, ndim=1, mode='c'] _buf__rand_buffer = _namespace['_rand_buffer'] _namespace_rand_buffer = _buf__rand_buffer.data _namespace_num_rand_buffer = len(_namespace['_rand_buffer']) # namespace for function rand global _namespace_rand_buffer_index global _namespace_num_rand_buffer_index cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__rand_buffer_index = _namespace['_rand_buffer_index'] _namespace_rand_buffer_index = _buf__rand_buffer_index.data _namespace_num_rand_buffer_index = len(_namespace['_rand_buffer_index']) _var_umetre = _namespace["_var_umetre"] cdef double umetre = _namespace["umetre"] _var_x_soma_post = _namespace["_var_x_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_inh_x_soma = _namespace['_array_CA3_inh_x_soma'] cdef double * _array_CA3_inh_x_soma = _buf__array_CA3_inh_x_soma.data cdef size_t _num_array_CA3_inh_x_soma = len(_namespace['_array_CA3_inh_x_soma']) cdef double x_soma_post _var_x_soma_pre = _namespace["_var_x_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_x_soma = _namespace['_array_CA3_pyCAN_x_soma'] cdef double * _array_CA3_pyCAN_x_soma = _buf__array_CA3_pyCAN_x_soma.data cdef size_t _num_array_CA3_pyCAN_x_soma = len(_namespace['_array_CA3_pyCAN_x_soma']) cdef double x_soma_pre _var_y_soma_post = _namespace["_var_y_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_inh_y_soma = _namespace['_array_CA3_inh_y_soma'] cdef double * _array_CA3_inh_y_soma = _buf__array_CA3_inh_y_soma.data cdef size_t _num_array_CA3_inh_y_soma = len(_namespace['_array_CA3_inh_y_soma']) cdef double y_soma_post _var_y_soma_pre = _namespace["_var_y_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_y_soma = _namespace['_array_CA3_pyCAN_y_soma'] cdef double * _array_CA3_pyCAN_y_soma = _buf__array_CA3_pyCAN_y_soma.data cdef size_t _num_array_CA3_pyCAN_y_soma = len(_namespace['_array_CA3_pyCAN_y_soma']) cdef double y_soma_pre _var_z_soma_post = _namespace["_var_z_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_inh_z_soma = _namespace['_array_CA3_inh_z_soma'] cdef double * _array_CA3_inh_z_soma = _buf__array_CA3_inh_z_soma.data cdef size_t _num_array_CA3_inh_z_soma = len(_namespace['_array_CA3_inh_z_soma']) cdef double z_soma_post _var_z_soma_pre = _namespace["_var_z_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_z_soma = _namespace['_array_CA3_pyCAN_z_soma'] cdef double * _array_CA3_pyCAN_z_soma = _buf__array_CA3_pyCAN_z_soma.data cdef size_t _num_array_CA3_pyCAN_z_soma = len(_namespace['_array_CA3_pyCAN_z_soma']) cdef double z_soma_pre cdef double _lio_create_cond_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_pyCANtoCA3_inh_N = _namespace['_array_CA3_pyCANtoCA3_inh_N'] cdef int32_t * _array_CA3_pyCANtoCA3_inh_N = _buf__array_CA3_pyCANtoCA3_inh_N.data cdef int32_t N = _namespace["N"] _var_N_post = _namespace["_var_N_post"] cdef int64_t N_post = _namespace["N_post"] _var_N_pre = _namespace["_var_N_pre"] cdef int64_t N_pre = _namespace["N_pre"] cdef bool _cond cdef int32_t _i cdef int32_t _iter_high cdef int32_t _iter_low cdef int32_t _iter_step cdef int32_t _j cdef int32_t _k cdef int32_t _n cdef int32_t _post_idx cdef int32_t _pre_idx cdef int32_t _raw_post_idx cdef int32_t _raw_pre_idx _var__source_offset = _namespace["_var__source_offset"] cdef int64_t _source_offset = _namespace["_source_offset"] _var__synaptic_post = _namespace["_var__synaptic_post"] _dynamic_array_CA3_pyCANtoCA3_inh__synaptic_post = _namespace["_dynamic_array_CA3_pyCANtoCA3_inh__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_pyCANtoCA3_inh__synaptic_post = _namespace['_array_CA3_pyCANtoCA3_inh__synaptic_post'] cdef int32_t * _array_CA3_pyCANtoCA3_inh__synaptic_post = _buf__array_CA3_pyCANtoCA3_inh__synaptic_post.data cdef size_t _num_array_CA3_pyCANtoCA3_inh__synaptic_post = len(_namespace['_array_CA3_pyCANtoCA3_inh__synaptic_post']) cdef int32_t _synaptic_post _var__synaptic_pre = _namespace["_var__synaptic_pre"] _dynamic_array_CA3_pyCANtoCA3_inh__synaptic_pre = _namespace["_dynamic_array_CA3_pyCANtoCA3_inh__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_pyCANtoCA3_inh__synaptic_pre = _namespace['_array_CA3_pyCANtoCA3_inh__synaptic_pre'] cdef int32_t * _array_CA3_pyCANtoCA3_inh__synaptic_pre = _buf__array_CA3_pyCANtoCA3_inh__synaptic_pre.data cdef size_t _num_array_CA3_pyCANtoCA3_inh__synaptic_pre = len(_namespace['_array_CA3_pyCANtoCA3_inh__synaptic_pre']) cdef int32_t _synaptic_pre _var__target_offset = _namespace["_var__target_offset"] cdef int64_t _target_offset = _namespace["_target_offset"] cdef int32_t i # namespace for function rand global _namespace_rand_buffer global _namespace_num_rand_buffer cdef _numpy.ndarray[int64_t, ndim=1, mode='c'] _buf__rand_buffer = _namespace['_rand_buffer'] _namespace_rand_buffer = _buf__rand_buffer.data _namespace_num_rand_buffer = len(_namespace['_rand_buffer']) # namespace for function rand global _namespace_rand_buffer_index global _namespace_num_rand_buffer_index cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__rand_buffer_index = _namespace['_rand_buffer_index'] _namespace_rand_buffer_index = _buf__rand_buffer_index.data _namespace_num_rand_buffer_index = len(_namespace['_rand_buffer_index']) _var_umetre = _namespace["_var_umetre"] cdef double umetre = _namespace["umetre"] _var_x_soma_post = _namespace["_var_x_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_inh_x_soma = _namespace['_array_CA3_inh_x_soma'] cdef double * _array_CA3_inh_x_soma = _buf__array_CA3_inh_x_soma.data cdef size_t _num_array_CA3_inh_x_soma = len(_namespace['_array_CA3_inh_x_soma']) cdef double x_soma_post _var_x_soma_pre = _namespace["_var_x_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_x_soma = _namespace['_array_CA3_pyCAN_x_soma'] cdef double * _array_CA3_pyCAN_x_soma = _buf__array_CA3_pyCAN_x_soma.data cdef size_t _num_array_CA3_pyCAN_x_soma = len(_namespace['_array_CA3_pyCAN_x_soma']) cdef double x_soma_pre _var_y_soma_post = _namespace["_var_y_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_inh_y_soma = _namespace['_array_CA3_inh_y_soma'] cdef double * _array_CA3_inh_y_soma = _buf__array_CA3_inh_y_soma.data cdef size_t _num_array_CA3_inh_y_soma = len(_namespace['_array_CA3_inh_y_soma']) cdef double y_soma_post _var_y_soma_pre = _namespace["_var_y_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_y_soma = _namespace['_array_CA3_pyCAN_y_soma'] cdef double * _array_CA3_pyCAN_y_soma = _buf__array_CA3_pyCAN_y_soma.data cdef size_t _num_array_CA3_pyCAN_y_soma = len(_namespace['_array_CA3_pyCAN_y_soma']) cdef double y_soma_pre _var_z_soma_post = _namespace["_var_z_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_inh_z_soma = _namespace['_array_CA3_inh_z_soma'] cdef double * _array_CA3_inh_z_soma = _buf__array_CA3_inh_z_soma.data cdef size_t _num_array_CA3_inh_z_soma = len(_namespace['_array_CA3_inh_z_soma']) cdef double z_soma_post _var_z_soma_pre = _namespace["_var_z_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_z_soma = _namespace['_array_CA3_pyCAN_z_soma'] cdef double * _array_CA3_pyCAN_z_soma = _buf__array_CA3_pyCAN_z_soma.data cdef size_t _num_array_CA3_pyCAN_z_soma = len(_namespace['_array_CA3_pyCAN_z_soma']) cdef double z_soma_pre cdef double _lio_create_cond_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:14:44,181 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name CA3_pyCANtoCA3_inh_synapses_create_generator_codeobject 2021-11-05 15:14:44,181 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "CA3_pyCANtoCA3_inh_synapses_create_generator" using Cython module "_cython_magic_44937d92d5c604c736fff3ade90c6157" 2021-11-05 15:14:44,182 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140605426948464 on /home/nikos/.cython/brian_extensions/_cython_magic_44937d92d5c604c736fff3ade90c6157.lock 2021-11-05 15:14:44,182 DEBUG brian2.utils.filelock: Lock 140605426948464 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_44937d92d5c604c736fff3ade90c6157.lock 2021-11-05 15:14:44,186 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140605426948464 on /home/nikos/.cython/brian_extensions/_cython_magic_44937d92d5c604c736fff3ade90c6157.lock 2021-11-05 15:14:44,186 DEBUG brian2.utils.filelock: Lock 140605426948464 released on /home/nikos/.cython/brian_extensions/_cython_magic_44937d92d5c604c736fff3ade90c6157.lock 2021-11-05 15:14:44,189 DIAGNOSTIC brian2.core.names: Created object of class Synapses with name CA3_inhtoCA3_pyCAN 2021-11-05 15:14:44,189 DIAGNOSTIC brian2.core.base: Created BrianObject with name CA3_inhtoCA3_pyCAN, clock=Clock(dt=100. * usecond, name='defaultclock'), when=start, order=0 2021-11-05 15:14:44,193 DIAGNOSTIC brian2.core.names: Created object of class SynapticPathway with name CA3_inhtoCA3_pyCAN_pre 2021-11-05 15:14:44,193 DIAGNOSTIC brian2.core.base: Created BrianObject with name CA3_inhtoCA3_pyCAN_pre, clock=Clock(dt=100. * usecond, name='defaultclock'), when=synapses, order=-1 2021-11-05 15:14:44,199 DEBUG brian2.synapses.synapses: Creating synapses from group 'CA3_inh' to group 'CA3_pyCAN', using generator '_k for _k in range(N_post) if (i!=_k) and rand()<0.75*exp(-((x_soma_pre-x_soma_post)**2+(y_soma_pre-y_soma_post)**2+(z_soma_pre-z_soma_post)**2)/(2*(350*umetre)**2))' 2021-11-05 15:14:44,200 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=CA3_inhtoCA3_pyCAN, template name=synapses_create_generator) for abstract code: Key setup_iterator: _iter_low = 0 _iter_high = N_post _iter_step = 1 Key create_j: _pre_idx = _raw_pre_idx _j = _k Key create_cond: _post_idx = _raw_post_idx _cond = (i != _k) and (rand() < (0.75 * exp((- ((((x_soma_pre - x_soma_post) ** 2) + ((y_soma_pre - y_soma_post) ** 2)) + ((z_soma_pre - z_soma_post) ** 2))) / (2 * ((350 * umetre) ** 2))))) Key update_post: _post_idx = _raw_post_idx _n = 1 2021-11-05 15:14:44,287 DIAGNOSTIC brian2.devices.device: CA3_inhtoCA3_pyCAN_synapses_create_generator_codeobject abstract code: Key setup_iterator: _iter_low = 0 _iter_high = N_post _iter_step = 1 Key create_j: _pre_idx = _raw_pre_idx _j = _k Key create_cond: _post_idx = _raw_post_idx _cond = (i != _k) and (rand() < (0.75 * exp((- ((((x_soma_pre - x_soma_post) ** 2) + ((y_soma_pre - y_soma_post) ** 2)) + ((z_soma_pre - z_soma_post) ** 2))) / (2 * ((350 * umetre) ** 2))))) Key update_post: _post_idx = _raw_post_idx _n = 1 2021-11-05 15:14:44,292 DIAGNOSTIC brian2.devices.device: CA3_inhtoCA3_pyCAN_synapses_create_generator_codeobject snippet (scalar): Key setup_iterator: Key create_j: Key create_cond: _lio_create_cond_1 = 0.5 / ((350.0 * umetre) ** 2) Key update_post: 2021-11-05 15:14:44,292 DIAGNOSTIC brian2.devices.device: CA3_inhtoCA3_pyCAN_synapses_create_generator_codeobject snippet (vector): Key setup_iterator: _iter_low = 0 _iter_high = N_post _iter_step = 1 Key create_j: _pre_idx = _raw_pre_idx _j = _k Key create_cond: y_soma_post = _array_CA3_pyCAN_y_soma[_raw_post_idx] y_soma_pre = _array_CA3_inh_y_soma[_raw_pre_idx] z_soma_pre = _array_CA3_inh_z_soma[_raw_pre_idx] x_soma_post = _array_CA3_pyCAN_x_soma[_raw_post_idx] x_soma_pre = _array_CA3_inh_x_soma[_raw_pre_idx] z_soma_post = _array_CA3_pyCAN_z_soma[_raw_post_idx] _post_idx = _raw_post_idx i = _i _cond = (i != _k) and (_rand(_vectorisation_idx) < (0.75 * exp(_lio_create_cond_1 * (- ((((x_soma_pre - x_soma_post) ** 2) + ((y_soma_pre - y_soma_post) ** 2)) + ((z_soma_pre - z_soma_post) ** 2)))))) Key update_post: _post_idx = _raw_post_idx _n = 1 2021-11-05 15:14:44,293 DIAGNOSTIC brian2.devices.device: CA3_inhtoCA3_pyCAN_synapses_create_generator_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code cdef int64_t *_namespace_rand_buffer cdef int32_t *_namespace_rand_buffer_index cdef double _rand(int _idx): cdef double **buffer_pointer = _namespace_rand_buffer cdef double *buffer = buffer_pointer[0] cdef _numpy.ndarray _new_rand if(_namespace_rand_buffer_index[0] == 0): if buffer != NULL: free(buffer) _new_rand = _numpy.random.rand(20000) buffer = _numpy.PyArray_DATA(_new_rand) PyArray_CLEARFLAGS(<_numpy.PyArrayObject*>_new_rand, _numpy.NPY_OWNDATA) buffer_pointer[0] = buffer cdef double val = buffer[_namespace_rand_buffer_index[0]] _namespace_rand_buffer_index[0] += 1 if _namespace_rand_buffer_index[0] == 20000: _namespace_rand_buffer_index[0] = 0 return val # template-specific support code cdef int _buffer_size = 1024 cdef int[:] _prebuf = _numpy.zeros(_buffer_size, dtype=_numpy.int32) cdef int[:] _postbuf = _numpy.zeros(_buffer_size, dtype=_numpy.int32) cdef int _curbuf = 0 cdef int _raw_pre_idx cdef int _raw_post_idx cdef void _flush_buffer(buf, dynarr, int buf_len): cdef size_t _curlen = dynarr.shape[0] cdef size_t _newlen = _curlen+buf_len # Resize the array dynarr.resize(_newlen) # Get the potentially newly created underlying data arrays data = dynarr.data data[_curlen:_curlen+buf_len] = buf[:buf_len] def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_inhtoCA3_pyCAN_N = _namespace['_array_CA3_inhtoCA3_pyCAN_N'] cdef int32_t * _array_CA3_inhtoCA3_pyCAN_N = _buf__array_CA3_inhtoCA3_pyCAN_N.data cdef int32_t N = _namespace["N"] _var_N_post = _namespace["_var_N_post"] cdef int64_t N_post = _namespace["N_post"] _var_N_pre = _namespace["_var_N_pre"] cdef int64_t N_pre = _namespace["N_pre"] cdef bool _cond cdef int32_t _i cdef int32_t _iter_high cdef int32_t _iter_low cdef int32_t _iter_step cdef int32_t _j cdef int32_t _k cdef int32_t _n cdef int32_t _post_idx cdef int32_t _pre_idx cdef int32_t _raw_post_idx cdef int32_t _raw_pre_idx _var__source_offset = _namespace["_var__source_offset"] cdef int64_t _source_offset = _namespace["_source_offset"] _var__synaptic_post = _namespace["_var__synaptic_post"] _dynamic_array_CA3_inhtoCA3_pyCAN__synaptic_post = _namespace["_dynamic_array_CA3_inhtoCA3_pyCAN__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_inhtoCA3_pyCAN__synaptic_post = _namespace['_array_CA3_inhtoCA3_pyCAN__synaptic_post'] cdef int32_t * _array_CA3_inhtoCA3_pyCAN__synaptic_post = _buf__array_CA3_inhtoCA3_pyCAN__synaptic_post.data cdef size_t _num_array_CA3_inhtoCA3_pyCAN__synaptic_post = len(_namespace['_array_CA3_inhtoCA3_pyCAN__synaptic_post']) cdef int32_t _synaptic_post _var__synaptic_pre = _namespace["_var__synaptic_pre"] _dynamic_array_CA3_inhtoCA3_pyCAN__synaptic_pre = _namespace["_dynamic_array_CA3_inhtoCA3_pyCAN__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_inhtoCA3_pyCAN__synaptic_pre = _namespace['_array_CA3_inhtoCA3_pyCAN__synaptic_pre'] cdef int32_t * _array_CA3_inhtoCA3_pyCAN__synaptic_pre = _buf__array_CA3_inhtoCA3_pyCAN__synaptic_pre.data cdef size_t _num_array_CA3_inhtoCA3_pyCAN__synaptic_pre = len(_namespace['_array_CA3_inhtoCA3_pyCAN__synaptic_pre']) cdef int32_t _synaptic_pre _var__target_offset = _namespace["_var__target_offset"] cdef int64_t _target_offset = _namespace["_target_offset"] cdef int32_t i # namespace for function rand global _namespace_rand_buffer global _namespace_num_rand_buffer cdef _numpy.ndarray[int64_t, ndim=1, mode='c'] _buf__rand_buffer = _namespace['_rand_buffer'] _namespace_rand_buffer = _buf__rand_buffer.data _namespace_num_rand_buffer = len(_namespace['_rand_buffer']) # namespace for function rand global _namespace_rand_buffer_index global _namespace_num_rand_buffer_index cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__rand_buffer_index = _namespace['_rand_buffer_index'] _namespace_rand_buffer_index = _buf__rand_buffer_index.data _namespace_num_rand_buffer_index = len(_namespace['_rand_buffer_index']) _var_umetre = _namespace["_var_umetre"] cdef double umetre = _namespace["umetre"] _var_x_soma_post = _namespace["_var_x_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_x_soma = _namespace['_array_CA3_pyCAN_x_soma'] cdef double * _array_CA3_pyCAN_x_soma = _buf__array_CA3_pyCAN_x_soma.data cdef size_t _num_array_CA3_pyCAN_x_soma = len(_namespace['_array_CA3_pyCAN_x_soma']) cdef double x_soma_post _var_x_soma_pre = _namespace["_var_x_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_inh_x_soma = _namespace['_array_CA3_inh_x_soma'] cdef double * _array_CA3_inh_x_soma = _buf__array_CA3_inh_x_soma.data cdef size_t _num_array_CA3_inh_x_soma = len(_namespace['_array_CA3_inh_x_soma']) cdef double x_soma_pre _var_y_soma_post = _namespace["_var_y_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_y_soma = _namespace['_array_CA3_pyCAN_y_soma'] cdef double * _array_CA3_pyCAN_y_soma = _buf__array_CA3_pyCAN_y_soma.data cdef size_t _num_array_CA3_pyCAN_y_soma = len(_namespace['_array_CA3_pyCAN_y_soma']) cdef double y_soma_post _var_y_soma_pre = _namespace["_var_y_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_inh_y_soma = _namespace['_array_CA3_inh_y_soma'] cdef double * _array_CA3_inh_y_soma = _buf__array_CA3_inh_y_soma.data cdef size_t _num_array_CA3_inh_y_soma = len(_namespace['_array_CA3_inh_y_soma']) cdef double y_soma_pre _var_z_soma_post = _namespace["_var_z_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_z_soma = _namespace['_array_CA3_pyCAN_z_soma'] cdef double * _array_CA3_pyCAN_z_soma = _buf__array_CA3_pyCAN_z_soma.data cdef size_t _num_array_CA3_pyCAN_z_soma = len(_namespace['_array_CA3_pyCAN_z_soma']) cdef double z_soma_post _var_z_soma_pre = _namespace["_var_z_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_inh_z_soma = _namespace['_array_CA3_inh_z_soma'] cdef double * _array_CA3_inh_z_soma = _buf__array_CA3_inh_z_soma.data cdef size_t _num_array_CA3_inh_z_soma = len(_namespace['_array_CA3_inh_z_soma']) cdef double z_soma_pre cdef double _lio_create_cond_1 if '_owner' in _namespace: _owner = _namespace['_owner'] cdef int* _prebuf_ptr = &(_prebuf[0]) cdef int* _postbuf_ptr = &(_postbuf[0]) global _curbuf cdef size_t oldsize = len(_dynamic_array_CA3_inhtoCA3_pyCAN__synaptic_pre) cdef size_t newsize # The following variables are only used for probabilistic connections cdef bool _jump_algo cdef double _log1p, _pconst cdef size_t _jump # scalar code _vectorisation_idx = 1 _lio_create_cond_1 = 0.5 / ((350.0 * umetre) ** 2) for _i in range(N_pre): _raw_pre_idx = _i + _source_offset _iter_low = 0 _iter_high = N_post _iter_step = 1 for _k in range(_iter_low, _iter_high, _iter_step): _pre_idx = _raw_pre_idx _j = _k _raw_post_idx = _j + _target_offset if _j<0 or _j>=N_post: raise IndexError("index j=%d outside allowed range from 0 to %d" % (_j, N_post-1)) y_soma_post = _array_CA3_pyCAN_y_soma[_raw_post_idx] y_soma_pre = _array_CA3_inh_y_soma[_raw_pre_idx] z_soma_pre = _array_CA3_inh_z_soma[_raw_pre_idx] x_soma_post = _array_CA3_pyCAN_x_soma[_raw_post_idx] x_soma_pre = _array_CA3_inh_x_soma[_raw_pre_idx] z_soma_post = _array_CA3_pyCAN_z_soma[_raw_post_idx] _post_idx = _raw_post_idx i = _i _cond = (i != _k) and (_rand(_vectorisation_idx) < (0.75 * exp(_lio_create_cond_1 * (- ((((x_soma_pre - x_soma_post) ** 2) + ((y_soma_pre - y_soma_post) ** 2)) + ((z_soma_pre - z_soma_post) ** 2)))))) if not _cond: continue _post_idx = _raw_post_idx _n = 1 for _repetition in range(_n): _prebuf_ptr[_curbuf] = _pre_idx _postbuf_ptr[_curbuf] = _post_idx _curbuf += 1 # Flush buffer if _curbuf==_buffer_size: _flush_buffer(_prebuf, _dynamic_array_CA3_inhtoCA3_pyCAN__synaptic_pre, _curbuf) _flush_buffer(_postbuf, _dynamic_array_CA3_inhtoCA3_pyCAN__synaptic_post, _curbuf) _curbuf = 0 # Final buffer flush _flush_buffer(_prebuf, _dynamic_array_CA3_inhtoCA3_pyCAN__synaptic_pre, _curbuf) _flush_buffer(_postbuf, _dynamic_array_CA3_inhtoCA3_pyCAN__synaptic_post, _curbuf) _curbuf = 0 # reset the buffer for the next run newsize = len(_dynamic_array_CA3_inhtoCA3_pyCAN__synaptic_pre) # now we need to resize all registered variables and set the total number # of synapse (via Python) _owner._resize(newsize) # And update N_incoming, N_outgoing and synapse_number _owner._update_synapse_numbers(oldsize) before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_inhtoCA3_pyCAN_N = _namespace['_array_CA3_inhtoCA3_pyCAN_N'] cdef int32_t * _array_CA3_inhtoCA3_pyCAN_N = _buf__array_CA3_inhtoCA3_pyCAN_N.data cdef int32_t N = _namespace["N"] _var_N_post = _namespace["_var_N_post"] cdef int64_t N_post = _namespace["N_post"] _var_N_pre = _namespace["_var_N_pre"] cdef int64_t N_pre = _namespace["N_pre"] cdef bool _cond cdef int32_t _i cdef int32_t _iter_high cdef int32_t _iter_low cdef int32_t _iter_step cdef int32_t _j cdef int32_t _k cdef int32_t _n cdef int32_t _post_idx cdef int32_t _pre_idx cdef int32_t _raw_post_idx cdef int32_t _raw_pre_idx _var__source_offset = _namespace["_var__source_offset"] cdef int64_t _source_offset = _namespace["_source_offset"] _var__synaptic_post = _namespace["_var__synaptic_post"] _dynamic_array_CA3_inhtoCA3_pyCAN__synaptic_post = _namespace["_dynamic_array_CA3_inhtoCA3_pyCAN__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_inhtoCA3_pyCAN__synaptic_post = _namespace['_array_CA3_inhtoCA3_pyCAN__synaptic_post'] cdef int32_t * _array_CA3_inhtoCA3_pyCAN__synaptic_post = _buf__array_CA3_inhtoCA3_pyCAN__synaptic_post.data cdef size_t _num_array_CA3_inhtoCA3_pyCAN__synaptic_post = len(_namespace['_array_CA3_inhtoCA3_pyCAN__synaptic_post']) cdef int32_t _synaptic_post _var__synaptic_pre = _namespace["_var__synaptic_pre"] _dynamic_array_CA3_inhtoCA3_pyCAN__synaptic_pre = _namespace["_dynamic_array_CA3_inhtoCA3_pyCAN__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_inhtoCA3_pyCAN__synaptic_pre = _namespace['_array_CA3_inhtoCA3_pyCAN__synaptic_pre'] cdef int32_t * _array_CA3_inhtoCA3_pyCAN__synaptic_pre = _buf__array_CA3_inhtoCA3_pyCAN__synaptic_pre.data cdef size_t _num_array_CA3_inhtoCA3_pyCAN__synaptic_pre = len(_namespace['_array_CA3_inhtoCA3_pyCAN__synaptic_pre']) cdef int32_t _synaptic_pre _var__target_offset = _namespace["_var__target_offset"] cdef int64_t _target_offset = _namespace["_target_offset"] cdef int32_t i # namespace for function rand global _namespace_rand_buffer global _namespace_num_rand_buffer cdef _numpy.ndarray[int64_t, ndim=1, mode='c'] _buf__rand_buffer = _namespace['_rand_buffer'] _namespace_rand_buffer = _buf__rand_buffer.data _namespace_num_rand_buffer = len(_namespace['_rand_buffer']) # namespace for function rand global _namespace_rand_buffer_index global _namespace_num_rand_buffer_index cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__rand_buffer_index = _namespace['_rand_buffer_index'] _namespace_rand_buffer_index = _buf__rand_buffer_index.data _namespace_num_rand_buffer_index = len(_namespace['_rand_buffer_index']) _var_umetre = _namespace["_var_umetre"] cdef double umetre = _namespace["umetre"] _var_x_soma_post = _namespace["_var_x_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_x_soma = _namespace['_array_CA3_pyCAN_x_soma'] cdef double * _array_CA3_pyCAN_x_soma = _buf__array_CA3_pyCAN_x_soma.data cdef size_t _num_array_CA3_pyCAN_x_soma = len(_namespace['_array_CA3_pyCAN_x_soma']) cdef double x_soma_post _var_x_soma_pre = _namespace["_var_x_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_inh_x_soma = _namespace['_array_CA3_inh_x_soma'] cdef double * _array_CA3_inh_x_soma = _buf__array_CA3_inh_x_soma.data cdef size_t _num_array_CA3_inh_x_soma = len(_namespace['_array_CA3_inh_x_soma']) cdef double x_soma_pre _var_y_soma_post = _namespace["_var_y_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_y_soma = _namespace['_array_CA3_pyCAN_y_soma'] cdef double * _array_CA3_pyCAN_y_soma = _buf__array_CA3_pyCAN_y_soma.data cdef size_t _num_array_CA3_pyCAN_y_soma = len(_namespace['_array_CA3_pyCAN_y_soma']) cdef double y_soma_post _var_y_soma_pre = _namespace["_var_y_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_inh_y_soma = _namespace['_array_CA3_inh_y_soma'] cdef double * _array_CA3_inh_y_soma = _buf__array_CA3_inh_y_soma.data cdef size_t _num_array_CA3_inh_y_soma = len(_namespace['_array_CA3_inh_y_soma']) cdef double y_soma_pre _var_z_soma_post = _namespace["_var_z_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_z_soma = _namespace['_array_CA3_pyCAN_z_soma'] cdef double * _array_CA3_pyCAN_z_soma = _buf__array_CA3_pyCAN_z_soma.data cdef size_t _num_array_CA3_pyCAN_z_soma = len(_namespace['_array_CA3_pyCAN_z_soma']) cdef double z_soma_post _var_z_soma_pre = _namespace["_var_z_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_inh_z_soma = _namespace['_array_CA3_inh_z_soma'] cdef double * _array_CA3_inh_z_soma = _buf__array_CA3_inh_z_soma.data cdef size_t _num_array_CA3_inh_z_soma = len(_namespace['_array_CA3_inh_z_soma']) cdef double z_soma_pre cdef double _lio_create_cond_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_inhtoCA3_pyCAN_N = _namespace['_array_CA3_inhtoCA3_pyCAN_N'] cdef int32_t * _array_CA3_inhtoCA3_pyCAN_N = _buf__array_CA3_inhtoCA3_pyCAN_N.data cdef int32_t N = _namespace["N"] _var_N_post = _namespace["_var_N_post"] cdef int64_t N_post = _namespace["N_post"] _var_N_pre = _namespace["_var_N_pre"] cdef int64_t N_pre = _namespace["N_pre"] cdef bool _cond cdef int32_t _i cdef int32_t _iter_high cdef int32_t _iter_low cdef int32_t _iter_step cdef int32_t _j cdef int32_t _k cdef int32_t _n cdef int32_t _post_idx cdef int32_t _pre_idx cdef int32_t _raw_post_idx cdef int32_t _raw_pre_idx _var__source_offset = _namespace["_var__source_offset"] cdef int64_t _source_offset = _namespace["_source_offset"] _var__synaptic_post = _namespace["_var__synaptic_post"] _dynamic_array_CA3_inhtoCA3_pyCAN__synaptic_post = _namespace["_dynamic_array_CA3_inhtoCA3_pyCAN__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_inhtoCA3_pyCAN__synaptic_post = _namespace['_array_CA3_inhtoCA3_pyCAN__synaptic_post'] cdef int32_t * _array_CA3_inhtoCA3_pyCAN__synaptic_post = _buf__array_CA3_inhtoCA3_pyCAN__synaptic_post.data cdef size_t _num_array_CA3_inhtoCA3_pyCAN__synaptic_post = len(_namespace['_array_CA3_inhtoCA3_pyCAN__synaptic_post']) cdef int32_t _synaptic_post _var__synaptic_pre = _namespace["_var__synaptic_pre"] _dynamic_array_CA3_inhtoCA3_pyCAN__synaptic_pre = _namespace["_dynamic_array_CA3_inhtoCA3_pyCAN__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_inhtoCA3_pyCAN__synaptic_pre = _namespace['_array_CA3_inhtoCA3_pyCAN__synaptic_pre'] cdef int32_t * _array_CA3_inhtoCA3_pyCAN__synaptic_pre = _buf__array_CA3_inhtoCA3_pyCAN__synaptic_pre.data cdef size_t _num_array_CA3_inhtoCA3_pyCAN__synaptic_pre = len(_namespace['_array_CA3_inhtoCA3_pyCAN__synaptic_pre']) cdef int32_t _synaptic_pre _var__target_offset = _namespace["_var__target_offset"] cdef int64_t _target_offset = _namespace["_target_offset"] cdef int32_t i # namespace for function rand global _namespace_rand_buffer global _namespace_num_rand_buffer cdef _numpy.ndarray[int64_t, ndim=1, mode='c'] _buf__rand_buffer = _namespace['_rand_buffer'] _namespace_rand_buffer = _buf__rand_buffer.data _namespace_num_rand_buffer = len(_namespace['_rand_buffer']) # namespace for function rand global _namespace_rand_buffer_index global _namespace_num_rand_buffer_index cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__rand_buffer_index = _namespace['_rand_buffer_index'] _namespace_rand_buffer_index = _buf__rand_buffer_index.data _namespace_num_rand_buffer_index = len(_namespace['_rand_buffer_index']) _var_umetre = _namespace["_var_umetre"] cdef double umetre = _namespace["umetre"] _var_x_soma_post = _namespace["_var_x_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_x_soma = _namespace['_array_CA3_pyCAN_x_soma'] cdef double * _array_CA3_pyCAN_x_soma = _buf__array_CA3_pyCAN_x_soma.data cdef size_t _num_array_CA3_pyCAN_x_soma = len(_namespace['_array_CA3_pyCAN_x_soma']) cdef double x_soma_post _var_x_soma_pre = _namespace["_var_x_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_inh_x_soma = _namespace['_array_CA3_inh_x_soma'] cdef double * _array_CA3_inh_x_soma = _buf__array_CA3_inh_x_soma.data cdef size_t _num_array_CA3_inh_x_soma = len(_namespace['_array_CA3_inh_x_soma']) cdef double x_soma_pre _var_y_soma_post = _namespace["_var_y_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_y_soma = _namespace['_array_CA3_pyCAN_y_soma'] cdef double * _array_CA3_pyCAN_y_soma = _buf__array_CA3_pyCAN_y_soma.data cdef size_t _num_array_CA3_pyCAN_y_soma = len(_namespace['_array_CA3_pyCAN_y_soma']) cdef double y_soma_post _var_y_soma_pre = _namespace["_var_y_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_inh_y_soma = _namespace['_array_CA3_inh_y_soma'] cdef double * _array_CA3_inh_y_soma = _buf__array_CA3_inh_y_soma.data cdef size_t _num_array_CA3_inh_y_soma = len(_namespace['_array_CA3_inh_y_soma']) cdef double y_soma_pre _var_z_soma_post = _namespace["_var_z_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_z_soma = _namespace['_array_CA3_pyCAN_z_soma'] cdef double * _array_CA3_pyCAN_z_soma = _buf__array_CA3_pyCAN_z_soma.data cdef size_t _num_array_CA3_pyCAN_z_soma = len(_namespace['_array_CA3_pyCAN_z_soma']) cdef double z_soma_post _var_z_soma_pre = _namespace["_var_z_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_inh_z_soma = _namespace['_array_CA3_inh_z_soma'] cdef double * _array_CA3_inh_z_soma = _buf__array_CA3_inh_z_soma.data cdef size_t _num_array_CA3_inh_z_soma = len(_namespace['_array_CA3_inh_z_soma']) cdef double z_soma_pre cdef double _lio_create_cond_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:14:44,293 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name CA3_inhtoCA3_pyCAN_synapses_create_generator_codeobject 2021-11-05 15:14:44,293 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "CA3_inhtoCA3_pyCAN_synapses_create_generator" using Cython module "_cython_magic_cdcf0e29d5039802a33e6c6304ad2157" 2021-11-05 15:14:44,293 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140606326285648 on /home/nikos/.cython/brian_extensions/_cython_magic_cdcf0e29d5039802a33e6c6304ad2157.lock 2021-11-05 15:14:44,293 DEBUG brian2.utils.filelock: Lock 140606326285648 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_cdcf0e29d5039802a33e6c6304ad2157.lock 2021-11-05 15:14:44,297 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140606326285648 on /home/nikos/.cython/brian_extensions/_cython_magic_cdcf0e29d5039802a33e6c6304ad2157.lock 2021-11-05 15:14:44,297 DEBUG brian2.utils.filelock: Lock 140606326285648 released on /home/nikos/.cython/brian_extensions/_cython_magic_cdcf0e29d5039802a33e6c6304ad2157.lock 2021-11-05 15:14:44,300 DIAGNOSTIC brian2.core.names: Created object of class Synapses with name CA1_pyCANtoCA1_inh 2021-11-05 15:14:44,301 DIAGNOSTIC brian2.core.base: Created BrianObject with name CA1_pyCANtoCA1_inh, clock=Clock(dt=100. * usecond, name='defaultclock'), when=start, order=0 2021-11-05 15:14:44,303 DIAGNOSTIC brian2.core.names: Created object of class SynapticPathway with name CA1_pyCANtoCA1_inh_pre 2021-11-05 15:14:44,303 DIAGNOSTIC brian2.core.base: Created BrianObject with name CA1_pyCANtoCA1_inh_pre, clock=Clock(dt=100. * usecond, name='defaultclock'), when=synapses, order=-1 2021-11-05 15:14:44,315 DEBUG brian2.synapses.synapses: Creating synapses from group 'CA1_pyCAN' to group 'CA1_inh', using generator '_k for _k in range(N_post) if (i!=_k) and rand()<0.28*exp(-((x_soma_pre-x_soma_post)**2+(y_soma_pre-y_soma_post)**2+(z_soma_pre-z_soma_post)**2)/(2*(2500*umetre)**2))' 2021-11-05 15:14:44,315 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=CA1_pyCANtoCA1_inh, template name=synapses_create_generator) for abstract code: Key setup_iterator: _iter_low = 0 _iter_high = N_post _iter_step = 1 Key create_j: _pre_idx = _raw_pre_idx _j = _k Key create_cond: _post_idx = _raw_post_idx _cond = (i != _k) and (rand() < (0.28 * exp((- ((((x_soma_pre - x_soma_post) ** 2) + ((y_soma_pre - y_soma_post) ** 2)) + ((z_soma_pre - z_soma_post) ** 2))) / (2 * ((2500 * umetre) ** 2))))) Key update_post: _post_idx = _raw_post_idx _n = 1 2021-11-05 15:14:44,369 DIAGNOSTIC brian2.devices.device: CA1_pyCANtoCA1_inh_synapses_create_generator_codeobject abstract code: Key setup_iterator: _iter_low = 0 _iter_high = N_post _iter_step = 1 Key create_j: _pre_idx = _raw_pre_idx _j = _k Key create_cond: _post_idx = _raw_post_idx _cond = (i != _k) and (rand() < (0.28 * exp((- ((((x_soma_pre - x_soma_post) ** 2) + ((y_soma_pre - y_soma_post) ** 2)) + ((z_soma_pre - z_soma_post) ** 2))) / (2 * ((2500 * umetre) ** 2))))) Key update_post: _post_idx = _raw_post_idx _n = 1 2021-11-05 15:14:44,373 DIAGNOSTIC brian2.devices.device: CA1_pyCANtoCA1_inh_synapses_create_generator_codeobject snippet (scalar): Key setup_iterator: Key create_j: Key create_cond: _lio_create_cond_1 = 0.5 / ((2500.0 * umetre) ** 2) Key update_post: 2021-11-05 15:14:44,374 DIAGNOSTIC brian2.devices.device: CA1_pyCANtoCA1_inh_synapses_create_generator_codeobject snippet (vector): Key setup_iterator: _iter_low = 0 _iter_high = N_post _iter_step = 1 Key create_j: _pre_idx = _raw_pre_idx _j = _k Key create_cond: y_soma_post = _array_CA1_inh_y_soma[_raw_post_idx] y_soma_pre = _array_CA1_pyCAN_y_soma[_raw_pre_idx] z_soma_pre = _array_CA1_pyCAN_z_soma[_raw_pre_idx] x_soma_post = _array_CA1_inh_x_soma[_raw_post_idx] x_soma_pre = _array_CA1_pyCAN_x_soma[_raw_pre_idx] z_soma_post = _array_CA1_inh_z_soma[_raw_post_idx] _post_idx = _raw_post_idx i = _i _cond = (i != _k) and (_rand(_vectorisation_idx) < (0.28 * exp(_lio_create_cond_1 * (- ((((x_soma_pre - x_soma_post) ** 2) + ((y_soma_pre - y_soma_post) ** 2)) + ((z_soma_pre - z_soma_post) ** 2)))))) Key update_post: _post_idx = _raw_post_idx _n = 1 2021-11-05 15:14:44,374 DIAGNOSTIC brian2.devices.device: CA1_pyCANtoCA1_inh_synapses_create_generator_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code cdef int64_t *_namespace_rand_buffer cdef int32_t *_namespace_rand_buffer_index cdef double _rand(int _idx): cdef double **buffer_pointer = _namespace_rand_buffer cdef double *buffer = buffer_pointer[0] cdef _numpy.ndarray _new_rand if(_namespace_rand_buffer_index[0] == 0): if buffer != NULL: free(buffer) _new_rand = _numpy.random.rand(20000) buffer = _numpy.PyArray_DATA(_new_rand) PyArray_CLEARFLAGS(<_numpy.PyArrayObject*>_new_rand, _numpy.NPY_OWNDATA) buffer_pointer[0] = buffer cdef double val = buffer[_namespace_rand_buffer_index[0]] _namespace_rand_buffer_index[0] += 1 if _namespace_rand_buffer_index[0] == 20000: _namespace_rand_buffer_index[0] = 0 return val # template-specific support code cdef int _buffer_size = 1024 cdef int[:] _prebuf = _numpy.zeros(_buffer_size, dtype=_numpy.int32) cdef int[:] _postbuf = _numpy.zeros(_buffer_size, dtype=_numpy.int32) cdef int _curbuf = 0 cdef int _raw_pre_idx cdef int _raw_post_idx cdef void _flush_buffer(buf, dynarr, int buf_len): cdef size_t _curlen = dynarr.shape[0] cdef size_t _newlen = _curlen+buf_len # Resize the array dynarr.resize(_newlen) # Get the potentially newly created underlying data arrays data = dynarr.data data[_curlen:_curlen+buf_len] = buf[:buf_len] def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_pyCANtoCA1_inh_N = _namespace['_array_CA1_pyCANtoCA1_inh_N'] cdef int32_t * _array_CA1_pyCANtoCA1_inh_N = _buf__array_CA1_pyCANtoCA1_inh_N.data cdef int32_t N = _namespace["N"] _var_N_post = _namespace["_var_N_post"] cdef int64_t N_post = _namespace["N_post"] _var_N_pre = _namespace["_var_N_pre"] cdef int64_t N_pre = _namespace["N_pre"] cdef bool _cond cdef int32_t _i cdef int32_t _iter_high cdef int32_t _iter_low cdef int32_t _iter_step cdef int32_t _j cdef int32_t _k cdef int32_t _n cdef int32_t _post_idx cdef int32_t _pre_idx cdef int32_t _raw_post_idx cdef int32_t _raw_pre_idx _var__source_offset = _namespace["_var__source_offset"] cdef int64_t _source_offset = _namespace["_source_offset"] _var__synaptic_post = _namespace["_var__synaptic_post"] _dynamic_array_CA1_pyCANtoCA1_inh__synaptic_post = _namespace["_dynamic_array_CA1_pyCANtoCA1_inh__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_pyCANtoCA1_inh__synaptic_post = _namespace['_array_CA1_pyCANtoCA1_inh__synaptic_post'] cdef int32_t * _array_CA1_pyCANtoCA1_inh__synaptic_post = _buf__array_CA1_pyCANtoCA1_inh__synaptic_post.data cdef size_t _num_array_CA1_pyCANtoCA1_inh__synaptic_post = len(_namespace['_array_CA1_pyCANtoCA1_inh__synaptic_post']) cdef int32_t _synaptic_post _var__synaptic_pre = _namespace["_var__synaptic_pre"] _dynamic_array_CA1_pyCANtoCA1_inh__synaptic_pre = _namespace["_dynamic_array_CA1_pyCANtoCA1_inh__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_pyCANtoCA1_inh__synaptic_pre = _namespace['_array_CA1_pyCANtoCA1_inh__synaptic_pre'] cdef int32_t * _array_CA1_pyCANtoCA1_inh__synaptic_pre = _buf__array_CA1_pyCANtoCA1_inh__synaptic_pre.data cdef size_t _num_array_CA1_pyCANtoCA1_inh__synaptic_pre = len(_namespace['_array_CA1_pyCANtoCA1_inh__synaptic_pre']) cdef int32_t _synaptic_pre _var__target_offset = _namespace["_var__target_offset"] cdef int64_t _target_offset = _namespace["_target_offset"] cdef int32_t i # namespace for function rand global _namespace_rand_buffer global _namespace_num_rand_buffer cdef _numpy.ndarray[int64_t, ndim=1, mode='c'] _buf__rand_buffer = _namespace['_rand_buffer'] _namespace_rand_buffer = _buf__rand_buffer.data _namespace_num_rand_buffer = len(_namespace['_rand_buffer']) # namespace for function rand global _namespace_rand_buffer_index global _namespace_num_rand_buffer_index cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__rand_buffer_index = _namespace['_rand_buffer_index'] _namespace_rand_buffer_index = _buf__rand_buffer_index.data _namespace_num_rand_buffer_index = len(_namespace['_rand_buffer_index']) _var_umetre = _namespace["_var_umetre"] cdef double umetre = _namespace["umetre"] _var_x_soma_post = _namespace["_var_x_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_x_soma = _namespace['_array_CA1_inh_x_soma'] cdef double * _array_CA1_inh_x_soma = _buf__array_CA1_inh_x_soma.data cdef size_t _num_array_CA1_inh_x_soma = len(_namespace['_array_CA1_inh_x_soma']) cdef double x_soma_post _var_x_soma_pre = _namespace["_var_x_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_x_soma = _namespace['_array_CA1_pyCAN_x_soma'] cdef double * _array_CA1_pyCAN_x_soma = _buf__array_CA1_pyCAN_x_soma.data cdef size_t _num_array_CA1_pyCAN_x_soma = len(_namespace['_array_CA1_pyCAN_x_soma']) cdef double x_soma_pre _var_y_soma_post = _namespace["_var_y_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_y_soma = _namespace['_array_CA1_inh_y_soma'] cdef double * _array_CA1_inh_y_soma = _buf__array_CA1_inh_y_soma.data cdef size_t _num_array_CA1_inh_y_soma = len(_namespace['_array_CA1_inh_y_soma']) cdef double y_soma_post _var_y_soma_pre = _namespace["_var_y_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_y_soma = _namespace['_array_CA1_pyCAN_y_soma'] cdef double * _array_CA1_pyCAN_y_soma = _buf__array_CA1_pyCAN_y_soma.data cdef size_t _num_array_CA1_pyCAN_y_soma = len(_namespace['_array_CA1_pyCAN_y_soma']) cdef double y_soma_pre _var_z_soma_post = _namespace["_var_z_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_z_soma = _namespace['_array_CA1_inh_z_soma'] cdef double * _array_CA1_inh_z_soma = _buf__array_CA1_inh_z_soma.data cdef size_t _num_array_CA1_inh_z_soma = len(_namespace['_array_CA1_inh_z_soma']) cdef double z_soma_post _var_z_soma_pre = _namespace["_var_z_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_z_soma = _namespace['_array_CA1_pyCAN_z_soma'] cdef double * _array_CA1_pyCAN_z_soma = _buf__array_CA1_pyCAN_z_soma.data cdef size_t _num_array_CA1_pyCAN_z_soma = len(_namespace['_array_CA1_pyCAN_z_soma']) cdef double z_soma_pre cdef double _lio_create_cond_1 if '_owner' in _namespace: _owner = _namespace['_owner'] cdef int* _prebuf_ptr = &(_prebuf[0]) cdef int* _postbuf_ptr = &(_postbuf[0]) global _curbuf cdef size_t oldsize = len(_dynamic_array_CA1_pyCANtoCA1_inh__synaptic_pre) cdef size_t newsize # The following variables are only used for probabilistic connections cdef bool _jump_algo cdef double _log1p, _pconst cdef size_t _jump # scalar code _vectorisation_idx = 1 _lio_create_cond_1 = 0.5 / ((2500.0 * umetre) ** 2) for _i in range(N_pre): _raw_pre_idx = _i + _source_offset _iter_low = 0 _iter_high = N_post _iter_step = 1 for _k in range(_iter_low, _iter_high, _iter_step): _pre_idx = _raw_pre_idx _j = _k _raw_post_idx = _j + _target_offset if _j<0 or _j>=N_post: raise IndexError("index j=%d outside allowed range from 0 to %d" % (_j, N_post-1)) y_soma_post = _array_CA1_inh_y_soma[_raw_post_idx] y_soma_pre = _array_CA1_pyCAN_y_soma[_raw_pre_idx] z_soma_pre = _array_CA1_pyCAN_z_soma[_raw_pre_idx] x_soma_post = _array_CA1_inh_x_soma[_raw_post_idx] x_soma_pre = _array_CA1_pyCAN_x_soma[_raw_pre_idx] z_soma_post = _array_CA1_inh_z_soma[_raw_post_idx] _post_idx = _raw_post_idx i = _i _cond = (i != _k) and (_rand(_vectorisation_idx) < (0.28 * exp(_lio_create_cond_1 * (- ((((x_soma_pre - x_soma_post) ** 2) + ((y_soma_pre - y_soma_post) ** 2)) + ((z_soma_pre - z_soma_post) ** 2)))))) if not _cond: continue _post_idx = _raw_post_idx _n = 1 for _repetition in range(_n): _prebuf_ptr[_curbuf] = _pre_idx _postbuf_ptr[_curbuf] = _post_idx _curbuf += 1 # Flush buffer if _curbuf==_buffer_size: _flush_buffer(_prebuf, _dynamic_array_CA1_pyCANtoCA1_inh__synaptic_pre, _curbuf) _flush_buffer(_postbuf, _dynamic_array_CA1_pyCANtoCA1_inh__synaptic_post, _curbuf) _curbuf = 0 # Final buffer flush _flush_buffer(_prebuf, _dynamic_array_CA1_pyCANtoCA1_inh__synaptic_pre, _curbuf) _flush_buffer(_postbuf, _dynamic_array_CA1_pyCANtoCA1_inh__synaptic_post, _curbuf) _curbuf = 0 # reset the buffer for the next run newsize = len(_dynamic_array_CA1_pyCANtoCA1_inh__synaptic_pre) # now we need to resize all registered variables and set the total number # of synapse (via Python) _owner._resize(newsize) # And update N_incoming, N_outgoing and synapse_number _owner._update_synapse_numbers(oldsize) before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_pyCANtoCA1_inh_N = _namespace['_array_CA1_pyCANtoCA1_inh_N'] cdef int32_t * _array_CA1_pyCANtoCA1_inh_N = _buf__array_CA1_pyCANtoCA1_inh_N.data cdef int32_t N = _namespace["N"] _var_N_post = _namespace["_var_N_post"] cdef int64_t N_post = _namespace["N_post"] _var_N_pre = _namespace["_var_N_pre"] cdef int64_t N_pre = _namespace["N_pre"] cdef bool _cond cdef int32_t _i cdef int32_t _iter_high cdef int32_t _iter_low cdef int32_t _iter_step cdef int32_t _j cdef int32_t _k cdef int32_t _n cdef int32_t _post_idx cdef int32_t _pre_idx cdef int32_t _raw_post_idx cdef int32_t _raw_pre_idx _var__source_offset = _namespace["_var__source_offset"] cdef int64_t _source_offset = _namespace["_source_offset"] _var__synaptic_post = _namespace["_var__synaptic_post"] _dynamic_array_CA1_pyCANtoCA1_inh__synaptic_post = _namespace["_dynamic_array_CA1_pyCANtoCA1_inh__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_pyCANtoCA1_inh__synaptic_post = _namespace['_array_CA1_pyCANtoCA1_inh__synaptic_post'] cdef int32_t * _array_CA1_pyCANtoCA1_inh__synaptic_post = _buf__array_CA1_pyCANtoCA1_inh__synaptic_post.data cdef size_t _num_array_CA1_pyCANtoCA1_inh__synaptic_post = len(_namespace['_array_CA1_pyCANtoCA1_inh__synaptic_post']) cdef int32_t _synaptic_post _var__synaptic_pre = _namespace["_var__synaptic_pre"] _dynamic_array_CA1_pyCANtoCA1_inh__synaptic_pre = _namespace["_dynamic_array_CA1_pyCANtoCA1_inh__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_pyCANtoCA1_inh__synaptic_pre = _namespace['_array_CA1_pyCANtoCA1_inh__synaptic_pre'] cdef int32_t * _array_CA1_pyCANtoCA1_inh__synaptic_pre = _buf__array_CA1_pyCANtoCA1_inh__synaptic_pre.data cdef size_t _num_array_CA1_pyCANtoCA1_inh__synaptic_pre = len(_namespace['_array_CA1_pyCANtoCA1_inh__synaptic_pre']) cdef int32_t _synaptic_pre _var__target_offset = _namespace["_var__target_offset"] cdef int64_t _target_offset = _namespace["_target_offset"] cdef int32_t i # namespace for function rand global _namespace_rand_buffer global _namespace_num_rand_buffer cdef _numpy.ndarray[int64_t, ndim=1, mode='c'] _buf__rand_buffer = _namespace['_rand_buffer'] _namespace_rand_buffer = _buf__rand_buffer.data _namespace_num_rand_buffer = len(_namespace['_rand_buffer']) # namespace for function rand global _namespace_rand_buffer_index global _namespace_num_rand_buffer_index cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__rand_buffer_index = _namespace['_rand_buffer_index'] _namespace_rand_buffer_index = _buf__rand_buffer_index.data _namespace_num_rand_buffer_index = len(_namespace['_rand_buffer_index']) _var_umetre = _namespace["_var_umetre"] cdef double umetre = _namespace["umetre"] _var_x_soma_post = _namespace["_var_x_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_x_soma = _namespace['_array_CA1_inh_x_soma'] cdef double * _array_CA1_inh_x_soma = _buf__array_CA1_inh_x_soma.data cdef size_t _num_array_CA1_inh_x_soma = len(_namespace['_array_CA1_inh_x_soma']) cdef double x_soma_post _var_x_soma_pre = _namespace["_var_x_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_x_soma = _namespace['_array_CA1_pyCAN_x_soma'] cdef double * _array_CA1_pyCAN_x_soma = _buf__array_CA1_pyCAN_x_soma.data cdef size_t _num_array_CA1_pyCAN_x_soma = len(_namespace['_array_CA1_pyCAN_x_soma']) cdef double x_soma_pre _var_y_soma_post = _namespace["_var_y_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_y_soma = _namespace['_array_CA1_inh_y_soma'] cdef double * _array_CA1_inh_y_soma = _buf__array_CA1_inh_y_soma.data cdef size_t _num_array_CA1_inh_y_soma = len(_namespace['_array_CA1_inh_y_soma']) cdef double y_soma_post _var_y_soma_pre = _namespace["_var_y_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_y_soma = _namespace['_array_CA1_pyCAN_y_soma'] cdef double * _array_CA1_pyCAN_y_soma = _buf__array_CA1_pyCAN_y_soma.data cdef size_t _num_array_CA1_pyCAN_y_soma = len(_namespace['_array_CA1_pyCAN_y_soma']) cdef double y_soma_pre _var_z_soma_post = _namespace["_var_z_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_z_soma = _namespace['_array_CA1_inh_z_soma'] cdef double * _array_CA1_inh_z_soma = _buf__array_CA1_inh_z_soma.data cdef size_t _num_array_CA1_inh_z_soma = len(_namespace['_array_CA1_inh_z_soma']) cdef double z_soma_post _var_z_soma_pre = _namespace["_var_z_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_z_soma = _namespace['_array_CA1_pyCAN_z_soma'] cdef double * _array_CA1_pyCAN_z_soma = _buf__array_CA1_pyCAN_z_soma.data cdef size_t _num_array_CA1_pyCAN_z_soma = len(_namespace['_array_CA1_pyCAN_z_soma']) cdef double z_soma_pre cdef double _lio_create_cond_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_pyCANtoCA1_inh_N = _namespace['_array_CA1_pyCANtoCA1_inh_N'] cdef int32_t * _array_CA1_pyCANtoCA1_inh_N = _buf__array_CA1_pyCANtoCA1_inh_N.data cdef int32_t N = _namespace["N"] _var_N_post = _namespace["_var_N_post"] cdef int64_t N_post = _namespace["N_post"] _var_N_pre = _namespace["_var_N_pre"] cdef int64_t N_pre = _namespace["N_pre"] cdef bool _cond cdef int32_t _i cdef int32_t _iter_high cdef int32_t _iter_low cdef int32_t _iter_step cdef int32_t _j cdef int32_t _k cdef int32_t _n cdef int32_t _post_idx cdef int32_t _pre_idx cdef int32_t _raw_post_idx cdef int32_t _raw_pre_idx _var__source_offset = _namespace["_var__source_offset"] cdef int64_t _source_offset = _namespace["_source_offset"] _var__synaptic_post = _namespace["_var__synaptic_post"] _dynamic_array_CA1_pyCANtoCA1_inh__synaptic_post = _namespace["_dynamic_array_CA1_pyCANtoCA1_inh__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_pyCANtoCA1_inh__synaptic_post = _namespace['_array_CA1_pyCANtoCA1_inh__synaptic_post'] cdef int32_t * _array_CA1_pyCANtoCA1_inh__synaptic_post = _buf__array_CA1_pyCANtoCA1_inh__synaptic_post.data cdef size_t _num_array_CA1_pyCANtoCA1_inh__synaptic_post = len(_namespace['_array_CA1_pyCANtoCA1_inh__synaptic_post']) cdef int32_t _synaptic_post _var__synaptic_pre = _namespace["_var__synaptic_pre"] _dynamic_array_CA1_pyCANtoCA1_inh__synaptic_pre = _namespace["_dynamic_array_CA1_pyCANtoCA1_inh__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_pyCANtoCA1_inh__synaptic_pre = _namespace['_array_CA1_pyCANtoCA1_inh__synaptic_pre'] cdef int32_t * _array_CA1_pyCANtoCA1_inh__synaptic_pre = _buf__array_CA1_pyCANtoCA1_inh__synaptic_pre.data cdef size_t _num_array_CA1_pyCANtoCA1_inh__synaptic_pre = len(_namespace['_array_CA1_pyCANtoCA1_inh__synaptic_pre']) cdef int32_t _synaptic_pre _var__target_offset = _namespace["_var__target_offset"] cdef int64_t _target_offset = _namespace["_target_offset"] cdef int32_t i # namespace for function rand global _namespace_rand_buffer global _namespace_num_rand_buffer cdef _numpy.ndarray[int64_t, ndim=1, mode='c'] _buf__rand_buffer = _namespace['_rand_buffer'] _namespace_rand_buffer = _buf__rand_buffer.data _namespace_num_rand_buffer = len(_namespace['_rand_buffer']) # namespace for function rand global _namespace_rand_buffer_index global _namespace_num_rand_buffer_index cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__rand_buffer_index = _namespace['_rand_buffer_index'] _namespace_rand_buffer_index = _buf__rand_buffer_index.data _namespace_num_rand_buffer_index = len(_namespace['_rand_buffer_index']) _var_umetre = _namespace["_var_umetre"] cdef double umetre = _namespace["umetre"] _var_x_soma_post = _namespace["_var_x_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_x_soma = _namespace['_array_CA1_inh_x_soma'] cdef double * _array_CA1_inh_x_soma = _buf__array_CA1_inh_x_soma.data cdef size_t _num_array_CA1_inh_x_soma = len(_namespace['_array_CA1_inh_x_soma']) cdef double x_soma_post _var_x_soma_pre = _namespace["_var_x_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_x_soma = _namespace['_array_CA1_pyCAN_x_soma'] cdef double * _array_CA1_pyCAN_x_soma = _buf__array_CA1_pyCAN_x_soma.data cdef size_t _num_array_CA1_pyCAN_x_soma = len(_namespace['_array_CA1_pyCAN_x_soma']) cdef double x_soma_pre _var_y_soma_post = _namespace["_var_y_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_y_soma = _namespace['_array_CA1_inh_y_soma'] cdef double * _array_CA1_inh_y_soma = _buf__array_CA1_inh_y_soma.data cdef size_t _num_array_CA1_inh_y_soma = len(_namespace['_array_CA1_inh_y_soma']) cdef double y_soma_post _var_y_soma_pre = _namespace["_var_y_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_y_soma = _namespace['_array_CA1_pyCAN_y_soma'] cdef double * _array_CA1_pyCAN_y_soma = _buf__array_CA1_pyCAN_y_soma.data cdef size_t _num_array_CA1_pyCAN_y_soma = len(_namespace['_array_CA1_pyCAN_y_soma']) cdef double y_soma_pre _var_z_soma_post = _namespace["_var_z_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_z_soma = _namespace['_array_CA1_inh_z_soma'] cdef double * _array_CA1_inh_z_soma = _buf__array_CA1_inh_z_soma.data cdef size_t _num_array_CA1_inh_z_soma = len(_namespace['_array_CA1_inh_z_soma']) cdef double z_soma_post _var_z_soma_pre = _namespace["_var_z_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_z_soma = _namespace['_array_CA1_pyCAN_z_soma'] cdef double * _array_CA1_pyCAN_z_soma = _buf__array_CA1_pyCAN_z_soma.data cdef size_t _num_array_CA1_pyCAN_z_soma = len(_namespace['_array_CA1_pyCAN_z_soma']) cdef double z_soma_pre cdef double _lio_create_cond_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:14:44,374 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name CA1_pyCANtoCA1_inh_synapses_create_generator_codeobject 2021-11-05 15:14:44,375 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "CA1_pyCANtoCA1_inh_synapses_create_generator" using Cython module "_cython_magic_d7684347cb6bc7b238030c7b5b1fbf7f" 2021-11-05 15:14:44,375 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140606326312576 on /home/nikos/.cython/brian_extensions/_cython_magic_d7684347cb6bc7b238030c7b5b1fbf7f.lock 2021-11-05 15:14:44,375 DEBUG brian2.utils.filelock: Lock 140606326312576 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_d7684347cb6bc7b238030c7b5b1fbf7f.lock 2021-11-05 15:14:44,379 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140606326312576 on /home/nikos/.cython/brian_extensions/_cython_magic_d7684347cb6bc7b238030c7b5b1fbf7f.lock 2021-11-05 15:14:44,379 DEBUG brian2.utils.filelock: Lock 140606326312576 released on /home/nikos/.cython/brian_extensions/_cython_magic_d7684347cb6bc7b238030c7b5b1fbf7f.lock 2021-11-05 15:14:44,636 DIAGNOSTIC brian2.core.names: Created object of class Synapses with name CA1_inhtoCA1_pyCAN 2021-11-05 15:14:44,636 DIAGNOSTIC brian2.core.base: Created BrianObject with name CA1_inhtoCA1_pyCAN, clock=Clock(dt=100. * usecond, name='defaultclock'), when=start, order=0 2021-11-05 15:14:44,639 DIAGNOSTIC brian2.core.names: Created object of class SynapticPathway with name CA1_inhtoCA1_pyCAN_pre 2021-11-05 15:14:44,639 DIAGNOSTIC brian2.core.base: Created BrianObject with name CA1_inhtoCA1_pyCAN_pre, clock=Clock(dt=100. * usecond, name='defaultclock'), when=synapses, order=-1 2021-11-05 15:14:44,653 DEBUG brian2.synapses.synapses: Creating synapses from group 'CA1_inh' to group 'CA1_pyCAN', using generator '_k for _k in range(N_post) if (i!=_k) and rand()<0.3*exp(-((x_soma_pre-x_soma_post)**2+(y_soma_pre-y_soma_post)**2+(z_soma_pre-z_soma_post)**2)/(2*(350*umetre)**2))' 2021-11-05 15:14:44,653 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=CA1_inhtoCA1_pyCAN, template name=synapses_create_generator) for abstract code: Key setup_iterator: _iter_low = 0 _iter_high = N_post _iter_step = 1 Key create_j: _pre_idx = _raw_pre_idx _j = _k Key create_cond: _post_idx = _raw_post_idx _cond = (i != _k) and (rand() < (0.3 * exp((- ((((x_soma_pre - x_soma_post) ** 2) + ((y_soma_pre - y_soma_post) ** 2)) + ((z_soma_pre - z_soma_post) ** 2))) / (2 * ((350 * umetre) ** 2))))) Key update_post: _post_idx = _raw_post_idx _n = 1 2021-11-05 15:14:44,712 DIAGNOSTIC brian2.devices.device: CA1_inhtoCA1_pyCAN_synapses_create_generator_codeobject abstract code: Key setup_iterator: _iter_low = 0 _iter_high = N_post _iter_step = 1 Key create_j: _pre_idx = _raw_pre_idx _j = _k Key create_cond: _post_idx = _raw_post_idx _cond = (i != _k) and (rand() < (0.3 * exp((- ((((x_soma_pre - x_soma_post) ** 2) + ((y_soma_pre - y_soma_post) ** 2)) + ((z_soma_pre - z_soma_post) ** 2))) / (2 * ((350 * umetre) ** 2))))) Key update_post: _post_idx = _raw_post_idx _n = 1 2021-11-05 15:14:44,716 DIAGNOSTIC brian2.devices.device: CA1_inhtoCA1_pyCAN_synapses_create_generator_codeobject snippet (scalar): Key setup_iterator: Key create_j: Key create_cond: _lio_create_cond_1 = 0.5 / ((350.0 * umetre) ** 2) Key update_post: 2021-11-05 15:14:44,716 DIAGNOSTIC brian2.devices.device: CA1_inhtoCA1_pyCAN_synapses_create_generator_codeobject snippet (vector): Key setup_iterator: _iter_low = 0 _iter_high = N_post _iter_step = 1 Key create_j: _pre_idx = _raw_pre_idx _j = _k Key create_cond: y_soma_post = _array_CA1_pyCAN_y_soma[_raw_post_idx] y_soma_pre = _array_CA1_inh_y_soma[_raw_pre_idx] z_soma_pre = _array_CA1_inh_z_soma[_raw_pre_idx] x_soma_post = _array_CA1_pyCAN_x_soma[_raw_post_idx] x_soma_pre = _array_CA1_inh_x_soma[_raw_pre_idx] z_soma_post = _array_CA1_pyCAN_z_soma[_raw_post_idx] _post_idx = _raw_post_idx i = _i _cond = (i != _k) and (_rand(_vectorisation_idx) < (0.3 * exp(_lio_create_cond_1 * (- ((((x_soma_pre - x_soma_post) ** 2) + ((y_soma_pre - y_soma_post) ** 2)) + ((z_soma_pre - z_soma_post) ** 2)))))) Key update_post: _post_idx = _raw_post_idx _n = 1 2021-11-05 15:14:44,716 DIAGNOSTIC brian2.devices.device: CA1_inhtoCA1_pyCAN_synapses_create_generator_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code cdef int64_t *_namespace_rand_buffer cdef int32_t *_namespace_rand_buffer_index cdef double _rand(int _idx): cdef double **buffer_pointer = _namespace_rand_buffer cdef double *buffer = buffer_pointer[0] cdef _numpy.ndarray _new_rand if(_namespace_rand_buffer_index[0] == 0): if buffer != NULL: free(buffer) _new_rand = _numpy.random.rand(20000) buffer = _numpy.PyArray_DATA(_new_rand) PyArray_CLEARFLAGS(<_numpy.PyArrayObject*>_new_rand, _numpy.NPY_OWNDATA) buffer_pointer[0] = buffer cdef double val = buffer[_namespace_rand_buffer_index[0]] _namespace_rand_buffer_index[0] += 1 if _namespace_rand_buffer_index[0] == 20000: _namespace_rand_buffer_index[0] = 0 return val # template-specific support code cdef int _buffer_size = 1024 cdef int[:] _prebuf = _numpy.zeros(_buffer_size, dtype=_numpy.int32) cdef int[:] _postbuf = _numpy.zeros(_buffer_size, dtype=_numpy.int32) cdef int _curbuf = 0 cdef int _raw_pre_idx cdef int _raw_post_idx cdef void _flush_buffer(buf, dynarr, int buf_len): cdef size_t _curlen = dynarr.shape[0] cdef size_t _newlen = _curlen+buf_len # Resize the array dynarr.resize(_newlen) # Get the potentially newly created underlying data arrays data = dynarr.data data[_curlen:_curlen+buf_len] = buf[:buf_len] def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_inhtoCA1_pyCAN_N = _namespace['_array_CA1_inhtoCA1_pyCAN_N'] cdef int32_t * _array_CA1_inhtoCA1_pyCAN_N = _buf__array_CA1_inhtoCA1_pyCAN_N.data cdef int32_t N = _namespace["N"] _var_N_post = _namespace["_var_N_post"] cdef int64_t N_post = _namespace["N_post"] _var_N_pre = _namespace["_var_N_pre"] cdef int64_t N_pre = _namespace["N_pre"] cdef bool _cond cdef int32_t _i cdef int32_t _iter_high cdef int32_t _iter_low cdef int32_t _iter_step cdef int32_t _j cdef int32_t _k cdef int32_t _n cdef int32_t _post_idx cdef int32_t _pre_idx cdef int32_t _raw_post_idx cdef int32_t _raw_pre_idx _var__source_offset = _namespace["_var__source_offset"] cdef int64_t _source_offset = _namespace["_source_offset"] _var__synaptic_post = _namespace["_var__synaptic_post"] _dynamic_array_CA1_inhtoCA1_pyCAN__synaptic_post = _namespace["_dynamic_array_CA1_inhtoCA1_pyCAN__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_inhtoCA1_pyCAN__synaptic_post = _namespace['_array_CA1_inhtoCA1_pyCAN__synaptic_post'] cdef int32_t * _array_CA1_inhtoCA1_pyCAN__synaptic_post = _buf__array_CA1_inhtoCA1_pyCAN__synaptic_post.data cdef size_t _num_array_CA1_inhtoCA1_pyCAN__synaptic_post = len(_namespace['_array_CA1_inhtoCA1_pyCAN__synaptic_post']) cdef int32_t _synaptic_post _var__synaptic_pre = _namespace["_var__synaptic_pre"] _dynamic_array_CA1_inhtoCA1_pyCAN__synaptic_pre = _namespace["_dynamic_array_CA1_inhtoCA1_pyCAN__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_inhtoCA1_pyCAN__synaptic_pre = _namespace['_array_CA1_inhtoCA1_pyCAN__synaptic_pre'] cdef int32_t * _array_CA1_inhtoCA1_pyCAN__synaptic_pre = _buf__array_CA1_inhtoCA1_pyCAN__synaptic_pre.data cdef size_t _num_array_CA1_inhtoCA1_pyCAN__synaptic_pre = len(_namespace['_array_CA1_inhtoCA1_pyCAN__synaptic_pre']) cdef int32_t _synaptic_pre _var__target_offset = _namespace["_var__target_offset"] cdef int64_t _target_offset = _namespace["_target_offset"] cdef int32_t i # namespace for function rand global _namespace_rand_buffer global _namespace_num_rand_buffer cdef _numpy.ndarray[int64_t, ndim=1, mode='c'] _buf__rand_buffer = _namespace['_rand_buffer'] _namespace_rand_buffer = _buf__rand_buffer.data _namespace_num_rand_buffer = len(_namespace['_rand_buffer']) # namespace for function rand global _namespace_rand_buffer_index global _namespace_num_rand_buffer_index cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__rand_buffer_index = _namespace['_rand_buffer_index'] _namespace_rand_buffer_index = _buf__rand_buffer_index.data _namespace_num_rand_buffer_index = len(_namespace['_rand_buffer_index']) _var_umetre = _namespace["_var_umetre"] cdef double umetre = _namespace["umetre"] _var_x_soma_post = _namespace["_var_x_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_x_soma = _namespace['_array_CA1_pyCAN_x_soma'] cdef double * _array_CA1_pyCAN_x_soma = _buf__array_CA1_pyCAN_x_soma.data cdef size_t _num_array_CA1_pyCAN_x_soma = len(_namespace['_array_CA1_pyCAN_x_soma']) cdef double x_soma_post _var_x_soma_pre = _namespace["_var_x_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_x_soma = _namespace['_array_CA1_inh_x_soma'] cdef double * _array_CA1_inh_x_soma = _buf__array_CA1_inh_x_soma.data cdef size_t _num_array_CA1_inh_x_soma = len(_namespace['_array_CA1_inh_x_soma']) cdef double x_soma_pre _var_y_soma_post = _namespace["_var_y_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_y_soma = _namespace['_array_CA1_pyCAN_y_soma'] cdef double * _array_CA1_pyCAN_y_soma = _buf__array_CA1_pyCAN_y_soma.data cdef size_t _num_array_CA1_pyCAN_y_soma = len(_namespace['_array_CA1_pyCAN_y_soma']) cdef double y_soma_post _var_y_soma_pre = _namespace["_var_y_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_y_soma = _namespace['_array_CA1_inh_y_soma'] cdef double * _array_CA1_inh_y_soma = _buf__array_CA1_inh_y_soma.data cdef size_t _num_array_CA1_inh_y_soma = len(_namespace['_array_CA1_inh_y_soma']) cdef double y_soma_pre _var_z_soma_post = _namespace["_var_z_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_z_soma = _namespace['_array_CA1_pyCAN_z_soma'] cdef double * _array_CA1_pyCAN_z_soma = _buf__array_CA1_pyCAN_z_soma.data cdef size_t _num_array_CA1_pyCAN_z_soma = len(_namespace['_array_CA1_pyCAN_z_soma']) cdef double z_soma_post _var_z_soma_pre = _namespace["_var_z_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_z_soma = _namespace['_array_CA1_inh_z_soma'] cdef double * _array_CA1_inh_z_soma = _buf__array_CA1_inh_z_soma.data cdef size_t _num_array_CA1_inh_z_soma = len(_namespace['_array_CA1_inh_z_soma']) cdef double z_soma_pre cdef double _lio_create_cond_1 if '_owner' in _namespace: _owner = _namespace['_owner'] cdef int* _prebuf_ptr = &(_prebuf[0]) cdef int* _postbuf_ptr = &(_postbuf[0]) global _curbuf cdef size_t oldsize = len(_dynamic_array_CA1_inhtoCA1_pyCAN__synaptic_pre) cdef size_t newsize # The following variables are only used for probabilistic connections cdef bool _jump_algo cdef double _log1p, _pconst cdef size_t _jump # scalar code _vectorisation_idx = 1 _lio_create_cond_1 = 0.5 / ((350.0 * umetre) ** 2) for _i in range(N_pre): _raw_pre_idx = _i + _source_offset _iter_low = 0 _iter_high = N_post _iter_step = 1 for _k in range(_iter_low, _iter_high, _iter_step): _pre_idx = _raw_pre_idx _j = _k _raw_post_idx = _j + _target_offset if _j<0 or _j>=N_post: raise IndexError("index j=%d outside allowed range from 0 to %d" % (_j, N_post-1)) y_soma_post = _array_CA1_pyCAN_y_soma[_raw_post_idx] y_soma_pre = _array_CA1_inh_y_soma[_raw_pre_idx] z_soma_pre = _array_CA1_inh_z_soma[_raw_pre_idx] x_soma_post = _array_CA1_pyCAN_x_soma[_raw_post_idx] x_soma_pre = _array_CA1_inh_x_soma[_raw_pre_idx] z_soma_post = _array_CA1_pyCAN_z_soma[_raw_post_idx] _post_idx = _raw_post_idx i = _i _cond = (i != _k) and (_rand(_vectorisation_idx) < (0.3 * exp(_lio_create_cond_1 * (- ((((x_soma_pre - x_soma_post) ** 2) + ((y_soma_pre - y_soma_post) ** 2)) + ((z_soma_pre - z_soma_post) ** 2)))))) if not _cond: continue _post_idx = _raw_post_idx _n = 1 for _repetition in range(_n): _prebuf_ptr[_curbuf] = _pre_idx _postbuf_ptr[_curbuf] = _post_idx _curbuf += 1 # Flush buffer if _curbuf==_buffer_size: _flush_buffer(_prebuf, _dynamic_array_CA1_inhtoCA1_pyCAN__synaptic_pre, _curbuf) _flush_buffer(_postbuf, _dynamic_array_CA1_inhtoCA1_pyCAN__synaptic_post, _curbuf) _curbuf = 0 # Final buffer flush _flush_buffer(_prebuf, _dynamic_array_CA1_inhtoCA1_pyCAN__synaptic_pre, _curbuf) _flush_buffer(_postbuf, _dynamic_array_CA1_inhtoCA1_pyCAN__synaptic_post, _curbuf) _curbuf = 0 # reset the buffer for the next run newsize = len(_dynamic_array_CA1_inhtoCA1_pyCAN__synaptic_pre) # now we need to resize all registered variables and set the total number # of synapse (via Python) _owner._resize(newsize) # And update N_incoming, N_outgoing and synapse_number _owner._update_synapse_numbers(oldsize) before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_inhtoCA1_pyCAN_N = _namespace['_array_CA1_inhtoCA1_pyCAN_N'] cdef int32_t * _array_CA1_inhtoCA1_pyCAN_N = _buf__array_CA1_inhtoCA1_pyCAN_N.data cdef int32_t N = _namespace["N"] _var_N_post = _namespace["_var_N_post"] cdef int64_t N_post = _namespace["N_post"] _var_N_pre = _namespace["_var_N_pre"] cdef int64_t N_pre = _namespace["N_pre"] cdef bool _cond cdef int32_t _i cdef int32_t _iter_high cdef int32_t _iter_low cdef int32_t _iter_step cdef int32_t _j cdef int32_t _k cdef int32_t _n cdef int32_t _post_idx cdef int32_t _pre_idx cdef int32_t _raw_post_idx cdef int32_t _raw_pre_idx _var__source_offset = _namespace["_var__source_offset"] cdef int64_t _source_offset = _namespace["_source_offset"] _var__synaptic_post = _namespace["_var__synaptic_post"] _dynamic_array_CA1_inhtoCA1_pyCAN__synaptic_post = _namespace["_dynamic_array_CA1_inhtoCA1_pyCAN__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_inhtoCA1_pyCAN__synaptic_post = _namespace['_array_CA1_inhtoCA1_pyCAN__synaptic_post'] cdef int32_t * _array_CA1_inhtoCA1_pyCAN__synaptic_post = _buf__array_CA1_inhtoCA1_pyCAN__synaptic_post.data cdef size_t _num_array_CA1_inhtoCA1_pyCAN__synaptic_post = len(_namespace['_array_CA1_inhtoCA1_pyCAN__synaptic_post']) cdef int32_t _synaptic_post _var__synaptic_pre = _namespace["_var__synaptic_pre"] _dynamic_array_CA1_inhtoCA1_pyCAN__synaptic_pre = _namespace["_dynamic_array_CA1_inhtoCA1_pyCAN__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_inhtoCA1_pyCAN__synaptic_pre = _namespace['_array_CA1_inhtoCA1_pyCAN__synaptic_pre'] cdef int32_t * _array_CA1_inhtoCA1_pyCAN__synaptic_pre = _buf__array_CA1_inhtoCA1_pyCAN__synaptic_pre.data cdef size_t _num_array_CA1_inhtoCA1_pyCAN__synaptic_pre = len(_namespace['_array_CA1_inhtoCA1_pyCAN__synaptic_pre']) cdef int32_t _synaptic_pre _var__target_offset = _namespace["_var__target_offset"] cdef int64_t _target_offset = _namespace["_target_offset"] cdef int32_t i # namespace for function rand global _namespace_rand_buffer global _namespace_num_rand_buffer cdef _numpy.ndarray[int64_t, ndim=1, mode='c'] _buf__rand_buffer = _namespace['_rand_buffer'] _namespace_rand_buffer = _buf__rand_buffer.data _namespace_num_rand_buffer = len(_namespace['_rand_buffer']) # namespace for function rand global _namespace_rand_buffer_index global _namespace_num_rand_buffer_index cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__rand_buffer_index = _namespace['_rand_buffer_index'] _namespace_rand_buffer_index = _buf__rand_buffer_index.data _namespace_num_rand_buffer_index = len(_namespace['_rand_buffer_index']) _var_umetre = _namespace["_var_umetre"] cdef double umetre = _namespace["umetre"] _var_x_soma_post = _namespace["_var_x_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_x_soma = _namespace['_array_CA1_pyCAN_x_soma'] cdef double * _array_CA1_pyCAN_x_soma = _buf__array_CA1_pyCAN_x_soma.data cdef size_t _num_array_CA1_pyCAN_x_soma = len(_namespace['_array_CA1_pyCAN_x_soma']) cdef double x_soma_post _var_x_soma_pre = _namespace["_var_x_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_x_soma = _namespace['_array_CA1_inh_x_soma'] cdef double * _array_CA1_inh_x_soma = _buf__array_CA1_inh_x_soma.data cdef size_t _num_array_CA1_inh_x_soma = len(_namespace['_array_CA1_inh_x_soma']) cdef double x_soma_pre _var_y_soma_post = _namespace["_var_y_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_y_soma = _namespace['_array_CA1_pyCAN_y_soma'] cdef double * _array_CA1_pyCAN_y_soma = _buf__array_CA1_pyCAN_y_soma.data cdef size_t _num_array_CA1_pyCAN_y_soma = len(_namespace['_array_CA1_pyCAN_y_soma']) cdef double y_soma_post _var_y_soma_pre = _namespace["_var_y_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_y_soma = _namespace['_array_CA1_inh_y_soma'] cdef double * _array_CA1_inh_y_soma = _buf__array_CA1_inh_y_soma.data cdef size_t _num_array_CA1_inh_y_soma = len(_namespace['_array_CA1_inh_y_soma']) cdef double y_soma_pre _var_z_soma_post = _namespace["_var_z_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_z_soma = _namespace['_array_CA1_pyCAN_z_soma'] cdef double * _array_CA1_pyCAN_z_soma = _buf__array_CA1_pyCAN_z_soma.data cdef size_t _num_array_CA1_pyCAN_z_soma = len(_namespace['_array_CA1_pyCAN_z_soma']) cdef double z_soma_post _var_z_soma_pre = _namespace["_var_z_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_z_soma = _namespace['_array_CA1_inh_z_soma'] cdef double * _array_CA1_inh_z_soma = _buf__array_CA1_inh_z_soma.data cdef size_t _num_array_CA1_inh_z_soma = len(_namespace['_array_CA1_inh_z_soma']) cdef double z_soma_pre cdef double _lio_create_cond_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_inhtoCA1_pyCAN_N = _namespace['_array_CA1_inhtoCA1_pyCAN_N'] cdef int32_t * _array_CA1_inhtoCA1_pyCAN_N = _buf__array_CA1_inhtoCA1_pyCAN_N.data cdef int32_t N = _namespace["N"] _var_N_post = _namespace["_var_N_post"] cdef int64_t N_post = _namespace["N_post"] _var_N_pre = _namespace["_var_N_pre"] cdef int64_t N_pre = _namespace["N_pre"] cdef bool _cond cdef int32_t _i cdef int32_t _iter_high cdef int32_t _iter_low cdef int32_t _iter_step cdef int32_t _j cdef int32_t _k cdef int32_t _n cdef int32_t _post_idx cdef int32_t _pre_idx cdef int32_t _raw_post_idx cdef int32_t _raw_pre_idx _var__source_offset = _namespace["_var__source_offset"] cdef int64_t _source_offset = _namespace["_source_offset"] _var__synaptic_post = _namespace["_var__synaptic_post"] _dynamic_array_CA1_inhtoCA1_pyCAN__synaptic_post = _namespace["_dynamic_array_CA1_inhtoCA1_pyCAN__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_inhtoCA1_pyCAN__synaptic_post = _namespace['_array_CA1_inhtoCA1_pyCAN__synaptic_post'] cdef int32_t * _array_CA1_inhtoCA1_pyCAN__synaptic_post = _buf__array_CA1_inhtoCA1_pyCAN__synaptic_post.data cdef size_t _num_array_CA1_inhtoCA1_pyCAN__synaptic_post = len(_namespace['_array_CA1_inhtoCA1_pyCAN__synaptic_post']) cdef int32_t _synaptic_post _var__synaptic_pre = _namespace["_var__synaptic_pre"] _dynamic_array_CA1_inhtoCA1_pyCAN__synaptic_pre = _namespace["_dynamic_array_CA1_inhtoCA1_pyCAN__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_inhtoCA1_pyCAN__synaptic_pre = _namespace['_array_CA1_inhtoCA1_pyCAN__synaptic_pre'] cdef int32_t * _array_CA1_inhtoCA1_pyCAN__synaptic_pre = _buf__array_CA1_inhtoCA1_pyCAN__synaptic_pre.data cdef size_t _num_array_CA1_inhtoCA1_pyCAN__synaptic_pre = len(_namespace['_array_CA1_inhtoCA1_pyCAN__synaptic_pre']) cdef int32_t _synaptic_pre _var__target_offset = _namespace["_var__target_offset"] cdef int64_t _target_offset = _namespace["_target_offset"] cdef int32_t i # namespace for function rand global _namespace_rand_buffer global _namespace_num_rand_buffer cdef _numpy.ndarray[int64_t, ndim=1, mode='c'] _buf__rand_buffer = _namespace['_rand_buffer'] _namespace_rand_buffer = _buf__rand_buffer.data _namespace_num_rand_buffer = len(_namespace['_rand_buffer']) # namespace for function rand global _namespace_rand_buffer_index global _namespace_num_rand_buffer_index cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__rand_buffer_index = _namespace['_rand_buffer_index'] _namespace_rand_buffer_index = _buf__rand_buffer_index.data _namespace_num_rand_buffer_index = len(_namespace['_rand_buffer_index']) _var_umetre = _namespace["_var_umetre"] cdef double umetre = _namespace["umetre"] _var_x_soma_post = _namespace["_var_x_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_x_soma = _namespace['_array_CA1_pyCAN_x_soma'] cdef double * _array_CA1_pyCAN_x_soma = _buf__array_CA1_pyCAN_x_soma.data cdef size_t _num_array_CA1_pyCAN_x_soma = len(_namespace['_array_CA1_pyCAN_x_soma']) cdef double x_soma_post _var_x_soma_pre = _namespace["_var_x_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_x_soma = _namespace['_array_CA1_inh_x_soma'] cdef double * _array_CA1_inh_x_soma = _buf__array_CA1_inh_x_soma.data cdef size_t _num_array_CA1_inh_x_soma = len(_namespace['_array_CA1_inh_x_soma']) cdef double x_soma_pre _var_y_soma_post = _namespace["_var_y_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_y_soma = _namespace['_array_CA1_pyCAN_y_soma'] cdef double * _array_CA1_pyCAN_y_soma = _buf__array_CA1_pyCAN_y_soma.data cdef size_t _num_array_CA1_pyCAN_y_soma = len(_namespace['_array_CA1_pyCAN_y_soma']) cdef double y_soma_post _var_y_soma_pre = _namespace["_var_y_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_y_soma = _namespace['_array_CA1_inh_y_soma'] cdef double * _array_CA1_inh_y_soma = _buf__array_CA1_inh_y_soma.data cdef size_t _num_array_CA1_inh_y_soma = len(_namespace['_array_CA1_inh_y_soma']) cdef double y_soma_pre _var_z_soma_post = _namespace["_var_z_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_z_soma = _namespace['_array_CA1_pyCAN_z_soma'] cdef double * _array_CA1_pyCAN_z_soma = _buf__array_CA1_pyCAN_z_soma.data cdef size_t _num_array_CA1_pyCAN_z_soma = len(_namespace['_array_CA1_pyCAN_z_soma']) cdef double z_soma_post _var_z_soma_pre = _namespace["_var_z_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_z_soma = _namespace['_array_CA1_inh_z_soma'] cdef double * _array_CA1_inh_z_soma = _buf__array_CA1_inh_z_soma.data cdef size_t _num_array_CA1_inh_z_soma = len(_namespace['_array_CA1_inh_z_soma']) cdef double z_soma_pre cdef double _lio_create_cond_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:14:44,717 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name CA1_inhtoCA1_pyCAN_synapses_create_generator_codeobject 2021-11-05 15:14:44,717 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "CA1_inhtoCA1_pyCAN_synapses_create_generator" using Cython module "_cython_magic_98d44ad64a6ba9d5064aa31dbc25289a" 2021-11-05 15:14:44,717 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140606326007936 on /home/nikos/.cython/brian_extensions/_cython_magic_98d44ad64a6ba9d5064aa31dbc25289a.lock 2021-11-05 15:14:44,717 DEBUG brian2.utils.filelock: Lock 140606326007936 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_98d44ad64a6ba9d5064aa31dbc25289a.lock 2021-11-05 15:14:44,721 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140606326007936 on /home/nikos/.cython/brian_extensions/_cython_magic_98d44ad64a6ba9d5064aa31dbc25289a.lock 2021-11-05 15:14:44,721 DEBUG brian2.utils.filelock: Lock 140606326007936 released on /home/nikos/.cython/brian_extensions/_cython_magic_98d44ad64a6ba9d5064aa31dbc25289a.lock 2021-11-05 15:14:44,990 DIAGNOSTIC brian2.core.names: Created object of class Synapses with name CA1_inhtoCA1_inh 2021-11-05 15:14:44,991 DIAGNOSTIC brian2.core.base: Created BrianObject with name CA1_inhtoCA1_inh, clock=Clock(dt=100. * usecond, name='defaultclock'), when=start, order=0 2021-11-05 15:14:44,993 DIAGNOSTIC brian2.core.names: Created object of class SynapticPathway with name CA1_inhtoCA1_inh_pre 2021-11-05 15:14:44,993 DIAGNOSTIC brian2.core.base: Created BrianObject with name CA1_inhtoCA1_inh_pre, clock=Clock(dt=100. * usecond, name='defaultclock'), when=synapses, order=-1 2021-11-05 15:14:44,997 DEBUG brian2.synapses.synapses: Creating synapses from group 'CA1_inh' to group 'CA1_inh', using generator '_k for _k in range(N_post) if (i!=_k) and rand()<0.7*exp(-((x_soma_pre-x_soma_post)**2+(y_soma_pre-y_soma_post)**2+(z_soma_pre-z_soma_post)**2)/(2*(350*umetre)**2))' 2021-11-05 15:14:44,997 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=CA1_inhtoCA1_inh, template name=synapses_create_generator) for abstract code: Key setup_iterator: _iter_low = 0 _iter_high = N_post _iter_step = 1 Key create_j: _pre_idx = _raw_pre_idx _j = _k Key create_cond: _post_idx = _raw_post_idx _cond = (i != _k) and (rand() < (0.7 * exp((- ((((x_soma_pre - x_soma_post) ** 2) + ((y_soma_pre - y_soma_post) ** 2)) + ((z_soma_pre - z_soma_post) ** 2))) / (2 * ((350 * umetre) ** 2))))) Key update_post: _post_idx = _raw_post_idx _n = 1 2021-11-05 15:14:45,047 DIAGNOSTIC brian2.devices.device: CA1_inhtoCA1_inh_synapses_create_generator_codeobject abstract code: Key setup_iterator: _iter_low = 0 _iter_high = N_post _iter_step = 1 Key create_j: _pre_idx = _raw_pre_idx _j = _k Key create_cond: _post_idx = _raw_post_idx _cond = (i != _k) and (rand() < (0.7 * exp((- ((((x_soma_pre - x_soma_post) ** 2) + ((y_soma_pre - y_soma_post) ** 2)) + ((z_soma_pre - z_soma_post) ** 2))) / (2 * ((350 * umetre) ** 2))))) Key update_post: _post_idx = _raw_post_idx _n = 1 2021-11-05 15:14:45,051 DIAGNOSTIC brian2.devices.device: CA1_inhtoCA1_inh_synapses_create_generator_codeobject snippet (scalar): Key setup_iterator: Key create_j: Key create_cond: _lio_create_cond_1 = 0.5 / ((350.0 * umetre) ** 2) Key update_post: 2021-11-05 15:14:45,051 DIAGNOSTIC brian2.devices.device: CA1_inhtoCA1_inh_synapses_create_generator_codeobject snippet (vector): Key setup_iterator: _iter_low = 0 _iter_high = N_post _iter_step = 1 Key create_j: _pre_idx = _raw_pre_idx _j = _k Key create_cond: y_soma_post = _array_CA1_inh_y_soma[_raw_post_idx] y_soma_pre = _array_CA1_inh_y_soma[_raw_pre_idx] z_soma_pre = _array_CA1_inh_z_soma[_raw_pre_idx] x_soma_post = _array_CA1_inh_x_soma[_raw_post_idx] x_soma_pre = _array_CA1_inh_x_soma[_raw_pre_idx] z_soma_post = _array_CA1_inh_z_soma[_raw_post_idx] _post_idx = _raw_post_idx i = _i _cond = (i != _k) and (_rand(_vectorisation_idx) < (0.7 * exp(_lio_create_cond_1 * (- ((((x_soma_pre - x_soma_post) ** 2) + ((y_soma_pre - y_soma_post) ** 2)) + ((z_soma_pre - z_soma_post) ** 2)))))) Key update_post: _post_idx = _raw_post_idx _n = 1 2021-11-05 15:14:45,052 DIAGNOSTIC brian2.devices.device: CA1_inhtoCA1_inh_synapses_create_generator_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code cdef int64_t *_namespace_rand_buffer cdef int32_t *_namespace_rand_buffer_index cdef double _rand(int _idx): cdef double **buffer_pointer = _namespace_rand_buffer cdef double *buffer = buffer_pointer[0] cdef _numpy.ndarray _new_rand if(_namespace_rand_buffer_index[0] == 0): if buffer != NULL: free(buffer) _new_rand = _numpy.random.rand(20000) buffer = _numpy.PyArray_DATA(_new_rand) PyArray_CLEARFLAGS(<_numpy.PyArrayObject*>_new_rand, _numpy.NPY_OWNDATA) buffer_pointer[0] = buffer cdef double val = buffer[_namespace_rand_buffer_index[0]] _namespace_rand_buffer_index[0] += 1 if _namespace_rand_buffer_index[0] == 20000: _namespace_rand_buffer_index[0] = 0 return val # template-specific support code cdef int _buffer_size = 1024 cdef int[:] _prebuf = _numpy.zeros(_buffer_size, dtype=_numpy.int32) cdef int[:] _postbuf = _numpy.zeros(_buffer_size, dtype=_numpy.int32) cdef int _curbuf = 0 cdef int _raw_pre_idx cdef int _raw_post_idx cdef void _flush_buffer(buf, dynarr, int buf_len): cdef size_t _curlen = dynarr.shape[0] cdef size_t _newlen = _curlen+buf_len # Resize the array dynarr.resize(_newlen) # Get the potentially newly created underlying data arrays data = dynarr.data data[_curlen:_curlen+buf_len] = buf[:buf_len] def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_inhtoCA1_inh_N = _namespace['_array_CA1_inhtoCA1_inh_N'] cdef int32_t * _array_CA1_inhtoCA1_inh_N = _buf__array_CA1_inhtoCA1_inh_N.data cdef int32_t N = _namespace["N"] _var_N_post = _namespace["_var_N_post"] cdef int64_t N_post = _namespace["N_post"] _var_N_pre = _namespace["_var_N_pre"] cdef int64_t N_pre = _namespace["N_pre"] cdef bool _cond cdef int32_t _i cdef int32_t _iter_high cdef int32_t _iter_low cdef int32_t _iter_step cdef int32_t _j cdef int32_t _k cdef int32_t _n cdef int32_t _post_idx cdef int32_t _pre_idx cdef int32_t _raw_post_idx cdef int32_t _raw_pre_idx _var__source_offset = _namespace["_var__source_offset"] cdef int64_t _source_offset = _namespace["_source_offset"] _var__synaptic_post = _namespace["_var__synaptic_post"] _dynamic_array_CA1_inhtoCA1_inh__synaptic_post = _namespace["_dynamic_array_CA1_inhtoCA1_inh__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_inhtoCA1_inh__synaptic_post = _namespace['_array_CA1_inhtoCA1_inh__synaptic_post'] cdef int32_t * _array_CA1_inhtoCA1_inh__synaptic_post = _buf__array_CA1_inhtoCA1_inh__synaptic_post.data cdef size_t _num_array_CA1_inhtoCA1_inh__synaptic_post = len(_namespace['_array_CA1_inhtoCA1_inh__synaptic_post']) cdef int32_t _synaptic_post _var__synaptic_pre = _namespace["_var__synaptic_pre"] _dynamic_array_CA1_inhtoCA1_inh__synaptic_pre = _namespace["_dynamic_array_CA1_inhtoCA1_inh__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_inhtoCA1_inh__synaptic_pre = _namespace['_array_CA1_inhtoCA1_inh__synaptic_pre'] cdef int32_t * _array_CA1_inhtoCA1_inh__synaptic_pre = _buf__array_CA1_inhtoCA1_inh__synaptic_pre.data cdef size_t _num_array_CA1_inhtoCA1_inh__synaptic_pre = len(_namespace['_array_CA1_inhtoCA1_inh__synaptic_pre']) cdef int32_t _synaptic_pre _var__target_offset = _namespace["_var__target_offset"] cdef int64_t _target_offset = _namespace["_target_offset"] cdef int32_t i # namespace for function rand global _namespace_rand_buffer global _namespace_num_rand_buffer cdef _numpy.ndarray[int64_t, ndim=1, mode='c'] _buf__rand_buffer = _namespace['_rand_buffer'] _namespace_rand_buffer = _buf__rand_buffer.data _namespace_num_rand_buffer = len(_namespace['_rand_buffer']) # namespace for function rand global _namespace_rand_buffer_index global _namespace_num_rand_buffer_index cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__rand_buffer_index = _namespace['_rand_buffer_index'] _namespace_rand_buffer_index = _buf__rand_buffer_index.data _namespace_num_rand_buffer_index = len(_namespace['_rand_buffer_index']) _var_umetre = _namespace["_var_umetre"] cdef double umetre = _namespace["umetre"] _var_x_soma_post = _namespace["_var_x_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_x_soma = _namespace['_array_CA1_inh_x_soma'] cdef double * _array_CA1_inh_x_soma = _buf__array_CA1_inh_x_soma.data cdef size_t _num_array_CA1_inh_x_soma = len(_namespace['_array_CA1_inh_x_soma']) cdef double x_soma_post _var_x_soma_pre = _namespace["_var_x_soma_pre"] _var_y_soma_post = _namespace["_var_y_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_y_soma = _namespace['_array_CA1_inh_y_soma'] cdef double * _array_CA1_inh_y_soma = _buf__array_CA1_inh_y_soma.data cdef size_t _num_array_CA1_inh_y_soma = len(_namespace['_array_CA1_inh_y_soma']) cdef double y_soma_post _var_y_soma_pre = _namespace["_var_y_soma_pre"] _var_z_soma_post = _namespace["_var_z_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_z_soma = _namespace['_array_CA1_inh_z_soma'] cdef double * _array_CA1_inh_z_soma = _buf__array_CA1_inh_z_soma.data cdef size_t _num_array_CA1_inh_z_soma = len(_namespace['_array_CA1_inh_z_soma']) cdef double z_soma_post _var_z_soma_pre = _namespace["_var_z_soma_pre"] cdef double _lio_create_cond_1 if '_owner' in _namespace: _owner = _namespace['_owner'] cdef int* _prebuf_ptr = &(_prebuf[0]) cdef int* _postbuf_ptr = &(_postbuf[0]) global _curbuf cdef size_t oldsize = len(_dynamic_array_CA1_inhtoCA1_inh__synaptic_pre) cdef size_t newsize # The following variables are only used for probabilistic connections cdef bool _jump_algo cdef double _log1p, _pconst cdef size_t _jump # scalar code _vectorisation_idx = 1 _lio_create_cond_1 = 0.5 / ((350.0 * umetre) ** 2) for _i in range(N_pre): _raw_pre_idx = _i + _source_offset _iter_low = 0 _iter_high = N_post _iter_step = 1 for _k in range(_iter_low, _iter_high, _iter_step): _pre_idx = _raw_pre_idx _j = _k _raw_post_idx = _j + _target_offset if _j<0 or _j>=N_post: raise IndexError("index j=%d outside allowed range from 0 to %d" % (_j, N_post-1)) y_soma_post = _array_CA1_inh_y_soma[_raw_post_idx] y_soma_pre = _array_CA1_inh_y_soma[_raw_pre_idx] z_soma_pre = _array_CA1_inh_z_soma[_raw_pre_idx] x_soma_post = _array_CA1_inh_x_soma[_raw_post_idx] x_soma_pre = _array_CA1_inh_x_soma[_raw_pre_idx] z_soma_post = _array_CA1_inh_z_soma[_raw_post_idx] _post_idx = _raw_post_idx i = _i _cond = (i != _k) and (_rand(_vectorisation_idx) < (0.7 * exp(_lio_create_cond_1 * (- ((((x_soma_pre - x_soma_post) ** 2) + ((y_soma_pre - y_soma_post) ** 2)) + ((z_soma_pre - z_soma_post) ** 2)))))) if not _cond: continue _post_idx = _raw_post_idx _n = 1 for _repetition in range(_n): _prebuf_ptr[_curbuf] = _pre_idx _postbuf_ptr[_curbuf] = _post_idx _curbuf += 1 # Flush buffer if _curbuf==_buffer_size: _flush_buffer(_prebuf, _dynamic_array_CA1_inhtoCA1_inh__synaptic_pre, _curbuf) _flush_buffer(_postbuf, _dynamic_array_CA1_inhtoCA1_inh__synaptic_post, _curbuf) _curbuf = 0 # Final buffer flush _flush_buffer(_prebuf, _dynamic_array_CA1_inhtoCA1_inh__synaptic_pre, _curbuf) _flush_buffer(_postbuf, _dynamic_array_CA1_inhtoCA1_inh__synaptic_post, _curbuf) _curbuf = 0 # reset the buffer for the next run newsize = len(_dynamic_array_CA1_inhtoCA1_inh__synaptic_pre) # now we need to resize all registered variables and set the total number # of synapse (via Python) _owner._resize(newsize) # And update N_incoming, N_outgoing and synapse_number _owner._update_synapse_numbers(oldsize) before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_inhtoCA1_inh_N = _namespace['_array_CA1_inhtoCA1_inh_N'] cdef int32_t * _array_CA1_inhtoCA1_inh_N = _buf__array_CA1_inhtoCA1_inh_N.data cdef int32_t N = _namespace["N"] _var_N_post = _namespace["_var_N_post"] cdef int64_t N_post = _namespace["N_post"] _var_N_pre = _namespace["_var_N_pre"] cdef int64_t N_pre = _namespace["N_pre"] cdef bool _cond cdef int32_t _i cdef int32_t _iter_high cdef int32_t _iter_low cdef int32_t _iter_step cdef int32_t _j cdef int32_t _k cdef int32_t _n cdef int32_t _post_idx cdef int32_t _pre_idx cdef int32_t _raw_post_idx cdef int32_t _raw_pre_idx _var__source_offset = _namespace["_var__source_offset"] cdef int64_t _source_offset = _namespace["_source_offset"] _var__synaptic_post = _namespace["_var__synaptic_post"] _dynamic_array_CA1_inhtoCA1_inh__synaptic_post = _namespace["_dynamic_array_CA1_inhtoCA1_inh__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_inhtoCA1_inh__synaptic_post = _namespace['_array_CA1_inhtoCA1_inh__synaptic_post'] cdef int32_t * _array_CA1_inhtoCA1_inh__synaptic_post = _buf__array_CA1_inhtoCA1_inh__synaptic_post.data cdef size_t _num_array_CA1_inhtoCA1_inh__synaptic_post = len(_namespace['_array_CA1_inhtoCA1_inh__synaptic_post']) cdef int32_t _synaptic_post _var__synaptic_pre = _namespace["_var__synaptic_pre"] _dynamic_array_CA1_inhtoCA1_inh__synaptic_pre = _namespace["_dynamic_array_CA1_inhtoCA1_inh__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_inhtoCA1_inh__synaptic_pre = _namespace['_array_CA1_inhtoCA1_inh__synaptic_pre'] cdef int32_t * _array_CA1_inhtoCA1_inh__synaptic_pre = _buf__array_CA1_inhtoCA1_inh__synaptic_pre.data cdef size_t _num_array_CA1_inhtoCA1_inh__synaptic_pre = len(_namespace['_array_CA1_inhtoCA1_inh__synaptic_pre']) cdef int32_t _synaptic_pre _var__target_offset = _namespace["_var__target_offset"] cdef int64_t _target_offset = _namespace["_target_offset"] cdef int32_t i # namespace for function rand global _namespace_rand_buffer global _namespace_num_rand_buffer cdef _numpy.ndarray[int64_t, ndim=1, mode='c'] _buf__rand_buffer = _namespace['_rand_buffer'] _namespace_rand_buffer = _buf__rand_buffer.data _namespace_num_rand_buffer = len(_namespace['_rand_buffer']) # namespace for function rand global _namespace_rand_buffer_index global _namespace_num_rand_buffer_index cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__rand_buffer_index = _namespace['_rand_buffer_index'] _namespace_rand_buffer_index = _buf__rand_buffer_index.data _namespace_num_rand_buffer_index = len(_namespace['_rand_buffer_index']) _var_umetre = _namespace["_var_umetre"] cdef double umetre = _namespace["umetre"] _var_x_soma_post = _namespace["_var_x_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_x_soma = _namespace['_array_CA1_inh_x_soma'] cdef double * _array_CA1_inh_x_soma = _buf__array_CA1_inh_x_soma.data cdef size_t _num_array_CA1_inh_x_soma = len(_namespace['_array_CA1_inh_x_soma']) cdef double x_soma_post _var_x_soma_pre = _namespace["_var_x_soma_pre"] _var_y_soma_post = _namespace["_var_y_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_y_soma = _namespace['_array_CA1_inh_y_soma'] cdef double * _array_CA1_inh_y_soma = _buf__array_CA1_inh_y_soma.data cdef size_t _num_array_CA1_inh_y_soma = len(_namespace['_array_CA1_inh_y_soma']) cdef double y_soma_post _var_y_soma_pre = _namespace["_var_y_soma_pre"] _var_z_soma_post = _namespace["_var_z_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_z_soma = _namespace['_array_CA1_inh_z_soma'] cdef double * _array_CA1_inh_z_soma = _buf__array_CA1_inh_z_soma.data cdef size_t _num_array_CA1_inh_z_soma = len(_namespace['_array_CA1_inh_z_soma']) cdef double z_soma_post _var_z_soma_pre = _namespace["_var_z_soma_pre"] cdef double _lio_create_cond_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_inhtoCA1_inh_N = _namespace['_array_CA1_inhtoCA1_inh_N'] cdef int32_t * _array_CA1_inhtoCA1_inh_N = _buf__array_CA1_inhtoCA1_inh_N.data cdef int32_t N = _namespace["N"] _var_N_post = _namespace["_var_N_post"] cdef int64_t N_post = _namespace["N_post"] _var_N_pre = _namespace["_var_N_pre"] cdef int64_t N_pre = _namespace["N_pre"] cdef bool _cond cdef int32_t _i cdef int32_t _iter_high cdef int32_t _iter_low cdef int32_t _iter_step cdef int32_t _j cdef int32_t _k cdef int32_t _n cdef int32_t _post_idx cdef int32_t _pre_idx cdef int32_t _raw_post_idx cdef int32_t _raw_pre_idx _var__source_offset = _namespace["_var__source_offset"] cdef int64_t _source_offset = _namespace["_source_offset"] _var__synaptic_post = _namespace["_var__synaptic_post"] _dynamic_array_CA1_inhtoCA1_inh__synaptic_post = _namespace["_dynamic_array_CA1_inhtoCA1_inh__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_inhtoCA1_inh__synaptic_post = _namespace['_array_CA1_inhtoCA1_inh__synaptic_post'] cdef int32_t * _array_CA1_inhtoCA1_inh__synaptic_post = _buf__array_CA1_inhtoCA1_inh__synaptic_post.data cdef size_t _num_array_CA1_inhtoCA1_inh__synaptic_post = len(_namespace['_array_CA1_inhtoCA1_inh__synaptic_post']) cdef int32_t _synaptic_post _var__synaptic_pre = _namespace["_var__synaptic_pre"] _dynamic_array_CA1_inhtoCA1_inh__synaptic_pre = _namespace["_dynamic_array_CA1_inhtoCA1_inh__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_inhtoCA1_inh__synaptic_pre = _namespace['_array_CA1_inhtoCA1_inh__synaptic_pre'] cdef int32_t * _array_CA1_inhtoCA1_inh__synaptic_pre = _buf__array_CA1_inhtoCA1_inh__synaptic_pre.data cdef size_t _num_array_CA1_inhtoCA1_inh__synaptic_pre = len(_namespace['_array_CA1_inhtoCA1_inh__synaptic_pre']) cdef int32_t _synaptic_pre _var__target_offset = _namespace["_var__target_offset"] cdef int64_t _target_offset = _namespace["_target_offset"] cdef int32_t i # namespace for function rand global _namespace_rand_buffer global _namespace_num_rand_buffer cdef _numpy.ndarray[int64_t, ndim=1, mode='c'] _buf__rand_buffer = _namespace['_rand_buffer'] _namespace_rand_buffer = _buf__rand_buffer.data _namespace_num_rand_buffer = len(_namespace['_rand_buffer']) # namespace for function rand global _namespace_rand_buffer_index global _namespace_num_rand_buffer_index cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__rand_buffer_index = _namespace['_rand_buffer_index'] _namespace_rand_buffer_index = _buf__rand_buffer_index.data _namespace_num_rand_buffer_index = len(_namespace['_rand_buffer_index']) _var_umetre = _namespace["_var_umetre"] cdef double umetre = _namespace["umetre"] _var_x_soma_post = _namespace["_var_x_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_x_soma = _namespace['_array_CA1_inh_x_soma'] cdef double * _array_CA1_inh_x_soma = _buf__array_CA1_inh_x_soma.data cdef size_t _num_array_CA1_inh_x_soma = len(_namespace['_array_CA1_inh_x_soma']) cdef double x_soma_post _var_x_soma_pre = _namespace["_var_x_soma_pre"] _var_y_soma_post = _namespace["_var_y_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_y_soma = _namespace['_array_CA1_inh_y_soma'] cdef double * _array_CA1_inh_y_soma = _buf__array_CA1_inh_y_soma.data cdef size_t _num_array_CA1_inh_y_soma = len(_namespace['_array_CA1_inh_y_soma']) cdef double y_soma_post _var_y_soma_pre = _namespace["_var_y_soma_pre"] _var_z_soma_post = _namespace["_var_z_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_z_soma = _namespace['_array_CA1_inh_z_soma'] cdef double * _array_CA1_inh_z_soma = _buf__array_CA1_inh_z_soma.data cdef size_t _num_array_CA1_inh_z_soma = len(_namespace['_array_CA1_inh_z_soma']) cdef double z_soma_post _var_z_soma_pre = _namespace["_var_z_soma_pre"] cdef double _lio_create_cond_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:14:45,052 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name CA1_inhtoCA1_inh_synapses_create_generator_codeobject 2021-11-05 15:14:45,052 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "CA1_inhtoCA1_inh_synapses_create_generator" using Cython module "_cython_magic_513136ea34a6a36108ea078e39fce69d" 2021-11-05 15:14:45,052 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140606326826704 on /home/nikos/.cython/brian_extensions/_cython_magic_513136ea34a6a36108ea078e39fce69d.lock 2021-11-05 15:14:45,053 DEBUG brian2.utils.filelock: Lock 140606326826704 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_513136ea34a6a36108ea078e39fce69d.lock 2021-11-05 15:14:45,056 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140606326826704 on /home/nikos/.cython/brian_extensions/_cython_magic_513136ea34a6a36108ea078e39fce69d.lock 2021-11-05 15:14:45,056 DEBUG brian2.utils.filelock: Lock 140606326826704 released on /home/nikos/.cython/brian_extensions/_cython_magic_513136ea34a6a36108ea078e39fce69d.lock 2021-11-05 15:14:45,081 DIAGNOSTIC brian2.core.names: Created object of class Synapses with name EC_pyCANtoDG_py 2021-11-05 15:14:45,081 DIAGNOSTIC brian2.core.base: Created BrianObject with name EC_pyCANtoDG_py, clock=Clock(dt=100. * usecond, name='defaultclock'), when=start, order=0 2021-11-05 15:14:45,084 DIAGNOSTIC brian2.core.names: Created object of class SynapticPathway with name EC_pyCANtoDG_py_pre 2021-11-05 15:14:45,084 DIAGNOSTIC brian2.core.base: Created BrianObject with name EC_pyCANtoDG_py_pre, clock=Clock(dt=100. * usecond, name='defaultclock'), when=synapses, order=-1 2021-11-05 15:14:45,095 DEBUG brian2.synapses.synapses: Creating synapses from group 'EC_pyCAN' to group 'DG_py', using generator '_k for _k in range(N_post) if (i!=_k) and rand()<0.45*exp(-((z_soma_pre-z_soma_post)**2)/(2*(1000*umetre)**2))' 2021-11-05 15:14:45,096 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=EC_pyCANtoDG_py, template name=synapses_create_generator) for abstract code: Key setup_iterator: _iter_low = 0 _iter_high = N_post _iter_step = 1 Key create_j: _pre_idx = _raw_pre_idx _j = _k Key create_cond: _post_idx = _raw_post_idx _cond = (i != _k) and (rand() < (0.45 * exp((- ((z_soma_pre - z_soma_post) ** 2)) / (2 * ((1000 * umetre) ** 2))))) Key update_post: _post_idx = _raw_post_idx _n = 1 2021-11-05 15:14:45,154 DIAGNOSTIC brian2.devices.device: EC_pyCANtoDG_py_synapses_create_generator_codeobject abstract code: Key setup_iterator: _iter_low = 0 _iter_high = N_post _iter_step = 1 Key create_j: _pre_idx = _raw_pre_idx _j = _k Key create_cond: _post_idx = _raw_post_idx _cond = (i != _k) and (rand() < (0.45 * exp((- ((z_soma_pre - z_soma_post) ** 2)) / (2 * ((1000 * umetre) ** 2))))) Key update_post: _post_idx = _raw_post_idx _n = 1 2021-11-05 15:14:45,158 DIAGNOSTIC brian2.devices.device: EC_pyCANtoDG_py_synapses_create_generator_codeobject snippet (scalar): Key setup_iterator: Key create_j: Key create_cond: _lio_create_cond_1 = 0.5 / ((1000.0 * umetre) ** 2) Key update_post: 2021-11-05 15:14:45,158 DIAGNOSTIC brian2.devices.device: EC_pyCANtoDG_py_synapses_create_generator_codeobject snippet (vector): Key setup_iterator: _iter_low = 0 _iter_high = N_post _iter_step = 1 Key create_j: _pre_idx = _raw_pre_idx _j = _k Key create_cond: z_soma_post = _array_DG_py_z_soma[_raw_post_idx] z_soma_pre = _array_EC_pyCAN_z_soma[_raw_pre_idx] _post_idx = _raw_post_idx i = _i _cond = (i != _k) and (_rand(_vectorisation_idx) < (0.45 * exp(_lio_create_cond_1 * (- ((z_soma_pre - z_soma_post) ** 2))))) Key update_post: _post_idx = _raw_post_idx _n = 1 2021-11-05 15:14:45,159 DIAGNOSTIC brian2.devices.device: EC_pyCANtoDG_py_synapses_create_generator_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code cdef int64_t *_namespace_rand_buffer cdef int32_t *_namespace_rand_buffer_index cdef double _rand(int _idx): cdef double **buffer_pointer = _namespace_rand_buffer cdef double *buffer = buffer_pointer[0] cdef _numpy.ndarray _new_rand if(_namespace_rand_buffer_index[0] == 0): if buffer != NULL: free(buffer) _new_rand = _numpy.random.rand(20000) buffer = _numpy.PyArray_DATA(_new_rand) PyArray_CLEARFLAGS(<_numpy.PyArrayObject*>_new_rand, _numpy.NPY_OWNDATA) buffer_pointer[0] = buffer cdef double val = buffer[_namespace_rand_buffer_index[0]] _namespace_rand_buffer_index[0] += 1 if _namespace_rand_buffer_index[0] == 20000: _namespace_rand_buffer_index[0] = 0 return val # template-specific support code cdef int _buffer_size = 1024 cdef int[:] _prebuf = _numpy.zeros(_buffer_size, dtype=_numpy.int32) cdef int[:] _postbuf = _numpy.zeros(_buffer_size, dtype=_numpy.int32) cdef int _curbuf = 0 cdef int _raw_pre_idx cdef int _raw_post_idx cdef void _flush_buffer(buf, dynarr, int buf_len): cdef size_t _curlen = dynarr.shape[0] cdef size_t _newlen = _curlen+buf_len # Resize the array dynarr.resize(_newlen) # Get the potentially newly created underlying data arrays data = dynarr.data data[_curlen:_curlen+buf_len] = buf[:buf_len] def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoDG_py_N = _namespace['_array_EC_pyCANtoDG_py_N'] cdef int32_t * _array_EC_pyCANtoDG_py_N = _buf__array_EC_pyCANtoDG_py_N.data cdef int32_t N = _namespace["N"] _var_N_post = _namespace["_var_N_post"] cdef int64_t N_post = _namespace["N_post"] _var_N_pre = _namespace["_var_N_pre"] cdef int64_t N_pre = _namespace["N_pre"] cdef bool _cond cdef int32_t _i cdef int32_t _iter_high cdef int32_t _iter_low cdef int32_t _iter_step cdef int32_t _j cdef int32_t _k cdef int32_t _n cdef int32_t _post_idx cdef int32_t _pre_idx cdef int32_t _raw_post_idx cdef int32_t _raw_pre_idx _var__source_offset = _namespace["_var__source_offset"] cdef int64_t _source_offset = _namespace["_source_offset"] _var__synaptic_post = _namespace["_var__synaptic_post"] _dynamic_array_EC_pyCANtoDG_py__synaptic_post = _namespace["_dynamic_array_EC_pyCANtoDG_py__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoDG_py__synaptic_post = _namespace['_array_EC_pyCANtoDG_py__synaptic_post'] cdef int32_t * _array_EC_pyCANtoDG_py__synaptic_post = _buf__array_EC_pyCANtoDG_py__synaptic_post.data cdef size_t _num_array_EC_pyCANtoDG_py__synaptic_post = len(_namespace['_array_EC_pyCANtoDG_py__synaptic_post']) cdef int32_t _synaptic_post _var__synaptic_pre = _namespace["_var__synaptic_pre"] _dynamic_array_EC_pyCANtoDG_py__synaptic_pre = _namespace["_dynamic_array_EC_pyCANtoDG_py__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoDG_py__synaptic_pre = _namespace['_array_EC_pyCANtoDG_py__synaptic_pre'] cdef int32_t * _array_EC_pyCANtoDG_py__synaptic_pre = _buf__array_EC_pyCANtoDG_py__synaptic_pre.data cdef size_t _num_array_EC_pyCANtoDG_py__synaptic_pre = len(_namespace['_array_EC_pyCANtoDG_py__synaptic_pre']) cdef int32_t _synaptic_pre _var__target_offset = _namespace["_var__target_offset"] cdef int64_t _target_offset = _namespace["_target_offset"] cdef int32_t i # namespace for function rand global _namespace_rand_buffer global _namespace_num_rand_buffer cdef _numpy.ndarray[int64_t, ndim=1, mode='c'] _buf__rand_buffer = _namespace['_rand_buffer'] _namespace_rand_buffer = _buf__rand_buffer.data _namespace_num_rand_buffer = len(_namespace['_rand_buffer']) # namespace for function rand global _namespace_rand_buffer_index global _namespace_num_rand_buffer_index cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__rand_buffer_index = _namespace['_rand_buffer_index'] _namespace_rand_buffer_index = _buf__rand_buffer_index.data _namespace_num_rand_buffer_index = len(_namespace['_rand_buffer_index']) _var_umetre = _namespace["_var_umetre"] cdef double umetre = _namespace["umetre"] _var_z_soma_post = _namespace["_var_z_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_z_soma = _namespace['_array_DG_py_z_soma'] cdef double * _array_DG_py_z_soma = _buf__array_DG_py_z_soma.data cdef size_t _num_array_DG_py_z_soma = len(_namespace['_array_DG_py_z_soma']) cdef double z_soma_post _var_z_soma_pre = _namespace["_var_z_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_z_soma = _namespace['_array_EC_pyCAN_z_soma'] cdef double * _array_EC_pyCAN_z_soma = _buf__array_EC_pyCAN_z_soma.data cdef size_t _num_array_EC_pyCAN_z_soma = len(_namespace['_array_EC_pyCAN_z_soma']) cdef double z_soma_pre cdef double _lio_create_cond_1 if '_owner' in _namespace: _owner = _namespace['_owner'] cdef int* _prebuf_ptr = &(_prebuf[0]) cdef int* _postbuf_ptr = &(_postbuf[0]) global _curbuf cdef size_t oldsize = len(_dynamic_array_EC_pyCANtoDG_py__synaptic_pre) cdef size_t newsize # The following variables are only used for probabilistic connections cdef bool _jump_algo cdef double _log1p, _pconst cdef size_t _jump # scalar code _vectorisation_idx = 1 _lio_create_cond_1 = 0.5 / ((1000.0 * umetre) ** 2) for _i in range(N_pre): _raw_pre_idx = _i + _source_offset _iter_low = 0 _iter_high = N_post _iter_step = 1 for _k in range(_iter_low, _iter_high, _iter_step): _pre_idx = _raw_pre_idx _j = _k _raw_post_idx = _j + _target_offset if _j<0 or _j>=N_post: raise IndexError("index j=%d outside allowed range from 0 to %d" % (_j, N_post-1)) z_soma_post = _array_DG_py_z_soma[_raw_post_idx] z_soma_pre = _array_EC_pyCAN_z_soma[_raw_pre_idx] _post_idx = _raw_post_idx i = _i _cond = (i != _k) and (_rand(_vectorisation_idx) < (0.45 * exp(_lio_create_cond_1 * (- ((z_soma_pre - z_soma_post) ** 2))))) if not _cond: continue _post_idx = _raw_post_idx _n = 1 for _repetition in range(_n): _prebuf_ptr[_curbuf] = _pre_idx _postbuf_ptr[_curbuf] = _post_idx _curbuf += 1 # Flush buffer if _curbuf==_buffer_size: _flush_buffer(_prebuf, _dynamic_array_EC_pyCANtoDG_py__synaptic_pre, _curbuf) _flush_buffer(_postbuf, _dynamic_array_EC_pyCANtoDG_py__synaptic_post, _curbuf) _curbuf = 0 # Final buffer flush _flush_buffer(_prebuf, _dynamic_array_EC_pyCANtoDG_py__synaptic_pre, _curbuf) _flush_buffer(_postbuf, _dynamic_array_EC_pyCANtoDG_py__synaptic_post, _curbuf) _curbuf = 0 # reset the buffer for the next run newsize = len(_dynamic_array_EC_pyCANtoDG_py__synaptic_pre) # now we need to resize all registered variables and set the total number # of synapse (via Python) _owner._resize(newsize) # And update N_incoming, N_outgoing and synapse_number _owner._update_synapse_numbers(oldsize) before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoDG_py_N = _namespace['_array_EC_pyCANtoDG_py_N'] cdef int32_t * _array_EC_pyCANtoDG_py_N = _buf__array_EC_pyCANtoDG_py_N.data cdef int32_t N = _namespace["N"] _var_N_post = _namespace["_var_N_post"] cdef int64_t N_post = _namespace["N_post"] _var_N_pre = _namespace["_var_N_pre"] cdef int64_t N_pre = _namespace["N_pre"] cdef bool _cond cdef int32_t _i cdef int32_t _iter_high cdef int32_t _iter_low cdef int32_t _iter_step cdef int32_t _j cdef int32_t _k cdef int32_t _n cdef int32_t _post_idx cdef int32_t _pre_idx cdef int32_t _raw_post_idx cdef int32_t _raw_pre_idx _var__source_offset = _namespace["_var__source_offset"] cdef int64_t _source_offset = _namespace["_source_offset"] _var__synaptic_post = _namespace["_var__synaptic_post"] _dynamic_array_EC_pyCANtoDG_py__synaptic_post = _namespace["_dynamic_array_EC_pyCANtoDG_py__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoDG_py__synaptic_post = _namespace['_array_EC_pyCANtoDG_py__synaptic_post'] cdef int32_t * _array_EC_pyCANtoDG_py__synaptic_post = _buf__array_EC_pyCANtoDG_py__synaptic_post.data cdef size_t _num_array_EC_pyCANtoDG_py__synaptic_post = len(_namespace['_array_EC_pyCANtoDG_py__synaptic_post']) cdef int32_t _synaptic_post _var__synaptic_pre = _namespace["_var__synaptic_pre"] _dynamic_array_EC_pyCANtoDG_py__synaptic_pre = _namespace["_dynamic_array_EC_pyCANtoDG_py__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoDG_py__synaptic_pre = _namespace['_array_EC_pyCANtoDG_py__synaptic_pre'] cdef int32_t * _array_EC_pyCANtoDG_py__synaptic_pre = _buf__array_EC_pyCANtoDG_py__synaptic_pre.data cdef size_t _num_array_EC_pyCANtoDG_py__synaptic_pre = len(_namespace['_array_EC_pyCANtoDG_py__synaptic_pre']) cdef int32_t _synaptic_pre _var__target_offset = _namespace["_var__target_offset"] cdef int64_t _target_offset = _namespace["_target_offset"] cdef int32_t i # namespace for function rand global _namespace_rand_buffer global _namespace_num_rand_buffer cdef _numpy.ndarray[int64_t, ndim=1, mode='c'] _buf__rand_buffer = _namespace['_rand_buffer'] _namespace_rand_buffer = _buf__rand_buffer.data _namespace_num_rand_buffer = len(_namespace['_rand_buffer']) # namespace for function rand global _namespace_rand_buffer_index global _namespace_num_rand_buffer_index cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__rand_buffer_index = _namespace['_rand_buffer_index'] _namespace_rand_buffer_index = _buf__rand_buffer_index.data _namespace_num_rand_buffer_index = len(_namespace['_rand_buffer_index']) _var_umetre = _namespace["_var_umetre"] cdef double umetre = _namespace["umetre"] _var_z_soma_post = _namespace["_var_z_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_z_soma = _namespace['_array_DG_py_z_soma'] cdef double * _array_DG_py_z_soma = _buf__array_DG_py_z_soma.data cdef size_t _num_array_DG_py_z_soma = len(_namespace['_array_DG_py_z_soma']) cdef double z_soma_post _var_z_soma_pre = _namespace["_var_z_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_z_soma = _namespace['_array_EC_pyCAN_z_soma'] cdef double * _array_EC_pyCAN_z_soma = _buf__array_EC_pyCAN_z_soma.data cdef size_t _num_array_EC_pyCAN_z_soma = len(_namespace['_array_EC_pyCAN_z_soma']) cdef double z_soma_pre cdef double _lio_create_cond_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoDG_py_N = _namespace['_array_EC_pyCANtoDG_py_N'] cdef int32_t * _array_EC_pyCANtoDG_py_N = _buf__array_EC_pyCANtoDG_py_N.data cdef int32_t N = _namespace["N"] _var_N_post = _namespace["_var_N_post"] cdef int64_t N_post = _namespace["N_post"] _var_N_pre = _namespace["_var_N_pre"] cdef int64_t N_pre = _namespace["N_pre"] cdef bool _cond cdef int32_t _i cdef int32_t _iter_high cdef int32_t _iter_low cdef int32_t _iter_step cdef int32_t _j cdef int32_t _k cdef int32_t _n cdef int32_t _post_idx cdef int32_t _pre_idx cdef int32_t _raw_post_idx cdef int32_t _raw_pre_idx _var__source_offset = _namespace["_var__source_offset"] cdef int64_t _source_offset = _namespace["_source_offset"] _var__synaptic_post = _namespace["_var__synaptic_post"] _dynamic_array_EC_pyCANtoDG_py__synaptic_post = _namespace["_dynamic_array_EC_pyCANtoDG_py__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoDG_py__synaptic_post = _namespace['_array_EC_pyCANtoDG_py__synaptic_post'] cdef int32_t * _array_EC_pyCANtoDG_py__synaptic_post = _buf__array_EC_pyCANtoDG_py__synaptic_post.data cdef size_t _num_array_EC_pyCANtoDG_py__synaptic_post = len(_namespace['_array_EC_pyCANtoDG_py__synaptic_post']) cdef int32_t _synaptic_post _var__synaptic_pre = _namespace["_var__synaptic_pre"] _dynamic_array_EC_pyCANtoDG_py__synaptic_pre = _namespace["_dynamic_array_EC_pyCANtoDG_py__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoDG_py__synaptic_pre = _namespace['_array_EC_pyCANtoDG_py__synaptic_pre'] cdef int32_t * _array_EC_pyCANtoDG_py__synaptic_pre = _buf__array_EC_pyCANtoDG_py__synaptic_pre.data cdef size_t _num_array_EC_pyCANtoDG_py__synaptic_pre = len(_namespace['_array_EC_pyCANtoDG_py__synaptic_pre']) cdef int32_t _synaptic_pre _var__target_offset = _namespace["_var__target_offset"] cdef int64_t _target_offset = _namespace["_target_offset"] cdef int32_t i # namespace for function rand global _namespace_rand_buffer global _namespace_num_rand_buffer cdef _numpy.ndarray[int64_t, ndim=1, mode='c'] _buf__rand_buffer = _namespace['_rand_buffer'] _namespace_rand_buffer = _buf__rand_buffer.data _namespace_num_rand_buffer = len(_namespace['_rand_buffer']) # namespace for function rand global _namespace_rand_buffer_index global _namespace_num_rand_buffer_index cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__rand_buffer_index = _namespace['_rand_buffer_index'] _namespace_rand_buffer_index = _buf__rand_buffer_index.data _namespace_num_rand_buffer_index = len(_namespace['_rand_buffer_index']) _var_umetre = _namespace["_var_umetre"] cdef double umetre = _namespace["umetre"] _var_z_soma_post = _namespace["_var_z_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_z_soma = _namespace['_array_DG_py_z_soma'] cdef double * _array_DG_py_z_soma = _buf__array_DG_py_z_soma.data cdef size_t _num_array_DG_py_z_soma = len(_namespace['_array_DG_py_z_soma']) cdef double z_soma_post _var_z_soma_pre = _namespace["_var_z_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_z_soma = _namespace['_array_EC_pyCAN_z_soma'] cdef double * _array_EC_pyCAN_z_soma = _buf__array_EC_pyCAN_z_soma.data cdef size_t _num_array_EC_pyCAN_z_soma = len(_namespace['_array_EC_pyCAN_z_soma']) cdef double z_soma_pre cdef double _lio_create_cond_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:14:45,159 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name EC_pyCANtoDG_py_synapses_create_generator_codeobject 2021-11-05 15:14:45,159 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "EC_pyCANtoDG_py_synapses_create_generator" using Cython module "_cython_magic_e63779ea0c3cf81cd93aadc94d9334ca" 2021-11-05 15:14:45,160 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140606327944096 on /home/nikos/.cython/brian_extensions/_cython_magic_e63779ea0c3cf81cd93aadc94d9334ca.lock 2021-11-05 15:14:45,160 DEBUG brian2.utils.filelock: Lock 140606327944096 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_e63779ea0c3cf81cd93aadc94d9334ca.lock 2021-11-05 15:14:45,160 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140606327944096 on /home/nikos/.cython/brian_extensions/_cython_magic_e63779ea0c3cf81cd93aadc94d9334ca.lock 2021-11-05 15:14:45,160 DEBUG brian2.utils.filelock: Lock 140606327944096 released on /home/nikos/.cython/brian_extensions/_cython_magic_e63779ea0c3cf81cd93aadc94d9334ca.lock 2021-11-05 15:14:47,671 DIAGNOSTIC brian2.core.names: Created object of class Synapses with name EC_pyCANtoDG_inh 2021-11-05 15:14:47,671 DIAGNOSTIC brian2.core.base: Created BrianObject with name EC_pyCANtoDG_inh, clock=Clock(dt=100. * usecond, name='defaultclock'), when=start, order=0 2021-11-05 15:14:47,675 DIAGNOSTIC brian2.core.names: Created object of class SynapticPathway with name EC_pyCANtoDG_inh_pre 2021-11-05 15:14:47,675 DIAGNOSTIC brian2.core.base: Created BrianObject with name EC_pyCANtoDG_inh_pre, clock=Clock(dt=100. * usecond, name='defaultclock'), when=synapses, order=-1 2021-11-05 15:14:47,685 DEBUG brian2.synapses.synapses: Creating synapses from group 'EC_pyCAN' to group 'DG_inh', using generator '_k for _k in range(N_post) if (i!=_k) and rand()<0.45*exp(-((z_soma_pre-z_soma_post)**2)/(2*(1000*umetre)**2))' 2021-11-05 15:14:47,685 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=EC_pyCANtoDG_inh, template name=synapses_create_generator) for abstract code: Key setup_iterator: _iter_low = 0 _iter_high = N_post _iter_step = 1 Key create_j: _pre_idx = _raw_pre_idx _j = _k Key create_cond: _post_idx = _raw_post_idx _cond = (i != _k) and (rand() < (0.45 * exp((- ((z_soma_pre - z_soma_post) ** 2)) / (2 * ((1000 * umetre) ** 2))))) Key update_post: _post_idx = _raw_post_idx _n = 1 2021-11-05 15:14:47,740 DIAGNOSTIC brian2.devices.device: EC_pyCANtoDG_inh_synapses_create_generator_codeobject abstract code: Key setup_iterator: _iter_low = 0 _iter_high = N_post _iter_step = 1 Key create_j: _pre_idx = _raw_pre_idx _j = _k Key create_cond: _post_idx = _raw_post_idx _cond = (i != _k) and (rand() < (0.45 * exp((- ((z_soma_pre - z_soma_post) ** 2)) / (2 * ((1000 * umetre) ** 2))))) Key update_post: _post_idx = _raw_post_idx _n = 1 2021-11-05 15:14:47,743 DIAGNOSTIC brian2.devices.device: EC_pyCANtoDG_inh_synapses_create_generator_codeobject snippet (scalar): Key setup_iterator: Key create_j: Key create_cond: _lio_create_cond_1 = 0.5 / ((1000.0 * umetre) ** 2) Key update_post: 2021-11-05 15:14:47,744 DIAGNOSTIC brian2.devices.device: EC_pyCANtoDG_inh_synapses_create_generator_codeobject snippet (vector): Key setup_iterator: _iter_low = 0 _iter_high = N_post _iter_step = 1 Key create_j: _pre_idx = _raw_pre_idx _j = _k Key create_cond: z_soma_post = _array_DG_inh_z_soma[_raw_post_idx] z_soma_pre = _array_EC_pyCAN_z_soma[_raw_pre_idx] _post_idx = _raw_post_idx i = _i _cond = (i != _k) and (_rand(_vectorisation_idx) < (0.45 * exp(_lio_create_cond_1 * (- ((z_soma_pre - z_soma_post) ** 2))))) Key update_post: _post_idx = _raw_post_idx _n = 1 2021-11-05 15:14:47,744 DIAGNOSTIC brian2.devices.device: EC_pyCANtoDG_inh_synapses_create_generator_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code cdef int64_t *_namespace_rand_buffer cdef int32_t *_namespace_rand_buffer_index cdef double _rand(int _idx): cdef double **buffer_pointer = _namespace_rand_buffer cdef double *buffer = buffer_pointer[0] cdef _numpy.ndarray _new_rand if(_namespace_rand_buffer_index[0] == 0): if buffer != NULL: free(buffer) _new_rand = _numpy.random.rand(20000) buffer = _numpy.PyArray_DATA(_new_rand) PyArray_CLEARFLAGS(<_numpy.PyArrayObject*>_new_rand, _numpy.NPY_OWNDATA) buffer_pointer[0] = buffer cdef double val = buffer[_namespace_rand_buffer_index[0]] _namespace_rand_buffer_index[0] += 1 if _namespace_rand_buffer_index[0] == 20000: _namespace_rand_buffer_index[0] = 0 return val # template-specific support code cdef int _buffer_size = 1024 cdef int[:] _prebuf = _numpy.zeros(_buffer_size, dtype=_numpy.int32) cdef int[:] _postbuf = _numpy.zeros(_buffer_size, dtype=_numpy.int32) cdef int _curbuf = 0 cdef int _raw_pre_idx cdef int _raw_post_idx cdef void _flush_buffer(buf, dynarr, int buf_len): cdef size_t _curlen = dynarr.shape[0] cdef size_t _newlen = _curlen+buf_len # Resize the array dynarr.resize(_newlen) # Get the potentially newly created underlying data arrays data = dynarr.data data[_curlen:_curlen+buf_len] = buf[:buf_len] def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoDG_inh_N = _namespace['_array_EC_pyCANtoDG_inh_N'] cdef int32_t * _array_EC_pyCANtoDG_inh_N = _buf__array_EC_pyCANtoDG_inh_N.data cdef int32_t N = _namespace["N"] _var_N_post = _namespace["_var_N_post"] cdef int64_t N_post = _namespace["N_post"] _var_N_pre = _namespace["_var_N_pre"] cdef int64_t N_pre = _namespace["N_pre"] cdef bool _cond cdef int32_t _i cdef int32_t _iter_high cdef int32_t _iter_low cdef int32_t _iter_step cdef int32_t _j cdef int32_t _k cdef int32_t _n cdef int32_t _post_idx cdef int32_t _pre_idx cdef int32_t _raw_post_idx cdef int32_t _raw_pre_idx _var__source_offset = _namespace["_var__source_offset"] cdef int64_t _source_offset = _namespace["_source_offset"] _var__synaptic_post = _namespace["_var__synaptic_post"] _dynamic_array_EC_pyCANtoDG_inh__synaptic_post = _namespace["_dynamic_array_EC_pyCANtoDG_inh__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoDG_inh__synaptic_post = _namespace['_array_EC_pyCANtoDG_inh__synaptic_post'] cdef int32_t * _array_EC_pyCANtoDG_inh__synaptic_post = _buf__array_EC_pyCANtoDG_inh__synaptic_post.data cdef size_t _num_array_EC_pyCANtoDG_inh__synaptic_post = len(_namespace['_array_EC_pyCANtoDG_inh__synaptic_post']) cdef int32_t _synaptic_post _var__synaptic_pre = _namespace["_var__synaptic_pre"] _dynamic_array_EC_pyCANtoDG_inh__synaptic_pre = _namespace["_dynamic_array_EC_pyCANtoDG_inh__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoDG_inh__synaptic_pre = _namespace['_array_EC_pyCANtoDG_inh__synaptic_pre'] cdef int32_t * _array_EC_pyCANtoDG_inh__synaptic_pre = _buf__array_EC_pyCANtoDG_inh__synaptic_pre.data cdef size_t _num_array_EC_pyCANtoDG_inh__synaptic_pre = len(_namespace['_array_EC_pyCANtoDG_inh__synaptic_pre']) cdef int32_t _synaptic_pre _var__target_offset = _namespace["_var__target_offset"] cdef int64_t _target_offset = _namespace["_target_offset"] cdef int32_t i # namespace for function rand global _namespace_rand_buffer global _namespace_num_rand_buffer cdef _numpy.ndarray[int64_t, ndim=1, mode='c'] _buf__rand_buffer = _namespace['_rand_buffer'] _namespace_rand_buffer = _buf__rand_buffer.data _namespace_num_rand_buffer = len(_namespace['_rand_buffer']) # namespace for function rand global _namespace_rand_buffer_index global _namespace_num_rand_buffer_index cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__rand_buffer_index = _namespace['_rand_buffer_index'] _namespace_rand_buffer_index = _buf__rand_buffer_index.data _namespace_num_rand_buffer_index = len(_namespace['_rand_buffer_index']) _var_umetre = _namespace["_var_umetre"] cdef double umetre = _namespace["umetre"] _var_z_soma_post = _namespace["_var_z_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_inh_z_soma = _namespace['_array_DG_inh_z_soma'] cdef double * _array_DG_inh_z_soma = _buf__array_DG_inh_z_soma.data cdef size_t _num_array_DG_inh_z_soma = len(_namespace['_array_DG_inh_z_soma']) cdef double z_soma_post _var_z_soma_pre = _namespace["_var_z_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_z_soma = _namespace['_array_EC_pyCAN_z_soma'] cdef double * _array_EC_pyCAN_z_soma = _buf__array_EC_pyCAN_z_soma.data cdef size_t _num_array_EC_pyCAN_z_soma = len(_namespace['_array_EC_pyCAN_z_soma']) cdef double z_soma_pre cdef double _lio_create_cond_1 if '_owner' in _namespace: _owner = _namespace['_owner'] cdef int* _prebuf_ptr = &(_prebuf[0]) cdef int* _postbuf_ptr = &(_postbuf[0]) global _curbuf cdef size_t oldsize = len(_dynamic_array_EC_pyCANtoDG_inh__synaptic_pre) cdef size_t newsize # The following variables are only used for probabilistic connections cdef bool _jump_algo cdef double _log1p, _pconst cdef size_t _jump # scalar code _vectorisation_idx = 1 _lio_create_cond_1 = 0.5 / ((1000.0 * umetre) ** 2) for _i in range(N_pre): _raw_pre_idx = _i + _source_offset _iter_low = 0 _iter_high = N_post _iter_step = 1 for _k in range(_iter_low, _iter_high, _iter_step): _pre_idx = _raw_pre_idx _j = _k _raw_post_idx = _j + _target_offset if _j<0 or _j>=N_post: raise IndexError("index j=%d outside allowed range from 0 to %d" % (_j, N_post-1)) z_soma_post = _array_DG_inh_z_soma[_raw_post_idx] z_soma_pre = _array_EC_pyCAN_z_soma[_raw_pre_idx] _post_idx = _raw_post_idx i = _i _cond = (i != _k) and (_rand(_vectorisation_idx) < (0.45 * exp(_lio_create_cond_1 * (- ((z_soma_pre - z_soma_post) ** 2))))) if not _cond: continue _post_idx = _raw_post_idx _n = 1 for _repetition in range(_n): _prebuf_ptr[_curbuf] = _pre_idx _postbuf_ptr[_curbuf] = _post_idx _curbuf += 1 # Flush buffer if _curbuf==_buffer_size: _flush_buffer(_prebuf, _dynamic_array_EC_pyCANtoDG_inh__synaptic_pre, _curbuf) _flush_buffer(_postbuf, _dynamic_array_EC_pyCANtoDG_inh__synaptic_post, _curbuf) _curbuf = 0 # Final buffer flush _flush_buffer(_prebuf, _dynamic_array_EC_pyCANtoDG_inh__synaptic_pre, _curbuf) _flush_buffer(_postbuf, _dynamic_array_EC_pyCANtoDG_inh__synaptic_post, _curbuf) _curbuf = 0 # reset the buffer for the next run newsize = len(_dynamic_array_EC_pyCANtoDG_inh__synaptic_pre) # now we need to resize all registered variables and set the total number # of synapse (via Python) _owner._resize(newsize) # And update N_incoming, N_outgoing and synapse_number _owner._update_synapse_numbers(oldsize) before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoDG_inh_N = _namespace['_array_EC_pyCANtoDG_inh_N'] cdef int32_t * _array_EC_pyCANtoDG_inh_N = _buf__array_EC_pyCANtoDG_inh_N.data cdef int32_t N = _namespace["N"] _var_N_post = _namespace["_var_N_post"] cdef int64_t N_post = _namespace["N_post"] _var_N_pre = _namespace["_var_N_pre"] cdef int64_t N_pre = _namespace["N_pre"] cdef bool _cond cdef int32_t _i cdef int32_t _iter_high cdef int32_t _iter_low cdef int32_t _iter_step cdef int32_t _j cdef int32_t _k cdef int32_t _n cdef int32_t _post_idx cdef int32_t _pre_idx cdef int32_t _raw_post_idx cdef int32_t _raw_pre_idx _var__source_offset = _namespace["_var__source_offset"] cdef int64_t _source_offset = _namespace["_source_offset"] _var__synaptic_post = _namespace["_var__synaptic_post"] _dynamic_array_EC_pyCANtoDG_inh__synaptic_post = _namespace["_dynamic_array_EC_pyCANtoDG_inh__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoDG_inh__synaptic_post = _namespace['_array_EC_pyCANtoDG_inh__synaptic_post'] cdef int32_t * _array_EC_pyCANtoDG_inh__synaptic_post = _buf__array_EC_pyCANtoDG_inh__synaptic_post.data cdef size_t _num_array_EC_pyCANtoDG_inh__synaptic_post = len(_namespace['_array_EC_pyCANtoDG_inh__synaptic_post']) cdef int32_t _synaptic_post _var__synaptic_pre = _namespace["_var__synaptic_pre"] _dynamic_array_EC_pyCANtoDG_inh__synaptic_pre = _namespace["_dynamic_array_EC_pyCANtoDG_inh__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoDG_inh__synaptic_pre = _namespace['_array_EC_pyCANtoDG_inh__synaptic_pre'] cdef int32_t * _array_EC_pyCANtoDG_inh__synaptic_pre = _buf__array_EC_pyCANtoDG_inh__synaptic_pre.data cdef size_t _num_array_EC_pyCANtoDG_inh__synaptic_pre = len(_namespace['_array_EC_pyCANtoDG_inh__synaptic_pre']) cdef int32_t _synaptic_pre _var__target_offset = _namespace["_var__target_offset"] cdef int64_t _target_offset = _namespace["_target_offset"] cdef int32_t i # namespace for function rand global _namespace_rand_buffer global _namespace_num_rand_buffer cdef _numpy.ndarray[int64_t, ndim=1, mode='c'] _buf__rand_buffer = _namespace['_rand_buffer'] _namespace_rand_buffer = _buf__rand_buffer.data _namespace_num_rand_buffer = len(_namespace['_rand_buffer']) # namespace for function rand global _namespace_rand_buffer_index global _namespace_num_rand_buffer_index cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__rand_buffer_index = _namespace['_rand_buffer_index'] _namespace_rand_buffer_index = _buf__rand_buffer_index.data _namespace_num_rand_buffer_index = len(_namespace['_rand_buffer_index']) _var_umetre = _namespace["_var_umetre"] cdef double umetre = _namespace["umetre"] _var_z_soma_post = _namespace["_var_z_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_inh_z_soma = _namespace['_array_DG_inh_z_soma'] cdef double * _array_DG_inh_z_soma = _buf__array_DG_inh_z_soma.data cdef size_t _num_array_DG_inh_z_soma = len(_namespace['_array_DG_inh_z_soma']) cdef double z_soma_post _var_z_soma_pre = _namespace["_var_z_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_z_soma = _namespace['_array_EC_pyCAN_z_soma'] cdef double * _array_EC_pyCAN_z_soma = _buf__array_EC_pyCAN_z_soma.data cdef size_t _num_array_EC_pyCAN_z_soma = len(_namespace['_array_EC_pyCAN_z_soma']) cdef double z_soma_pre cdef double _lio_create_cond_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoDG_inh_N = _namespace['_array_EC_pyCANtoDG_inh_N'] cdef int32_t * _array_EC_pyCANtoDG_inh_N = _buf__array_EC_pyCANtoDG_inh_N.data cdef int32_t N = _namespace["N"] _var_N_post = _namespace["_var_N_post"] cdef int64_t N_post = _namespace["N_post"] _var_N_pre = _namespace["_var_N_pre"] cdef int64_t N_pre = _namespace["N_pre"] cdef bool _cond cdef int32_t _i cdef int32_t _iter_high cdef int32_t _iter_low cdef int32_t _iter_step cdef int32_t _j cdef int32_t _k cdef int32_t _n cdef int32_t _post_idx cdef int32_t _pre_idx cdef int32_t _raw_post_idx cdef int32_t _raw_pre_idx _var__source_offset = _namespace["_var__source_offset"] cdef int64_t _source_offset = _namespace["_source_offset"] _var__synaptic_post = _namespace["_var__synaptic_post"] _dynamic_array_EC_pyCANtoDG_inh__synaptic_post = _namespace["_dynamic_array_EC_pyCANtoDG_inh__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoDG_inh__synaptic_post = _namespace['_array_EC_pyCANtoDG_inh__synaptic_post'] cdef int32_t * _array_EC_pyCANtoDG_inh__synaptic_post = _buf__array_EC_pyCANtoDG_inh__synaptic_post.data cdef size_t _num_array_EC_pyCANtoDG_inh__synaptic_post = len(_namespace['_array_EC_pyCANtoDG_inh__synaptic_post']) cdef int32_t _synaptic_post _var__synaptic_pre = _namespace["_var__synaptic_pre"] _dynamic_array_EC_pyCANtoDG_inh__synaptic_pre = _namespace["_dynamic_array_EC_pyCANtoDG_inh__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoDG_inh__synaptic_pre = _namespace['_array_EC_pyCANtoDG_inh__synaptic_pre'] cdef int32_t * _array_EC_pyCANtoDG_inh__synaptic_pre = _buf__array_EC_pyCANtoDG_inh__synaptic_pre.data cdef size_t _num_array_EC_pyCANtoDG_inh__synaptic_pre = len(_namespace['_array_EC_pyCANtoDG_inh__synaptic_pre']) cdef int32_t _synaptic_pre _var__target_offset = _namespace["_var__target_offset"] cdef int64_t _target_offset = _namespace["_target_offset"] cdef int32_t i # namespace for function rand global _namespace_rand_buffer global _namespace_num_rand_buffer cdef _numpy.ndarray[int64_t, ndim=1, mode='c'] _buf__rand_buffer = _namespace['_rand_buffer'] _namespace_rand_buffer = _buf__rand_buffer.data _namespace_num_rand_buffer = len(_namespace['_rand_buffer']) # namespace for function rand global _namespace_rand_buffer_index global _namespace_num_rand_buffer_index cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__rand_buffer_index = _namespace['_rand_buffer_index'] _namespace_rand_buffer_index = _buf__rand_buffer_index.data _namespace_num_rand_buffer_index = len(_namespace['_rand_buffer_index']) _var_umetre = _namespace["_var_umetre"] cdef double umetre = _namespace["umetre"] _var_z_soma_post = _namespace["_var_z_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_inh_z_soma = _namespace['_array_DG_inh_z_soma'] cdef double * _array_DG_inh_z_soma = _buf__array_DG_inh_z_soma.data cdef size_t _num_array_DG_inh_z_soma = len(_namespace['_array_DG_inh_z_soma']) cdef double z_soma_post _var_z_soma_pre = _namespace["_var_z_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_z_soma = _namespace['_array_EC_pyCAN_z_soma'] cdef double * _array_EC_pyCAN_z_soma = _buf__array_EC_pyCAN_z_soma.data cdef size_t _num_array_EC_pyCAN_z_soma = len(_namespace['_array_EC_pyCAN_z_soma']) cdef double z_soma_pre cdef double _lio_create_cond_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:14:47,744 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name EC_pyCANtoDG_inh_synapses_create_generator_codeobject 2021-11-05 15:14:47,745 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "EC_pyCANtoDG_inh_synapses_create_generator" using Cython module "_cython_magic_cd40b9d6d7ee0f51824a2fb3637803dc" 2021-11-05 15:14:47,745 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140606328051216 on /home/nikos/.cython/brian_extensions/_cython_magic_cd40b9d6d7ee0f51824a2fb3637803dc.lock 2021-11-05 15:14:47,745 DEBUG brian2.utils.filelock: Lock 140606328051216 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_cd40b9d6d7ee0f51824a2fb3637803dc.lock 2021-11-05 15:14:47,746 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140606328051216 on /home/nikos/.cython/brian_extensions/_cython_magic_cd40b9d6d7ee0f51824a2fb3637803dc.lock 2021-11-05 15:14:47,746 DEBUG brian2.utils.filelock: Lock 140606328051216 released on /home/nikos/.cython/brian_extensions/_cython_magic_cd40b9d6d7ee0f51824a2fb3637803dc.lock 2021-11-05 15:14:47,766 DIAGNOSTIC brian2.core.names: Created object of class Synapses with name EC_pyCANtoCA3_pyCAN 2021-11-05 15:14:47,767 DIAGNOSTIC brian2.core.base: Created BrianObject with name EC_pyCANtoCA3_pyCAN, clock=Clock(dt=100. * usecond, name='defaultclock'), when=start, order=0 2021-11-05 15:14:47,770 DIAGNOSTIC brian2.core.names: Created object of class SynapticPathway with name EC_pyCANtoCA3_pyCAN_pre 2021-11-05 15:14:47,770 DIAGNOSTIC brian2.core.base: Created BrianObject with name EC_pyCANtoCA3_pyCAN_pre, clock=Clock(dt=100. * usecond, name='defaultclock'), when=synapses, order=-1 2021-11-05 15:14:47,781 DEBUG brian2.synapses.synapses: Creating synapses from group 'EC_pyCAN' to group 'CA3_pyCAN', using generator '_k for _k in range(N_post) if (i!=_k) and rand()<0.2*exp(-((z_soma_pre-z_soma_post)**2)/(2*(1000*umetre)**2))' 2021-11-05 15:14:47,781 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=EC_pyCANtoCA3_pyCAN, template name=synapses_create_generator) for abstract code: Key setup_iterator: _iter_low = 0 _iter_high = N_post _iter_step = 1 Key create_j: _pre_idx = _raw_pre_idx _j = _k Key create_cond: _post_idx = _raw_post_idx _cond = (i != _k) and (rand() < (0.2 * exp((- ((z_soma_pre - z_soma_post) ** 2)) / (2 * ((1000 * umetre) ** 2))))) Key update_post: _post_idx = _raw_post_idx _n = 1 2021-11-05 15:14:47,845 DIAGNOSTIC brian2.devices.device: EC_pyCANtoCA3_pyCAN_synapses_create_generator_codeobject abstract code: Key setup_iterator: _iter_low = 0 _iter_high = N_post _iter_step = 1 Key create_j: _pre_idx = _raw_pre_idx _j = _k Key create_cond: _post_idx = _raw_post_idx _cond = (i != _k) and (rand() < (0.2 * exp((- ((z_soma_pre - z_soma_post) ** 2)) / (2 * ((1000 * umetre) ** 2))))) Key update_post: _post_idx = _raw_post_idx _n = 1 2021-11-05 15:14:47,849 DIAGNOSTIC brian2.devices.device: EC_pyCANtoCA3_pyCAN_synapses_create_generator_codeobject snippet (scalar): Key setup_iterator: Key create_j: Key create_cond: _lio_create_cond_1 = 0.5 / ((1000.0 * umetre) ** 2) Key update_post: 2021-11-05 15:14:47,849 DIAGNOSTIC brian2.devices.device: EC_pyCANtoCA3_pyCAN_synapses_create_generator_codeobject snippet (vector): Key setup_iterator: _iter_low = 0 _iter_high = N_post _iter_step = 1 Key create_j: _pre_idx = _raw_pre_idx _j = _k Key create_cond: z_soma_post = _array_CA3_pyCAN_z_soma[_raw_post_idx] z_soma_pre = _array_EC_pyCAN_z_soma[_raw_pre_idx] _post_idx = _raw_post_idx i = _i _cond = (i != _k) and (_rand(_vectorisation_idx) < (0.2 * exp(_lio_create_cond_1 * (- ((z_soma_pre - z_soma_post) ** 2))))) Key update_post: _post_idx = _raw_post_idx _n = 1 2021-11-05 15:14:47,849 DIAGNOSTIC brian2.devices.device: EC_pyCANtoCA3_pyCAN_synapses_create_generator_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code cdef int64_t *_namespace_rand_buffer cdef int32_t *_namespace_rand_buffer_index cdef double _rand(int _idx): cdef double **buffer_pointer = _namespace_rand_buffer cdef double *buffer = buffer_pointer[0] cdef _numpy.ndarray _new_rand if(_namespace_rand_buffer_index[0] == 0): if buffer != NULL: free(buffer) _new_rand = _numpy.random.rand(20000) buffer = _numpy.PyArray_DATA(_new_rand) PyArray_CLEARFLAGS(<_numpy.PyArrayObject*>_new_rand, _numpy.NPY_OWNDATA) buffer_pointer[0] = buffer cdef double val = buffer[_namespace_rand_buffer_index[0]] _namespace_rand_buffer_index[0] += 1 if _namespace_rand_buffer_index[0] == 20000: _namespace_rand_buffer_index[0] = 0 return val # template-specific support code cdef int _buffer_size = 1024 cdef int[:] _prebuf = _numpy.zeros(_buffer_size, dtype=_numpy.int32) cdef int[:] _postbuf = _numpy.zeros(_buffer_size, dtype=_numpy.int32) cdef int _curbuf = 0 cdef int _raw_pre_idx cdef int _raw_post_idx cdef void _flush_buffer(buf, dynarr, int buf_len): cdef size_t _curlen = dynarr.shape[0] cdef size_t _newlen = _curlen+buf_len # Resize the array dynarr.resize(_newlen) # Get the potentially newly created underlying data arrays data = dynarr.data data[_curlen:_curlen+buf_len] = buf[:buf_len] def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoCA3_pyCAN_N = _namespace['_array_EC_pyCANtoCA3_pyCAN_N'] cdef int32_t * _array_EC_pyCANtoCA3_pyCAN_N = _buf__array_EC_pyCANtoCA3_pyCAN_N.data cdef int32_t N = _namespace["N"] _var_N_post = _namespace["_var_N_post"] cdef int64_t N_post = _namespace["N_post"] _var_N_pre = _namespace["_var_N_pre"] cdef int64_t N_pre = _namespace["N_pre"] cdef bool _cond cdef int32_t _i cdef int32_t _iter_high cdef int32_t _iter_low cdef int32_t _iter_step cdef int32_t _j cdef int32_t _k cdef int32_t _n cdef int32_t _post_idx cdef int32_t _pre_idx cdef int32_t _raw_post_idx cdef int32_t _raw_pre_idx _var__source_offset = _namespace["_var__source_offset"] cdef int64_t _source_offset = _namespace["_source_offset"] _var__synaptic_post = _namespace["_var__synaptic_post"] _dynamic_array_EC_pyCANtoCA3_pyCAN__synaptic_post = _namespace["_dynamic_array_EC_pyCANtoCA3_pyCAN__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoCA3_pyCAN__synaptic_post = _namespace['_array_EC_pyCANtoCA3_pyCAN__synaptic_post'] cdef int32_t * _array_EC_pyCANtoCA3_pyCAN__synaptic_post = _buf__array_EC_pyCANtoCA3_pyCAN__synaptic_post.data cdef size_t _num_array_EC_pyCANtoCA3_pyCAN__synaptic_post = len(_namespace['_array_EC_pyCANtoCA3_pyCAN__synaptic_post']) cdef int32_t _synaptic_post _var__synaptic_pre = _namespace["_var__synaptic_pre"] _dynamic_array_EC_pyCANtoCA3_pyCAN__synaptic_pre = _namespace["_dynamic_array_EC_pyCANtoCA3_pyCAN__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoCA3_pyCAN__synaptic_pre = _namespace['_array_EC_pyCANtoCA3_pyCAN__synaptic_pre'] cdef int32_t * _array_EC_pyCANtoCA3_pyCAN__synaptic_pre = _buf__array_EC_pyCANtoCA3_pyCAN__synaptic_pre.data cdef size_t _num_array_EC_pyCANtoCA3_pyCAN__synaptic_pre = len(_namespace['_array_EC_pyCANtoCA3_pyCAN__synaptic_pre']) cdef int32_t _synaptic_pre _var__target_offset = _namespace["_var__target_offset"] cdef int64_t _target_offset = _namespace["_target_offset"] cdef int32_t i # namespace for function rand global _namespace_rand_buffer global _namespace_num_rand_buffer cdef _numpy.ndarray[int64_t, ndim=1, mode='c'] _buf__rand_buffer = _namespace['_rand_buffer'] _namespace_rand_buffer = _buf__rand_buffer.data _namespace_num_rand_buffer = len(_namespace['_rand_buffer']) # namespace for function rand global _namespace_rand_buffer_index global _namespace_num_rand_buffer_index cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__rand_buffer_index = _namespace['_rand_buffer_index'] _namespace_rand_buffer_index = _buf__rand_buffer_index.data _namespace_num_rand_buffer_index = len(_namespace['_rand_buffer_index']) _var_umetre = _namespace["_var_umetre"] cdef double umetre = _namespace["umetre"] _var_z_soma_post = _namespace["_var_z_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_z_soma = _namespace['_array_CA3_pyCAN_z_soma'] cdef double * _array_CA3_pyCAN_z_soma = _buf__array_CA3_pyCAN_z_soma.data cdef size_t _num_array_CA3_pyCAN_z_soma = len(_namespace['_array_CA3_pyCAN_z_soma']) cdef double z_soma_post _var_z_soma_pre = _namespace["_var_z_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_z_soma = _namespace['_array_EC_pyCAN_z_soma'] cdef double * _array_EC_pyCAN_z_soma = _buf__array_EC_pyCAN_z_soma.data cdef size_t _num_array_EC_pyCAN_z_soma = len(_namespace['_array_EC_pyCAN_z_soma']) cdef double z_soma_pre cdef double _lio_create_cond_1 if '_owner' in _namespace: _owner = _namespace['_owner'] cdef int* _prebuf_ptr = &(_prebuf[0]) cdef int* _postbuf_ptr = &(_postbuf[0]) global _curbuf cdef size_t oldsize = len(_dynamic_array_EC_pyCANtoCA3_pyCAN__synaptic_pre) cdef size_t newsize # The following variables are only used for probabilistic connections cdef bool _jump_algo cdef double _log1p, _pconst cdef size_t _jump # scalar code _vectorisation_idx = 1 _lio_create_cond_1 = 0.5 / ((1000.0 * umetre) ** 2) for _i in range(N_pre): _raw_pre_idx = _i + _source_offset _iter_low = 0 _iter_high = N_post _iter_step = 1 for _k in range(_iter_low, _iter_high, _iter_step): _pre_idx = _raw_pre_idx _j = _k _raw_post_idx = _j + _target_offset if _j<0 or _j>=N_post: raise IndexError("index j=%d outside allowed range from 0 to %d" % (_j, N_post-1)) z_soma_post = _array_CA3_pyCAN_z_soma[_raw_post_idx] z_soma_pre = _array_EC_pyCAN_z_soma[_raw_pre_idx] _post_idx = _raw_post_idx i = _i _cond = (i != _k) and (_rand(_vectorisation_idx) < (0.2 * exp(_lio_create_cond_1 * (- ((z_soma_pre - z_soma_post) ** 2))))) if not _cond: continue _post_idx = _raw_post_idx _n = 1 for _repetition in range(_n): _prebuf_ptr[_curbuf] = _pre_idx _postbuf_ptr[_curbuf] = _post_idx _curbuf += 1 # Flush buffer if _curbuf==_buffer_size: _flush_buffer(_prebuf, _dynamic_array_EC_pyCANtoCA3_pyCAN__synaptic_pre, _curbuf) _flush_buffer(_postbuf, _dynamic_array_EC_pyCANtoCA3_pyCAN__synaptic_post, _curbuf) _curbuf = 0 # Final buffer flush _flush_buffer(_prebuf, _dynamic_array_EC_pyCANtoCA3_pyCAN__synaptic_pre, _curbuf) _flush_buffer(_postbuf, _dynamic_array_EC_pyCANtoCA3_pyCAN__synaptic_post, _curbuf) _curbuf = 0 # reset the buffer for the next run newsize = len(_dynamic_array_EC_pyCANtoCA3_pyCAN__synaptic_pre) # now we need to resize all registered variables and set the total number # of synapse (via Python) _owner._resize(newsize) # And update N_incoming, N_outgoing and synapse_number _owner._update_synapse_numbers(oldsize) before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoCA3_pyCAN_N = _namespace['_array_EC_pyCANtoCA3_pyCAN_N'] cdef int32_t * _array_EC_pyCANtoCA3_pyCAN_N = _buf__array_EC_pyCANtoCA3_pyCAN_N.data cdef int32_t N = _namespace["N"] _var_N_post = _namespace["_var_N_post"] cdef int64_t N_post = _namespace["N_post"] _var_N_pre = _namespace["_var_N_pre"] cdef int64_t N_pre = _namespace["N_pre"] cdef bool _cond cdef int32_t _i cdef int32_t _iter_high cdef int32_t _iter_low cdef int32_t _iter_step cdef int32_t _j cdef int32_t _k cdef int32_t _n cdef int32_t _post_idx cdef int32_t _pre_idx cdef int32_t _raw_post_idx cdef int32_t _raw_pre_idx _var__source_offset = _namespace["_var__source_offset"] cdef int64_t _source_offset = _namespace["_source_offset"] _var__synaptic_post = _namespace["_var__synaptic_post"] _dynamic_array_EC_pyCANtoCA3_pyCAN__synaptic_post = _namespace["_dynamic_array_EC_pyCANtoCA3_pyCAN__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoCA3_pyCAN__synaptic_post = _namespace['_array_EC_pyCANtoCA3_pyCAN__synaptic_post'] cdef int32_t * _array_EC_pyCANtoCA3_pyCAN__synaptic_post = _buf__array_EC_pyCANtoCA3_pyCAN__synaptic_post.data cdef size_t _num_array_EC_pyCANtoCA3_pyCAN__synaptic_post = len(_namespace['_array_EC_pyCANtoCA3_pyCAN__synaptic_post']) cdef int32_t _synaptic_post _var__synaptic_pre = _namespace["_var__synaptic_pre"] _dynamic_array_EC_pyCANtoCA3_pyCAN__synaptic_pre = _namespace["_dynamic_array_EC_pyCANtoCA3_pyCAN__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoCA3_pyCAN__synaptic_pre = _namespace['_array_EC_pyCANtoCA3_pyCAN__synaptic_pre'] cdef int32_t * _array_EC_pyCANtoCA3_pyCAN__synaptic_pre = _buf__array_EC_pyCANtoCA3_pyCAN__synaptic_pre.data cdef size_t _num_array_EC_pyCANtoCA3_pyCAN__synaptic_pre = len(_namespace['_array_EC_pyCANtoCA3_pyCAN__synaptic_pre']) cdef int32_t _synaptic_pre _var__target_offset = _namespace["_var__target_offset"] cdef int64_t _target_offset = _namespace["_target_offset"] cdef int32_t i # namespace for function rand global _namespace_rand_buffer global _namespace_num_rand_buffer cdef _numpy.ndarray[int64_t, ndim=1, mode='c'] _buf__rand_buffer = _namespace['_rand_buffer'] _namespace_rand_buffer = _buf__rand_buffer.data _namespace_num_rand_buffer = len(_namespace['_rand_buffer']) # namespace for function rand global _namespace_rand_buffer_index global _namespace_num_rand_buffer_index cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__rand_buffer_index = _namespace['_rand_buffer_index'] _namespace_rand_buffer_index = _buf__rand_buffer_index.data _namespace_num_rand_buffer_index = len(_namespace['_rand_buffer_index']) _var_umetre = _namespace["_var_umetre"] cdef double umetre = _namespace["umetre"] _var_z_soma_post = _namespace["_var_z_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_z_soma = _namespace['_array_CA3_pyCAN_z_soma'] cdef double * _array_CA3_pyCAN_z_soma = _buf__array_CA3_pyCAN_z_soma.data cdef size_t _num_array_CA3_pyCAN_z_soma = len(_namespace['_array_CA3_pyCAN_z_soma']) cdef double z_soma_post _var_z_soma_pre = _namespace["_var_z_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_z_soma = _namespace['_array_EC_pyCAN_z_soma'] cdef double * _array_EC_pyCAN_z_soma = _buf__array_EC_pyCAN_z_soma.data cdef size_t _num_array_EC_pyCAN_z_soma = len(_namespace['_array_EC_pyCAN_z_soma']) cdef double z_soma_pre cdef double _lio_create_cond_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoCA3_pyCAN_N = _namespace['_array_EC_pyCANtoCA3_pyCAN_N'] cdef int32_t * _array_EC_pyCANtoCA3_pyCAN_N = _buf__array_EC_pyCANtoCA3_pyCAN_N.data cdef int32_t N = _namespace["N"] _var_N_post = _namespace["_var_N_post"] cdef int64_t N_post = _namespace["N_post"] _var_N_pre = _namespace["_var_N_pre"] cdef int64_t N_pre = _namespace["N_pre"] cdef bool _cond cdef int32_t _i cdef int32_t _iter_high cdef int32_t _iter_low cdef int32_t _iter_step cdef int32_t _j cdef int32_t _k cdef int32_t _n cdef int32_t _post_idx cdef int32_t _pre_idx cdef int32_t _raw_post_idx cdef int32_t _raw_pre_idx _var__source_offset = _namespace["_var__source_offset"] cdef int64_t _source_offset = _namespace["_source_offset"] _var__synaptic_post = _namespace["_var__synaptic_post"] _dynamic_array_EC_pyCANtoCA3_pyCAN__synaptic_post = _namespace["_dynamic_array_EC_pyCANtoCA3_pyCAN__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoCA3_pyCAN__synaptic_post = _namespace['_array_EC_pyCANtoCA3_pyCAN__synaptic_post'] cdef int32_t * _array_EC_pyCANtoCA3_pyCAN__synaptic_post = _buf__array_EC_pyCANtoCA3_pyCAN__synaptic_post.data cdef size_t _num_array_EC_pyCANtoCA3_pyCAN__synaptic_post = len(_namespace['_array_EC_pyCANtoCA3_pyCAN__synaptic_post']) cdef int32_t _synaptic_post _var__synaptic_pre = _namespace["_var__synaptic_pre"] _dynamic_array_EC_pyCANtoCA3_pyCAN__synaptic_pre = _namespace["_dynamic_array_EC_pyCANtoCA3_pyCAN__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoCA3_pyCAN__synaptic_pre = _namespace['_array_EC_pyCANtoCA3_pyCAN__synaptic_pre'] cdef int32_t * _array_EC_pyCANtoCA3_pyCAN__synaptic_pre = _buf__array_EC_pyCANtoCA3_pyCAN__synaptic_pre.data cdef size_t _num_array_EC_pyCANtoCA3_pyCAN__synaptic_pre = len(_namespace['_array_EC_pyCANtoCA3_pyCAN__synaptic_pre']) cdef int32_t _synaptic_pre _var__target_offset = _namespace["_var__target_offset"] cdef int64_t _target_offset = _namespace["_target_offset"] cdef int32_t i # namespace for function rand global _namespace_rand_buffer global _namespace_num_rand_buffer cdef _numpy.ndarray[int64_t, ndim=1, mode='c'] _buf__rand_buffer = _namespace['_rand_buffer'] _namespace_rand_buffer = _buf__rand_buffer.data _namespace_num_rand_buffer = len(_namespace['_rand_buffer']) # namespace for function rand global _namespace_rand_buffer_index global _namespace_num_rand_buffer_index cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__rand_buffer_index = _namespace['_rand_buffer_index'] _namespace_rand_buffer_index = _buf__rand_buffer_index.data _namespace_num_rand_buffer_index = len(_namespace['_rand_buffer_index']) _var_umetre = _namespace["_var_umetre"] cdef double umetre = _namespace["umetre"] _var_z_soma_post = _namespace["_var_z_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_z_soma = _namespace['_array_CA3_pyCAN_z_soma'] cdef double * _array_CA3_pyCAN_z_soma = _buf__array_CA3_pyCAN_z_soma.data cdef size_t _num_array_CA3_pyCAN_z_soma = len(_namespace['_array_CA3_pyCAN_z_soma']) cdef double z_soma_post _var_z_soma_pre = _namespace["_var_z_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_z_soma = _namespace['_array_EC_pyCAN_z_soma'] cdef double * _array_EC_pyCAN_z_soma = _buf__array_EC_pyCAN_z_soma.data cdef size_t _num_array_EC_pyCAN_z_soma = len(_namespace['_array_EC_pyCAN_z_soma']) cdef double z_soma_pre cdef double _lio_create_cond_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:14:47,850 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name EC_pyCANtoCA3_pyCAN_synapses_create_generator_codeobject 2021-11-05 15:14:47,850 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "EC_pyCANtoCA3_pyCAN_synapses_create_generator" using Cython module "_cython_magic_ed5f82b22cb929e1fb3ecc2a81d21c70" 2021-11-05 15:14:47,850 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140605418944112 on /home/nikos/.cython/brian_extensions/_cython_magic_ed5f82b22cb929e1fb3ecc2a81d21c70.lock 2021-11-05 15:14:47,850 DEBUG brian2.utils.filelock: Lock 140605418944112 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_ed5f82b22cb929e1fb3ecc2a81d21c70.lock 2021-11-05 15:14:47,851 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140605418944112 on /home/nikos/.cython/brian_extensions/_cython_magic_ed5f82b22cb929e1fb3ecc2a81d21c70.lock 2021-11-05 15:14:47,851 DEBUG brian2.utils.filelock: Lock 140605418944112 released on /home/nikos/.cython/brian_extensions/_cython_magic_ed5f82b22cb929e1fb3ecc2a81d21c70.lock 2021-11-05 15:14:48,075 DIAGNOSTIC brian2.core.names: Created object of class Synapses with name EC_pyCANtoCA3_inh 2021-11-05 15:14:48,075 DIAGNOSTIC brian2.core.base: Created BrianObject with name EC_pyCANtoCA3_inh, clock=Clock(dt=100. * usecond, name='defaultclock'), when=start, order=0 2021-11-05 15:14:48,078 DIAGNOSTIC brian2.core.names: Created object of class SynapticPathway with name EC_pyCANtoCA3_inh_pre 2021-11-05 15:14:48,078 DIAGNOSTIC brian2.core.base: Created BrianObject with name EC_pyCANtoCA3_inh_pre, clock=Clock(dt=100. * usecond, name='defaultclock'), when=synapses, order=-1 2021-11-05 15:14:48,089 DEBUG brian2.synapses.synapses: Creating synapses from group 'EC_pyCAN' to group 'CA3_inh', using generator '_k for _k in range(N_post) if (i!=_k) and rand()<0.2*exp(-((z_soma_pre-z_soma_post)**2)/(2*(1000*umetre)**2))' 2021-11-05 15:14:48,089 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=EC_pyCANtoCA3_inh, template name=synapses_create_generator) for abstract code: Key setup_iterator: _iter_low = 0 _iter_high = N_post _iter_step = 1 Key create_j: _pre_idx = _raw_pre_idx _j = _k Key create_cond: _post_idx = _raw_post_idx _cond = (i != _k) and (rand() < (0.2 * exp((- ((z_soma_pre - z_soma_post) ** 2)) / (2 * ((1000 * umetre) ** 2))))) Key update_post: _post_idx = _raw_post_idx _n = 1 2021-11-05 15:14:48,145 DIAGNOSTIC brian2.devices.device: EC_pyCANtoCA3_inh_synapses_create_generator_codeobject abstract code: Key setup_iterator: _iter_low = 0 _iter_high = N_post _iter_step = 1 Key create_j: _pre_idx = _raw_pre_idx _j = _k Key create_cond: _post_idx = _raw_post_idx _cond = (i != _k) and (rand() < (0.2 * exp((- ((z_soma_pre - z_soma_post) ** 2)) / (2 * ((1000 * umetre) ** 2))))) Key update_post: _post_idx = _raw_post_idx _n = 1 2021-11-05 15:14:48,148 DIAGNOSTIC brian2.devices.device: EC_pyCANtoCA3_inh_synapses_create_generator_codeobject snippet (scalar): Key setup_iterator: Key create_j: Key create_cond: _lio_create_cond_1 = 0.5 / ((1000.0 * umetre) ** 2) Key update_post: 2021-11-05 15:14:48,148 DIAGNOSTIC brian2.devices.device: EC_pyCANtoCA3_inh_synapses_create_generator_codeobject snippet (vector): Key setup_iterator: _iter_low = 0 _iter_high = N_post _iter_step = 1 Key create_j: _pre_idx = _raw_pre_idx _j = _k Key create_cond: z_soma_post = _array_CA3_inh_z_soma[_raw_post_idx] z_soma_pre = _array_EC_pyCAN_z_soma[_raw_pre_idx] _post_idx = _raw_post_idx i = _i _cond = (i != _k) and (_rand(_vectorisation_idx) < (0.2 * exp(_lio_create_cond_1 * (- ((z_soma_pre - z_soma_post) ** 2))))) Key update_post: _post_idx = _raw_post_idx _n = 1 2021-11-05 15:14:48,149 DIAGNOSTIC brian2.devices.device: EC_pyCANtoCA3_inh_synapses_create_generator_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code cdef int64_t *_namespace_rand_buffer cdef int32_t *_namespace_rand_buffer_index cdef double _rand(int _idx): cdef double **buffer_pointer = _namespace_rand_buffer cdef double *buffer = buffer_pointer[0] cdef _numpy.ndarray _new_rand if(_namespace_rand_buffer_index[0] == 0): if buffer != NULL: free(buffer) _new_rand = _numpy.random.rand(20000) buffer = _numpy.PyArray_DATA(_new_rand) PyArray_CLEARFLAGS(<_numpy.PyArrayObject*>_new_rand, _numpy.NPY_OWNDATA) buffer_pointer[0] = buffer cdef double val = buffer[_namespace_rand_buffer_index[0]] _namespace_rand_buffer_index[0] += 1 if _namespace_rand_buffer_index[0] == 20000: _namespace_rand_buffer_index[0] = 0 return val # template-specific support code cdef int _buffer_size = 1024 cdef int[:] _prebuf = _numpy.zeros(_buffer_size, dtype=_numpy.int32) cdef int[:] _postbuf = _numpy.zeros(_buffer_size, dtype=_numpy.int32) cdef int _curbuf = 0 cdef int _raw_pre_idx cdef int _raw_post_idx cdef void _flush_buffer(buf, dynarr, int buf_len): cdef size_t _curlen = dynarr.shape[0] cdef size_t _newlen = _curlen+buf_len # Resize the array dynarr.resize(_newlen) # Get the potentially newly created underlying data arrays data = dynarr.data data[_curlen:_curlen+buf_len] = buf[:buf_len] def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoCA3_inh_N = _namespace['_array_EC_pyCANtoCA3_inh_N'] cdef int32_t * _array_EC_pyCANtoCA3_inh_N = _buf__array_EC_pyCANtoCA3_inh_N.data cdef int32_t N = _namespace["N"] _var_N_post = _namespace["_var_N_post"] cdef int64_t N_post = _namespace["N_post"] _var_N_pre = _namespace["_var_N_pre"] cdef int64_t N_pre = _namespace["N_pre"] cdef bool _cond cdef int32_t _i cdef int32_t _iter_high cdef int32_t _iter_low cdef int32_t _iter_step cdef int32_t _j cdef int32_t _k cdef int32_t _n cdef int32_t _post_idx cdef int32_t _pre_idx cdef int32_t _raw_post_idx cdef int32_t _raw_pre_idx _var__source_offset = _namespace["_var__source_offset"] cdef int64_t _source_offset = _namespace["_source_offset"] _var__synaptic_post = _namespace["_var__synaptic_post"] _dynamic_array_EC_pyCANtoCA3_inh__synaptic_post = _namespace["_dynamic_array_EC_pyCANtoCA3_inh__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoCA3_inh__synaptic_post = _namespace['_array_EC_pyCANtoCA3_inh__synaptic_post'] cdef int32_t * _array_EC_pyCANtoCA3_inh__synaptic_post = _buf__array_EC_pyCANtoCA3_inh__synaptic_post.data cdef size_t _num_array_EC_pyCANtoCA3_inh__synaptic_post = len(_namespace['_array_EC_pyCANtoCA3_inh__synaptic_post']) cdef int32_t _synaptic_post _var__synaptic_pre = _namespace["_var__synaptic_pre"] _dynamic_array_EC_pyCANtoCA3_inh__synaptic_pre = _namespace["_dynamic_array_EC_pyCANtoCA3_inh__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoCA3_inh__synaptic_pre = _namespace['_array_EC_pyCANtoCA3_inh__synaptic_pre'] cdef int32_t * _array_EC_pyCANtoCA3_inh__synaptic_pre = _buf__array_EC_pyCANtoCA3_inh__synaptic_pre.data cdef size_t _num_array_EC_pyCANtoCA3_inh__synaptic_pre = len(_namespace['_array_EC_pyCANtoCA3_inh__synaptic_pre']) cdef int32_t _synaptic_pre _var__target_offset = _namespace["_var__target_offset"] cdef int64_t _target_offset = _namespace["_target_offset"] cdef int32_t i # namespace for function rand global _namespace_rand_buffer global _namespace_num_rand_buffer cdef _numpy.ndarray[int64_t, ndim=1, mode='c'] _buf__rand_buffer = _namespace['_rand_buffer'] _namespace_rand_buffer = _buf__rand_buffer.data _namespace_num_rand_buffer = len(_namespace['_rand_buffer']) # namespace for function rand global _namespace_rand_buffer_index global _namespace_num_rand_buffer_index cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__rand_buffer_index = _namespace['_rand_buffer_index'] _namespace_rand_buffer_index = _buf__rand_buffer_index.data _namespace_num_rand_buffer_index = len(_namespace['_rand_buffer_index']) _var_umetre = _namespace["_var_umetre"] cdef double umetre = _namespace["umetre"] _var_z_soma_post = _namespace["_var_z_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_inh_z_soma = _namespace['_array_CA3_inh_z_soma'] cdef double * _array_CA3_inh_z_soma = _buf__array_CA3_inh_z_soma.data cdef size_t _num_array_CA3_inh_z_soma = len(_namespace['_array_CA3_inh_z_soma']) cdef double z_soma_post _var_z_soma_pre = _namespace["_var_z_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_z_soma = _namespace['_array_EC_pyCAN_z_soma'] cdef double * _array_EC_pyCAN_z_soma = _buf__array_EC_pyCAN_z_soma.data cdef size_t _num_array_EC_pyCAN_z_soma = len(_namespace['_array_EC_pyCAN_z_soma']) cdef double z_soma_pre cdef double _lio_create_cond_1 if '_owner' in _namespace: _owner = _namespace['_owner'] cdef int* _prebuf_ptr = &(_prebuf[0]) cdef int* _postbuf_ptr = &(_postbuf[0]) global _curbuf cdef size_t oldsize = len(_dynamic_array_EC_pyCANtoCA3_inh__synaptic_pre) cdef size_t newsize # The following variables are only used for probabilistic connections cdef bool _jump_algo cdef double _log1p, _pconst cdef size_t _jump # scalar code _vectorisation_idx = 1 _lio_create_cond_1 = 0.5 / ((1000.0 * umetre) ** 2) for _i in range(N_pre): _raw_pre_idx = _i + _source_offset _iter_low = 0 _iter_high = N_post _iter_step = 1 for _k in range(_iter_low, _iter_high, _iter_step): _pre_idx = _raw_pre_idx _j = _k _raw_post_idx = _j + _target_offset if _j<0 or _j>=N_post: raise IndexError("index j=%d outside allowed range from 0 to %d" % (_j, N_post-1)) z_soma_post = _array_CA3_inh_z_soma[_raw_post_idx] z_soma_pre = _array_EC_pyCAN_z_soma[_raw_pre_idx] _post_idx = _raw_post_idx i = _i _cond = (i != _k) and (_rand(_vectorisation_idx) < (0.2 * exp(_lio_create_cond_1 * (- ((z_soma_pre - z_soma_post) ** 2))))) if not _cond: continue _post_idx = _raw_post_idx _n = 1 for _repetition in range(_n): _prebuf_ptr[_curbuf] = _pre_idx _postbuf_ptr[_curbuf] = _post_idx _curbuf += 1 # Flush buffer if _curbuf==_buffer_size: _flush_buffer(_prebuf, _dynamic_array_EC_pyCANtoCA3_inh__synaptic_pre, _curbuf) _flush_buffer(_postbuf, _dynamic_array_EC_pyCANtoCA3_inh__synaptic_post, _curbuf) _curbuf = 0 # Final buffer flush _flush_buffer(_prebuf, _dynamic_array_EC_pyCANtoCA3_inh__synaptic_pre, _curbuf) _flush_buffer(_postbuf, _dynamic_array_EC_pyCANtoCA3_inh__synaptic_post, _curbuf) _curbuf = 0 # reset the buffer for the next run newsize = len(_dynamic_array_EC_pyCANtoCA3_inh__synaptic_pre) # now we need to resize all registered variables and set the total number # of synapse (via Python) _owner._resize(newsize) # And update N_incoming, N_outgoing and synapse_number _owner._update_synapse_numbers(oldsize) before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoCA3_inh_N = _namespace['_array_EC_pyCANtoCA3_inh_N'] cdef int32_t * _array_EC_pyCANtoCA3_inh_N = _buf__array_EC_pyCANtoCA3_inh_N.data cdef int32_t N = _namespace["N"] _var_N_post = _namespace["_var_N_post"] cdef int64_t N_post = _namespace["N_post"] _var_N_pre = _namespace["_var_N_pre"] cdef int64_t N_pre = _namespace["N_pre"] cdef bool _cond cdef int32_t _i cdef int32_t _iter_high cdef int32_t _iter_low cdef int32_t _iter_step cdef int32_t _j cdef int32_t _k cdef int32_t _n cdef int32_t _post_idx cdef int32_t _pre_idx cdef int32_t _raw_post_idx cdef int32_t _raw_pre_idx _var__source_offset = _namespace["_var__source_offset"] cdef int64_t _source_offset = _namespace["_source_offset"] _var__synaptic_post = _namespace["_var__synaptic_post"] _dynamic_array_EC_pyCANtoCA3_inh__synaptic_post = _namespace["_dynamic_array_EC_pyCANtoCA3_inh__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoCA3_inh__synaptic_post = _namespace['_array_EC_pyCANtoCA3_inh__synaptic_post'] cdef int32_t * _array_EC_pyCANtoCA3_inh__synaptic_post = _buf__array_EC_pyCANtoCA3_inh__synaptic_post.data cdef size_t _num_array_EC_pyCANtoCA3_inh__synaptic_post = len(_namespace['_array_EC_pyCANtoCA3_inh__synaptic_post']) cdef int32_t _synaptic_post _var__synaptic_pre = _namespace["_var__synaptic_pre"] _dynamic_array_EC_pyCANtoCA3_inh__synaptic_pre = _namespace["_dynamic_array_EC_pyCANtoCA3_inh__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoCA3_inh__synaptic_pre = _namespace['_array_EC_pyCANtoCA3_inh__synaptic_pre'] cdef int32_t * _array_EC_pyCANtoCA3_inh__synaptic_pre = _buf__array_EC_pyCANtoCA3_inh__synaptic_pre.data cdef size_t _num_array_EC_pyCANtoCA3_inh__synaptic_pre = len(_namespace['_array_EC_pyCANtoCA3_inh__synaptic_pre']) cdef int32_t _synaptic_pre _var__target_offset = _namespace["_var__target_offset"] cdef int64_t _target_offset = _namespace["_target_offset"] cdef int32_t i # namespace for function rand global _namespace_rand_buffer global _namespace_num_rand_buffer cdef _numpy.ndarray[int64_t, ndim=1, mode='c'] _buf__rand_buffer = _namespace['_rand_buffer'] _namespace_rand_buffer = _buf__rand_buffer.data _namespace_num_rand_buffer = len(_namespace['_rand_buffer']) # namespace for function rand global _namespace_rand_buffer_index global _namespace_num_rand_buffer_index cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__rand_buffer_index = _namespace['_rand_buffer_index'] _namespace_rand_buffer_index = _buf__rand_buffer_index.data _namespace_num_rand_buffer_index = len(_namespace['_rand_buffer_index']) _var_umetre = _namespace["_var_umetre"] cdef double umetre = _namespace["umetre"] _var_z_soma_post = _namespace["_var_z_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_inh_z_soma = _namespace['_array_CA3_inh_z_soma'] cdef double * _array_CA3_inh_z_soma = _buf__array_CA3_inh_z_soma.data cdef size_t _num_array_CA3_inh_z_soma = len(_namespace['_array_CA3_inh_z_soma']) cdef double z_soma_post _var_z_soma_pre = _namespace["_var_z_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_z_soma = _namespace['_array_EC_pyCAN_z_soma'] cdef double * _array_EC_pyCAN_z_soma = _buf__array_EC_pyCAN_z_soma.data cdef size_t _num_array_EC_pyCAN_z_soma = len(_namespace['_array_EC_pyCAN_z_soma']) cdef double z_soma_pre cdef double _lio_create_cond_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoCA3_inh_N = _namespace['_array_EC_pyCANtoCA3_inh_N'] cdef int32_t * _array_EC_pyCANtoCA3_inh_N = _buf__array_EC_pyCANtoCA3_inh_N.data cdef int32_t N = _namespace["N"] _var_N_post = _namespace["_var_N_post"] cdef int64_t N_post = _namespace["N_post"] _var_N_pre = _namespace["_var_N_pre"] cdef int64_t N_pre = _namespace["N_pre"] cdef bool _cond cdef int32_t _i cdef int32_t _iter_high cdef int32_t _iter_low cdef int32_t _iter_step cdef int32_t _j cdef int32_t _k cdef int32_t _n cdef int32_t _post_idx cdef int32_t _pre_idx cdef int32_t _raw_post_idx cdef int32_t _raw_pre_idx _var__source_offset = _namespace["_var__source_offset"] cdef int64_t _source_offset = _namespace["_source_offset"] _var__synaptic_post = _namespace["_var__synaptic_post"] _dynamic_array_EC_pyCANtoCA3_inh__synaptic_post = _namespace["_dynamic_array_EC_pyCANtoCA3_inh__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoCA3_inh__synaptic_post = _namespace['_array_EC_pyCANtoCA3_inh__synaptic_post'] cdef int32_t * _array_EC_pyCANtoCA3_inh__synaptic_post = _buf__array_EC_pyCANtoCA3_inh__synaptic_post.data cdef size_t _num_array_EC_pyCANtoCA3_inh__synaptic_post = len(_namespace['_array_EC_pyCANtoCA3_inh__synaptic_post']) cdef int32_t _synaptic_post _var__synaptic_pre = _namespace["_var__synaptic_pre"] _dynamic_array_EC_pyCANtoCA3_inh__synaptic_pre = _namespace["_dynamic_array_EC_pyCANtoCA3_inh__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoCA3_inh__synaptic_pre = _namespace['_array_EC_pyCANtoCA3_inh__synaptic_pre'] cdef int32_t * _array_EC_pyCANtoCA3_inh__synaptic_pre = _buf__array_EC_pyCANtoCA3_inh__synaptic_pre.data cdef size_t _num_array_EC_pyCANtoCA3_inh__synaptic_pre = len(_namespace['_array_EC_pyCANtoCA3_inh__synaptic_pre']) cdef int32_t _synaptic_pre _var__target_offset = _namespace["_var__target_offset"] cdef int64_t _target_offset = _namespace["_target_offset"] cdef int32_t i # namespace for function rand global _namespace_rand_buffer global _namespace_num_rand_buffer cdef _numpy.ndarray[int64_t, ndim=1, mode='c'] _buf__rand_buffer = _namespace['_rand_buffer'] _namespace_rand_buffer = _buf__rand_buffer.data _namespace_num_rand_buffer = len(_namespace['_rand_buffer']) # namespace for function rand global _namespace_rand_buffer_index global _namespace_num_rand_buffer_index cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__rand_buffer_index = _namespace['_rand_buffer_index'] _namespace_rand_buffer_index = _buf__rand_buffer_index.data _namespace_num_rand_buffer_index = len(_namespace['_rand_buffer_index']) _var_umetre = _namespace["_var_umetre"] cdef double umetre = _namespace["umetre"] _var_z_soma_post = _namespace["_var_z_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_inh_z_soma = _namespace['_array_CA3_inh_z_soma'] cdef double * _array_CA3_inh_z_soma = _buf__array_CA3_inh_z_soma.data cdef size_t _num_array_CA3_inh_z_soma = len(_namespace['_array_CA3_inh_z_soma']) cdef double z_soma_post _var_z_soma_pre = _namespace["_var_z_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_z_soma = _namespace['_array_EC_pyCAN_z_soma'] cdef double * _array_EC_pyCAN_z_soma = _buf__array_EC_pyCAN_z_soma.data cdef size_t _num_array_EC_pyCAN_z_soma = len(_namespace['_array_EC_pyCAN_z_soma']) cdef double z_soma_pre cdef double _lio_create_cond_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:14:48,149 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name EC_pyCANtoCA3_inh_synapses_create_generator_codeobject 2021-11-05 15:14:48,149 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "EC_pyCANtoCA3_inh_synapses_create_generator" using Cython module "_cython_magic_9ac8f5378138eaf37d4a9ebb26af72e9" 2021-11-05 15:14:48,149 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140605249313664 on /home/nikos/.cython/brian_extensions/_cython_magic_9ac8f5378138eaf37d4a9ebb26af72e9.lock 2021-11-05 15:14:48,149 DEBUG brian2.utils.filelock: Lock 140605249313664 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_9ac8f5378138eaf37d4a9ebb26af72e9.lock 2021-11-05 15:14:48,150 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140605249313664 on /home/nikos/.cython/brian_extensions/_cython_magic_9ac8f5378138eaf37d4a9ebb26af72e9.lock 2021-11-05 15:14:48,150 DEBUG brian2.utils.filelock: Lock 140605249313664 released on /home/nikos/.cython/brian_extensions/_cython_magic_9ac8f5378138eaf37d4a9ebb26af72e9.lock 2021-11-05 15:14:48,170 DIAGNOSTIC brian2.core.names: Created object of class Synapses with name EC_pyCANtoCA1_pyCAN 2021-11-05 15:14:48,170 DIAGNOSTIC brian2.core.base: Created BrianObject with name EC_pyCANtoCA1_pyCAN, clock=Clock(dt=100. * usecond, name='defaultclock'), when=start, order=0 2021-11-05 15:14:48,173 DIAGNOSTIC brian2.core.names: Created object of class SynapticPathway with name EC_pyCANtoCA1_pyCAN_pre 2021-11-05 15:14:48,173 DIAGNOSTIC brian2.core.base: Created BrianObject with name EC_pyCANtoCA1_pyCAN_pre, clock=Clock(dt=100. * usecond, name='defaultclock'), when=synapses, order=-1 2021-11-05 15:14:48,184 DEBUG brian2.synapses.synapses: Creating synapses from group 'EC_pyCAN' to group 'CA1_pyCAN', using generator '_k for _k in range(N_post) if (i!=_k) and rand()<0.2*exp(-((z_soma_pre-z_soma_post)**2)/(2*(1000*umetre)**2))' 2021-11-05 15:14:48,184 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=EC_pyCANtoCA1_pyCAN, template name=synapses_create_generator) for abstract code: Key setup_iterator: _iter_low = 0 _iter_high = N_post _iter_step = 1 Key create_j: _pre_idx = _raw_pre_idx _j = _k Key create_cond: _post_idx = _raw_post_idx _cond = (i != _k) and (rand() < (0.2 * exp((- ((z_soma_pre - z_soma_post) ** 2)) / (2 * ((1000 * umetre) ** 2))))) Key update_post: _post_idx = _raw_post_idx _n = 1 2021-11-05 15:14:48,249 DIAGNOSTIC brian2.devices.device: EC_pyCANtoCA1_pyCAN_synapses_create_generator_codeobject abstract code: Key setup_iterator: _iter_low = 0 _iter_high = N_post _iter_step = 1 Key create_j: _pre_idx = _raw_pre_idx _j = _k Key create_cond: _post_idx = _raw_post_idx _cond = (i != _k) and (rand() < (0.2 * exp((- ((z_soma_pre - z_soma_post) ** 2)) / (2 * ((1000 * umetre) ** 2))))) Key update_post: _post_idx = _raw_post_idx _n = 1 2021-11-05 15:14:48,252 DIAGNOSTIC brian2.devices.device: EC_pyCANtoCA1_pyCAN_synapses_create_generator_codeobject snippet (scalar): Key setup_iterator: Key create_j: Key create_cond: _lio_create_cond_1 = 0.5 / ((1000.0 * umetre) ** 2) Key update_post: 2021-11-05 15:14:48,252 DIAGNOSTIC brian2.devices.device: EC_pyCANtoCA1_pyCAN_synapses_create_generator_codeobject snippet (vector): Key setup_iterator: _iter_low = 0 _iter_high = N_post _iter_step = 1 Key create_j: _pre_idx = _raw_pre_idx _j = _k Key create_cond: z_soma_post = _array_CA1_pyCAN_z_soma[_raw_post_idx] z_soma_pre = _array_EC_pyCAN_z_soma[_raw_pre_idx] _post_idx = _raw_post_idx i = _i _cond = (i != _k) and (_rand(_vectorisation_idx) < (0.2 * exp(_lio_create_cond_1 * (- ((z_soma_pre - z_soma_post) ** 2))))) Key update_post: _post_idx = _raw_post_idx _n = 1 2021-11-05 15:14:48,253 DIAGNOSTIC brian2.devices.device: EC_pyCANtoCA1_pyCAN_synapses_create_generator_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code cdef int64_t *_namespace_rand_buffer cdef int32_t *_namespace_rand_buffer_index cdef double _rand(int _idx): cdef double **buffer_pointer = _namespace_rand_buffer cdef double *buffer = buffer_pointer[0] cdef _numpy.ndarray _new_rand if(_namespace_rand_buffer_index[0] == 0): if buffer != NULL: free(buffer) _new_rand = _numpy.random.rand(20000) buffer = _numpy.PyArray_DATA(_new_rand) PyArray_CLEARFLAGS(<_numpy.PyArrayObject*>_new_rand, _numpy.NPY_OWNDATA) buffer_pointer[0] = buffer cdef double val = buffer[_namespace_rand_buffer_index[0]] _namespace_rand_buffer_index[0] += 1 if _namespace_rand_buffer_index[0] == 20000: _namespace_rand_buffer_index[0] = 0 return val # template-specific support code cdef int _buffer_size = 1024 cdef int[:] _prebuf = _numpy.zeros(_buffer_size, dtype=_numpy.int32) cdef int[:] _postbuf = _numpy.zeros(_buffer_size, dtype=_numpy.int32) cdef int _curbuf = 0 cdef int _raw_pre_idx cdef int _raw_post_idx cdef void _flush_buffer(buf, dynarr, int buf_len): cdef size_t _curlen = dynarr.shape[0] cdef size_t _newlen = _curlen+buf_len # Resize the array dynarr.resize(_newlen) # Get the potentially newly created underlying data arrays data = dynarr.data data[_curlen:_curlen+buf_len] = buf[:buf_len] def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoCA1_pyCAN_N = _namespace['_array_EC_pyCANtoCA1_pyCAN_N'] cdef int32_t * _array_EC_pyCANtoCA1_pyCAN_N = _buf__array_EC_pyCANtoCA1_pyCAN_N.data cdef int32_t N = _namespace["N"] _var_N_post = _namespace["_var_N_post"] cdef int64_t N_post = _namespace["N_post"] _var_N_pre = _namespace["_var_N_pre"] cdef int64_t N_pre = _namespace["N_pre"] cdef bool _cond cdef int32_t _i cdef int32_t _iter_high cdef int32_t _iter_low cdef int32_t _iter_step cdef int32_t _j cdef int32_t _k cdef int32_t _n cdef int32_t _post_idx cdef int32_t _pre_idx cdef int32_t _raw_post_idx cdef int32_t _raw_pre_idx _var__source_offset = _namespace["_var__source_offset"] cdef int64_t _source_offset = _namespace["_source_offset"] _var__synaptic_post = _namespace["_var__synaptic_post"] _dynamic_array_EC_pyCANtoCA1_pyCAN__synaptic_post = _namespace["_dynamic_array_EC_pyCANtoCA1_pyCAN__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoCA1_pyCAN__synaptic_post = _namespace['_array_EC_pyCANtoCA1_pyCAN__synaptic_post'] cdef int32_t * _array_EC_pyCANtoCA1_pyCAN__synaptic_post = _buf__array_EC_pyCANtoCA1_pyCAN__synaptic_post.data cdef size_t _num_array_EC_pyCANtoCA1_pyCAN__synaptic_post = len(_namespace['_array_EC_pyCANtoCA1_pyCAN__synaptic_post']) cdef int32_t _synaptic_post _var__synaptic_pre = _namespace["_var__synaptic_pre"] _dynamic_array_EC_pyCANtoCA1_pyCAN__synaptic_pre = _namespace["_dynamic_array_EC_pyCANtoCA1_pyCAN__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoCA1_pyCAN__synaptic_pre = _namespace['_array_EC_pyCANtoCA1_pyCAN__synaptic_pre'] cdef int32_t * _array_EC_pyCANtoCA1_pyCAN__synaptic_pre = _buf__array_EC_pyCANtoCA1_pyCAN__synaptic_pre.data cdef size_t _num_array_EC_pyCANtoCA1_pyCAN__synaptic_pre = len(_namespace['_array_EC_pyCANtoCA1_pyCAN__synaptic_pre']) cdef int32_t _synaptic_pre _var__target_offset = _namespace["_var__target_offset"] cdef int64_t _target_offset = _namespace["_target_offset"] cdef int32_t i # namespace for function rand global _namespace_rand_buffer global _namespace_num_rand_buffer cdef _numpy.ndarray[int64_t, ndim=1, mode='c'] _buf__rand_buffer = _namespace['_rand_buffer'] _namespace_rand_buffer = _buf__rand_buffer.data _namespace_num_rand_buffer = len(_namespace['_rand_buffer']) # namespace for function rand global _namespace_rand_buffer_index global _namespace_num_rand_buffer_index cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__rand_buffer_index = _namespace['_rand_buffer_index'] _namespace_rand_buffer_index = _buf__rand_buffer_index.data _namespace_num_rand_buffer_index = len(_namespace['_rand_buffer_index']) _var_umetre = _namespace["_var_umetre"] cdef double umetre = _namespace["umetre"] _var_z_soma_post = _namespace["_var_z_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_z_soma = _namespace['_array_CA1_pyCAN_z_soma'] cdef double * _array_CA1_pyCAN_z_soma = _buf__array_CA1_pyCAN_z_soma.data cdef size_t _num_array_CA1_pyCAN_z_soma = len(_namespace['_array_CA1_pyCAN_z_soma']) cdef double z_soma_post _var_z_soma_pre = _namespace["_var_z_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_z_soma = _namespace['_array_EC_pyCAN_z_soma'] cdef double * _array_EC_pyCAN_z_soma = _buf__array_EC_pyCAN_z_soma.data cdef size_t _num_array_EC_pyCAN_z_soma = len(_namespace['_array_EC_pyCAN_z_soma']) cdef double z_soma_pre cdef double _lio_create_cond_1 if '_owner' in _namespace: _owner = _namespace['_owner'] cdef int* _prebuf_ptr = &(_prebuf[0]) cdef int* _postbuf_ptr = &(_postbuf[0]) global _curbuf cdef size_t oldsize = len(_dynamic_array_EC_pyCANtoCA1_pyCAN__synaptic_pre) cdef size_t newsize # The following variables are only used for probabilistic connections cdef bool _jump_algo cdef double _log1p, _pconst cdef size_t _jump # scalar code _vectorisation_idx = 1 _lio_create_cond_1 = 0.5 / ((1000.0 * umetre) ** 2) for _i in range(N_pre): _raw_pre_idx = _i + _source_offset _iter_low = 0 _iter_high = N_post _iter_step = 1 for _k in range(_iter_low, _iter_high, _iter_step): _pre_idx = _raw_pre_idx _j = _k _raw_post_idx = _j + _target_offset if _j<0 or _j>=N_post: raise IndexError("index j=%d outside allowed range from 0 to %d" % (_j, N_post-1)) z_soma_post = _array_CA1_pyCAN_z_soma[_raw_post_idx] z_soma_pre = _array_EC_pyCAN_z_soma[_raw_pre_idx] _post_idx = _raw_post_idx i = _i _cond = (i != _k) and (_rand(_vectorisation_idx) < (0.2 * exp(_lio_create_cond_1 * (- ((z_soma_pre - z_soma_post) ** 2))))) if not _cond: continue _post_idx = _raw_post_idx _n = 1 for _repetition in range(_n): _prebuf_ptr[_curbuf] = _pre_idx _postbuf_ptr[_curbuf] = _post_idx _curbuf += 1 # Flush buffer if _curbuf==_buffer_size: _flush_buffer(_prebuf, _dynamic_array_EC_pyCANtoCA1_pyCAN__synaptic_pre, _curbuf) _flush_buffer(_postbuf, _dynamic_array_EC_pyCANtoCA1_pyCAN__synaptic_post, _curbuf) _curbuf = 0 # Final buffer flush _flush_buffer(_prebuf, _dynamic_array_EC_pyCANtoCA1_pyCAN__synaptic_pre, _curbuf) _flush_buffer(_postbuf, _dynamic_array_EC_pyCANtoCA1_pyCAN__synaptic_post, _curbuf) _curbuf = 0 # reset the buffer for the next run newsize = len(_dynamic_array_EC_pyCANtoCA1_pyCAN__synaptic_pre) # now we need to resize all registered variables and set the total number # of synapse (via Python) _owner._resize(newsize) # And update N_incoming, N_outgoing and synapse_number _owner._update_synapse_numbers(oldsize) before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoCA1_pyCAN_N = _namespace['_array_EC_pyCANtoCA1_pyCAN_N'] cdef int32_t * _array_EC_pyCANtoCA1_pyCAN_N = _buf__array_EC_pyCANtoCA1_pyCAN_N.data cdef int32_t N = _namespace["N"] _var_N_post = _namespace["_var_N_post"] cdef int64_t N_post = _namespace["N_post"] _var_N_pre = _namespace["_var_N_pre"] cdef int64_t N_pre = _namespace["N_pre"] cdef bool _cond cdef int32_t _i cdef int32_t _iter_high cdef int32_t _iter_low cdef int32_t _iter_step cdef int32_t _j cdef int32_t _k cdef int32_t _n cdef int32_t _post_idx cdef int32_t _pre_idx cdef int32_t _raw_post_idx cdef int32_t _raw_pre_idx _var__source_offset = _namespace["_var__source_offset"] cdef int64_t _source_offset = _namespace["_source_offset"] _var__synaptic_post = _namespace["_var__synaptic_post"] _dynamic_array_EC_pyCANtoCA1_pyCAN__synaptic_post = _namespace["_dynamic_array_EC_pyCANtoCA1_pyCAN__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoCA1_pyCAN__synaptic_post = _namespace['_array_EC_pyCANtoCA1_pyCAN__synaptic_post'] cdef int32_t * _array_EC_pyCANtoCA1_pyCAN__synaptic_post = _buf__array_EC_pyCANtoCA1_pyCAN__synaptic_post.data cdef size_t _num_array_EC_pyCANtoCA1_pyCAN__synaptic_post = len(_namespace['_array_EC_pyCANtoCA1_pyCAN__synaptic_post']) cdef int32_t _synaptic_post _var__synaptic_pre = _namespace["_var__synaptic_pre"] _dynamic_array_EC_pyCANtoCA1_pyCAN__synaptic_pre = _namespace["_dynamic_array_EC_pyCANtoCA1_pyCAN__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoCA1_pyCAN__synaptic_pre = _namespace['_array_EC_pyCANtoCA1_pyCAN__synaptic_pre'] cdef int32_t * _array_EC_pyCANtoCA1_pyCAN__synaptic_pre = _buf__array_EC_pyCANtoCA1_pyCAN__synaptic_pre.data cdef size_t _num_array_EC_pyCANtoCA1_pyCAN__synaptic_pre = len(_namespace['_array_EC_pyCANtoCA1_pyCAN__synaptic_pre']) cdef int32_t _synaptic_pre _var__target_offset = _namespace["_var__target_offset"] cdef int64_t _target_offset = _namespace["_target_offset"] cdef int32_t i # namespace for function rand global _namespace_rand_buffer global _namespace_num_rand_buffer cdef _numpy.ndarray[int64_t, ndim=1, mode='c'] _buf__rand_buffer = _namespace['_rand_buffer'] _namespace_rand_buffer = _buf__rand_buffer.data _namespace_num_rand_buffer = len(_namespace['_rand_buffer']) # namespace for function rand global _namespace_rand_buffer_index global _namespace_num_rand_buffer_index cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__rand_buffer_index = _namespace['_rand_buffer_index'] _namespace_rand_buffer_index = _buf__rand_buffer_index.data _namespace_num_rand_buffer_index = len(_namespace['_rand_buffer_index']) _var_umetre = _namespace["_var_umetre"] cdef double umetre = _namespace["umetre"] _var_z_soma_post = _namespace["_var_z_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_z_soma = _namespace['_array_CA1_pyCAN_z_soma'] cdef double * _array_CA1_pyCAN_z_soma = _buf__array_CA1_pyCAN_z_soma.data cdef size_t _num_array_CA1_pyCAN_z_soma = len(_namespace['_array_CA1_pyCAN_z_soma']) cdef double z_soma_post _var_z_soma_pre = _namespace["_var_z_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_z_soma = _namespace['_array_EC_pyCAN_z_soma'] cdef double * _array_EC_pyCAN_z_soma = _buf__array_EC_pyCAN_z_soma.data cdef size_t _num_array_EC_pyCAN_z_soma = len(_namespace['_array_EC_pyCAN_z_soma']) cdef double z_soma_pre cdef double _lio_create_cond_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoCA1_pyCAN_N = _namespace['_array_EC_pyCANtoCA1_pyCAN_N'] cdef int32_t * _array_EC_pyCANtoCA1_pyCAN_N = _buf__array_EC_pyCANtoCA1_pyCAN_N.data cdef int32_t N = _namespace["N"] _var_N_post = _namespace["_var_N_post"] cdef int64_t N_post = _namespace["N_post"] _var_N_pre = _namespace["_var_N_pre"] cdef int64_t N_pre = _namespace["N_pre"] cdef bool _cond cdef int32_t _i cdef int32_t _iter_high cdef int32_t _iter_low cdef int32_t _iter_step cdef int32_t _j cdef int32_t _k cdef int32_t _n cdef int32_t _post_idx cdef int32_t _pre_idx cdef int32_t _raw_post_idx cdef int32_t _raw_pre_idx _var__source_offset = _namespace["_var__source_offset"] cdef int64_t _source_offset = _namespace["_source_offset"] _var__synaptic_post = _namespace["_var__synaptic_post"] _dynamic_array_EC_pyCANtoCA1_pyCAN__synaptic_post = _namespace["_dynamic_array_EC_pyCANtoCA1_pyCAN__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoCA1_pyCAN__synaptic_post = _namespace['_array_EC_pyCANtoCA1_pyCAN__synaptic_post'] cdef int32_t * _array_EC_pyCANtoCA1_pyCAN__synaptic_post = _buf__array_EC_pyCANtoCA1_pyCAN__synaptic_post.data cdef size_t _num_array_EC_pyCANtoCA1_pyCAN__synaptic_post = len(_namespace['_array_EC_pyCANtoCA1_pyCAN__synaptic_post']) cdef int32_t _synaptic_post _var__synaptic_pre = _namespace["_var__synaptic_pre"] _dynamic_array_EC_pyCANtoCA1_pyCAN__synaptic_pre = _namespace["_dynamic_array_EC_pyCANtoCA1_pyCAN__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoCA1_pyCAN__synaptic_pre = _namespace['_array_EC_pyCANtoCA1_pyCAN__synaptic_pre'] cdef int32_t * _array_EC_pyCANtoCA1_pyCAN__synaptic_pre = _buf__array_EC_pyCANtoCA1_pyCAN__synaptic_pre.data cdef size_t _num_array_EC_pyCANtoCA1_pyCAN__synaptic_pre = len(_namespace['_array_EC_pyCANtoCA1_pyCAN__synaptic_pre']) cdef int32_t _synaptic_pre _var__target_offset = _namespace["_var__target_offset"] cdef int64_t _target_offset = _namespace["_target_offset"] cdef int32_t i # namespace for function rand global _namespace_rand_buffer global _namespace_num_rand_buffer cdef _numpy.ndarray[int64_t, ndim=1, mode='c'] _buf__rand_buffer = _namespace['_rand_buffer'] _namespace_rand_buffer = _buf__rand_buffer.data _namespace_num_rand_buffer = len(_namespace['_rand_buffer']) # namespace for function rand global _namespace_rand_buffer_index global _namespace_num_rand_buffer_index cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__rand_buffer_index = _namespace['_rand_buffer_index'] _namespace_rand_buffer_index = _buf__rand_buffer_index.data _namespace_num_rand_buffer_index = len(_namespace['_rand_buffer_index']) _var_umetre = _namespace["_var_umetre"] cdef double umetre = _namespace["umetre"] _var_z_soma_post = _namespace["_var_z_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_z_soma = _namespace['_array_CA1_pyCAN_z_soma'] cdef double * _array_CA1_pyCAN_z_soma = _buf__array_CA1_pyCAN_z_soma.data cdef size_t _num_array_CA1_pyCAN_z_soma = len(_namespace['_array_CA1_pyCAN_z_soma']) cdef double z_soma_post _var_z_soma_pre = _namespace["_var_z_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_z_soma = _namespace['_array_EC_pyCAN_z_soma'] cdef double * _array_EC_pyCAN_z_soma = _buf__array_EC_pyCAN_z_soma.data cdef size_t _num_array_EC_pyCAN_z_soma = len(_namespace['_array_EC_pyCAN_z_soma']) cdef double z_soma_pre cdef double _lio_create_cond_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:14:48,253 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name EC_pyCANtoCA1_pyCAN_synapses_create_generator_codeobject 2021-11-05 15:14:48,254 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "EC_pyCANtoCA1_pyCAN_synapses_create_generator" using Cython module "_cython_magic_58eaa1e3cdd0e9678652f6c55483f08f" 2021-11-05 15:14:48,254 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140605248895296 on /home/nikos/.cython/brian_extensions/_cython_magic_58eaa1e3cdd0e9678652f6c55483f08f.lock 2021-11-05 15:14:48,254 DEBUG brian2.utils.filelock: Lock 140605248895296 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_58eaa1e3cdd0e9678652f6c55483f08f.lock 2021-11-05 15:14:48,254 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140605248895296 on /home/nikos/.cython/brian_extensions/_cython_magic_58eaa1e3cdd0e9678652f6c55483f08f.lock 2021-11-05 15:14:48,254 DEBUG brian2.utils.filelock: Lock 140605248895296 released on /home/nikos/.cython/brian_extensions/_cython_magic_58eaa1e3cdd0e9678652f6c55483f08f.lock 2021-11-05 15:14:50,651 DIAGNOSTIC brian2.core.names: Created object of class Synapses with name EC_pyCANtoCA1_inh 2021-11-05 15:14:50,652 DIAGNOSTIC brian2.core.base: Created BrianObject with name EC_pyCANtoCA1_inh, clock=Clock(dt=100. * usecond, name='defaultclock'), when=start, order=0 2021-11-05 15:14:50,655 DIAGNOSTIC brian2.core.names: Created object of class SynapticPathway with name EC_pyCANtoCA1_inh_pre 2021-11-05 15:14:50,655 DIAGNOSTIC brian2.core.base: Created BrianObject with name EC_pyCANtoCA1_inh_pre, clock=Clock(dt=100. * usecond, name='defaultclock'), when=synapses, order=-1 2021-11-05 15:14:50,664 DEBUG brian2.synapses.synapses: Creating synapses from group 'EC_pyCAN' to group 'CA1_inh', using generator '_k for _k in range(N_post) if (i!=_k) and rand()<0.2*exp(-((z_soma_pre-z_soma_post)**2)/(2*(1000*umetre)**2))' 2021-11-05 15:14:50,664 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=EC_pyCANtoCA1_inh, template name=synapses_create_generator) for abstract code: Key setup_iterator: _iter_low = 0 _iter_high = N_post _iter_step = 1 Key create_j: _pre_idx = _raw_pre_idx _j = _k Key create_cond: _post_idx = _raw_post_idx _cond = (i != _k) and (rand() < (0.2 * exp((- ((z_soma_pre - z_soma_post) ** 2)) / (2 * ((1000 * umetre) ** 2))))) Key update_post: _post_idx = _raw_post_idx _n = 1 2021-11-05 15:14:50,722 DIAGNOSTIC brian2.devices.device: EC_pyCANtoCA1_inh_synapses_create_generator_codeobject abstract code: Key setup_iterator: _iter_low = 0 _iter_high = N_post _iter_step = 1 Key create_j: _pre_idx = _raw_pre_idx _j = _k Key create_cond: _post_idx = _raw_post_idx _cond = (i != _k) and (rand() < (0.2 * exp((- ((z_soma_pre - z_soma_post) ** 2)) / (2 * ((1000 * umetre) ** 2))))) Key update_post: _post_idx = _raw_post_idx _n = 1 2021-11-05 15:14:50,724 DIAGNOSTIC brian2.devices.device: EC_pyCANtoCA1_inh_synapses_create_generator_codeobject snippet (scalar): Key setup_iterator: Key create_j: Key create_cond: _lio_create_cond_1 = 0.5 / ((1000.0 * umetre) ** 2) Key update_post: 2021-11-05 15:14:50,724 DIAGNOSTIC brian2.devices.device: EC_pyCANtoCA1_inh_synapses_create_generator_codeobject snippet (vector): Key setup_iterator: _iter_low = 0 _iter_high = N_post _iter_step = 1 Key create_j: _pre_idx = _raw_pre_idx _j = _k Key create_cond: z_soma_post = _array_CA1_inh_z_soma[_raw_post_idx] z_soma_pre = _array_EC_pyCAN_z_soma[_raw_pre_idx] _post_idx = _raw_post_idx i = _i _cond = (i != _k) and (_rand(_vectorisation_idx) < (0.2 * exp(_lio_create_cond_1 * (- ((z_soma_pre - z_soma_post) ** 2))))) Key update_post: _post_idx = _raw_post_idx _n = 1 2021-11-05 15:14:50,724 DIAGNOSTIC brian2.devices.device: EC_pyCANtoCA1_inh_synapses_create_generator_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code cdef int64_t *_namespace_rand_buffer cdef int32_t *_namespace_rand_buffer_index cdef double _rand(int _idx): cdef double **buffer_pointer = _namespace_rand_buffer cdef double *buffer = buffer_pointer[0] cdef _numpy.ndarray _new_rand if(_namespace_rand_buffer_index[0] == 0): if buffer != NULL: free(buffer) _new_rand = _numpy.random.rand(20000) buffer = _numpy.PyArray_DATA(_new_rand) PyArray_CLEARFLAGS(<_numpy.PyArrayObject*>_new_rand, _numpy.NPY_OWNDATA) buffer_pointer[0] = buffer cdef double val = buffer[_namespace_rand_buffer_index[0]] _namespace_rand_buffer_index[0] += 1 if _namespace_rand_buffer_index[0] == 20000: _namespace_rand_buffer_index[0] = 0 return val # template-specific support code cdef int _buffer_size = 1024 cdef int[:] _prebuf = _numpy.zeros(_buffer_size, dtype=_numpy.int32) cdef int[:] _postbuf = _numpy.zeros(_buffer_size, dtype=_numpy.int32) cdef int _curbuf = 0 cdef int _raw_pre_idx cdef int _raw_post_idx cdef void _flush_buffer(buf, dynarr, int buf_len): cdef size_t _curlen = dynarr.shape[0] cdef size_t _newlen = _curlen+buf_len # Resize the array dynarr.resize(_newlen) # Get the potentially newly created underlying data arrays data = dynarr.data data[_curlen:_curlen+buf_len] = buf[:buf_len] def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoCA1_inh_N = _namespace['_array_EC_pyCANtoCA1_inh_N'] cdef int32_t * _array_EC_pyCANtoCA1_inh_N = _buf__array_EC_pyCANtoCA1_inh_N.data cdef int32_t N = _namespace["N"] _var_N_post = _namespace["_var_N_post"] cdef int64_t N_post = _namespace["N_post"] _var_N_pre = _namespace["_var_N_pre"] cdef int64_t N_pre = _namespace["N_pre"] cdef bool _cond cdef int32_t _i cdef int32_t _iter_high cdef int32_t _iter_low cdef int32_t _iter_step cdef int32_t _j cdef int32_t _k cdef int32_t _n cdef int32_t _post_idx cdef int32_t _pre_idx cdef int32_t _raw_post_idx cdef int32_t _raw_pre_idx _var__source_offset = _namespace["_var__source_offset"] cdef int64_t _source_offset = _namespace["_source_offset"] _var__synaptic_post = _namespace["_var__synaptic_post"] _dynamic_array_EC_pyCANtoCA1_inh__synaptic_post = _namespace["_dynamic_array_EC_pyCANtoCA1_inh__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoCA1_inh__synaptic_post = _namespace['_array_EC_pyCANtoCA1_inh__synaptic_post'] cdef int32_t * _array_EC_pyCANtoCA1_inh__synaptic_post = _buf__array_EC_pyCANtoCA1_inh__synaptic_post.data cdef size_t _num_array_EC_pyCANtoCA1_inh__synaptic_post = len(_namespace['_array_EC_pyCANtoCA1_inh__synaptic_post']) cdef int32_t _synaptic_post _var__synaptic_pre = _namespace["_var__synaptic_pre"] _dynamic_array_EC_pyCANtoCA1_inh__synaptic_pre = _namespace["_dynamic_array_EC_pyCANtoCA1_inh__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoCA1_inh__synaptic_pre = _namespace['_array_EC_pyCANtoCA1_inh__synaptic_pre'] cdef int32_t * _array_EC_pyCANtoCA1_inh__synaptic_pre = _buf__array_EC_pyCANtoCA1_inh__synaptic_pre.data cdef size_t _num_array_EC_pyCANtoCA1_inh__synaptic_pre = len(_namespace['_array_EC_pyCANtoCA1_inh__synaptic_pre']) cdef int32_t _synaptic_pre _var__target_offset = _namespace["_var__target_offset"] cdef int64_t _target_offset = _namespace["_target_offset"] cdef int32_t i # namespace for function rand global _namespace_rand_buffer global _namespace_num_rand_buffer cdef _numpy.ndarray[int64_t, ndim=1, mode='c'] _buf__rand_buffer = _namespace['_rand_buffer'] _namespace_rand_buffer = _buf__rand_buffer.data _namespace_num_rand_buffer = len(_namespace['_rand_buffer']) # namespace for function rand global _namespace_rand_buffer_index global _namespace_num_rand_buffer_index cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__rand_buffer_index = _namespace['_rand_buffer_index'] _namespace_rand_buffer_index = _buf__rand_buffer_index.data _namespace_num_rand_buffer_index = len(_namespace['_rand_buffer_index']) _var_umetre = _namespace["_var_umetre"] cdef double umetre = _namespace["umetre"] _var_z_soma_post = _namespace["_var_z_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_z_soma = _namespace['_array_CA1_inh_z_soma'] cdef double * _array_CA1_inh_z_soma = _buf__array_CA1_inh_z_soma.data cdef size_t _num_array_CA1_inh_z_soma = len(_namespace['_array_CA1_inh_z_soma']) cdef double z_soma_post _var_z_soma_pre = _namespace["_var_z_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_z_soma = _namespace['_array_EC_pyCAN_z_soma'] cdef double * _array_EC_pyCAN_z_soma = _buf__array_EC_pyCAN_z_soma.data cdef size_t _num_array_EC_pyCAN_z_soma = len(_namespace['_array_EC_pyCAN_z_soma']) cdef double z_soma_pre cdef double _lio_create_cond_1 if '_owner' in _namespace: _owner = _namespace['_owner'] cdef int* _prebuf_ptr = &(_prebuf[0]) cdef int* _postbuf_ptr = &(_postbuf[0]) global _curbuf cdef size_t oldsize = len(_dynamic_array_EC_pyCANtoCA1_inh__synaptic_pre) cdef size_t newsize # The following variables are only used for probabilistic connections cdef bool _jump_algo cdef double _log1p, _pconst cdef size_t _jump # scalar code _vectorisation_idx = 1 _lio_create_cond_1 = 0.5 / ((1000.0 * umetre) ** 2) for _i in range(N_pre): _raw_pre_idx = _i + _source_offset _iter_low = 0 _iter_high = N_post _iter_step = 1 for _k in range(_iter_low, _iter_high, _iter_step): _pre_idx = _raw_pre_idx _j = _k _raw_post_idx = _j + _target_offset if _j<0 or _j>=N_post: raise IndexError("index j=%d outside allowed range from 0 to %d" % (_j, N_post-1)) z_soma_post = _array_CA1_inh_z_soma[_raw_post_idx] z_soma_pre = _array_EC_pyCAN_z_soma[_raw_pre_idx] _post_idx = _raw_post_idx i = _i _cond = (i != _k) and (_rand(_vectorisation_idx) < (0.2 * exp(_lio_create_cond_1 * (- ((z_soma_pre - z_soma_post) ** 2))))) if not _cond: continue _post_idx = _raw_post_idx _n = 1 for _repetition in range(_n): _prebuf_ptr[_curbuf] = _pre_idx _postbuf_ptr[_curbuf] = _post_idx _curbuf += 1 # Flush buffer if _curbuf==_buffer_size: _flush_buffer(_prebuf, _dynamic_array_EC_pyCANtoCA1_inh__synaptic_pre, _curbuf) _flush_buffer(_postbuf, _dynamic_array_EC_pyCANtoCA1_inh__synaptic_post, _curbuf) _curbuf = 0 # Final buffer flush _flush_buffer(_prebuf, _dynamic_array_EC_pyCANtoCA1_inh__synaptic_pre, _curbuf) _flush_buffer(_postbuf, _dynamic_array_EC_pyCANtoCA1_inh__synaptic_post, _curbuf) _curbuf = 0 # reset the buffer for the next run newsize = len(_dynamic_array_EC_pyCANtoCA1_inh__synaptic_pre) # now we need to resize all registered variables and set the total number # of synapse (via Python) _owner._resize(newsize) # And update N_incoming, N_outgoing and synapse_number _owner._update_synapse_numbers(oldsize) before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoCA1_inh_N = _namespace['_array_EC_pyCANtoCA1_inh_N'] cdef int32_t * _array_EC_pyCANtoCA1_inh_N = _buf__array_EC_pyCANtoCA1_inh_N.data cdef int32_t N = _namespace["N"] _var_N_post = _namespace["_var_N_post"] cdef int64_t N_post = _namespace["N_post"] _var_N_pre = _namespace["_var_N_pre"] cdef int64_t N_pre = _namespace["N_pre"] cdef bool _cond cdef int32_t _i cdef int32_t _iter_high cdef int32_t _iter_low cdef int32_t _iter_step cdef int32_t _j cdef int32_t _k cdef int32_t _n cdef int32_t _post_idx cdef int32_t _pre_idx cdef int32_t _raw_post_idx cdef int32_t _raw_pre_idx _var__source_offset = _namespace["_var__source_offset"] cdef int64_t _source_offset = _namespace["_source_offset"] _var__synaptic_post = _namespace["_var__synaptic_post"] _dynamic_array_EC_pyCANtoCA1_inh__synaptic_post = _namespace["_dynamic_array_EC_pyCANtoCA1_inh__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoCA1_inh__synaptic_post = _namespace['_array_EC_pyCANtoCA1_inh__synaptic_post'] cdef int32_t * _array_EC_pyCANtoCA1_inh__synaptic_post = _buf__array_EC_pyCANtoCA1_inh__synaptic_post.data cdef size_t _num_array_EC_pyCANtoCA1_inh__synaptic_post = len(_namespace['_array_EC_pyCANtoCA1_inh__synaptic_post']) cdef int32_t _synaptic_post _var__synaptic_pre = _namespace["_var__synaptic_pre"] _dynamic_array_EC_pyCANtoCA1_inh__synaptic_pre = _namespace["_dynamic_array_EC_pyCANtoCA1_inh__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoCA1_inh__synaptic_pre = _namespace['_array_EC_pyCANtoCA1_inh__synaptic_pre'] cdef int32_t * _array_EC_pyCANtoCA1_inh__synaptic_pre = _buf__array_EC_pyCANtoCA1_inh__synaptic_pre.data cdef size_t _num_array_EC_pyCANtoCA1_inh__synaptic_pre = len(_namespace['_array_EC_pyCANtoCA1_inh__synaptic_pre']) cdef int32_t _synaptic_pre _var__target_offset = _namespace["_var__target_offset"] cdef int64_t _target_offset = _namespace["_target_offset"] cdef int32_t i # namespace for function rand global _namespace_rand_buffer global _namespace_num_rand_buffer cdef _numpy.ndarray[int64_t, ndim=1, mode='c'] _buf__rand_buffer = _namespace['_rand_buffer'] _namespace_rand_buffer = _buf__rand_buffer.data _namespace_num_rand_buffer = len(_namespace['_rand_buffer']) # namespace for function rand global _namespace_rand_buffer_index global _namespace_num_rand_buffer_index cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__rand_buffer_index = _namespace['_rand_buffer_index'] _namespace_rand_buffer_index = _buf__rand_buffer_index.data _namespace_num_rand_buffer_index = len(_namespace['_rand_buffer_index']) _var_umetre = _namespace["_var_umetre"] cdef double umetre = _namespace["umetre"] _var_z_soma_post = _namespace["_var_z_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_z_soma = _namespace['_array_CA1_inh_z_soma'] cdef double * _array_CA1_inh_z_soma = _buf__array_CA1_inh_z_soma.data cdef size_t _num_array_CA1_inh_z_soma = len(_namespace['_array_CA1_inh_z_soma']) cdef double z_soma_post _var_z_soma_pre = _namespace["_var_z_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_z_soma = _namespace['_array_EC_pyCAN_z_soma'] cdef double * _array_EC_pyCAN_z_soma = _buf__array_EC_pyCAN_z_soma.data cdef size_t _num_array_EC_pyCAN_z_soma = len(_namespace['_array_EC_pyCAN_z_soma']) cdef double z_soma_pre cdef double _lio_create_cond_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoCA1_inh_N = _namespace['_array_EC_pyCANtoCA1_inh_N'] cdef int32_t * _array_EC_pyCANtoCA1_inh_N = _buf__array_EC_pyCANtoCA1_inh_N.data cdef int32_t N = _namespace["N"] _var_N_post = _namespace["_var_N_post"] cdef int64_t N_post = _namespace["N_post"] _var_N_pre = _namespace["_var_N_pre"] cdef int64_t N_pre = _namespace["N_pre"] cdef bool _cond cdef int32_t _i cdef int32_t _iter_high cdef int32_t _iter_low cdef int32_t _iter_step cdef int32_t _j cdef int32_t _k cdef int32_t _n cdef int32_t _post_idx cdef int32_t _pre_idx cdef int32_t _raw_post_idx cdef int32_t _raw_pre_idx _var__source_offset = _namespace["_var__source_offset"] cdef int64_t _source_offset = _namespace["_source_offset"] _var__synaptic_post = _namespace["_var__synaptic_post"] _dynamic_array_EC_pyCANtoCA1_inh__synaptic_post = _namespace["_dynamic_array_EC_pyCANtoCA1_inh__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoCA1_inh__synaptic_post = _namespace['_array_EC_pyCANtoCA1_inh__synaptic_post'] cdef int32_t * _array_EC_pyCANtoCA1_inh__synaptic_post = _buf__array_EC_pyCANtoCA1_inh__synaptic_post.data cdef size_t _num_array_EC_pyCANtoCA1_inh__synaptic_post = len(_namespace['_array_EC_pyCANtoCA1_inh__synaptic_post']) cdef int32_t _synaptic_post _var__synaptic_pre = _namespace["_var__synaptic_pre"] _dynamic_array_EC_pyCANtoCA1_inh__synaptic_pre = _namespace["_dynamic_array_EC_pyCANtoCA1_inh__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoCA1_inh__synaptic_pre = _namespace['_array_EC_pyCANtoCA1_inh__synaptic_pre'] cdef int32_t * _array_EC_pyCANtoCA1_inh__synaptic_pre = _buf__array_EC_pyCANtoCA1_inh__synaptic_pre.data cdef size_t _num_array_EC_pyCANtoCA1_inh__synaptic_pre = len(_namespace['_array_EC_pyCANtoCA1_inh__synaptic_pre']) cdef int32_t _synaptic_pre _var__target_offset = _namespace["_var__target_offset"] cdef int64_t _target_offset = _namespace["_target_offset"] cdef int32_t i # namespace for function rand global _namespace_rand_buffer global _namespace_num_rand_buffer cdef _numpy.ndarray[int64_t, ndim=1, mode='c'] _buf__rand_buffer = _namespace['_rand_buffer'] _namespace_rand_buffer = _buf__rand_buffer.data _namespace_num_rand_buffer = len(_namespace['_rand_buffer']) # namespace for function rand global _namespace_rand_buffer_index global _namespace_num_rand_buffer_index cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__rand_buffer_index = _namespace['_rand_buffer_index'] _namespace_rand_buffer_index = _buf__rand_buffer_index.data _namespace_num_rand_buffer_index = len(_namespace['_rand_buffer_index']) _var_umetre = _namespace["_var_umetre"] cdef double umetre = _namespace["umetre"] _var_z_soma_post = _namespace["_var_z_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_z_soma = _namespace['_array_CA1_inh_z_soma'] cdef double * _array_CA1_inh_z_soma = _buf__array_CA1_inh_z_soma.data cdef size_t _num_array_CA1_inh_z_soma = len(_namespace['_array_CA1_inh_z_soma']) cdef double z_soma_post _var_z_soma_pre = _namespace["_var_z_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_z_soma = _namespace['_array_EC_pyCAN_z_soma'] cdef double * _array_EC_pyCAN_z_soma = _buf__array_EC_pyCAN_z_soma.data cdef size_t _num_array_EC_pyCAN_z_soma = len(_namespace['_array_EC_pyCAN_z_soma']) cdef double z_soma_pre cdef double _lio_create_cond_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:14:50,724 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name EC_pyCANtoCA1_inh_synapses_create_generator_codeobject 2021-11-05 15:14:50,725 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "EC_pyCANtoCA1_inh_synapses_create_generator" using Cython module "_cython_magic_5aa1a0e4cb9de53658d420c9618a71df" 2021-11-05 15:14:50,725 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140605222541440 on /home/nikos/.cython/brian_extensions/_cython_magic_5aa1a0e4cb9de53658d420c9618a71df.lock 2021-11-05 15:14:50,725 DEBUG brian2.utils.filelock: Lock 140605222541440 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_5aa1a0e4cb9de53658d420c9618a71df.lock 2021-11-05 15:14:50,725 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140605222541440 on /home/nikos/.cython/brian_extensions/_cython_magic_5aa1a0e4cb9de53658d420c9618a71df.lock 2021-11-05 15:14:50,725 DEBUG brian2.utils.filelock: Lock 140605222541440 released on /home/nikos/.cython/brian_extensions/_cython_magic_5aa1a0e4cb9de53658d420c9618a71df.lock 2021-11-05 15:14:50,953 DIAGNOSTIC brian2.core.names: Created object of class Synapses with name DG_pytoCA3_pyCAN 2021-11-05 15:14:50,953 DIAGNOSTIC brian2.core.base: Created BrianObject with name DG_pytoCA3_pyCAN, clock=Clock(dt=100. * usecond, name='defaultclock'), when=start, order=0 2021-11-05 15:14:50,956 DIAGNOSTIC brian2.core.names: Created object of class SynapticPathway with name DG_pytoCA3_pyCAN_pre 2021-11-05 15:14:50,956 DIAGNOSTIC brian2.core.base: Created BrianObject with name DG_pytoCA3_pyCAN_pre, clock=Clock(dt=100. * usecond, name='defaultclock'), when=synapses, order=-1 2021-11-05 15:14:50,969 DEBUG brian2.synapses.synapses: Creating synapses from group 'DG_py' to group 'CA3_pyCAN', using generator '_k for _k in range(N_post) if (i!=_k) and rand()<0.45*exp(-((z_soma_pre-z_soma_post)**2)/(2*(1000*umetre)**2))' 2021-11-05 15:14:50,969 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=DG_pytoCA3_pyCAN, template name=synapses_create_generator) for abstract code: Key setup_iterator: _iter_low = 0 _iter_high = N_post _iter_step = 1 Key create_j: _pre_idx = _raw_pre_idx _j = _k Key create_cond: _post_idx = _raw_post_idx _cond = (i != _k) and (rand() < (0.45 * exp((- ((z_soma_pre - z_soma_post) ** 2)) / (2 * ((1000 * umetre) ** 2))))) Key update_post: _post_idx = _raw_post_idx _n = 1 2021-11-05 15:14:51,034 DIAGNOSTIC brian2.devices.device: DG_pytoCA3_pyCAN_synapses_create_generator_codeobject abstract code: Key setup_iterator: _iter_low = 0 _iter_high = N_post _iter_step = 1 Key create_j: _pre_idx = _raw_pre_idx _j = _k Key create_cond: _post_idx = _raw_post_idx _cond = (i != _k) and (rand() < (0.45 * exp((- ((z_soma_pre - z_soma_post) ** 2)) / (2 * ((1000 * umetre) ** 2))))) Key update_post: _post_idx = _raw_post_idx _n = 1 2021-11-05 15:14:51,037 DIAGNOSTIC brian2.devices.device: DG_pytoCA3_pyCAN_synapses_create_generator_codeobject snippet (scalar): Key setup_iterator: Key create_j: Key create_cond: _lio_create_cond_1 = 0.5 / ((1000.0 * umetre) ** 2) Key update_post: 2021-11-05 15:14:51,037 DIAGNOSTIC brian2.devices.device: DG_pytoCA3_pyCAN_synapses_create_generator_codeobject snippet (vector): Key setup_iterator: _iter_low = 0 _iter_high = N_post _iter_step = 1 Key create_j: _pre_idx = _raw_pre_idx _j = _k Key create_cond: z_soma_post = _array_CA3_pyCAN_z_soma[_raw_post_idx] z_soma_pre = _array_DG_py_z_soma[_raw_pre_idx] _post_idx = _raw_post_idx i = _i _cond = (i != _k) and (_rand(_vectorisation_idx) < (0.45 * exp(_lio_create_cond_1 * (- ((z_soma_pre - z_soma_post) ** 2))))) Key update_post: _post_idx = _raw_post_idx _n = 1 2021-11-05 15:14:51,038 DIAGNOSTIC brian2.devices.device: DG_pytoCA3_pyCAN_synapses_create_generator_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code cdef int64_t *_namespace_rand_buffer cdef int32_t *_namespace_rand_buffer_index cdef double _rand(int _idx): cdef double **buffer_pointer = _namespace_rand_buffer cdef double *buffer = buffer_pointer[0] cdef _numpy.ndarray _new_rand if(_namespace_rand_buffer_index[0] == 0): if buffer != NULL: free(buffer) _new_rand = _numpy.random.rand(20000) buffer = _numpy.PyArray_DATA(_new_rand) PyArray_CLEARFLAGS(<_numpy.PyArrayObject*>_new_rand, _numpy.NPY_OWNDATA) buffer_pointer[0] = buffer cdef double val = buffer[_namespace_rand_buffer_index[0]] _namespace_rand_buffer_index[0] += 1 if _namespace_rand_buffer_index[0] == 20000: _namespace_rand_buffer_index[0] = 0 return val # template-specific support code cdef int _buffer_size = 1024 cdef int[:] _prebuf = _numpy.zeros(_buffer_size, dtype=_numpy.int32) cdef int[:] _postbuf = _numpy.zeros(_buffer_size, dtype=_numpy.int32) cdef int _curbuf = 0 cdef int _raw_pre_idx cdef int _raw_post_idx cdef void _flush_buffer(buf, dynarr, int buf_len): cdef size_t _curlen = dynarr.shape[0] cdef size_t _newlen = _curlen+buf_len # Resize the array dynarr.resize(_newlen) # Get the potentially newly created underlying data arrays data = dynarr.data data[_curlen:_curlen+buf_len] = buf[:buf_len] def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_DG_pytoCA3_pyCAN_N = _namespace['_array_DG_pytoCA3_pyCAN_N'] cdef int32_t * _array_DG_pytoCA3_pyCAN_N = _buf__array_DG_pytoCA3_pyCAN_N.data cdef int32_t N = _namespace["N"] _var_N_post = _namespace["_var_N_post"] cdef int64_t N_post = _namespace["N_post"] _var_N_pre = _namespace["_var_N_pre"] cdef int64_t N_pre = _namespace["N_pre"] cdef bool _cond cdef int32_t _i cdef int32_t _iter_high cdef int32_t _iter_low cdef int32_t _iter_step cdef int32_t _j cdef int32_t _k cdef int32_t _n cdef int32_t _post_idx cdef int32_t _pre_idx cdef int32_t _raw_post_idx cdef int32_t _raw_pre_idx _var__source_offset = _namespace["_var__source_offset"] cdef int64_t _source_offset = _namespace["_source_offset"] _var__synaptic_post = _namespace["_var__synaptic_post"] _dynamic_array_DG_pytoCA3_pyCAN__synaptic_post = _namespace["_dynamic_array_DG_pytoCA3_pyCAN__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_DG_pytoCA3_pyCAN__synaptic_post = _namespace['_array_DG_pytoCA3_pyCAN__synaptic_post'] cdef int32_t * _array_DG_pytoCA3_pyCAN__synaptic_post = _buf__array_DG_pytoCA3_pyCAN__synaptic_post.data cdef size_t _num_array_DG_pytoCA3_pyCAN__synaptic_post = len(_namespace['_array_DG_pytoCA3_pyCAN__synaptic_post']) cdef int32_t _synaptic_post _var__synaptic_pre = _namespace["_var__synaptic_pre"] _dynamic_array_DG_pytoCA3_pyCAN__synaptic_pre = _namespace["_dynamic_array_DG_pytoCA3_pyCAN__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_DG_pytoCA3_pyCAN__synaptic_pre = _namespace['_array_DG_pytoCA3_pyCAN__synaptic_pre'] cdef int32_t * _array_DG_pytoCA3_pyCAN__synaptic_pre = _buf__array_DG_pytoCA3_pyCAN__synaptic_pre.data cdef size_t _num_array_DG_pytoCA3_pyCAN__synaptic_pre = len(_namespace['_array_DG_pytoCA3_pyCAN__synaptic_pre']) cdef int32_t _synaptic_pre _var__target_offset = _namespace["_var__target_offset"] cdef int64_t _target_offset = _namespace["_target_offset"] cdef int32_t i # namespace for function rand global _namespace_rand_buffer global _namespace_num_rand_buffer cdef _numpy.ndarray[int64_t, ndim=1, mode='c'] _buf__rand_buffer = _namespace['_rand_buffer'] _namespace_rand_buffer = _buf__rand_buffer.data _namespace_num_rand_buffer = len(_namespace['_rand_buffer']) # namespace for function rand global _namespace_rand_buffer_index global _namespace_num_rand_buffer_index cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__rand_buffer_index = _namespace['_rand_buffer_index'] _namespace_rand_buffer_index = _buf__rand_buffer_index.data _namespace_num_rand_buffer_index = len(_namespace['_rand_buffer_index']) _var_umetre = _namespace["_var_umetre"] cdef double umetre = _namespace["umetre"] _var_z_soma_post = _namespace["_var_z_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_z_soma = _namespace['_array_CA3_pyCAN_z_soma'] cdef double * _array_CA3_pyCAN_z_soma = _buf__array_CA3_pyCAN_z_soma.data cdef size_t _num_array_CA3_pyCAN_z_soma = len(_namespace['_array_CA3_pyCAN_z_soma']) cdef double z_soma_post _var_z_soma_pre = _namespace["_var_z_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_z_soma = _namespace['_array_DG_py_z_soma'] cdef double * _array_DG_py_z_soma = _buf__array_DG_py_z_soma.data cdef size_t _num_array_DG_py_z_soma = len(_namespace['_array_DG_py_z_soma']) cdef double z_soma_pre cdef double _lio_create_cond_1 if '_owner' in _namespace: _owner = _namespace['_owner'] cdef int* _prebuf_ptr = &(_prebuf[0]) cdef int* _postbuf_ptr = &(_postbuf[0]) global _curbuf cdef size_t oldsize = len(_dynamic_array_DG_pytoCA3_pyCAN__synaptic_pre) cdef size_t newsize # The following variables are only used for probabilistic connections cdef bool _jump_algo cdef double _log1p, _pconst cdef size_t _jump # scalar code _vectorisation_idx = 1 _lio_create_cond_1 = 0.5 / ((1000.0 * umetre) ** 2) for _i in range(N_pre): _raw_pre_idx = _i + _source_offset _iter_low = 0 _iter_high = N_post _iter_step = 1 for _k in range(_iter_low, _iter_high, _iter_step): _pre_idx = _raw_pre_idx _j = _k _raw_post_idx = _j + _target_offset if _j<0 or _j>=N_post: raise IndexError("index j=%d outside allowed range from 0 to %d" % (_j, N_post-1)) z_soma_post = _array_CA3_pyCAN_z_soma[_raw_post_idx] z_soma_pre = _array_DG_py_z_soma[_raw_pre_idx] _post_idx = _raw_post_idx i = _i _cond = (i != _k) and (_rand(_vectorisation_idx) < (0.45 * exp(_lio_create_cond_1 * (- ((z_soma_pre - z_soma_post) ** 2))))) if not _cond: continue _post_idx = _raw_post_idx _n = 1 for _repetition in range(_n): _prebuf_ptr[_curbuf] = _pre_idx _postbuf_ptr[_curbuf] = _post_idx _curbuf += 1 # Flush buffer if _curbuf==_buffer_size: _flush_buffer(_prebuf, _dynamic_array_DG_pytoCA3_pyCAN__synaptic_pre, _curbuf) _flush_buffer(_postbuf, _dynamic_array_DG_pytoCA3_pyCAN__synaptic_post, _curbuf) _curbuf = 0 # Final buffer flush _flush_buffer(_prebuf, _dynamic_array_DG_pytoCA3_pyCAN__synaptic_pre, _curbuf) _flush_buffer(_postbuf, _dynamic_array_DG_pytoCA3_pyCAN__synaptic_post, _curbuf) _curbuf = 0 # reset the buffer for the next run newsize = len(_dynamic_array_DG_pytoCA3_pyCAN__synaptic_pre) # now we need to resize all registered variables and set the total number # of synapse (via Python) _owner._resize(newsize) # And update N_incoming, N_outgoing and synapse_number _owner._update_synapse_numbers(oldsize) before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_DG_pytoCA3_pyCAN_N = _namespace['_array_DG_pytoCA3_pyCAN_N'] cdef int32_t * _array_DG_pytoCA3_pyCAN_N = _buf__array_DG_pytoCA3_pyCAN_N.data cdef int32_t N = _namespace["N"] _var_N_post = _namespace["_var_N_post"] cdef int64_t N_post = _namespace["N_post"] _var_N_pre = _namespace["_var_N_pre"] cdef int64_t N_pre = _namespace["N_pre"] cdef bool _cond cdef int32_t _i cdef int32_t _iter_high cdef int32_t _iter_low cdef int32_t _iter_step cdef int32_t _j cdef int32_t _k cdef int32_t _n cdef int32_t _post_idx cdef int32_t _pre_idx cdef int32_t _raw_post_idx cdef int32_t _raw_pre_idx _var__source_offset = _namespace["_var__source_offset"] cdef int64_t _source_offset = _namespace["_source_offset"] _var__synaptic_post = _namespace["_var__synaptic_post"] _dynamic_array_DG_pytoCA3_pyCAN__synaptic_post = _namespace["_dynamic_array_DG_pytoCA3_pyCAN__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_DG_pytoCA3_pyCAN__synaptic_post = _namespace['_array_DG_pytoCA3_pyCAN__synaptic_post'] cdef int32_t * _array_DG_pytoCA3_pyCAN__synaptic_post = _buf__array_DG_pytoCA3_pyCAN__synaptic_post.data cdef size_t _num_array_DG_pytoCA3_pyCAN__synaptic_post = len(_namespace['_array_DG_pytoCA3_pyCAN__synaptic_post']) cdef int32_t _synaptic_post _var__synaptic_pre = _namespace["_var__synaptic_pre"] _dynamic_array_DG_pytoCA3_pyCAN__synaptic_pre = _namespace["_dynamic_array_DG_pytoCA3_pyCAN__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_DG_pytoCA3_pyCAN__synaptic_pre = _namespace['_array_DG_pytoCA3_pyCAN__synaptic_pre'] cdef int32_t * _array_DG_pytoCA3_pyCAN__synaptic_pre = _buf__array_DG_pytoCA3_pyCAN__synaptic_pre.data cdef size_t _num_array_DG_pytoCA3_pyCAN__synaptic_pre = len(_namespace['_array_DG_pytoCA3_pyCAN__synaptic_pre']) cdef int32_t _synaptic_pre _var__target_offset = _namespace["_var__target_offset"] cdef int64_t _target_offset = _namespace["_target_offset"] cdef int32_t i # namespace for function rand global _namespace_rand_buffer global _namespace_num_rand_buffer cdef _numpy.ndarray[int64_t, ndim=1, mode='c'] _buf__rand_buffer = _namespace['_rand_buffer'] _namespace_rand_buffer = _buf__rand_buffer.data _namespace_num_rand_buffer = len(_namespace['_rand_buffer']) # namespace for function rand global _namespace_rand_buffer_index global _namespace_num_rand_buffer_index cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__rand_buffer_index = _namespace['_rand_buffer_index'] _namespace_rand_buffer_index = _buf__rand_buffer_index.data _namespace_num_rand_buffer_index = len(_namespace['_rand_buffer_index']) _var_umetre = _namespace["_var_umetre"] cdef double umetre = _namespace["umetre"] _var_z_soma_post = _namespace["_var_z_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_z_soma = _namespace['_array_CA3_pyCAN_z_soma'] cdef double * _array_CA3_pyCAN_z_soma = _buf__array_CA3_pyCAN_z_soma.data cdef size_t _num_array_CA3_pyCAN_z_soma = len(_namespace['_array_CA3_pyCAN_z_soma']) cdef double z_soma_post _var_z_soma_pre = _namespace["_var_z_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_z_soma = _namespace['_array_DG_py_z_soma'] cdef double * _array_DG_py_z_soma = _buf__array_DG_py_z_soma.data cdef size_t _num_array_DG_py_z_soma = len(_namespace['_array_DG_py_z_soma']) cdef double z_soma_pre cdef double _lio_create_cond_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_DG_pytoCA3_pyCAN_N = _namespace['_array_DG_pytoCA3_pyCAN_N'] cdef int32_t * _array_DG_pytoCA3_pyCAN_N = _buf__array_DG_pytoCA3_pyCAN_N.data cdef int32_t N = _namespace["N"] _var_N_post = _namespace["_var_N_post"] cdef int64_t N_post = _namespace["N_post"] _var_N_pre = _namespace["_var_N_pre"] cdef int64_t N_pre = _namespace["N_pre"] cdef bool _cond cdef int32_t _i cdef int32_t _iter_high cdef int32_t _iter_low cdef int32_t _iter_step cdef int32_t _j cdef int32_t _k cdef int32_t _n cdef int32_t _post_idx cdef int32_t _pre_idx cdef int32_t _raw_post_idx cdef int32_t _raw_pre_idx _var__source_offset = _namespace["_var__source_offset"] cdef int64_t _source_offset = _namespace["_source_offset"] _var__synaptic_post = _namespace["_var__synaptic_post"] _dynamic_array_DG_pytoCA3_pyCAN__synaptic_post = _namespace["_dynamic_array_DG_pytoCA3_pyCAN__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_DG_pytoCA3_pyCAN__synaptic_post = _namespace['_array_DG_pytoCA3_pyCAN__synaptic_post'] cdef int32_t * _array_DG_pytoCA3_pyCAN__synaptic_post = _buf__array_DG_pytoCA3_pyCAN__synaptic_post.data cdef size_t _num_array_DG_pytoCA3_pyCAN__synaptic_post = len(_namespace['_array_DG_pytoCA3_pyCAN__synaptic_post']) cdef int32_t _synaptic_post _var__synaptic_pre = _namespace["_var__synaptic_pre"] _dynamic_array_DG_pytoCA3_pyCAN__synaptic_pre = _namespace["_dynamic_array_DG_pytoCA3_pyCAN__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_DG_pytoCA3_pyCAN__synaptic_pre = _namespace['_array_DG_pytoCA3_pyCAN__synaptic_pre'] cdef int32_t * _array_DG_pytoCA3_pyCAN__synaptic_pre = _buf__array_DG_pytoCA3_pyCAN__synaptic_pre.data cdef size_t _num_array_DG_pytoCA3_pyCAN__synaptic_pre = len(_namespace['_array_DG_pytoCA3_pyCAN__synaptic_pre']) cdef int32_t _synaptic_pre _var__target_offset = _namespace["_var__target_offset"] cdef int64_t _target_offset = _namespace["_target_offset"] cdef int32_t i # namespace for function rand global _namespace_rand_buffer global _namespace_num_rand_buffer cdef _numpy.ndarray[int64_t, ndim=1, mode='c'] _buf__rand_buffer = _namespace['_rand_buffer'] _namespace_rand_buffer = _buf__rand_buffer.data _namespace_num_rand_buffer = len(_namespace['_rand_buffer']) # namespace for function rand global _namespace_rand_buffer_index global _namespace_num_rand_buffer_index cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__rand_buffer_index = _namespace['_rand_buffer_index'] _namespace_rand_buffer_index = _buf__rand_buffer_index.data _namespace_num_rand_buffer_index = len(_namespace['_rand_buffer_index']) _var_umetre = _namespace["_var_umetre"] cdef double umetre = _namespace["umetre"] _var_z_soma_post = _namespace["_var_z_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_z_soma = _namespace['_array_CA3_pyCAN_z_soma'] cdef double * _array_CA3_pyCAN_z_soma = _buf__array_CA3_pyCAN_z_soma.data cdef size_t _num_array_CA3_pyCAN_z_soma = len(_namespace['_array_CA3_pyCAN_z_soma']) cdef double z_soma_post _var_z_soma_pre = _namespace["_var_z_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_z_soma = _namespace['_array_DG_py_z_soma'] cdef double * _array_DG_py_z_soma = _buf__array_DG_py_z_soma.data cdef size_t _num_array_DG_py_z_soma = len(_namespace['_array_DG_py_z_soma']) cdef double z_soma_pre cdef double _lio_create_cond_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:14:51,038 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name DG_pytoCA3_pyCAN_synapses_create_generator_codeobject 2021-11-05 15:14:51,039 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "DG_pytoCA3_pyCAN_synapses_create_generator" using Cython module "_cython_magic_9e187974c2926fa1cbeeeea6f549b975" 2021-11-05 15:14:51,039 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140605220303536 on /home/nikos/.cython/brian_extensions/_cython_magic_9e187974c2926fa1cbeeeea6f549b975.lock 2021-11-05 15:14:51,039 DEBUG brian2.utils.filelock: Lock 140605220303536 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_9e187974c2926fa1cbeeeea6f549b975.lock 2021-11-05 15:14:51,039 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140605220303536 on /home/nikos/.cython/brian_extensions/_cython_magic_9e187974c2926fa1cbeeeea6f549b975.lock 2021-11-05 15:14:51,039 DEBUG brian2.utils.filelock: Lock 140605220303536 released on /home/nikos/.cython/brian_extensions/_cython_magic_9e187974c2926fa1cbeeeea6f549b975.lock 2021-11-05 15:14:51,277 DIAGNOSTIC brian2.core.names: Created object of class Synapses with name DG_pytoCA3_inh 2021-11-05 15:14:51,278 DIAGNOSTIC brian2.core.base: Created BrianObject with name DG_pytoCA3_inh, clock=Clock(dt=100. * usecond, name='defaultclock'), when=start, order=0 2021-11-05 15:14:51,280 DIAGNOSTIC brian2.core.names: Created object of class SynapticPathway with name DG_pytoCA3_inh_pre 2021-11-05 15:14:51,280 DIAGNOSTIC brian2.core.base: Created BrianObject with name DG_pytoCA3_inh_pre, clock=Clock(dt=100. * usecond, name='defaultclock'), when=synapses, order=-1 2021-11-05 15:14:51,288 DEBUG brian2.synapses.synapses: Creating synapses from group 'DG_py' to group 'CA3_inh', using generator '_k for _k in range(N_post) if (i!=_k) and rand()<0.45*exp(-((z_soma_pre-z_soma_post)**2)/(2*(1000*umetre)**2))' 2021-11-05 15:14:51,289 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=DG_pytoCA3_inh, template name=synapses_create_generator) for abstract code: Key setup_iterator: _iter_low = 0 _iter_high = N_post _iter_step = 1 Key create_j: _pre_idx = _raw_pre_idx _j = _k Key create_cond: _post_idx = _raw_post_idx _cond = (i != _k) and (rand() < (0.45 * exp((- ((z_soma_pre - z_soma_post) ** 2)) / (2 * ((1000 * umetre) ** 2))))) Key update_post: _post_idx = _raw_post_idx _n = 1 2021-11-05 15:14:51,341 DIAGNOSTIC brian2.devices.device: DG_pytoCA3_inh_synapses_create_generator_codeobject abstract code: Key setup_iterator: _iter_low = 0 _iter_high = N_post _iter_step = 1 Key create_j: _pre_idx = _raw_pre_idx _j = _k Key create_cond: _post_idx = _raw_post_idx _cond = (i != _k) and (rand() < (0.45 * exp((- ((z_soma_pre - z_soma_post) ** 2)) / (2 * ((1000 * umetre) ** 2))))) Key update_post: _post_idx = _raw_post_idx _n = 1 2021-11-05 15:14:51,343 DIAGNOSTIC brian2.devices.device: DG_pytoCA3_inh_synapses_create_generator_codeobject snippet (scalar): Key setup_iterator: Key create_j: Key create_cond: _lio_create_cond_1 = 0.5 / ((1000.0 * umetre) ** 2) Key update_post: 2021-11-05 15:14:51,343 DIAGNOSTIC brian2.devices.device: DG_pytoCA3_inh_synapses_create_generator_codeobject snippet (vector): Key setup_iterator: _iter_low = 0 _iter_high = N_post _iter_step = 1 Key create_j: _pre_idx = _raw_pre_idx _j = _k Key create_cond: z_soma_post = _array_CA3_inh_z_soma[_raw_post_idx] z_soma_pre = _array_DG_py_z_soma[_raw_pre_idx] _post_idx = _raw_post_idx i = _i _cond = (i != _k) and (_rand(_vectorisation_idx) < (0.45 * exp(_lio_create_cond_1 * (- ((z_soma_pre - z_soma_post) ** 2))))) Key update_post: _post_idx = _raw_post_idx _n = 1 2021-11-05 15:14:51,343 DIAGNOSTIC brian2.devices.device: DG_pytoCA3_inh_synapses_create_generator_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code cdef int64_t *_namespace_rand_buffer cdef int32_t *_namespace_rand_buffer_index cdef double _rand(int _idx): cdef double **buffer_pointer = _namespace_rand_buffer cdef double *buffer = buffer_pointer[0] cdef _numpy.ndarray _new_rand if(_namespace_rand_buffer_index[0] == 0): if buffer != NULL: free(buffer) _new_rand = _numpy.random.rand(20000) buffer = _numpy.PyArray_DATA(_new_rand) PyArray_CLEARFLAGS(<_numpy.PyArrayObject*>_new_rand, _numpy.NPY_OWNDATA) buffer_pointer[0] = buffer cdef double val = buffer[_namespace_rand_buffer_index[0]] _namespace_rand_buffer_index[0] += 1 if _namespace_rand_buffer_index[0] == 20000: _namespace_rand_buffer_index[0] = 0 return val # template-specific support code cdef int _buffer_size = 1024 cdef int[:] _prebuf = _numpy.zeros(_buffer_size, dtype=_numpy.int32) cdef int[:] _postbuf = _numpy.zeros(_buffer_size, dtype=_numpy.int32) cdef int _curbuf = 0 cdef int _raw_pre_idx cdef int _raw_post_idx cdef void _flush_buffer(buf, dynarr, int buf_len): cdef size_t _curlen = dynarr.shape[0] cdef size_t _newlen = _curlen+buf_len # Resize the array dynarr.resize(_newlen) # Get the potentially newly created underlying data arrays data = dynarr.data data[_curlen:_curlen+buf_len] = buf[:buf_len] def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_DG_pytoCA3_inh_N = _namespace['_array_DG_pytoCA3_inh_N'] cdef int32_t * _array_DG_pytoCA3_inh_N = _buf__array_DG_pytoCA3_inh_N.data cdef int32_t N = _namespace["N"] _var_N_post = _namespace["_var_N_post"] cdef int64_t N_post = _namespace["N_post"] _var_N_pre = _namespace["_var_N_pre"] cdef int64_t N_pre = _namespace["N_pre"] cdef bool _cond cdef int32_t _i cdef int32_t _iter_high cdef int32_t _iter_low cdef int32_t _iter_step cdef int32_t _j cdef int32_t _k cdef int32_t _n cdef int32_t _post_idx cdef int32_t _pre_idx cdef int32_t _raw_post_idx cdef int32_t _raw_pre_idx _var__source_offset = _namespace["_var__source_offset"] cdef int64_t _source_offset = _namespace["_source_offset"] _var__synaptic_post = _namespace["_var__synaptic_post"] _dynamic_array_DG_pytoCA3_inh__synaptic_post = _namespace["_dynamic_array_DG_pytoCA3_inh__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_DG_pytoCA3_inh__synaptic_post = _namespace['_array_DG_pytoCA3_inh__synaptic_post'] cdef int32_t * _array_DG_pytoCA3_inh__synaptic_post = _buf__array_DG_pytoCA3_inh__synaptic_post.data cdef size_t _num_array_DG_pytoCA3_inh__synaptic_post = len(_namespace['_array_DG_pytoCA3_inh__synaptic_post']) cdef int32_t _synaptic_post _var__synaptic_pre = _namespace["_var__synaptic_pre"] _dynamic_array_DG_pytoCA3_inh__synaptic_pre = _namespace["_dynamic_array_DG_pytoCA3_inh__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_DG_pytoCA3_inh__synaptic_pre = _namespace['_array_DG_pytoCA3_inh__synaptic_pre'] cdef int32_t * _array_DG_pytoCA3_inh__synaptic_pre = _buf__array_DG_pytoCA3_inh__synaptic_pre.data cdef size_t _num_array_DG_pytoCA3_inh__synaptic_pre = len(_namespace['_array_DG_pytoCA3_inh__synaptic_pre']) cdef int32_t _synaptic_pre _var__target_offset = _namespace["_var__target_offset"] cdef int64_t _target_offset = _namespace["_target_offset"] cdef int32_t i # namespace for function rand global _namespace_rand_buffer global _namespace_num_rand_buffer cdef _numpy.ndarray[int64_t, ndim=1, mode='c'] _buf__rand_buffer = _namespace['_rand_buffer'] _namespace_rand_buffer = _buf__rand_buffer.data _namespace_num_rand_buffer = len(_namespace['_rand_buffer']) # namespace for function rand global _namespace_rand_buffer_index global _namespace_num_rand_buffer_index cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__rand_buffer_index = _namespace['_rand_buffer_index'] _namespace_rand_buffer_index = _buf__rand_buffer_index.data _namespace_num_rand_buffer_index = len(_namespace['_rand_buffer_index']) _var_umetre = _namespace["_var_umetre"] cdef double umetre = _namespace["umetre"] _var_z_soma_post = _namespace["_var_z_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_inh_z_soma = _namespace['_array_CA3_inh_z_soma'] cdef double * _array_CA3_inh_z_soma = _buf__array_CA3_inh_z_soma.data cdef size_t _num_array_CA3_inh_z_soma = len(_namespace['_array_CA3_inh_z_soma']) cdef double z_soma_post _var_z_soma_pre = _namespace["_var_z_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_z_soma = _namespace['_array_DG_py_z_soma'] cdef double * _array_DG_py_z_soma = _buf__array_DG_py_z_soma.data cdef size_t _num_array_DG_py_z_soma = len(_namespace['_array_DG_py_z_soma']) cdef double z_soma_pre cdef double _lio_create_cond_1 if '_owner' in _namespace: _owner = _namespace['_owner'] cdef int* _prebuf_ptr = &(_prebuf[0]) cdef int* _postbuf_ptr = &(_postbuf[0]) global _curbuf cdef size_t oldsize = len(_dynamic_array_DG_pytoCA3_inh__synaptic_pre) cdef size_t newsize # The following variables are only used for probabilistic connections cdef bool _jump_algo cdef double _log1p, _pconst cdef size_t _jump # scalar code _vectorisation_idx = 1 _lio_create_cond_1 = 0.5 / ((1000.0 * umetre) ** 2) for _i in range(N_pre): _raw_pre_idx = _i + _source_offset _iter_low = 0 _iter_high = N_post _iter_step = 1 for _k in range(_iter_low, _iter_high, _iter_step): _pre_idx = _raw_pre_idx _j = _k _raw_post_idx = _j + _target_offset if _j<0 or _j>=N_post: raise IndexError("index j=%d outside allowed range from 0 to %d" % (_j, N_post-1)) z_soma_post = _array_CA3_inh_z_soma[_raw_post_idx] z_soma_pre = _array_DG_py_z_soma[_raw_pre_idx] _post_idx = _raw_post_idx i = _i _cond = (i != _k) and (_rand(_vectorisation_idx) < (0.45 * exp(_lio_create_cond_1 * (- ((z_soma_pre - z_soma_post) ** 2))))) if not _cond: continue _post_idx = _raw_post_idx _n = 1 for _repetition in range(_n): _prebuf_ptr[_curbuf] = _pre_idx _postbuf_ptr[_curbuf] = _post_idx _curbuf += 1 # Flush buffer if _curbuf==_buffer_size: _flush_buffer(_prebuf, _dynamic_array_DG_pytoCA3_inh__synaptic_pre, _curbuf) _flush_buffer(_postbuf, _dynamic_array_DG_pytoCA3_inh__synaptic_post, _curbuf) _curbuf = 0 # Final buffer flush _flush_buffer(_prebuf, _dynamic_array_DG_pytoCA3_inh__synaptic_pre, _curbuf) _flush_buffer(_postbuf, _dynamic_array_DG_pytoCA3_inh__synaptic_post, _curbuf) _curbuf = 0 # reset the buffer for the next run newsize = len(_dynamic_array_DG_pytoCA3_inh__synaptic_pre) # now we need to resize all registered variables and set the total number # of synapse (via Python) _owner._resize(newsize) # And update N_incoming, N_outgoing and synapse_number _owner._update_synapse_numbers(oldsize) before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_DG_pytoCA3_inh_N = _namespace['_array_DG_pytoCA3_inh_N'] cdef int32_t * _array_DG_pytoCA3_inh_N = _buf__array_DG_pytoCA3_inh_N.data cdef int32_t N = _namespace["N"] _var_N_post = _namespace["_var_N_post"] cdef int64_t N_post = _namespace["N_post"] _var_N_pre = _namespace["_var_N_pre"] cdef int64_t N_pre = _namespace["N_pre"] cdef bool _cond cdef int32_t _i cdef int32_t _iter_high cdef int32_t _iter_low cdef int32_t _iter_step cdef int32_t _j cdef int32_t _k cdef int32_t _n cdef int32_t _post_idx cdef int32_t _pre_idx cdef int32_t _raw_post_idx cdef int32_t _raw_pre_idx _var__source_offset = _namespace["_var__source_offset"] cdef int64_t _source_offset = _namespace["_source_offset"] _var__synaptic_post = _namespace["_var__synaptic_post"] _dynamic_array_DG_pytoCA3_inh__synaptic_post = _namespace["_dynamic_array_DG_pytoCA3_inh__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_DG_pytoCA3_inh__synaptic_post = _namespace['_array_DG_pytoCA3_inh__synaptic_post'] cdef int32_t * _array_DG_pytoCA3_inh__synaptic_post = _buf__array_DG_pytoCA3_inh__synaptic_post.data cdef size_t _num_array_DG_pytoCA3_inh__synaptic_post = len(_namespace['_array_DG_pytoCA3_inh__synaptic_post']) cdef int32_t _synaptic_post _var__synaptic_pre = _namespace["_var__synaptic_pre"] _dynamic_array_DG_pytoCA3_inh__synaptic_pre = _namespace["_dynamic_array_DG_pytoCA3_inh__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_DG_pytoCA3_inh__synaptic_pre = _namespace['_array_DG_pytoCA3_inh__synaptic_pre'] cdef int32_t * _array_DG_pytoCA3_inh__synaptic_pre = _buf__array_DG_pytoCA3_inh__synaptic_pre.data cdef size_t _num_array_DG_pytoCA3_inh__synaptic_pre = len(_namespace['_array_DG_pytoCA3_inh__synaptic_pre']) cdef int32_t _synaptic_pre _var__target_offset = _namespace["_var__target_offset"] cdef int64_t _target_offset = _namespace["_target_offset"] cdef int32_t i # namespace for function rand global _namespace_rand_buffer global _namespace_num_rand_buffer cdef _numpy.ndarray[int64_t, ndim=1, mode='c'] _buf__rand_buffer = _namespace['_rand_buffer'] _namespace_rand_buffer = _buf__rand_buffer.data _namespace_num_rand_buffer = len(_namespace['_rand_buffer']) # namespace for function rand global _namespace_rand_buffer_index global _namespace_num_rand_buffer_index cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__rand_buffer_index = _namespace['_rand_buffer_index'] _namespace_rand_buffer_index = _buf__rand_buffer_index.data _namespace_num_rand_buffer_index = len(_namespace['_rand_buffer_index']) _var_umetre = _namespace["_var_umetre"] cdef double umetre = _namespace["umetre"] _var_z_soma_post = _namespace["_var_z_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_inh_z_soma = _namespace['_array_CA3_inh_z_soma'] cdef double * _array_CA3_inh_z_soma = _buf__array_CA3_inh_z_soma.data cdef size_t _num_array_CA3_inh_z_soma = len(_namespace['_array_CA3_inh_z_soma']) cdef double z_soma_post _var_z_soma_pre = _namespace["_var_z_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_z_soma = _namespace['_array_DG_py_z_soma'] cdef double * _array_DG_py_z_soma = _buf__array_DG_py_z_soma.data cdef size_t _num_array_DG_py_z_soma = len(_namespace['_array_DG_py_z_soma']) cdef double z_soma_pre cdef double _lio_create_cond_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_DG_pytoCA3_inh_N = _namespace['_array_DG_pytoCA3_inh_N'] cdef int32_t * _array_DG_pytoCA3_inh_N = _buf__array_DG_pytoCA3_inh_N.data cdef int32_t N = _namespace["N"] _var_N_post = _namespace["_var_N_post"] cdef int64_t N_post = _namespace["N_post"] _var_N_pre = _namespace["_var_N_pre"] cdef int64_t N_pre = _namespace["N_pre"] cdef bool _cond cdef int32_t _i cdef int32_t _iter_high cdef int32_t _iter_low cdef int32_t _iter_step cdef int32_t _j cdef int32_t _k cdef int32_t _n cdef int32_t _post_idx cdef int32_t _pre_idx cdef int32_t _raw_post_idx cdef int32_t _raw_pre_idx _var__source_offset = _namespace["_var__source_offset"] cdef int64_t _source_offset = _namespace["_source_offset"] _var__synaptic_post = _namespace["_var__synaptic_post"] _dynamic_array_DG_pytoCA3_inh__synaptic_post = _namespace["_dynamic_array_DG_pytoCA3_inh__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_DG_pytoCA3_inh__synaptic_post = _namespace['_array_DG_pytoCA3_inh__synaptic_post'] cdef int32_t * _array_DG_pytoCA3_inh__synaptic_post = _buf__array_DG_pytoCA3_inh__synaptic_post.data cdef size_t _num_array_DG_pytoCA3_inh__synaptic_post = len(_namespace['_array_DG_pytoCA3_inh__synaptic_post']) cdef int32_t _synaptic_post _var__synaptic_pre = _namespace["_var__synaptic_pre"] _dynamic_array_DG_pytoCA3_inh__synaptic_pre = _namespace["_dynamic_array_DG_pytoCA3_inh__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_DG_pytoCA3_inh__synaptic_pre = _namespace['_array_DG_pytoCA3_inh__synaptic_pre'] cdef int32_t * _array_DG_pytoCA3_inh__synaptic_pre = _buf__array_DG_pytoCA3_inh__synaptic_pre.data cdef size_t _num_array_DG_pytoCA3_inh__synaptic_pre = len(_namespace['_array_DG_pytoCA3_inh__synaptic_pre']) cdef int32_t _synaptic_pre _var__target_offset = _namespace["_var__target_offset"] cdef int64_t _target_offset = _namespace["_target_offset"] cdef int32_t i # namespace for function rand global _namespace_rand_buffer global _namespace_num_rand_buffer cdef _numpy.ndarray[int64_t, ndim=1, mode='c'] _buf__rand_buffer = _namespace['_rand_buffer'] _namespace_rand_buffer = _buf__rand_buffer.data _namespace_num_rand_buffer = len(_namespace['_rand_buffer']) # namespace for function rand global _namespace_rand_buffer_index global _namespace_num_rand_buffer_index cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__rand_buffer_index = _namespace['_rand_buffer_index'] _namespace_rand_buffer_index = _buf__rand_buffer_index.data _namespace_num_rand_buffer_index = len(_namespace['_rand_buffer_index']) _var_umetre = _namespace["_var_umetre"] cdef double umetre = _namespace["umetre"] _var_z_soma_post = _namespace["_var_z_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_inh_z_soma = _namespace['_array_CA3_inh_z_soma'] cdef double * _array_CA3_inh_z_soma = _buf__array_CA3_inh_z_soma.data cdef size_t _num_array_CA3_inh_z_soma = len(_namespace['_array_CA3_inh_z_soma']) cdef double z_soma_post _var_z_soma_pre = _namespace["_var_z_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_z_soma = _namespace['_array_DG_py_z_soma'] cdef double * _array_DG_py_z_soma = _buf__array_DG_py_z_soma.data cdef size_t _num_array_DG_py_z_soma = len(_namespace['_array_DG_py_z_soma']) cdef double z_soma_pre cdef double _lio_create_cond_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:14:51,343 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name DG_pytoCA3_inh_synapses_create_generator_codeobject 2021-11-05 15:14:51,344 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "DG_pytoCA3_inh_synapses_create_generator" using Cython module "_cython_magic_2a34dbf7c4901867a6c0d0a1a2ffec6a" 2021-11-05 15:14:51,344 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140605219851136 on /home/nikos/.cython/brian_extensions/_cython_magic_2a34dbf7c4901867a6c0d0a1a2ffec6a.lock 2021-11-05 15:14:51,344 DEBUG brian2.utils.filelock: Lock 140605219851136 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_2a34dbf7c4901867a6c0d0a1a2ffec6a.lock 2021-11-05 15:14:51,344 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140605219851136 on /home/nikos/.cython/brian_extensions/_cython_magic_2a34dbf7c4901867a6c0d0a1a2ffec6a.lock 2021-11-05 15:14:51,344 DEBUG brian2.utils.filelock: Lock 140605219851136 released on /home/nikos/.cython/brian_extensions/_cython_magic_2a34dbf7c4901867a6c0d0a1a2ffec6a.lock 2021-11-05 15:14:51,365 DIAGNOSTIC brian2.core.names: Created object of class Synapses with name CA3_pyCANtoCA1_pyCAN 2021-11-05 15:14:51,366 DIAGNOSTIC brian2.core.base: Created BrianObject with name CA3_pyCANtoCA1_pyCAN, clock=Clock(dt=100. * usecond, name='defaultclock'), when=start, order=0 2021-11-05 15:14:51,369 DIAGNOSTIC brian2.core.names: Created object of class SynapticPathway with name CA3_pyCANtoCA1_pyCAN_pre 2021-11-05 15:14:51,369 DIAGNOSTIC brian2.core.base: Created BrianObject with name CA3_pyCANtoCA1_pyCAN_pre, clock=Clock(dt=100. * usecond, name='defaultclock'), when=synapses, order=-1 2021-11-05 15:14:51,383 DEBUG brian2.synapses.synapses: Creating synapses from group 'CA3_pyCAN' to group 'CA1_pyCAN', using generator '_k for _k in range(N_post) if (i!=_k) and rand()<0.45*exp(-((z_soma_pre-z_soma_post)**2)/(2*(1000*umetre)**2))' 2021-11-05 15:14:51,383 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=CA3_pyCANtoCA1_pyCAN, template name=synapses_create_generator) for abstract code: Key setup_iterator: _iter_low = 0 _iter_high = N_post _iter_step = 1 Key create_j: _pre_idx = _raw_pre_idx _j = _k Key create_cond: _post_idx = _raw_post_idx _cond = (i != _k) and (rand() < (0.45 * exp((- ((z_soma_pre - z_soma_post) ** 2)) / (2 * ((1000 * umetre) ** 2))))) Key update_post: _post_idx = _raw_post_idx _n = 1 2021-11-05 15:14:51,485 DIAGNOSTIC brian2.devices.device: CA3_pyCANtoCA1_pyCAN_synapses_create_generator_codeobject abstract code: Key setup_iterator: _iter_low = 0 _iter_high = N_post _iter_step = 1 Key create_j: _pre_idx = _raw_pre_idx _j = _k Key create_cond: _post_idx = _raw_post_idx _cond = (i != _k) and (rand() < (0.45 * exp((- ((z_soma_pre - z_soma_post) ** 2)) / (2 * ((1000 * umetre) ** 2))))) Key update_post: _post_idx = _raw_post_idx _n = 1 2021-11-05 15:14:51,489 DIAGNOSTIC brian2.devices.device: CA3_pyCANtoCA1_pyCAN_synapses_create_generator_codeobject snippet (scalar): Key setup_iterator: Key create_j: Key create_cond: _lio_create_cond_1 = 0.5 / ((1000.0 * umetre) ** 2) Key update_post: 2021-11-05 15:14:51,489 DIAGNOSTIC brian2.devices.device: CA3_pyCANtoCA1_pyCAN_synapses_create_generator_codeobject snippet (vector): Key setup_iterator: _iter_low = 0 _iter_high = N_post _iter_step = 1 Key create_j: _pre_idx = _raw_pre_idx _j = _k Key create_cond: z_soma_post = _array_CA1_pyCAN_z_soma[_raw_post_idx] z_soma_pre = _array_CA3_pyCAN_z_soma[_raw_pre_idx] _post_idx = _raw_post_idx i = _i _cond = (i != _k) and (_rand(_vectorisation_idx) < (0.45 * exp(_lio_create_cond_1 * (- ((z_soma_pre - z_soma_post) ** 2))))) Key update_post: _post_idx = _raw_post_idx _n = 1 2021-11-05 15:14:51,490 DIAGNOSTIC brian2.devices.device: CA3_pyCANtoCA1_pyCAN_synapses_create_generator_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code cdef int64_t *_namespace_rand_buffer cdef int32_t *_namespace_rand_buffer_index cdef double _rand(int _idx): cdef double **buffer_pointer = _namespace_rand_buffer cdef double *buffer = buffer_pointer[0] cdef _numpy.ndarray _new_rand if(_namespace_rand_buffer_index[0] == 0): if buffer != NULL: free(buffer) _new_rand = _numpy.random.rand(20000) buffer = _numpy.PyArray_DATA(_new_rand) PyArray_CLEARFLAGS(<_numpy.PyArrayObject*>_new_rand, _numpy.NPY_OWNDATA) buffer_pointer[0] = buffer cdef double val = buffer[_namespace_rand_buffer_index[0]] _namespace_rand_buffer_index[0] += 1 if _namespace_rand_buffer_index[0] == 20000: _namespace_rand_buffer_index[0] = 0 return val # template-specific support code cdef int _buffer_size = 1024 cdef int[:] _prebuf = _numpy.zeros(_buffer_size, dtype=_numpy.int32) cdef int[:] _postbuf = _numpy.zeros(_buffer_size, dtype=_numpy.int32) cdef int _curbuf = 0 cdef int _raw_pre_idx cdef int _raw_post_idx cdef void _flush_buffer(buf, dynarr, int buf_len): cdef size_t _curlen = dynarr.shape[0] cdef size_t _newlen = _curlen+buf_len # Resize the array dynarr.resize(_newlen) # Get the potentially newly created underlying data arrays data = dynarr.data data[_curlen:_curlen+buf_len] = buf[:buf_len] def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_pyCANtoCA1_pyCAN_N = _namespace['_array_CA3_pyCANtoCA1_pyCAN_N'] cdef int32_t * _array_CA3_pyCANtoCA1_pyCAN_N = _buf__array_CA3_pyCANtoCA1_pyCAN_N.data cdef int32_t N = _namespace["N"] _var_N_post = _namespace["_var_N_post"] cdef int64_t N_post = _namespace["N_post"] _var_N_pre = _namespace["_var_N_pre"] cdef int64_t N_pre = _namespace["N_pre"] cdef bool _cond cdef int32_t _i cdef int32_t _iter_high cdef int32_t _iter_low cdef int32_t _iter_step cdef int32_t _j cdef int32_t _k cdef int32_t _n cdef int32_t _post_idx cdef int32_t _pre_idx cdef int32_t _raw_post_idx cdef int32_t _raw_pre_idx _var__source_offset = _namespace["_var__source_offset"] cdef int64_t _source_offset = _namespace["_source_offset"] _var__synaptic_post = _namespace["_var__synaptic_post"] _dynamic_array_CA3_pyCANtoCA1_pyCAN__synaptic_post = _namespace["_dynamic_array_CA3_pyCANtoCA1_pyCAN__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_pyCANtoCA1_pyCAN__synaptic_post = _namespace['_array_CA3_pyCANtoCA1_pyCAN__synaptic_post'] cdef int32_t * _array_CA3_pyCANtoCA1_pyCAN__synaptic_post = _buf__array_CA3_pyCANtoCA1_pyCAN__synaptic_post.data cdef size_t _num_array_CA3_pyCANtoCA1_pyCAN__synaptic_post = len(_namespace['_array_CA3_pyCANtoCA1_pyCAN__synaptic_post']) cdef int32_t _synaptic_post _var__synaptic_pre = _namespace["_var__synaptic_pre"] _dynamic_array_CA3_pyCANtoCA1_pyCAN__synaptic_pre = _namespace["_dynamic_array_CA3_pyCANtoCA1_pyCAN__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_pyCANtoCA1_pyCAN__synaptic_pre = _namespace['_array_CA3_pyCANtoCA1_pyCAN__synaptic_pre'] cdef int32_t * _array_CA3_pyCANtoCA1_pyCAN__synaptic_pre = _buf__array_CA3_pyCANtoCA1_pyCAN__synaptic_pre.data cdef size_t _num_array_CA3_pyCANtoCA1_pyCAN__synaptic_pre = len(_namespace['_array_CA3_pyCANtoCA1_pyCAN__synaptic_pre']) cdef int32_t _synaptic_pre _var__target_offset = _namespace["_var__target_offset"] cdef int64_t _target_offset = _namespace["_target_offset"] cdef int32_t i # namespace for function rand global _namespace_rand_buffer global _namespace_num_rand_buffer cdef _numpy.ndarray[int64_t, ndim=1, mode='c'] _buf__rand_buffer = _namespace['_rand_buffer'] _namespace_rand_buffer = _buf__rand_buffer.data _namespace_num_rand_buffer = len(_namespace['_rand_buffer']) # namespace for function rand global _namespace_rand_buffer_index global _namespace_num_rand_buffer_index cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__rand_buffer_index = _namespace['_rand_buffer_index'] _namespace_rand_buffer_index = _buf__rand_buffer_index.data _namespace_num_rand_buffer_index = len(_namespace['_rand_buffer_index']) _var_umetre = _namespace["_var_umetre"] cdef double umetre = _namespace["umetre"] _var_z_soma_post = _namespace["_var_z_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_z_soma = _namespace['_array_CA1_pyCAN_z_soma'] cdef double * _array_CA1_pyCAN_z_soma = _buf__array_CA1_pyCAN_z_soma.data cdef size_t _num_array_CA1_pyCAN_z_soma = len(_namespace['_array_CA1_pyCAN_z_soma']) cdef double z_soma_post _var_z_soma_pre = _namespace["_var_z_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_z_soma = _namespace['_array_CA3_pyCAN_z_soma'] cdef double * _array_CA3_pyCAN_z_soma = _buf__array_CA3_pyCAN_z_soma.data cdef size_t _num_array_CA3_pyCAN_z_soma = len(_namespace['_array_CA3_pyCAN_z_soma']) cdef double z_soma_pre cdef double _lio_create_cond_1 if '_owner' in _namespace: _owner = _namespace['_owner'] cdef int* _prebuf_ptr = &(_prebuf[0]) cdef int* _postbuf_ptr = &(_postbuf[0]) global _curbuf cdef size_t oldsize = len(_dynamic_array_CA3_pyCANtoCA1_pyCAN__synaptic_pre) cdef size_t newsize # The following variables are only used for probabilistic connections cdef bool _jump_algo cdef double _log1p, _pconst cdef size_t _jump # scalar code _vectorisation_idx = 1 _lio_create_cond_1 = 0.5 / ((1000.0 * umetre) ** 2) for _i in range(N_pre): _raw_pre_idx = _i + _source_offset _iter_low = 0 _iter_high = N_post _iter_step = 1 for _k in range(_iter_low, _iter_high, _iter_step): _pre_idx = _raw_pre_idx _j = _k _raw_post_idx = _j + _target_offset if _j<0 or _j>=N_post: raise IndexError("index j=%d outside allowed range from 0 to %d" % (_j, N_post-1)) z_soma_post = _array_CA1_pyCAN_z_soma[_raw_post_idx] z_soma_pre = _array_CA3_pyCAN_z_soma[_raw_pre_idx] _post_idx = _raw_post_idx i = _i _cond = (i != _k) and (_rand(_vectorisation_idx) < (0.45 * exp(_lio_create_cond_1 * (- ((z_soma_pre - z_soma_post) ** 2))))) if not _cond: continue _post_idx = _raw_post_idx _n = 1 for _repetition in range(_n): _prebuf_ptr[_curbuf] = _pre_idx _postbuf_ptr[_curbuf] = _post_idx _curbuf += 1 # Flush buffer if _curbuf==_buffer_size: _flush_buffer(_prebuf, _dynamic_array_CA3_pyCANtoCA1_pyCAN__synaptic_pre, _curbuf) _flush_buffer(_postbuf, _dynamic_array_CA3_pyCANtoCA1_pyCAN__synaptic_post, _curbuf) _curbuf = 0 # Final buffer flush _flush_buffer(_prebuf, _dynamic_array_CA3_pyCANtoCA1_pyCAN__synaptic_pre, _curbuf) _flush_buffer(_postbuf, _dynamic_array_CA3_pyCANtoCA1_pyCAN__synaptic_post, _curbuf) _curbuf = 0 # reset the buffer for the next run newsize = len(_dynamic_array_CA3_pyCANtoCA1_pyCAN__synaptic_pre) # now we need to resize all registered variables and set the total number # of synapse (via Python) _owner._resize(newsize) # And update N_incoming, N_outgoing and synapse_number _owner._update_synapse_numbers(oldsize) before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_pyCANtoCA1_pyCAN_N = _namespace['_array_CA3_pyCANtoCA1_pyCAN_N'] cdef int32_t * _array_CA3_pyCANtoCA1_pyCAN_N = _buf__array_CA3_pyCANtoCA1_pyCAN_N.data cdef int32_t N = _namespace["N"] _var_N_post = _namespace["_var_N_post"] cdef int64_t N_post = _namespace["N_post"] _var_N_pre = _namespace["_var_N_pre"] cdef int64_t N_pre = _namespace["N_pre"] cdef bool _cond cdef int32_t _i cdef int32_t _iter_high cdef int32_t _iter_low cdef int32_t _iter_step cdef int32_t _j cdef int32_t _k cdef int32_t _n cdef int32_t _post_idx cdef int32_t _pre_idx cdef int32_t _raw_post_idx cdef int32_t _raw_pre_idx _var__source_offset = _namespace["_var__source_offset"] cdef int64_t _source_offset = _namespace["_source_offset"] _var__synaptic_post = _namespace["_var__synaptic_post"] _dynamic_array_CA3_pyCANtoCA1_pyCAN__synaptic_post = _namespace["_dynamic_array_CA3_pyCANtoCA1_pyCAN__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_pyCANtoCA1_pyCAN__synaptic_post = _namespace['_array_CA3_pyCANtoCA1_pyCAN__synaptic_post'] cdef int32_t * _array_CA3_pyCANtoCA1_pyCAN__synaptic_post = _buf__array_CA3_pyCANtoCA1_pyCAN__synaptic_post.data cdef size_t _num_array_CA3_pyCANtoCA1_pyCAN__synaptic_post = len(_namespace['_array_CA3_pyCANtoCA1_pyCAN__synaptic_post']) cdef int32_t _synaptic_post _var__synaptic_pre = _namespace["_var__synaptic_pre"] _dynamic_array_CA3_pyCANtoCA1_pyCAN__synaptic_pre = _namespace["_dynamic_array_CA3_pyCANtoCA1_pyCAN__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_pyCANtoCA1_pyCAN__synaptic_pre = _namespace['_array_CA3_pyCANtoCA1_pyCAN__synaptic_pre'] cdef int32_t * _array_CA3_pyCANtoCA1_pyCAN__synaptic_pre = _buf__array_CA3_pyCANtoCA1_pyCAN__synaptic_pre.data cdef size_t _num_array_CA3_pyCANtoCA1_pyCAN__synaptic_pre = len(_namespace['_array_CA3_pyCANtoCA1_pyCAN__synaptic_pre']) cdef int32_t _synaptic_pre _var__target_offset = _namespace["_var__target_offset"] cdef int64_t _target_offset = _namespace["_target_offset"] cdef int32_t i # namespace for function rand global _namespace_rand_buffer global _namespace_num_rand_buffer cdef _numpy.ndarray[int64_t, ndim=1, mode='c'] _buf__rand_buffer = _namespace['_rand_buffer'] _namespace_rand_buffer = _buf__rand_buffer.data _namespace_num_rand_buffer = len(_namespace['_rand_buffer']) # namespace for function rand global _namespace_rand_buffer_index global _namespace_num_rand_buffer_index cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__rand_buffer_index = _namespace['_rand_buffer_index'] _namespace_rand_buffer_index = _buf__rand_buffer_index.data _namespace_num_rand_buffer_index = len(_namespace['_rand_buffer_index']) _var_umetre = _namespace["_var_umetre"] cdef double umetre = _namespace["umetre"] _var_z_soma_post = _namespace["_var_z_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_z_soma = _namespace['_array_CA1_pyCAN_z_soma'] cdef double * _array_CA1_pyCAN_z_soma = _buf__array_CA1_pyCAN_z_soma.data cdef size_t _num_array_CA1_pyCAN_z_soma = len(_namespace['_array_CA1_pyCAN_z_soma']) cdef double z_soma_post _var_z_soma_pre = _namespace["_var_z_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_z_soma = _namespace['_array_CA3_pyCAN_z_soma'] cdef double * _array_CA3_pyCAN_z_soma = _buf__array_CA3_pyCAN_z_soma.data cdef size_t _num_array_CA3_pyCAN_z_soma = len(_namespace['_array_CA3_pyCAN_z_soma']) cdef double z_soma_pre cdef double _lio_create_cond_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_pyCANtoCA1_pyCAN_N = _namespace['_array_CA3_pyCANtoCA1_pyCAN_N'] cdef int32_t * _array_CA3_pyCANtoCA1_pyCAN_N = _buf__array_CA3_pyCANtoCA1_pyCAN_N.data cdef int32_t N = _namespace["N"] _var_N_post = _namespace["_var_N_post"] cdef int64_t N_post = _namespace["N_post"] _var_N_pre = _namespace["_var_N_pre"] cdef int64_t N_pre = _namespace["N_pre"] cdef bool _cond cdef int32_t _i cdef int32_t _iter_high cdef int32_t _iter_low cdef int32_t _iter_step cdef int32_t _j cdef int32_t _k cdef int32_t _n cdef int32_t _post_idx cdef int32_t _pre_idx cdef int32_t _raw_post_idx cdef int32_t _raw_pre_idx _var__source_offset = _namespace["_var__source_offset"] cdef int64_t _source_offset = _namespace["_source_offset"] _var__synaptic_post = _namespace["_var__synaptic_post"] _dynamic_array_CA3_pyCANtoCA1_pyCAN__synaptic_post = _namespace["_dynamic_array_CA3_pyCANtoCA1_pyCAN__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_pyCANtoCA1_pyCAN__synaptic_post = _namespace['_array_CA3_pyCANtoCA1_pyCAN__synaptic_post'] cdef int32_t * _array_CA3_pyCANtoCA1_pyCAN__synaptic_post = _buf__array_CA3_pyCANtoCA1_pyCAN__synaptic_post.data cdef size_t _num_array_CA3_pyCANtoCA1_pyCAN__synaptic_post = len(_namespace['_array_CA3_pyCANtoCA1_pyCAN__synaptic_post']) cdef int32_t _synaptic_post _var__synaptic_pre = _namespace["_var__synaptic_pre"] _dynamic_array_CA3_pyCANtoCA1_pyCAN__synaptic_pre = _namespace["_dynamic_array_CA3_pyCANtoCA1_pyCAN__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_pyCANtoCA1_pyCAN__synaptic_pre = _namespace['_array_CA3_pyCANtoCA1_pyCAN__synaptic_pre'] cdef int32_t * _array_CA3_pyCANtoCA1_pyCAN__synaptic_pre = _buf__array_CA3_pyCANtoCA1_pyCAN__synaptic_pre.data cdef size_t _num_array_CA3_pyCANtoCA1_pyCAN__synaptic_pre = len(_namespace['_array_CA3_pyCANtoCA1_pyCAN__synaptic_pre']) cdef int32_t _synaptic_pre _var__target_offset = _namespace["_var__target_offset"] cdef int64_t _target_offset = _namespace["_target_offset"] cdef int32_t i # namespace for function rand global _namespace_rand_buffer global _namespace_num_rand_buffer cdef _numpy.ndarray[int64_t, ndim=1, mode='c'] _buf__rand_buffer = _namespace['_rand_buffer'] _namespace_rand_buffer = _buf__rand_buffer.data _namespace_num_rand_buffer = len(_namespace['_rand_buffer']) # namespace for function rand global _namespace_rand_buffer_index global _namespace_num_rand_buffer_index cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__rand_buffer_index = _namespace['_rand_buffer_index'] _namespace_rand_buffer_index = _buf__rand_buffer_index.data _namespace_num_rand_buffer_index = len(_namespace['_rand_buffer_index']) _var_umetre = _namespace["_var_umetre"] cdef double umetre = _namespace["umetre"] _var_z_soma_post = _namespace["_var_z_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_z_soma = _namespace['_array_CA1_pyCAN_z_soma'] cdef double * _array_CA1_pyCAN_z_soma = _buf__array_CA1_pyCAN_z_soma.data cdef size_t _num_array_CA1_pyCAN_z_soma = len(_namespace['_array_CA1_pyCAN_z_soma']) cdef double z_soma_post _var_z_soma_pre = _namespace["_var_z_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_z_soma = _namespace['_array_CA3_pyCAN_z_soma'] cdef double * _array_CA3_pyCAN_z_soma = _buf__array_CA3_pyCAN_z_soma.data cdef size_t _num_array_CA3_pyCAN_z_soma = len(_namespace['_array_CA3_pyCAN_z_soma']) cdef double z_soma_pre cdef double _lio_create_cond_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:14:51,490 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name CA3_pyCANtoCA1_pyCAN_synapses_create_generator_codeobject 2021-11-05 15:14:51,491 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "CA3_pyCANtoCA1_pyCAN_synapses_create_generator" using Cython module "_cython_magic_f10fbed8be77852564d220c9b7cac801" 2021-11-05 15:14:51,491 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140605219511744 on /home/nikos/.cython/brian_extensions/_cython_magic_f10fbed8be77852564d220c9b7cac801.lock 2021-11-05 15:14:51,491 DEBUG brian2.utils.filelock: Lock 140605219511744 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_f10fbed8be77852564d220c9b7cac801.lock 2021-11-05 15:14:51,491 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140605219511744 on /home/nikos/.cython/brian_extensions/_cython_magic_f10fbed8be77852564d220c9b7cac801.lock 2021-11-05 15:14:51,491 DEBUG brian2.utils.filelock: Lock 140605219511744 released on /home/nikos/.cython/brian_extensions/_cython_magic_f10fbed8be77852564d220c9b7cac801.lock 2021-11-05 15:14:51,739 DIAGNOSTIC brian2.core.names: Created object of class Synapses with name CA3_pyCANtoCA1_inh 2021-11-05 15:14:51,740 DIAGNOSTIC brian2.core.base: Created BrianObject with name CA3_pyCANtoCA1_inh, clock=Clock(dt=100. * usecond, name='defaultclock'), when=start, order=0 2021-11-05 15:14:51,743 DIAGNOSTIC brian2.core.names: Created object of class SynapticPathway with name CA3_pyCANtoCA1_inh_pre 2021-11-05 15:14:51,744 DIAGNOSTIC brian2.core.base: Created BrianObject with name CA3_pyCANtoCA1_inh_pre, clock=Clock(dt=100. * usecond, name='defaultclock'), when=synapses, order=-1 2021-11-05 15:14:51,752 DEBUG brian2.synapses.synapses: Creating synapses from group 'CA3_pyCAN' to group 'CA1_inh', using generator '_k for _k in range(N_post) if (i!=_k) and rand()<0.45*exp(-((z_soma_pre-z_soma_post)**2)/(2*(1000*umetre)**2))' 2021-11-05 15:14:51,752 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=CA3_pyCANtoCA1_inh, template name=synapses_create_generator) for abstract code: Key setup_iterator: _iter_low = 0 _iter_high = N_post _iter_step = 1 Key create_j: _pre_idx = _raw_pre_idx _j = _k Key create_cond: _post_idx = _raw_post_idx _cond = (i != _k) and (rand() < (0.45 * exp((- ((z_soma_pre - z_soma_post) ** 2)) / (2 * ((1000 * umetre) ** 2))))) Key update_post: _post_idx = _raw_post_idx _n = 1 2021-11-05 15:14:51,807 DIAGNOSTIC brian2.devices.device: CA3_pyCANtoCA1_inh_synapses_create_generator_codeobject abstract code: Key setup_iterator: _iter_low = 0 _iter_high = N_post _iter_step = 1 Key create_j: _pre_idx = _raw_pre_idx _j = _k Key create_cond: _post_idx = _raw_post_idx _cond = (i != _k) and (rand() < (0.45 * exp((- ((z_soma_pre - z_soma_post) ** 2)) / (2 * ((1000 * umetre) ** 2))))) Key update_post: _post_idx = _raw_post_idx _n = 1 2021-11-05 15:14:51,811 DIAGNOSTIC brian2.devices.device: CA3_pyCANtoCA1_inh_synapses_create_generator_codeobject snippet (scalar): Key setup_iterator: Key create_j: Key create_cond: _lio_create_cond_1 = 0.5 / ((1000.0 * umetre) ** 2) Key update_post: 2021-11-05 15:14:51,811 DIAGNOSTIC brian2.devices.device: CA3_pyCANtoCA1_inh_synapses_create_generator_codeobject snippet (vector): Key setup_iterator: _iter_low = 0 _iter_high = N_post _iter_step = 1 Key create_j: _pre_idx = _raw_pre_idx _j = _k Key create_cond: z_soma_post = _array_CA1_inh_z_soma[_raw_post_idx] z_soma_pre = _array_CA3_pyCAN_z_soma[_raw_pre_idx] _post_idx = _raw_post_idx i = _i _cond = (i != _k) and (_rand(_vectorisation_idx) < (0.45 * exp(_lio_create_cond_1 * (- ((z_soma_pre - z_soma_post) ** 2))))) Key update_post: _post_idx = _raw_post_idx _n = 1 2021-11-05 15:14:51,812 DIAGNOSTIC brian2.devices.device: CA3_pyCANtoCA1_inh_synapses_create_generator_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code cdef int64_t *_namespace_rand_buffer cdef int32_t *_namespace_rand_buffer_index cdef double _rand(int _idx): cdef double **buffer_pointer = _namespace_rand_buffer cdef double *buffer = buffer_pointer[0] cdef _numpy.ndarray _new_rand if(_namespace_rand_buffer_index[0] == 0): if buffer != NULL: free(buffer) _new_rand = _numpy.random.rand(20000) buffer = _numpy.PyArray_DATA(_new_rand) PyArray_CLEARFLAGS(<_numpy.PyArrayObject*>_new_rand, _numpy.NPY_OWNDATA) buffer_pointer[0] = buffer cdef double val = buffer[_namespace_rand_buffer_index[0]] _namespace_rand_buffer_index[0] += 1 if _namespace_rand_buffer_index[0] == 20000: _namespace_rand_buffer_index[0] = 0 return val # template-specific support code cdef int _buffer_size = 1024 cdef int[:] _prebuf = _numpy.zeros(_buffer_size, dtype=_numpy.int32) cdef int[:] _postbuf = _numpy.zeros(_buffer_size, dtype=_numpy.int32) cdef int _curbuf = 0 cdef int _raw_pre_idx cdef int _raw_post_idx cdef void _flush_buffer(buf, dynarr, int buf_len): cdef size_t _curlen = dynarr.shape[0] cdef size_t _newlen = _curlen+buf_len # Resize the array dynarr.resize(_newlen) # Get the potentially newly created underlying data arrays data = dynarr.data data[_curlen:_curlen+buf_len] = buf[:buf_len] def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_pyCANtoCA1_inh_N = _namespace['_array_CA3_pyCANtoCA1_inh_N'] cdef int32_t * _array_CA3_pyCANtoCA1_inh_N = _buf__array_CA3_pyCANtoCA1_inh_N.data cdef int32_t N = _namespace["N"] _var_N_post = _namespace["_var_N_post"] cdef int64_t N_post = _namespace["N_post"] _var_N_pre = _namespace["_var_N_pre"] cdef int64_t N_pre = _namespace["N_pre"] cdef bool _cond cdef int32_t _i cdef int32_t _iter_high cdef int32_t _iter_low cdef int32_t _iter_step cdef int32_t _j cdef int32_t _k cdef int32_t _n cdef int32_t _post_idx cdef int32_t _pre_idx cdef int32_t _raw_post_idx cdef int32_t _raw_pre_idx _var__source_offset = _namespace["_var__source_offset"] cdef int64_t _source_offset = _namespace["_source_offset"] _var__synaptic_post = _namespace["_var__synaptic_post"] _dynamic_array_CA3_pyCANtoCA1_inh__synaptic_post = _namespace["_dynamic_array_CA3_pyCANtoCA1_inh__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_pyCANtoCA1_inh__synaptic_post = _namespace['_array_CA3_pyCANtoCA1_inh__synaptic_post'] cdef int32_t * _array_CA3_pyCANtoCA1_inh__synaptic_post = _buf__array_CA3_pyCANtoCA1_inh__synaptic_post.data cdef size_t _num_array_CA3_pyCANtoCA1_inh__synaptic_post = len(_namespace['_array_CA3_pyCANtoCA1_inh__synaptic_post']) cdef int32_t _synaptic_post _var__synaptic_pre = _namespace["_var__synaptic_pre"] _dynamic_array_CA3_pyCANtoCA1_inh__synaptic_pre = _namespace["_dynamic_array_CA3_pyCANtoCA1_inh__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_pyCANtoCA1_inh__synaptic_pre = _namespace['_array_CA3_pyCANtoCA1_inh__synaptic_pre'] cdef int32_t * _array_CA3_pyCANtoCA1_inh__synaptic_pre = _buf__array_CA3_pyCANtoCA1_inh__synaptic_pre.data cdef size_t _num_array_CA3_pyCANtoCA1_inh__synaptic_pre = len(_namespace['_array_CA3_pyCANtoCA1_inh__synaptic_pre']) cdef int32_t _synaptic_pre _var__target_offset = _namespace["_var__target_offset"] cdef int64_t _target_offset = _namespace["_target_offset"] cdef int32_t i # namespace for function rand global _namespace_rand_buffer global _namespace_num_rand_buffer cdef _numpy.ndarray[int64_t, ndim=1, mode='c'] _buf__rand_buffer = _namespace['_rand_buffer'] _namespace_rand_buffer = _buf__rand_buffer.data _namespace_num_rand_buffer = len(_namespace['_rand_buffer']) # namespace for function rand global _namespace_rand_buffer_index global _namespace_num_rand_buffer_index cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__rand_buffer_index = _namespace['_rand_buffer_index'] _namespace_rand_buffer_index = _buf__rand_buffer_index.data _namespace_num_rand_buffer_index = len(_namespace['_rand_buffer_index']) _var_umetre = _namespace["_var_umetre"] cdef double umetre = _namespace["umetre"] _var_z_soma_post = _namespace["_var_z_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_z_soma = _namespace['_array_CA1_inh_z_soma'] cdef double * _array_CA1_inh_z_soma = _buf__array_CA1_inh_z_soma.data cdef size_t _num_array_CA1_inh_z_soma = len(_namespace['_array_CA1_inh_z_soma']) cdef double z_soma_post _var_z_soma_pre = _namespace["_var_z_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_z_soma = _namespace['_array_CA3_pyCAN_z_soma'] cdef double * _array_CA3_pyCAN_z_soma = _buf__array_CA3_pyCAN_z_soma.data cdef size_t _num_array_CA3_pyCAN_z_soma = len(_namespace['_array_CA3_pyCAN_z_soma']) cdef double z_soma_pre cdef double _lio_create_cond_1 if '_owner' in _namespace: _owner = _namespace['_owner'] cdef int* _prebuf_ptr = &(_prebuf[0]) cdef int* _postbuf_ptr = &(_postbuf[0]) global _curbuf cdef size_t oldsize = len(_dynamic_array_CA3_pyCANtoCA1_inh__synaptic_pre) cdef size_t newsize # The following variables are only used for probabilistic connections cdef bool _jump_algo cdef double _log1p, _pconst cdef size_t _jump # scalar code _vectorisation_idx = 1 _lio_create_cond_1 = 0.5 / ((1000.0 * umetre) ** 2) for _i in range(N_pre): _raw_pre_idx = _i + _source_offset _iter_low = 0 _iter_high = N_post _iter_step = 1 for _k in range(_iter_low, _iter_high, _iter_step): _pre_idx = _raw_pre_idx _j = _k _raw_post_idx = _j + _target_offset if _j<0 or _j>=N_post: raise IndexError("index j=%d outside allowed range from 0 to %d" % (_j, N_post-1)) z_soma_post = _array_CA1_inh_z_soma[_raw_post_idx] z_soma_pre = _array_CA3_pyCAN_z_soma[_raw_pre_idx] _post_idx = _raw_post_idx i = _i _cond = (i != _k) and (_rand(_vectorisation_idx) < (0.45 * exp(_lio_create_cond_1 * (- ((z_soma_pre - z_soma_post) ** 2))))) if not _cond: continue _post_idx = _raw_post_idx _n = 1 for _repetition in range(_n): _prebuf_ptr[_curbuf] = _pre_idx _postbuf_ptr[_curbuf] = _post_idx _curbuf += 1 # Flush buffer if _curbuf==_buffer_size: _flush_buffer(_prebuf, _dynamic_array_CA3_pyCANtoCA1_inh__synaptic_pre, _curbuf) _flush_buffer(_postbuf, _dynamic_array_CA3_pyCANtoCA1_inh__synaptic_post, _curbuf) _curbuf = 0 # Final buffer flush _flush_buffer(_prebuf, _dynamic_array_CA3_pyCANtoCA1_inh__synaptic_pre, _curbuf) _flush_buffer(_postbuf, _dynamic_array_CA3_pyCANtoCA1_inh__synaptic_post, _curbuf) _curbuf = 0 # reset the buffer for the next run newsize = len(_dynamic_array_CA3_pyCANtoCA1_inh__synaptic_pre) # now we need to resize all registered variables and set the total number # of synapse (via Python) _owner._resize(newsize) # And update N_incoming, N_outgoing and synapse_number _owner._update_synapse_numbers(oldsize) before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_pyCANtoCA1_inh_N = _namespace['_array_CA3_pyCANtoCA1_inh_N'] cdef int32_t * _array_CA3_pyCANtoCA1_inh_N = _buf__array_CA3_pyCANtoCA1_inh_N.data cdef int32_t N = _namespace["N"] _var_N_post = _namespace["_var_N_post"] cdef int64_t N_post = _namespace["N_post"] _var_N_pre = _namespace["_var_N_pre"] cdef int64_t N_pre = _namespace["N_pre"] cdef bool _cond cdef int32_t _i cdef int32_t _iter_high cdef int32_t _iter_low cdef int32_t _iter_step cdef int32_t _j cdef int32_t _k cdef int32_t _n cdef int32_t _post_idx cdef int32_t _pre_idx cdef int32_t _raw_post_idx cdef int32_t _raw_pre_idx _var__source_offset = _namespace["_var__source_offset"] cdef int64_t _source_offset = _namespace["_source_offset"] _var__synaptic_post = _namespace["_var__synaptic_post"] _dynamic_array_CA3_pyCANtoCA1_inh__synaptic_post = _namespace["_dynamic_array_CA3_pyCANtoCA1_inh__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_pyCANtoCA1_inh__synaptic_post = _namespace['_array_CA3_pyCANtoCA1_inh__synaptic_post'] cdef int32_t * _array_CA3_pyCANtoCA1_inh__synaptic_post = _buf__array_CA3_pyCANtoCA1_inh__synaptic_post.data cdef size_t _num_array_CA3_pyCANtoCA1_inh__synaptic_post = len(_namespace['_array_CA3_pyCANtoCA1_inh__synaptic_post']) cdef int32_t _synaptic_post _var__synaptic_pre = _namespace["_var__synaptic_pre"] _dynamic_array_CA3_pyCANtoCA1_inh__synaptic_pre = _namespace["_dynamic_array_CA3_pyCANtoCA1_inh__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_pyCANtoCA1_inh__synaptic_pre = _namespace['_array_CA3_pyCANtoCA1_inh__synaptic_pre'] cdef int32_t * _array_CA3_pyCANtoCA1_inh__synaptic_pre = _buf__array_CA3_pyCANtoCA1_inh__synaptic_pre.data cdef size_t _num_array_CA3_pyCANtoCA1_inh__synaptic_pre = len(_namespace['_array_CA3_pyCANtoCA1_inh__synaptic_pre']) cdef int32_t _synaptic_pre _var__target_offset = _namespace["_var__target_offset"] cdef int64_t _target_offset = _namespace["_target_offset"] cdef int32_t i # namespace for function rand global _namespace_rand_buffer global _namespace_num_rand_buffer cdef _numpy.ndarray[int64_t, ndim=1, mode='c'] _buf__rand_buffer = _namespace['_rand_buffer'] _namespace_rand_buffer = _buf__rand_buffer.data _namespace_num_rand_buffer = len(_namespace['_rand_buffer']) # namespace for function rand global _namespace_rand_buffer_index global _namespace_num_rand_buffer_index cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__rand_buffer_index = _namespace['_rand_buffer_index'] _namespace_rand_buffer_index = _buf__rand_buffer_index.data _namespace_num_rand_buffer_index = len(_namespace['_rand_buffer_index']) _var_umetre = _namespace["_var_umetre"] cdef double umetre = _namespace["umetre"] _var_z_soma_post = _namespace["_var_z_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_z_soma = _namespace['_array_CA1_inh_z_soma'] cdef double * _array_CA1_inh_z_soma = _buf__array_CA1_inh_z_soma.data cdef size_t _num_array_CA1_inh_z_soma = len(_namespace['_array_CA1_inh_z_soma']) cdef double z_soma_post _var_z_soma_pre = _namespace["_var_z_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_z_soma = _namespace['_array_CA3_pyCAN_z_soma'] cdef double * _array_CA3_pyCAN_z_soma = _buf__array_CA3_pyCAN_z_soma.data cdef size_t _num_array_CA3_pyCAN_z_soma = len(_namespace['_array_CA3_pyCAN_z_soma']) cdef double z_soma_pre cdef double _lio_create_cond_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_pyCANtoCA1_inh_N = _namespace['_array_CA3_pyCANtoCA1_inh_N'] cdef int32_t * _array_CA3_pyCANtoCA1_inh_N = _buf__array_CA3_pyCANtoCA1_inh_N.data cdef int32_t N = _namespace["N"] _var_N_post = _namespace["_var_N_post"] cdef int64_t N_post = _namespace["N_post"] _var_N_pre = _namespace["_var_N_pre"] cdef int64_t N_pre = _namespace["N_pre"] cdef bool _cond cdef int32_t _i cdef int32_t _iter_high cdef int32_t _iter_low cdef int32_t _iter_step cdef int32_t _j cdef int32_t _k cdef int32_t _n cdef int32_t _post_idx cdef int32_t _pre_idx cdef int32_t _raw_post_idx cdef int32_t _raw_pre_idx _var__source_offset = _namespace["_var__source_offset"] cdef int64_t _source_offset = _namespace["_source_offset"] _var__synaptic_post = _namespace["_var__synaptic_post"] _dynamic_array_CA3_pyCANtoCA1_inh__synaptic_post = _namespace["_dynamic_array_CA3_pyCANtoCA1_inh__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_pyCANtoCA1_inh__synaptic_post = _namespace['_array_CA3_pyCANtoCA1_inh__synaptic_post'] cdef int32_t * _array_CA3_pyCANtoCA1_inh__synaptic_post = _buf__array_CA3_pyCANtoCA1_inh__synaptic_post.data cdef size_t _num_array_CA3_pyCANtoCA1_inh__synaptic_post = len(_namespace['_array_CA3_pyCANtoCA1_inh__synaptic_post']) cdef int32_t _synaptic_post _var__synaptic_pre = _namespace["_var__synaptic_pre"] _dynamic_array_CA3_pyCANtoCA1_inh__synaptic_pre = _namespace["_dynamic_array_CA3_pyCANtoCA1_inh__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_pyCANtoCA1_inh__synaptic_pre = _namespace['_array_CA3_pyCANtoCA1_inh__synaptic_pre'] cdef int32_t * _array_CA3_pyCANtoCA1_inh__synaptic_pre = _buf__array_CA3_pyCANtoCA1_inh__synaptic_pre.data cdef size_t _num_array_CA3_pyCANtoCA1_inh__synaptic_pre = len(_namespace['_array_CA3_pyCANtoCA1_inh__synaptic_pre']) cdef int32_t _synaptic_pre _var__target_offset = _namespace["_var__target_offset"] cdef int64_t _target_offset = _namespace["_target_offset"] cdef int32_t i # namespace for function rand global _namespace_rand_buffer global _namespace_num_rand_buffer cdef _numpy.ndarray[int64_t, ndim=1, mode='c'] _buf__rand_buffer = _namespace['_rand_buffer'] _namespace_rand_buffer = _buf__rand_buffer.data _namespace_num_rand_buffer = len(_namespace['_rand_buffer']) # namespace for function rand global _namespace_rand_buffer_index global _namespace_num_rand_buffer_index cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__rand_buffer_index = _namespace['_rand_buffer_index'] _namespace_rand_buffer_index = _buf__rand_buffer_index.data _namespace_num_rand_buffer_index = len(_namespace['_rand_buffer_index']) _var_umetre = _namespace["_var_umetre"] cdef double umetre = _namespace["umetre"] _var_z_soma_post = _namespace["_var_z_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_z_soma = _namespace['_array_CA1_inh_z_soma'] cdef double * _array_CA1_inh_z_soma = _buf__array_CA1_inh_z_soma.data cdef size_t _num_array_CA1_inh_z_soma = len(_namespace['_array_CA1_inh_z_soma']) cdef double z_soma_post _var_z_soma_pre = _namespace["_var_z_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_z_soma = _namespace['_array_CA3_pyCAN_z_soma'] cdef double * _array_CA3_pyCAN_z_soma = _buf__array_CA3_pyCAN_z_soma.data cdef size_t _num_array_CA3_pyCAN_z_soma = len(_namespace['_array_CA3_pyCAN_z_soma']) cdef double z_soma_pre cdef double _lio_create_cond_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:14:51,812 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name CA3_pyCANtoCA1_inh_synapses_create_generator_codeobject 2021-11-05 15:14:51,812 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "CA3_pyCANtoCA1_inh_synapses_create_generator" using Cython module "_cython_magic_9d2379fac5e43f0bfd76b451a7745a81" 2021-11-05 15:14:51,812 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140605217423664 on /home/nikos/.cython/brian_extensions/_cython_magic_9d2379fac5e43f0bfd76b451a7745a81.lock 2021-11-05 15:14:51,812 DEBUG brian2.utils.filelock: Lock 140605217423664 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_9d2379fac5e43f0bfd76b451a7745a81.lock 2021-11-05 15:14:51,813 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140605217423664 on /home/nikos/.cython/brian_extensions/_cython_magic_9d2379fac5e43f0bfd76b451a7745a81.lock 2021-11-05 15:14:51,813 DEBUG brian2.utils.filelock: Lock 140605217423664 released on /home/nikos/.cython/brian_extensions/_cython_magic_9d2379fac5e43f0bfd76b451a7745a81.lock 2021-11-05 15:14:51,837 DIAGNOSTIC brian2.core.names: Created object of class Synapses with name CA1_pyCANtoEC_pyCAN 2021-11-05 15:14:51,837 DIAGNOSTIC brian2.core.base: Created BrianObject with name CA1_pyCANtoEC_pyCAN, clock=Clock(dt=100. * usecond, name='defaultclock'), when=start, order=0 2021-11-05 15:14:51,841 DIAGNOSTIC brian2.core.names: Created object of class SynapticPathway with name CA1_pyCANtoEC_pyCAN_pre 2021-11-05 15:14:51,841 DIAGNOSTIC brian2.core.base: Created BrianObject with name CA1_pyCANtoEC_pyCAN_pre, clock=Clock(dt=100. * usecond, name='defaultclock'), when=synapses, order=-1 2021-11-05 15:14:51,855 DEBUG brian2.synapses.synapses: Creating synapses from group 'CA1_pyCAN' to group 'EC_pyCAN', using generator '_k for _k in range(N_post) if (i!=_k) and rand()<0.45*exp(-((z_soma_pre-z_soma_post)**2)/(2*(1000*umetre)**2))' 2021-11-05 15:14:51,855 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=CA1_pyCANtoEC_pyCAN, template name=synapses_create_generator) for abstract code: Key setup_iterator: _iter_low = 0 _iter_high = N_post _iter_step = 1 Key create_j: _pre_idx = _raw_pre_idx _j = _k Key create_cond: _post_idx = _raw_post_idx _cond = (i != _k) and (rand() < (0.45 * exp((- ((z_soma_pre - z_soma_post) ** 2)) / (2 * ((1000 * umetre) ** 2))))) Key update_post: _post_idx = _raw_post_idx _n = 1 2021-11-05 15:14:51,919 DIAGNOSTIC brian2.devices.device: CA1_pyCANtoEC_pyCAN_synapses_create_generator_codeobject abstract code: Key setup_iterator: _iter_low = 0 _iter_high = N_post _iter_step = 1 Key create_j: _pre_idx = _raw_pre_idx _j = _k Key create_cond: _post_idx = _raw_post_idx _cond = (i != _k) and (rand() < (0.45 * exp((- ((z_soma_pre - z_soma_post) ** 2)) / (2 * ((1000 * umetre) ** 2))))) Key update_post: _post_idx = _raw_post_idx _n = 1 2021-11-05 15:14:51,921 DIAGNOSTIC brian2.devices.device: CA1_pyCANtoEC_pyCAN_synapses_create_generator_codeobject snippet (scalar): Key setup_iterator: Key create_j: Key create_cond: _lio_create_cond_1 = 0.5 / ((1000.0 * umetre) ** 2) Key update_post: 2021-11-05 15:14:51,921 DIAGNOSTIC brian2.devices.device: CA1_pyCANtoEC_pyCAN_synapses_create_generator_codeobject snippet (vector): Key setup_iterator: _iter_low = 0 _iter_high = N_post _iter_step = 1 Key create_j: _pre_idx = _raw_pre_idx _j = _k Key create_cond: z_soma_post = _array_EC_pyCAN_z_soma[_raw_post_idx] z_soma_pre = _array_CA1_pyCAN_z_soma[_raw_pre_idx] _post_idx = _raw_post_idx i = _i _cond = (i != _k) and (_rand(_vectorisation_idx) < (0.45 * exp(_lio_create_cond_1 * (- ((z_soma_pre - z_soma_post) ** 2))))) Key update_post: _post_idx = _raw_post_idx _n = 1 2021-11-05 15:14:51,922 DIAGNOSTIC brian2.devices.device: CA1_pyCANtoEC_pyCAN_synapses_create_generator_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code cdef int64_t *_namespace_rand_buffer cdef int32_t *_namespace_rand_buffer_index cdef double _rand(int _idx): cdef double **buffer_pointer = _namespace_rand_buffer cdef double *buffer = buffer_pointer[0] cdef _numpy.ndarray _new_rand if(_namespace_rand_buffer_index[0] == 0): if buffer != NULL: free(buffer) _new_rand = _numpy.random.rand(20000) buffer = _numpy.PyArray_DATA(_new_rand) PyArray_CLEARFLAGS(<_numpy.PyArrayObject*>_new_rand, _numpy.NPY_OWNDATA) buffer_pointer[0] = buffer cdef double val = buffer[_namespace_rand_buffer_index[0]] _namespace_rand_buffer_index[0] += 1 if _namespace_rand_buffer_index[0] == 20000: _namespace_rand_buffer_index[0] = 0 return val # template-specific support code cdef int _buffer_size = 1024 cdef int[:] _prebuf = _numpy.zeros(_buffer_size, dtype=_numpy.int32) cdef int[:] _postbuf = _numpy.zeros(_buffer_size, dtype=_numpy.int32) cdef int _curbuf = 0 cdef int _raw_pre_idx cdef int _raw_post_idx cdef void _flush_buffer(buf, dynarr, int buf_len): cdef size_t _curlen = dynarr.shape[0] cdef size_t _newlen = _curlen+buf_len # Resize the array dynarr.resize(_newlen) # Get the potentially newly created underlying data arrays data = dynarr.data data[_curlen:_curlen+buf_len] = buf[:buf_len] def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_pyCANtoEC_pyCAN_N = _namespace['_array_CA1_pyCANtoEC_pyCAN_N'] cdef int32_t * _array_CA1_pyCANtoEC_pyCAN_N = _buf__array_CA1_pyCANtoEC_pyCAN_N.data cdef int32_t N = _namespace["N"] _var_N_post = _namespace["_var_N_post"] cdef int64_t N_post = _namespace["N_post"] _var_N_pre = _namespace["_var_N_pre"] cdef int64_t N_pre = _namespace["N_pre"] cdef bool _cond cdef int32_t _i cdef int32_t _iter_high cdef int32_t _iter_low cdef int32_t _iter_step cdef int32_t _j cdef int32_t _k cdef int32_t _n cdef int32_t _post_idx cdef int32_t _pre_idx cdef int32_t _raw_post_idx cdef int32_t _raw_pre_idx _var__source_offset = _namespace["_var__source_offset"] cdef int64_t _source_offset = _namespace["_source_offset"] _var__synaptic_post = _namespace["_var__synaptic_post"] _dynamic_array_CA1_pyCANtoEC_pyCAN__synaptic_post = _namespace["_dynamic_array_CA1_pyCANtoEC_pyCAN__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_pyCANtoEC_pyCAN__synaptic_post = _namespace['_array_CA1_pyCANtoEC_pyCAN__synaptic_post'] cdef int32_t * _array_CA1_pyCANtoEC_pyCAN__synaptic_post = _buf__array_CA1_pyCANtoEC_pyCAN__synaptic_post.data cdef size_t _num_array_CA1_pyCANtoEC_pyCAN__synaptic_post = len(_namespace['_array_CA1_pyCANtoEC_pyCAN__synaptic_post']) cdef int32_t _synaptic_post _var__synaptic_pre = _namespace["_var__synaptic_pre"] _dynamic_array_CA1_pyCANtoEC_pyCAN__synaptic_pre = _namespace["_dynamic_array_CA1_pyCANtoEC_pyCAN__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_pyCANtoEC_pyCAN__synaptic_pre = _namespace['_array_CA1_pyCANtoEC_pyCAN__synaptic_pre'] cdef int32_t * _array_CA1_pyCANtoEC_pyCAN__synaptic_pre = _buf__array_CA1_pyCANtoEC_pyCAN__synaptic_pre.data cdef size_t _num_array_CA1_pyCANtoEC_pyCAN__synaptic_pre = len(_namespace['_array_CA1_pyCANtoEC_pyCAN__synaptic_pre']) cdef int32_t _synaptic_pre _var__target_offset = _namespace["_var__target_offset"] cdef int64_t _target_offset = _namespace["_target_offset"] cdef int32_t i # namespace for function rand global _namespace_rand_buffer global _namespace_num_rand_buffer cdef _numpy.ndarray[int64_t, ndim=1, mode='c'] _buf__rand_buffer = _namespace['_rand_buffer'] _namespace_rand_buffer = _buf__rand_buffer.data _namespace_num_rand_buffer = len(_namespace['_rand_buffer']) # namespace for function rand global _namespace_rand_buffer_index global _namespace_num_rand_buffer_index cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__rand_buffer_index = _namespace['_rand_buffer_index'] _namespace_rand_buffer_index = _buf__rand_buffer_index.data _namespace_num_rand_buffer_index = len(_namespace['_rand_buffer_index']) _var_umetre = _namespace["_var_umetre"] cdef double umetre = _namespace["umetre"] _var_z_soma_post = _namespace["_var_z_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_z_soma = _namespace['_array_EC_pyCAN_z_soma'] cdef double * _array_EC_pyCAN_z_soma = _buf__array_EC_pyCAN_z_soma.data cdef size_t _num_array_EC_pyCAN_z_soma = len(_namespace['_array_EC_pyCAN_z_soma']) cdef double z_soma_post _var_z_soma_pre = _namespace["_var_z_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_z_soma = _namespace['_array_CA1_pyCAN_z_soma'] cdef double * _array_CA1_pyCAN_z_soma = _buf__array_CA1_pyCAN_z_soma.data cdef size_t _num_array_CA1_pyCAN_z_soma = len(_namespace['_array_CA1_pyCAN_z_soma']) cdef double z_soma_pre cdef double _lio_create_cond_1 if '_owner' in _namespace: _owner = _namespace['_owner'] cdef int* _prebuf_ptr = &(_prebuf[0]) cdef int* _postbuf_ptr = &(_postbuf[0]) global _curbuf cdef size_t oldsize = len(_dynamic_array_CA1_pyCANtoEC_pyCAN__synaptic_pre) cdef size_t newsize # The following variables are only used for probabilistic connections cdef bool _jump_algo cdef double _log1p, _pconst cdef size_t _jump # scalar code _vectorisation_idx = 1 _lio_create_cond_1 = 0.5 / ((1000.0 * umetre) ** 2) for _i in range(N_pre): _raw_pre_idx = _i + _source_offset _iter_low = 0 _iter_high = N_post _iter_step = 1 for _k in range(_iter_low, _iter_high, _iter_step): _pre_idx = _raw_pre_idx _j = _k _raw_post_idx = _j + _target_offset if _j<0 or _j>=N_post: raise IndexError("index j=%d outside allowed range from 0 to %d" % (_j, N_post-1)) z_soma_post = _array_EC_pyCAN_z_soma[_raw_post_idx] z_soma_pre = _array_CA1_pyCAN_z_soma[_raw_pre_idx] _post_idx = _raw_post_idx i = _i _cond = (i != _k) and (_rand(_vectorisation_idx) < (0.45 * exp(_lio_create_cond_1 * (- ((z_soma_pre - z_soma_post) ** 2))))) if not _cond: continue _post_idx = _raw_post_idx _n = 1 for _repetition in range(_n): _prebuf_ptr[_curbuf] = _pre_idx _postbuf_ptr[_curbuf] = _post_idx _curbuf += 1 # Flush buffer if _curbuf==_buffer_size: _flush_buffer(_prebuf, _dynamic_array_CA1_pyCANtoEC_pyCAN__synaptic_pre, _curbuf) _flush_buffer(_postbuf, _dynamic_array_CA1_pyCANtoEC_pyCAN__synaptic_post, _curbuf) _curbuf = 0 # Final buffer flush _flush_buffer(_prebuf, _dynamic_array_CA1_pyCANtoEC_pyCAN__synaptic_pre, _curbuf) _flush_buffer(_postbuf, _dynamic_array_CA1_pyCANtoEC_pyCAN__synaptic_post, _curbuf) _curbuf = 0 # reset the buffer for the next run newsize = len(_dynamic_array_CA1_pyCANtoEC_pyCAN__synaptic_pre) # now we need to resize all registered variables and set the total number # of synapse (via Python) _owner._resize(newsize) # And update N_incoming, N_outgoing and synapse_number _owner._update_synapse_numbers(oldsize) before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_pyCANtoEC_pyCAN_N = _namespace['_array_CA1_pyCANtoEC_pyCAN_N'] cdef int32_t * _array_CA1_pyCANtoEC_pyCAN_N = _buf__array_CA1_pyCANtoEC_pyCAN_N.data cdef int32_t N = _namespace["N"] _var_N_post = _namespace["_var_N_post"] cdef int64_t N_post = _namespace["N_post"] _var_N_pre = _namespace["_var_N_pre"] cdef int64_t N_pre = _namespace["N_pre"] cdef bool _cond cdef int32_t _i cdef int32_t _iter_high cdef int32_t _iter_low cdef int32_t _iter_step cdef int32_t _j cdef int32_t _k cdef int32_t _n cdef int32_t _post_idx cdef int32_t _pre_idx cdef int32_t _raw_post_idx cdef int32_t _raw_pre_idx _var__source_offset = _namespace["_var__source_offset"] cdef int64_t _source_offset = _namespace["_source_offset"] _var__synaptic_post = _namespace["_var__synaptic_post"] _dynamic_array_CA1_pyCANtoEC_pyCAN__synaptic_post = _namespace["_dynamic_array_CA1_pyCANtoEC_pyCAN__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_pyCANtoEC_pyCAN__synaptic_post = _namespace['_array_CA1_pyCANtoEC_pyCAN__synaptic_post'] cdef int32_t * _array_CA1_pyCANtoEC_pyCAN__synaptic_post = _buf__array_CA1_pyCANtoEC_pyCAN__synaptic_post.data cdef size_t _num_array_CA1_pyCANtoEC_pyCAN__synaptic_post = len(_namespace['_array_CA1_pyCANtoEC_pyCAN__synaptic_post']) cdef int32_t _synaptic_post _var__synaptic_pre = _namespace["_var__synaptic_pre"] _dynamic_array_CA1_pyCANtoEC_pyCAN__synaptic_pre = _namespace["_dynamic_array_CA1_pyCANtoEC_pyCAN__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_pyCANtoEC_pyCAN__synaptic_pre = _namespace['_array_CA1_pyCANtoEC_pyCAN__synaptic_pre'] cdef int32_t * _array_CA1_pyCANtoEC_pyCAN__synaptic_pre = _buf__array_CA1_pyCANtoEC_pyCAN__synaptic_pre.data cdef size_t _num_array_CA1_pyCANtoEC_pyCAN__synaptic_pre = len(_namespace['_array_CA1_pyCANtoEC_pyCAN__synaptic_pre']) cdef int32_t _synaptic_pre _var__target_offset = _namespace["_var__target_offset"] cdef int64_t _target_offset = _namespace["_target_offset"] cdef int32_t i # namespace for function rand global _namespace_rand_buffer global _namespace_num_rand_buffer cdef _numpy.ndarray[int64_t, ndim=1, mode='c'] _buf__rand_buffer = _namespace['_rand_buffer'] _namespace_rand_buffer = _buf__rand_buffer.data _namespace_num_rand_buffer = len(_namespace['_rand_buffer']) # namespace for function rand global _namespace_rand_buffer_index global _namespace_num_rand_buffer_index cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__rand_buffer_index = _namespace['_rand_buffer_index'] _namespace_rand_buffer_index = _buf__rand_buffer_index.data _namespace_num_rand_buffer_index = len(_namespace['_rand_buffer_index']) _var_umetre = _namespace["_var_umetre"] cdef double umetre = _namespace["umetre"] _var_z_soma_post = _namespace["_var_z_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_z_soma = _namespace['_array_EC_pyCAN_z_soma'] cdef double * _array_EC_pyCAN_z_soma = _buf__array_EC_pyCAN_z_soma.data cdef size_t _num_array_EC_pyCAN_z_soma = len(_namespace['_array_EC_pyCAN_z_soma']) cdef double z_soma_post _var_z_soma_pre = _namespace["_var_z_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_z_soma = _namespace['_array_CA1_pyCAN_z_soma'] cdef double * _array_CA1_pyCAN_z_soma = _buf__array_CA1_pyCAN_z_soma.data cdef size_t _num_array_CA1_pyCAN_z_soma = len(_namespace['_array_CA1_pyCAN_z_soma']) cdef double z_soma_pre cdef double _lio_create_cond_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_pyCANtoEC_pyCAN_N = _namespace['_array_CA1_pyCANtoEC_pyCAN_N'] cdef int32_t * _array_CA1_pyCANtoEC_pyCAN_N = _buf__array_CA1_pyCANtoEC_pyCAN_N.data cdef int32_t N = _namespace["N"] _var_N_post = _namespace["_var_N_post"] cdef int64_t N_post = _namespace["N_post"] _var_N_pre = _namespace["_var_N_pre"] cdef int64_t N_pre = _namespace["N_pre"] cdef bool _cond cdef int32_t _i cdef int32_t _iter_high cdef int32_t _iter_low cdef int32_t _iter_step cdef int32_t _j cdef int32_t _k cdef int32_t _n cdef int32_t _post_idx cdef int32_t _pre_idx cdef int32_t _raw_post_idx cdef int32_t _raw_pre_idx _var__source_offset = _namespace["_var__source_offset"] cdef int64_t _source_offset = _namespace["_source_offset"] _var__synaptic_post = _namespace["_var__synaptic_post"] _dynamic_array_CA1_pyCANtoEC_pyCAN__synaptic_post = _namespace["_dynamic_array_CA1_pyCANtoEC_pyCAN__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_pyCANtoEC_pyCAN__synaptic_post = _namespace['_array_CA1_pyCANtoEC_pyCAN__synaptic_post'] cdef int32_t * _array_CA1_pyCANtoEC_pyCAN__synaptic_post = _buf__array_CA1_pyCANtoEC_pyCAN__synaptic_post.data cdef size_t _num_array_CA1_pyCANtoEC_pyCAN__synaptic_post = len(_namespace['_array_CA1_pyCANtoEC_pyCAN__synaptic_post']) cdef int32_t _synaptic_post _var__synaptic_pre = _namespace["_var__synaptic_pre"] _dynamic_array_CA1_pyCANtoEC_pyCAN__synaptic_pre = _namespace["_dynamic_array_CA1_pyCANtoEC_pyCAN__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_pyCANtoEC_pyCAN__synaptic_pre = _namespace['_array_CA1_pyCANtoEC_pyCAN__synaptic_pre'] cdef int32_t * _array_CA1_pyCANtoEC_pyCAN__synaptic_pre = _buf__array_CA1_pyCANtoEC_pyCAN__synaptic_pre.data cdef size_t _num_array_CA1_pyCANtoEC_pyCAN__synaptic_pre = len(_namespace['_array_CA1_pyCANtoEC_pyCAN__synaptic_pre']) cdef int32_t _synaptic_pre _var__target_offset = _namespace["_var__target_offset"] cdef int64_t _target_offset = _namespace["_target_offset"] cdef int32_t i # namespace for function rand global _namespace_rand_buffer global _namespace_num_rand_buffer cdef _numpy.ndarray[int64_t, ndim=1, mode='c'] _buf__rand_buffer = _namespace['_rand_buffer'] _namespace_rand_buffer = _buf__rand_buffer.data _namespace_num_rand_buffer = len(_namespace['_rand_buffer']) # namespace for function rand global _namespace_rand_buffer_index global _namespace_num_rand_buffer_index cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__rand_buffer_index = _namespace['_rand_buffer_index'] _namespace_rand_buffer_index = _buf__rand_buffer_index.data _namespace_num_rand_buffer_index = len(_namespace['_rand_buffer_index']) _var_umetre = _namespace["_var_umetre"] cdef double umetre = _namespace["umetre"] _var_z_soma_post = _namespace["_var_z_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_z_soma = _namespace['_array_EC_pyCAN_z_soma'] cdef double * _array_EC_pyCAN_z_soma = _buf__array_EC_pyCAN_z_soma.data cdef size_t _num_array_EC_pyCAN_z_soma = len(_namespace['_array_EC_pyCAN_z_soma']) cdef double z_soma_post _var_z_soma_pre = _namespace["_var_z_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_z_soma = _namespace['_array_CA1_pyCAN_z_soma'] cdef double * _array_CA1_pyCAN_z_soma = _buf__array_CA1_pyCAN_z_soma.data cdef size_t _num_array_CA1_pyCAN_z_soma = len(_namespace['_array_CA1_pyCAN_z_soma']) cdef double z_soma_pre cdef double _lio_create_cond_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:14:51,922 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name CA1_pyCANtoEC_pyCAN_synapses_create_generator_codeobject 2021-11-05 15:14:51,923 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "CA1_pyCANtoEC_pyCAN_synapses_create_generator" using Cython module "_cython_magic_5e538ed739fc12ea8669675adc0e9952" 2021-11-05 15:14:51,923 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140605148406256 on /home/nikos/.cython/brian_extensions/_cython_magic_5e538ed739fc12ea8669675adc0e9952.lock 2021-11-05 15:14:51,923 DEBUG brian2.utils.filelock: Lock 140605148406256 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_5e538ed739fc12ea8669675adc0e9952.lock 2021-11-05 15:14:51,923 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140605148406256 on /home/nikos/.cython/brian_extensions/_cython_magic_5e538ed739fc12ea8669675adc0e9952.lock 2021-11-05 15:14:51,923 DEBUG brian2.utils.filelock: Lock 140605148406256 released on /home/nikos/.cython/brian_extensions/_cython_magic_5e538ed739fc12ea8669675adc0e9952.lock 2021-11-05 15:14:54,430 DIAGNOSTIC brian2.core.names: Created object of class Synapses with name CA1_pyCANtoEC_inh 2021-11-05 15:14:54,431 DIAGNOSTIC brian2.core.base: Created BrianObject with name CA1_pyCANtoEC_inh, clock=Clock(dt=100. * usecond, name='defaultclock'), when=start, order=0 2021-11-05 15:14:54,434 DIAGNOSTIC brian2.core.names: Created object of class SynapticPathway with name CA1_pyCANtoEC_inh_pre 2021-11-05 15:14:54,434 DIAGNOSTIC brian2.core.base: Created BrianObject with name CA1_pyCANtoEC_inh_pre, clock=Clock(dt=100. * usecond, name='defaultclock'), when=synapses, order=-1 2021-11-05 15:14:54,442 DEBUG brian2.synapses.synapses: Creating synapses from group 'CA1_pyCAN' to group 'EC_inh', using generator '_k for _k in range(N_post) if (i!=_k) and rand()<0.45*exp(-((z_soma_pre-z_soma_post)**2)/(2*(1000*umetre)**2))' 2021-11-05 15:14:54,442 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=CA1_pyCANtoEC_inh, template name=synapses_create_generator) for abstract code: Key setup_iterator: _iter_low = 0 _iter_high = N_post _iter_step = 1 Key create_j: _pre_idx = _raw_pre_idx _j = _k Key create_cond: _post_idx = _raw_post_idx _cond = (i != _k) and (rand() < (0.45 * exp((- ((z_soma_pre - z_soma_post) ** 2)) / (2 * ((1000 * umetre) ** 2))))) Key update_post: _post_idx = _raw_post_idx _n = 1 2021-11-05 15:14:54,497 DIAGNOSTIC brian2.devices.device: CA1_pyCANtoEC_inh_synapses_create_generator_codeobject abstract code: Key setup_iterator: _iter_low = 0 _iter_high = N_post _iter_step = 1 Key create_j: _pre_idx = _raw_pre_idx _j = _k Key create_cond: _post_idx = _raw_post_idx _cond = (i != _k) and (rand() < (0.45 * exp((- ((z_soma_pre - z_soma_post) ** 2)) / (2 * ((1000 * umetre) ** 2))))) Key update_post: _post_idx = _raw_post_idx _n = 1 2021-11-05 15:14:54,499 DIAGNOSTIC brian2.devices.device: CA1_pyCANtoEC_inh_synapses_create_generator_codeobject snippet (scalar): Key setup_iterator: Key create_j: Key create_cond: _lio_create_cond_1 = 0.5 / ((1000.0 * umetre) ** 2) Key update_post: 2021-11-05 15:14:54,504 DIAGNOSTIC brian2.devices.device: CA1_pyCANtoEC_inh_synapses_create_generator_codeobject snippet (vector): Key setup_iterator: _iter_low = 0 _iter_high = N_post _iter_step = 1 Key create_j: _pre_idx = _raw_pre_idx _j = _k Key create_cond: z_soma_post = _array_EC_inh_z_soma[_raw_post_idx] z_soma_pre = _array_CA1_pyCAN_z_soma[_raw_pre_idx] _post_idx = _raw_post_idx i = _i _cond = (i != _k) and (_rand(_vectorisation_idx) < (0.45 * exp(_lio_create_cond_1 * (- ((z_soma_pre - z_soma_post) ** 2))))) Key update_post: _post_idx = _raw_post_idx _n = 1 2021-11-05 15:14:54,504 DIAGNOSTIC brian2.devices.device: CA1_pyCANtoEC_inh_synapses_create_generator_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code cdef int64_t *_namespace_rand_buffer cdef int32_t *_namespace_rand_buffer_index cdef double _rand(int _idx): cdef double **buffer_pointer = _namespace_rand_buffer cdef double *buffer = buffer_pointer[0] cdef _numpy.ndarray _new_rand if(_namespace_rand_buffer_index[0] == 0): if buffer != NULL: free(buffer) _new_rand = _numpy.random.rand(20000) buffer = _numpy.PyArray_DATA(_new_rand) PyArray_CLEARFLAGS(<_numpy.PyArrayObject*>_new_rand, _numpy.NPY_OWNDATA) buffer_pointer[0] = buffer cdef double val = buffer[_namespace_rand_buffer_index[0]] _namespace_rand_buffer_index[0] += 1 if _namespace_rand_buffer_index[0] == 20000: _namespace_rand_buffer_index[0] = 0 return val # template-specific support code cdef int _buffer_size = 1024 cdef int[:] _prebuf = _numpy.zeros(_buffer_size, dtype=_numpy.int32) cdef int[:] _postbuf = _numpy.zeros(_buffer_size, dtype=_numpy.int32) cdef int _curbuf = 0 cdef int _raw_pre_idx cdef int _raw_post_idx cdef void _flush_buffer(buf, dynarr, int buf_len): cdef size_t _curlen = dynarr.shape[0] cdef size_t _newlen = _curlen+buf_len # Resize the array dynarr.resize(_newlen) # Get the potentially newly created underlying data arrays data = dynarr.data data[_curlen:_curlen+buf_len] = buf[:buf_len] def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_pyCANtoEC_inh_N = _namespace['_array_CA1_pyCANtoEC_inh_N'] cdef int32_t * _array_CA1_pyCANtoEC_inh_N = _buf__array_CA1_pyCANtoEC_inh_N.data cdef int32_t N = _namespace["N"] _var_N_post = _namespace["_var_N_post"] cdef int64_t N_post = _namespace["N_post"] _var_N_pre = _namespace["_var_N_pre"] cdef int64_t N_pre = _namespace["N_pre"] cdef bool _cond cdef int32_t _i cdef int32_t _iter_high cdef int32_t _iter_low cdef int32_t _iter_step cdef int32_t _j cdef int32_t _k cdef int32_t _n cdef int32_t _post_idx cdef int32_t _pre_idx cdef int32_t _raw_post_idx cdef int32_t _raw_pre_idx _var__source_offset = _namespace["_var__source_offset"] cdef int64_t _source_offset = _namespace["_source_offset"] _var__synaptic_post = _namespace["_var__synaptic_post"] _dynamic_array_CA1_pyCANtoEC_inh__synaptic_post = _namespace["_dynamic_array_CA1_pyCANtoEC_inh__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_pyCANtoEC_inh__synaptic_post = _namespace['_array_CA1_pyCANtoEC_inh__synaptic_post'] cdef int32_t * _array_CA1_pyCANtoEC_inh__synaptic_post = _buf__array_CA1_pyCANtoEC_inh__synaptic_post.data cdef size_t _num_array_CA1_pyCANtoEC_inh__synaptic_post = len(_namespace['_array_CA1_pyCANtoEC_inh__synaptic_post']) cdef int32_t _synaptic_post _var__synaptic_pre = _namespace["_var__synaptic_pre"] _dynamic_array_CA1_pyCANtoEC_inh__synaptic_pre = _namespace["_dynamic_array_CA1_pyCANtoEC_inh__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_pyCANtoEC_inh__synaptic_pre = _namespace['_array_CA1_pyCANtoEC_inh__synaptic_pre'] cdef int32_t * _array_CA1_pyCANtoEC_inh__synaptic_pre = _buf__array_CA1_pyCANtoEC_inh__synaptic_pre.data cdef size_t _num_array_CA1_pyCANtoEC_inh__synaptic_pre = len(_namespace['_array_CA1_pyCANtoEC_inh__synaptic_pre']) cdef int32_t _synaptic_pre _var__target_offset = _namespace["_var__target_offset"] cdef int64_t _target_offset = _namespace["_target_offset"] cdef int32_t i # namespace for function rand global _namespace_rand_buffer global _namespace_num_rand_buffer cdef _numpy.ndarray[int64_t, ndim=1, mode='c'] _buf__rand_buffer = _namespace['_rand_buffer'] _namespace_rand_buffer = _buf__rand_buffer.data _namespace_num_rand_buffer = len(_namespace['_rand_buffer']) # namespace for function rand global _namespace_rand_buffer_index global _namespace_num_rand_buffer_index cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__rand_buffer_index = _namespace['_rand_buffer_index'] _namespace_rand_buffer_index = _buf__rand_buffer_index.data _namespace_num_rand_buffer_index = len(_namespace['_rand_buffer_index']) _var_umetre = _namespace["_var_umetre"] cdef double umetre = _namespace["umetre"] _var_z_soma_post = _namespace["_var_z_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_inh_z_soma = _namespace['_array_EC_inh_z_soma'] cdef double * _array_EC_inh_z_soma = _buf__array_EC_inh_z_soma.data cdef size_t _num_array_EC_inh_z_soma = len(_namespace['_array_EC_inh_z_soma']) cdef double z_soma_post _var_z_soma_pre = _namespace["_var_z_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_z_soma = _namespace['_array_CA1_pyCAN_z_soma'] cdef double * _array_CA1_pyCAN_z_soma = _buf__array_CA1_pyCAN_z_soma.data cdef size_t _num_array_CA1_pyCAN_z_soma = len(_namespace['_array_CA1_pyCAN_z_soma']) cdef double z_soma_pre cdef double _lio_create_cond_1 if '_owner' in _namespace: _owner = _namespace['_owner'] cdef int* _prebuf_ptr = &(_prebuf[0]) cdef int* _postbuf_ptr = &(_postbuf[0]) global _curbuf cdef size_t oldsize = len(_dynamic_array_CA1_pyCANtoEC_inh__synaptic_pre) cdef size_t newsize # The following variables are only used for probabilistic connections cdef bool _jump_algo cdef double _log1p, _pconst cdef size_t _jump # scalar code _vectorisation_idx = 1 _lio_create_cond_1 = 0.5 / ((1000.0 * umetre) ** 2) for _i in range(N_pre): _raw_pre_idx = _i + _source_offset _iter_low = 0 _iter_high = N_post _iter_step = 1 for _k in range(_iter_low, _iter_high, _iter_step): _pre_idx = _raw_pre_idx _j = _k _raw_post_idx = _j + _target_offset if _j<0 or _j>=N_post: raise IndexError("index j=%d outside allowed range from 0 to %d" % (_j, N_post-1)) z_soma_post = _array_EC_inh_z_soma[_raw_post_idx] z_soma_pre = _array_CA1_pyCAN_z_soma[_raw_pre_idx] _post_idx = _raw_post_idx i = _i _cond = (i != _k) and (_rand(_vectorisation_idx) < (0.45 * exp(_lio_create_cond_1 * (- ((z_soma_pre - z_soma_post) ** 2))))) if not _cond: continue _post_idx = _raw_post_idx _n = 1 for _repetition in range(_n): _prebuf_ptr[_curbuf] = _pre_idx _postbuf_ptr[_curbuf] = _post_idx _curbuf += 1 # Flush buffer if _curbuf==_buffer_size: _flush_buffer(_prebuf, _dynamic_array_CA1_pyCANtoEC_inh__synaptic_pre, _curbuf) _flush_buffer(_postbuf, _dynamic_array_CA1_pyCANtoEC_inh__synaptic_post, _curbuf) _curbuf = 0 # Final buffer flush _flush_buffer(_prebuf, _dynamic_array_CA1_pyCANtoEC_inh__synaptic_pre, _curbuf) _flush_buffer(_postbuf, _dynamic_array_CA1_pyCANtoEC_inh__synaptic_post, _curbuf) _curbuf = 0 # reset the buffer for the next run newsize = len(_dynamic_array_CA1_pyCANtoEC_inh__synaptic_pre) # now we need to resize all registered variables and set the total number # of synapse (via Python) _owner._resize(newsize) # And update N_incoming, N_outgoing and synapse_number _owner._update_synapse_numbers(oldsize) before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_pyCANtoEC_inh_N = _namespace['_array_CA1_pyCANtoEC_inh_N'] cdef int32_t * _array_CA1_pyCANtoEC_inh_N = _buf__array_CA1_pyCANtoEC_inh_N.data cdef int32_t N = _namespace["N"] _var_N_post = _namespace["_var_N_post"] cdef int64_t N_post = _namespace["N_post"] _var_N_pre = _namespace["_var_N_pre"] cdef int64_t N_pre = _namespace["N_pre"] cdef bool _cond cdef int32_t _i cdef int32_t _iter_high cdef int32_t _iter_low cdef int32_t _iter_step cdef int32_t _j cdef int32_t _k cdef int32_t _n cdef int32_t _post_idx cdef int32_t _pre_idx cdef int32_t _raw_post_idx cdef int32_t _raw_pre_idx _var__source_offset = _namespace["_var__source_offset"] cdef int64_t _source_offset = _namespace["_source_offset"] _var__synaptic_post = _namespace["_var__synaptic_post"] _dynamic_array_CA1_pyCANtoEC_inh__synaptic_post = _namespace["_dynamic_array_CA1_pyCANtoEC_inh__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_pyCANtoEC_inh__synaptic_post = _namespace['_array_CA1_pyCANtoEC_inh__synaptic_post'] cdef int32_t * _array_CA1_pyCANtoEC_inh__synaptic_post = _buf__array_CA1_pyCANtoEC_inh__synaptic_post.data cdef size_t _num_array_CA1_pyCANtoEC_inh__synaptic_post = len(_namespace['_array_CA1_pyCANtoEC_inh__synaptic_post']) cdef int32_t _synaptic_post _var__synaptic_pre = _namespace["_var__synaptic_pre"] _dynamic_array_CA1_pyCANtoEC_inh__synaptic_pre = _namespace["_dynamic_array_CA1_pyCANtoEC_inh__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_pyCANtoEC_inh__synaptic_pre = _namespace['_array_CA1_pyCANtoEC_inh__synaptic_pre'] cdef int32_t * _array_CA1_pyCANtoEC_inh__synaptic_pre = _buf__array_CA1_pyCANtoEC_inh__synaptic_pre.data cdef size_t _num_array_CA1_pyCANtoEC_inh__synaptic_pre = len(_namespace['_array_CA1_pyCANtoEC_inh__synaptic_pre']) cdef int32_t _synaptic_pre _var__target_offset = _namespace["_var__target_offset"] cdef int64_t _target_offset = _namespace["_target_offset"] cdef int32_t i # namespace for function rand global _namespace_rand_buffer global _namespace_num_rand_buffer cdef _numpy.ndarray[int64_t, ndim=1, mode='c'] _buf__rand_buffer = _namespace['_rand_buffer'] _namespace_rand_buffer = _buf__rand_buffer.data _namespace_num_rand_buffer = len(_namespace['_rand_buffer']) # namespace for function rand global _namespace_rand_buffer_index global _namespace_num_rand_buffer_index cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__rand_buffer_index = _namespace['_rand_buffer_index'] _namespace_rand_buffer_index = _buf__rand_buffer_index.data _namespace_num_rand_buffer_index = len(_namespace['_rand_buffer_index']) _var_umetre = _namespace["_var_umetre"] cdef double umetre = _namespace["umetre"] _var_z_soma_post = _namespace["_var_z_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_inh_z_soma = _namespace['_array_EC_inh_z_soma'] cdef double * _array_EC_inh_z_soma = _buf__array_EC_inh_z_soma.data cdef size_t _num_array_EC_inh_z_soma = len(_namespace['_array_EC_inh_z_soma']) cdef double z_soma_post _var_z_soma_pre = _namespace["_var_z_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_z_soma = _namespace['_array_CA1_pyCAN_z_soma'] cdef double * _array_CA1_pyCAN_z_soma = _buf__array_CA1_pyCAN_z_soma.data cdef size_t _num_array_CA1_pyCAN_z_soma = len(_namespace['_array_CA1_pyCAN_z_soma']) cdef double z_soma_pre cdef double _lio_create_cond_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_pyCANtoEC_inh_N = _namespace['_array_CA1_pyCANtoEC_inh_N'] cdef int32_t * _array_CA1_pyCANtoEC_inh_N = _buf__array_CA1_pyCANtoEC_inh_N.data cdef int32_t N = _namespace["N"] _var_N_post = _namespace["_var_N_post"] cdef int64_t N_post = _namespace["N_post"] _var_N_pre = _namespace["_var_N_pre"] cdef int64_t N_pre = _namespace["N_pre"] cdef bool _cond cdef int32_t _i cdef int32_t _iter_high cdef int32_t _iter_low cdef int32_t _iter_step cdef int32_t _j cdef int32_t _k cdef int32_t _n cdef int32_t _post_idx cdef int32_t _pre_idx cdef int32_t _raw_post_idx cdef int32_t _raw_pre_idx _var__source_offset = _namespace["_var__source_offset"] cdef int64_t _source_offset = _namespace["_source_offset"] _var__synaptic_post = _namespace["_var__synaptic_post"] _dynamic_array_CA1_pyCANtoEC_inh__synaptic_post = _namespace["_dynamic_array_CA1_pyCANtoEC_inh__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_pyCANtoEC_inh__synaptic_post = _namespace['_array_CA1_pyCANtoEC_inh__synaptic_post'] cdef int32_t * _array_CA1_pyCANtoEC_inh__synaptic_post = _buf__array_CA1_pyCANtoEC_inh__synaptic_post.data cdef size_t _num_array_CA1_pyCANtoEC_inh__synaptic_post = len(_namespace['_array_CA1_pyCANtoEC_inh__synaptic_post']) cdef int32_t _synaptic_post _var__synaptic_pre = _namespace["_var__synaptic_pre"] _dynamic_array_CA1_pyCANtoEC_inh__synaptic_pre = _namespace["_dynamic_array_CA1_pyCANtoEC_inh__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_pyCANtoEC_inh__synaptic_pre = _namespace['_array_CA1_pyCANtoEC_inh__synaptic_pre'] cdef int32_t * _array_CA1_pyCANtoEC_inh__synaptic_pre = _buf__array_CA1_pyCANtoEC_inh__synaptic_pre.data cdef size_t _num_array_CA1_pyCANtoEC_inh__synaptic_pre = len(_namespace['_array_CA1_pyCANtoEC_inh__synaptic_pre']) cdef int32_t _synaptic_pre _var__target_offset = _namespace["_var__target_offset"] cdef int64_t _target_offset = _namespace["_target_offset"] cdef int32_t i # namespace for function rand global _namespace_rand_buffer global _namespace_num_rand_buffer cdef _numpy.ndarray[int64_t, ndim=1, mode='c'] _buf__rand_buffer = _namespace['_rand_buffer'] _namespace_rand_buffer = _buf__rand_buffer.data _namespace_num_rand_buffer = len(_namespace['_rand_buffer']) # namespace for function rand global _namespace_rand_buffer_index global _namespace_num_rand_buffer_index cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__rand_buffer_index = _namespace['_rand_buffer_index'] _namespace_rand_buffer_index = _buf__rand_buffer_index.data _namespace_num_rand_buffer_index = len(_namespace['_rand_buffer_index']) _var_umetre = _namespace["_var_umetre"] cdef double umetre = _namespace["umetre"] _var_z_soma_post = _namespace["_var_z_soma_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_inh_z_soma = _namespace['_array_EC_inh_z_soma'] cdef double * _array_EC_inh_z_soma = _buf__array_EC_inh_z_soma.data cdef size_t _num_array_EC_inh_z_soma = len(_namespace['_array_EC_inh_z_soma']) cdef double z_soma_post _var_z_soma_pre = _namespace["_var_z_soma_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_z_soma = _namespace['_array_CA1_pyCAN_z_soma'] cdef double * _array_CA1_pyCAN_z_soma = _buf__array_CA1_pyCAN_z_soma.data cdef size_t _num_array_CA1_pyCAN_z_soma = len(_namespace['_array_CA1_pyCAN_z_soma']) cdef double z_soma_pre cdef double _lio_create_cond_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:14:54,504 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name CA1_pyCANtoEC_inh_synapses_create_generator_codeobject 2021-11-05 15:14:54,505 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "CA1_pyCANtoEC_inh_synapses_create_generator" using Cython module "_cython_magic_cbed6233176c20ea5a6ef28673c0d56d" 2021-11-05 15:14:54,505 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140605147946720 on /home/nikos/.cython/brian_extensions/_cython_magic_cbed6233176c20ea5a6ef28673c0d56d.lock 2021-11-05 15:14:54,505 DEBUG brian2.utils.filelock: Lock 140605147946720 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_cbed6233176c20ea5a6ef28673c0d56d.lock 2021-11-05 15:14:54,506 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140605147946720 on /home/nikos/.cython/brian_extensions/_cython_magic_cbed6233176c20ea5a6ef28673c0d56d.lock 2021-11-05 15:14:54,506 DEBUG brian2.utils.filelock: Lock 140605147946720 released on /home/nikos/.cython/brian_extensions/_cython_magic_cbed6233176c20ea5a6ef28673c0d56d.lock 2021-11-05 15:14:54,743 DIAGNOSTIC brian2.core.names: Created object of class StateMonitor with name statemonitor 2021-11-05 15:14:54,743 DIAGNOSTIC brian2.core.base: Created BrianObject with name statemonitor, clock=Clock(dt=100. * usecond, name='defaultclock'), when=start, order=0 2021-11-05 15:14:54,744 DIAGNOSTIC brian2.core.names: Created object of class StateMonitor with name statemonitor_1 2021-11-05 15:14:54,744 DIAGNOSTIC brian2.core.base: Created BrianObject with name statemonitor_1, clock=Clock(dt=100. * usecond, name='defaultclock'), when=start, order=0 2021-11-05 15:14:54,744 DIAGNOSTIC brian2.core.names: Created object of class StateMonitor with name statemonitor_2 2021-11-05 15:14:54,745 DIAGNOSTIC brian2.core.base: Created BrianObject with name statemonitor_2, clock=Clock(dt=100. * usecond, name='defaultclock'), when=start, order=0 2021-11-05 15:14:54,745 DIAGNOSTIC brian2.core.names: Created object of class StateMonitor with name statemonitor_3 2021-11-05 15:14:54,745 DIAGNOSTIC brian2.core.base: Created BrianObject with name statemonitor_3, clock=Clock(dt=100. * usecond, name='defaultclock'), when=start, order=0 2021-11-05 15:14:54,746 DIAGNOSTIC brian2.core.names: Created object of class StateMonitor with name statemonitor_4 2021-11-05 15:14:54,746 DIAGNOSTIC brian2.core.base: Created BrianObject with name statemonitor_4, clock=Clock(dt=100. * usecond, name='defaultclock'), when=start, order=0 2021-11-05 15:14:54,747 DIAGNOSTIC brian2.core.names: Created object of class StateMonitor with name statemonitor_5 2021-11-05 15:14:54,747 DIAGNOSTIC brian2.core.base: Created BrianObject with name statemonitor_5, clock=Clock(dt=100. * usecond, name='defaultclock'), when=start, order=0 2021-11-05 15:14:54,747 DIAGNOSTIC brian2.core.names: Created object of class StateMonitor with name statemonitor_6 2021-11-05 15:14:54,747 DIAGNOSTIC brian2.core.base: Created BrianObject with name statemonitor_6, clock=Clock(dt=100. * usecond, name='defaultclock'), when=start, order=0 2021-11-05 15:14:54,748 DIAGNOSTIC brian2.core.names: Created object of class StateMonitor with name statemonitor_7 2021-11-05 15:14:54,749 DIAGNOSTIC brian2.core.base: Created BrianObject with name statemonitor_7, clock=Clock(dt=100. * usecond, name='defaultclock'), when=start, order=0 2021-11-05 15:14:54,749 DIAGNOSTIC brian2.core.names: Created object of class SpikeMonitor with name spikemonitor 2021-11-05 15:14:54,750 DIAGNOSTIC brian2.core.base: Created BrianObject with name spikemonitor, clock=Clock(dt=100. * usecond, name='defaultclock'), when=thresholds, order=1 2021-11-05 15:14:54,750 DIAGNOSTIC brian2.core.names: Created object of class SpikeMonitor with name spikemonitor_1 2021-11-05 15:14:54,750 DIAGNOSTIC brian2.core.base: Created BrianObject with name spikemonitor_1, clock=Clock(dt=100. * usecond, name='defaultclock'), when=thresholds, order=1 2021-11-05 15:14:54,751 DIAGNOSTIC brian2.core.names: Created object of class SpikeMonitor with name spikemonitor_2 2021-11-05 15:14:54,751 DIAGNOSTIC brian2.core.base: Created BrianObject with name spikemonitor_2, clock=Clock(dt=100. * usecond, name='defaultclock'), when=thresholds, order=1 2021-11-05 15:14:54,751 DIAGNOSTIC brian2.core.names: Created object of class SpikeMonitor with name spikemonitor_3 2021-11-05 15:14:54,752 DIAGNOSTIC brian2.core.base: Created BrianObject with name spikemonitor_3, clock=Clock(dt=100. * usecond, name='defaultclock'), when=thresholds, order=1 2021-11-05 15:14:54,752 DIAGNOSTIC brian2.core.names: Created object of class SpikeMonitor with name spikemonitor_4 2021-11-05 15:14:54,752 DIAGNOSTIC brian2.core.base: Created BrianObject with name spikemonitor_4, clock=Clock(dt=100. * usecond, name='defaultclock'), when=thresholds, order=1 2021-11-05 15:14:54,752 DIAGNOSTIC brian2.core.names: Created object of class SpikeMonitor with name spikemonitor_5 2021-11-05 15:14:54,753 DIAGNOSTIC brian2.core.base: Created BrianObject with name spikemonitor_5, clock=Clock(dt=100. * usecond, name='defaultclock'), when=thresholds, order=1 2021-11-05 15:14:54,753 DIAGNOSTIC brian2.core.names: Created object of class SpikeMonitor with name spikemonitor_6 2021-11-05 15:14:54,753 DIAGNOSTIC brian2.core.base: Created BrianObject with name spikemonitor_6, clock=Clock(dt=100. * usecond, name='defaultclock'), when=thresholds, order=1 2021-11-05 15:14:54,753 DIAGNOSTIC brian2.core.names: Created object of class SpikeMonitor with name spikemonitor_7 2021-11-05 15:14:54,754 DIAGNOSTIC brian2.core.base: Created BrianObject with name spikemonitor_7, clock=Clock(dt=100. * usecond, name='defaultclock'), when=thresholds, order=1 2021-11-05 15:14:54,754 DIAGNOSTIC brian2.core.names: Created object of class PopulationRateMonitor with name ratemonitor 2021-11-05 15:14:54,754 DIAGNOSTIC brian2.core.base: Created BrianObject with name ratemonitor, clock=Clock(dt=100. * usecond, name='defaultclock'), when=end, order=0 2021-11-05 15:14:54,755 DIAGNOSTIC brian2.core.names: Created object of class PopulationRateMonitor with name ratemonitor_1 2021-11-05 15:14:54,755 DIAGNOSTIC brian2.core.base: Created BrianObject with name ratemonitor_1, clock=Clock(dt=100. * usecond, name='defaultclock'), when=end, order=0 2021-11-05 15:14:54,755 DIAGNOSTIC brian2.core.names: Created object of class PopulationRateMonitor with name ratemonitor_2 2021-11-05 15:14:54,756 DIAGNOSTIC brian2.core.base: Created BrianObject with name ratemonitor_2, clock=Clock(dt=100. * usecond, name='defaultclock'), when=end, order=0 2021-11-05 15:14:54,756 DIAGNOSTIC brian2.core.names: Created object of class PopulationRateMonitor with name ratemonitor_3 2021-11-05 15:14:54,756 DIAGNOSTIC brian2.core.base: Created BrianObject with name ratemonitor_3, clock=Clock(dt=100. * usecond, name='defaultclock'), when=end, order=0 2021-11-05 15:14:54,756 DIAGNOSTIC brian2.core.names: Created object of class PopulationRateMonitor with name ratemonitor_4 2021-11-05 15:14:54,756 DIAGNOSTIC brian2.core.base: Created BrianObject with name ratemonitor_4, clock=Clock(dt=100. * usecond, name='defaultclock'), when=end, order=0 2021-11-05 15:14:54,757 DIAGNOSTIC brian2.core.names: Created object of class PopulationRateMonitor with name ratemonitor_5 2021-11-05 15:14:54,757 DIAGNOSTIC brian2.core.base: Created BrianObject with name ratemonitor_5, clock=Clock(dt=100. * usecond, name='defaultclock'), when=end, order=0 2021-11-05 15:14:54,757 DIAGNOSTIC brian2.core.names: Created object of class PopulationRateMonitor with name ratemonitor_6 2021-11-05 15:14:54,757 DIAGNOSTIC brian2.core.base: Created BrianObject with name ratemonitor_6, clock=Clock(dt=100. * usecond, name='defaultclock'), when=end, order=0 2021-11-05 15:14:54,758 DIAGNOSTIC brian2.core.names: Created object of class PopulationRateMonitor with name ratemonitor_7 2021-11-05 15:14:54,758 DIAGNOSTIC brian2.core.base: Created BrianObject with name ratemonitor_7, clock=Clock(dt=100. * usecond, name='defaultclock'), when=end, order=0 2021-11-05 15:14:54,758 DIAGNOSTIC brian2.core.names: Created object of class TimedArray with name _timedarray 2021-11-05 15:14:54,759 DIAGNOSTIC brian2.core.names: Created object of class TimedArray with name _timedarray_1 2021-11-05 15:14:54,759 DIAGNOSTIC brian2.core.names: Created object of class NeuronGroup with name Kuramoto_oscillators_N_50 2021-11-05 15:14:54,759 DIAGNOSTIC brian2.core.base: Created BrianObject with name Kuramoto_oscillators_N_50, clock=Clock(dt=100. * usecond, name='defaultclock'), when=start, order=0 2021-11-05 15:14:54,768 DIAGNOSTIC brian2.groups.neurongroup: Creating NeuronGroup of size 50, equations Vm = sin(Theta)*mV : V PIF = .5 * (sin(ThetaPreInput - Theta)) : 1 dTheta/dt = ((omega + (kN * PIF) - kG*X*sin(Theta-pi/2)) * second**-1) : 1 ThetaPreInput : 1 X : 1 (linked) kG : 1 kN : 1 omega : 1. 2021-11-05 15:14:54,769 DIAGNOSTIC brian2.core.names: Created object of class Thresholder with name Kuramoto_oscillators_N_50_thresholder 2021-11-05 15:14:54,769 DIAGNOSTIC brian2.core.base: Created BrianObject with name Kuramoto_oscillators_N_50_thresholder, clock=Clock(dt=100. * usecond, name='defaultclock'), when=thresholds, order=0 2021-11-05 15:14:54,769 DIAGNOSTIC brian2.core.names: Created object of class StateUpdater with name Kuramoto_oscillators_N_50_stateupdater 2021-11-05 15:14:54,769 DIAGNOSTIC brian2.core.base: Created BrianObject with name Kuramoto_oscillators_N_50_stateupdater, clock=Clock(dt=100. * usecond, name='defaultclock'), when=groups, order=0 2021-11-05 15:14:54,769 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=Kuramoto_oscillators_N_50, template name=group_variable_set_conditional) for abstract code: Key condition: _cond = True Key statement: Theta = 2*pi*rand() 2021-11-05 15:14:54,772 DIAGNOSTIC brian2.devices.device: Kuramoto_oscillators_N_50_group_variable_set_conditional_codeobject abstract code: Key condition: _cond = True Key statement: Theta = 2*pi*rand() 2021-11-05 15:14:54,773 DIAGNOSTIC brian2.devices.device: Kuramoto_oscillators_N_50_group_variable_set_conditional_codeobject snippet (scalar): Key condition: Key statement: 2021-11-05 15:14:54,773 DIAGNOSTIC brian2.devices.device: Kuramoto_oscillators_N_50_group_variable_set_conditional_codeobject snippet (vector): Key condition: _cond = True Key statement: Theta = 6.283185307179586 * rand(_vectorisation_idx) _array_Kuramoto_oscillators_N_50_Theta[_idx] = Theta 2021-11-05 15:14:54,773 DIAGNOSTIC brian2.devices.device: Kuramoto_oscillators_N_50_group_variable_set_conditional_codeobject code: run: import numpy as _numpy from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange numpy_False = _numpy.bool_(False) numpy_True = _numpy.bool_(True) # Phase 1: we compute the indices where the conditional setting is to # be applied, and to do this we want to vectorise over all the values, # but we don't want to do the iterate all protocol, so we explicitly # set the idx to be slice(None) # scalar code _vectorisation_idx = 1 # vector code _idx = slice(None) _vectorisation_idx = LazyArange(N) _cond = True # Phase 2: having computed _cond, the boolean array of points where # the setting is to be applied, we want to vectorise over idx being # only these values. # scalar code _vectorisation_idx = 1 # vector code if _cond is True or _cond is numpy_True: _idx = slice(None) _vectorisation_idx = LazyArange(N) elif _cond is False or _cond is numpy_False: _idx = [] _vectorisation_idx = _numpy.array([], dtype=_numpy.int32) else: _vectorisation_idx = _idx = _numpy.nonzero(_cond)[0] Theta = 6.283185307179586 * rand(_vectorisation_idx) _array_Kuramoto_oscillators_N_50_Theta[_idx] = Theta before_run: import numpy as _numpy from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange # EMPTY_CODE_BLOCK -- overwrite in child template after_run: import numpy as _numpy from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange # EMPTY_CODE_BLOCK -- overwrite in child template 2021-11-05 15:14:54,773 DIAGNOSTIC brian2.core.names: Created object of class NumpyCodeObject with name Kuramoto_oscillators_N_50_group_variable_set_conditional_codeobject 2021-11-05 15:14:54,773 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=Kuramoto_oscillators_N_50, template name=group_variable_set_conditional) for abstract code: Key condition: _cond = True Key statement: omega = 2*pi*(f0+sigma*randn()) 2021-11-05 15:14:54,776 DIAGNOSTIC brian2.devices.device: Kuramoto_oscillators_N_50_group_variable_set_conditional_codeobject abstract code: Key condition: _cond = True Key statement: omega = 2*pi*(f0+sigma*randn()) 2021-11-05 15:14:54,777 DIAGNOSTIC brian2.devices.device: Kuramoto_oscillators_N_50_group_variable_set_conditional_codeobject snippet (scalar): Key condition: Key statement: 2021-11-05 15:14:54,777 DIAGNOSTIC brian2.devices.device: Kuramoto_oscillators_N_50_group_variable_set_conditional_codeobject snippet (vector): Key condition: _cond = True Key statement: omega = 6.283185307179586 * (f0 + (sigma * randn(_vectorisation_idx))) _array_Kuramoto_oscillators_N_50_omega[_idx] = omega 2021-11-05 15:14:54,777 DIAGNOSTIC brian2.devices.device: Kuramoto_oscillators_N_50_group_variable_set_conditional_codeobject code: run: import numpy as _numpy from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange numpy_False = _numpy.bool_(False) numpy_True = _numpy.bool_(True) # Phase 1: we compute the indices where the conditional setting is to # be applied, and to do this we want to vectorise over all the values, # but we don't want to do the iterate all protocol, so we explicitly # set the idx to be slice(None) # scalar code _vectorisation_idx = 1 # vector code _idx = slice(None) _vectorisation_idx = LazyArange(N) _cond = True # Phase 2: having computed _cond, the boolean array of points where # the setting is to be applied, we want to vectorise over idx being # only these values. # scalar code _vectorisation_idx = 1 # vector code if _cond is True or _cond is numpy_True: _idx = slice(None) _vectorisation_idx = LazyArange(N) elif _cond is False or _cond is numpy_False: _idx = [] _vectorisation_idx = _numpy.array([], dtype=_numpy.int32) else: _vectorisation_idx = _idx = _numpy.nonzero(_cond)[0] omega = 6.283185307179586 * (f0 + (sigma * randn(_vectorisation_idx))) _array_Kuramoto_oscillators_N_50_omega[_idx] = omega before_run: import numpy as _numpy from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange # EMPTY_CODE_BLOCK -- overwrite in child template after_run: import numpy as _numpy from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange # EMPTY_CODE_BLOCK -- overwrite in child template 2021-11-05 15:14:54,777 DIAGNOSTIC brian2.core.names: Created object of class NumpyCodeObject with name Kuramoto_oscillators_N_50_group_variable_set_conditional_codeobject 2021-11-05 15:14:54,777 DIAGNOSTIC brian2.core.names: Created object of class Synapses with name Kuramoto_intra 2021-11-05 15:14:54,778 DIAGNOSTIC brian2.core.base: Created BrianObject with name Kuramoto_intra, clock=Clock(dt=100. * usecond, name='defaultclock'), when=start, order=0 2021-11-05 15:14:54,778 DIAGNOSTIC brian2.core.names: Created object of class SynapticPathway with name Kuramoto_intra_pre 2021-11-05 15:14:54,779 DIAGNOSTIC brian2.core.base: Created BrianObject with name Kuramoto_intra_pre, clock=Clock(dt=100. * usecond, name='defaultclock'), when=synapses, order=-1 2021-11-05 15:14:54,780 DEBUG brian2.synapses.synapses: Creating synapses from group 'Kuramoto_oscillators_N_50' to group 'Kuramoto_oscillators_N_50', using generator '_k for _k in range(N_post) if i!=_k' 2021-11-05 15:14:54,780 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=Kuramoto_intra, template name=synapses_create_generator) for abstract code: Key setup_iterator: _iter_low = 0 _iter_high = N_post _iter_step = 1 Key create_j: _pre_idx = _raw_pre_idx _j = _k Key create_cond: _post_idx = _raw_post_idx _cond = i != _k Key update_post: _post_idx = _raw_post_idx _n = 1 2021-11-05 15:14:54,789 DIAGNOSTIC brian2.devices.device: Kuramoto_intra_synapses_create_generator_codeobject abstract code: Key setup_iterator: _iter_low = 0 _iter_high = N_post _iter_step = 1 Key create_j: _pre_idx = _raw_pre_idx _j = _k Key create_cond: _post_idx = _raw_post_idx _cond = i != _k Key update_post: _post_idx = _raw_post_idx _n = 1 2021-11-05 15:14:54,792 DIAGNOSTIC brian2.devices.device: Kuramoto_intra_synapses_create_generator_codeobject snippet (scalar): Key setup_iterator: Key create_j: Key create_cond: Key update_post: 2021-11-05 15:14:54,792 DIAGNOSTIC brian2.devices.device: Kuramoto_intra_synapses_create_generator_codeobject snippet (vector): Key setup_iterator: _iter_low = 0 _iter_high = N_post _iter_step = 1 Key create_j: _pre_idx = _raw_pre_idx _j = _k Key create_cond: _post_idx = _raw_post_idx i = _i _cond = i != _k Key update_post: _post_idx = _raw_post_idx _n = 1 2021-11-05 15:14:54,792 DIAGNOSTIC brian2.devices.device: Kuramoto_intra_synapses_create_generator_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code cdef int64_t *_namespace_rand_buffer cdef int32_t *_namespace_rand_buffer_index cdef double _rand(int _idx): cdef double **buffer_pointer = _namespace_rand_buffer cdef double *buffer = buffer_pointer[0] cdef _numpy.ndarray _new_rand if(_namespace_rand_buffer_index[0] == 0): if buffer != NULL: free(buffer) _new_rand = _numpy.random.rand(20000) buffer = _numpy.PyArray_DATA(_new_rand) PyArray_CLEARFLAGS(<_numpy.PyArrayObject*>_new_rand, _numpy.NPY_OWNDATA) buffer_pointer[0] = buffer cdef double val = buffer[_namespace_rand_buffer_index[0]] _namespace_rand_buffer_index[0] += 1 if _namespace_rand_buffer_index[0] == 20000: _namespace_rand_buffer_index[0] = 0 return val # template-specific support code cdef int _buffer_size = 1024 cdef int[:] _prebuf = _numpy.zeros(_buffer_size, dtype=_numpy.int32) cdef int[:] _postbuf = _numpy.zeros(_buffer_size, dtype=_numpy.int32) cdef int _curbuf = 0 cdef int _raw_pre_idx cdef int _raw_post_idx cdef void _flush_buffer(buf, dynarr, int buf_len): cdef size_t _curlen = dynarr.shape[0] cdef size_t _newlen = _curlen+buf_len # Resize the array dynarr.resize(_newlen) # Get the potentially newly created underlying data arrays data = dynarr.data data[_curlen:_curlen+buf_len] = buf[:buf_len] def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_Kuramoto_intra_N = _namespace['_array_Kuramoto_intra_N'] cdef int32_t * _array_Kuramoto_intra_N = _buf__array_Kuramoto_intra_N.data cdef int32_t N = _namespace["N"] _var_N_post = _namespace["_var_N_post"] cdef int64_t N_post = _namespace["N_post"] _var_N_pre = _namespace["_var_N_pre"] cdef int64_t N_pre = _namespace["N_pre"] cdef bool _cond cdef int32_t _i cdef int32_t _iter_high cdef int32_t _iter_low cdef int32_t _iter_step cdef int32_t _j cdef int32_t _k cdef int32_t _n cdef int32_t _post_idx cdef int32_t _pre_idx cdef int32_t _raw_post_idx cdef int32_t _raw_pre_idx _var__source_offset = _namespace["_var__source_offset"] cdef int64_t _source_offset = _namespace["_source_offset"] _var__synaptic_post = _namespace["_var__synaptic_post"] _dynamic_array_Kuramoto_intra__synaptic_post = _namespace["_dynamic_array_Kuramoto_intra__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_Kuramoto_intra__synaptic_post = _namespace['_array_Kuramoto_intra__synaptic_post'] cdef int32_t * _array_Kuramoto_intra__synaptic_post = _buf__array_Kuramoto_intra__synaptic_post.data cdef size_t _num_array_Kuramoto_intra__synaptic_post = len(_namespace['_array_Kuramoto_intra__synaptic_post']) cdef int32_t _synaptic_post _var__synaptic_pre = _namespace["_var__synaptic_pre"] _dynamic_array_Kuramoto_intra__synaptic_pre = _namespace["_dynamic_array_Kuramoto_intra__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_Kuramoto_intra__synaptic_pre = _namespace['_array_Kuramoto_intra__synaptic_pre'] cdef int32_t * _array_Kuramoto_intra__synaptic_pre = _buf__array_Kuramoto_intra__synaptic_pre.data cdef size_t _num_array_Kuramoto_intra__synaptic_pre = len(_namespace['_array_Kuramoto_intra__synaptic_pre']) cdef int32_t _synaptic_pre _var__target_offset = _namespace["_var__target_offset"] cdef int64_t _target_offset = _namespace["_target_offset"] cdef int32_t i # namespace for function rand global _namespace_rand_buffer global _namespace_num_rand_buffer cdef _numpy.ndarray[int64_t, ndim=1, mode='c'] _buf__rand_buffer = _namespace['_rand_buffer'] _namespace_rand_buffer = _buf__rand_buffer.data _namespace_num_rand_buffer = len(_namespace['_rand_buffer']) # namespace for function rand global _namespace_rand_buffer_index global _namespace_num_rand_buffer_index cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__rand_buffer_index = _namespace['_rand_buffer_index'] _namespace_rand_buffer_index = _buf__rand_buffer_index.data _namespace_num_rand_buffer_index = len(_namespace['_rand_buffer_index']) if '_owner' in _namespace: _owner = _namespace['_owner'] cdef int* _prebuf_ptr = &(_prebuf[0]) cdef int* _postbuf_ptr = &(_postbuf[0]) global _curbuf cdef size_t oldsize = len(_dynamic_array_Kuramoto_intra__synaptic_pre) cdef size_t newsize # The following variables are only used for probabilistic connections cdef bool _jump_algo cdef double _log1p, _pconst cdef size_t _jump # scalar code _vectorisation_idx = 1 for _i in range(N_pre): _raw_pre_idx = _i + _source_offset _iter_low = 0 _iter_high = N_post _iter_step = 1 for _k in range(_iter_low, _iter_high, _iter_step): _pre_idx = _raw_pre_idx _j = _k _raw_post_idx = _j + _target_offset _post_idx = _raw_post_idx i = _i _cond = i != _k if not _cond: continue if _j<0 or _j>=N_post: raise IndexError("index j=%d outside allowed range from 0 to %d" % (_j, N_post-1)) _post_idx = _raw_post_idx _n = 1 for _repetition in range(_n): _prebuf_ptr[_curbuf] = _pre_idx _postbuf_ptr[_curbuf] = _post_idx _curbuf += 1 # Flush buffer if _curbuf==_buffer_size: _flush_buffer(_prebuf, _dynamic_array_Kuramoto_intra__synaptic_pre, _curbuf) _flush_buffer(_postbuf, _dynamic_array_Kuramoto_intra__synaptic_post, _curbuf) _curbuf = 0 # Final buffer flush _flush_buffer(_prebuf, _dynamic_array_Kuramoto_intra__synaptic_pre, _curbuf) _flush_buffer(_postbuf, _dynamic_array_Kuramoto_intra__synaptic_post, _curbuf) _curbuf = 0 # reset the buffer for the next run newsize = len(_dynamic_array_Kuramoto_intra__synaptic_pre) # now we need to resize all registered variables and set the total number # of synapse (via Python) _owner._resize(newsize) # And update N_incoming, N_outgoing and synapse_number _owner._update_synapse_numbers(oldsize) before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_Kuramoto_intra_N = _namespace['_array_Kuramoto_intra_N'] cdef int32_t * _array_Kuramoto_intra_N = _buf__array_Kuramoto_intra_N.data cdef int32_t N = _namespace["N"] _var_N_post = _namespace["_var_N_post"] cdef int64_t N_post = _namespace["N_post"] _var_N_pre = _namespace["_var_N_pre"] cdef int64_t N_pre = _namespace["N_pre"] cdef bool _cond cdef int32_t _i cdef int32_t _iter_high cdef int32_t _iter_low cdef int32_t _iter_step cdef int32_t _j cdef int32_t _k cdef int32_t _n cdef int32_t _post_idx cdef int32_t _pre_idx cdef int32_t _raw_post_idx cdef int32_t _raw_pre_idx _var__source_offset = _namespace["_var__source_offset"] cdef int64_t _source_offset = _namespace["_source_offset"] _var__synaptic_post = _namespace["_var__synaptic_post"] _dynamic_array_Kuramoto_intra__synaptic_post = _namespace["_dynamic_array_Kuramoto_intra__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_Kuramoto_intra__synaptic_post = _namespace['_array_Kuramoto_intra__synaptic_post'] cdef int32_t * _array_Kuramoto_intra__synaptic_post = _buf__array_Kuramoto_intra__synaptic_post.data cdef size_t _num_array_Kuramoto_intra__synaptic_post = len(_namespace['_array_Kuramoto_intra__synaptic_post']) cdef int32_t _synaptic_post _var__synaptic_pre = _namespace["_var__synaptic_pre"] _dynamic_array_Kuramoto_intra__synaptic_pre = _namespace["_dynamic_array_Kuramoto_intra__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_Kuramoto_intra__synaptic_pre = _namespace['_array_Kuramoto_intra__synaptic_pre'] cdef int32_t * _array_Kuramoto_intra__synaptic_pre = _buf__array_Kuramoto_intra__synaptic_pre.data cdef size_t _num_array_Kuramoto_intra__synaptic_pre = len(_namespace['_array_Kuramoto_intra__synaptic_pre']) cdef int32_t _synaptic_pre _var__target_offset = _namespace["_var__target_offset"] cdef int64_t _target_offset = _namespace["_target_offset"] cdef int32_t i # namespace for function rand global _namespace_rand_buffer global _namespace_num_rand_buffer cdef _numpy.ndarray[int64_t, ndim=1, mode='c'] _buf__rand_buffer = _namespace['_rand_buffer'] _namespace_rand_buffer = _buf__rand_buffer.data _namespace_num_rand_buffer = len(_namespace['_rand_buffer']) # namespace for function rand global _namespace_rand_buffer_index global _namespace_num_rand_buffer_index cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__rand_buffer_index = _namespace['_rand_buffer_index'] _namespace_rand_buffer_index = _buf__rand_buffer_index.data _namespace_num_rand_buffer_index = len(_namespace['_rand_buffer_index']) if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_Kuramoto_intra_N = _namespace['_array_Kuramoto_intra_N'] cdef int32_t * _array_Kuramoto_intra_N = _buf__array_Kuramoto_intra_N.data cdef int32_t N = _namespace["N"] _var_N_post = _namespace["_var_N_post"] cdef int64_t N_post = _namespace["N_post"] _var_N_pre = _namespace["_var_N_pre"] cdef int64_t N_pre = _namespace["N_pre"] cdef bool _cond cdef int32_t _i cdef int32_t _iter_high cdef int32_t _iter_low cdef int32_t _iter_step cdef int32_t _j cdef int32_t _k cdef int32_t _n cdef int32_t _post_idx cdef int32_t _pre_idx cdef int32_t _raw_post_idx cdef int32_t _raw_pre_idx _var__source_offset = _namespace["_var__source_offset"] cdef int64_t _source_offset = _namespace["_source_offset"] _var__synaptic_post = _namespace["_var__synaptic_post"] _dynamic_array_Kuramoto_intra__synaptic_post = _namespace["_dynamic_array_Kuramoto_intra__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_Kuramoto_intra__synaptic_post = _namespace['_array_Kuramoto_intra__synaptic_post'] cdef int32_t * _array_Kuramoto_intra__synaptic_post = _buf__array_Kuramoto_intra__synaptic_post.data cdef size_t _num_array_Kuramoto_intra__synaptic_post = len(_namespace['_array_Kuramoto_intra__synaptic_post']) cdef int32_t _synaptic_post _var__synaptic_pre = _namespace["_var__synaptic_pre"] _dynamic_array_Kuramoto_intra__synaptic_pre = _namespace["_dynamic_array_Kuramoto_intra__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_Kuramoto_intra__synaptic_pre = _namespace['_array_Kuramoto_intra__synaptic_pre'] cdef int32_t * _array_Kuramoto_intra__synaptic_pre = _buf__array_Kuramoto_intra__synaptic_pre.data cdef size_t _num_array_Kuramoto_intra__synaptic_pre = len(_namespace['_array_Kuramoto_intra__synaptic_pre']) cdef int32_t _synaptic_pre _var__target_offset = _namespace["_var__target_offset"] cdef int64_t _target_offset = _namespace["_target_offset"] cdef int32_t i # namespace for function rand global _namespace_rand_buffer global _namespace_num_rand_buffer cdef _numpy.ndarray[int64_t, ndim=1, mode='c'] _buf__rand_buffer = _namespace['_rand_buffer'] _namespace_rand_buffer = _buf__rand_buffer.data _namespace_num_rand_buffer = len(_namespace['_rand_buffer']) # namespace for function rand global _namespace_rand_buffer_index global _namespace_num_rand_buffer_index cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__rand_buffer_index = _namespace['_rand_buffer_index'] _namespace_rand_buffer_index = _buf__rand_buffer_index.data _namespace_num_rand_buffer_index = len(_namespace['_rand_buffer_index']) if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:14:54,792 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name Kuramoto_intra_synapses_create_generator_codeobject 2021-11-05 15:14:54,793 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "Kuramoto_intra_synapses_create_generator" using Cython module "_cython_magic_164f1fd7a67ab5fe12faa59b798960bd" 2021-11-05 15:14:54,793 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140605146781296 on /home/nikos/.cython/brian_extensions/_cython_magic_164f1fd7a67ab5fe12faa59b798960bd.lock 2021-11-05 15:14:54,793 DEBUG brian2.utils.filelock: Lock 140605146781296 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_164f1fd7a67ab5fe12faa59b798960bd.lock 2021-11-05 15:14:54,793 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140605146781296 on /home/nikos/.cython/brian_extensions/_cython_magic_164f1fd7a67ab5fe12faa59b798960bd.lock 2021-11-05 15:14:54,793 DEBUG brian2.utils.filelock: Lock 140605146781296 released on /home/nikos/.cython/brian_extensions/_cython_magic_164f1fd7a67ab5fe12faa59b798960bd.lock 2021-11-05 15:14:54,793 DIAGNOSTIC brian2.core.names: Created object of class NeuronGroup with name neurongroup 2021-11-05 15:14:54,794 DIAGNOSTIC brian2.core.base: Created BrianObject with name neurongroup, clock=Clock(dt=100. * usecond, name='defaultclock'), when=start, order=0 2021-11-05 15:14:54,802 DIAGNOSTIC brian2.groups.neurongroup: Creating NeuronGroup of size 1, equations coherence = sqrt(x**2 + y**2) : 1 phase = arctan(y/x) + int(x<0 and y>0)*pi - int(x<0 and y<0)*pi : 1 rhythm_pos = coherence * (sin(phase)+1)/2 : 1 rhythm = coherence * sin(phase) : 1 rhythm_rect = rhythm_pos*nA : A rhythm_simple = rhythm*nA : A rhythm_abs = abs(rhythm)*nA : A rhythm_zero = 0*rhythm_rect : A x : 1 y : 1. 2021-11-05 15:14:54,802 DIAGNOSTIC brian2.core.names: Created object of class StateUpdater with name neurongroup_stateupdater 2021-11-05 15:14:54,802 DIAGNOSTIC brian2.core.base: Created BrianObject with name neurongroup_stateupdater, clock=Clock(dt=100. * usecond, name='defaultclock'), when=groups, order=0 2021-11-05 15:14:54,802 DIAGNOSTIC brian2.core.names: Created object of class Synapses with name Kuramoto_avg 2021-11-05 15:14:54,803 DIAGNOSTIC brian2.core.base: Created BrianObject with name Kuramoto_avg, clock=Clock(dt=100. * usecond, name='defaultclock'), when=start, order=0 2021-11-05 15:14:54,807 DIAGNOSTIC brian2.core.names: Created object of class SummedVariableUpdater with name Kuramoto_avg_summed_variable_y_post 2021-11-05 15:14:54,807 DIAGNOSTIC brian2.core.base: Created BrianObject with name Kuramoto_avg_summed_variable_y_post, clock=Clock(dt=100. * usecond, name='defaultclock'), when=groups, order=-1 2021-11-05 15:14:54,807 DIAGNOSTIC brian2.core.names: Created object of class SummedVariableUpdater with name Kuramoto_avg_summed_variable_x_post 2021-11-05 15:14:54,807 DIAGNOSTIC brian2.core.base: Created BrianObject with name Kuramoto_avg_summed_variable_x_post, clock=Clock(dt=100. * usecond, name='defaultclock'), when=groups, order=-1 2021-11-05 15:14:54,807 DEBUG brian2.synapses.synapses: Creating synapses from group 'Kuramoto_oscillators_N_50' to group 'neurongroup', using generator '_k for _k in range(N_post) if True' 2021-11-05 15:14:54,808 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=Kuramoto_avg, template name=synapses_create_generator) for abstract code: Key setup_iterator: _iter_low = 0 _iter_high = N_post _iter_step = 1 Key create_j: _pre_idx = _raw_pre_idx _j = _k Key create_cond: _cond = True Key update_post: _post_idx = _raw_post_idx _n = 1 2021-11-05 15:14:54,831 DIAGNOSTIC brian2.devices.device: Kuramoto_avg_synapses_create_generator_codeobject abstract code: Key setup_iterator: _iter_low = 0 _iter_high = N_post _iter_step = 1 Key create_j: _pre_idx = _raw_pre_idx _j = _k Key create_cond: _cond = True Key update_post: _post_idx = _raw_post_idx _n = 1 2021-11-05 15:14:54,833 DIAGNOSTIC brian2.devices.device: Kuramoto_avg_synapses_create_generator_codeobject snippet (scalar): Key setup_iterator: Key create_j: Key create_cond: Key update_post: 2021-11-05 15:14:54,833 DIAGNOSTIC brian2.devices.device: Kuramoto_avg_synapses_create_generator_codeobject snippet (vector): Key setup_iterator: _iter_low = 0 _iter_high = N_post _iter_step = 1 Key create_j: _pre_idx = _raw_pre_idx _j = _k Key create_cond: _cond = 1 Key update_post: _post_idx = _raw_post_idx _n = 1 2021-11-05 15:14:54,833 DIAGNOSTIC brian2.devices.device: Kuramoto_avg_synapses_create_generator_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code cdef int64_t *_namespace_rand_buffer cdef int32_t *_namespace_rand_buffer_index cdef double _rand(int _idx): cdef double **buffer_pointer = _namespace_rand_buffer cdef double *buffer = buffer_pointer[0] cdef _numpy.ndarray _new_rand if(_namespace_rand_buffer_index[0] == 0): if buffer != NULL: free(buffer) _new_rand = _numpy.random.rand(20000) buffer = _numpy.PyArray_DATA(_new_rand) PyArray_CLEARFLAGS(<_numpy.PyArrayObject*>_new_rand, _numpy.NPY_OWNDATA) buffer_pointer[0] = buffer cdef double val = buffer[_namespace_rand_buffer_index[0]] _namespace_rand_buffer_index[0] += 1 if _namespace_rand_buffer_index[0] == 20000: _namespace_rand_buffer_index[0] = 0 return val # template-specific support code cdef int _buffer_size = 1024 cdef int[:] _prebuf = _numpy.zeros(_buffer_size, dtype=_numpy.int32) cdef int[:] _postbuf = _numpy.zeros(_buffer_size, dtype=_numpy.int32) cdef int _curbuf = 0 cdef int _raw_pre_idx cdef int _raw_post_idx cdef void _flush_buffer(buf, dynarr, int buf_len): cdef size_t _curlen = dynarr.shape[0] cdef size_t _newlen = _curlen+buf_len # Resize the array dynarr.resize(_newlen) # Get the potentially newly created underlying data arrays data = dynarr.data data[_curlen:_curlen+buf_len] = buf[:buf_len] def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_Kuramoto_avg_N = _namespace['_array_Kuramoto_avg_N'] cdef int32_t * _array_Kuramoto_avg_N = _buf__array_Kuramoto_avg_N.data cdef int32_t N = _namespace["N"] _var_N_post = _namespace["_var_N_post"] cdef int64_t N_post = _namespace["N_post"] _var_N_pre = _namespace["_var_N_pre"] cdef int64_t N_pre = _namespace["N_pre"] cdef bool _cond cdef int32_t _iter_high cdef int32_t _iter_low cdef int32_t _iter_step cdef int32_t _j cdef int32_t _k cdef int32_t _n cdef int32_t _post_idx cdef int32_t _pre_idx cdef int32_t _raw_post_idx cdef int32_t _raw_pre_idx _var__source_offset = _namespace["_var__source_offset"] cdef int64_t _source_offset = _namespace["_source_offset"] _var__synaptic_post = _namespace["_var__synaptic_post"] _dynamic_array_Kuramoto_avg__synaptic_post = _namespace["_dynamic_array_Kuramoto_avg__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_Kuramoto_avg__synaptic_post = _namespace['_array_Kuramoto_avg__synaptic_post'] cdef int32_t * _array_Kuramoto_avg__synaptic_post = _buf__array_Kuramoto_avg__synaptic_post.data cdef size_t _num_array_Kuramoto_avg__synaptic_post = len(_namespace['_array_Kuramoto_avg__synaptic_post']) cdef int32_t _synaptic_post _var__synaptic_pre = _namespace["_var__synaptic_pre"] _dynamic_array_Kuramoto_avg__synaptic_pre = _namespace["_dynamic_array_Kuramoto_avg__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_Kuramoto_avg__synaptic_pre = _namespace['_array_Kuramoto_avg__synaptic_pre'] cdef int32_t * _array_Kuramoto_avg__synaptic_pre = _buf__array_Kuramoto_avg__synaptic_pre.data cdef size_t _num_array_Kuramoto_avg__synaptic_pre = len(_namespace['_array_Kuramoto_avg__synaptic_pre']) cdef int32_t _synaptic_pre _var__target_offset = _namespace["_var__target_offset"] cdef int64_t _target_offset = _namespace["_target_offset"] # namespace for function rand global _namespace_rand_buffer global _namespace_num_rand_buffer cdef _numpy.ndarray[int64_t, ndim=1, mode='c'] _buf__rand_buffer = _namespace['_rand_buffer'] _namespace_rand_buffer = _buf__rand_buffer.data _namespace_num_rand_buffer = len(_namespace['_rand_buffer']) # namespace for function rand global _namespace_rand_buffer_index global _namespace_num_rand_buffer_index cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__rand_buffer_index = _namespace['_rand_buffer_index'] _namespace_rand_buffer_index = _buf__rand_buffer_index.data _namespace_num_rand_buffer_index = len(_namespace['_rand_buffer_index']) if '_owner' in _namespace: _owner = _namespace['_owner'] cdef int* _prebuf_ptr = &(_prebuf[0]) cdef int* _postbuf_ptr = &(_postbuf[0]) global _curbuf cdef size_t oldsize = len(_dynamic_array_Kuramoto_avg__synaptic_pre) cdef size_t newsize # The following variables are only used for probabilistic connections cdef bool _jump_algo cdef double _log1p, _pconst cdef size_t _jump # scalar code _vectorisation_idx = 1 for _i in range(N_pre): _raw_pre_idx = _i + _source_offset _cond = 1 if not _cond: continue _iter_low = 0 _iter_high = N_post _iter_step = 1 for _k in range(_iter_low, _iter_high, _iter_step): _pre_idx = _raw_pre_idx _j = _k _raw_post_idx = _j + _target_offset if _j<0 or _j>=N_post: raise IndexError("index j=%d outside allowed range from 0 to %d" % (_j, N_post-1)) _post_idx = _raw_post_idx _n = 1 for _repetition in range(_n): _prebuf_ptr[_curbuf] = _pre_idx _postbuf_ptr[_curbuf] = _post_idx _curbuf += 1 # Flush buffer if _curbuf==_buffer_size: _flush_buffer(_prebuf, _dynamic_array_Kuramoto_avg__synaptic_pre, _curbuf) _flush_buffer(_postbuf, _dynamic_array_Kuramoto_avg__synaptic_post, _curbuf) _curbuf = 0 # Final buffer flush _flush_buffer(_prebuf, _dynamic_array_Kuramoto_avg__synaptic_pre, _curbuf) _flush_buffer(_postbuf, _dynamic_array_Kuramoto_avg__synaptic_post, _curbuf) _curbuf = 0 # reset the buffer for the next run newsize = len(_dynamic_array_Kuramoto_avg__synaptic_pre) # now we need to resize all registered variables and set the total number # of synapse (via Python) _owner._resize(newsize) # And update N_incoming, N_outgoing and synapse_number _owner._update_synapse_numbers(oldsize) before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_Kuramoto_avg_N = _namespace['_array_Kuramoto_avg_N'] cdef int32_t * _array_Kuramoto_avg_N = _buf__array_Kuramoto_avg_N.data cdef int32_t N = _namespace["N"] _var_N_post = _namespace["_var_N_post"] cdef int64_t N_post = _namespace["N_post"] _var_N_pre = _namespace["_var_N_pre"] cdef int64_t N_pre = _namespace["N_pre"] cdef bool _cond cdef int32_t _iter_high cdef int32_t _iter_low cdef int32_t _iter_step cdef int32_t _j cdef int32_t _k cdef int32_t _n cdef int32_t _post_idx cdef int32_t _pre_idx cdef int32_t _raw_post_idx cdef int32_t _raw_pre_idx _var__source_offset = _namespace["_var__source_offset"] cdef int64_t _source_offset = _namespace["_source_offset"] _var__synaptic_post = _namespace["_var__synaptic_post"] _dynamic_array_Kuramoto_avg__synaptic_post = _namespace["_dynamic_array_Kuramoto_avg__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_Kuramoto_avg__synaptic_post = _namespace['_array_Kuramoto_avg__synaptic_post'] cdef int32_t * _array_Kuramoto_avg__synaptic_post = _buf__array_Kuramoto_avg__synaptic_post.data cdef size_t _num_array_Kuramoto_avg__synaptic_post = len(_namespace['_array_Kuramoto_avg__synaptic_post']) cdef int32_t _synaptic_post _var__synaptic_pre = _namespace["_var__synaptic_pre"] _dynamic_array_Kuramoto_avg__synaptic_pre = _namespace["_dynamic_array_Kuramoto_avg__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_Kuramoto_avg__synaptic_pre = _namespace['_array_Kuramoto_avg__synaptic_pre'] cdef int32_t * _array_Kuramoto_avg__synaptic_pre = _buf__array_Kuramoto_avg__synaptic_pre.data cdef size_t _num_array_Kuramoto_avg__synaptic_pre = len(_namespace['_array_Kuramoto_avg__synaptic_pre']) cdef int32_t _synaptic_pre _var__target_offset = _namespace["_var__target_offset"] cdef int64_t _target_offset = _namespace["_target_offset"] # namespace for function rand global _namespace_rand_buffer global _namespace_num_rand_buffer cdef _numpy.ndarray[int64_t, ndim=1, mode='c'] _buf__rand_buffer = _namespace['_rand_buffer'] _namespace_rand_buffer = _buf__rand_buffer.data _namespace_num_rand_buffer = len(_namespace['_rand_buffer']) # namespace for function rand global _namespace_rand_buffer_index global _namespace_num_rand_buffer_index cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__rand_buffer_index = _namespace['_rand_buffer_index'] _namespace_rand_buffer_index = _buf__rand_buffer_index.data _namespace_num_rand_buffer_index = len(_namespace['_rand_buffer_index']) if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_Kuramoto_avg_N = _namespace['_array_Kuramoto_avg_N'] cdef int32_t * _array_Kuramoto_avg_N = _buf__array_Kuramoto_avg_N.data cdef int32_t N = _namespace["N"] _var_N_post = _namespace["_var_N_post"] cdef int64_t N_post = _namespace["N_post"] _var_N_pre = _namespace["_var_N_pre"] cdef int64_t N_pre = _namespace["N_pre"] cdef bool _cond cdef int32_t _iter_high cdef int32_t _iter_low cdef int32_t _iter_step cdef int32_t _j cdef int32_t _k cdef int32_t _n cdef int32_t _post_idx cdef int32_t _pre_idx cdef int32_t _raw_post_idx cdef int32_t _raw_pre_idx _var__source_offset = _namespace["_var__source_offset"] cdef int64_t _source_offset = _namespace["_source_offset"] _var__synaptic_post = _namespace["_var__synaptic_post"] _dynamic_array_Kuramoto_avg__synaptic_post = _namespace["_dynamic_array_Kuramoto_avg__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_Kuramoto_avg__synaptic_post = _namespace['_array_Kuramoto_avg__synaptic_post'] cdef int32_t * _array_Kuramoto_avg__synaptic_post = _buf__array_Kuramoto_avg__synaptic_post.data cdef size_t _num_array_Kuramoto_avg__synaptic_post = len(_namespace['_array_Kuramoto_avg__synaptic_post']) cdef int32_t _synaptic_post _var__synaptic_pre = _namespace["_var__synaptic_pre"] _dynamic_array_Kuramoto_avg__synaptic_pre = _namespace["_dynamic_array_Kuramoto_avg__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_Kuramoto_avg__synaptic_pre = _namespace['_array_Kuramoto_avg__synaptic_pre'] cdef int32_t * _array_Kuramoto_avg__synaptic_pre = _buf__array_Kuramoto_avg__synaptic_pre.data cdef size_t _num_array_Kuramoto_avg__synaptic_pre = len(_namespace['_array_Kuramoto_avg__synaptic_pre']) cdef int32_t _synaptic_pre _var__target_offset = _namespace["_var__target_offset"] cdef int64_t _target_offset = _namespace["_target_offset"] # namespace for function rand global _namespace_rand_buffer global _namespace_num_rand_buffer cdef _numpy.ndarray[int64_t, ndim=1, mode='c'] _buf__rand_buffer = _namespace['_rand_buffer'] _namespace_rand_buffer = _buf__rand_buffer.data _namespace_num_rand_buffer = len(_namespace['_rand_buffer']) # namespace for function rand global _namespace_rand_buffer_index global _namespace_num_rand_buffer_index cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__rand_buffer_index = _namespace['_rand_buffer_index'] _namespace_rand_buffer_index = _buf__rand_buffer_index.data _namespace_num_rand_buffer_index = len(_namespace['_rand_buffer_index']) if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:14:54,833 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name Kuramoto_avg_synapses_create_generator_codeobject 2021-11-05 15:14:54,834 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "Kuramoto_avg_synapses_create_generator" using Cython module "_cython_magic_a38543910ae52d335cf4a6bba72679c9" 2021-11-05 15:14:54,834 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140605146782976 on /home/nikos/.cython/brian_extensions/_cython_magic_a38543910ae52d335cf4a6bba72679c9.lock 2021-11-05 15:14:54,834 DEBUG brian2.utils.filelock: Lock 140605146782976 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_a38543910ae52d335cf4a6bba72679c9.lock 2021-11-05 15:14:54,834 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140605146782976 on /home/nikos/.cython/brian_extensions/_cython_magic_a38543910ae52d335cf4a6bba72679c9.lock 2021-11-05 15:14:54,834 DEBUG brian2.utils.filelock: Lock 140605146782976 released on /home/nikos/.cython/brian_extensions/_cython_magic_a38543910ae52d335cf4a6bba72679c9.lock 2021-11-05 15:14:54,835 DIAGNOSTIC brian2.core.names: Created object of class NeuronGroup with name neurongroup_1 2021-11-05 15:14:54,835 DIAGNOSTIC brian2.core.base: Created BrianObject with name neurongroup_1, clock=Clock(dt=100. * usecond, name='defaultclock'), when=start, order=0 2021-11-05 15:14:54,837 DIAGNOSTIC brian2.groups.neurongroup: Creating NeuronGroup of size 1, equations drive = Y/Hz : 1 dY/dt = -Y/tauFR : Hz. 2021-11-05 15:14:54,837 DIAGNOSTIC brian2.core.names: Created object of class StateUpdater with name neurongroup_1_stateupdater 2021-11-05 15:14:54,837 DIAGNOSTIC brian2.core.base: Created BrianObject with name neurongroup_1_stateupdater, clock=Clock(dt=100. * usecond, name='defaultclock'), when=groups, order=0 2021-11-05 15:14:54,837 DIAGNOSTIC brian2.core.names: Created object of class Synapses with name synapses 2021-11-05 15:14:54,838 DIAGNOSTIC brian2.core.base: Created BrianObject with name synapses, clock=Clock(dt=100. * usecond, name='defaultclock'), when=start, order=0 2021-11-05 15:14:54,840 DIAGNOSTIC brian2.core.names: Created object of class SynapticPathway with name synapses_pre 2021-11-05 15:14:54,840 DIAGNOSTIC brian2.core.base: Created BrianObject with name synapses_pre, clock=Clock(dt=100. * usecond, name='defaultclock'), when=synapses, order=-1 2021-11-05 15:14:54,841 DEBUG brian2.synapses.synapses: Creating synapses from group 'CA1_pyCAN' to group 'neurongroup_1', using generator '_k for _k in range(N_post) if True' 2021-11-05 15:14:54,841 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=synapses, template name=synapses_create_generator) for abstract code: Key setup_iterator: _iter_low = 0 _iter_high = N_post _iter_step = 1 Key create_j: _pre_idx = _raw_pre_idx _j = _k Key create_cond: _cond = True Key update_post: _post_idx = _raw_post_idx _n = 1 2021-11-05 15:14:54,866 DIAGNOSTIC brian2.devices.device: synapses_synapses_create_generator_codeobject abstract code: Key setup_iterator: _iter_low = 0 _iter_high = N_post _iter_step = 1 Key create_j: _pre_idx = _raw_pre_idx _j = _k Key create_cond: _cond = True Key update_post: _post_idx = _raw_post_idx _n = 1 2021-11-05 15:14:54,869 DIAGNOSTIC brian2.devices.device: synapses_synapses_create_generator_codeobject snippet (scalar): Key setup_iterator: Key create_j: Key create_cond: Key update_post: 2021-11-05 15:14:54,869 DIAGNOSTIC brian2.devices.device: synapses_synapses_create_generator_codeobject snippet (vector): Key setup_iterator: _iter_low = 0 _iter_high = N_post _iter_step = 1 Key create_j: _pre_idx = _raw_pre_idx _j = _k Key create_cond: _cond = 1 Key update_post: _post_idx = _raw_post_idx _n = 1 2021-11-05 15:14:54,869 DIAGNOSTIC brian2.devices.device: synapses_synapses_create_generator_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code cdef int64_t *_namespace_rand_buffer cdef int32_t *_namespace_rand_buffer_index cdef double _rand(int _idx): cdef double **buffer_pointer = _namespace_rand_buffer cdef double *buffer = buffer_pointer[0] cdef _numpy.ndarray _new_rand if(_namespace_rand_buffer_index[0] == 0): if buffer != NULL: free(buffer) _new_rand = _numpy.random.rand(20000) buffer = _numpy.PyArray_DATA(_new_rand) PyArray_CLEARFLAGS(<_numpy.PyArrayObject*>_new_rand, _numpy.NPY_OWNDATA) buffer_pointer[0] = buffer cdef double val = buffer[_namespace_rand_buffer_index[0]] _namespace_rand_buffer_index[0] += 1 if _namespace_rand_buffer_index[0] == 20000: _namespace_rand_buffer_index[0] = 0 return val # template-specific support code cdef int _buffer_size = 1024 cdef int[:] _prebuf = _numpy.zeros(_buffer_size, dtype=_numpy.int32) cdef int[:] _postbuf = _numpy.zeros(_buffer_size, dtype=_numpy.int32) cdef int _curbuf = 0 cdef int _raw_pre_idx cdef int _raw_post_idx cdef void _flush_buffer(buf, dynarr, int buf_len): cdef size_t _curlen = dynarr.shape[0] cdef size_t _newlen = _curlen+buf_len # Resize the array dynarr.resize(_newlen) # Get the potentially newly created underlying data arrays data = dynarr.data data[_curlen:_curlen+buf_len] = buf[:buf_len] def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_synapses_N = _namespace['_array_synapses_N'] cdef int32_t * _array_synapses_N = _buf__array_synapses_N.data cdef int32_t N = _namespace["N"] _var_N_post = _namespace["_var_N_post"] cdef int64_t N_post = _namespace["N_post"] _var_N_pre = _namespace["_var_N_pre"] cdef int64_t N_pre = _namespace["N_pre"] cdef bool _cond cdef int32_t _iter_high cdef int32_t _iter_low cdef int32_t _iter_step cdef int32_t _j cdef int32_t _k cdef int32_t _n cdef int32_t _post_idx cdef int32_t _pre_idx cdef int32_t _raw_post_idx cdef int32_t _raw_pre_idx _var__source_offset = _namespace["_var__source_offset"] cdef int64_t _source_offset = _namespace["_source_offset"] _var__synaptic_post = _namespace["_var__synaptic_post"] _dynamic_array_synapses__synaptic_post = _namespace["_dynamic_array_synapses__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_synapses__synaptic_post = _namespace['_array_synapses__synaptic_post'] cdef int32_t * _array_synapses__synaptic_post = _buf__array_synapses__synaptic_post.data cdef size_t _num_array_synapses__synaptic_post = len(_namespace['_array_synapses__synaptic_post']) cdef int32_t _synaptic_post _var__synaptic_pre = _namespace["_var__synaptic_pre"] _dynamic_array_synapses__synaptic_pre = _namespace["_dynamic_array_synapses__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_synapses__synaptic_pre = _namespace['_array_synapses__synaptic_pre'] cdef int32_t * _array_synapses__synaptic_pre = _buf__array_synapses__synaptic_pre.data cdef size_t _num_array_synapses__synaptic_pre = len(_namespace['_array_synapses__synaptic_pre']) cdef int32_t _synaptic_pre _var__target_offset = _namespace["_var__target_offset"] cdef int64_t _target_offset = _namespace["_target_offset"] # namespace for function rand global _namespace_rand_buffer global _namespace_num_rand_buffer cdef _numpy.ndarray[int64_t, ndim=1, mode='c'] _buf__rand_buffer = _namespace['_rand_buffer'] _namespace_rand_buffer = _buf__rand_buffer.data _namespace_num_rand_buffer = len(_namespace['_rand_buffer']) # namespace for function rand global _namespace_rand_buffer_index global _namespace_num_rand_buffer_index cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__rand_buffer_index = _namespace['_rand_buffer_index'] _namespace_rand_buffer_index = _buf__rand_buffer_index.data _namespace_num_rand_buffer_index = len(_namespace['_rand_buffer_index']) if '_owner' in _namespace: _owner = _namespace['_owner'] cdef int* _prebuf_ptr = &(_prebuf[0]) cdef int* _postbuf_ptr = &(_postbuf[0]) global _curbuf cdef size_t oldsize = len(_dynamic_array_synapses__synaptic_pre) cdef size_t newsize # The following variables are only used for probabilistic connections cdef bool _jump_algo cdef double _log1p, _pconst cdef size_t _jump # scalar code _vectorisation_idx = 1 for _i in range(N_pre): _raw_pre_idx = _i + _source_offset _cond = 1 if not _cond: continue _iter_low = 0 _iter_high = N_post _iter_step = 1 for _k in range(_iter_low, _iter_high, _iter_step): _pre_idx = _raw_pre_idx _j = _k _raw_post_idx = _j + _target_offset if _j<0 or _j>=N_post: raise IndexError("index j=%d outside allowed range from 0 to %d" % (_j, N_post-1)) _post_idx = _raw_post_idx _n = 1 for _repetition in range(_n): _prebuf_ptr[_curbuf] = _pre_idx _postbuf_ptr[_curbuf] = _post_idx _curbuf += 1 # Flush buffer if _curbuf==_buffer_size: _flush_buffer(_prebuf, _dynamic_array_synapses__synaptic_pre, _curbuf) _flush_buffer(_postbuf, _dynamic_array_synapses__synaptic_post, _curbuf) _curbuf = 0 # Final buffer flush _flush_buffer(_prebuf, _dynamic_array_synapses__synaptic_pre, _curbuf) _flush_buffer(_postbuf, _dynamic_array_synapses__synaptic_post, _curbuf) _curbuf = 0 # reset the buffer for the next run newsize = len(_dynamic_array_synapses__synaptic_pre) # now we need to resize all registered variables and set the total number # of synapse (via Python) _owner._resize(newsize) # And update N_incoming, N_outgoing and synapse_number _owner._update_synapse_numbers(oldsize) before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_synapses_N = _namespace['_array_synapses_N'] cdef int32_t * _array_synapses_N = _buf__array_synapses_N.data cdef int32_t N = _namespace["N"] _var_N_post = _namespace["_var_N_post"] cdef int64_t N_post = _namespace["N_post"] _var_N_pre = _namespace["_var_N_pre"] cdef int64_t N_pre = _namespace["N_pre"] cdef bool _cond cdef int32_t _iter_high cdef int32_t _iter_low cdef int32_t _iter_step cdef int32_t _j cdef int32_t _k cdef int32_t _n cdef int32_t _post_idx cdef int32_t _pre_idx cdef int32_t _raw_post_idx cdef int32_t _raw_pre_idx _var__source_offset = _namespace["_var__source_offset"] cdef int64_t _source_offset = _namespace["_source_offset"] _var__synaptic_post = _namespace["_var__synaptic_post"] _dynamic_array_synapses__synaptic_post = _namespace["_dynamic_array_synapses__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_synapses__synaptic_post = _namespace['_array_synapses__synaptic_post'] cdef int32_t * _array_synapses__synaptic_post = _buf__array_synapses__synaptic_post.data cdef size_t _num_array_synapses__synaptic_post = len(_namespace['_array_synapses__synaptic_post']) cdef int32_t _synaptic_post _var__synaptic_pre = _namespace["_var__synaptic_pre"] _dynamic_array_synapses__synaptic_pre = _namespace["_dynamic_array_synapses__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_synapses__synaptic_pre = _namespace['_array_synapses__synaptic_pre'] cdef int32_t * _array_synapses__synaptic_pre = _buf__array_synapses__synaptic_pre.data cdef size_t _num_array_synapses__synaptic_pre = len(_namespace['_array_synapses__synaptic_pre']) cdef int32_t _synaptic_pre _var__target_offset = _namespace["_var__target_offset"] cdef int64_t _target_offset = _namespace["_target_offset"] # namespace for function rand global _namespace_rand_buffer global _namespace_num_rand_buffer cdef _numpy.ndarray[int64_t, ndim=1, mode='c'] _buf__rand_buffer = _namespace['_rand_buffer'] _namespace_rand_buffer = _buf__rand_buffer.data _namespace_num_rand_buffer = len(_namespace['_rand_buffer']) # namespace for function rand global _namespace_rand_buffer_index global _namespace_num_rand_buffer_index cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__rand_buffer_index = _namespace['_rand_buffer_index'] _namespace_rand_buffer_index = _buf__rand_buffer_index.data _namespace_num_rand_buffer_index = len(_namespace['_rand_buffer_index']) if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_synapses_N = _namespace['_array_synapses_N'] cdef int32_t * _array_synapses_N = _buf__array_synapses_N.data cdef int32_t N = _namespace["N"] _var_N_post = _namespace["_var_N_post"] cdef int64_t N_post = _namespace["N_post"] _var_N_pre = _namespace["_var_N_pre"] cdef int64_t N_pre = _namespace["N_pre"] cdef bool _cond cdef int32_t _iter_high cdef int32_t _iter_low cdef int32_t _iter_step cdef int32_t _j cdef int32_t _k cdef int32_t _n cdef int32_t _post_idx cdef int32_t _pre_idx cdef int32_t _raw_post_idx cdef int32_t _raw_pre_idx _var__source_offset = _namespace["_var__source_offset"] cdef int64_t _source_offset = _namespace["_source_offset"] _var__synaptic_post = _namespace["_var__synaptic_post"] _dynamic_array_synapses__synaptic_post = _namespace["_dynamic_array_synapses__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_synapses__synaptic_post = _namespace['_array_synapses__synaptic_post'] cdef int32_t * _array_synapses__synaptic_post = _buf__array_synapses__synaptic_post.data cdef size_t _num_array_synapses__synaptic_post = len(_namespace['_array_synapses__synaptic_post']) cdef int32_t _synaptic_post _var__synaptic_pre = _namespace["_var__synaptic_pre"] _dynamic_array_synapses__synaptic_pre = _namespace["_dynamic_array_synapses__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_synapses__synaptic_pre = _namespace['_array_synapses__synaptic_pre'] cdef int32_t * _array_synapses__synaptic_pre = _buf__array_synapses__synaptic_pre.data cdef size_t _num_array_synapses__synaptic_pre = len(_namespace['_array_synapses__synaptic_pre']) cdef int32_t _synaptic_pre _var__target_offset = _namespace["_var__target_offset"] cdef int64_t _target_offset = _namespace["_target_offset"] # namespace for function rand global _namespace_rand_buffer global _namespace_num_rand_buffer cdef _numpy.ndarray[int64_t, ndim=1, mode='c'] _buf__rand_buffer = _namespace['_rand_buffer'] _namespace_rand_buffer = _buf__rand_buffer.data _namespace_num_rand_buffer = len(_namespace['_rand_buffer']) # namespace for function rand global _namespace_rand_buffer_index global _namespace_num_rand_buffer_index cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__rand_buffer_index = _namespace['_rand_buffer_index'] _namespace_rand_buffer_index = _buf__rand_buffer_index.data _namespace_num_rand_buffer_index = len(_namespace['_rand_buffer_index']) if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:14:54,869 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name synapses_synapses_create_generator_codeobject 2021-11-05 15:14:54,870 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "synapses_synapses_create_generator" using Cython module "_cython_magic_19bdae553ccf2e6f2f9133b94da91b4f" 2021-11-05 15:14:54,870 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140605145985952 on /home/nikos/.cython/brian_extensions/_cython_magic_19bdae553ccf2e6f2f9133b94da91b4f.lock 2021-11-05 15:14:54,870 DEBUG brian2.utils.filelock: Lock 140605145985952 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_19bdae553ccf2e6f2f9133b94da91b4f.lock 2021-11-05 15:14:54,870 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140605145985952 on /home/nikos/.cython/brian_extensions/_cython_magic_19bdae553ccf2e6f2f9133b94da91b4f.lock 2021-11-05 15:14:54,870 DEBUG brian2.utils.filelock: Lock 140605145985952 released on /home/nikos/.cython/brian_extensions/_cython_magic_19bdae553ccf2e6f2f9133b94da91b4f.lock 2021-11-05 15:14:54,872 DIAGNOSTIC brian2.groups.neurongroup: Setting Kuramoto_oscillators_N_50.X as a link to neurongroup_1.drive(using "0" as index variable) 2021-11-05 15:14:54,872 DIAGNOSTIC brian2.groups.neurongroup: Setting EC_pyCAN.I_exc as a link to neurongroup.rhythm_rect(using "0" as index variable) 2021-11-05 15:14:54,872 DIAGNOSTIC brian2.groups.neurongroup: Setting EC_inh.I_exc as a link to neurongroup.rhythm_rect(using "0" as index variable) 2021-11-05 15:14:54,873 DIAGNOSTIC brian2.core.names: Created object of class StateMonitor with name statemonitor_8 2021-11-05 15:14:54,873 DIAGNOSTIC brian2.core.base: Created BrianObject with name statemonitor_8, clock=Clock(dt=100. * usecond, name='defaultclock'), when=start, order=0 2021-11-05 15:14:54,873 DIAGNOSTIC brian2.core.names: Created object of class StateMonitor with name statemonitor_9 2021-11-05 15:14:54,874 DIAGNOSTIC brian2.core.base: Created BrianObject with name statemonitor_9, clock=Clock(dt=100. * usecond, name='defaultclock'), when=start, order=0 2021-11-05 15:14:54,874 DIAGNOSTIC brian2.core.names: Created object of class StateMonitor with name statemonitor_10 2021-11-05 15:14:54,875 DIAGNOSTIC brian2.core.base: Created BrianObject with name statemonitor_10, clock=Clock(dt=100. * usecond, name='defaultclock'), when=start, order=0 2021-11-05 15:14:54,875 DIAGNOSTIC brian2.core.names: Created object of class Network with name network 2021-11-05 15:14:54,876 DIAGNOSTIC brian2.core.clocks: Setting Clock defaultclock to t=, dt=0.0001 2021-11-05 15:14:54,877 DEBUG brian2.core.network.before_run: Preparing network network with 121 objects: CA1_inh_subexpression_update, CA1_pyCAN_subexpression_update, CA3_inh_subexpression_update, CA3_pyCAN_subexpression_update, DG_inh_subexpression_update, DG_py_subexpression_update, EC_inh_subexpression_update, EC_pyCAN_subexpression_update, CA1_inh, CA1_inhtoCA1_inh, CA1_inhtoCA1_pyCAN, CA1_pyCAN, CA1_pyCANtoCA1_inh, CA1_pyCANtoEC_inh, CA1_pyCANtoEC_pyCAN, CA3_inh, CA3_inhtoCA3_pyCAN, CA3_pyCAN, CA3_pyCANtoCA1_inh, CA3_pyCANtoCA1_pyCAN, CA3_pyCANtoCA3_inh, CA3_pyCANtoCA3_pyCAN, DG_inh, DG_inhtoDG_py, DG_py, DG_pytoCA3_inh, DG_pytoCA3_pyCAN, DG_pytoDG_inh, EC_inh, EC_inhtoEC_pyCAN, EC_pyCAN, EC_pyCANtoCA1_inh, EC_pyCANtoCA1_pyCAN, EC_pyCANtoCA3_inh, EC_pyCANtoCA3_pyCAN, EC_pyCANtoDG_inh, EC_pyCANtoDG_py, EC_pyCANtoEC_inh, Kuramoto_avg, Kuramoto_intra, Kuramoto_oscillators_N_50, neurongroup, neurongroup_1, statemonitor, statemonitor_1, statemonitor_10, statemonitor_2, statemonitor_3, statemonitor_4, statemonitor_5, statemonitor_6, statemonitor_7, statemonitor_8, statemonitor_9, synapses, Kuramoto_avg_summed_variable_x_post, Kuramoto_avg_summed_variable_y_post, CA1_inh_stateupdater, CA1_pyCAN_stateupdater, CA3_inh_stateupdater, CA3_pyCAN_stateupdater, DG_inh_stateupdater, DG_py_stateupdater, EC_inh_stateupdater, EC_pyCAN_stateupdater, Kuramoto_oscillators_N_50_stateupdater, neurongroup_1_stateupdater, neurongroup_stateupdater, CA1_inh_thresholder, CA1_pyCAN_thresholder, CA3_inh_thresholder, CA3_pyCAN_thresholder, DG_inh_thresholder, DG_py_thresholder, EC_inh_thresholder, EC_pyCAN_thresholder, Kuramoto_oscillators_N_50_thresholder, spikemonitor, spikemonitor_1, spikemonitor_2, spikemonitor_3, spikemonitor_4, spikemonitor_5, spikemonitor_6, spikemonitor_7, CA1_inhtoCA1_inh_pre, CA1_inhtoCA1_pyCAN_pre, CA1_pyCANtoCA1_inh_pre, CA1_pyCANtoEC_inh_pre, CA1_pyCANtoEC_pyCAN_pre, CA3_inhtoCA3_pyCAN_pre, CA3_pyCANtoCA1_inh_pre, CA3_pyCANtoCA1_pyCAN_pre, CA3_pyCANtoCA3_inh_pre, CA3_pyCANtoCA3_pyCAN_pre, DG_inhtoDG_py_pre, DG_pytoCA3_inh_pre, DG_pytoCA3_pyCAN_pre, DG_pytoDG_inh_pre, EC_inhtoEC_pyCAN_pre, EC_pyCANtoCA1_inh_pre, EC_pyCANtoCA1_pyCAN_pre, EC_pyCANtoCA3_inh_pre, EC_pyCANtoCA3_pyCAN_pre, EC_pyCANtoDG_inh_pre, EC_pyCANtoDG_py_pre, EC_pyCANtoEC_inh_pre, Kuramoto_intra_pre, synapses_pre, CA1_pyCAN_resetter, CA3_pyCAN_resetter, DG_py_resetter, EC_pyCAN_resetter, ratemonitor, ratemonitor_1, ratemonitor_2, ratemonitor_3, ratemonitor_4, ratemonitor_5, ratemonitor_6, ratemonitor_7 2021-11-05 15:14:54,878 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=CA1_inh, template name=stateupdate) for abstract code: noise = sigma_noise_inh*(2*(0.1e-3 * siemens ) / (1 * ufarad))**.5*randn()/sqrt(tstep) 2021-11-05 15:14:54,882 DIAGNOSTIC brian2.devices.device: CA1_inh_subexpression_update_codeobject abstract code: noise = sigma_noise_inh*(2*(0.1e-3 * siemens ) / (1 * ufarad))**.5*randn()/sqrt(tstep) 2021-11-05 15:14:54,884 DIAGNOSTIC brian2.devices.device: CA1_inh_subexpression_update_codeobject snippet (scalar): _lio_1 = (sigma_noise_inh * (((0.0002 * siemens) / ufarad) ** 0.5)) / sqrt(tstep) 2021-11-05 15:14:54,884 DIAGNOSTIC brian2.devices.device: CA1_inh_subexpression_update_codeobject snippet (vector): noise = _lio_1 * _randn(_vectorisation_idx) _array_CA1_inh_noise[_idx] = noise 2021-11-05 15:14:54,885 DIAGNOSTIC brian2.devices.device: CA1_inh_subexpression_update_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code cdef int64_t *_namespace_randn_buffer cdef int32_t *_namespace_randn_buffer_index cdef double _randn(int _idx): cdef double **buffer_pointer = _namespace_randn_buffer cdef double *buffer = buffer_pointer[0] cdef _numpy.ndarray _new_randn if(_namespace_randn_buffer_index[0] == 0): if buffer != NULL: free(buffer) _new_randn = _numpy.random.randn(20000) buffer = _numpy.PyArray_DATA(_new_randn) PyArray_CLEARFLAGS(<_numpy.PyArrayObject*>_new_randn, _numpy.NPY_OWNDATA) buffer_pointer[0] = buffer cdef double val = buffer[_namespace_randn_buffer_index[0]] _namespace_randn_buffer_index[0] += 1 if _namespace_randn_buffer_index[0] == 20000: _namespace_randn_buffer_index[0] = 0 return val # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var_N = _namespace["_var_N"] cdef int64_t N = _namespace["N"] _var_noise = _namespace["_var_noise"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_noise = _namespace['_array_CA1_inh_noise'] cdef double * _array_CA1_inh_noise = _buf__array_CA1_inh_noise.data cdef size_t _num_array_CA1_inh_noise = len(_namespace['_array_CA1_inh_noise']) cdef double noise # namespace for function randn global _namespace_randn_buffer global _namespace_num_randn_buffer cdef _numpy.ndarray[int64_t, ndim=1, mode='c'] _buf__randn_buffer = _namespace['_randn_buffer'] _namespace_randn_buffer = _buf__randn_buffer.data _namespace_num_randn_buffer = len(_namespace['_randn_buffer']) # namespace for function randn global _namespace_randn_buffer_index global _namespace_num_randn_buffer_index cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__randn_buffer_index = _namespace['_randn_buffer_index'] _namespace_randn_buffer_index = _buf__randn_buffer_index.data _namespace_num_randn_buffer_index = len(_namespace['_randn_buffer_index']) _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] _var_sigma_noise_inh = _namespace["_var_sigma_noise_inh"] cdef double sigma_noise_inh = _namespace["sigma_noise_inh"] _var_tstep = _namespace["_var_tstep"] cdef double tstep = _namespace["tstep"] _var_ufarad = _namespace["_var_ufarad"] cdef double ufarad = _namespace["ufarad"] cdef double _lio_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # scalar code _vectorisation_idx = 1 _lio_1 = (sigma_noise_inh * (((0.0002 * siemens) / ufarad) ** 0.5)) / sqrt(tstep) # vector code for _idx in range(N): _vectorisation_idx = _idx noise = _lio_1 * _randn(_vectorisation_idx) _array_CA1_inh_noise[_idx] = noise before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef int64_t N = _namespace["N"] _var_noise = _namespace["_var_noise"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_noise = _namespace['_array_CA1_inh_noise'] cdef double * _array_CA1_inh_noise = _buf__array_CA1_inh_noise.data cdef size_t _num_array_CA1_inh_noise = len(_namespace['_array_CA1_inh_noise']) cdef double noise # namespace for function randn global _namespace_randn_buffer global _namespace_num_randn_buffer cdef _numpy.ndarray[int64_t, ndim=1, mode='c'] _buf__randn_buffer = _namespace['_randn_buffer'] _namespace_randn_buffer = _buf__randn_buffer.data _namespace_num_randn_buffer = len(_namespace['_randn_buffer']) # namespace for function randn global _namespace_randn_buffer_index global _namespace_num_randn_buffer_index cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__randn_buffer_index = _namespace['_randn_buffer_index'] _namespace_randn_buffer_index = _buf__randn_buffer_index.data _namespace_num_randn_buffer_index = len(_namespace['_randn_buffer_index']) _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] _var_sigma_noise_inh = _namespace["_var_sigma_noise_inh"] cdef double sigma_noise_inh = _namespace["sigma_noise_inh"] _var_tstep = _namespace["_var_tstep"] cdef double tstep = _namespace["tstep"] _var_ufarad = _namespace["_var_ufarad"] cdef double ufarad = _namespace["ufarad"] cdef double _lio_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef int64_t N = _namespace["N"] _var_noise = _namespace["_var_noise"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_noise = _namespace['_array_CA1_inh_noise'] cdef double * _array_CA1_inh_noise = _buf__array_CA1_inh_noise.data cdef size_t _num_array_CA1_inh_noise = len(_namespace['_array_CA1_inh_noise']) cdef double noise # namespace for function randn global _namespace_randn_buffer global _namespace_num_randn_buffer cdef _numpy.ndarray[int64_t, ndim=1, mode='c'] _buf__randn_buffer = _namespace['_randn_buffer'] _namespace_randn_buffer = _buf__randn_buffer.data _namespace_num_randn_buffer = len(_namespace['_randn_buffer']) # namespace for function randn global _namespace_randn_buffer_index global _namespace_num_randn_buffer_index cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__randn_buffer_index = _namespace['_randn_buffer_index'] _namespace_randn_buffer_index = _buf__randn_buffer_index.data _namespace_num_randn_buffer_index = len(_namespace['_randn_buffer_index']) _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] _var_sigma_noise_inh = _namespace["_var_sigma_noise_inh"] cdef double sigma_noise_inh = _namespace["sigma_noise_inh"] _var_tstep = _namespace["_var_tstep"] cdef double tstep = _namespace["tstep"] _var_ufarad = _namespace["_var_ufarad"] cdef double ufarad = _namespace["ufarad"] cdef double _lio_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:14:54,885 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name CA1_inh_subexpression_update_codeobject 2021-11-05 15:14:54,885 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "CA1_inh_stateupdate" using Cython module "_cython_magic_e298e88fa62cfd370c579a6972c19add" 2021-11-05 15:14:54,885 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140605144992592 on /home/nikos/.cython/brian_extensions/_cython_magic_e298e88fa62cfd370c579a6972c19add.lock 2021-11-05 15:14:54,885 DEBUG brian2.utils.filelock: Lock 140605144992592 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_e298e88fa62cfd370c579a6972c19add.lock 2021-11-05 15:14:54,885 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140605144992592 on /home/nikos/.cython/brian_extensions/_cython_magic_e298e88fa62cfd370c579a6972c19add.lock 2021-11-05 15:14:54,885 DEBUG brian2.utils.filelock: Lock 140605144992592 released on /home/nikos/.cython/brian_extensions/_cython_magic_e298e88fa62cfd370c579a6972c19add.lock 2021-11-05 15:14:54,885 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=CA1_pyCAN, template name=stateupdate) for abstract code: noise = sigma_noise_exc*(2*(0.1e-3 * siemens ) / (1 * ufarad))**.5*randn()/sqrt(tstep) 2021-11-05 15:14:54,889 DIAGNOSTIC brian2.devices.device: CA1_pyCAN_subexpression_update_codeobject abstract code: noise = sigma_noise_exc*(2*(0.1e-3 * siemens ) / (1 * ufarad))**.5*randn()/sqrt(tstep) 2021-11-05 15:14:54,891 DIAGNOSTIC brian2.devices.device: CA1_pyCAN_subexpression_update_codeobject snippet (scalar): _lio_1 = (sigma_noise_exc * (((0.0002 * siemens) / ufarad) ** 0.5)) / sqrt(tstep) 2021-11-05 15:14:54,891 DIAGNOSTIC brian2.devices.device: CA1_pyCAN_subexpression_update_codeobject snippet (vector): noise = _lio_1 * _randn(_vectorisation_idx) _array_CA1_pyCAN_noise[_idx] = noise 2021-11-05 15:14:54,892 DIAGNOSTIC brian2.devices.device: CA1_pyCAN_subexpression_update_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code cdef int64_t *_namespace_randn_buffer cdef int32_t *_namespace_randn_buffer_index cdef double _randn(int _idx): cdef double **buffer_pointer = _namespace_randn_buffer cdef double *buffer = buffer_pointer[0] cdef _numpy.ndarray _new_randn if(_namespace_randn_buffer_index[0] == 0): if buffer != NULL: free(buffer) _new_randn = _numpy.random.randn(20000) buffer = _numpy.PyArray_DATA(_new_randn) PyArray_CLEARFLAGS(<_numpy.PyArrayObject*>_new_randn, _numpy.NPY_OWNDATA) buffer_pointer[0] = buffer cdef double val = buffer[_namespace_randn_buffer_index[0]] _namespace_randn_buffer_index[0] += 1 if _namespace_randn_buffer_index[0] == 20000: _namespace_randn_buffer_index[0] = 0 return val # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var_N = _namespace["_var_N"] cdef int64_t N = _namespace["N"] _var_noise = _namespace["_var_noise"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_noise = _namespace['_array_CA1_pyCAN_noise'] cdef double * _array_CA1_pyCAN_noise = _buf__array_CA1_pyCAN_noise.data cdef size_t _num_array_CA1_pyCAN_noise = len(_namespace['_array_CA1_pyCAN_noise']) cdef double noise # namespace for function randn global _namespace_randn_buffer global _namespace_num_randn_buffer cdef _numpy.ndarray[int64_t, ndim=1, mode='c'] _buf__randn_buffer = _namespace['_randn_buffer'] _namespace_randn_buffer = _buf__randn_buffer.data _namespace_num_randn_buffer = len(_namespace['_randn_buffer']) # namespace for function randn global _namespace_randn_buffer_index global _namespace_num_randn_buffer_index cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__randn_buffer_index = _namespace['_randn_buffer_index'] _namespace_randn_buffer_index = _buf__randn_buffer_index.data _namespace_num_randn_buffer_index = len(_namespace['_randn_buffer_index']) _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] _var_sigma_noise_exc = _namespace["_var_sigma_noise_exc"] cdef double sigma_noise_exc = _namespace["sigma_noise_exc"] _var_tstep = _namespace["_var_tstep"] cdef double tstep = _namespace["tstep"] _var_ufarad = _namespace["_var_ufarad"] cdef double ufarad = _namespace["ufarad"] cdef double _lio_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # scalar code _vectorisation_idx = 1 _lio_1 = (sigma_noise_exc * (((0.0002 * siemens) / ufarad) ** 0.5)) / sqrt(tstep) # vector code for _idx in range(N): _vectorisation_idx = _idx noise = _lio_1 * _randn(_vectorisation_idx) _array_CA1_pyCAN_noise[_idx] = noise before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef int64_t N = _namespace["N"] _var_noise = _namespace["_var_noise"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_noise = _namespace['_array_CA1_pyCAN_noise'] cdef double * _array_CA1_pyCAN_noise = _buf__array_CA1_pyCAN_noise.data cdef size_t _num_array_CA1_pyCAN_noise = len(_namespace['_array_CA1_pyCAN_noise']) cdef double noise # namespace for function randn global _namespace_randn_buffer global _namespace_num_randn_buffer cdef _numpy.ndarray[int64_t, ndim=1, mode='c'] _buf__randn_buffer = _namespace['_randn_buffer'] _namespace_randn_buffer = _buf__randn_buffer.data _namespace_num_randn_buffer = len(_namespace['_randn_buffer']) # namespace for function randn global _namespace_randn_buffer_index global _namespace_num_randn_buffer_index cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__randn_buffer_index = _namespace['_randn_buffer_index'] _namespace_randn_buffer_index = _buf__randn_buffer_index.data _namespace_num_randn_buffer_index = len(_namespace['_randn_buffer_index']) _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] _var_sigma_noise_exc = _namespace["_var_sigma_noise_exc"] cdef double sigma_noise_exc = _namespace["sigma_noise_exc"] _var_tstep = _namespace["_var_tstep"] cdef double tstep = _namespace["tstep"] _var_ufarad = _namespace["_var_ufarad"] cdef double ufarad = _namespace["ufarad"] cdef double _lio_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef int64_t N = _namespace["N"] _var_noise = _namespace["_var_noise"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_noise = _namespace['_array_CA1_pyCAN_noise'] cdef double * _array_CA1_pyCAN_noise = _buf__array_CA1_pyCAN_noise.data cdef size_t _num_array_CA1_pyCAN_noise = len(_namespace['_array_CA1_pyCAN_noise']) cdef double noise # namespace for function randn global _namespace_randn_buffer global _namespace_num_randn_buffer cdef _numpy.ndarray[int64_t, ndim=1, mode='c'] _buf__randn_buffer = _namespace['_randn_buffer'] _namespace_randn_buffer = _buf__randn_buffer.data _namespace_num_randn_buffer = len(_namespace['_randn_buffer']) # namespace for function randn global _namespace_randn_buffer_index global _namespace_num_randn_buffer_index cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__randn_buffer_index = _namespace['_randn_buffer_index'] _namespace_randn_buffer_index = _buf__randn_buffer_index.data _namespace_num_randn_buffer_index = len(_namespace['_randn_buffer_index']) _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] _var_sigma_noise_exc = _namespace["_var_sigma_noise_exc"] cdef double sigma_noise_exc = _namespace["sigma_noise_exc"] _var_tstep = _namespace["_var_tstep"] cdef double tstep = _namespace["tstep"] _var_ufarad = _namespace["_var_ufarad"] cdef double ufarad = _namespace["ufarad"] cdef double _lio_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:14:54,892 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name CA1_pyCAN_subexpression_update_codeobject 2021-11-05 15:14:54,892 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "CA1_pyCAN_stateupdate" using Cython module "_cython_magic_4a383695a4026a4a29ac6b304d0b5c29" 2021-11-05 15:14:54,892 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140605144955680 on /home/nikos/.cython/brian_extensions/_cython_magic_4a383695a4026a4a29ac6b304d0b5c29.lock 2021-11-05 15:14:54,893 DEBUG brian2.utils.filelock: Lock 140605144955680 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_4a383695a4026a4a29ac6b304d0b5c29.lock 2021-11-05 15:14:54,893 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140605144955680 on /home/nikos/.cython/brian_extensions/_cython_magic_4a383695a4026a4a29ac6b304d0b5c29.lock 2021-11-05 15:14:54,893 DEBUG brian2.utils.filelock: Lock 140605144955680 released on /home/nikos/.cython/brian_extensions/_cython_magic_4a383695a4026a4a29ac6b304d0b5c29.lock 2021-11-05 15:14:54,893 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=CA3_inh, template name=stateupdate) for abstract code: noise = sigma_noise_inh*(2*(0.1e-3 * siemens ) / (1 * ufarad))**.5*randn()/sqrt(tstep) 2021-11-05 15:14:54,895 DIAGNOSTIC brian2.devices.device: CA3_inh_subexpression_update_codeobject abstract code: noise = sigma_noise_inh*(2*(0.1e-3 * siemens ) / (1 * ufarad))**.5*randn()/sqrt(tstep) 2021-11-05 15:14:54,898 DIAGNOSTIC brian2.devices.device: CA3_inh_subexpression_update_codeobject snippet (scalar): _lio_1 = (sigma_noise_inh * (((0.0002 * siemens) / ufarad) ** 0.5)) / sqrt(tstep) 2021-11-05 15:14:54,898 DIAGNOSTIC brian2.devices.device: CA3_inh_subexpression_update_codeobject snippet (vector): noise = _lio_1 * _randn(_vectorisation_idx) _array_CA3_inh_noise[_idx] = noise 2021-11-05 15:14:54,898 DIAGNOSTIC brian2.devices.device: CA3_inh_subexpression_update_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code cdef int64_t *_namespace_randn_buffer cdef int32_t *_namespace_randn_buffer_index cdef double _randn(int _idx): cdef double **buffer_pointer = _namespace_randn_buffer cdef double *buffer = buffer_pointer[0] cdef _numpy.ndarray _new_randn if(_namespace_randn_buffer_index[0] == 0): if buffer != NULL: free(buffer) _new_randn = _numpy.random.randn(20000) buffer = _numpy.PyArray_DATA(_new_randn) PyArray_CLEARFLAGS(<_numpy.PyArrayObject*>_new_randn, _numpy.NPY_OWNDATA) buffer_pointer[0] = buffer cdef double val = buffer[_namespace_randn_buffer_index[0]] _namespace_randn_buffer_index[0] += 1 if _namespace_randn_buffer_index[0] == 20000: _namespace_randn_buffer_index[0] = 0 return val # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var_N = _namespace["_var_N"] cdef int64_t N = _namespace["N"] _var_noise = _namespace["_var_noise"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_inh_noise = _namespace['_array_CA3_inh_noise'] cdef double * _array_CA3_inh_noise = _buf__array_CA3_inh_noise.data cdef size_t _num_array_CA3_inh_noise = len(_namespace['_array_CA3_inh_noise']) cdef double noise # namespace for function randn global _namespace_randn_buffer global _namespace_num_randn_buffer cdef _numpy.ndarray[int64_t, ndim=1, mode='c'] _buf__randn_buffer = _namespace['_randn_buffer'] _namespace_randn_buffer = _buf__randn_buffer.data _namespace_num_randn_buffer = len(_namespace['_randn_buffer']) # namespace for function randn global _namespace_randn_buffer_index global _namespace_num_randn_buffer_index cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__randn_buffer_index = _namespace['_randn_buffer_index'] _namespace_randn_buffer_index = _buf__randn_buffer_index.data _namespace_num_randn_buffer_index = len(_namespace['_randn_buffer_index']) _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] _var_sigma_noise_inh = _namespace["_var_sigma_noise_inh"] cdef double sigma_noise_inh = _namespace["sigma_noise_inh"] _var_tstep = _namespace["_var_tstep"] cdef double tstep = _namespace["tstep"] _var_ufarad = _namespace["_var_ufarad"] cdef double ufarad = _namespace["ufarad"] cdef double _lio_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # scalar code _vectorisation_idx = 1 _lio_1 = (sigma_noise_inh * (((0.0002 * siemens) / ufarad) ** 0.5)) / sqrt(tstep) # vector code for _idx in range(N): _vectorisation_idx = _idx noise = _lio_1 * _randn(_vectorisation_idx) _array_CA3_inh_noise[_idx] = noise before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef int64_t N = _namespace["N"] _var_noise = _namespace["_var_noise"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_inh_noise = _namespace['_array_CA3_inh_noise'] cdef double * _array_CA3_inh_noise = _buf__array_CA3_inh_noise.data cdef size_t _num_array_CA3_inh_noise = len(_namespace['_array_CA3_inh_noise']) cdef double noise # namespace for function randn global _namespace_randn_buffer global _namespace_num_randn_buffer cdef _numpy.ndarray[int64_t, ndim=1, mode='c'] _buf__randn_buffer = _namespace['_randn_buffer'] _namespace_randn_buffer = _buf__randn_buffer.data _namespace_num_randn_buffer = len(_namespace['_randn_buffer']) # namespace for function randn global _namespace_randn_buffer_index global _namespace_num_randn_buffer_index cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__randn_buffer_index = _namespace['_randn_buffer_index'] _namespace_randn_buffer_index = _buf__randn_buffer_index.data _namespace_num_randn_buffer_index = len(_namespace['_randn_buffer_index']) _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] _var_sigma_noise_inh = _namespace["_var_sigma_noise_inh"] cdef double sigma_noise_inh = _namespace["sigma_noise_inh"] _var_tstep = _namespace["_var_tstep"] cdef double tstep = _namespace["tstep"] _var_ufarad = _namespace["_var_ufarad"] cdef double ufarad = _namespace["ufarad"] cdef double _lio_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef int64_t N = _namespace["N"] _var_noise = _namespace["_var_noise"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_inh_noise = _namespace['_array_CA3_inh_noise'] cdef double * _array_CA3_inh_noise = _buf__array_CA3_inh_noise.data cdef size_t _num_array_CA3_inh_noise = len(_namespace['_array_CA3_inh_noise']) cdef double noise # namespace for function randn global _namespace_randn_buffer global _namespace_num_randn_buffer cdef _numpy.ndarray[int64_t, ndim=1, mode='c'] _buf__randn_buffer = _namespace['_randn_buffer'] _namespace_randn_buffer = _buf__randn_buffer.data _namespace_num_randn_buffer = len(_namespace['_randn_buffer']) # namespace for function randn global _namespace_randn_buffer_index global _namespace_num_randn_buffer_index cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__randn_buffer_index = _namespace['_randn_buffer_index'] _namespace_randn_buffer_index = _buf__randn_buffer_index.data _namespace_num_randn_buffer_index = len(_namespace['_randn_buffer_index']) _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] _var_sigma_noise_inh = _namespace["_var_sigma_noise_inh"] cdef double sigma_noise_inh = _namespace["sigma_noise_inh"] _var_tstep = _namespace["_var_tstep"] cdef double tstep = _namespace["tstep"] _var_ufarad = _namespace["_var_ufarad"] cdef double ufarad = _namespace["ufarad"] cdef double _lio_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:14:54,898 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name CA3_inh_subexpression_update_codeobject 2021-11-05 15:14:54,899 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "CA3_inh_stateupdate" using Cython module "_cython_magic_061327e54b542b87899320080f41bfa3" 2021-11-05 15:14:54,899 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140605144955104 on /home/nikos/.cython/brian_extensions/_cython_magic_061327e54b542b87899320080f41bfa3.lock 2021-11-05 15:14:54,899 DEBUG brian2.utils.filelock: Lock 140605144955104 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_061327e54b542b87899320080f41bfa3.lock 2021-11-05 15:14:54,899 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140605144955104 on /home/nikos/.cython/brian_extensions/_cython_magic_061327e54b542b87899320080f41bfa3.lock 2021-11-05 15:14:54,899 DEBUG brian2.utils.filelock: Lock 140605144955104 released on /home/nikos/.cython/brian_extensions/_cython_magic_061327e54b542b87899320080f41bfa3.lock 2021-11-05 15:14:54,899 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=CA3_pyCAN, template name=stateupdate) for abstract code: noise = sigma_noise_exc*(2*(0.1e-3 * siemens ) / (1 * ufarad))**.5*randn()/sqrt(tstep) 2021-11-05 15:14:54,902 DIAGNOSTIC brian2.devices.device: CA3_pyCAN_subexpression_update_codeobject abstract code: noise = sigma_noise_exc*(2*(0.1e-3 * siemens ) / (1 * ufarad))**.5*randn()/sqrt(tstep) 2021-11-05 15:14:54,904 DIAGNOSTIC brian2.devices.device: CA3_pyCAN_subexpression_update_codeobject snippet (scalar): _lio_1 = (sigma_noise_exc * (((0.0002 * siemens) / ufarad) ** 0.5)) / sqrt(tstep) 2021-11-05 15:14:54,904 DIAGNOSTIC brian2.devices.device: CA3_pyCAN_subexpression_update_codeobject snippet (vector): noise = _lio_1 * _randn(_vectorisation_idx) _array_CA3_pyCAN_noise[_idx] = noise 2021-11-05 15:14:54,904 DIAGNOSTIC brian2.devices.device: CA3_pyCAN_subexpression_update_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code cdef int64_t *_namespace_randn_buffer cdef int32_t *_namespace_randn_buffer_index cdef double _randn(int _idx): cdef double **buffer_pointer = _namespace_randn_buffer cdef double *buffer = buffer_pointer[0] cdef _numpy.ndarray _new_randn if(_namespace_randn_buffer_index[0] == 0): if buffer != NULL: free(buffer) _new_randn = _numpy.random.randn(20000) buffer = _numpy.PyArray_DATA(_new_randn) PyArray_CLEARFLAGS(<_numpy.PyArrayObject*>_new_randn, _numpy.NPY_OWNDATA) buffer_pointer[0] = buffer cdef double val = buffer[_namespace_randn_buffer_index[0]] _namespace_randn_buffer_index[0] += 1 if _namespace_randn_buffer_index[0] == 20000: _namespace_randn_buffer_index[0] = 0 return val # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var_N = _namespace["_var_N"] cdef int64_t N = _namespace["N"] _var_noise = _namespace["_var_noise"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_noise = _namespace['_array_CA3_pyCAN_noise'] cdef double * _array_CA3_pyCAN_noise = _buf__array_CA3_pyCAN_noise.data cdef size_t _num_array_CA3_pyCAN_noise = len(_namespace['_array_CA3_pyCAN_noise']) cdef double noise # namespace for function randn global _namespace_randn_buffer global _namespace_num_randn_buffer cdef _numpy.ndarray[int64_t, ndim=1, mode='c'] _buf__randn_buffer = _namespace['_randn_buffer'] _namespace_randn_buffer = _buf__randn_buffer.data _namespace_num_randn_buffer = len(_namespace['_randn_buffer']) # namespace for function randn global _namespace_randn_buffer_index global _namespace_num_randn_buffer_index cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__randn_buffer_index = _namespace['_randn_buffer_index'] _namespace_randn_buffer_index = _buf__randn_buffer_index.data _namespace_num_randn_buffer_index = len(_namespace['_randn_buffer_index']) _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] _var_sigma_noise_exc = _namespace["_var_sigma_noise_exc"] cdef double sigma_noise_exc = _namespace["sigma_noise_exc"] _var_tstep = _namespace["_var_tstep"] cdef double tstep = _namespace["tstep"] _var_ufarad = _namespace["_var_ufarad"] cdef double ufarad = _namespace["ufarad"] cdef double _lio_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # scalar code _vectorisation_idx = 1 _lio_1 = (sigma_noise_exc * (((0.0002 * siemens) / ufarad) ** 0.5)) / sqrt(tstep) # vector code for _idx in range(N): _vectorisation_idx = _idx noise = _lio_1 * _randn(_vectorisation_idx) _array_CA3_pyCAN_noise[_idx] = noise before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef int64_t N = _namespace["N"] _var_noise = _namespace["_var_noise"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_noise = _namespace['_array_CA3_pyCAN_noise'] cdef double * _array_CA3_pyCAN_noise = _buf__array_CA3_pyCAN_noise.data cdef size_t _num_array_CA3_pyCAN_noise = len(_namespace['_array_CA3_pyCAN_noise']) cdef double noise # namespace for function randn global _namespace_randn_buffer global _namespace_num_randn_buffer cdef _numpy.ndarray[int64_t, ndim=1, mode='c'] _buf__randn_buffer = _namespace['_randn_buffer'] _namespace_randn_buffer = _buf__randn_buffer.data _namespace_num_randn_buffer = len(_namespace['_randn_buffer']) # namespace for function randn global _namespace_randn_buffer_index global _namespace_num_randn_buffer_index cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__randn_buffer_index = _namespace['_randn_buffer_index'] _namespace_randn_buffer_index = _buf__randn_buffer_index.data _namespace_num_randn_buffer_index = len(_namespace['_randn_buffer_index']) _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] _var_sigma_noise_exc = _namespace["_var_sigma_noise_exc"] cdef double sigma_noise_exc = _namespace["sigma_noise_exc"] _var_tstep = _namespace["_var_tstep"] cdef double tstep = _namespace["tstep"] _var_ufarad = _namespace["_var_ufarad"] cdef double ufarad = _namespace["ufarad"] cdef double _lio_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef int64_t N = _namespace["N"] _var_noise = _namespace["_var_noise"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_noise = _namespace['_array_CA3_pyCAN_noise'] cdef double * _array_CA3_pyCAN_noise = _buf__array_CA3_pyCAN_noise.data cdef size_t _num_array_CA3_pyCAN_noise = len(_namespace['_array_CA3_pyCAN_noise']) cdef double noise # namespace for function randn global _namespace_randn_buffer global _namespace_num_randn_buffer cdef _numpy.ndarray[int64_t, ndim=1, mode='c'] _buf__randn_buffer = _namespace['_randn_buffer'] _namespace_randn_buffer = _buf__randn_buffer.data _namespace_num_randn_buffer = len(_namespace['_randn_buffer']) # namespace for function randn global _namespace_randn_buffer_index global _namespace_num_randn_buffer_index cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__randn_buffer_index = _namespace['_randn_buffer_index'] _namespace_randn_buffer_index = _buf__randn_buffer_index.data _namespace_num_randn_buffer_index = len(_namespace['_randn_buffer_index']) _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] _var_sigma_noise_exc = _namespace["_var_sigma_noise_exc"] cdef double sigma_noise_exc = _namespace["sigma_noise_exc"] _var_tstep = _namespace["_var_tstep"] cdef double tstep = _namespace["tstep"] _var_ufarad = _namespace["_var_ufarad"] cdef double ufarad = _namespace["ufarad"] cdef double _lio_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:14:54,904 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name CA3_pyCAN_subexpression_update_codeobject 2021-11-05 15:14:54,905 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "CA3_pyCAN_stateupdate" using Cython module "_cython_magic_6e97296e91f0369ade188ff01b1f5ff6" 2021-11-05 15:14:54,905 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140605146723712 on /home/nikos/.cython/brian_extensions/_cython_magic_6e97296e91f0369ade188ff01b1f5ff6.lock 2021-11-05 15:14:54,905 DEBUG brian2.utils.filelock: Lock 140605146723712 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_6e97296e91f0369ade188ff01b1f5ff6.lock 2021-11-05 15:14:54,905 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140605146723712 on /home/nikos/.cython/brian_extensions/_cython_magic_6e97296e91f0369ade188ff01b1f5ff6.lock 2021-11-05 15:14:54,905 DEBUG brian2.utils.filelock: Lock 140605146723712 released on /home/nikos/.cython/brian_extensions/_cython_magic_6e97296e91f0369ade188ff01b1f5ff6.lock 2021-11-05 15:14:54,905 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=DG_inh, template name=stateupdate) for abstract code: noise = sigma_noise_inh*(2*(0.1e-3 * siemens ) / (1 * ufarad))**.5*randn()/sqrt(tstep) 2021-11-05 15:14:54,907 DIAGNOSTIC brian2.devices.device: DG_inh_subexpression_update_codeobject abstract code: noise = sigma_noise_inh*(2*(0.1e-3 * siemens ) / (1 * ufarad))**.5*randn()/sqrt(tstep) 2021-11-05 15:14:54,907 DIAGNOSTIC brian2.devices.device: DG_inh_subexpression_update_codeobject snippet (scalar): _lio_1 = (sigma_noise_inh * (((0.0002 * siemens) / ufarad) ** 0.5)) / sqrt(tstep) 2021-11-05 15:14:54,907 DIAGNOSTIC brian2.devices.device: DG_inh_subexpression_update_codeobject snippet (vector): noise = _lio_1 * _randn(_vectorisation_idx) _array_DG_inh_noise[_idx] = noise 2021-11-05 15:14:54,908 DIAGNOSTIC brian2.devices.device: DG_inh_subexpression_update_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code cdef int64_t *_namespace_randn_buffer cdef int32_t *_namespace_randn_buffer_index cdef double _randn(int _idx): cdef double **buffer_pointer = _namespace_randn_buffer cdef double *buffer = buffer_pointer[0] cdef _numpy.ndarray _new_randn if(_namespace_randn_buffer_index[0] == 0): if buffer != NULL: free(buffer) _new_randn = _numpy.random.randn(20000) buffer = _numpy.PyArray_DATA(_new_randn) PyArray_CLEARFLAGS(<_numpy.PyArrayObject*>_new_randn, _numpy.NPY_OWNDATA) buffer_pointer[0] = buffer cdef double val = buffer[_namespace_randn_buffer_index[0]] _namespace_randn_buffer_index[0] += 1 if _namespace_randn_buffer_index[0] == 20000: _namespace_randn_buffer_index[0] = 0 return val # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var_N = _namespace["_var_N"] cdef int64_t N = _namespace["N"] _var_noise = _namespace["_var_noise"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_inh_noise = _namespace['_array_DG_inh_noise'] cdef double * _array_DG_inh_noise = _buf__array_DG_inh_noise.data cdef size_t _num_array_DG_inh_noise = len(_namespace['_array_DG_inh_noise']) cdef double noise # namespace for function randn global _namespace_randn_buffer global _namespace_num_randn_buffer cdef _numpy.ndarray[int64_t, ndim=1, mode='c'] _buf__randn_buffer = _namespace['_randn_buffer'] _namespace_randn_buffer = _buf__randn_buffer.data _namespace_num_randn_buffer = len(_namespace['_randn_buffer']) # namespace for function randn global _namespace_randn_buffer_index global _namespace_num_randn_buffer_index cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__randn_buffer_index = _namespace['_randn_buffer_index'] _namespace_randn_buffer_index = _buf__randn_buffer_index.data _namespace_num_randn_buffer_index = len(_namespace['_randn_buffer_index']) _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] _var_sigma_noise_inh = _namespace["_var_sigma_noise_inh"] cdef double sigma_noise_inh = _namespace["sigma_noise_inh"] _var_tstep = _namespace["_var_tstep"] cdef double tstep = _namespace["tstep"] _var_ufarad = _namespace["_var_ufarad"] cdef double ufarad = _namespace["ufarad"] cdef double _lio_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # scalar code _vectorisation_idx = 1 _lio_1 = (sigma_noise_inh * (((0.0002 * siemens) / ufarad) ** 0.5)) / sqrt(tstep) # vector code for _idx in range(N): _vectorisation_idx = _idx noise = _lio_1 * _randn(_vectorisation_idx) _array_DG_inh_noise[_idx] = noise before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef int64_t N = _namespace["N"] _var_noise = _namespace["_var_noise"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_inh_noise = _namespace['_array_DG_inh_noise'] cdef double * _array_DG_inh_noise = _buf__array_DG_inh_noise.data cdef size_t _num_array_DG_inh_noise = len(_namespace['_array_DG_inh_noise']) cdef double noise # namespace for function randn global _namespace_randn_buffer global _namespace_num_randn_buffer cdef _numpy.ndarray[int64_t, ndim=1, mode='c'] _buf__randn_buffer = _namespace['_randn_buffer'] _namespace_randn_buffer = _buf__randn_buffer.data _namespace_num_randn_buffer = len(_namespace['_randn_buffer']) # namespace for function randn global _namespace_randn_buffer_index global _namespace_num_randn_buffer_index cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__randn_buffer_index = _namespace['_randn_buffer_index'] _namespace_randn_buffer_index = _buf__randn_buffer_index.data _namespace_num_randn_buffer_index = len(_namespace['_randn_buffer_index']) _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] _var_sigma_noise_inh = _namespace["_var_sigma_noise_inh"] cdef double sigma_noise_inh = _namespace["sigma_noise_inh"] _var_tstep = _namespace["_var_tstep"] cdef double tstep = _namespace["tstep"] _var_ufarad = _namespace["_var_ufarad"] cdef double ufarad = _namespace["ufarad"] cdef double _lio_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef int64_t N = _namespace["N"] _var_noise = _namespace["_var_noise"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_inh_noise = _namespace['_array_DG_inh_noise'] cdef double * _array_DG_inh_noise = _buf__array_DG_inh_noise.data cdef size_t _num_array_DG_inh_noise = len(_namespace['_array_DG_inh_noise']) cdef double noise # namespace for function randn global _namespace_randn_buffer global _namespace_num_randn_buffer cdef _numpy.ndarray[int64_t, ndim=1, mode='c'] _buf__randn_buffer = _namespace['_randn_buffer'] _namespace_randn_buffer = _buf__randn_buffer.data _namespace_num_randn_buffer = len(_namespace['_randn_buffer']) # namespace for function randn global _namespace_randn_buffer_index global _namespace_num_randn_buffer_index cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__randn_buffer_index = _namespace['_randn_buffer_index'] _namespace_randn_buffer_index = _buf__randn_buffer_index.data _namespace_num_randn_buffer_index = len(_namespace['_randn_buffer_index']) _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] _var_sigma_noise_inh = _namespace["_var_sigma_noise_inh"] cdef double sigma_noise_inh = _namespace["sigma_noise_inh"] _var_tstep = _namespace["_var_tstep"] cdef double tstep = _namespace["tstep"] _var_ufarad = _namespace["_var_ufarad"] cdef double ufarad = _namespace["ufarad"] cdef double _lio_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:14:54,908 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name DG_inh_subexpression_update_codeobject 2021-11-05 15:14:54,908 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "DG_inh_stateupdate" using Cython module "_cython_magic_002cc82639c9a98d509d7c399e12af42" 2021-11-05 15:14:54,908 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140605144990960 on /home/nikos/.cython/brian_extensions/_cython_magic_002cc82639c9a98d509d7c399e12af42.lock 2021-11-05 15:14:54,908 DEBUG brian2.utils.filelock: Lock 140605144990960 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_002cc82639c9a98d509d7c399e12af42.lock 2021-11-05 15:14:54,909 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140605144990960 on /home/nikos/.cython/brian_extensions/_cython_magic_002cc82639c9a98d509d7c399e12af42.lock 2021-11-05 15:14:54,909 DEBUG brian2.utils.filelock: Lock 140605144990960 released on /home/nikos/.cython/brian_extensions/_cython_magic_002cc82639c9a98d509d7c399e12af42.lock 2021-11-05 15:14:54,909 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=DG_py, template name=stateupdate) for abstract code: noise = sigma_noise_exc*(2*(0.1e-3 * siemens ) / (1 * ufarad))**.5*randn()/sqrt(tstep) 2021-11-05 15:14:54,912 DIAGNOSTIC brian2.devices.device: DG_py_subexpression_update_codeobject abstract code: noise = sigma_noise_exc*(2*(0.1e-3 * siemens ) / (1 * ufarad))**.5*randn()/sqrt(tstep) 2021-11-05 15:14:54,913 DIAGNOSTIC brian2.devices.device: DG_py_subexpression_update_codeobject snippet (scalar): _lio_1 = (sigma_noise_exc * (((0.0002 * siemens) / ufarad) ** 0.5)) / sqrt(tstep) 2021-11-05 15:14:54,913 DIAGNOSTIC brian2.devices.device: DG_py_subexpression_update_codeobject snippet (vector): noise = _lio_1 * _randn(_vectorisation_idx) _array_DG_py_noise[_idx] = noise 2021-11-05 15:14:54,913 DIAGNOSTIC brian2.devices.device: DG_py_subexpression_update_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code cdef int64_t *_namespace_randn_buffer cdef int32_t *_namespace_randn_buffer_index cdef double _randn(int _idx): cdef double **buffer_pointer = _namespace_randn_buffer cdef double *buffer = buffer_pointer[0] cdef _numpy.ndarray _new_randn if(_namespace_randn_buffer_index[0] == 0): if buffer != NULL: free(buffer) _new_randn = _numpy.random.randn(20000) buffer = _numpy.PyArray_DATA(_new_randn) PyArray_CLEARFLAGS(<_numpy.PyArrayObject*>_new_randn, _numpy.NPY_OWNDATA) buffer_pointer[0] = buffer cdef double val = buffer[_namespace_randn_buffer_index[0]] _namespace_randn_buffer_index[0] += 1 if _namespace_randn_buffer_index[0] == 20000: _namespace_randn_buffer_index[0] = 0 return val # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var_N = _namespace["_var_N"] cdef int64_t N = _namespace["N"] _var_noise = _namespace["_var_noise"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_noise = _namespace['_array_DG_py_noise'] cdef double * _array_DG_py_noise = _buf__array_DG_py_noise.data cdef size_t _num_array_DG_py_noise = len(_namespace['_array_DG_py_noise']) cdef double noise # namespace for function randn global _namespace_randn_buffer global _namespace_num_randn_buffer cdef _numpy.ndarray[int64_t, ndim=1, mode='c'] _buf__randn_buffer = _namespace['_randn_buffer'] _namespace_randn_buffer = _buf__randn_buffer.data _namespace_num_randn_buffer = len(_namespace['_randn_buffer']) # namespace for function randn global _namespace_randn_buffer_index global _namespace_num_randn_buffer_index cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__randn_buffer_index = _namespace['_randn_buffer_index'] _namespace_randn_buffer_index = _buf__randn_buffer_index.data _namespace_num_randn_buffer_index = len(_namespace['_randn_buffer_index']) _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] _var_sigma_noise_exc = _namespace["_var_sigma_noise_exc"] cdef double sigma_noise_exc = _namespace["sigma_noise_exc"] _var_tstep = _namespace["_var_tstep"] cdef double tstep = _namespace["tstep"] _var_ufarad = _namespace["_var_ufarad"] cdef double ufarad = _namespace["ufarad"] cdef double _lio_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # scalar code _vectorisation_idx = 1 _lio_1 = (sigma_noise_exc * (((0.0002 * siemens) / ufarad) ** 0.5)) / sqrt(tstep) # vector code for _idx in range(N): _vectorisation_idx = _idx noise = _lio_1 * _randn(_vectorisation_idx) _array_DG_py_noise[_idx] = noise before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef int64_t N = _namespace["N"] _var_noise = _namespace["_var_noise"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_noise = _namespace['_array_DG_py_noise'] cdef double * _array_DG_py_noise = _buf__array_DG_py_noise.data cdef size_t _num_array_DG_py_noise = len(_namespace['_array_DG_py_noise']) cdef double noise # namespace for function randn global _namespace_randn_buffer global _namespace_num_randn_buffer cdef _numpy.ndarray[int64_t, ndim=1, mode='c'] _buf__randn_buffer = _namespace['_randn_buffer'] _namespace_randn_buffer = _buf__randn_buffer.data _namespace_num_randn_buffer = len(_namespace['_randn_buffer']) # namespace for function randn global _namespace_randn_buffer_index global _namespace_num_randn_buffer_index cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__randn_buffer_index = _namespace['_randn_buffer_index'] _namespace_randn_buffer_index = _buf__randn_buffer_index.data _namespace_num_randn_buffer_index = len(_namespace['_randn_buffer_index']) _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] _var_sigma_noise_exc = _namespace["_var_sigma_noise_exc"] cdef double sigma_noise_exc = _namespace["sigma_noise_exc"] _var_tstep = _namespace["_var_tstep"] cdef double tstep = _namespace["tstep"] _var_ufarad = _namespace["_var_ufarad"] cdef double ufarad = _namespace["ufarad"] cdef double _lio_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef int64_t N = _namespace["N"] _var_noise = _namespace["_var_noise"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_noise = _namespace['_array_DG_py_noise'] cdef double * _array_DG_py_noise = _buf__array_DG_py_noise.data cdef size_t _num_array_DG_py_noise = len(_namespace['_array_DG_py_noise']) cdef double noise # namespace for function randn global _namespace_randn_buffer global _namespace_num_randn_buffer cdef _numpy.ndarray[int64_t, ndim=1, mode='c'] _buf__randn_buffer = _namespace['_randn_buffer'] _namespace_randn_buffer = _buf__randn_buffer.data _namespace_num_randn_buffer = len(_namespace['_randn_buffer']) # namespace for function randn global _namespace_randn_buffer_index global _namespace_num_randn_buffer_index cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__randn_buffer_index = _namespace['_randn_buffer_index'] _namespace_randn_buffer_index = _buf__randn_buffer_index.data _namespace_num_randn_buffer_index = len(_namespace['_randn_buffer_index']) _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] _var_sigma_noise_exc = _namespace["_var_sigma_noise_exc"] cdef double sigma_noise_exc = _namespace["sigma_noise_exc"] _var_tstep = _namespace["_var_tstep"] cdef double tstep = _namespace["tstep"] _var_ufarad = _namespace["_var_ufarad"] cdef double ufarad = _namespace["ufarad"] cdef double _lio_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:14:54,913 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name DG_py_subexpression_update_codeobject 2021-11-05 15:14:54,913 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "DG_py_stateupdate" using Cython module "_cython_magic_18fd1d4cdd6afab02faf18f5b1546192" 2021-11-05 15:14:54,913 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140605146724432 on /home/nikos/.cython/brian_extensions/_cython_magic_18fd1d4cdd6afab02faf18f5b1546192.lock 2021-11-05 15:14:54,913 DEBUG brian2.utils.filelock: Lock 140605146724432 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_18fd1d4cdd6afab02faf18f5b1546192.lock 2021-11-05 15:14:54,914 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140605146724432 on /home/nikos/.cython/brian_extensions/_cython_magic_18fd1d4cdd6afab02faf18f5b1546192.lock 2021-11-05 15:14:54,914 DEBUG brian2.utils.filelock: Lock 140605146724432 released on /home/nikos/.cython/brian_extensions/_cython_magic_18fd1d4cdd6afab02faf18f5b1546192.lock 2021-11-05 15:14:54,914 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=EC_inh, template name=stateupdate) for abstract code: noise = sigma_noise_inh*(2*(0.1e-3 * siemens ) / (1 * ufarad))**.5 * randn() /sqrt(tstep) 2021-11-05 15:14:54,917 DIAGNOSTIC brian2.devices.device: EC_inh_subexpression_update_codeobject abstract code: noise = sigma_noise_inh*(2*(0.1e-3 * siemens ) / (1 * ufarad))**.5 * randn() /sqrt(tstep) 2021-11-05 15:14:54,919 DIAGNOSTIC brian2.devices.device: EC_inh_subexpression_update_codeobject snippet (scalar): _lio_1 = (sigma_noise_inh * (((0.0002 * siemens) / ufarad) ** 0.5)) / sqrt(tstep) 2021-11-05 15:14:54,919 DIAGNOSTIC brian2.devices.device: EC_inh_subexpression_update_codeobject snippet (vector): noise = _lio_1 * _randn(_vectorisation_idx) _array_EC_inh_noise[_idx] = noise 2021-11-05 15:14:54,919 DIAGNOSTIC brian2.devices.device: EC_inh_subexpression_update_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code cdef int64_t *_namespace_randn_buffer cdef int32_t *_namespace_randn_buffer_index cdef double _randn(int _idx): cdef double **buffer_pointer = _namespace_randn_buffer cdef double *buffer = buffer_pointer[0] cdef _numpy.ndarray _new_randn if(_namespace_randn_buffer_index[0] == 0): if buffer != NULL: free(buffer) _new_randn = _numpy.random.randn(20000) buffer = _numpy.PyArray_DATA(_new_randn) PyArray_CLEARFLAGS(<_numpy.PyArrayObject*>_new_randn, _numpy.NPY_OWNDATA) buffer_pointer[0] = buffer cdef double val = buffer[_namespace_randn_buffer_index[0]] _namespace_randn_buffer_index[0] += 1 if _namespace_randn_buffer_index[0] == 20000: _namespace_randn_buffer_index[0] = 0 return val # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var_N = _namespace["_var_N"] cdef int64_t N = _namespace["N"] _var_noise = _namespace["_var_noise"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_inh_noise = _namespace['_array_EC_inh_noise'] cdef double * _array_EC_inh_noise = _buf__array_EC_inh_noise.data cdef size_t _num_array_EC_inh_noise = len(_namespace['_array_EC_inh_noise']) cdef double noise # namespace for function randn global _namespace_randn_buffer global _namespace_num_randn_buffer cdef _numpy.ndarray[int64_t, ndim=1, mode='c'] _buf__randn_buffer = _namespace['_randn_buffer'] _namespace_randn_buffer = _buf__randn_buffer.data _namespace_num_randn_buffer = len(_namespace['_randn_buffer']) # namespace for function randn global _namespace_randn_buffer_index global _namespace_num_randn_buffer_index cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__randn_buffer_index = _namespace['_randn_buffer_index'] _namespace_randn_buffer_index = _buf__randn_buffer_index.data _namespace_num_randn_buffer_index = len(_namespace['_randn_buffer_index']) _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] _var_sigma_noise_inh = _namespace["_var_sigma_noise_inh"] cdef double sigma_noise_inh = _namespace["sigma_noise_inh"] _var_tstep = _namespace["_var_tstep"] cdef double tstep = _namespace["tstep"] _var_ufarad = _namespace["_var_ufarad"] cdef double ufarad = _namespace["ufarad"] cdef double _lio_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # scalar code _vectorisation_idx = 1 _lio_1 = (sigma_noise_inh * (((0.0002 * siemens) / ufarad) ** 0.5)) / sqrt(tstep) # vector code for _idx in range(N): _vectorisation_idx = _idx noise = _lio_1 * _randn(_vectorisation_idx) _array_EC_inh_noise[_idx] = noise before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef int64_t N = _namespace["N"] _var_noise = _namespace["_var_noise"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_inh_noise = _namespace['_array_EC_inh_noise'] cdef double * _array_EC_inh_noise = _buf__array_EC_inh_noise.data cdef size_t _num_array_EC_inh_noise = len(_namespace['_array_EC_inh_noise']) cdef double noise # namespace for function randn global _namespace_randn_buffer global _namespace_num_randn_buffer cdef _numpy.ndarray[int64_t, ndim=1, mode='c'] _buf__randn_buffer = _namespace['_randn_buffer'] _namespace_randn_buffer = _buf__randn_buffer.data _namespace_num_randn_buffer = len(_namespace['_randn_buffer']) # namespace for function randn global _namespace_randn_buffer_index global _namespace_num_randn_buffer_index cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__randn_buffer_index = _namespace['_randn_buffer_index'] _namespace_randn_buffer_index = _buf__randn_buffer_index.data _namespace_num_randn_buffer_index = len(_namespace['_randn_buffer_index']) _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] _var_sigma_noise_inh = _namespace["_var_sigma_noise_inh"] cdef double sigma_noise_inh = _namespace["sigma_noise_inh"] _var_tstep = _namespace["_var_tstep"] cdef double tstep = _namespace["tstep"] _var_ufarad = _namespace["_var_ufarad"] cdef double ufarad = _namespace["ufarad"] cdef double _lio_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef int64_t N = _namespace["N"] _var_noise = _namespace["_var_noise"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_inh_noise = _namespace['_array_EC_inh_noise'] cdef double * _array_EC_inh_noise = _buf__array_EC_inh_noise.data cdef size_t _num_array_EC_inh_noise = len(_namespace['_array_EC_inh_noise']) cdef double noise # namespace for function randn global _namespace_randn_buffer global _namespace_num_randn_buffer cdef _numpy.ndarray[int64_t, ndim=1, mode='c'] _buf__randn_buffer = _namespace['_randn_buffer'] _namespace_randn_buffer = _buf__randn_buffer.data _namespace_num_randn_buffer = len(_namespace['_randn_buffer']) # namespace for function randn global _namespace_randn_buffer_index global _namespace_num_randn_buffer_index cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__randn_buffer_index = _namespace['_randn_buffer_index'] _namespace_randn_buffer_index = _buf__randn_buffer_index.data _namespace_num_randn_buffer_index = len(_namespace['_randn_buffer_index']) _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] _var_sigma_noise_inh = _namespace["_var_sigma_noise_inh"] cdef double sigma_noise_inh = _namespace["sigma_noise_inh"] _var_tstep = _namespace["_var_tstep"] cdef double tstep = _namespace["tstep"] _var_ufarad = _namespace["_var_ufarad"] cdef double ufarad = _namespace["ufarad"] cdef double _lio_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:14:54,919 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name EC_inh_subexpression_update_codeobject 2021-11-05 15:14:54,920 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "EC_inh_stateupdate" using Cython module "_cython_magic_a2dc530a353c75c69cca65387741d0e4" 2021-11-05 15:14:54,920 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140605144955440 on /home/nikos/.cython/brian_extensions/_cython_magic_a2dc530a353c75c69cca65387741d0e4.lock 2021-11-05 15:14:54,920 DEBUG brian2.utils.filelock: Lock 140605144955440 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_a2dc530a353c75c69cca65387741d0e4.lock 2021-11-05 15:14:54,920 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140605144955440 on /home/nikos/.cython/brian_extensions/_cython_magic_a2dc530a353c75c69cca65387741d0e4.lock 2021-11-05 15:14:54,920 DEBUG brian2.utils.filelock: Lock 140605144955440 released on /home/nikos/.cython/brian_extensions/_cython_magic_a2dc530a353c75c69cca65387741d0e4.lock 2021-11-05 15:14:54,920 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=EC_pyCAN, template name=stateupdate) for abstract code: noise = sigma_noise_exc*(2*(0.1e-3 * siemens ) / (1 * ufarad))**.5*randn()/sqrt(tstep) 2021-11-05 15:14:54,924 DIAGNOSTIC brian2.devices.device: EC_pyCAN_subexpression_update_codeobject abstract code: noise = sigma_noise_exc*(2*(0.1e-3 * siemens ) / (1 * ufarad))**.5*randn()/sqrt(tstep) 2021-11-05 15:14:54,924 DIAGNOSTIC brian2.devices.device: EC_pyCAN_subexpression_update_codeobject snippet (scalar): _lio_1 = (sigma_noise_exc * (((0.0002 * siemens) / ufarad) ** 0.5)) / sqrt(tstep) 2021-11-05 15:14:54,924 DIAGNOSTIC brian2.devices.device: EC_pyCAN_subexpression_update_codeobject snippet (vector): noise = _lio_1 * _randn(_vectorisation_idx) _array_EC_pyCAN_noise[_idx] = noise 2021-11-05 15:14:54,924 DIAGNOSTIC brian2.devices.device: EC_pyCAN_subexpression_update_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code cdef int64_t *_namespace_randn_buffer cdef int32_t *_namespace_randn_buffer_index cdef double _randn(int _idx): cdef double **buffer_pointer = _namespace_randn_buffer cdef double *buffer = buffer_pointer[0] cdef _numpy.ndarray _new_randn if(_namespace_randn_buffer_index[0] == 0): if buffer != NULL: free(buffer) _new_randn = _numpy.random.randn(20000) buffer = _numpy.PyArray_DATA(_new_randn) PyArray_CLEARFLAGS(<_numpy.PyArrayObject*>_new_randn, _numpy.NPY_OWNDATA) buffer_pointer[0] = buffer cdef double val = buffer[_namespace_randn_buffer_index[0]] _namespace_randn_buffer_index[0] += 1 if _namespace_randn_buffer_index[0] == 20000: _namespace_randn_buffer_index[0] = 0 return val # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var_N = _namespace["_var_N"] cdef int64_t N = _namespace["N"] _var_noise = _namespace["_var_noise"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_noise = _namespace['_array_EC_pyCAN_noise'] cdef double * _array_EC_pyCAN_noise = _buf__array_EC_pyCAN_noise.data cdef size_t _num_array_EC_pyCAN_noise = len(_namespace['_array_EC_pyCAN_noise']) cdef double noise # namespace for function randn global _namespace_randn_buffer global _namespace_num_randn_buffer cdef _numpy.ndarray[int64_t, ndim=1, mode='c'] _buf__randn_buffer = _namespace['_randn_buffer'] _namespace_randn_buffer = _buf__randn_buffer.data _namespace_num_randn_buffer = len(_namespace['_randn_buffer']) # namespace for function randn global _namespace_randn_buffer_index global _namespace_num_randn_buffer_index cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__randn_buffer_index = _namespace['_randn_buffer_index'] _namespace_randn_buffer_index = _buf__randn_buffer_index.data _namespace_num_randn_buffer_index = len(_namespace['_randn_buffer_index']) _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] _var_sigma_noise_exc = _namespace["_var_sigma_noise_exc"] cdef double sigma_noise_exc = _namespace["sigma_noise_exc"] _var_tstep = _namespace["_var_tstep"] cdef double tstep = _namespace["tstep"] _var_ufarad = _namespace["_var_ufarad"] cdef double ufarad = _namespace["ufarad"] cdef double _lio_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # scalar code _vectorisation_idx = 1 _lio_1 = (sigma_noise_exc * (((0.0002 * siemens) / ufarad) ** 0.5)) / sqrt(tstep) # vector code for _idx in range(N): _vectorisation_idx = _idx noise = _lio_1 * _randn(_vectorisation_idx) _array_EC_pyCAN_noise[_idx] = noise before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef int64_t N = _namespace["N"] _var_noise = _namespace["_var_noise"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_noise = _namespace['_array_EC_pyCAN_noise'] cdef double * _array_EC_pyCAN_noise = _buf__array_EC_pyCAN_noise.data cdef size_t _num_array_EC_pyCAN_noise = len(_namespace['_array_EC_pyCAN_noise']) cdef double noise # namespace for function randn global _namespace_randn_buffer global _namespace_num_randn_buffer cdef _numpy.ndarray[int64_t, ndim=1, mode='c'] _buf__randn_buffer = _namespace['_randn_buffer'] _namespace_randn_buffer = _buf__randn_buffer.data _namespace_num_randn_buffer = len(_namespace['_randn_buffer']) # namespace for function randn global _namespace_randn_buffer_index global _namespace_num_randn_buffer_index cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__randn_buffer_index = _namespace['_randn_buffer_index'] _namespace_randn_buffer_index = _buf__randn_buffer_index.data _namespace_num_randn_buffer_index = len(_namespace['_randn_buffer_index']) _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] _var_sigma_noise_exc = _namespace["_var_sigma_noise_exc"] cdef double sigma_noise_exc = _namespace["sigma_noise_exc"] _var_tstep = _namespace["_var_tstep"] cdef double tstep = _namespace["tstep"] _var_ufarad = _namespace["_var_ufarad"] cdef double ufarad = _namespace["ufarad"] cdef double _lio_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef int64_t N = _namespace["N"] _var_noise = _namespace["_var_noise"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_noise = _namespace['_array_EC_pyCAN_noise'] cdef double * _array_EC_pyCAN_noise = _buf__array_EC_pyCAN_noise.data cdef size_t _num_array_EC_pyCAN_noise = len(_namespace['_array_EC_pyCAN_noise']) cdef double noise # namespace for function randn global _namespace_randn_buffer global _namespace_num_randn_buffer cdef _numpy.ndarray[int64_t, ndim=1, mode='c'] _buf__randn_buffer = _namespace['_randn_buffer'] _namespace_randn_buffer = _buf__randn_buffer.data _namespace_num_randn_buffer = len(_namespace['_randn_buffer']) # namespace for function randn global _namespace_randn_buffer_index global _namespace_num_randn_buffer_index cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__randn_buffer_index = _namespace['_randn_buffer_index'] _namespace_randn_buffer_index = _buf__randn_buffer_index.data _namespace_num_randn_buffer_index = len(_namespace['_randn_buffer_index']) _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] _var_sigma_noise_exc = _namespace["_var_sigma_noise_exc"] cdef double sigma_noise_exc = _namespace["sigma_noise_exc"] _var_tstep = _namespace["_var_tstep"] cdef double tstep = _namespace["tstep"] _var_ufarad = _namespace["_var_ufarad"] cdef double ufarad = _namespace["ufarad"] cdef double _lio_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:14:54,924 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name EC_pyCAN_subexpression_update_codeobject 2021-11-05 15:14:54,925 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "EC_pyCAN_stateupdate" using Cython module "_cython_magic_565121e04495bdee94cb0eebf803542b" 2021-11-05 15:14:54,925 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140605146682224 on /home/nikos/.cython/brian_extensions/_cython_magic_565121e04495bdee94cb0eebf803542b.lock 2021-11-05 15:14:54,925 DEBUG brian2.utils.filelock: Lock 140605146682224 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_565121e04495bdee94cb0eebf803542b.lock 2021-11-05 15:14:54,925 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140605146682224 on /home/nikos/.cython/brian_extensions/_cython_magic_565121e04495bdee94cb0eebf803542b.lock 2021-11-05 15:14:54,925 DEBUG brian2.utils.filelock: Lock 140605146682224 released on /home/nikos/.cython/brian_extensions/_cython_magic_565121e04495bdee94cb0eebf803542b.lock 2021-11-05 15:14:54,966 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=statemonitor, template name=statemonitor) for abstract code: _to_record_v = _source_v _to_record_m = _source_m _to_record_n = _source_n _to_record_h = _source_h 2021-11-05 15:14:54,971 DIAGNOSTIC brian2.devices.device: statemonitor_codeobject abstract code: _to_record_v = _source_v _to_record_m = _source_m _to_record_n = _source_n _to_record_h = _source_h 2021-11-05 15:14:54,972 DIAGNOSTIC brian2.devices.device: statemonitor_codeobject snippet (scalar): 2021-11-05 15:14:54,972 DIAGNOSTIC brian2.devices.device: statemonitor_codeobject snippet (vector): _source_n = _array_EC_pyCAN_n[_idx] _source_v = _array_EC_pyCAN_v[_idx] _source_m = _array_EC_pyCAN_m[_idx] _source_h = _array_EC_pyCAN_h[_idx] _to_record_v = _source_v _to_record_m = _source_m _to_record_n = _source_n _to_record_h = _source_h 2021-11-05 15:14:54,973 DIAGNOSTIC brian2.devices.device: statemonitor_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_statemonitor_N = _namespace['_array_statemonitor_N'] cdef int32_t * _array_statemonitor_N = _buf__array_statemonitor_N.data cdef int32_t N _var__clock_t = _namespace["_var__clock_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double _clock_t _var__indices = _namespace["_var__indices"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_statemonitor__indices = _namespace['_array_statemonitor__indices'] cdef int32_t * _array_statemonitor__indices = _buf__array_statemonitor__indices.data cdef size_t _num_array_statemonitor__indices = len(_namespace['_array_statemonitor__indices']) cdef int32_t _indices _var__source_h = _namespace["_var__source_h"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_h = _namespace['_array_EC_pyCAN_h'] cdef double * _array_EC_pyCAN_h = _buf__array_EC_pyCAN_h.data cdef size_t _num_array_EC_pyCAN_h = len(_namespace['_array_EC_pyCAN_h']) cdef double _source_h _var__source_m = _namespace["_var__source_m"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_m = _namespace['_array_EC_pyCAN_m'] cdef double * _array_EC_pyCAN_m = _buf__array_EC_pyCAN_m.data cdef size_t _num_array_EC_pyCAN_m = len(_namespace['_array_EC_pyCAN_m']) cdef double _source_m _var__source_n = _namespace["_var__source_n"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_n = _namespace['_array_EC_pyCAN_n'] cdef double * _array_EC_pyCAN_n = _buf__array_EC_pyCAN_n.data cdef size_t _num_array_EC_pyCAN_n = len(_namespace['_array_EC_pyCAN_n']) cdef double _source_n _var__source_v = _namespace["_var__source_v"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_v = _namespace['_array_EC_pyCAN_v'] cdef double * _array_EC_pyCAN_v = _buf__array_EC_pyCAN_v.data cdef size_t _num_array_EC_pyCAN_v = len(_namespace['_array_EC_pyCAN_v']) cdef double _source_v cdef double _to_record_h cdef double _to_record_m cdef double _to_record_n cdef double _to_record_v _var_h = _namespace["_var_h"] _dynamic_array_statemonitor_h = _namespace["_dynamic_array_statemonitor_h"] _var_m = _namespace["_var_m"] _dynamic_array_statemonitor_m = _namespace["_dynamic_array_statemonitor_m"] _var_n = _namespace["_var_n"] _dynamic_array_statemonitor_n = _namespace["_dynamic_array_statemonitor_n"] _var_t = _namespace["_var_t"] _dynamic_array_statemonitor_t = _namespace["_dynamic_array_statemonitor_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_statemonitor_t = _namespace['_array_statemonitor_t'] cdef double * _array_statemonitor_t = _buf__array_statemonitor_t.data cdef size_t _num_array_statemonitor_t = len(_namespace['_array_statemonitor_t']) cdef double t _var_v = _namespace["_var_v"] _dynamic_array_statemonitor_v = _namespace["_dynamic_array_statemonitor_v"] if '_owner' in _namespace: _owner = _namespace['_owner'] cdef size_t _new_len = _array_statemonitor_N[0] + 1 # Resize the recorded times _var_t.resize(_new_len) _dynamic_array_statemonitor_t[_new_len-1] = _array_defaultclock_t[0] # scalar code _vectorisation_idx = 1 cdef size_t _i # Resize the recorded variable "h" and get the (potentially # changed) reference to the underlying data _var_h.resize((_new_len, _num_array_statemonitor__indices)) cdef _numpy.ndarray[double, ndim=2, mode='c'] _record_buf_h = _dynamic_array_statemonitor_h.data cdef double* _record_data_h = _record_buf_h.data for _i in range(_num_array_statemonitor__indices): # vector code _idx = _array_statemonitor__indices[_i] _vectorisation_idx = _idx _source_n = _array_EC_pyCAN_n[_idx] _source_v = _array_EC_pyCAN_v[_idx] _source_m = _array_EC_pyCAN_m[_idx] _source_h = _array_EC_pyCAN_h[_idx] _to_record_v = _source_v _to_record_m = _source_m _to_record_n = _source_n _to_record_h = _source_h _record_data_h[(_new_len-1)*_num_array_statemonitor__indices + _i] = _to_record_h # Resize the recorded variable "m" and get the (potentially # changed) reference to the underlying data _var_m.resize((_new_len, _num_array_statemonitor__indices)) cdef _numpy.ndarray[double, ndim=2, mode='c'] _record_buf_m = _dynamic_array_statemonitor_m.data cdef double* _record_data_m = _record_buf_m.data for _i in range(_num_array_statemonitor__indices): # vector code _idx = _array_statemonitor__indices[_i] _vectorisation_idx = _idx _source_n = _array_EC_pyCAN_n[_idx] _source_v = _array_EC_pyCAN_v[_idx] _source_m = _array_EC_pyCAN_m[_idx] _source_h = _array_EC_pyCAN_h[_idx] _to_record_v = _source_v _to_record_m = _source_m _to_record_n = _source_n _to_record_h = _source_h _record_data_m[(_new_len-1)*_num_array_statemonitor__indices + _i] = _to_record_m # Resize the recorded variable "n" and get the (potentially # changed) reference to the underlying data _var_n.resize((_new_len, _num_array_statemonitor__indices)) cdef _numpy.ndarray[double, ndim=2, mode='c'] _record_buf_n = _dynamic_array_statemonitor_n.data cdef double* _record_data_n = _record_buf_n.data for _i in range(_num_array_statemonitor__indices): # vector code _idx = _array_statemonitor__indices[_i] _vectorisation_idx = _idx _source_n = _array_EC_pyCAN_n[_idx] _source_v = _array_EC_pyCAN_v[_idx] _source_m = _array_EC_pyCAN_m[_idx] _source_h = _array_EC_pyCAN_h[_idx] _to_record_v = _source_v _to_record_m = _source_m _to_record_n = _source_n _to_record_h = _source_h _record_data_n[(_new_len-1)*_num_array_statemonitor__indices + _i] = _to_record_n # Resize the recorded variable "v" and get the (potentially # changed) reference to the underlying data _var_v.resize((_new_len, _num_array_statemonitor__indices)) cdef _numpy.ndarray[double, ndim=2, mode='c'] _record_buf_v = _dynamic_array_statemonitor_v.data cdef double* _record_data_v = _record_buf_v.data for _i in range(_num_array_statemonitor__indices): # vector code _idx = _array_statemonitor__indices[_i] _vectorisation_idx = _idx _source_n = _array_EC_pyCAN_n[_idx] _source_v = _array_EC_pyCAN_v[_idx] _source_m = _array_EC_pyCAN_m[_idx] _source_h = _array_EC_pyCAN_h[_idx] _to_record_v = _source_v _to_record_m = _source_m _to_record_n = _source_n _to_record_h = _source_h _record_data_v[(_new_len-1)*_num_array_statemonitor__indices + _i] = _to_record_v # set the N variable explicitly (since we do not call `StateMonitor.resize`) _array_statemonitor_N[0] = _new_len before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_statemonitor_N = _namespace['_array_statemonitor_N'] cdef int32_t * _array_statemonitor_N = _buf__array_statemonitor_N.data cdef int32_t N _var__clock_t = _namespace["_var__clock_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double _clock_t _var__indices = _namespace["_var__indices"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_statemonitor__indices = _namespace['_array_statemonitor__indices'] cdef int32_t * _array_statemonitor__indices = _buf__array_statemonitor__indices.data cdef size_t _num_array_statemonitor__indices = len(_namespace['_array_statemonitor__indices']) cdef int32_t _indices _var__source_h = _namespace["_var__source_h"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_h = _namespace['_array_EC_pyCAN_h'] cdef double * _array_EC_pyCAN_h = _buf__array_EC_pyCAN_h.data cdef size_t _num_array_EC_pyCAN_h = len(_namespace['_array_EC_pyCAN_h']) cdef double _source_h _var__source_m = _namespace["_var__source_m"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_m = _namespace['_array_EC_pyCAN_m'] cdef double * _array_EC_pyCAN_m = _buf__array_EC_pyCAN_m.data cdef size_t _num_array_EC_pyCAN_m = len(_namespace['_array_EC_pyCAN_m']) cdef double _source_m _var__source_n = _namespace["_var__source_n"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_n = _namespace['_array_EC_pyCAN_n'] cdef double * _array_EC_pyCAN_n = _buf__array_EC_pyCAN_n.data cdef size_t _num_array_EC_pyCAN_n = len(_namespace['_array_EC_pyCAN_n']) cdef double _source_n _var__source_v = _namespace["_var__source_v"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_v = _namespace['_array_EC_pyCAN_v'] cdef double * _array_EC_pyCAN_v = _buf__array_EC_pyCAN_v.data cdef size_t _num_array_EC_pyCAN_v = len(_namespace['_array_EC_pyCAN_v']) cdef double _source_v cdef double _to_record_h cdef double _to_record_m cdef double _to_record_n cdef double _to_record_v _var_h = _namespace["_var_h"] _dynamic_array_statemonitor_h = _namespace["_dynamic_array_statemonitor_h"] _var_m = _namespace["_var_m"] _dynamic_array_statemonitor_m = _namespace["_dynamic_array_statemonitor_m"] _var_n = _namespace["_var_n"] _dynamic_array_statemonitor_n = _namespace["_dynamic_array_statemonitor_n"] _var_t = _namespace["_var_t"] _dynamic_array_statemonitor_t = _namespace["_dynamic_array_statemonitor_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_statemonitor_t = _namespace['_array_statemonitor_t'] cdef double * _array_statemonitor_t = _buf__array_statemonitor_t.data cdef size_t _num_array_statemonitor_t = len(_namespace['_array_statemonitor_t']) cdef double t _var_v = _namespace["_var_v"] _dynamic_array_statemonitor_v = _namespace["_dynamic_array_statemonitor_v"] if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_statemonitor_N = _namespace['_array_statemonitor_N'] cdef int32_t * _array_statemonitor_N = _buf__array_statemonitor_N.data cdef int32_t N _var__clock_t = _namespace["_var__clock_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double _clock_t _var__indices = _namespace["_var__indices"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_statemonitor__indices = _namespace['_array_statemonitor__indices'] cdef int32_t * _array_statemonitor__indices = _buf__array_statemonitor__indices.data cdef size_t _num_array_statemonitor__indices = len(_namespace['_array_statemonitor__indices']) cdef int32_t _indices _var__source_h = _namespace["_var__source_h"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_h = _namespace['_array_EC_pyCAN_h'] cdef double * _array_EC_pyCAN_h = _buf__array_EC_pyCAN_h.data cdef size_t _num_array_EC_pyCAN_h = len(_namespace['_array_EC_pyCAN_h']) cdef double _source_h _var__source_m = _namespace["_var__source_m"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_m = _namespace['_array_EC_pyCAN_m'] cdef double * _array_EC_pyCAN_m = _buf__array_EC_pyCAN_m.data cdef size_t _num_array_EC_pyCAN_m = len(_namespace['_array_EC_pyCAN_m']) cdef double _source_m _var__source_n = _namespace["_var__source_n"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_n = _namespace['_array_EC_pyCAN_n'] cdef double * _array_EC_pyCAN_n = _buf__array_EC_pyCAN_n.data cdef size_t _num_array_EC_pyCAN_n = len(_namespace['_array_EC_pyCAN_n']) cdef double _source_n _var__source_v = _namespace["_var__source_v"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_v = _namespace['_array_EC_pyCAN_v'] cdef double * _array_EC_pyCAN_v = _buf__array_EC_pyCAN_v.data cdef size_t _num_array_EC_pyCAN_v = len(_namespace['_array_EC_pyCAN_v']) cdef double _source_v cdef double _to_record_h cdef double _to_record_m cdef double _to_record_n cdef double _to_record_v _var_h = _namespace["_var_h"] _dynamic_array_statemonitor_h = _namespace["_dynamic_array_statemonitor_h"] _var_m = _namespace["_var_m"] _dynamic_array_statemonitor_m = _namespace["_dynamic_array_statemonitor_m"] _var_n = _namespace["_var_n"] _dynamic_array_statemonitor_n = _namespace["_dynamic_array_statemonitor_n"] _var_t = _namespace["_var_t"] _dynamic_array_statemonitor_t = _namespace["_dynamic_array_statemonitor_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_statemonitor_t = _namespace['_array_statemonitor_t'] cdef double * _array_statemonitor_t = _buf__array_statemonitor_t.data cdef size_t _num_array_statemonitor_t = len(_namespace['_array_statemonitor_t']) cdef double t _var_v = _namespace["_var_v"] _dynamic_array_statemonitor_v = _namespace["_dynamic_array_statemonitor_v"] if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:14:54,973 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name statemonitor_codeobject 2021-11-05 15:14:54,974 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "statemonitor_statemonitor" using Cython module "_cython_magic_512fe12f8a13b173cc763fa3dd493a1e" 2021-11-05 15:14:54,974 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140605144620672 on /home/nikos/.cython/brian_extensions/_cython_magic_512fe12f8a13b173cc763fa3dd493a1e.lock 2021-11-05 15:14:54,974 DEBUG brian2.utils.filelock: Lock 140605144620672 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_512fe12f8a13b173cc763fa3dd493a1e.lock 2021-11-05 15:14:56,303 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140605144620672 on /home/nikos/.cython/brian_extensions/_cython_magic_512fe12f8a13b173cc763fa3dd493a1e.lock 2021-11-05 15:14:56,303 DEBUG brian2.utils.filelock: Lock 140605144620672 released on /home/nikos/.cython/brian_extensions/_cython_magic_512fe12f8a13b173cc763fa3dd493a1e.lock 2021-11-05 15:14:56,303 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=statemonitor_1, template name=statemonitor) for abstract code: _to_record_v = _source_v _to_record_m = _source_m _to_record_n = _source_n _to_record_h = _source_h 2021-11-05 15:14:56,305 DIAGNOSTIC brian2.devices.device: statemonitor_1_codeobject abstract code: _to_record_v = _source_v _to_record_m = _source_m _to_record_n = _source_n _to_record_h = _source_h 2021-11-05 15:14:56,305 DIAGNOSTIC brian2.devices.device: statemonitor_1_codeobject snippet (scalar): 2021-11-05 15:14:56,306 DIAGNOSTIC brian2.devices.device: statemonitor_1_codeobject snippet (vector): _source_n = _array_DG_py_n[_idx] _source_v = _array_DG_py_v[_idx] _source_m = _array_DG_py_m[_idx] _source_h = _array_DG_py_h[_idx] _to_record_v = _source_v _to_record_m = _source_m _to_record_n = _source_n _to_record_h = _source_h 2021-11-05 15:14:56,306 DIAGNOSTIC brian2.devices.device: statemonitor_1_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_statemonitor_1_N = _namespace['_array_statemonitor_1_N'] cdef int32_t * _array_statemonitor_1_N = _buf__array_statemonitor_1_N.data cdef int32_t N _var__clock_t = _namespace["_var__clock_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double _clock_t _var__indices = _namespace["_var__indices"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_statemonitor_1__indices = _namespace['_array_statemonitor_1__indices'] cdef int32_t * _array_statemonitor_1__indices = _buf__array_statemonitor_1__indices.data cdef size_t _num_array_statemonitor_1__indices = len(_namespace['_array_statemonitor_1__indices']) cdef int32_t _indices _var__source_h = _namespace["_var__source_h"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_h = _namespace['_array_DG_py_h'] cdef double * _array_DG_py_h = _buf__array_DG_py_h.data cdef size_t _num_array_DG_py_h = len(_namespace['_array_DG_py_h']) cdef double _source_h _var__source_m = _namespace["_var__source_m"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_m = _namespace['_array_DG_py_m'] cdef double * _array_DG_py_m = _buf__array_DG_py_m.data cdef size_t _num_array_DG_py_m = len(_namespace['_array_DG_py_m']) cdef double _source_m _var__source_n = _namespace["_var__source_n"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_n = _namespace['_array_DG_py_n'] cdef double * _array_DG_py_n = _buf__array_DG_py_n.data cdef size_t _num_array_DG_py_n = len(_namespace['_array_DG_py_n']) cdef double _source_n _var__source_v = _namespace["_var__source_v"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_v = _namespace['_array_DG_py_v'] cdef double * _array_DG_py_v = _buf__array_DG_py_v.data cdef size_t _num_array_DG_py_v = len(_namespace['_array_DG_py_v']) cdef double _source_v cdef double _to_record_h cdef double _to_record_m cdef double _to_record_n cdef double _to_record_v _var_h = _namespace["_var_h"] _dynamic_array_statemonitor_1_h = _namespace["_dynamic_array_statemonitor_1_h"] _var_m = _namespace["_var_m"] _dynamic_array_statemonitor_1_m = _namespace["_dynamic_array_statemonitor_1_m"] _var_n = _namespace["_var_n"] _dynamic_array_statemonitor_1_n = _namespace["_dynamic_array_statemonitor_1_n"] _var_t = _namespace["_var_t"] _dynamic_array_statemonitor_1_t = _namespace["_dynamic_array_statemonitor_1_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_statemonitor_1_t = _namespace['_array_statemonitor_1_t'] cdef double * _array_statemonitor_1_t = _buf__array_statemonitor_1_t.data cdef size_t _num_array_statemonitor_1_t = len(_namespace['_array_statemonitor_1_t']) cdef double t _var_v = _namespace["_var_v"] _dynamic_array_statemonitor_1_v = _namespace["_dynamic_array_statemonitor_1_v"] if '_owner' in _namespace: _owner = _namespace['_owner'] cdef size_t _new_len = _array_statemonitor_1_N[0] + 1 # Resize the recorded times _var_t.resize(_new_len) _dynamic_array_statemonitor_1_t[_new_len-1] = _array_defaultclock_t[0] # scalar code _vectorisation_idx = 1 cdef size_t _i # Resize the recorded variable "h" and get the (potentially # changed) reference to the underlying data _var_h.resize((_new_len, _num_array_statemonitor_1__indices)) cdef _numpy.ndarray[double, ndim=2, mode='c'] _record_buf_h = _dynamic_array_statemonitor_1_h.data cdef double* _record_data_h = _record_buf_h.data for _i in range(_num_array_statemonitor_1__indices): # vector code _idx = _array_statemonitor_1__indices[_i] _vectorisation_idx = _idx _source_n = _array_DG_py_n[_idx] _source_v = _array_DG_py_v[_idx] _source_m = _array_DG_py_m[_idx] _source_h = _array_DG_py_h[_idx] _to_record_v = _source_v _to_record_m = _source_m _to_record_n = _source_n _to_record_h = _source_h _record_data_h[(_new_len-1)*_num_array_statemonitor_1__indices + _i] = _to_record_h # Resize the recorded variable "m" and get the (potentially # changed) reference to the underlying data _var_m.resize((_new_len, _num_array_statemonitor_1__indices)) cdef _numpy.ndarray[double, ndim=2, mode='c'] _record_buf_m = _dynamic_array_statemonitor_1_m.data cdef double* _record_data_m = _record_buf_m.data for _i in range(_num_array_statemonitor_1__indices): # vector code _idx = _array_statemonitor_1__indices[_i] _vectorisation_idx = _idx _source_n = _array_DG_py_n[_idx] _source_v = _array_DG_py_v[_idx] _source_m = _array_DG_py_m[_idx] _source_h = _array_DG_py_h[_idx] _to_record_v = _source_v _to_record_m = _source_m _to_record_n = _source_n _to_record_h = _source_h _record_data_m[(_new_len-1)*_num_array_statemonitor_1__indices + _i] = _to_record_m # Resize the recorded variable "n" and get the (potentially # changed) reference to the underlying data _var_n.resize((_new_len, _num_array_statemonitor_1__indices)) cdef _numpy.ndarray[double, ndim=2, mode='c'] _record_buf_n = _dynamic_array_statemonitor_1_n.data cdef double* _record_data_n = _record_buf_n.data for _i in range(_num_array_statemonitor_1__indices): # vector code _idx = _array_statemonitor_1__indices[_i] _vectorisation_idx = _idx _source_n = _array_DG_py_n[_idx] _source_v = _array_DG_py_v[_idx] _source_m = _array_DG_py_m[_idx] _source_h = _array_DG_py_h[_idx] _to_record_v = _source_v _to_record_m = _source_m _to_record_n = _source_n _to_record_h = _source_h _record_data_n[(_new_len-1)*_num_array_statemonitor_1__indices + _i] = _to_record_n # Resize the recorded variable "v" and get the (potentially # changed) reference to the underlying data _var_v.resize((_new_len, _num_array_statemonitor_1__indices)) cdef _numpy.ndarray[double, ndim=2, mode='c'] _record_buf_v = _dynamic_array_statemonitor_1_v.data cdef double* _record_data_v = _record_buf_v.data for _i in range(_num_array_statemonitor_1__indices): # vector code _idx = _array_statemonitor_1__indices[_i] _vectorisation_idx = _idx _source_n = _array_DG_py_n[_idx] _source_v = _array_DG_py_v[_idx] _source_m = _array_DG_py_m[_idx] _source_h = _array_DG_py_h[_idx] _to_record_v = _source_v _to_record_m = _source_m _to_record_n = _source_n _to_record_h = _source_h _record_data_v[(_new_len-1)*_num_array_statemonitor_1__indices + _i] = _to_record_v # set the N variable explicitly (since we do not call `StateMonitor.resize`) _array_statemonitor_1_N[0] = _new_len before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_statemonitor_1_N = _namespace['_array_statemonitor_1_N'] cdef int32_t * _array_statemonitor_1_N = _buf__array_statemonitor_1_N.data cdef int32_t N _var__clock_t = _namespace["_var__clock_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double _clock_t _var__indices = _namespace["_var__indices"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_statemonitor_1__indices = _namespace['_array_statemonitor_1__indices'] cdef int32_t * _array_statemonitor_1__indices = _buf__array_statemonitor_1__indices.data cdef size_t _num_array_statemonitor_1__indices = len(_namespace['_array_statemonitor_1__indices']) cdef int32_t _indices _var__source_h = _namespace["_var__source_h"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_h = _namespace['_array_DG_py_h'] cdef double * _array_DG_py_h = _buf__array_DG_py_h.data cdef size_t _num_array_DG_py_h = len(_namespace['_array_DG_py_h']) cdef double _source_h _var__source_m = _namespace["_var__source_m"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_m = _namespace['_array_DG_py_m'] cdef double * _array_DG_py_m = _buf__array_DG_py_m.data cdef size_t _num_array_DG_py_m = len(_namespace['_array_DG_py_m']) cdef double _source_m _var__source_n = _namespace["_var__source_n"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_n = _namespace['_array_DG_py_n'] cdef double * _array_DG_py_n = _buf__array_DG_py_n.data cdef size_t _num_array_DG_py_n = len(_namespace['_array_DG_py_n']) cdef double _source_n _var__source_v = _namespace["_var__source_v"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_v = _namespace['_array_DG_py_v'] cdef double * _array_DG_py_v = _buf__array_DG_py_v.data cdef size_t _num_array_DG_py_v = len(_namespace['_array_DG_py_v']) cdef double _source_v cdef double _to_record_h cdef double _to_record_m cdef double _to_record_n cdef double _to_record_v _var_h = _namespace["_var_h"] _dynamic_array_statemonitor_1_h = _namespace["_dynamic_array_statemonitor_1_h"] _var_m = _namespace["_var_m"] _dynamic_array_statemonitor_1_m = _namespace["_dynamic_array_statemonitor_1_m"] _var_n = _namespace["_var_n"] _dynamic_array_statemonitor_1_n = _namespace["_dynamic_array_statemonitor_1_n"] _var_t = _namespace["_var_t"] _dynamic_array_statemonitor_1_t = _namespace["_dynamic_array_statemonitor_1_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_statemonitor_1_t = _namespace['_array_statemonitor_1_t'] cdef double * _array_statemonitor_1_t = _buf__array_statemonitor_1_t.data cdef size_t _num_array_statemonitor_1_t = len(_namespace['_array_statemonitor_1_t']) cdef double t _var_v = _namespace["_var_v"] _dynamic_array_statemonitor_1_v = _namespace["_dynamic_array_statemonitor_1_v"] if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_statemonitor_1_N = _namespace['_array_statemonitor_1_N'] cdef int32_t * _array_statemonitor_1_N = _buf__array_statemonitor_1_N.data cdef int32_t N _var__clock_t = _namespace["_var__clock_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double _clock_t _var__indices = _namespace["_var__indices"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_statemonitor_1__indices = _namespace['_array_statemonitor_1__indices'] cdef int32_t * _array_statemonitor_1__indices = _buf__array_statemonitor_1__indices.data cdef size_t _num_array_statemonitor_1__indices = len(_namespace['_array_statemonitor_1__indices']) cdef int32_t _indices _var__source_h = _namespace["_var__source_h"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_h = _namespace['_array_DG_py_h'] cdef double * _array_DG_py_h = _buf__array_DG_py_h.data cdef size_t _num_array_DG_py_h = len(_namespace['_array_DG_py_h']) cdef double _source_h _var__source_m = _namespace["_var__source_m"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_m = _namespace['_array_DG_py_m'] cdef double * _array_DG_py_m = _buf__array_DG_py_m.data cdef size_t _num_array_DG_py_m = len(_namespace['_array_DG_py_m']) cdef double _source_m _var__source_n = _namespace["_var__source_n"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_n = _namespace['_array_DG_py_n'] cdef double * _array_DG_py_n = _buf__array_DG_py_n.data cdef size_t _num_array_DG_py_n = len(_namespace['_array_DG_py_n']) cdef double _source_n _var__source_v = _namespace["_var__source_v"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_v = _namespace['_array_DG_py_v'] cdef double * _array_DG_py_v = _buf__array_DG_py_v.data cdef size_t _num_array_DG_py_v = len(_namespace['_array_DG_py_v']) cdef double _source_v cdef double _to_record_h cdef double _to_record_m cdef double _to_record_n cdef double _to_record_v _var_h = _namespace["_var_h"] _dynamic_array_statemonitor_1_h = _namespace["_dynamic_array_statemonitor_1_h"] _var_m = _namespace["_var_m"] _dynamic_array_statemonitor_1_m = _namespace["_dynamic_array_statemonitor_1_m"] _var_n = _namespace["_var_n"] _dynamic_array_statemonitor_1_n = _namespace["_dynamic_array_statemonitor_1_n"] _var_t = _namespace["_var_t"] _dynamic_array_statemonitor_1_t = _namespace["_dynamic_array_statemonitor_1_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_statemonitor_1_t = _namespace['_array_statemonitor_1_t'] cdef double * _array_statemonitor_1_t = _buf__array_statemonitor_1_t.data cdef size_t _num_array_statemonitor_1_t = len(_namespace['_array_statemonitor_1_t']) cdef double t _var_v = _namespace["_var_v"] _dynamic_array_statemonitor_1_v = _namespace["_dynamic_array_statemonitor_1_v"] if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:14:56,306 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name statemonitor_1_codeobject 2021-11-05 15:14:56,307 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "statemonitor_1_statemonitor" using Cython module "_cython_magic_67061275a923321a1b5a5035f1326c29" 2021-11-05 15:14:56,307 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140606329243488 on /home/nikos/.cython/brian_extensions/_cython_magic_67061275a923321a1b5a5035f1326c29.lock 2021-11-05 15:14:56,307 DEBUG brian2.utils.filelock: Lock 140606329243488 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_67061275a923321a1b5a5035f1326c29.lock 2021-11-05 15:14:57,536 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140606329243488 on /home/nikos/.cython/brian_extensions/_cython_magic_67061275a923321a1b5a5035f1326c29.lock 2021-11-05 15:14:57,536 DEBUG brian2.utils.filelock: Lock 140606329243488 released on /home/nikos/.cython/brian_extensions/_cython_magic_67061275a923321a1b5a5035f1326c29.lock 2021-11-05 15:14:57,536 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=statemonitor_10, template name=statemonitor) for abstract code: _to_record_drive = _source_drive 2021-11-05 15:14:57,538 DIAGNOSTIC brian2.devices.device: statemonitor_10_codeobject abstract code: _to_record_drive = _source_drive 2021-11-05 15:14:57,539 DIAGNOSTIC brian2.devices.device: statemonitor_10_codeobject snippet (scalar): _lio_1 = 1.0 / Hz 2021-11-05 15:14:57,539 DIAGNOSTIC brian2.devices.device: statemonitor_10_codeobject snippet (vector): __source_drive_neurongroup_1_Y = _array_neurongroup_1_Y[_idx] _source_drive = _lio_1 * __source_drive_neurongroup_1_Y _to_record_drive = _source_drive 2021-11-05 15:14:57,540 DIAGNOSTIC brian2.devices.device: statemonitor_10_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var_Hz = _namespace["_var_Hz"] cdef double Hz = _namespace["Hz"] _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_statemonitor_10_N = _namespace['_array_statemonitor_10_N'] cdef int32_t * _array_statemonitor_10_N = _buf__array_statemonitor_10_N.data cdef int32_t N _var___source_drive_neurongroup_1_Y = _namespace["_var___source_drive_neurongroup_1_Y"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_neurongroup_1_Y = _namespace['_array_neurongroup_1_Y'] cdef double * _array_neurongroup_1_Y = _buf__array_neurongroup_1_Y.data cdef size_t _num_array_neurongroup_1_Y = len(_namespace['_array_neurongroup_1_Y']) cdef double __source_drive_neurongroup_1_Y _var__clock_t = _namespace["_var__clock_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double _clock_t _var__indices = _namespace["_var__indices"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_statemonitor_10__indices = _namespace['_array_statemonitor_10__indices'] cdef int32_t * _array_statemonitor_10__indices = _buf__array_statemonitor_10__indices.data cdef size_t _num_array_statemonitor_10__indices = len(_namespace['_array_statemonitor_10__indices']) cdef int32_t _indices cdef double _source_drive cdef double _to_record_drive _var_drive = _namespace["_var_drive"] _dynamic_array_statemonitor_10_drive = _namespace["_dynamic_array_statemonitor_10_drive"] _var_t = _namespace["_var_t"] _dynamic_array_statemonitor_10_t = _namespace["_dynamic_array_statemonitor_10_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_statemonitor_10_t = _namespace['_array_statemonitor_10_t'] cdef double * _array_statemonitor_10_t = _buf__array_statemonitor_10_t.data cdef size_t _num_array_statemonitor_10_t = len(_namespace['_array_statemonitor_10_t']) cdef double t cdef double _lio_1 if '_owner' in _namespace: _owner = _namespace['_owner'] cdef size_t _new_len = _array_statemonitor_10_N[0] + 1 # Resize the recorded times _var_t.resize(_new_len) _dynamic_array_statemonitor_10_t[_new_len-1] = _array_defaultclock_t[0] # scalar code _vectorisation_idx = 1 _lio_1 = 1.0 / Hz cdef size_t _i # Resize the recorded variable "drive" and get the (potentially # changed) reference to the underlying data _var_drive.resize((_new_len, _num_array_statemonitor_10__indices)) cdef _numpy.ndarray[double, ndim=2, mode='c'] _record_buf_drive = _dynamic_array_statemonitor_10_drive.data cdef double* _record_data_drive = _record_buf_drive.data for _i in range(_num_array_statemonitor_10__indices): # vector code _idx = _array_statemonitor_10__indices[_i] _vectorisation_idx = _idx __source_drive_neurongroup_1_Y = _array_neurongroup_1_Y[_idx] _source_drive = _lio_1 * __source_drive_neurongroup_1_Y _to_record_drive = _source_drive _record_data_drive[(_new_len-1)*_num_array_statemonitor_10__indices + _i] = _to_record_drive # set the N variable explicitly (since we do not call `StateMonitor.resize`) _array_statemonitor_10_N[0] = _new_len before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_Hz = _namespace["_var_Hz"] cdef double Hz = _namespace["Hz"] _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_statemonitor_10_N = _namespace['_array_statemonitor_10_N'] cdef int32_t * _array_statemonitor_10_N = _buf__array_statemonitor_10_N.data cdef int32_t N _var___source_drive_neurongroup_1_Y = _namespace["_var___source_drive_neurongroup_1_Y"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_neurongroup_1_Y = _namespace['_array_neurongroup_1_Y'] cdef double * _array_neurongroup_1_Y = _buf__array_neurongroup_1_Y.data cdef size_t _num_array_neurongroup_1_Y = len(_namespace['_array_neurongroup_1_Y']) cdef double __source_drive_neurongroup_1_Y _var__clock_t = _namespace["_var__clock_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double _clock_t _var__indices = _namespace["_var__indices"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_statemonitor_10__indices = _namespace['_array_statemonitor_10__indices'] cdef int32_t * _array_statemonitor_10__indices = _buf__array_statemonitor_10__indices.data cdef size_t _num_array_statemonitor_10__indices = len(_namespace['_array_statemonitor_10__indices']) cdef int32_t _indices cdef double _source_drive cdef double _to_record_drive _var_drive = _namespace["_var_drive"] _dynamic_array_statemonitor_10_drive = _namespace["_dynamic_array_statemonitor_10_drive"] _var_t = _namespace["_var_t"] _dynamic_array_statemonitor_10_t = _namespace["_dynamic_array_statemonitor_10_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_statemonitor_10_t = _namespace['_array_statemonitor_10_t'] cdef double * _array_statemonitor_10_t = _buf__array_statemonitor_10_t.data cdef size_t _num_array_statemonitor_10_t = len(_namespace['_array_statemonitor_10_t']) cdef double t cdef double _lio_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_Hz = _namespace["_var_Hz"] cdef double Hz = _namespace["Hz"] _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_statemonitor_10_N = _namespace['_array_statemonitor_10_N'] cdef int32_t * _array_statemonitor_10_N = _buf__array_statemonitor_10_N.data cdef int32_t N _var___source_drive_neurongroup_1_Y = _namespace["_var___source_drive_neurongroup_1_Y"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_neurongroup_1_Y = _namespace['_array_neurongroup_1_Y'] cdef double * _array_neurongroup_1_Y = _buf__array_neurongroup_1_Y.data cdef size_t _num_array_neurongroup_1_Y = len(_namespace['_array_neurongroup_1_Y']) cdef double __source_drive_neurongroup_1_Y _var__clock_t = _namespace["_var__clock_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double _clock_t _var__indices = _namespace["_var__indices"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_statemonitor_10__indices = _namespace['_array_statemonitor_10__indices'] cdef int32_t * _array_statemonitor_10__indices = _buf__array_statemonitor_10__indices.data cdef size_t _num_array_statemonitor_10__indices = len(_namespace['_array_statemonitor_10__indices']) cdef int32_t _indices cdef double _source_drive cdef double _to_record_drive _var_drive = _namespace["_var_drive"] _dynamic_array_statemonitor_10_drive = _namespace["_dynamic_array_statemonitor_10_drive"] _var_t = _namespace["_var_t"] _dynamic_array_statemonitor_10_t = _namespace["_dynamic_array_statemonitor_10_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_statemonitor_10_t = _namespace['_array_statemonitor_10_t'] cdef double * _array_statemonitor_10_t = _buf__array_statemonitor_10_t.data cdef size_t _num_array_statemonitor_10_t = len(_namespace['_array_statemonitor_10_t']) cdef double t cdef double _lio_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:14:57,540 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name statemonitor_10_codeobject 2021-11-05 15:14:57,541 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "statemonitor_10_statemonitor" using Cython module "_cython_magic_f10e907d833231b8edb1e66a87459722" 2021-11-05 15:14:57,541 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140605133767920 on /home/nikos/.cython/brian_extensions/_cython_magic_f10e907d833231b8edb1e66a87459722.lock 2021-11-05 15:14:57,541 DEBUG brian2.utils.filelock: Lock 140605133767920 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_f10e907d833231b8edb1e66a87459722.lock 2021-11-05 15:14:57,541 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140605133767920 on /home/nikos/.cython/brian_extensions/_cython_magic_f10e907d833231b8edb1e66a87459722.lock 2021-11-05 15:14:57,541 DEBUG brian2.utils.filelock: Lock 140605133767920 released on /home/nikos/.cython/brian_extensions/_cython_magic_f10e907d833231b8edb1e66a87459722.lock 2021-11-05 15:14:57,541 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=statemonitor_2, template name=statemonitor) for abstract code: _to_record_v = _source_v _to_record_m = _source_m _to_record_n = _source_n _to_record_h = _source_h 2021-11-05 15:14:57,542 DIAGNOSTIC brian2.devices.device: statemonitor_2_codeobject abstract code: _to_record_v = _source_v _to_record_m = _source_m _to_record_n = _source_n _to_record_h = _source_h 2021-11-05 15:14:57,543 DIAGNOSTIC brian2.devices.device: statemonitor_2_codeobject snippet (scalar): 2021-11-05 15:14:57,543 DIAGNOSTIC brian2.devices.device: statemonitor_2_codeobject snippet (vector): _source_n = _array_CA3_pyCAN_n[_idx] _source_v = _array_CA3_pyCAN_v[_idx] _source_m = _array_CA3_pyCAN_m[_idx] _source_h = _array_CA3_pyCAN_h[_idx] _to_record_v = _source_v _to_record_m = _source_m _to_record_n = _source_n _to_record_h = _source_h 2021-11-05 15:14:57,543 DIAGNOSTIC brian2.devices.device: statemonitor_2_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_statemonitor_2_N = _namespace['_array_statemonitor_2_N'] cdef int32_t * _array_statemonitor_2_N = _buf__array_statemonitor_2_N.data cdef int32_t N _var__clock_t = _namespace["_var__clock_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double _clock_t _var__indices = _namespace["_var__indices"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_statemonitor_2__indices = _namespace['_array_statemonitor_2__indices'] cdef int32_t * _array_statemonitor_2__indices = _buf__array_statemonitor_2__indices.data cdef size_t _num_array_statemonitor_2__indices = len(_namespace['_array_statemonitor_2__indices']) cdef int32_t _indices _var__source_h = _namespace["_var__source_h"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_h = _namespace['_array_CA3_pyCAN_h'] cdef double * _array_CA3_pyCAN_h = _buf__array_CA3_pyCAN_h.data cdef size_t _num_array_CA3_pyCAN_h = len(_namespace['_array_CA3_pyCAN_h']) cdef double _source_h _var__source_m = _namespace["_var__source_m"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_m = _namespace['_array_CA3_pyCAN_m'] cdef double * _array_CA3_pyCAN_m = _buf__array_CA3_pyCAN_m.data cdef size_t _num_array_CA3_pyCAN_m = len(_namespace['_array_CA3_pyCAN_m']) cdef double _source_m _var__source_n = _namespace["_var__source_n"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_n = _namespace['_array_CA3_pyCAN_n'] cdef double * _array_CA3_pyCAN_n = _buf__array_CA3_pyCAN_n.data cdef size_t _num_array_CA3_pyCAN_n = len(_namespace['_array_CA3_pyCAN_n']) cdef double _source_n _var__source_v = _namespace["_var__source_v"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_v = _namespace['_array_CA3_pyCAN_v'] cdef double * _array_CA3_pyCAN_v = _buf__array_CA3_pyCAN_v.data cdef size_t _num_array_CA3_pyCAN_v = len(_namespace['_array_CA3_pyCAN_v']) cdef double _source_v cdef double _to_record_h cdef double _to_record_m cdef double _to_record_n cdef double _to_record_v _var_h = _namespace["_var_h"] _dynamic_array_statemonitor_2_h = _namespace["_dynamic_array_statemonitor_2_h"] _var_m = _namespace["_var_m"] _dynamic_array_statemonitor_2_m = _namespace["_dynamic_array_statemonitor_2_m"] _var_n = _namespace["_var_n"] _dynamic_array_statemonitor_2_n = _namespace["_dynamic_array_statemonitor_2_n"] _var_t = _namespace["_var_t"] _dynamic_array_statemonitor_2_t = _namespace["_dynamic_array_statemonitor_2_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_statemonitor_2_t = _namespace['_array_statemonitor_2_t'] cdef double * _array_statemonitor_2_t = _buf__array_statemonitor_2_t.data cdef size_t _num_array_statemonitor_2_t = len(_namespace['_array_statemonitor_2_t']) cdef double t _var_v = _namespace["_var_v"] _dynamic_array_statemonitor_2_v = _namespace["_dynamic_array_statemonitor_2_v"] if '_owner' in _namespace: _owner = _namespace['_owner'] cdef size_t _new_len = _array_statemonitor_2_N[0] + 1 # Resize the recorded times _var_t.resize(_new_len) _dynamic_array_statemonitor_2_t[_new_len-1] = _array_defaultclock_t[0] # scalar code _vectorisation_idx = 1 cdef size_t _i # Resize the recorded variable "h" and get the (potentially # changed) reference to the underlying data _var_h.resize((_new_len, _num_array_statemonitor_2__indices)) cdef _numpy.ndarray[double, ndim=2, mode='c'] _record_buf_h = _dynamic_array_statemonitor_2_h.data cdef double* _record_data_h = _record_buf_h.data for _i in range(_num_array_statemonitor_2__indices): # vector code _idx = _array_statemonitor_2__indices[_i] _vectorisation_idx = _idx _source_n = _array_CA3_pyCAN_n[_idx] _source_v = _array_CA3_pyCAN_v[_idx] _source_m = _array_CA3_pyCAN_m[_idx] _source_h = _array_CA3_pyCAN_h[_idx] _to_record_v = _source_v _to_record_m = _source_m _to_record_n = _source_n _to_record_h = _source_h _record_data_h[(_new_len-1)*_num_array_statemonitor_2__indices + _i] = _to_record_h # Resize the recorded variable "m" and get the (potentially # changed) reference to the underlying data _var_m.resize((_new_len, _num_array_statemonitor_2__indices)) cdef _numpy.ndarray[double, ndim=2, mode='c'] _record_buf_m = _dynamic_array_statemonitor_2_m.data cdef double* _record_data_m = _record_buf_m.data for _i in range(_num_array_statemonitor_2__indices): # vector code _idx = _array_statemonitor_2__indices[_i] _vectorisation_idx = _idx _source_n = _array_CA3_pyCAN_n[_idx] _source_v = _array_CA3_pyCAN_v[_idx] _source_m = _array_CA3_pyCAN_m[_idx] _source_h = _array_CA3_pyCAN_h[_idx] _to_record_v = _source_v _to_record_m = _source_m _to_record_n = _source_n _to_record_h = _source_h _record_data_m[(_new_len-1)*_num_array_statemonitor_2__indices + _i] = _to_record_m # Resize the recorded variable "n" and get the (potentially # changed) reference to the underlying data _var_n.resize((_new_len, _num_array_statemonitor_2__indices)) cdef _numpy.ndarray[double, ndim=2, mode='c'] _record_buf_n = _dynamic_array_statemonitor_2_n.data cdef double* _record_data_n = _record_buf_n.data for _i in range(_num_array_statemonitor_2__indices): # vector code _idx = _array_statemonitor_2__indices[_i] _vectorisation_idx = _idx _source_n = _array_CA3_pyCAN_n[_idx] _source_v = _array_CA3_pyCAN_v[_idx] _source_m = _array_CA3_pyCAN_m[_idx] _source_h = _array_CA3_pyCAN_h[_idx] _to_record_v = _source_v _to_record_m = _source_m _to_record_n = _source_n _to_record_h = _source_h _record_data_n[(_new_len-1)*_num_array_statemonitor_2__indices + _i] = _to_record_n # Resize the recorded variable "v" and get the (potentially # changed) reference to the underlying data _var_v.resize((_new_len, _num_array_statemonitor_2__indices)) cdef _numpy.ndarray[double, ndim=2, mode='c'] _record_buf_v = _dynamic_array_statemonitor_2_v.data cdef double* _record_data_v = _record_buf_v.data for _i in range(_num_array_statemonitor_2__indices): # vector code _idx = _array_statemonitor_2__indices[_i] _vectorisation_idx = _idx _source_n = _array_CA3_pyCAN_n[_idx] _source_v = _array_CA3_pyCAN_v[_idx] _source_m = _array_CA3_pyCAN_m[_idx] _source_h = _array_CA3_pyCAN_h[_idx] _to_record_v = _source_v _to_record_m = _source_m _to_record_n = _source_n _to_record_h = _source_h _record_data_v[(_new_len-1)*_num_array_statemonitor_2__indices + _i] = _to_record_v # set the N variable explicitly (since we do not call `StateMonitor.resize`) _array_statemonitor_2_N[0] = _new_len before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_statemonitor_2_N = _namespace['_array_statemonitor_2_N'] cdef int32_t * _array_statemonitor_2_N = _buf__array_statemonitor_2_N.data cdef int32_t N _var__clock_t = _namespace["_var__clock_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double _clock_t _var__indices = _namespace["_var__indices"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_statemonitor_2__indices = _namespace['_array_statemonitor_2__indices'] cdef int32_t * _array_statemonitor_2__indices = _buf__array_statemonitor_2__indices.data cdef size_t _num_array_statemonitor_2__indices = len(_namespace['_array_statemonitor_2__indices']) cdef int32_t _indices _var__source_h = _namespace["_var__source_h"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_h = _namespace['_array_CA3_pyCAN_h'] cdef double * _array_CA3_pyCAN_h = _buf__array_CA3_pyCAN_h.data cdef size_t _num_array_CA3_pyCAN_h = len(_namespace['_array_CA3_pyCAN_h']) cdef double _source_h _var__source_m = _namespace["_var__source_m"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_m = _namespace['_array_CA3_pyCAN_m'] cdef double * _array_CA3_pyCAN_m = _buf__array_CA3_pyCAN_m.data cdef size_t _num_array_CA3_pyCAN_m = len(_namespace['_array_CA3_pyCAN_m']) cdef double _source_m _var__source_n = _namespace["_var__source_n"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_n = _namespace['_array_CA3_pyCAN_n'] cdef double * _array_CA3_pyCAN_n = _buf__array_CA3_pyCAN_n.data cdef size_t _num_array_CA3_pyCAN_n = len(_namespace['_array_CA3_pyCAN_n']) cdef double _source_n _var__source_v = _namespace["_var__source_v"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_v = _namespace['_array_CA3_pyCAN_v'] cdef double * _array_CA3_pyCAN_v = _buf__array_CA3_pyCAN_v.data cdef size_t _num_array_CA3_pyCAN_v = len(_namespace['_array_CA3_pyCAN_v']) cdef double _source_v cdef double _to_record_h cdef double _to_record_m cdef double _to_record_n cdef double _to_record_v _var_h = _namespace["_var_h"] _dynamic_array_statemonitor_2_h = _namespace["_dynamic_array_statemonitor_2_h"] _var_m = _namespace["_var_m"] _dynamic_array_statemonitor_2_m = _namespace["_dynamic_array_statemonitor_2_m"] _var_n = _namespace["_var_n"] _dynamic_array_statemonitor_2_n = _namespace["_dynamic_array_statemonitor_2_n"] _var_t = _namespace["_var_t"] _dynamic_array_statemonitor_2_t = _namespace["_dynamic_array_statemonitor_2_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_statemonitor_2_t = _namespace['_array_statemonitor_2_t'] cdef double * _array_statemonitor_2_t = _buf__array_statemonitor_2_t.data cdef size_t _num_array_statemonitor_2_t = len(_namespace['_array_statemonitor_2_t']) cdef double t _var_v = _namespace["_var_v"] _dynamic_array_statemonitor_2_v = _namespace["_dynamic_array_statemonitor_2_v"] if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_statemonitor_2_N = _namespace['_array_statemonitor_2_N'] cdef int32_t * _array_statemonitor_2_N = _buf__array_statemonitor_2_N.data cdef int32_t N _var__clock_t = _namespace["_var__clock_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double _clock_t _var__indices = _namespace["_var__indices"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_statemonitor_2__indices = _namespace['_array_statemonitor_2__indices'] cdef int32_t * _array_statemonitor_2__indices = _buf__array_statemonitor_2__indices.data cdef size_t _num_array_statemonitor_2__indices = len(_namespace['_array_statemonitor_2__indices']) cdef int32_t _indices _var__source_h = _namespace["_var__source_h"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_h = _namespace['_array_CA3_pyCAN_h'] cdef double * _array_CA3_pyCAN_h = _buf__array_CA3_pyCAN_h.data cdef size_t _num_array_CA3_pyCAN_h = len(_namespace['_array_CA3_pyCAN_h']) cdef double _source_h _var__source_m = _namespace["_var__source_m"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_m = _namespace['_array_CA3_pyCAN_m'] cdef double * _array_CA3_pyCAN_m = _buf__array_CA3_pyCAN_m.data cdef size_t _num_array_CA3_pyCAN_m = len(_namespace['_array_CA3_pyCAN_m']) cdef double _source_m _var__source_n = _namespace["_var__source_n"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_n = _namespace['_array_CA3_pyCAN_n'] cdef double * _array_CA3_pyCAN_n = _buf__array_CA3_pyCAN_n.data cdef size_t _num_array_CA3_pyCAN_n = len(_namespace['_array_CA3_pyCAN_n']) cdef double _source_n _var__source_v = _namespace["_var__source_v"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_v = _namespace['_array_CA3_pyCAN_v'] cdef double * _array_CA3_pyCAN_v = _buf__array_CA3_pyCAN_v.data cdef size_t _num_array_CA3_pyCAN_v = len(_namespace['_array_CA3_pyCAN_v']) cdef double _source_v cdef double _to_record_h cdef double _to_record_m cdef double _to_record_n cdef double _to_record_v _var_h = _namespace["_var_h"] _dynamic_array_statemonitor_2_h = _namespace["_dynamic_array_statemonitor_2_h"] _var_m = _namespace["_var_m"] _dynamic_array_statemonitor_2_m = _namespace["_dynamic_array_statemonitor_2_m"] _var_n = _namespace["_var_n"] _dynamic_array_statemonitor_2_n = _namespace["_dynamic_array_statemonitor_2_n"] _var_t = _namespace["_var_t"] _dynamic_array_statemonitor_2_t = _namespace["_dynamic_array_statemonitor_2_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_statemonitor_2_t = _namespace['_array_statemonitor_2_t'] cdef double * _array_statemonitor_2_t = _buf__array_statemonitor_2_t.data cdef size_t _num_array_statemonitor_2_t = len(_namespace['_array_statemonitor_2_t']) cdef double t _var_v = _namespace["_var_v"] _dynamic_array_statemonitor_2_v = _namespace["_dynamic_array_statemonitor_2_v"] if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:14:57,544 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name statemonitor_2_codeobject 2021-11-05 15:14:57,544 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "statemonitor_2_statemonitor" using Cython module "_cython_magic_bc7c79cd0e8934153d0697893f30a591" 2021-11-05 15:14:57,544 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140606333396160 on /home/nikos/.cython/brian_extensions/_cython_magic_bc7c79cd0e8934153d0697893f30a591.lock 2021-11-05 15:14:57,544 DEBUG brian2.utils.filelock: Lock 140606333396160 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_bc7c79cd0e8934153d0697893f30a591.lock 2021-11-05 15:14:58,706 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140606333396160 on /home/nikos/.cython/brian_extensions/_cython_magic_bc7c79cd0e8934153d0697893f30a591.lock 2021-11-05 15:14:58,706 DEBUG brian2.utils.filelock: Lock 140606333396160 released on /home/nikos/.cython/brian_extensions/_cython_magic_bc7c79cd0e8934153d0697893f30a591.lock 2021-11-05 15:14:58,707 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=statemonitor_3, template name=statemonitor) for abstract code: _to_record_v = _source_v _to_record_m = _source_m _to_record_n = _source_n _to_record_h = _source_h 2021-11-05 15:14:58,708 DIAGNOSTIC brian2.devices.device: statemonitor_3_codeobject abstract code: _to_record_v = _source_v _to_record_m = _source_m _to_record_n = _source_n _to_record_h = _source_h 2021-11-05 15:14:58,709 DIAGNOSTIC brian2.devices.device: statemonitor_3_codeobject snippet (scalar): 2021-11-05 15:14:58,709 DIAGNOSTIC brian2.devices.device: statemonitor_3_codeobject snippet (vector): _source_n = _array_CA1_pyCAN_n[_idx] _source_v = _array_CA1_pyCAN_v[_idx] _source_m = _array_CA1_pyCAN_m[_idx] _source_h = _array_CA1_pyCAN_h[_idx] _to_record_v = _source_v _to_record_m = _source_m _to_record_n = _source_n _to_record_h = _source_h 2021-11-05 15:14:58,710 DIAGNOSTIC brian2.devices.device: statemonitor_3_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_statemonitor_3_N = _namespace['_array_statemonitor_3_N'] cdef int32_t * _array_statemonitor_3_N = _buf__array_statemonitor_3_N.data cdef int32_t N _var__clock_t = _namespace["_var__clock_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double _clock_t _var__indices = _namespace["_var__indices"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_statemonitor_3__indices = _namespace['_array_statemonitor_3__indices'] cdef int32_t * _array_statemonitor_3__indices = _buf__array_statemonitor_3__indices.data cdef size_t _num_array_statemonitor_3__indices = len(_namespace['_array_statemonitor_3__indices']) cdef int32_t _indices _var__source_h = _namespace["_var__source_h"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_h = _namespace['_array_CA1_pyCAN_h'] cdef double * _array_CA1_pyCAN_h = _buf__array_CA1_pyCAN_h.data cdef size_t _num_array_CA1_pyCAN_h = len(_namespace['_array_CA1_pyCAN_h']) cdef double _source_h _var__source_m = _namespace["_var__source_m"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_m = _namespace['_array_CA1_pyCAN_m'] cdef double * _array_CA1_pyCAN_m = _buf__array_CA1_pyCAN_m.data cdef size_t _num_array_CA1_pyCAN_m = len(_namespace['_array_CA1_pyCAN_m']) cdef double _source_m _var__source_n = _namespace["_var__source_n"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_n = _namespace['_array_CA1_pyCAN_n'] cdef double * _array_CA1_pyCAN_n = _buf__array_CA1_pyCAN_n.data cdef size_t _num_array_CA1_pyCAN_n = len(_namespace['_array_CA1_pyCAN_n']) cdef double _source_n _var__source_v = _namespace["_var__source_v"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_v = _namespace['_array_CA1_pyCAN_v'] cdef double * _array_CA1_pyCAN_v = _buf__array_CA1_pyCAN_v.data cdef size_t _num_array_CA1_pyCAN_v = len(_namespace['_array_CA1_pyCAN_v']) cdef double _source_v cdef double _to_record_h cdef double _to_record_m cdef double _to_record_n cdef double _to_record_v _var_h = _namespace["_var_h"] _dynamic_array_statemonitor_3_h = _namespace["_dynamic_array_statemonitor_3_h"] _var_m = _namespace["_var_m"] _dynamic_array_statemonitor_3_m = _namespace["_dynamic_array_statemonitor_3_m"] _var_n = _namespace["_var_n"] _dynamic_array_statemonitor_3_n = _namespace["_dynamic_array_statemonitor_3_n"] _var_t = _namespace["_var_t"] _dynamic_array_statemonitor_3_t = _namespace["_dynamic_array_statemonitor_3_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_statemonitor_3_t = _namespace['_array_statemonitor_3_t'] cdef double * _array_statemonitor_3_t = _buf__array_statemonitor_3_t.data cdef size_t _num_array_statemonitor_3_t = len(_namespace['_array_statemonitor_3_t']) cdef double t _var_v = _namespace["_var_v"] _dynamic_array_statemonitor_3_v = _namespace["_dynamic_array_statemonitor_3_v"] if '_owner' in _namespace: _owner = _namespace['_owner'] cdef size_t _new_len = _array_statemonitor_3_N[0] + 1 # Resize the recorded times _var_t.resize(_new_len) _dynamic_array_statemonitor_3_t[_new_len-1] = _array_defaultclock_t[0] # scalar code _vectorisation_idx = 1 cdef size_t _i # Resize the recorded variable "h" and get the (potentially # changed) reference to the underlying data _var_h.resize((_new_len, _num_array_statemonitor_3__indices)) cdef _numpy.ndarray[double, ndim=2, mode='c'] _record_buf_h = _dynamic_array_statemonitor_3_h.data cdef double* _record_data_h = _record_buf_h.data for _i in range(_num_array_statemonitor_3__indices): # vector code _idx = _array_statemonitor_3__indices[_i] _vectorisation_idx = _idx _source_n = _array_CA1_pyCAN_n[_idx] _source_v = _array_CA1_pyCAN_v[_idx] _source_m = _array_CA1_pyCAN_m[_idx] _source_h = _array_CA1_pyCAN_h[_idx] _to_record_v = _source_v _to_record_m = _source_m _to_record_n = _source_n _to_record_h = _source_h _record_data_h[(_new_len-1)*_num_array_statemonitor_3__indices + _i] = _to_record_h # Resize the recorded variable "m" and get the (potentially # changed) reference to the underlying data _var_m.resize((_new_len, _num_array_statemonitor_3__indices)) cdef _numpy.ndarray[double, ndim=2, mode='c'] _record_buf_m = _dynamic_array_statemonitor_3_m.data cdef double* _record_data_m = _record_buf_m.data for _i in range(_num_array_statemonitor_3__indices): # vector code _idx = _array_statemonitor_3__indices[_i] _vectorisation_idx = _idx _source_n = _array_CA1_pyCAN_n[_idx] _source_v = _array_CA1_pyCAN_v[_idx] _source_m = _array_CA1_pyCAN_m[_idx] _source_h = _array_CA1_pyCAN_h[_idx] _to_record_v = _source_v _to_record_m = _source_m _to_record_n = _source_n _to_record_h = _source_h _record_data_m[(_new_len-1)*_num_array_statemonitor_3__indices + _i] = _to_record_m # Resize the recorded variable "n" and get the (potentially # changed) reference to the underlying data _var_n.resize((_new_len, _num_array_statemonitor_3__indices)) cdef _numpy.ndarray[double, ndim=2, mode='c'] _record_buf_n = _dynamic_array_statemonitor_3_n.data cdef double* _record_data_n = _record_buf_n.data for _i in range(_num_array_statemonitor_3__indices): # vector code _idx = _array_statemonitor_3__indices[_i] _vectorisation_idx = _idx _source_n = _array_CA1_pyCAN_n[_idx] _source_v = _array_CA1_pyCAN_v[_idx] _source_m = _array_CA1_pyCAN_m[_idx] _source_h = _array_CA1_pyCAN_h[_idx] _to_record_v = _source_v _to_record_m = _source_m _to_record_n = _source_n _to_record_h = _source_h _record_data_n[(_new_len-1)*_num_array_statemonitor_3__indices + _i] = _to_record_n # Resize the recorded variable "v" and get the (potentially # changed) reference to the underlying data _var_v.resize((_new_len, _num_array_statemonitor_3__indices)) cdef _numpy.ndarray[double, ndim=2, mode='c'] _record_buf_v = _dynamic_array_statemonitor_3_v.data cdef double* _record_data_v = _record_buf_v.data for _i in range(_num_array_statemonitor_3__indices): # vector code _idx = _array_statemonitor_3__indices[_i] _vectorisation_idx = _idx _source_n = _array_CA1_pyCAN_n[_idx] _source_v = _array_CA1_pyCAN_v[_idx] _source_m = _array_CA1_pyCAN_m[_idx] _source_h = _array_CA1_pyCAN_h[_idx] _to_record_v = _source_v _to_record_m = _source_m _to_record_n = _source_n _to_record_h = _source_h _record_data_v[(_new_len-1)*_num_array_statemonitor_3__indices + _i] = _to_record_v # set the N variable explicitly (since we do not call `StateMonitor.resize`) _array_statemonitor_3_N[0] = _new_len before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_statemonitor_3_N = _namespace['_array_statemonitor_3_N'] cdef int32_t * _array_statemonitor_3_N = _buf__array_statemonitor_3_N.data cdef int32_t N _var__clock_t = _namespace["_var__clock_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double _clock_t _var__indices = _namespace["_var__indices"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_statemonitor_3__indices = _namespace['_array_statemonitor_3__indices'] cdef int32_t * _array_statemonitor_3__indices = _buf__array_statemonitor_3__indices.data cdef size_t _num_array_statemonitor_3__indices = len(_namespace['_array_statemonitor_3__indices']) cdef int32_t _indices _var__source_h = _namespace["_var__source_h"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_h = _namespace['_array_CA1_pyCAN_h'] cdef double * _array_CA1_pyCAN_h = _buf__array_CA1_pyCAN_h.data cdef size_t _num_array_CA1_pyCAN_h = len(_namespace['_array_CA1_pyCAN_h']) cdef double _source_h _var__source_m = _namespace["_var__source_m"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_m = _namespace['_array_CA1_pyCAN_m'] cdef double * _array_CA1_pyCAN_m = _buf__array_CA1_pyCAN_m.data cdef size_t _num_array_CA1_pyCAN_m = len(_namespace['_array_CA1_pyCAN_m']) cdef double _source_m _var__source_n = _namespace["_var__source_n"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_n = _namespace['_array_CA1_pyCAN_n'] cdef double * _array_CA1_pyCAN_n = _buf__array_CA1_pyCAN_n.data cdef size_t _num_array_CA1_pyCAN_n = len(_namespace['_array_CA1_pyCAN_n']) cdef double _source_n _var__source_v = _namespace["_var__source_v"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_v = _namespace['_array_CA1_pyCAN_v'] cdef double * _array_CA1_pyCAN_v = _buf__array_CA1_pyCAN_v.data cdef size_t _num_array_CA1_pyCAN_v = len(_namespace['_array_CA1_pyCAN_v']) cdef double _source_v cdef double _to_record_h cdef double _to_record_m cdef double _to_record_n cdef double _to_record_v _var_h = _namespace["_var_h"] _dynamic_array_statemonitor_3_h = _namespace["_dynamic_array_statemonitor_3_h"] _var_m = _namespace["_var_m"] _dynamic_array_statemonitor_3_m = _namespace["_dynamic_array_statemonitor_3_m"] _var_n = _namespace["_var_n"] _dynamic_array_statemonitor_3_n = _namespace["_dynamic_array_statemonitor_3_n"] _var_t = _namespace["_var_t"] _dynamic_array_statemonitor_3_t = _namespace["_dynamic_array_statemonitor_3_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_statemonitor_3_t = _namespace['_array_statemonitor_3_t'] cdef double * _array_statemonitor_3_t = _buf__array_statemonitor_3_t.data cdef size_t _num_array_statemonitor_3_t = len(_namespace['_array_statemonitor_3_t']) cdef double t _var_v = _namespace["_var_v"] _dynamic_array_statemonitor_3_v = _namespace["_dynamic_array_statemonitor_3_v"] if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_statemonitor_3_N = _namespace['_array_statemonitor_3_N'] cdef int32_t * _array_statemonitor_3_N = _buf__array_statemonitor_3_N.data cdef int32_t N _var__clock_t = _namespace["_var__clock_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double _clock_t _var__indices = _namespace["_var__indices"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_statemonitor_3__indices = _namespace['_array_statemonitor_3__indices'] cdef int32_t * _array_statemonitor_3__indices = _buf__array_statemonitor_3__indices.data cdef size_t _num_array_statemonitor_3__indices = len(_namespace['_array_statemonitor_3__indices']) cdef int32_t _indices _var__source_h = _namespace["_var__source_h"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_h = _namespace['_array_CA1_pyCAN_h'] cdef double * _array_CA1_pyCAN_h = _buf__array_CA1_pyCAN_h.data cdef size_t _num_array_CA1_pyCAN_h = len(_namespace['_array_CA1_pyCAN_h']) cdef double _source_h _var__source_m = _namespace["_var__source_m"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_m = _namespace['_array_CA1_pyCAN_m'] cdef double * _array_CA1_pyCAN_m = _buf__array_CA1_pyCAN_m.data cdef size_t _num_array_CA1_pyCAN_m = len(_namespace['_array_CA1_pyCAN_m']) cdef double _source_m _var__source_n = _namespace["_var__source_n"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_n = _namespace['_array_CA1_pyCAN_n'] cdef double * _array_CA1_pyCAN_n = _buf__array_CA1_pyCAN_n.data cdef size_t _num_array_CA1_pyCAN_n = len(_namespace['_array_CA1_pyCAN_n']) cdef double _source_n _var__source_v = _namespace["_var__source_v"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_v = _namespace['_array_CA1_pyCAN_v'] cdef double * _array_CA1_pyCAN_v = _buf__array_CA1_pyCAN_v.data cdef size_t _num_array_CA1_pyCAN_v = len(_namespace['_array_CA1_pyCAN_v']) cdef double _source_v cdef double _to_record_h cdef double _to_record_m cdef double _to_record_n cdef double _to_record_v _var_h = _namespace["_var_h"] _dynamic_array_statemonitor_3_h = _namespace["_dynamic_array_statemonitor_3_h"] _var_m = _namespace["_var_m"] _dynamic_array_statemonitor_3_m = _namespace["_dynamic_array_statemonitor_3_m"] _var_n = _namespace["_var_n"] _dynamic_array_statemonitor_3_n = _namespace["_dynamic_array_statemonitor_3_n"] _var_t = _namespace["_var_t"] _dynamic_array_statemonitor_3_t = _namespace["_dynamic_array_statemonitor_3_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_statemonitor_3_t = _namespace['_array_statemonitor_3_t'] cdef double * _array_statemonitor_3_t = _buf__array_statemonitor_3_t.data cdef size_t _num_array_statemonitor_3_t = len(_namespace['_array_statemonitor_3_t']) cdef double t _var_v = _namespace["_var_v"] _dynamic_array_statemonitor_3_v = _namespace["_dynamic_array_statemonitor_3_v"] if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:14:58,710 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name statemonitor_3_codeobject 2021-11-05 15:14:58,711 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "statemonitor_3_statemonitor" using Cython module "_cython_magic_c16022260aff6eae4a1fa68dd5a52bca" 2021-11-05 15:14:58,711 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140606221777792 on /home/nikos/.cython/brian_extensions/_cython_magic_c16022260aff6eae4a1fa68dd5a52bca.lock 2021-11-05 15:14:58,711 DEBUG brian2.utils.filelock: Lock 140606221777792 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_c16022260aff6eae4a1fa68dd5a52bca.lock 2021-11-05 15:14:59,969 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140606221777792 on /home/nikos/.cython/brian_extensions/_cython_magic_c16022260aff6eae4a1fa68dd5a52bca.lock 2021-11-05 15:14:59,969 DEBUG brian2.utils.filelock: Lock 140606221777792 released on /home/nikos/.cython/brian_extensions/_cython_magic_c16022260aff6eae4a1fa68dd5a52bca.lock 2021-11-05 15:14:59,969 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=statemonitor_4, template name=statemonitor) for abstract code: _to_record_v = _source_v _to_record_m = _source_m _to_record_n = _source_n _to_record_h = _source_h 2021-11-05 15:14:59,970 DIAGNOSTIC brian2.devices.device: statemonitor_4_codeobject abstract code: _to_record_v = _source_v _to_record_m = _source_m _to_record_n = _source_n _to_record_h = _source_h 2021-11-05 15:14:59,971 DIAGNOSTIC brian2.devices.device: statemonitor_4_codeobject snippet (scalar): 2021-11-05 15:14:59,971 DIAGNOSTIC brian2.devices.device: statemonitor_4_codeobject snippet (vector): _source_n = _array_EC_inh_n[_idx] _source_v = _array_EC_inh_v[_idx] _source_m = _array_EC_inh_m[_idx] _source_h = _array_EC_inh_h[_idx] _to_record_v = _source_v _to_record_m = _source_m _to_record_n = _source_n _to_record_h = _source_h 2021-11-05 15:14:59,972 DIAGNOSTIC brian2.devices.device: statemonitor_4_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_statemonitor_4_N = _namespace['_array_statemonitor_4_N'] cdef int32_t * _array_statemonitor_4_N = _buf__array_statemonitor_4_N.data cdef int32_t N _var__clock_t = _namespace["_var__clock_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double _clock_t _var__indices = _namespace["_var__indices"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_statemonitor_4__indices = _namespace['_array_statemonitor_4__indices'] cdef int32_t * _array_statemonitor_4__indices = _buf__array_statemonitor_4__indices.data cdef size_t _num_array_statemonitor_4__indices = len(_namespace['_array_statemonitor_4__indices']) cdef int32_t _indices _var__source_h = _namespace["_var__source_h"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_inh_h = _namespace['_array_EC_inh_h'] cdef double * _array_EC_inh_h = _buf__array_EC_inh_h.data cdef size_t _num_array_EC_inh_h = len(_namespace['_array_EC_inh_h']) cdef double _source_h _var__source_m = _namespace["_var__source_m"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_inh_m = _namespace['_array_EC_inh_m'] cdef double * _array_EC_inh_m = _buf__array_EC_inh_m.data cdef size_t _num_array_EC_inh_m = len(_namespace['_array_EC_inh_m']) cdef double _source_m _var__source_n = _namespace["_var__source_n"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_inh_n = _namespace['_array_EC_inh_n'] cdef double * _array_EC_inh_n = _buf__array_EC_inh_n.data cdef size_t _num_array_EC_inh_n = len(_namespace['_array_EC_inh_n']) cdef double _source_n _var__source_v = _namespace["_var__source_v"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_inh_v = _namespace['_array_EC_inh_v'] cdef double * _array_EC_inh_v = _buf__array_EC_inh_v.data cdef size_t _num_array_EC_inh_v = len(_namespace['_array_EC_inh_v']) cdef double _source_v cdef double _to_record_h cdef double _to_record_m cdef double _to_record_n cdef double _to_record_v _var_h = _namespace["_var_h"] _dynamic_array_statemonitor_4_h = _namespace["_dynamic_array_statemonitor_4_h"] _var_m = _namespace["_var_m"] _dynamic_array_statemonitor_4_m = _namespace["_dynamic_array_statemonitor_4_m"] _var_n = _namespace["_var_n"] _dynamic_array_statemonitor_4_n = _namespace["_dynamic_array_statemonitor_4_n"] _var_t = _namespace["_var_t"] _dynamic_array_statemonitor_4_t = _namespace["_dynamic_array_statemonitor_4_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_statemonitor_4_t = _namespace['_array_statemonitor_4_t'] cdef double * _array_statemonitor_4_t = _buf__array_statemonitor_4_t.data cdef size_t _num_array_statemonitor_4_t = len(_namespace['_array_statemonitor_4_t']) cdef double t _var_v = _namespace["_var_v"] _dynamic_array_statemonitor_4_v = _namespace["_dynamic_array_statemonitor_4_v"] if '_owner' in _namespace: _owner = _namespace['_owner'] cdef size_t _new_len = _array_statemonitor_4_N[0] + 1 # Resize the recorded times _var_t.resize(_new_len) _dynamic_array_statemonitor_4_t[_new_len-1] = _array_defaultclock_t[0] # scalar code _vectorisation_idx = 1 cdef size_t _i # Resize the recorded variable "h" and get the (potentially # changed) reference to the underlying data _var_h.resize((_new_len, _num_array_statemonitor_4__indices)) cdef _numpy.ndarray[double, ndim=2, mode='c'] _record_buf_h = _dynamic_array_statemonitor_4_h.data cdef double* _record_data_h = _record_buf_h.data for _i in range(_num_array_statemonitor_4__indices): # vector code _idx = _array_statemonitor_4__indices[_i] _vectorisation_idx = _idx _source_n = _array_EC_inh_n[_idx] _source_v = _array_EC_inh_v[_idx] _source_m = _array_EC_inh_m[_idx] _source_h = _array_EC_inh_h[_idx] _to_record_v = _source_v _to_record_m = _source_m _to_record_n = _source_n _to_record_h = _source_h _record_data_h[(_new_len-1)*_num_array_statemonitor_4__indices + _i] = _to_record_h # Resize the recorded variable "m" and get the (potentially # changed) reference to the underlying data _var_m.resize((_new_len, _num_array_statemonitor_4__indices)) cdef _numpy.ndarray[double, ndim=2, mode='c'] _record_buf_m = _dynamic_array_statemonitor_4_m.data cdef double* _record_data_m = _record_buf_m.data for _i in range(_num_array_statemonitor_4__indices): # vector code _idx = _array_statemonitor_4__indices[_i] _vectorisation_idx = _idx _source_n = _array_EC_inh_n[_idx] _source_v = _array_EC_inh_v[_idx] _source_m = _array_EC_inh_m[_idx] _source_h = _array_EC_inh_h[_idx] _to_record_v = _source_v _to_record_m = _source_m _to_record_n = _source_n _to_record_h = _source_h _record_data_m[(_new_len-1)*_num_array_statemonitor_4__indices + _i] = _to_record_m # Resize the recorded variable "n" and get the (potentially # changed) reference to the underlying data _var_n.resize((_new_len, _num_array_statemonitor_4__indices)) cdef _numpy.ndarray[double, ndim=2, mode='c'] _record_buf_n = _dynamic_array_statemonitor_4_n.data cdef double* _record_data_n = _record_buf_n.data for _i in range(_num_array_statemonitor_4__indices): # vector code _idx = _array_statemonitor_4__indices[_i] _vectorisation_idx = _idx _source_n = _array_EC_inh_n[_idx] _source_v = _array_EC_inh_v[_idx] _source_m = _array_EC_inh_m[_idx] _source_h = _array_EC_inh_h[_idx] _to_record_v = _source_v _to_record_m = _source_m _to_record_n = _source_n _to_record_h = _source_h _record_data_n[(_new_len-1)*_num_array_statemonitor_4__indices + _i] = _to_record_n # Resize the recorded variable "v" and get the (potentially # changed) reference to the underlying data _var_v.resize((_new_len, _num_array_statemonitor_4__indices)) cdef _numpy.ndarray[double, ndim=2, mode='c'] _record_buf_v = _dynamic_array_statemonitor_4_v.data cdef double* _record_data_v = _record_buf_v.data for _i in range(_num_array_statemonitor_4__indices): # vector code _idx = _array_statemonitor_4__indices[_i] _vectorisation_idx = _idx _source_n = _array_EC_inh_n[_idx] _source_v = _array_EC_inh_v[_idx] _source_m = _array_EC_inh_m[_idx] _source_h = _array_EC_inh_h[_idx] _to_record_v = _source_v _to_record_m = _source_m _to_record_n = _source_n _to_record_h = _source_h _record_data_v[(_new_len-1)*_num_array_statemonitor_4__indices + _i] = _to_record_v # set the N variable explicitly (since we do not call `StateMonitor.resize`) _array_statemonitor_4_N[0] = _new_len before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_statemonitor_4_N = _namespace['_array_statemonitor_4_N'] cdef int32_t * _array_statemonitor_4_N = _buf__array_statemonitor_4_N.data cdef int32_t N _var__clock_t = _namespace["_var__clock_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double _clock_t _var__indices = _namespace["_var__indices"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_statemonitor_4__indices = _namespace['_array_statemonitor_4__indices'] cdef int32_t * _array_statemonitor_4__indices = _buf__array_statemonitor_4__indices.data cdef size_t _num_array_statemonitor_4__indices = len(_namespace['_array_statemonitor_4__indices']) cdef int32_t _indices _var__source_h = _namespace["_var__source_h"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_inh_h = _namespace['_array_EC_inh_h'] cdef double * _array_EC_inh_h = _buf__array_EC_inh_h.data cdef size_t _num_array_EC_inh_h = len(_namespace['_array_EC_inh_h']) cdef double _source_h _var__source_m = _namespace["_var__source_m"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_inh_m = _namespace['_array_EC_inh_m'] cdef double * _array_EC_inh_m = _buf__array_EC_inh_m.data cdef size_t _num_array_EC_inh_m = len(_namespace['_array_EC_inh_m']) cdef double _source_m _var__source_n = _namespace["_var__source_n"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_inh_n = _namespace['_array_EC_inh_n'] cdef double * _array_EC_inh_n = _buf__array_EC_inh_n.data cdef size_t _num_array_EC_inh_n = len(_namespace['_array_EC_inh_n']) cdef double _source_n _var__source_v = _namespace["_var__source_v"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_inh_v = _namespace['_array_EC_inh_v'] cdef double * _array_EC_inh_v = _buf__array_EC_inh_v.data cdef size_t _num_array_EC_inh_v = len(_namespace['_array_EC_inh_v']) cdef double _source_v cdef double _to_record_h cdef double _to_record_m cdef double _to_record_n cdef double _to_record_v _var_h = _namespace["_var_h"] _dynamic_array_statemonitor_4_h = _namespace["_dynamic_array_statemonitor_4_h"] _var_m = _namespace["_var_m"] _dynamic_array_statemonitor_4_m = _namespace["_dynamic_array_statemonitor_4_m"] _var_n = _namespace["_var_n"] _dynamic_array_statemonitor_4_n = _namespace["_dynamic_array_statemonitor_4_n"] _var_t = _namespace["_var_t"] _dynamic_array_statemonitor_4_t = _namespace["_dynamic_array_statemonitor_4_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_statemonitor_4_t = _namespace['_array_statemonitor_4_t'] cdef double * _array_statemonitor_4_t = _buf__array_statemonitor_4_t.data cdef size_t _num_array_statemonitor_4_t = len(_namespace['_array_statemonitor_4_t']) cdef double t _var_v = _namespace["_var_v"] _dynamic_array_statemonitor_4_v = _namespace["_dynamic_array_statemonitor_4_v"] if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_statemonitor_4_N = _namespace['_array_statemonitor_4_N'] cdef int32_t * _array_statemonitor_4_N = _buf__array_statemonitor_4_N.data cdef int32_t N _var__clock_t = _namespace["_var__clock_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double _clock_t _var__indices = _namespace["_var__indices"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_statemonitor_4__indices = _namespace['_array_statemonitor_4__indices'] cdef int32_t * _array_statemonitor_4__indices = _buf__array_statemonitor_4__indices.data cdef size_t _num_array_statemonitor_4__indices = len(_namespace['_array_statemonitor_4__indices']) cdef int32_t _indices _var__source_h = _namespace["_var__source_h"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_inh_h = _namespace['_array_EC_inh_h'] cdef double * _array_EC_inh_h = _buf__array_EC_inh_h.data cdef size_t _num_array_EC_inh_h = len(_namespace['_array_EC_inh_h']) cdef double _source_h _var__source_m = _namespace["_var__source_m"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_inh_m = _namespace['_array_EC_inh_m'] cdef double * _array_EC_inh_m = _buf__array_EC_inh_m.data cdef size_t _num_array_EC_inh_m = len(_namespace['_array_EC_inh_m']) cdef double _source_m _var__source_n = _namespace["_var__source_n"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_inh_n = _namespace['_array_EC_inh_n'] cdef double * _array_EC_inh_n = _buf__array_EC_inh_n.data cdef size_t _num_array_EC_inh_n = len(_namespace['_array_EC_inh_n']) cdef double _source_n _var__source_v = _namespace["_var__source_v"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_inh_v = _namespace['_array_EC_inh_v'] cdef double * _array_EC_inh_v = _buf__array_EC_inh_v.data cdef size_t _num_array_EC_inh_v = len(_namespace['_array_EC_inh_v']) cdef double _source_v cdef double _to_record_h cdef double _to_record_m cdef double _to_record_n cdef double _to_record_v _var_h = _namespace["_var_h"] _dynamic_array_statemonitor_4_h = _namespace["_dynamic_array_statemonitor_4_h"] _var_m = _namespace["_var_m"] _dynamic_array_statemonitor_4_m = _namespace["_dynamic_array_statemonitor_4_m"] _var_n = _namespace["_var_n"] _dynamic_array_statemonitor_4_n = _namespace["_dynamic_array_statemonitor_4_n"] _var_t = _namespace["_var_t"] _dynamic_array_statemonitor_4_t = _namespace["_dynamic_array_statemonitor_4_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_statemonitor_4_t = _namespace['_array_statemonitor_4_t'] cdef double * _array_statemonitor_4_t = _buf__array_statemonitor_4_t.data cdef size_t _num_array_statemonitor_4_t = len(_namespace['_array_statemonitor_4_t']) cdef double t _var_v = _namespace["_var_v"] _dynamic_array_statemonitor_4_v = _namespace["_dynamic_array_statemonitor_4_v"] if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:14:59,972 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name statemonitor_4_codeobject 2021-11-05 15:14:59,973 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "statemonitor_4_statemonitor" using Cython module "_cython_magic_acb9d26e351283da11577b1c0c6c5a5b" 2021-11-05 15:14:59,973 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140606330734576 on /home/nikos/.cython/brian_extensions/_cython_magic_acb9d26e351283da11577b1c0c6c5a5b.lock 2021-11-05 15:14:59,973 DEBUG brian2.utils.filelock: Lock 140606330734576 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_acb9d26e351283da11577b1c0c6c5a5b.lock 2021-11-05 15:15:01,144 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140606330734576 on /home/nikos/.cython/brian_extensions/_cython_magic_acb9d26e351283da11577b1c0c6c5a5b.lock 2021-11-05 15:15:01,144 DEBUG brian2.utils.filelock: Lock 140606330734576 released on /home/nikos/.cython/brian_extensions/_cython_magic_acb9d26e351283da11577b1c0c6c5a5b.lock 2021-11-05 15:15:01,144 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=statemonitor_5, template name=statemonitor) for abstract code: _to_record_v = _source_v _to_record_m = _source_m _to_record_n = _source_n _to_record_h = _source_h 2021-11-05 15:15:01,146 DIAGNOSTIC brian2.devices.device: statemonitor_5_codeobject abstract code: _to_record_v = _source_v _to_record_m = _source_m _to_record_n = _source_n _to_record_h = _source_h 2021-11-05 15:15:01,149 DIAGNOSTIC brian2.devices.device: statemonitor_5_codeobject snippet (scalar): 2021-11-05 15:15:01,149 DIAGNOSTIC brian2.devices.device: statemonitor_5_codeobject snippet (vector): _source_n = _array_DG_inh_n[_idx] _source_v = _array_DG_inh_v[_idx] _source_m = _array_DG_inh_m[_idx] _source_h = _array_DG_inh_h[_idx] _to_record_v = _source_v _to_record_m = _source_m _to_record_n = _source_n _to_record_h = _source_h 2021-11-05 15:15:01,149 DIAGNOSTIC brian2.devices.device: statemonitor_5_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_statemonitor_5_N = _namespace['_array_statemonitor_5_N'] cdef int32_t * _array_statemonitor_5_N = _buf__array_statemonitor_5_N.data cdef int32_t N _var__clock_t = _namespace["_var__clock_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double _clock_t _var__indices = _namespace["_var__indices"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_statemonitor_5__indices = _namespace['_array_statemonitor_5__indices'] cdef int32_t * _array_statemonitor_5__indices = _buf__array_statemonitor_5__indices.data cdef size_t _num_array_statemonitor_5__indices = len(_namespace['_array_statemonitor_5__indices']) cdef int32_t _indices _var__source_h = _namespace["_var__source_h"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_inh_h = _namespace['_array_DG_inh_h'] cdef double * _array_DG_inh_h = _buf__array_DG_inh_h.data cdef size_t _num_array_DG_inh_h = len(_namespace['_array_DG_inh_h']) cdef double _source_h _var__source_m = _namespace["_var__source_m"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_inh_m = _namespace['_array_DG_inh_m'] cdef double * _array_DG_inh_m = _buf__array_DG_inh_m.data cdef size_t _num_array_DG_inh_m = len(_namespace['_array_DG_inh_m']) cdef double _source_m _var__source_n = _namespace["_var__source_n"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_inh_n = _namespace['_array_DG_inh_n'] cdef double * _array_DG_inh_n = _buf__array_DG_inh_n.data cdef size_t _num_array_DG_inh_n = len(_namespace['_array_DG_inh_n']) cdef double _source_n _var__source_v = _namespace["_var__source_v"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_inh_v = _namespace['_array_DG_inh_v'] cdef double * _array_DG_inh_v = _buf__array_DG_inh_v.data cdef size_t _num_array_DG_inh_v = len(_namespace['_array_DG_inh_v']) cdef double _source_v cdef double _to_record_h cdef double _to_record_m cdef double _to_record_n cdef double _to_record_v _var_h = _namespace["_var_h"] _dynamic_array_statemonitor_5_h = _namespace["_dynamic_array_statemonitor_5_h"] _var_m = _namespace["_var_m"] _dynamic_array_statemonitor_5_m = _namespace["_dynamic_array_statemonitor_5_m"] _var_n = _namespace["_var_n"] _dynamic_array_statemonitor_5_n = _namespace["_dynamic_array_statemonitor_5_n"] _var_t = _namespace["_var_t"] _dynamic_array_statemonitor_5_t = _namespace["_dynamic_array_statemonitor_5_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_statemonitor_5_t = _namespace['_array_statemonitor_5_t'] cdef double * _array_statemonitor_5_t = _buf__array_statemonitor_5_t.data cdef size_t _num_array_statemonitor_5_t = len(_namespace['_array_statemonitor_5_t']) cdef double t _var_v = _namespace["_var_v"] _dynamic_array_statemonitor_5_v = _namespace["_dynamic_array_statemonitor_5_v"] if '_owner' in _namespace: _owner = _namespace['_owner'] cdef size_t _new_len = _array_statemonitor_5_N[0] + 1 # Resize the recorded times _var_t.resize(_new_len) _dynamic_array_statemonitor_5_t[_new_len-1] = _array_defaultclock_t[0] # scalar code _vectorisation_idx = 1 cdef size_t _i # Resize the recorded variable "h" and get the (potentially # changed) reference to the underlying data _var_h.resize((_new_len, _num_array_statemonitor_5__indices)) cdef _numpy.ndarray[double, ndim=2, mode='c'] _record_buf_h = _dynamic_array_statemonitor_5_h.data cdef double* _record_data_h = _record_buf_h.data for _i in range(_num_array_statemonitor_5__indices): # vector code _idx = _array_statemonitor_5__indices[_i] _vectorisation_idx = _idx _source_n = _array_DG_inh_n[_idx] _source_v = _array_DG_inh_v[_idx] _source_m = _array_DG_inh_m[_idx] _source_h = _array_DG_inh_h[_idx] _to_record_v = _source_v _to_record_m = _source_m _to_record_n = _source_n _to_record_h = _source_h _record_data_h[(_new_len-1)*_num_array_statemonitor_5__indices + _i] = _to_record_h # Resize the recorded variable "m" and get the (potentially # changed) reference to the underlying data _var_m.resize((_new_len, _num_array_statemonitor_5__indices)) cdef _numpy.ndarray[double, ndim=2, mode='c'] _record_buf_m = _dynamic_array_statemonitor_5_m.data cdef double* _record_data_m = _record_buf_m.data for _i in range(_num_array_statemonitor_5__indices): # vector code _idx = _array_statemonitor_5__indices[_i] _vectorisation_idx = _idx _source_n = _array_DG_inh_n[_idx] _source_v = _array_DG_inh_v[_idx] _source_m = _array_DG_inh_m[_idx] _source_h = _array_DG_inh_h[_idx] _to_record_v = _source_v _to_record_m = _source_m _to_record_n = _source_n _to_record_h = _source_h _record_data_m[(_new_len-1)*_num_array_statemonitor_5__indices + _i] = _to_record_m # Resize the recorded variable "n" and get the (potentially # changed) reference to the underlying data _var_n.resize((_new_len, _num_array_statemonitor_5__indices)) cdef _numpy.ndarray[double, ndim=2, mode='c'] _record_buf_n = _dynamic_array_statemonitor_5_n.data cdef double* _record_data_n = _record_buf_n.data for _i in range(_num_array_statemonitor_5__indices): # vector code _idx = _array_statemonitor_5__indices[_i] _vectorisation_idx = _idx _source_n = _array_DG_inh_n[_idx] _source_v = _array_DG_inh_v[_idx] _source_m = _array_DG_inh_m[_idx] _source_h = _array_DG_inh_h[_idx] _to_record_v = _source_v _to_record_m = _source_m _to_record_n = _source_n _to_record_h = _source_h _record_data_n[(_new_len-1)*_num_array_statemonitor_5__indices + _i] = _to_record_n # Resize the recorded variable "v" and get the (potentially # changed) reference to the underlying data _var_v.resize((_new_len, _num_array_statemonitor_5__indices)) cdef _numpy.ndarray[double, ndim=2, mode='c'] _record_buf_v = _dynamic_array_statemonitor_5_v.data cdef double* _record_data_v = _record_buf_v.data for _i in range(_num_array_statemonitor_5__indices): # vector code _idx = _array_statemonitor_5__indices[_i] _vectorisation_idx = _idx _source_n = _array_DG_inh_n[_idx] _source_v = _array_DG_inh_v[_idx] _source_m = _array_DG_inh_m[_idx] _source_h = _array_DG_inh_h[_idx] _to_record_v = _source_v _to_record_m = _source_m _to_record_n = _source_n _to_record_h = _source_h _record_data_v[(_new_len-1)*_num_array_statemonitor_5__indices + _i] = _to_record_v # set the N variable explicitly (since we do not call `StateMonitor.resize`) _array_statemonitor_5_N[0] = _new_len before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_statemonitor_5_N = _namespace['_array_statemonitor_5_N'] cdef int32_t * _array_statemonitor_5_N = _buf__array_statemonitor_5_N.data cdef int32_t N _var__clock_t = _namespace["_var__clock_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double _clock_t _var__indices = _namespace["_var__indices"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_statemonitor_5__indices = _namespace['_array_statemonitor_5__indices'] cdef int32_t * _array_statemonitor_5__indices = _buf__array_statemonitor_5__indices.data cdef size_t _num_array_statemonitor_5__indices = len(_namespace['_array_statemonitor_5__indices']) cdef int32_t _indices _var__source_h = _namespace["_var__source_h"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_inh_h = _namespace['_array_DG_inh_h'] cdef double * _array_DG_inh_h = _buf__array_DG_inh_h.data cdef size_t _num_array_DG_inh_h = len(_namespace['_array_DG_inh_h']) cdef double _source_h _var__source_m = _namespace["_var__source_m"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_inh_m = _namespace['_array_DG_inh_m'] cdef double * _array_DG_inh_m = _buf__array_DG_inh_m.data cdef size_t _num_array_DG_inh_m = len(_namespace['_array_DG_inh_m']) cdef double _source_m _var__source_n = _namespace["_var__source_n"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_inh_n = _namespace['_array_DG_inh_n'] cdef double * _array_DG_inh_n = _buf__array_DG_inh_n.data cdef size_t _num_array_DG_inh_n = len(_namespace['_array_DG_inh_n']) cdef double _source_n _var__source_v = _namespace["_var__source_v"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_inh_v = _namespace['_array_DG_inh_v'] cdef double * _array_DG_inh_v = _buf__array_DG_inh_v.data cdef size_t _num_array_DG_inh_v = len(_namespace['_array_DG_inh_v']) cdef double _source_v cdef double _to_record_h cdef double _to_record_m cdef double _to_record_n cdef double _to_record_v _var_h = _namespace["_var_h"] _dynamic_array_statemonitor_5_h = _namespace["_dynamic_array_statemonitor_5_h"] _var_m = _namespace["_var_m"] _dynamic_array_statemonitor_5_m = _namespace["_dynamic_array_statemonitor_5_m"] _var_n = _namespace["_var_n"] _dynamic_array_statemonitor_5_n = _namespace["_dynamic_array_statemonitor_5_n"] _var_t = _namespace["_var_t"] _dynamic_array_statemonitor_5_t = _namespace["_dynamic_array_statemonitor_5_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_statemonitor_5_t = _namespace['_array_statemonitor_5_t'] cdef double * _array_statemonitor_5_t = _buf__array_statemonitor_5_t.data cdef size_t _num_array_statemonitor_5_t = len(_namespace['_array_statemonitor_5_t']) cdef double t _var_v = _namespace["_var_v"] _dynamic_array_statemonitor_5_v = _namespace["_dynamic_array_statemonitor_5_v"] if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_statemonitor_5_N = _namespace['_array_statemonitor_5_N'] cdef int32_t * _array_statemonitor_5_N = _buf__array_statemonitor_5_N.data cdef int32_t N _var__clock_t = _namespace["_var__clock_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double _clock_t _var__indices = _namespace["_var__indices"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_statemonitor_5__indices = _namespace['_array_statemonitor_5__indices'] cdef int32_t * _array_statemonitor_5__indices = _buf__array_statemonitor_5__indices.data cdef size_t _num_array_statemonitor_5__indices = len(_namespace['_array_statemonitor_5__indices']) cdef int32_t _indices _var__source_h = _namespace["_var__source_h"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_inh_h = _namespace['_array_DG_inh_h'] cdef double * _array_DG_inh_h = _buf__array_DG_inh_h.data cdef size_t _num_array_DG_inh_h = len(_namespace['_array_DG_inh_h']) cdef double _source_h _var__source_m = _namespace["_var__source_m"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_inh_m = _namespace['_array_DG_inh_m'] cdef double * _array_DG_inh_m = _buf__array_DG_inh_m.data cdef size_t _num_array_DG_inh_m = len(_namespace['_array_DG_inh_m']) cdef double _source_m _var__source_n = _namespace["_var__source_n"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_inh_n = _namespace['_array_DG_inh_n'] cdef double * _array_DG_inh_n = _buf__array_DG_inh_n.data cdef size_t _num_array_DG_inh_n = len(_namespace['_array_DG_inh_n']) cdef double _source_n _var__source_v = _namespace["_var__source_v"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_inh_v = _namespace['_array_DG_inh_v'] cdef double * _array_DG_inh_v = _buf__array_DG_inh_v.data cdef size_t _num_array_DG_inh_v = len(_namespace['_array_DG_inh_v']) cdef double _source_v cdef double _to_record_h cdef double _to_record_m cdef double _to_record_n cdef double _to_record_v _var_h = _namespace["_var_h"] _dynamic_array_statemonitor_5_h = _namespace["_dynamic_array_statemonitor_5_h"] _var_m = _namespace["_var_m"] _dynamic_array_statemonitor_5_m = _namespace["_dynamic_array_statemonitor_5_m"] _var_n = _namespace["_var_n"] _dynamic_array_statemonitor_5_n = _namespace["_dynamic_array_statemonitor_5_n"] _var_t = _namespace["_var_t"] _dynamic_array_statemonitor_5_t = _namespace["_dynamic_array_statemonitor_5_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_statemonitor_5_t = _namespace['_array_statemonitor_5_t'] cdef double * _array_statemonitor_5_t = _buf__array_statemonitor_5_t.data cdef size_t _num_array_statemonitor_5_t = len(_namespace['_array_statemonitor_5_t']) cdef double t _var_v = _namespace["_var_v"] _dynamic_array_statemonitor_5_v = _namespace["_dynamic_array_statemonitor_5_v"] if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:15:01,149 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name statemonitor_5_codeobject 2021-11-05 15:15:01,150 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "statemonitor_5_statemonitor" using Cython module "_cython_magic_3f332cc9a07f1eb987fa6940375e80ff" 2021-11-05 15:15:01,150 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140606221787536 on /home/nikos/.cython/brian_extensions/_cython_magic_3f332cc9a07f1eb987fa6940375e80ff.lock 2021-11-05 15:15:01,150 DEBUG brian2.utils.filelock: Lock 140606221787536 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_3f332cc9a07f1eb987fa6940375e80ff.lock 2021-11-05 15:15:02,365 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140606221787536 on /home/nikos/.cython/brian_extensions/_cython_magic_3f332cc9a07f1eb987fa6940375e80ff.lock 2021-11-05 15:15:02,365 DEBUG brian2.utils.filelock: Lock 140606221787536 released on /home/nikos/.cython/brian_extensions/_cython_magic_3f332cc9a07f1eb987fa6940375e80ff.lock 2021-11-05 15:15:02,365 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=statemonitor_6, template name=statemonitor) for abstract code: _to_record_v = _source_v _to_record_m = _source_m _to_record_n = _source_n _to_record_h = _source_h 2021-11-05 15:15:02,366 DIAGNOSTIC brian2.devices.device: statemonitor_6_codeobject abstract code: _to_record_v = _source_v _to_record_m = _source_m _to_record_n = _source_n _to_record_h = _source_h 2021-11-05 15:15:02,369 DIAGNOSTIC brian2.devices.device: statemonitor_6_codeobject snippet (scalar): 2021-11-05 15:15:02,369 DIAGNOSTIC brian2.devices.device: statemonitor_6_codeobject snippet (vector): _source_n = _array_CA3_inh_n[_idx] _source_v = _array_CA3_inh_v[_idx] _source_m = _array_CA3_inh_m[_idx] _source_h = _array_CA3_inh_h[_idx] _to_record_v = _source_v _to_record_m = _source_m _to_record_n = _source_n _to_record_h = _source_h 2021-11-05 15:15:02,369 DIAGNOSTIC brian2.devices.device: statemonitor_6_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_statemonitor_6_N = _namespace['_array_statemonitor_6_N'] cdef int32_t * _array_statemonitor_6_N = _buf__array_statemonitor_6_N.data cdef int32_t N _var__clock_t = _namespace["_var__clock_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double _clock_t _var__indices = _namespace["_var__indices"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_statemonitor_6__indices = _namespace['_array_statemonitor_6__indices'] cdef int32_t * _array_statemonitor_6__indices = _buf__array_statemonitor_6__indices.data cdef size_t _num_array_statemonitor_6__indices = len(_namespace['_array_statemonitor_6__indices']) cdef int32_t _indices _var__source_h = _namespace["_var__source_h"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_inh_h = _namespace['_array_CA3_inh_h'] cdef double * _array_CA3_inh_h = _buf__array_CA3_inh_h.data cdef size_t _num_array_CA3_inh_h = len(_namespace['_array_CA3_inh_h']) cdef double _source_h _var__source_m = _namespace["_var__source_m"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_inh_m = _namespace['_array_CA3_inh_m'] cdef double * _array_CA3_inh_m = _buf__array_CA3_inh_m.data cdef size_t _num_array_CA3_inh_m = len(_namespace['_array_CA3_inh_m']) cdef double _source_m _var__source_n = _namespace["_var__source_n"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_inh_n = _namespace['_array_CA3_inh_n'] cdef double * _array_CA3_inh_n = _buf__array_CA3_inh_n.data cdef size_t _num_array_CA3_inh_n = len(_namespace['_array_CA3_inh_n']) cdef double _source_n _var__source_v = _namespace["_var__source_v"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_inh_v = _namespace['_array_CA3_inh_v'] cdef double * _array_CA3_inh_v = _buf__array_CA3_inh_v.data cdef size_t _num_array_CA3_inh_v = len(_namespace['_array_CA3_inh_v']) cdef double _source_v cdef double _to_record_h cdef double _to_record_m cdef double _to_record_n cdef double _to_record_v _var_h = _namespace["_var_h"] _dynamic_array_statemonitor_6_h = _namespace["_dynamic_array_statemonitor_6_h"] _var_m = _namespace["_var_m"] _dynamic_array_statemonitor_6_m = _namespace["_dynamic_array_statemonitor_6_m"] _var_n = _namespace["_var_n"] _dynamic_array_statemonitor_6_n = _namespace["_dynamic_array_statemonitor_6_n"] _var_t = _namespace["_var_t"] _dynamic_array_statemonitor_6_t = _namespace["_dynamic_array_statemonitor_6_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_statemonitor_6_t = _namespace['_array_statemonitor_6_t'] cdef double * _array_statemonitor_6_t = _buf__array_statemonitor_6_t.data cdef size_t _num_array_statemonitor_6_t = len(_namespace['_array_statemonitor_6_t']) cdef double t _var_v = _namespace["_var_v"] _dynamic_array_statemonitor_6_v = _namespace["_dynamic_array_statemonitor_6_v"] if '_owner' in _namespace: _owner = _namespace['_owner'] cdef size_t _new_len = _array_statemonitor_6_N[0] + 1 # Resize the recorded times _var_t.resize(_new_len) _dynamic_array_statemonitor_6_t[_new_len-1] = _array_defaultclock_t[0] # scalar code _vectorisation_idx = 1 cdef size_t _i # Resize the recorded variable "h" and get the (potentially # changed) reference to the underlying data _var_h.resize((_new_len, _num_array_statemonitor_6__indices)) cdef _numpy.ndarray[double, ndim=2, mode='c'] _record_buf_h = _dynamic_array_statemonitor_6_h.data cdef double* _record_data_h = _record_buf_h.data for _i in range(_num_array_statemonitor_6__indices): # vector code _idx = _array_statemonitor_6__indices[_i] _vectorisation_idx = _idx _source_n = _array_CA3_inh_n[_idx] _source_v = _array_CA3_inh_v[_idx] _source_m = _array_CA3_inh_m[_idx] _source_h = _array_CA3_inh_h[_idx] _to_record_v = _source_v _to_record_m = _source_m _to_record_n = _source_n _to_record_h = _source_h _record_data_h[(_new_len-1)*_num_array_statemonitor_6__indices + _i] = _to_record_h # Resize the recorded variable "m" and get the (potentially # changed) reference to the underlying data _var_m.resize((_new_len, _num_array_statemonitor_6__indices)) cdef _numpy.ndarray[double, ndim=2, mode='c'] _record_buf_m = _dynamic_array_statemonitor_6_m.data cdef double* _record_data_m = _record_buf_m.data for _i in range(_num_array_statemonitor_6__indices): # vector code _idx = _array_statemonitor_6__indices[_i] _vectorisation_idx = _idx _source_n = _array_CA3_inh_n[_idx] _source_v = _array_CA3_inh_v[_idx] _source_m = _array_CA3_inh_m[_idx] _source_h = _array_CA3_inh_h[_idx] _to_record_v = _source_v _to_record_m = _source_m _to_record_n = _source_n _to_record_h = _source_h _record_data_m[(_new_len-1)*_num_array_statemonitor_6__indices + _i] = _to_record_m # Resize the recorded variable "n" and get the (potentially # changed) reference to the underlying data _var_n.resize((_new_len, _num_array_statemonitor_6__indices)) cdef _numpy.ndarray[double, ndim=2, mode='c'] _record_buf_n = _dynamic_array_statemonitor_6_n.data cdef double* _record_data_n = _record_buf_n.data for _i in range(_num_array_statemonitor_6__indices): # vector code _idx = _array_statemonitor_6__indices[_i] _vectorisation_idx = _idx _source_n = _array_CA3_inh_n[_idx] _source_v = _array_CA3_inh_v[_idx] _source_m = _array_CA3_inh_m[_idx] _source_h = _array_CA3_inh_h[_idx] _to_record_v = _source_v _to_record_m = _source_m _to_record_n = _source_n _to_record_h = _source_h _record_data_n[(_new_len-1)*_num_array_statemonitor_6__indices + _i] = _to_record_n # Resize the recorded variable "v" and get the (potentially # changed) reference to the underlying data _var_v.resize((_new_len, _num_array_statemonitor_6__indices)) cdef _numpy.ndarray[double, ndim=2, mode='c'] _record_buf_v = _dynamic_array_statemonitor_6_v.data cdef double* _record_data_v = _record_buf_v.data for _i in range(_num_array_statemonitor_6__indices): # vector code _idx = _array_statemonitor_6__indices[_i] _vectorisation_idx = _idx _source_n = _array_CA3_inh_n[_idx] _source_v = _array_CA3_inh_v[_idx] _source_m = _array_CA3_inh_m[_idx] _source_h = _array_CA3_inh_h[_idx] _to_record_v = _source_v _to_record_m = _source_m _to_record_n = _source_n _to_record_h = _source_h _record_data_v[(_new_len-1)*_num_array_statemonitor_6__indices + _i] = _to_record_v # set the N variable explicitly (since we do not call `StateMonitor.resize`) _array_statemonitor_6_N[0] = _new_len before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_statemonitor_6_N = _namespace['_array_statemonitor_6_N'] cdef int32_t * _array_statemonitor_6_N = _buf__array_statemonitor_6_N.data cdef int32_t N _var__clock_t = _namespace["_var__clock_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double _clock_t _var__indices = _namespace["_var__indices"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_statemonitor_6__indices = _namespace['_array_statemonitor_6__indices'] cdef int32_t * _array_statemonitor_6__indices = _buf__array_statemonitor_6__indices.data cdef size_t _num_array_statemonitor_6__indices = len(_namespace['_array_statemonitor_6__indices']) cdef int32_t _indices _var__source_h = _namespace["_var__source_h"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_inh_h = _namespace['_array_CA3_inh_h'] cdef double * _array_CA3_inh_h = _buf__array_CA3_inh_h.data cdef size_t _num_array_CA3_inh_h = len(_namespace['_array_CA3_inh_h']) cdef double _source_h _var__source_m = _namespace["_var__source_m"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_inh_m = _namespace['_array_CA3_inh_m'] cdef double * _array_CA3_inh_m = _buf__array_CA3_inh_m.data cdef size_t _num_array_CA3_inh_m = len(_namespace['_array_CA3_inh_m']) cdef double _source_m _var__source_n = _namespace["_var__source_n"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_inh_n = _namespace['_array_CA3_inh_n'] cdef double * _array_CA3_inh_n = _buf__array_CA3_inh_n.data cdef size_t _num_array_CA3_inh_n = len(_namespace['_array_CA3_inh_n']) cdef double _source_n _var__source_v = _namespace["_var__source_v"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_inh_v = _namespace['_array_CA3_inh_v'] cdef double * _array_CA3_inh_v = _buf__array_CA3_inh_v.data cdef size_t _num_array_CA3_inh_v = len(_namespace['_array_CA3_inh_v']) cdef double _source_v cdef double _to_record_h cdef double _to_record_m cdef double _to_record_n cdef double _to_record_v _var_h = _namespace["_var_h"] _dynamic_array_statemonitor_6_h = _namespace["_dynamic_array_statemonitor_6_h"] _var_m = _namespace["_var_m"] _dynamic_array_statemonitor_6_m = _namespace["_dynamic_array_statemonitor_6_m"] _var_n = _namespace["_var_n"] _dynamic_array_statemonitor_6_n = _namespace["_dynamic_array_statemonitor_6_n"] _var_t = _namespace["_var_t"] _dynamic_array_statemonitor_6_t = _namespace["_dynamic_array_statemonitor_6_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_statemonitor_6_t = _namespace['_array_statemonitor_6_t'] cdef double * _array_statemonitor_6_t = _buf__array_statemonitor_6_t.data cdef size_t _num_array_statemonitor_6_t = len(_namespace['_array_statemonitor_6_t']) cdef double t _var_v = _namespace["_var_v"] _dynamic_array_statemonitor_6_v = _namespace["_dynamic_array_statemonitor_6_v"] if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_statemonitor_6_N = _namespace['_array_statemonitor_6_N'] cdef int32_t * _array_statemonitor_6_N = _buf__array_statemonitor_6_N.data cdef int32_t N _var__clock_t = _namespace["_var__clock_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double _clock_t _var__indices = _namespace["_var__indices"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_statemonitor_6__indices = _namespace['_array_statemonitor_6__indices'] cdef int32_t * _array_statemonitor_6__indices = _buf__array_statemonitor_6__indices.data cdef size_t _num_array_statemonitor_6__indices = len(_namespace['_array_statemonitor_6__indices']) cdef int32_t _indices _var__source_h = _namespace["_var__source_h"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_inh_h = _namespace['_array_CA3_inh_h'] cdef double * _array_CA3_inh_h = _buf__array_CA3_inh_h.data cdef size_t _num_array_CA3_inh_h = len(_namespace['_array_CA3_inh_h']) cdef double _source_h _var__source_m = _namespace["_var__source_m"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_inh_m = _namespace['_array_CA3_inh_m'] cdef double * _array_CA3_inh_m = _buf__array_CA3_inh_m.data cdef size_t _num_array_CA3_inh_m = len(_namespace['_array_CA3_inh_m']) cdef double _source_m _var__source_n = _namespace["_var__source_n"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_inh_n = _namespace['_array_CA3_inh_n'] cdef double * _array_CA3_inh_n = _buf__array_CA3_inh_n.data cdef size_t _num_array_CA3_inh_n = len(_namespace['_array_CA3_inh_n']) cdef double _source_n _var__source_v = _namespace["_var__source_v"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_inh_v = _namespace['_array_CA3_inh_v'] cdef double * _array_CA3_inh_v = _buf__array_CA3_inh_v.data cdef size_t _num_array_CA3_inh_v = len(_namespace['_array_CA3_inh_v']) cdef double _source_v cdef double _to_record_h cdef double _to_record_m cdef double _to_record_n cdef double _to_record_v _var_h = _namespace["_var_h"] _dynamic_array_statemonitor_6_h = _namespace["_dynamic_array_statemonitor_6_h"] _var_m = _namespace["_var_m"] _dynamic_array_statemonitor_6_m = _namespace["_dynamic_array_statemonitor_6_m"] _var_n = _namespace["_var_n"] _dynamic_array_statemonitor_6_n = _namespace["_dynamic_array_statemonitor_6_n"] _var_t = _namespace["_var_t"] _dynamic_array_statemonitor_6_t = _namespace["_dynamic_array_statemonitor_6_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_statemonitor_6_t = _namespace['_array_statemonitor_6_t'] cdef double * _array_statemonitor_6_t = _buf__array_statemonitor_6_t.data cdef size_t _num_array_statemonitor_6_t = len(_namespace['_array_statemonitor_6_t']) cdef double t _var_v = _namespace["_var_v"] _dynamic_array_statemonitor_6_v = _namespace["_dynamic_array_statemonitor_6_v"] if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:15:02,369 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name statemonitor_6_codeobject 2021-11-05 15:15:02,370 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "statemonitor_6_statemonitor" using Cython module "_cython_magic_157415993b87db1d7851d32b8938c2f2" 2021-11-05 15:15:02,370 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140606333754528 on /home/nikos/.cython/brian_extensions/_cython_magic_157415993b87db1d7851d32b8938c2f2.lock 2021-11-05 15:15:02,370 DEBUG brian2.utils.filelock: Lock 140606333754528 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_157415993b87db1d7851d32b8938c2f2.lock 2021-11-05 15:15:03,605 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140606333754528 on /home/nikos/.cython/brian_extensions/_cython_magic_157415993b87db1d7851d32b8938c2f2.lock 2021-11-05 15:15:03,605 DEBUG brian2.utils.filelock: Lock 140606333754528 released on /home/nikos/.cython/brian_extensions/_cython_magic_157415993b87db1d7851d32b8938c2f2.lock 2021-11-05 15:15:03,605 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=statemonitor_7, template name=statemonitor) for abstract code: _to_record_v = _source_v _to_record_m = _source_m _to_record_n = _source_n _to_record_h = _source_h 2021-11-05 15:15:03,607 DIAGNOSTIC brian2.devices.device: statemonitor_7_codeobject abstract code: _to_record_v = _source_v _to_record_m = _source_m _to_record_n = _source_n _to_record_h = _source_h 2021-11-05 15:15:03,607 DIAGNOSTIC brian2.devices.device: statemonitor_7_codeobject snippet (scalar): 2021-11-05 15:15:03,608 DIAGNOSTIC brian2.devices.device: statemonitor_7_codeobject snippet (vector): _source_n = _array_CA1_inh_n[_idx] _source_v = _array_CA1_inh_v[_idx] _source_m = _array_CA1_inh_m[_idx] _source_h = _array_CA1_inh_h[_idx] _to_record_v = _source_v _to_record_m = _source_m _to_record_n = _source_n _to_record_h = _source_h 2021-11-05 15:15:03,608 DIAGNOSTIC brian2.devices.device: statemonitor_7_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_statemonitor_7_N = _namespace['_array_statemonitor_7_N'] cdef int32_t * _array_statemonitor_7_N = _buf__array_statemonitor_7_N.data cdef int32_t N _var__clock_t = _namespace["_var__clock_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double _clock_t _var__indices = _namespace["_var__indices"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_statemonitor_7__indices = _namespace['_array_statemonitor_7__indices'] cdef int32_t * _array_statemonitor_7__indices = _buf__array_statemonitor_7__indices.data cdef size_t _num_array_statemonitor_7__indices = len(_namespace['_array_statemonitor_7__indices']) cdef int32_t _indices _var__source_h = _namespace["_var__source_h"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_h = _namespace['_array_CA1_inh_h'] cdef double * _array_CA1_inh_h = _buf__array_CA1_inh_h.data cdef size_t _num_array_CA1_inh_h = len(_namespace['_array_CA1_inh_h']) cdef double _source_h _var__source_m = _namespace["_var__source_m"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_m = _namespace['_array_CA1_inh_m'] cdef double * _array_CA1_inh_m = _buf__array_CA1_inh_m.data cdef size_t _num_array_CA1_inh_m = len(_namespace['_array_CA1_inh_m']) cdef double _source_m _var__source_n = _namespace["_var__source_n"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_n = _namespace['_array_CA1_inh_n'] cdef double * _array_CA1_inh_n = _buf__array_CA1_inh_n.data cdef size_t _num_array_CA1_inh_n = len(_namespace['_array_CA1_inh_n']) cdef double _source_n _var__source_v = _namespace["_var__source_v"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_v = _namespace['_array_CA1_inh_v'] cdef double * _array_CA1_inh_v = _buf__array_CA1_inh_v.data cdef size_t _num_array_CA1_inh_v = len(_namespace['_array_CA1_inh_v']) cdef double _source_v cdef double _to_record_h cdef double _to_record_m cdef double _to_record_n cdef double _to_record_v _var_h = _namespace["_var_h"] _dynamic_array_statemonitor_7_h = _namespace["_dynamic_array_statemonitor_7_h"] _var_m = _namespace["_var_m"] _dynamic_array_statemonitor_7_m = _namespace["_dynamic_array_statemonitor_7_m"] _var_n = _namespace["_var_n"] _dynamic_array_statemonitor_7_n = _namespace["_dynamic_array_statemonitor_7_n"] _var_t = _namespace["_var_t"] _dynamic_array_statemonitor_7_t = _namespace["_dynamic_array_statemonitor_7_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_statemonitor_7_t = _namespace['_array_statemonitor_7_t'] cdef double * _array_statemonitor_7_t = _buf__array_statemonitor_7_t.data cdef size_t _num_array_statemonitor_7_t = len(_namespace['_array_statemonitor_7_t']) cdef double t _var_v = _namespace["_var_v"] _dynamic_array_statemonitor_7_v = _namespace["_dynamic_array_statemonitor_7_v"] if '_owner' in _namespace: _owner = _namespace['_owner'] cdef size_t _new_len = _array_statemonitor_7_N[0] + 1 # Resize the recorded times _var_t.resize(_new_len) _dynamic_array_statemonitor_7_t[_new_len-1] = _array_defaultclock_t[0] # scalar code _vectorisation_idx = 1 cdef size_t _i # Resize the recorded variable "h" and get the (potentially # changed) reference to the underlying data _var_h.resize((_new_len, _num_array_statemonitor_7__indices)) cdef _numpy.ndarray[double, ndim=2, mode='c'] _record_buf_h = _dynamic_array_statemonitor_7_h.data cdef double* _record_data_h = _record_buf_h.data for _i in range(_num_array_statemonitor_7__indices): # vector code _idx = _array_statemonitor_7__indices[_i] _vectorisation_idx = _idx _source_n = _array_CA1_inh_n[_idx] _source_v = _array_CA1_inh_v[_idx] _source_m = _array_CA1_inh_m[_idx] _source_h = _array_CA1_inh_h[_idx] _to_record_v = _source_v _to_record_m = _source_m _to_record_n = _source_n _to_record_h = _source_h _record_data_h[(_new_len-1)*_num_array_statemonitor_7__indices + _i] = _to_record_h # Resize the recorded variable "m" and get the (potentially # changed) reference to the underlying data _var_m.resize((_new_len, _num_array_statemonitor_7__indices)) cdef _numpy.ndarray[double, ndim=2, mode='c'] _record_buf_m = _dynamic_array_statemonitor_7_m.data cdef double* _record_data_m = _record_buf_m.data for _i in range(_num_array_statemonitor_7__indices): # vector code _idx = _array_statemonitor_7__indices[_i] _vectorisation_idx = _idx _source_n = _array_CA1_inh_n[_idx] _source_v = _array_CA1_inh_v[_idx] _source_m = _array_CA1_inh_m[_idx] _source_h = _array_CA1_inh_h[_idx] _to_record_v = _source_v _to_record_m = _source_m _to_record_n = _source_n _to_record_h = _source_h _record_data_m[(_new_len-1)*_num_array_statemonitor_7__indices + _i] = _to_record_m # Resize the recorded variable "n" and get the (potentially # changed) reference to the underlying data _var_n.resize((_new_len, _num_array_statemonitor_7__indices)) cdef _numpy.ndarray[double, ndim=2, mode='c'] _record_buf_n = _dynamic_array_statemonitor_7_n.data cdef double* _record_data_n = _record_buf_n.data for _i in range(_num_array_statemonitor_7__indices): # vector code _idx = _array_statemonitor_7__indices[_i] _vectorisation_idx = _idx _source_n = _array_CA1_inh_n[_idx] _source_v = _array_CA1_inh_v[_idx] _source_m = _array_CA1_inh_m[_idx] _source_h = _array_CA1_inh_h[_idx] _to_record_v = _source_v _to_record_m = _source_m _to_record_n = _source_n _to_record_h = _source_h _record_data_n[(_new_len-1)*_num_array_statemonitor_7__indices + _i] = _to_record_n # Resize the recorded variable "v" and get the (potentially # changed) reference to the underlying data _var_v.resize((_new_len, _num_array_statemonitor_7__indices)) cdef _numpy.ndarray[double, ndim=2, mode='c'] _record_buf_v = _dynamic_array_statemonitor_7_v.data cdef double* _record_data_v = _record_buf_v.data for _i in range(_num_array_statemonitor_7__indices): # vector code _idx = _array_statemonitor_7__indices[_i] _vectorisation_idx = _idx _source_n = _array_CA1_inh_n[_idx] _source_v = _array_CA1_inh_v[_idx] _source_m = _array_CA1_inh_m[_idx] _source_h = _array_CA1_inh_h[_idx] _to_record_v = _source_v _to_record_m = _source_m _to_record_n = _source_n _to_record_h = _source_h _record_data_v[(_new_len-1)*_num_array_statemonitor_7__indices + _i] = _to_record_v # set the N variable explicitly (since we do not call `StateMonitor.resize`) _array_statemonitor_7_N[0] = _new_len before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_statemonitor_7_N = _namespace['_array_statemonitor_7_N'] cdef int32_t * _array_statemonitor_7_N = _buf__array_statemonitor_7_N.data cdef int32_t N _var__clock_t = _namespace["_var__clock_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double _clock_t _var__indices = _namespace["_var__indices"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_statemonitor_7__indices = _namespace['_array_statemonitor_7__indices'] cdef int32_t * _array_statemonitor_7__indices = _buf__array_statemonitor_7__indices.data cdef size_t _num_array_statemonitor_7__indices = len(_namespace['_array_statemonitor_7__indices']) cdef int32_t _indices _var__source_h = _namespace["_var__source_h"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_h = _namespace['_array_CA1_inh_h'] cdef double * _array_CA1_inh_h = _buf__array_CA1_inh_h.data cdef size_t _num_array_CA1_inh_h = len(_namespace['_array_CA1_inh_h']) cdef double _source_h _var__source_m = _namespace["_var__source_m"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_m = _namespace['_array_CA1_inh_m'] cdef double * _array_CA1_inh_m = _buf__array_CA1_inh_m.data cdef size_t _num_array_CA1_inh_m = len(_namespace['_array_CA1_inh_m']) cdef double _source_m _var__source_n = _namespace["_var__source_n"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_n = _namespace['_array_CA1_inh_n'] cdef double * _array_CA1_inh_n = _buf__array_CA1_inh_n.data cdef size_t _num_array_CA1_inh_n = len(_namespace['_array_CA1_inh_n']) cdef double _source_n _var__source_v = _namespace["_var__source_v"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_v = _namespace['_array_CA1_inh_v'] cdef double * _array_CA1_inh_v = _buf__array_CA1_inh_v.data cdef size_t _num_array_CA1_inh_v = len(_namespace['_array_CA1_inh_v']) cdef double _source_v cdef double _to_record_h cdef double _to_record_m cdef double _to_record_n cdef double _to_record_v _var_h = _namespace["_var_h"] _dynamic_array_statemonitor_7_h = _namespace["_dynamic_array_statemonitor_7_h"] _var_m = _namespace["_var_m"] _dynamic_array_statemonitor_7_m = _namespace["_dynamic_array_statemonitor_7_m"] _var_n = _namespace["_var_n"] _dynamic_array_statemonitor_7_n = _namespace["_dynamic_array_statemonitor_7_n"] _var_t = _namespace["_var_t"] _dynamic_array_statemonitor_7_t = _namespace["_dynamic_array_statemonitor_7_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_statemonitor_7_t = _namespace['_array_statemonitor_7_t'] cdef double * _array_statemonitor_7_t = _buf__array_statemonitor_7_t.data cdef size_t _num_array_statemonitor_7_t = len(_namespace['_array_statemonitor_7_t']) cdef double t _var_v = _namespace["_var_v"] _dynamic_array_statemonitor_7_v = _namespace["_dynamic_array_statemonitor_7_v"] if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_statemonitor_7_N = _namespace['_array_statemonitor_7_N'] cdef int32_t * _array_statemonitor_7_N = _buf__array_statemonitor_7_N.data cdef int32_t N _var__clock_t = _namespace["_var__clock_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double _clock_t _var__indices = _namespace["_var__indices"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_statemonitor_7__indices = _namespace['_array_statemonitor_7__indices'] cdef int32_t * _array_statemonitor_7__indices = _buf__array_statemonitor_7__indices.data cdef size_t _num_array_statemonitor_7__indices = len(_namespace['_array_statemonitor_7__indices']) cdef int32_t _indices _var__source_h = _namespace["_var__source_h"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_h = _namespace['_array_CA1_inh_h'] cdef double * _array_CA1_inh_h = _buf__array_CA1_inh_h.data cdef size_t _num_array_CA1_inh_h = len(_namespace['_array_CA1_inh_h']) cdef double _source_h _var__source_m = _namespace["_var__source_m"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_m = _namespace['_array_CA1_inh_m'] cdef double * _array_CA1_inh_m = _buf__array_CA1_inh_m.data cdef size_t _num_array_CA1_inh_m = len(_namespace['_array_CA1_inh_m']) cdef double _source_m _var__source_n = _namespace["_var__source_n"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_n = _namespace['_array_CA1_inh_n'] cdef double * _array_CA1_inh_n = _buf__array_CA1_inh_n.data cdef size_t _num_array_CA1_inh_n = len(_namespace['_array_CA1_inh_n']) cdef double _source_n _var__source_v = _namespace["_var__source_v"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_v = _namespace['_array_CA1_inh_v'] cdef double * _array_CA1_inh_v = _buf__array_CA1_inh_v.data cdef size_t _num_array_CA1_inh_v = len(_namespace['_array_CA1_inh_v']) cdef double _source_v cdef double _to_record_h cdef double _to_record_m cdef double _to_record_n cdef double _to_record_v _var_h = _namespace["_var_h"] _dynamic_array_statemonitor_7_h = _namespace["_dynamic_array_statemonitor_7_h"] _var_m = _namespace["_var_m"] _dynamic_array_statemonitor_7_m = _namespace["_dynamic_array_statemonitor_7_m"] _var_n = _namespace["_var_n"] _dynamic_array_statemonitor_7_n = _namespace["_dynamic_array_statemonitor_7_n"] _var_t = _namespace["_var_t"] _dynamic_array_statemonitor_7_t = _namespace["_dynamic_array_statemonitor_7_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_statemonitor_7_t = _namespace['_array_statemonitor_7_t'] cdef double * _array_statemonitor_7_t = _buf__array_statemonitor_7_t.data cdef size_t _num_array_statemonitor_7_t = len(_namespace['_array_statemonitor_7_t']) cdef double t _var_v = _namespace["_var_v"] _dynamic_array_statemonitor_7_v = _namespace["_dynamic_array_statemonitor_7_v"] if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:15:03,608 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name statemonitor_7_codeobject 2021-11-05 15:15:03,609 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "statemonitor_7_statemonitor" using Cython module "_cython_magic_a70a6075826582a87ef2a6df3e719b60" 2021-11-05 15:15:03,609 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140606333753040 on /home/nikos/.cython/brian_extensions/_cython_magic_a70a6075826582a87ef2a6df3e719b60.lock 2021-11-05 15:15:03,609 DEBUG brian2.utils.filelock: Lock 140606333753040 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_a70a6075826582a87ef2a6df3e719b60.lock 2021-11-05 15:15:04,760 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140606333753040 on /home/nikos/.cython/brian_extensions/_cython_magic_a70a6075826582a87ef2a6df3e719b60.lock 2021-11-05 15:15:04,760 DEBUG brian2.utils.filelock: Lock 140606333753040 released on /home/nikos/.cython/brian_extensions/_cython_magic_a70a6075826582a87ef2a6df3e719b60.lock 2021-11-05 15:15:04,760 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=statemonitor_8, template name=statemonitor) for abstract code: _to_record_Theta = _source_Theta 2021-11-05 15:15:04,762 DIAGNOSTIC brian2.devices.device: statemonitor_8_codeobject abstract code: _to_record_Theta = _source_Theta 2021-11-05 15:15:04,762 DIAGNOSTIC brian2.devices.device: statemonitor_8_codeobject snippet (scalar): 2021-11-05 15:15:04,762 DIAGNOSTIC brian2.devices.device: statemonitor_8_codeobject snippet (vector): _source_Theta = _array_Kuramoto_oscillators_N_50_Theta[_idx] _to_record_Theta = _source_Theta 2021-11-05 15:15:04,763 DIAGNOSTIC brian2.devices.device: statemonitor_8_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_statemonitor_8_N = _namespace['_array_statemonitor_8_N'] cdef int32_t * _array_statemonitor_8_N = _buf__array_statemonitor_8_N.data cdef int32_t N _var_Theta = _namespace["_var_Theta"] _dynamic_array_statemonitor_8_Theta = _namespace["_dynamic_array_statemonitor_8_Theta"] _var__clock_t = _namespace["_var__clock_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double _clock_t _var__indices = _namespace["_var__indices"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_statemonitor_8__indices = _namespace['_array_statemonitor_8__indices'] cdef int32_t * _array_statemonitor_8__indices = _buf__array_statemonitor_8__indices.data cdef size_t _num_array_statemonitor_8__indices = len(_namespace['_array_statemonitor_8__indices']) cdef int32_t _indices _var__source_Theta = _namespace["_var__source_Theta"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_Kuramoto_oscillators_N_50_Theta = _namespace['_array_Kuramoto_oscillators_N_50_Theta'] cdef double * _array_Kuramoto_oscillators_N_50_Theta = _buf__array_Kuramoto_oscillators_N_50_Theta.data cdef size_t _num_array_Kuramoto_oscillators_N_50_Theta = len(_namespace['_array_Kuramoto_oscillators_N_50_Theta']) cdef double _source_Theta cdef double _to_record_Theta _var_t = _namespace["_var_t"] _dynamic_array_statemonitor_8_t = _namespace["_dynamic_array_statemonitor_8_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_statemonitor_8_t = _namespace['_array_statemonitor_8_t'] cdef double * _array_statemonitor_8_t = _buf__array_statemonitor_8_t.data cdef size_t _num_array_statemonitor_8_t = len(_namespace['_array_statemonitor_8_t']) cdef double t if '_owner' in _namespace: _owner = _namespace['_owner'] cdef size_t _new_len = _array_statemonitor_8_N[0] + 1 # Resize the recorded times _var_t.resize(_new_len) _dynamic_array_statemonitor_8_t[_new_len-1] = _array_defaultclock_t[0] # scalar code _vectorisation_idx = 1 cdef size_t _i # Resize the recorded variable "Theta" and get the (potentially # changed) reference to the underlying data _var_Theta.resize((_new_len, _num_array_statemonitor_8__indices)) cdef _numpy.ndarray[double, ndim=2, mode='c'] _record_buf_Theta = _dynamic_array_statemonitor_8_Theta.data cdef double* _record_data_Theta = _record_buf_Theta.data for _i in range(_num_array_statemonitor_8__indices): # vector code _idx = _array_statemonitor_8__indices[_i] _vectorisation_idx = _idx _source_Theta = _array_Kuramoto_oscillators_N_50_Theta[_idx] _to_record_Theta = _source_Theta _record_data_Theta[(_new_len-1)*_num_array_statemonitor_8__indices + _i] = _to_record_Theta # set the N variable explicitly (since we do not call `StateMonitor.resize`) _array_statemonitor_8_N[0] = _new_len before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_statemonitor_8_N = _namespace['_array_statemonitor_8_N'] cdef int32_t * _array_statemonitor_8_N = _buf__array_statemonitor_8_N.data cdef int32_t N _var_Theta = _namespace["_var_Theta"] _dynamic_array_statemonitor_8_Theta = _namespace["_dynamic_array_statemonitor_8_Theta"] _var__clock_t = _namespace["_var__clock_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double _clock_t _var__indices = _namespace["_var__indices"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_statemonitor_8__indices = _namespace['_array_statemonitor_8__indices'] cdef int32_t * _array_statemonitor_8__indices = _buf__array_statemonitor_8__indices.data cdef size_t _num_array_statemonitor_8__indices = len(_namespace['_array_statemonitor_8__indices']) cdef int32_t _indices _var__source_Theta = _namespace["_var__source_Theta"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_Kuramoto_oscillators_N_50_Theta = _namespace['_array_Kuramoto_oscillators_N_50_Theta'] cdef double * _array_Kuramoto_oscillators_N_50_Theta = _buf__array_Kuramoto_oscillators_N_50_Theta.data cdef size_t _num_array_Kuramoto_oscillators_N_50_Theta = len(_namespace['_array_Kuramoto_oscillators_N_50_Theta']) cdef double _source_Theta cdef double _to_record_Theta _var_t = _namespace["_var_t"] _dynamic_array_statemonitor_8_t = _namespace["_dynamic_array_statemonitor_8_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_statemonitor_8_t = _namespace['_array_statemonitor_8_t'] cdef double * _array_statemonitor_8_t = _buf__array_statemonitor_8_t.data cdef size_t _num_array_statemonitor_8_t = len(_namespace['_array_statemonitor_8_t']) cdef double t if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_statemonitor_8_N = _namespace['_array_statemonitor_8_N'] cdef int32_t * _array_statemonitor_8_N = _buf__array_statemonitor_8_N.data cdef int32_t N _var_Theta = _namespace["_var_Theta"] _dynamic_array_statemonitor_8_Theta = _namespace["_dynamic_array_statemonitor_8_Theta"] _var__clock_t = _namespace["_var__clock_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double _clock_t _var__indices = _namespace["_var__indices"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_statemonitor_8__indices = _namespace['_array_statemonitor_8__indices'] cdef int32_t * _array_statemonitor_8__indices = _buf__array_statemonitor_8__indices.data cdef size_t _num_array_statemonitor_8__indices = len(_namespace['_array_statemonitor_8__indices']) cdef int32_t _indices _var__source_Theta = _namespace["_var__source_Theta"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_Kuramoto_oscillators_N_50_Theta = _namespace['_array_Kuramoto_oscillators_N_50_Theta'] cdef double * _array_Kuramoto_oscillators_N_50_Theta = _buf__array_Kuramoto_oscillators_N_50_Theta.data cdef size_t _num_array_Kuramoto_oscillators_N_50_Theta = len(_namespace['_array_Kuramoto_oscillators_N_50_Theta']) cdef double _source_Theta cdef double _to_record_Theta _var_t = _namespace["_var_t"] _dynamic_array_statemonitor_8_t = _namespace["_dynamic_array_statemonitor_8_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_statemonitor_8_t = _namespace['_array_statemonitor_8_t'] cdef double * _array_statemonitor_8_t = _buf__array_statemonitor_8_t.data cdef size_t _num_array_statemonitor_8_t = len(_namespace['_array_statemonitor_8_t']) cdef double t if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:15:04,763 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name statemonitor_8_codeobject 2021-11-05 15:15:04,764 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "statemonitor_8_statemonitor" using Cython module "_cython_magic_8d3491cbcca773c06c60a1f5cc758724" 2021-11-05 15:15:04,764 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140606217856480 on /home/nikos/.cython/brian_extensions/_cython_magic_8d3491cbcca773c06c60a1f5cc758724.lock 2021-11-05 15:15:04,764 DEBUG brian2.utils.filelock: Lock 140606217856480 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_8d3491cbcca773c06c60a1f5cc758724.lock 2021-11-05 15:15:04,764 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140606217856480 on /home/nikos/.cython/brian_extensions/_cython_magic_8d3491cbcca773c06c60a1f5cc758724.lock 2021-11-05 15:15:04,764 DEBUG brian2.utils.filelock: Lock 140606217856480 released on /home/nikos/.cython/brian_extensions/_cython_magic_8d3491cbcca773c06c60a1f5cc758724.lock 2021-11-05 15:15:04,764 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=statemonitor_9, template name=statemonitor) for abstract code: _to_record_coherence = _source_coherence _to_record_phase = _source_phase _to_record_rhythm = _source_rhythm _to_record_rhythm_rect = _source_rhythm_rect 2021-11-05 15:15:04,767 DIAGNOSTIC brian2.devices.device: statemonitor_9_codeobject abstract code: _to_record_coherence = _source_coherence _to_record_phase = _source_phase _to_record_rhythm = _source_rhythm _to_record_rhythm_rect = _source_rhythm_rect 2021-11-05 15:15:04,772 DIAGNOSTIC brian2.devices.device: statemonitor_9_codeobject snippet (scalar): 2021-11-05 15:15:04,772 DIAGNOSTIC brian2.devices.device: statemonitor_9_codeobject snippet (vector): ___source_rhythm_neurongroup_coherence_neurongroup_y = _array_neurongroup_y[_idx] ____source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_x = _array_neurongroup_x[_idx] __source_coherence_neurongroup_x = _array_neurongroup_x[_idx] __source_coherence_neurongroup_y = _array_neurongroup_y[_idx] ___source_rhythm_neurongroup_phase_neurongroup_x = _array_neurongroup_x[_idx] ____source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_coherence_neurongroup_y = _array_neurongroup_y[_idx] __source_phase_neurongroup_y = _array_neurongroup_y[_idx] ____source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_y = _array_neurongroup_y[_idx] __source_phase_neurongroup_x = _array_neurongroup_x[_idx] ___source_rhythm_neurongroup_phase_neurongroup_y = _array_neurongroup_y[_idx] ___source_rhythm_neurongroup_coherence_neurongroup_x = _array_neurongroup_x[_idx] ____source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_coherence_neurongroup_x = _array_neurongroup_x[_idx] _source_coherence = sqrt((__source_coherence_neurongroup_x ** 2) + (__source_coherence_neurongroup_y ** 2)) _to_record_coherence = _source_coherence _source_phase = (atan(__source_phase_neurongroup_y / __source_phase_neurongroup_x) + (pi * int_((__source_phase_neurongroup_x < 0) and (__source_phase_neurongroup_y > 0)))) - (pi * int_((__source_phase_neurongroup_x < 0) and (__source_phase_neurongroup_y < 0))) _to_record_phase = _source_phase __source_rhythm_neurongroup_phase = (atan(___source_rhythm_neurongroup_phase_neurongroup_y / ___source_rhythm_neurongroup_phase_neurongroup_x) + (pi * int_((___source_rhythm_neurongroup_phase_neurongroup_x < 0) and (___source_rhythm_neurongroup_phase_neurongroup_y > 0)))) - (pi * int_((___source_rhythm_neurongroup_phase_neurongroup_x < 0) and (___source_rhythm_neurongroup_phase_neurongroup_y < 0))) __source_rhythm_neurongroup_coherence = sqrt((___source_rhythm_neurongroup_coherence_neurongroup_x ** 2) + (___source_rhythm_neurongroup_coherence_neurongroup_y ** 2)) _source_rhythm = __source_rhythm_neurongroup_coherence * sin(__source_rhythm_neurongroup_phase) _to_record_rhythm = _source_rhythm ___source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_coherence = sqrt((____source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_coherence_neurongroup_x ** 2) + (____source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_coherence_neurongroup_y ** 2)) ___source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_phase = (atan(____source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_y / ____source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_x) + (pi * int_((____source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_x < 0) and (____source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_y > 0)))) - (pi * int_((____source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_x < 0) and (____source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_y < 0))) __source_rhythm_rect_neurongroup_rhythm_pos = 0.5 * (___source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_coherence * (1.0 + sin(___source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_phase))) _source_rhythm_rect = nA * __source_rhythm_rect_neurongroup_rhythm_pos _to_record_rhythm_rect = _source_rhythm_rect 2021-11-05 15:15:04,773 DIAGNOSTIC brian2.devices.device: statemonitor_9_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_statemonitor_9_N = _namespace['_array_statemonitor_9_N'] cdef int32_t * _array_statemonitor_9_N = _buf__array_statemonitor_9_N.data cdef int32_t N _var_____source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_coherence_neurongroup_x = _namespace["_var_____source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_coherence_neurongroup_x"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_neurongroup_x = _namespace['_array_neurongroup_x'] cdef double * _array_neurongroup_x = _buf__array_neurongroup_x.data cdef size_t _num_array_neurongroup_x = len(_namespace['_array_neurongroup_x']) cdef double ____source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_coherence_neurongroup_x _var_____source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_coherence_neurongroup_y = _namespace["_var_____source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_coherence_neurongroup_y"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_neurongroup_y = _namespace['_array_neurongroup_y'] cdef double * _array_neurongroup_y = _buf__array_neurongroup_y.data cdef size_t _num_array_neurongroup_y = len(_namespace['_array_neurongroup_y']) cdef double ____source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_coherence_neurongroup_y _var_____source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_x = _namespace["_var_____source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_x"] _var_____source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_y = _namespace["_var_____source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_y"] _var____source_rhythm_neurongroup_coherence_neurongroup_x = _namespace["_var____source_rhythm_neurongroup_coherence_neurongroup_x"] _var____source_rhythm_neurongroup_coherence_neurongroup_y = _namespace["_var____source_rhythm_neurongroup_coherence_neurongroup_y"] _var____source_rhythm_neurongroup_phase_neurongroup_x = _namespace["_var____source_rhythm_neurongroup_phase_neurongroup_x"] _var____source_rhythm_neurongroup_phase_neurongroup_y = _namespace["_var____source_rhythm_neurongroup_phase_neurongroup_y"] cdef double ___source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_coherence cdef double ___source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_phase _var___source_coherence_neurongroup_x = _namespace["_var___source_coherence_neurongroup_x"] _var___source_coherence_neurongroup_y = _namespace["_var___source_coherence_neurongroup_y"] _var___source_phase_neurongroup_x = _namespace["_var___source_phase_neurongroup_x"] _var___source_phase_neurongroup_y = _namespace["_var___source_phase_neurongroup_y"] cdef double __source_rhythm_neurongroup_coherence cdef double __source_rhythm_neurongroup_phase cdef double __source_rhythm_rect_neurongroup_rhythm_pos _var__clock_t = _namespace["_var__clock_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double _clock_t _var__indices = _namespace["_var__indices"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_statemonitor_9__indices = _namespace['_array_statemonitor_9__indices'] cdef int32_t * _array_statemonitor_9__indices = _buf__array_statemonitor_9__indices.data cdef size_t _num_array_statemonitor_9__indices = len(_namespace['_array_statemonitor_9__indices']) cdef int32_t _indices cdef double _source_coherence cdef double _source_phase cdef double _source_rhythm cdef double _source_rhythm_rect cdef double _to_record_coherence cdef double _to_record_phase cdef double _to_record_rhythm cdef double _to_record_rhythm_rect _var_coherence = _namespace["_var_coherence"] _dynamic_array_statemonitor_9_coherence = _namespace["_dynamic_array_statemonitor_9_coherence"] _var_nA = _namespace["_var_nA"] cdef double nA = _namespace["nA"] _var_phase = _namespace["_var_phase"] _dynamic_array_statemonitor_9_phase = _namespace["_dynamic_array_statemonitor_9_phase"] _var_pi = _namespace["_var_pi"] cdef double pi = _namespace["pi"] _var_rhythm = _namespace["_var_rhythm"] _dynamic_array_statemonitor_9_rhythm = _namespace["_dynamic_array_statemonitor_9_rhythm"] _var_rhythm_rect = _namespace["_var_rhythm_rect"] _dynamic_array_statemonitor_9_rhythm_rect = _namespace["_dynamic_array_statemonitor_9_rhythm_rect"] _var_t = _namespace["_var_t"] _dynamic_array_statemonitor_9_t = _namespace["_dynamic_array_statemonitor_9_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_statemonitor_9_t = _namespace['_array_statemonitor_9_t'] cdef double * _array_statemonitor_9_t = _buf__array_statemonitor_9_t.data cdef size_t _num_array_statemonitor_9_t = len(_namespace['_array_statemonitor_9_t']) cdef double t if '_owner' in _namespace: _owner = _namespace['_owner'] cdef size_t _new_len = _array_statemonitor_9_N[0] + 1 # Resize the recorded times _var_t.resize(_new_len) _dynamic_array_statemonitor_9_t[_new_len-1] = _array_defaultclock_t[0] # scalar code _vectorisation_idx = 1 cdef size_t _i # Resize the recorded variable "coherence" and get the (potentially # changed) reference to the underlying data _var_coherence.resize((_new_len, _num_array_statemonitor_9__indices)) cdef _numpy.ndarray[double, ndim=2, mode='c'] _record_buf_coherence = _dynamic_array_statemonitor_9_coherence.data cdef double* _record_data_coherence = _record_buf_coherence.data for _i in range(_num_array_statemonitor_9__indices): # vector code _idx = _array_statemonitor_9__indices[_i] _vectorisation_idx = _idx ___source_rhythm_neurongroup_coherence_neurongroup_y = _array_neurongroup_y[_idx] ____source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_x = _array_neurongroup_x[_idx] __source_coherence_neurongroup_x = _array_neurongroup_x[_idx] __source_coherence_neurongroup_y = _array_neurongroup_y[_idx] ___source_rhythm_neurongroup_phase_neurongroup_x = _array_neurongroup_x[_idx] ____source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_coherence_neurongroup_y = _array_neurongroup_y[_idx] __source_phase_neurongroup_y = _array_neurongroup_y[_idx] ____source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_y = _array_neurongroup_y[_idx] __source_phase_neurongroup_x = _array_neurongroup_x[_idx] ___source_rhythm_neurongroup_phase_neurongroup_y = _array_neurongroup_y[_idx] ___source_rhythm_neurongroup_coherence_neurongroup_x = _array_neurongroup_x[_idx] ____source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_coherence_neurongroup_x = _array_neurongroup_x[_idx] _source_coherence = sqrt((__source_coherence_neurongroup_x ** 2) + (__source_coherence_neurongroup_y ** 2)) _to_record_coherence = _source_coherence _source_phase = (atan(__source_phase_neurongroup_y / __source_phase_neurongroup_x) + (pi * int_((__source_phase_neurongroup_x < 0) and (__source_phase_neurongroup_y > 0)))) - (pi * int_((__source_phase_neurongroup_x < 0) and (__source_phase_neurongroup_y < 0))) _to_record_phase = _source_phase __source_rhythm_neurongroup_phase = (atan(___source_rhythm_neurongroup_phase_neurongroup_y / ___source_rhythm_neurongroup_phase_neurongroup_x) + (pi * int_((___source_rhythm_neurongroup_phase_neurongroup_x < 0) and (___source_rhythm_neurongroup_phase_neurongroup_y > 0)))) - (pi * int_((___source_rhythm_neurongroup_phase_neurongroup_x < 0) and (___source_rhythm_neurongroup_phase_neurongroup_y < 0))) __source_rhythm_neurongroup_coherence = sqrt((___source_rhythm_neurongroup_coherence_neurongroup_x ** 2) + (___source_rhythm_neurongroup_coherence_neurongroup_y ** 2)) _source_rhythm = __source_rhythm_neurongroup_coherence * sin(__source_rhythm_neurongroup_phase) _to_record_rhythm = _source_rhythm ___source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_coherence = sqrt((____source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_coherence_neurongroup_x ** 2) + (____source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_coherence_neurongroup_y ** 2)) ___source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_phase = (atan(____source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_y / ____source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_x) + (pi * int_((____source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_x < 0) and (____source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_y > 0)))) - (pi * int_((____source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_x < 0) and (____source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_y < 0))) __source_rhythm_rect_neurongroup_rhythm_pos = 0.5 * (___source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_coherence * (1.0 + sin(___source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_phase))) _source_rhythm_rect = nA * __source_rhythm_rect_neurongroup_rhythm_pos _to_record_rhythm_rect = _source_rhythm_rect _record_data_coherence[(_new_len-1)*_num_array_statemonitor_9__indices + _i] = _to_record_coherence # Resize the recorded variable "phase" and get the (potentially # changed) reference to the underlying data _var_phase.resize((_new_len, _num_array_statemonitor_9__indices)) cdef _numpy.ndarray[double, ndim=2, mode='c'] _record_buf_phase = _dynamic_array_statemonitor_9_phase.data cdef double* _record_data_phase = _record_buf_phase.data for _i in range(_num_array_statemonitor_9__indices): # vector code _idx = _array_statemonitor_9__indices[_i] _vectorisation_idx = _idx ___source_rhythm_neurongroup_coherence_neurongroup_y = _array_neurongroup_y[_idx] ____source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_x = _array_neurongroup_x[_idx] __source_coherence_neurongroup_x = _array_neurongroup_x[_idx] __source_coherence_neurongroup_y = _array_neurongroup_y[_idx] ___source_rhythm_neurongroup_phase_neurongroup_x = _array_neurongroup_x[_idx] ____source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_coherence_neurongroup_y = _array_neurongroup_y[_idx] __source_phase_neurongroup_y = _array_neurongroup_y[_idx] ____source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_y = _array_neurongroup_y[_idx] __source_phase_neurongroup_x = _array_neurongroup_x[_idx] ___source_rhythm_neurongroup_phase_neurongroup_y = _array_neurongroup_y[_idx] ___source_rhythm_neurongroup_coherence_neurongroup_x = _array_neurongroup_x[_idx] ____source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_coherence_neurongroup_x = _array_neurongroup_x[_idx] _source_coherence = sqrt((__source_coherence_neurongroup_x ** 2) + (__source_coherence_neurongroup_y ** 2)) _to_record_coherence = _source_coherence _source_phase = (atan(__source_phase_neurongroup_y / __source_phase_neurongroup_x) + (pi * int_((__source_phase_neurongroup_x < 0) and (__source_phase_neurongroup_y > 0)))) - (pi * int_((__source_phase_neurongroup_x < 0) and (__source_phase_neurongroup_y < 0))) _to_record_phase = _source_phase __source_rhythm_neurongroup_phase = (atan(___source_rhythm_neurongroup_phase_neurongroup_y / ___source_rhythm_neurongroup_phase_neurongroup_x) + (pi * int_((___source_rhythm_neurongroup_phase_neurongroup_x < 0) and (___source_rhythm_neurongroup_phase_neurongroup_y > 0)))) - (pi * int_((___source_rhythm_neurongroup_phase_neurongroup_x < 0) and (___source_rhythm_neurongroup_phase_neurongroup_y < 0))) __source_rhythm_neurongroup_coherence = sqrt((___source_rhythm_neurongroup_coherence_neurongroup_x ** 2) + (___source_rhythm_neurongroup_coherence_neurongroup_y ** 2)) _source_rhythm = __source_rhythm_neurongroup_coherence * sin(__source_rhythm_neurongroup_phase) _to_record_rhythm = _source_rhythm ___source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_coherence = sqrt((____source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_coherence_neurongroup_x ** 2) + (____source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_coherence_neurongroup_y ** 2)) ___source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_phase = (atan(____source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_y / ____source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_x) + (pi * int_((____source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_x < 0) and (____source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_y > 0)))) - (pi * int_((____source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_x < 0) and (____source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_y < 0))) __source_rhythm_rect_neurongroup_rhythm_pos = 0.5 * (___source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_coherence * (1.0 + sin(___source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_phase))) _source_rhythm_rect = nA * __source_rhythm_rect_neurongroup_rhythm_pos _to_record_rhythm_rect = _source_rhythm_rect _record_data_phase[(_new_len-1)*_num_array_statemonitor_9__indices + _i] = _to_record_phase # Resize the recorded variable "rhythm" and get the (potentially # changed) reference to the underlying data _var_rhythm.resize((_new_len, _num_array_statemonitor_9__indices)) cdef _numpy.ndarray[double, ndim=2, mode='c'] _record_buf_rhythm = _dynamic_array_statemonitor_9_rhythm.data cdef double* _record_data_rhythm = _record_buf_rhythm.data for _i in range(_num_array_statemonitor_9__indices): # vector code _idx = _array_statemonitor_9__indices[_i] _vectorisation_idx = _idx ___source_rhythm_neurongroup_coherence_neurongroup_y = _array_neurongroup_y[_idx] ____source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_x = _array_neurongroup_x[_idx] __source_coherence_neurongroup_x = _array_neurongroup_x[_idx] __source_coherence_neurongroup_y = _array_neurongroup_y[_idx] ___source_rhythm_neurongroup_phase_neurongroup_x = _array_neurongroup_x[_idx] ____source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_coherence_neurongroup_y = _array_neurongroup_y[_idx] __source_phase_neurongroup_y = _array_neurongroup_y[_idx] ____source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_y = _array_neurongroup_y[_idx] __source_phase_neurongroup_x = _array_neurongroup_x[_idx] ___source_rhythm_neurongroup_phase_neurongroup_y = _array_neurongroup_y[_idx] ___source_rhythm_neurongroup_coherence_neurongroup_x = _array_neurongroup_x[_idx] ____source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_coherence_neurongroup_x = _array_neurongroup_x[_idx] _source_coherence = sqrt((__source_coherence_neurongroup_x ** 2) + (__source_coherence_neurongroup_y ** 2)) _to_record_coherence = _source_coherence _source_phase = (atan(__source_phase_neurongroup_y / __source_phase_neurongroup_x) + (pi * int_((__source_phase_neurongroup_x < 0) and (__source_phase_neurongroup_y > 0)))) - (pi * int_((__source_phase_neurongroup_x < 0) and (__source_phase_neurongroup_y < 0))) _to_record_phase = _source_phase __source_rhythm_neurongroup_phase = (atan(___source_rhythm_neurongroup_phase_neurongroup_y / ___source_rhythm_neurongroup_phase_neurongroup_x) + (pi * int_((___source_rhythm_neurongroup_phase_neurongroup_x < 0) and (___source_rhythm_neurongroup_phase_neurongroup_y > 0)))) - (pi * int_((___source_rhythm_neurongroup_phase_neurongroup_x < 0) and (___source_rhythm_neurongroup_phase_neurongroup_y < 0))) __source_rhythm_neurongroup_coherence = sqrt((___source_rhythm_neurongroup_coherence_neurongroup_x ** 2) + (___source_rhythm_neurongroup_coherence_neurongroup_y ** 2)) _source_rhythm = __source_rhythm_neurongroup_coherence * sin(__source_rhythm_neurongroup_phase) _to_record_rhythm = _source_rhythm ___source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_coherence = sqrt((____source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_coherence_neurongroup_x ** 2) + (____source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_coherence_neurongroup_y ** 2)) ___source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_phase = (atan(____source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_y / ____source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_x) + (pi * int_((____source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_x < 0) and (____source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_y > 0)))) - (pi * int_((____source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_x < 0) and (____source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_y < 0))) __source_rhythm_rect_neurongroup_rhythm_pos = 0.5 * (___source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_coherence * (1.0 + sin(___source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_phase))) _source_rhythm_rect = nA * __source_rhythm_rect_neurongroup_rhythm_pos _to_record_rhythm_rect = _source_rhythm_rect _record_data_rhythm[(_new_len-1)*_num_array_statemonitor_9__indices + _i] = _to_record_rhythm # Resize the recorded variable "rhythm_rect" and get the (potentially # changed) reference to the underlying data _var_rhythm_rect.resize((_new_len, _num_array_statemonitor_9__indices)) cdef _numpy.ndarray[double, ndim=2, mode='c'] _record_buf_rhythm_rect = _dynamic_array_statemonitor_9_rhythm_rect.data cdef double* _record_data_rhythm_rect = _record_buf_rhythm_rect.data for _i in range(_num_array_statemonitor_9__indices): # vector code _idx = _array_statemonitor_9__indices[_i] _vectorisation_idx = _idx ___source_rhythm_neurongroup_coherence_neurongroup_y = _array_neurongroup_y[_idx] ____source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_x = _array_neurongroup_x[_idx] __source_coherence_neurongroup_x = _array_neurongroup_x[_idx] __source_coherence_neurongroup_y = _array_neurongroup_y[_idx] ___source_rhythm_neurongroup_phase_neurongroup_x = _array_neurongroup_x[_idx] ____source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_coherence_neurongroup_y = _array_neurongroup_y[_idx] __source_phase_neurongroup_y = _array_neurongroup_y[_idx] ____source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_y = _array_neurongroup_y[_idx] __source_phase_neurongroup_x = _array_neurongroup_x[_idx] ___source_rhythm_neurongroup_phase_neurongroup_y = _array_neurongroup_y[_idx] ___source_rhythm_neurongroup_coherence_neurongroup_x = _array_neurongroup_x[_idx] ____source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_coherence_neurongroup_x = _array_neurongroup_x[_idx] _source_coherence = sqrt((__source_coherence_neurongroup_x ** 2) + (__source_coherence_neurongroup_y ** 2)) _to_record_coherence = _source_coherence _source_phase = (atan(__source_phase_neurongroup_y / __source_phase_neurongroup_x) + (pi * int_((__source_phase_neurongroup_x < 0) and (__source_phase_neurongroup_y > 0)))) - (pi * int_((__source_phase_neurongroup_x < 0) and (__source_phase_neurongroup_y < 0))) _to_record_phase = _source_phase __source_rhythm_neurongroup_phase = (atan(___source_rhythm_neurongroup_phase_neurongroup_y / ___source_rhythm_neurongroup_phase_neurongroup_x) + (pi * int_((___source_rhythm_neurongroup_phase_neurongroup_x < 0) and (___source_rhythm_neurongroup_phase_neurongroup_y > 0)))) - (pi * int_((___source_rhythm_neurongroup_phase_neurongroup_x < 0) and (___source_rhythm_neurongroup_phase_neurongroup_y < 0))) __source_rhythm_neurongroup_coherence = sqrt((___source_rhythm_neurongroup_coherence_neurongroup_x ** 2) + (___source_rhythm_neurongroup_coherence_neurongroup_y ** 2)) _source_rhythm = __source_rhythm_neurongroup_coherence * sin(__source_rhythm_neurongroup_phase) _to_record_rhythm = _source_rhythm ___source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_coherence = sqrt((____source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_coherence_neurongroup_x ** 2) + (____source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_coherence_neurongroup_y ** 2)) ___source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_phase = (atan(____source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_y / ____source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_x) + (pi * int_((____source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_x < 0) and (____source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_y > 0)))) - (pi * int_((____source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_x < 0) and (____source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_y < 0))) __source_rhythm_rect_neurongroup_rhythm_pos = 0.5 * (___source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_coherence * (1.0 + sin(___source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_phase))) _source_rhythm_rect = nA * __source_rhythm_rect_neurongroup_rhythm_pos _to_record_rhythm_rect = _source_rhythm_rect _record_data_rhythm_rect[(_new_len-1)*_num_array_statemonitor_9__indices + _i] = _to_record_rhythm_rect # set the N variable explicitly (since we do not call `StateMonitor.resize`) _array_statemonitor_9_N[0] = _new_len before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_statemonitor_9_N = _namespace['_array_statemonitor_9_N'] cdef int32_t * _array_statemonitor_9_N = _buf__array_statemonitor_9_N.data cdef int32_t N _var_____source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_coherence_neurongroup_x = _namespace["_var_____source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_coherence_neurongroup_x"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_neurongroup_x = _namespace['_array_neurongroup_x'] cdef double * _array_neurongroup_x = _buf__array_neurongroup_x.data cdef size_t _num_array_neurongroup_x = len(_namespace['_array_neurongroup_x']) cdef double ____source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_coherence_neurongroup_x _var_____source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_coherence_neurongroup_y = _namespace["_var_____source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_coherence_neurongroup_y"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_neurongroup_y = _namespace['_array_neurongroup_y'] cdef double * _array_neurongroup_y = _buf__array_neurongroup_y.data cdef size_t _num_array_neurongroup_y = len(_namespace['_array_neurongroup_y']) cdef double ____source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_coherence_neurongroup_y _var_____source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_x = _namespace["_var_____source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_x"] _var_____source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_y = _namespace["_var_____source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_y"] _var____source_rhythm_neurongroup_coherence_neurongroup_x = _namespace["_var____source_rhythm_neurongroup_coherence_neurongroup_x"] _var____source_rhythm_neurongroup_coherence_neurongroup_y = _namespace["_var____source_rhythm_neurongroup_coherence_neurongroup_y"] _var____source_rhythm_neurongroup_phase_neurongroup_x = _namespace["_var____source_rhythm_neurongroup_phase_neurongroup_x"] _var____source_rhythm_neurongroup_phase_neurongroup_y = _namespace["_var____source_rhythm_neurongroup_phase_neurongroup_y"] cdef double ___source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_coherence cdef double ___source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_phase _var___source_coherence_neurongroup_x = _namespace["_var___source_coherence_neurongroup_x"] _var___source_coherence_neurongroup_y = _namespace["_var___source_coherence_neurongroup_y"] _var___source_phase_neurongroup_x = _namespace["_var___source_phase_neurongroup_x"] _var___source_phase_neurongroup_y = _namespace["_var___source_phase_neurongroup_y"] cdef double __source_rhythm_neurongroup_coherence cdef double __source_rhythm_neurongroup_phase cdef double __source_rhythm_rect_neurongroup_rhythm_pos _var__clock_t = _namespace["_var__clock_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double _clock_t _var__indices = _namespace["_var__indices"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_statemonitor_9__indices = _namespace['_array_statemonitor_9__indices'] cdef int32_t * _array_statemonitor_9__indices = _buf__array_statemonitor_9__indices.data cdef size_t _num_array_statemonitor_9__indices = len(_namespace['_array_statemonitor_9__indices']) cdef int32_t _indices cdef double _source_coherence cdef double _source_phase cdef double _source_rhythm cdef double _source_rhythm_rect cdef double _to_record_coherence cdef double _to_record_phase cdef double _to_record_rhythm cdef double _to_record_rhythm_rect _var_coherence = _namespace["_var_coherence"] _dynamic_array_statemonitor_9_coherence = _namespace["_dynamic_array_statemonitor_9_coherence"] _var_nA = _namespace["_var_nA"] cdef double nA = _namespace["nA"] _var_phase = _namespace["_var_phase"] _dynamic_array_statemonitor_9_phase = _namespace["_dynamic_array_statemonitor_9_phase"] _var_pi = _namespace["_var_pi"] cdef double pi = _namespace["pi"] _var_rhythm = _namespace["_var_rhythm"] _dynamic_array_statemonitor_9_rhythm = _namespace["_dynamic_array_statemonitor_9_rhythm"] _var_rhythm_rect = _namespace["_var_rhythm_rect"] _dynamic_array_statemonitor_9_rhythm_rect = _namespace["_dynamic_array_statemonitor_9_rhythm_rect"] _var_t = _namespace["_var_t"] _dynamic_array_statemonitor_9_t = _namespace["_dynamic_array_statemonitor_9_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_statemonitor_9_t = _namespace['_array_statemonitor_9_t'] cdef double * _array_statemonitor_9_t = _buf__array_statemonitor_9_t.data cdef size_t _num_array_statemonitor_9_t = len(_namespace['_array_statemonitor_9_t']) cdef double t if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_statemonitor_9_N = _namespace['_array_statemonitor_9_N'] cdef int32_t * _array_statemonitor_9_N = _buf__array_statemonitor_9_N.data cdef int32_t N _var_____source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_coherence_neurongroup_x = _namespace["_var_____source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_coherence_neurongroup_x"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_neurongroup_x = _namespace['_array_neurongroup_x'] cdef double * _array_neurongroup_x = _buf__array_neurongroup_x.data cdef size_t _num_array_neurongroup_x = len(_namespace['_array_neurongroup_x']) cdef double ____source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_coherence_neurongroup_x _var_____source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_coherence_neurongroup_y = _namespace["_var_____source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_coherence_neurongroup_y"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_neurongroup_y = _namespace['_array_neurongroup_y'] cdef double * _array_neurongroup_y = _buf__array_neurongroup_y.data cdef size_t _num_array_neurongroup_y = len(_namespace['_array_neurongroup_y']) cdef double ____source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_coherence_neurongroup_y _var_____source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_x = _namespace["_var_____source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_x"] _var_____source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_y = _namespace["_var_____source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_y"] _var____source_rhythm_neurongroup_coherence_neurongroup_x = _namespace["_var____source_rhythm_neurongroup_coherence_neurongroup_x"] _var____source_rhythm_neurongroup_coherence_neurongroup_y = _namespace["_var____source_rhythm_neurongroup_coherence_neurongroup_y"] _var____source_rhythm_neurongroup_phase_neurongroup_x = _namespace["_var____source_rhythm_neurongroup_phase_neurongroup_x"] _var____source_rhythm_neurongroup_phase_neurongroup_y = _namespace["_var____source_rhythm_neurongroup_phase_neurongroup_y"] cdef double ___source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_coherence cdef double ___source_rhythm_rect_neurongroup_rhythm_pos_neurongroup_phase _var___source_coherence_neurongroup_x = _namespace["_var___source_coherence_neurongroup_x"] _var___source_coherence_neurongroup_y = _namespace["_var___source_coherence_neurongroup_y"] _var___source_phase_neurongroup_x = _namespace["_var___source_phase_neurongroup_x"] _var___source_phase_neurongroup_y = _namespace["_var___source_phase_neurongroup_y"] cdef double __source_rhythm_neurongroup_coherence cdef double __source_rhythm_neurongroup_phase cdef double __source_rhythm_rect_neurongroup_rhythm_pos _var__clock_t = _namespace["_var__clock_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double _clock_t _var__indices = _namespace["_var__indices"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_statemonitor_9__indices = _namespace['_array_statemonitor_9__indices'] cdef int32_t * _array_statemonitor_9__indices = _buf__array_statemonitor_9__indices.data cdef size_t _num_array_statemonitor_9__indices = len(_namespace['_array_statemonitor_9__indices']) cdef int32_t _indices cdef double _source_coherence cdef double _source_phase cdef double _source_rhythm cdef double _source_rhythm_rect cdef double _to_record_coherence cdef double _to_record_phase cdef double _to_record_rhythm cdef double _to_record_rhythm_rect _var_coherence = _namespace["_var_coherence"] _dynamic_array_statemonitor_9_coherence = _namespace["_dynamic_array_statemonitor_9_coherence"] _var_nA = _namespace["_var_nA"] cdef double nA = _namespace["nA"] _var_phase = _namespace["_var_phase"] _dynamic_array_statemonitor_9_phase = _namespace["_dynamic_array_statemonitor_9_phase"] _var_pi = _namespace["_var_pi"] cdef double pi = _namespace["pi"] _var_rhythm = _namespace["_var_rhythm"] _dynamic_array_statemonitor_9_rhythm = _namespace["_dynamic_array_statemonitor_9_rhythm"] _var_rhythm_rect = _namespace["_var_rhythm_rect"] _dynamic_array_statemonitor_9_rhythm_rect = _namespace["_dynamic_array_statemonitor_9_rhythm_rect"] _var_t = _namespace["_var_t"] _dynamic_array_statemonitor_9_t = _namespace["_dynamic_array_statemonitor_9_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_statemonitor_9_t = _namespace['_array_statemonitor_9_t'] cdef double * _array_statemonitor_9_t = _buf__array_statemonitor_9_t.data cdef size_t _num_array_statemonitor_9_t = len(_namespace['_array_statemonitor_9_t']) cdef double t if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:15:04,773 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name statemonitor_9_codeobject 2021-11-05 15:15:04,774 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "statemonitor_9_statemonitor" using Cython module "_cython_magic_d2bd259132816e7b3de16ea7808fedf6" 2021-11-05 15:15:04,774 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140606217387984 on /home/nikos/.cython/brian_extensions/_cython_magic_d2bd259132816e7b3de16ea7808fedf6.lock 2021-11-05 15:15:04,774 DEBUG brian2.utils.filelock: Lock 140606217387984 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_d2bd259132816e7b3de16ea7808fedf6.lock 2021-11-05 15:15:06,065 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140606217387984 on /home/nikos/.cython/brian_extensions/_cython_magic_d2bd259132816e7b3de16ea7808fedf6.lock 2021-11-05 15:15:06,065 DEBUG brian2.utils.filelock: Lock 140606217387984 released on /home/nikos/.cython/brian_extensions/_cython_magic_d2bd259132816e7b3de16ea7808fedf6.lock 2021-11-05 15:15:06,066 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=Kuramoto_avg, template name=summed_variable) for abstract code: _synaptic_var = cos(Theta_pre)/N_incoming 2021-11-05 15:15:06,076 DIAGNOSTIC brian2.devices.device: Kuramoto_avg_summed_variable_x_post_codeobject abstract code: _synaptic_var = cos(Theta_pre)/N_incoming 2021-11-05 15:15:06,077 DIAGNOSTIC brian2.devices.device: Kuramoto_avg_summed_variable_x_post_codeobject snippet (scalar): 2021-11-05 15:15:06,077 DIAGNOSTIC brian2.devices.device: Kuramoto_avg_summed_variable_x_post_codeobject snippet (vector): _postsynaptic_idx = _array_Kuramoto_avg__synaptic_post[_idx] _presynaptic_idx = _array_Kuramoto_avg__synaptic_pre[_idx] N_incoming = _array_Kuramoto_avg_N_incoming[_postsynaptic_idx] Theta_pre = _array_Kuramoto_oscillators_N_50_Theta[_presynaptic_idx] _synaptic_var = cos(Theta_pre) / N_incoming 2021-11-05 15:15:06,077 DIAGNOSTIC brian2.devices.device: Kuramoto_avg_summed_variable_x_post_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_Kuramoto_avg_N = _namespace['_array_Kuramoto_avg_N'] cdef int32_t * _array_Kuramoto_avg_N = _buf__array_Kuramoto_avg_N.data cdef int32_t N = _namespace["N"] _var_N_incoming = _namespace["_var_N_incoming"] _dynamic_array_Kuramoto_avg_N_incoming = _namespace["_dynamic_array_Kuramoto_avg_N_incoming"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_Kuramoto_avg_N_incoming = _namespace['_array_Kuramoto_avg_N_incoming'] cdef int32_t * _array_Kuramoto_avg_N_incoming = _buf__array_Kuramoto_avg_N_incoming.data cdef size_t _num_array_Kuramoto_avg_N_incoming = len(_namespace['_array_Kuramoto_avg_N_incoming']) cdef int32_t N_incoming _var_N_post = _namespace["_var_N_post"] cdef int64_t N_post = _namespace["N_post"] _var_Theta_pre = _namespace["_var_Theta_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_Kuramoto_oscillators_N_50_Theta = _namespace['_array_Kuramoto_oscillators_N_50_Theta'] cdef double * _array_Kuramoto_oscillators_N_50_Theta = _buf__array_Kuramoto_oscillators_N_50_Theta.data cdef size_t _num_array_Kuramoto_oscillators_N_50_Theta = len(_namespace['_array_Kuramoto_oscillators_N_50_Theta']) cdef double Theta_pre _var__postsynaptic_idx = _namespace["_var__postsynaptic_idx"] _dynamic_array_Kuramoto_avg__synaptic_post = _namespace["_dynamic_array_Kuramoto_avg__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_Kuramoto_avg__synaptic_post = _namespace['_array_Kuramoto_avg__synaptic_post'] cdef int32_t * _array_Kuramoto_avg__synaptic_post = _buf__array_Kuramoto_avg__synaptic_post.data cdef size_t _num_array_Kuramoto_avg__synaptic_post = len(_namespace['_array_Kuramoto_avg__synaptic_post']) cdef int32_t _postsynaptic_idx _var__presynaptic_idx = _namespace["_var__presynaptic_idx"] _dynamic_array_Kuramoto_avg__synaptic_pre = _namespace["_dynamic_array_Kuramoto_avg__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_Kuramoto_avg__synaptic_pre = _namespace['_array_Kuramoto_avg__synaptic_pre'] cdef int32_t * _array_Kuramoto_avg__synaptic_pre = _buf__array_Kuramoto_avg__synaptic_pre.data cdef size_t _num_array_Kuramoto_avg__synaptic_pre = len(_namespace['_array_Kuramoto_avg__synaptic_pre']) cdef int32_t _presynaptic_idx _var__synaptic_post = _namespace["_var__synaptic_post"] _dynamic_array_Kuramoto_avg__synaptic_post = _namespace["_dynamic_array_Kuramoto_avg__synaptic_post"] _var_x_post = _namespace["_var_x_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_neurongroup_x = _namespace['_array_neurongroup_x'] cdef double * _array_neurongroup_x = _buf__array_neurongroup_x.data cdef size_t _num_array_neurongroup_x = len(_namespace['_array_neurongroup_x']) cdef double x_post cdef double _synaptic_var if '_owner' in _namespace: _owner = _namespace['_owner'] cdef int _target_idx # Set all the target variable values to zero for _target_idx in range(N_post): _array_neurongroup_x[_target_idx + 0] = 0 # scalar code _vectorisation_idx = 1 for _idx in range(_array_Kuramoto_avg_N[0]): # vector_code vectorisation_idx = _idx _postsynaptic_idx = _array_Kuramoto_avg__synaptic_post[_idx] _presynaptic_idx = _array_Kuramoto_avg__synaptic_pre[_idx] N_incoming = _array_Kuramoto_avg_N_incoming[_postsynaptic_idx] Theta_pre = _array_Kuramoto_oscillators_N_50_Theta[_presynaptic_idx] _synaptic_var = cos(Theta_pre) / N_incoming _array_neurongroup_x[_array_Kuramoto_avg__synaptic_post[_idx]] += _synaptic_var before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_Kuramoto_avg_N = _namespace['_array_Kuramoto_avg_N'] cdef int32_t * _array_Kuramoto_avg_N = _buf__array_Kuramoto_avg_N.data cdef int32_t N = _namespace["N"] _var_N_incoming = _namespace["_var_N_incoming"] _dynamic_array_Kuramoto_avg_N_incoming = _namespace["_dynamic_array_Kuramoto_avg_N_incoming"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_Kuramoto_avg_N_incoming = _namespace['_array_Kuramoto_avg_N_incoming'] cdef int32_t * _array_Kuramoto_avg_N_incoming = _buf__array_Kuramoto_avg_N_incoming.data cdef size_t _num_array_Kuramoto_avg_N_incoming = len(_namespace['_array_Kuramoto_avg_N_incoming']) cdef int32_t N_incoming _var_N_post = _namespace["_var_N_post"] cdef int64_t N_post = _namespace["N_post"] _var_Theta_pre = _namespace["_var_Theta_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_Kuramoto_oscillators_N_50_Theta = _namespace['_array_Kuramoto_oscillators_N_50_Theta'] cdef double * _array_Kuramoto_oscillators_N_50_Theta = _buf__array_Kuramoto_oscillators_N_50_Theta.data cdef size_t _num_array_Kuramoto_oscillators_N_50_Theta = len(_namespace['_array_Kuramoto_oscillators_N_50_Theta']) cdef double Theta_pre _var__postsynaptic_idx = _namespace["_var__postsynaptic_idx"] _dynamic_array_Kuramoto_avg__synaptic_post = _namespace["_dynamic_array_Kuramoto_avg__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_Kuramoto_avg__synaptic_post = _namespace['_array_Kuramoto_avg__synaptic_post'] cdef int32_t * _array_Kuramoto_avg__synaptic_post = _buf__array_Kuramoto_avg__synaptic_post.data cdef size_t _num_array_Kuramoto_avg__synaptic_post = len(_namespace['_array_Kuramoto_avg__synaptic_post']) cdef int32_t _postsynaptic_idx _var__presynaptic_idx = _namespace["_var__presynaptic_idx"] _dynamic_array_Kuramoto_avg__synaptic_pre = _namespace["_dynamic_array_Kuramoto_avg__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_Kuramoto_avg__synaptic_pre = _namespace['_array_Kuramoto_avg__synaptic_pre'] cdef int32_t * _array_Kuramoto_avg__synaptic_pre = _buf__array_Kuramoto_avg__synaptic_pre.data cdef size_t _num_array_Kuramoto_avg__synaptic_pre = len(_namespace['_array_Kuramoto_avg__synaptic_pre']) cdef int32_t _presynaptic_idx _var__synaptic_post = _namespace["_var__synaptic_post"] _dynamic_array_Kuramoto_avg__synaptic_post = _namespace["_dynamic_array_Kuramoto_avg__synaptic_post"] _var_x_post = _namespace["_var_x_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_neurongroup_x = _namespace['_array_neurongroup_x'] cdef double * _array_neurongroup_x = _buf__array_neurongroup_x.data cdef size_t _num_array_neurongroup_x = len(_namespace['_array_neurongroup_x']) cdef double x_post cdef double _synaptic_var if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_Kuramoto_avg_N = _namespace['_array_Kuramoto_avg_N'] cdef int32_t * _array_Kuramoto_avg_N = _buf__array_Kuramoto_avg_N.data cdef int32_t N = _namespace["N"] _var_N_incoming = _namespace["_var_N_incoming"] _dynamic_array_Kuramoto_avg_N_incoming = _namespace["_dynamic_array_Kuramoto_avg_N_incoming"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_Kuramoto_avg_N_incoming = _namespace['_array_Kuramoto_avg_N_incoming'] cdef int32_t * _array_Kuramoto_avg_N_incoming = _buf__array_Kuramoto_avg_N_incoming.data cdef size_t _num_array_Kuramoto_avg_N_incoming = len(_namespace['_array_Kuramoto_avg_N_incoming']) cdef int32_t N_incoming _var_N_post = _namespace["_var_N_post"] cdef int64_t N_post = _namespace["N_post"] _var_Theta_pre = _namespace["_var_Theta_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_Kuramoto_oscillators_N_50_Theta = _namespace['_array_Kuramoto_oscillators_N_50_Theta'] cdef double * _array_Kuramoto_oscillators_N_50_Theta = _buf__array_Kuramoto_oscillators_N_50_Theta.data cdef size_t _num_array_Kuramoto_oscillators_N_50_Theta = len(_namespace['_array_Kuramoto_oscillators_N_50_Theta']) cdef double Theta_pre _var__postsynaptic_idx = _namespace["_var__postsynaptic_idx"] _dynamic_array_Kuramoto_avg__synaptic_post = _namespace["_dynamic_array_Kuramoto_avg__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_Kuramoto_avg__synaptic_post = _namespace['_array_Kuramoto_avg__synaptic_post'] cdef int32_t * _array_Kuramoto_avg__synaptic_post = _buf__array_Kuramoto_avg__synaptic_post.data cdef size_t _num_array_Kuramoto_avg__synaptic_post = len(_namespace['_array_Kuramoto_avg__synaptic_post']) cdef int32_t _postsynaptic_idx _var__presynaptic_idx = _namespace["_var__presynaptic_idx"] _dynamic_array_Kuramoto_avg__synaptic_pre = _namespace["_dynamic_array_Kuramoto_avg__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_Kuramoto_avg__synaptic_pre = _namespace['_array_Kuramoto_avg__synaptic_pre'] cdef int32_t * _array_Kuramoto_avg__synaptic_pre = _buf__array_Kuramoto_avg__synaptic_pre.data cdef size_t _num_array_Kuramoto_avg__synaptic_pre = len(_namespace['_array_Kuramoto_avg__synaptic_pre']) cdef int32_t _presynaptic_idx _var__synaptic_post = _namespace["_var__synaptic_post"] _dynamic_array_Kuramoto_avg__synaptic_post = _namespace["_dynamic_array_Kuramoto_avg__synaptic_post"] _var_x_post = _namespace["_var_x_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_neurongroup_x = _namespace['_array_neurongroup_x'] cdef double * _array_neurongroup_x = _buf__array_neurongroup_x.data cdef size_t _num_array_neurongroup_x = len(_namespace['_array_neurongroup_x']) cdef double x_post cdef double _synaptic_var if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:15:06,078 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name Kuramoto_avg_summed_variable_x_post_codeobject 2021-11-05 15:15:06,078 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "Kuramoto_avg_summed_variable" using Cython module "_cython_magic_16bb20f763cdaa8217b10906da13b12d" 2021-11-05 15:15:06,078 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140606333374128 on /home/nikos/.cython/brian_extensions/_cython_magic_16bb20f763cdaa8217b10906da13b12d.lock 2021-11-05 15:15:06,078 DEBUG brian2.utils.filelock: Lock 140606333374128 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_16bb20f763cdaa8217b10906da13b12d.lock 2021-11-05 15:15:06,080 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140606333374128 on /home/nikos/.cython/brian_extensions/_cython_magic_16bb20f763cdaa8217b10906da13b12d.lock 2021-11-05 15:15:06,080 DEBUG brian2.utils.filelock: Lock 140606333374128 released on /home/nikos/.cython/brian_extensions/_cython_magic_16bb20f763cdaa8217b10906da13b12d.lock 2021-11-05 15:15:06,080 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=Kuramoto_avg, template name=summed_variable) for abstract code: _synaptic_var = sin(Theta_pre)/N_incoming 2021-11-05 15:15:06,086 DIAGNOSTIC brian2.devices.device: Kuramoto_avg_summed_variable_y_post_codeobject abstract code: _synaptic_var = sin(Theta_pre)/N_incoming 2021-11-05 15:15:06,087 DIAGNOSTIC brian2.devices.device: Kuramoto_avg_summed_variable_y_post_codeobject snippet (scalar): 2021-11-05 15:15:06,087 DIAGNOSTIC brian2.devices.device: Kuramoto_avg_summed_variable_y_post_codeobject snippet (vector): _postsynaptic_idx = _array_Kuramoto_avg__synaptic_post[_idx] _presynaptic_idx = _array_Kuramoto_avg__synaptic_pre[_idx] N_incoming = _array_Kuramoto_avg_N_incoming[_postsynaptic_idx] Theta_pre = _array_Kuramoto_oscillators_N_50_Theta[_presynaptic_idx] _synaptic_var = sin(Theta_pre) / N_incoming 2021-11-05 15:15:06,088 DIAGNOSTIC brian2.devices.device: Kuramoto_avg_summed_variable_y_post_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_Kuramoto_avg_N = _namespace['_array_Kuramoto_avg_N'] cdef int32_t * _array_Kuramoto_avg_N = _buf__array_Kuramoto_avg_N.data cdef int32_t N = _namespace["N"] _var_N_incoming = _namespace["_var_N_incoming"] _dynamic_array_Kuramoto_avg_N_incoming = _namespace["_dynamic_array_Kuramoto_avg_N_incoming"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_Kuramoto_avg_N_incoming = _namespace['_array_Kuramoto_avg_N_incoming'] cdef int32_t * _array_Kuramoto_avg_N_incoming = _buf__array_Kuramoto_avg_N_incoming.data cdef size_t _num_array_Kuramoto_avg_N_incoming = len(_namespace['_array_Kuramoto_avg_N_incoming']) cdef int32_t N_incoming _var_N_post = _namespace["_var_N_post"] cdef int64_t N_post = _namespace["N_post"] _var_Theta_pre = _namespace["_var_Theta_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_Kuramoto_oscillators_N_50_Theta = _namespace['_array_Kuramoto_oscillators_N_50_Theta'] cdef double * _array_Kuramoto_oscillators_N_50_Theta = _buf__array_Kuramoto_oscillators_N_50_Theta.data cdef size_t _num_array_Kuramoto_oscillators_N_50_Theta = len(_namespace['_array_Kuramoto_oscillators_N_50_Theta']) cdef double Theta_pre _var__postsynaptic_idx = _namespace["_var__postsynaptic_idx"] _dynamic_array_Kuramoto_avg__synaptic_post = _namespace["_dynamic_array_Kuramoto_avg__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_Kuramoto_avg__synaptic_post = _namespace['_array_Kuramoto_avg__synaptic_post'] cdef int32_t * _array_Kuramoto_avg__synaptic_post = _buf__array_Kuramoto_avg__synaptic_post.data cdef size_t _num_array_Kuramoto_avg__synaptic_post = len(_namespace['_array_Kuramoto_avg__synaptic_post']) cdef int32_t _postsynaptic_idx _var__presynaptic_idx = _namespace["_var__presynaptic_idx"] _dynamic_array_Kuramoto_avg__synaptic_pre = _namespace["_dynamic_array_Kuramoto_avg__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_Kuramoto_avg__synaptic_pre = _namespace['_array_Kuramoto_avg__synaptic_pre'] cdef int32_t * _array_Kuramoto_avg__synaptic_pre = _buf__array_Kuramoto_avg__synaptic_pre.data cdef size_t _num_array_Kuramoto_avg__synaptic_pre = len(_namespace['_array_Kuramoto_avg__synaptic_pre']) cdef int32_t _presynaptic_idx _var__synaptic_post = _namespace["_var__synaptic_post"] _dynamic_array_Kuramoto_avg__synaptic_post = _namespace["_dynamic_array_Kuramoto_avg__synaptic_post"] _var_y_post = _namespace["_var_y_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_neurongroup_y = _namespace['_array_neurongroup_y'] cdef double * _array_neurongroup_y = _buf__array_neurongroup_y.data cdef size_t _num_array_neurongroup_y = len(_namespace['_array_neurongroup_y']) cdef double y_post cdef double _synaptic_var if '_owner' in _namespace: _owner = _namespace['_owner'] cdef int _target_idx # Set all the target variable values to zero for _target_idx in range(N_post): _array_neurongroup_y[_target_idx + 0] = 0 # scalar code _vectorisation_idx = 1 for _idx in range(_array_Kuramoto_avg_N[0]): # vector_code vectorisation_idx = _idx _postsynaptic_idx = _array_Kuramoto_avg__synaptic_post[_idx] _presynaptic_idx = _array_Kuramoto_avg__synaptic_pre[_idx] N_incoming = _array_Kuramoto_avg_N_incoming[_postsynaptic_idx] Theta_pre = _array_Kuramoto_oscillators_N_50_Theta[_presynaptic_idx] _synaptic_var = sin(Theta_pre) / N_incoming _array_neurongroup_y[_array_Kuramoto_avg__synaptic_post[_idx]] += _synaptic_var before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_Kuramoto_avg_N = _namespace['_array_Kuramoto_avg_N'] cdef int32_t * _array_Kuramoto_avg_N = _buf__array_Kuramoto_avg_N.data cdef int32_t N = _namespace["N"] _var_N_incoming = _namespace["_var_N_incoming"] _dynamic_array_Kuramoto_avg_N_incoming = _namespace["_dynamic_array_Kuramoto_avg_N_incoming"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_Kuramoto_avg_N_incoming = _namespace['_array_Kuramoto_avg_N_incoming'] cdef int32_t * _array_Kuramoto_avg_N_incoming = _buf__array_Kuramoto_avg_N_incoming.data cdef size_t _num_array_Kuramoto_avg_N_incoming = len(_namespace['_array_Kuramoto_avg_N_incoming']) cdef int32_t N_incoming _var_N_post = _namespace["_var_N_post"] cdef int64_t N_post = _namespace["N_post"] _var_Theta_pre = _namespace["_var_Theta_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_Kuramoto_oscillators_N_50_Theta = _namespace['_array_Kuramoto_oscillators_N_50_Theta'] cdef double * _array_Kuramoto_oscillators_N_50_Theta = _buf__array_Kuramoto_oscillators_N_50_Theta.data cdef size_t _num_array_Kuramoto_oscillators_N_50_Theta = len(_namespace['_array_Kuramoto_oscillators_N_50_Theta']) cdef double Theta_pre _var__postsynaptic_idx = _namespace["_var__postsynaptic_idx"] _dynamic_array_Kuramoto_avg__synaptic_post = _namespace["_dynamic_array_Kuramoto_avg__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_Kuramoto_avg__synaptic_post = _namespace['_array_Kuramoto_avg__synaptic_post'] cdef int32_t * _array_Kuramoto_avg__synaptic_post = _buf__array_Kuramoto_avg__synaptic_post.data cdef size_t _num_array_Kuramoto_avg__synaptic_post = len(_namespace['_array_Kuramoto_avg__synaptic_post']) cdef int32_t _postsynaptic_idx _var__presynaptic_idx = _namespace["_var__presynaptic_idx"] _dynamic_array_Kuramoto_avg__synaptic_pre = _namespace["_dynamic_array_Kuramoto_avg__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_Kuramoto_avg__synaptic_pre = _namespace['_array_Kuramoto_avg__synaptic_pre'] cdef int32_t * _array_Kuramoto_avg__synaptic_pre = _buf__array_Kuramoto_avg__synaptic_pre.data cdef size_t _num_array_Kuramoto_avg__synaptic_pre = len(_namespace['_array_Kuramoto_avg__synaptic_pre']) cdef int32_t _presynaptic_idx _var__synaptic_post = _namespace["_var__synaptic_post"] _dynamic_array_Kuramoto_avg__synaptic_post = _namespace["_dynamic_array_Kuramoto_avg__synaptic_post"] _var_y_post = _namespace["_var_y_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_neurongroup_y = _namespace['_array_neurongroup_y'] cdef double * _array_neurongroup_y = _buf__array_neurongroup_y.data cdef size_t _num_array_neurongroup_y = len(_namespace['_array_neurongroup_y']) cdef double y_post cdef double _synaptic_var if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_Kuramoto_avg_N = _namespace['_array_Kuramoto_avg_N'] cdef int32_t * _array_Kuramoto_avg_N = _buf__array_Kuramoto_avg_N.data cdef int32_t N = _namespace["N"] _var_N_incoming = _namespace["_var_N_incoming"] _dynamic_array_Kuramoto_avg_N_incoming = _namespace["_dynamic_array_Kuramoto_avg_N_incoming"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_Kuramoto_avg_N_incoming = _namespace['_array_Kuramoto_avg_N_incoming'] cdef int32_t * _array_Kuramoto_avg_N_incoming = _buf__array_Kuramoto_avg_N_incoming.data cdef size_t _num_array_Kuramoto_avg_N_incoming = len(_namespace['_array_Kuramoto_avg_N_incoming']) cdef int32_t N_incoming _var_N_post = _namespace["_var_N_post"] cdef int64_t N_post = _namespace["N_post"] _var_Theta_pre = _namespace["_var_Theta_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_Kuramoto_oscillators_N_50_Theta = _namespace['_array_Kuramoto_oscillators_N_50_Theta'] cdef double * _array_Kuramoto_oscillators_N_50_Theta = _buf__array_Kuramoto_oscillators_N_50_Theta.data cdef size_t _num_array_Kuramoto_oscillators_N_50_Theta = len(_namespace['_array_Kuramoto_oscillators_N_50_Theta']) cdef double Theta_pre _var__postsynaptic_idx = _namespace["_var__postsynaptic_idx"] _dynamic_array_Kuramoto_avg__synaptic_post = _namespace["_dynamic_array_Kuramoto_avg__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_Kuramoto_avg__synaptic_post = _namespace['_array_Kuramoto_avg__synaptic_post'] cdef int32_t * _array_Kuramoto_avg__synaptic_post = _buf__array_Kuramoto_avg__synaptic_post.data cdef size_t _num_array_Kuramoto_avg__synaptic_post = len(_namespace['_array_Kuramoto_avg__synaptic_post']) cdef int32_t _postsynaptic_idx _var__presynaptic_idx = _namespace["_var__presynaptic_idx"] _dynamic_array_Kuramoto_avg__synaptic_pre = _namespace["_dynamic_array_Kuramoto_avg__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_Kuramoto_avg__synaptic_pre = _namespace['_array_Kuramoto_avg__synaptic_pre'] cdef int32_t * _array_Kuramoto_avg__synaptic_pre = _buf__array_Kuramoto_avg__synaptic_pre.data cdef size_t _num_array_Kuramoto_avg__synaptic_pre = len(_namespace['_array_Kuramoto_avg__synaptic_pre']) cdef int32_t _presynaptic_idx _var__synaptic_post = _namespace["_var__synaptic_post"] _dynamic_array_Kuramoto_avg__synaptic_post = _namespace["_dynamic_array_Kuramoto_avg__synaptic_post"] _var_y_post = _namespace["_var_y_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_neurongroup_y = _namespace['_array_neurongroup_y'] cdef double * _array_neurongroup_y = _buf__array_neurongroup_y.data cdef size_t _num_array_neurongroup_y = len(_namespace['_array_neurongroup_y']) cdef double y_post cdef double _synaptic_var if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:15:06,088 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name Kuramoto_avg_summed_variable_y_post_codeobject 2021-11-05 15:15:06,088 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "Kuramoto_avg_summed_variable" using Cython module "_cython_magic_47b18126804f4ad999ef1394bc0f4fbc" 2021-11-05 15:15:06,088 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140606333373408 on /home/nikos/.cython/brian_extensions/_cython_magic_47b18126804f4ad999ef1394bc0f4fbc.lock 2021-11-05 15:15:06,088 DEBUG brian2.utils.filelock: Lock 140606333373408 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_47b18126804f4ad999ef1394bc0f4fbc.lock 2021-11-05 15:15:06,089 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140606333373408 on /home/nikos/.cython/brian_extensions/_cython_magic_47b18126804f4ad999ef1394bc0f4fbc.lock 2021-11-05 15:15:06,089 DEBUG brian2.utils.filelock: Lock 140606333373408 released on /home/nikos/.cython/brian_extensions/_cython_magic_47b18126804f4ad999ef1394bc0f4fbc.lock 2021-11-05 15:15:06,669 DEBUG brian2.stateupdaters.base.method_choice: Group CA1_inh: using numerical integration method exponential_euler (took 0.58s) 2021-11-05 15:15:06,669 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=CA1_inh, template name=stateupdate) for abstract code: not_refractory = timestep(t - lastspike, dt) >= timestep(0.003000, dt) _BA_ge = -1.0*he _ge = -_BA_ge + (_BA_ge + ge)*exp(-3.33333333333333*dt/ms) _BA_ge_ext = -1.0*he_ext _ge_ext = -_BA_ge_ext + (_BA_ge_ext + ge_ext)*exp(-3.33333333333333*dt/ms) _BA_ge_hipp = -1.0*he_hipp _ge_hipp = -_BA_ge_hipp + (_BA_ge_hipp + ge_hipp)*exp(-3.33333333333333*dt/ms) _BA_gi = -1.0*hi _gi = -_BA_gi + (_BA_gi + gi)*exp(-1.0*dt/ms) _BA_h = (0.35/(0.060810062625218*ms**2*exp(29/10)/(1.0*ms*exp(0.05*v/mV) + 0.060810062625218*ms*exp(-0.05*v/mV)) + 1.0*ms**2*exp(29/10)*exp(v/(20*mV))/(1.0*ms + 0.060810062625218*ms*exp(-0.1*v/mV)) + 0.07*ms + 0.00425670438376526*ms*exp(-0.1*v/mV)) + 0.0245/(1.0*ms**2*exp(29/5)*exp(v/(10*mV))/(1.0*ms + 0.060810062625218*ms*exp(-0.1*v/mV)) + 0.07*ms*exp(29/10)*exp(v/(20*mV))))/(-5.0/(1.0*ms + 0.060810062625218*ms*exp(-0.1*v/mV)) - 0.35*exp(-29/10)/(ms*exp(v/mV)**(1/20))) _h = -_BA_h + (_BA_h + h)*exp(dt*(-5.0/(1.0*ms + 0.060810062625218*ms*exp(-0.1*v/mV)) - 0.35*exp(-29/10)/(ms*exp(v/mV)**(1/20)))) _he = he*exp(-dt/(5*ms)) _he_ext = he_ext*exp(-dt/(5*ms)) _he_hipp = he_hipp*exp(-dt/(5*ms)) _hi = hi*exp(-dt/(10*ms)) _BA_m = (61.25*mV**2/(-7.0*mV**3*ms**2/(1.0*mV*ms*exp(7/2)*exp(v/(10*mV)) - mV*ms) + 3.5*mV**3*ms**2/(-mV*ms*exp(7/2)*exp(v/(10*mV)) + 1.0*mV*ms*exp(7)*exp(v/(5*mV))) + 3.5*mV**3*ms**2/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) - 0.2*mV**2*ms**2*v/(1.0*mV*ms*exp(7/2)*exp(v/(10*mV)) - mV*ms) + 0.1*mV**2*ms**2*v/(-mV*ms*exp(7/2)*exp(v/(10*mV)) + 1.0*mV*ms*exp(7)*exp(v/(5*mV))) + 0.1*mV**2*ms**2*v/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) + 4.0*mV**2*ms*exp(-10/3)*exp(-v/(18*mV)) - 8.0*mV**2*ms*exp(-41/6)*exp(-7*v/(45*mV)) + 4*mV**2*ms*exp(-31/3)*exp(-23*v/(90*mV))) + 3.5*mV*v/(-7.0*mV**3*ms**2/(1.0*mV*ms*exp(7/2)*exp(v/(10*mV)) - mV*ms) + 3.5*mV**3*ms**2/(-mV*ms*exp(7/2)*exp(v/(10*mV)) + 1.0*mV*ms*exp(7)*exp(v/(5*mV))) + 3.5*mV**3*ms**2/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) - 0.2*mV**2*ms**2*v/(1.0*mV*ms*exp(7/2)*exp(v/(10*mV)) - mV*ms) + 0.1*mV**2*ms**2*v/(-mV*ms*exp(7/2)*exp(v/(10*mV)) + 1.0*mV*ms*exp(7)*exp(v/(5*mV))) + 0.1*mV**2*ms**2*v/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) + 4.0*mV**2*ms*exp(-10/3)*exp(-v/(18*mV)) - 8.0*mV**2*ms*exp(-41/6)*exp(-7*v/(45*mV)) + 4*mV**2*ms*exp(-31/3)*exp(-23*v/(90*mV))) + 70.0*mV/(-3.5*mV**2*ms**2*exp(10/3)*exp(v/(18*mV))/(1.0*mV*ms*exp(7/2)*exp(v/(10*mV)) - mV*ms) + 3.5*mV**2*ms**2*exp(10/3)*exp(v/(18*mV))/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) - 0.1*mV*ms**2*v*exp(10/3)*exp(v/(18*mV))/(1.0*mV*ms*exp(7/2)*exp(v/(10*mV)) - mV*ms) + 0.1*mV*ms**2*v*exp(10/3)*exp(v/(18*mV))/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) + 4.0*mV*ms - 4*mV*ms*exp(-7/2)*exp(-v/(10*mV))) + 0.05*v**2/(-7.0*mV**3*ms**2/(1.0*mV*ms*exp(7/2)*exp(v/(10*mV)) - mV*ms) + 3.5*mV**3*ms**2/(-mV*ms*exp(7/2)*exp(v/(10*mV)) + 1.0*mV*ms*exp(7)*exp(v/(5*mV))) + 3.5*mV**3*ms**2/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) - 0.2*mV**2*ms**2*v/(1.0*mV*ms*exp(7/2)*exp(v/(10*mV)) - mV*ms) + 0.1*mV**2*ms**2*v/(-mV*ms*exp(7/2)*exp(v/(10*mV)) + 1.0*mV*ms*exp(7)*exp(v/(5*mV))) + 0.1*mV**2*ms**2*v/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) + 4.0*mV**2*ms*exp(-10/3)*exp(-v/(18*mV)) - 8.0*mV**2*ms*exp(-41/6)*exp(-7*v/(45*mV)) + 4*mV**2*ms*exp(-31/3)*exp(-23*v/(90*mV))) + 2.0*v/(-3.5*mV**2*ms**2*exp(10/3)*exp(v/(18*mV))/(1.0*mV*ms*exp(7/2)*exp(v/(10*mV)) - mV*ms) + 3.5*mV**2*ms**2*exp(10/3)*exp(v/(18*mV))/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) - 0.1*mV*ms**2*v*exp(10/3)*exp(v/(18*mV))/(1.0*mV*ms*exp(7/2)*exp(v/(10*mV)) - mV*ms) + 0.1*mV*ms**2*v*exp(10/3)*exp(v/(18*mV))/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) + 4.0*mV*ms - 4*mV*ms*exp(-7/2)*exp(-v/(10*mV))))/(-17.5*mV/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) - 0.5*v/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) - 20.0*exp(-10/3)/(ms*exp(v/mV)**(1/18))) _m = -_BA_m + (_BA_m + m)*exp(dt*(-17.5*mV/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) - 0.5*v/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) - 20.0*exp(-10/3)/(ms*exp(v/mV)**(1/18)))) _BA_n = (0.578*mV**2/(-0.0226938235730217*mV**3*ms**2/(1.0*mV*ms*exp(0.1*v/mV) - 0.0333732699603261*mV*ms) + 0.000378683550267233*mV**3*ms**2/(-0.0333732699603261*mV*ms*exp(0.1*v/mV) + 1.0*mV*ms*exp(0.2*v/mV)) + 0.34*mV**3*ms**2/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) - 0.000667465399206522*mV**2*ms**2*v/(1.0*mV*ms*exp(0.1*v/mV) - 0.0333732699603261*mV*ms) + 1.1137751478448e-5*mV**2*ms**2*v/(-0.0333732699603261*mV*ms*exp(0.1*v/mV) + 1.0*mV*ms*exp(0.2*v/mV)) + 0.01*mV**2*ms**2*v/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) + 0.0001392218934806*mV**2*ms*exp(-11/20)*exp(-0.2125*v/mV) - 0.00834331749008152*mV**2*ms*exp(-11/20)*exp(-0.1125*v/mV) + 0.125*mV**2*ms*exp(-11/20)*exp(-v/(80*mV))) + 0.034*mV*v/(-0.0226938235730217*mV**3*ms**2/(1.0*mV*ms*exp(0.1*v/mV) - 0.0333732699603261*mV*ms) + 0.000378683550267233*mV**3*ms**2/(-0.0333732699603261*mV*ms*exp(0.1*v/mV) + 1.0*mV*ms*exp(0.2*v/mV)) + 0.34*mV**3*ms**2/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) - 0.000667465399206522*mV**2*ms**2*v/(1.0*mV*ms*exp(0.1*v/mV) - 0.0333732699603261*mV*ms) + 1.1137751478448e-5*mV**2*ms**2*v/(-0.0333732699603261*mV*ms*exp(0.1*v/mV) + 1.0*mV*ms*exp(0.2*v/mV)) + 0.01*mV**2*ms**2*v/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) + 0.0001392218934806*mV**2*ms*exp(-11/20)*exp(-0.2125*v/mV) - 0.00834331749008152*mV**2*ms*exp(-11/20)*exp(-0.1125*v/mV) + 0.125*mV**2*ms*exp(-11/20)*exp(-v/(80*mV))) + 0.2125*mV/(-0.0113469117865109*mV**2*ms**2*exp(11/20)*exp(v/(80*mV))/(1.0*mV*ms*exp(0.1*v/mV) - 0.0333732699603261*mV*ms) + 0.34*mV**2*ms**2*exp(11/20)*exp(v/(80*mV))/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) - 0.000333732699603261*mV*ms**2*v*exp(11/20)*exp(v/(80*mV))/(1.0*mV*ms*exp(0.1*v/mV) - 0.0333732699603261*mV*ms) + 0.01*mV*ms**2*v*exp(11/20)*exp(v/(80*mV))/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) + 0.125*mV*ms - 0.00417165874504076*mV*ms*exp(-0.1*v/mV)) + 0.0005*v**2/(-0.0226938235730217*mV**3*ms**2/(1.0*mV*ms*exp(0.1*v/mV) - 0.0333732699603261*mV*ms) + 0.000378683550267233*mV**3*ms**2/(-0.0333732699603261*mV*ms*exp(0.1*v/mV) + 1.0*mV*ms*exp(0.2*v/mV)) + 0.34*mV**3*ms**2/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) - 0.000667465399206522*mV**2*ms**2*v/(1.0*mV*ms*exp(0.1*v/mV) - 0.0333732699603261*mV*ms) + 1.1137751478448e-5*mV**2*ms**2*v/(-0.0333732699603261*mV*ms*exp(0.1*v/mV) + 1.0*mV*ms*exp(0.2*v/mV)) + 0.01*mV**2*ms**2*v/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) + 0.0001392218934806*mV**2*ms*exp(-11/20)*exp(-0.2125*v/mV) - 0.00834331749008152*mV**2*ms*exp(-11/20)*exp(-0.1125*v/mV) + 0.125*mV**2*ms*exp(-11/20)*exp(-v/(80*mV))) + 0.00625*v/(-0.0113469117865109*mV**2*ms**2*exp(11/20)*exp(v/(80*mV))/(1.0*mV*ms*exp(0.1*v/mV) - 0.0333732699603261*mV*ms) + 0.34*mV**2*ms**2*exp(11/20)*exp(v/(80*mV))/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) - 0.000333732699603261*mV*ms**2*v*exp(11/20)*exp(v/(80*mV))/(1.0*mV*ms*exp(0.1*v/mV) - 0.0333732699603261*mV*ms) + 0.01*mV*ms**2*v*exp(11/20)*exp(v/(80*mV))/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) + 0.125*mV*ms - 0.00417165874504076*mV*ms*exp(-0.1*v/mV)))/(-1.7*mV/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) - 0.05*v/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) - 0.625*exp(-11/20)/(ms*exp(v/mV)**(1/80))) _n = -_BA_n + (_BA_n + n)*exp(dt*(-1.7*mV/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) - 0.05*v/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) - 0.625*exp(-11/20)/(ms*exp(v/mV)**(1/80)))) _BA_v = (-80*cm**2*gi*mV/(size*ufarad) + cm**2*r*inputs_stim(t)/(size*ufarad) + 1.925*h*m**3*mV*siemens/ufarad - 0.81*mV*n**4*siemens/ufarad - 0.0065*mV*siemens/ufarad + noise)/(-cm**2*ge/(size*ufarad) - cm**2*ge_ext/(size*ufarad) - cm**2*ge_hipp/(size*ufarad) - cm**2*gi/(size*ufarad) - 0.035*h*m**3*siemens/ufarad - 0.009*n**4*siemens/ufarad - 0.0001*siemens/ufarad) _v = -_BA_v + (_BA_v + v)*exp(dt*(-cm**2*ge/(size*ufarad) - cm**2*ge_ext/(size*ufarad) - cm**2*ge_hipp/(size*ufarad) - cm**2*gi/(size*ufarad) - 0.035*h*m**3*siemens/ufarad - 0.009*n**4*siemens/ufarad - 0.0001*siemens/ufarad)) ge = _ge ge_ext = _ge_ext ge_hipp = _ge_hipp gi = _gi h = _h he = _he he_ext = _he_ext he_hipp = _he_hipp hi = _hi m = _m n = _n v = _v 2021-11-05 15:15:06,672 WARNING brian2.parsing.bast.floating_point_division: The expression "29 / 10" divides two integer values. In previous versions of Brian, this would have used either an integer ("flooring") or a floating point division, depending on the Python version and the code generation target. In the current version, it always uses a floating point division. Explicitly ask for an integer division ("//"), or turn one of the operands into a floating point value (e.g. replace "1/2" by "1.0/2") to no longer receive this warning. 2021-11-05 15:15:06,673 WARNING brian2.parsing.bast.floating_point_division: The expression "29 / 5" divides two integer values. In previous versions of Brian, this would have used either an integer ("flooring") or a floating point division, depending on the Python version and the code generation target. In the current version, it always uses a floating point division. Explicitly ask for an integer division ("//"), or turn one of the operands into a floating point value (e.g. replace "1/2" by "1.0/2") to no longer receive this warning. 2021-11-05 15:15:06,673 WARNING brian2.parsing.bast.floating_point_division: The expression "(- 29) / 10" divides two integer values. In previous versions of Brian, this would have used either an integer ("flooring") or a floating point division, depending on the Python version and the code generation target. In the current version, it always uses a floating point division. Explicitly ask for an integer division ("//"), or turn one of the operands into a floating point value (e.g. replace "1/2" by "1.0/2") to no longer receive this warning. 2021-11-05 15:15:06,673 WARNING brian2.parsing.bast.floating_point_division: The expression "1 / 20" divides two integer values. In previous versions of Brian, this would have used either an integer ("flooring") or a floating point division, depending on the Python version and the code generation target. In the current version, it always uses a floating point division. Explicitly ask for an integer division ("//"), or turn one of the operands into a floating point value (e.g. replace "1/2" by "1.0/2") to no longer receive this warning. 2021-11-05 15:15:06,676 WARNING brian2.parsing.bast.floating_point_division: The expression "7 / 2" divides two integer values. In previous versions of Brian, this would have used either an integer ("flooring") or a floating point division, depending on the Python version and the code generation target. In the current version, it always uses a floating point division. Explicitly ask for an integer division ("//"), or turn one of the operands into a floating point value (e.g. replace "1/2" by "1.0/2") to no longer receive this warning. 2021-11-05 15:15:06,676 WARNING brian2.parsing.bast.floating_point_division: The expression "(- 7) / 2" divides two integer values. In previous versions of Brian, this would have used either an integer ("flooring") or a floating point division, depending on the Python version and the code generation target. In the current version, it always uses a floating point division. Explicitly ask for an integer division ("//"), or turn one of the operands into a floating point value (e.g. replace "1/2" by "1.0/2") to no longer receive this warning. 2021-11-05 15:15:06,677 WARNING brian2.parsing.bast.floating_point_division: The expression "(- 10) / 3" divides two integer values. In previous versions of Brian, this would have used either an integer ("flooring") or a floating point division, depending on the Python version and the code generation target. In the current version, it always uses a floating point division. Explicitly ask for an integer division ("//"), or turn one of the operands into a floating point value (e.g. replace "1/2" by "1.0/2") to no longer receive this warning. 2021-11-05 15:15:06,677 WARNING brian2.parsing.bast.floating_point_division: The expression "(- 41) / 6" divides two integer values. In previous versions of Brian, this would have used either an integer ("flooring") or a floating point division, depending on the Python version and the code generation target. In the current version, it always uses a floating point division. Explicitly ask for an integer division ("//"), or turn one of the operands into a floating point value (e.g. replace "1/2" by "1.0/2") to no longer receive this warning. 2021-11-05 15:15:06,677 WARNING brian2.parsing.bast.floating_point_division: The expression "(- 31) / 3" divides two integer values. In previous versions of Brian, this would have used either an integer ("flooring") or a floating point division, depending on the Python version and the code generation target. In the current version, it always uses a floating point division. Explicitly ask for an integer division ("//"), or turn one of the operands into a floating point value (e.g. replace "1/2" by "1.0/2") to no longer receive this warning. 2021-11-05 15:15:06,677 WARNING brian2.parsing.bast.floating_point_division: The expression "10 / 3" divides two integer values. In previous versions of Brian, this would have used either an integer ("flooring") or a floating point division, depending on the Python version and the code generation target. In the current version, it always uses a floating point division. Explicitly ask for an integer division ("//"), or turn one of the operands into a floating point value (e.g. replace "1/2" by "1.0/2") to no longer receive this warning. 2021-11-05 15:15:06,679 WARNING brian2.parsing.bast.floating_point_division: The expression "1 / 18" divides two integer values. In previous versions of Brian, this would have used either an integer ("flooring") or a floating point division, depending on the Python version and the code generation target. In the current version, it always uses a floating point division. Explicitly ask for an integer division ("//"), or turn one of the operands into a floating point value (e.g. replace "1/2" by "1.0/2") to no longer receive this warning. 2021-11-05 15:15:06,680 WARNING brian2.parsing.bast.floating_point_division: The expression "(- 11) / 20" divides two integer values. In previous versions of Brian, this would have used either an integer ("flooring") or a floating point division, depending on the Python version and the code generation target. In the current version, it always uses a floating point division. Explicitly ask for an integer division ("//"), or turn one of the operands into a floating point value (e.g. replace "1/2" by "1.0/2") to no longer receive this warning. 2021-11-05 15:15:06,681 WARNING brian2.parsing.bast.floating_point_division: The expression "11 / 20" divides two integer values. In previous versions of Brian, this would have used either an integer ("flooring") or a floating point division, depending on the Python version and the code generation target. In the current version, it always uses a floating point division. Explicitly ask for an integer division ("//"), or turn one of the operands into a floating point value (e.g. replace "1/2" by "1.0/2") to no longer receive this warning. 2021-11-05 15:15:06,682 WARNING brian2.parsing.bast.floating_point_division: The expression "1 / 80" divides two integer values. In previous versions of Brian, this would have used either an integer ("flooring") or a floating point division, depending on the Python version and the code generation target. In the current version, it always uses a floating point division. Explicitly ask for an integer division ("//"), or turn one of the operands into a floating point value (e.g. replace "1/2" by "1.0/2") to no longer receive this warning. 2021-11-05 15:15:06,693 DIAGNOSTIC brian2.devices.device: CA1_inh_stateupdater_codeobject abstract code: not_refractory = timestep(t - lastspike, dt) >= timestep(0.003000, dt) _BA_ge = -1.0*he _ge = -_BA_ge + (_BA_ge + ge)*exp(-3.33333333333333*dt/ms) _BA_ge_ext = -1.0*he_ext _ge_ext = -_BA_ge_ext + (_BA_ge_ext + ge_ext)*exp(-3.33333333333333*dt/ms) _BA_ge_hipp = -1.0*he_hipp _ge_hipp = -_BA_ge_hipp + (_BA_ge_hipp + ge_hipp)*exp(-3.33333333333333*dt/ms) _BA_gi = -1.0*hi _gi = -_BA_gi + (_BA_gi + gi)*exp(-1.0*dt/ms) _BA_h = (0.35/(0.060810062625218*ms**2*exp(29/10)/(1.0*ms*exp(0.05*v/mV) + 0.060810062625218*ms*exp(-0.05*v/mV)) + 1.0*ms**2*exp(29/10)*exp(v/(20*mV))/(1.0*ms + 0.060810062625218*ms*exp(-0.1*v/mV)) + 0.07*ms + 0.00425670438376526*ms*exp(-0.1*v/mV)) + 0.0245/(1.0*ms**2*exp(29/5)*exp(v/(10*mV))/(1.0*ms + 0.060810062625218*ms*exp(-0.1*v/mV)) + 0.07*ms*exp(29/10)*exp(v/(20*mV))))/(-5.0/(1.0*ms + 0.060810062625218*ms*exp(-0.1*v/mV)) - 0.35*exp(-29/10)/(ms*exp(v/mV)**(1/20))) _h = -_BA_h + (_BA_h + h)*exp(dt*(-5.0/(1.0*ms + 0.060810062625218*ms*exp(-0.1*v/mV)) - 0.35*exp(-29/10)/(ms*exp(v/mV)**(1/20)))) _he = he*exp(-dt/(5*ms)) _he_ext = he_ext*exp(-dt/(5*ms)) _he_hipp = he_hipp*exp(-dt/(5*ms)) _hi = hi*exp(-dt/(10*ms)) _BA_m = (61.25*mV**2/(-7.0*mV**3*ms**2/(1.0*mV*ms*exp(7/2)*exp(v/(10*mV)) - mV*ms) + 3.5*mV**3*ms**2/(-mV*ms*exp(7/2)*exp(v/(10*mV)) + 1.0*mV*ms*exp(7)*exp(v/(5*mV))) + 3.5*mV**3*ms**2/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) - 0.2*mV**2*ms**2*v/(1.0*mV*ms*exp(7/2)*exp(v/(10*mV)) - mV*ms) + 0.1*mV**2*ms**2*v/(-mV*ms*exp(7/2)*exp(v/(10*mV)) + 1.0*mV*ms*exp(7)*exp(v/(5*mV))) + 0.1*mV**2*ms**2*v/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) + 4.0*mV**2*ms*exp(-10/3)*exp(-v/(18*mV)) - 8.0*mV**2*ms*exp(-41/6)*exp(-7*v/(45*mV)) + 4*mV**2*ms*exp(-31/3)*exp(-23*v/(90*mV))) + 3.5*mV*v/(-7.0*mV**3*ms**2/(1.0*mV*ms*exp(7/2)*exp(v/(10*mV)) - mV*ms) + 3.5*mV**3*ms**2/(-mV*ms*exp(7/2)*exp(v/(10*mV)) + 1.0*mV*ms*exp(7)*exp(v/(5*mV))) + 3.5*mV**3*ms**2/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) - 0.2*mV**2*ms**2*v/(1.0*mV*ms*exp(7/2)*exp(v/(10*mV)) - mV*ms) + 0.1*mV**2*ms**2*v/(-mV*ms*exp(7/2)*exp(v/(10*mV)) + 1.0*mV*ms*exp(7)*exp(v/(5*mV))) + 0.1*mV**2*ms**2*v/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) + 4.0*mV**2*ms*exp(-10/3)*exp(-v/(18*mV)) - 8.0*mV**2*ms*exp(-41/6)*exp(-7*v/(45*mV)) + 4*mV**2*ms*exp(-31/3)*exp(-23*v/(90*mV))) + 70.0*mV/(-3.5*mV**2*ms**2*exp(10/3)*exp(v/(18*mV))/(1.0*mV*ms*exp(7/2)*exp(v/(10*mV)) - mV*ms) + 3.5*mV**2*ms**2*exp(10/3)*exp(v/(18*mV))/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) - 0.1*mV*ms**2*v*exp(10/3)*exp(v/(18*mV))/(1.0*mV*ms*exp(7/2)*exp(v/(10*mV)) - mV*ms) + 0.1*mV*ms**2*v*exp(10/3)*exp(v/(18*mV))/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) + 4.0*mV*ms - 4*mV*ms*exp(-7/2)*exp(-v/(10*mV))) + 0.05*v**2/(-7.0*mV**3*ms**2/(1.0*mV*ms*exp(7/2)*exp(v/(10*mV)) - mV*ms) + 3.5*mV**3*ms**2/(-mV*ms*exp(7/2)*exp(v/(10*mV)) + 1.0*mV*ms*exp(7)*exp(v/(5*mV))) + 3.5*mV**3*ms**2/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) - 0.2*mV**2*ms**2*v/(1.0*mV*ms*exp(7/2)*exp(v/(10*mV)) - mV*ms) + 0.1*mV**2*ms**2*v/(-mV*ms*exp(7/2)*exp(v/(10*mV)) + 1.0*mV*ms*exp(7)*exp(v/(5*mV))) + 0.1*mV**2*ms**2*v/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) + 4.0*mV**2*ms*exp(-10/3)*exp(-v/(18*mV)) - 8.0*mV**2*ms*exp(-41/6)*exp(-7*v/(45*mV)) + 4*mV**2*ms*exp(-31/3)*exp(-23*v/(90*mV))) + 2.0*v/(-3.5*mV**2*ms**2*exp(10/3)*exp(v/(18*mV))/(1.0*mV*ms*exp(7/2)*exp(v/(10*mV)) - mV*ms) + 3.5*mV**2*ms**2*exp(10/3)*exp(v/(18*mV))/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) - 0.1*mV*ms**2*v*exp(10/3)*exp(v/(18*mV))/(1.0*mV*ms*exp(7/2)*exp(v/(10*mV)) - mV*ms) + 0.1*mV*ms**2*v*exp(10/3)*exp(v/(18*mV))/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) + 4.0*mV*ms - 4*mV*ms*exp(-7/2)*exp(-v/(10*mV))))/(-17.5*mV/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) - 0.5*v/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) - 20.0*exp(-10/3)/(ms*exp(v/mV)**(1/18))) _m = -_BA_m + (_BA_m + m)*exp(dt*(-17.5*mV/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) - 0.5*v/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) - 20.0*exp(-10/3)/(ms*exp(v/mV)**(1/18)))) _BA_n = (0.578*mV**2/(-0.0226938235730217*mV**3*ms**2/(1.0*mV*ms*exp(0.1*v/mV) - 0.0333732699603261*mV*ms) + 0.000378683550267233*mV**3*ms**2/(-0.0333732699603261*mV*ms*exp(0.1*v/mV) + 1.0*mV*ms*exp(0.2*v/mV)) + 0.34*mV**3*ms**2/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) - 0.000667465399206522*mV**2*ms**2*v/(1.0*mV*ms*exp(0.1*v/mV) - 0.0333732699603261*mV*ms) + 1.1137751478448e-5*mV**2*ms**2*v/(-0.0333732699603261*mV*ms*exp(0.1*v/mV) + 1.0*mV*ms*exp(0.2*v/mV)) + 0.01*mV**2*ms**2*v/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) + 0.0001392218934806*mV**2*ms*exp(-11/20)*exp(-0.2125*v/mV) - 0.00834331749008152*mV**2*ms*exp(-11/20)*exp(-0.1125*v/mV) + 0.125*mV**2*ms*exp(-11/20)*exp(-v/(80*mV))) + 0.034*mV*v/(-0.0226938235730217*mV**3*ms**2/(1.0*mV*ms*exp(0.1*v/mV) - 0.0333732699603261*mV*ms) + 0.000378683550267233*mV**3*ms**2/(-0.0333732699603261*mV*ms*exp(0.1*v/mV) + 1.0*mV*ms*exp(0.2*v/mV)) + 0.34*mV**3*ms**2/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) - 0.000667465399206522*mV**2*ms**2*v/(1.0*mV*ms*exp(0.1*v/mV) - 0.0333732699603261*mV*ms) + 1.1137751478448e-5*mV**2*ms**2*v/(-0.0333732699603261*mV*ms*exp(0.1*v/mV) + 1.0*mV*ms*exp(0.2*v/mV)) + 0.01*mV**2*ms**2*v/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) + 0.0001392218934806*mV**2*ms*exp(-11/20)*exp(-0.2125*v/mV) - 0.00834331749008152*mV**2*ms*exp(-11/20)*exp(-0.1125*v/mV) + 0.125*mV**2*ms*exp(-11/20)*exp(-v/(80*mV))) + 0.2125*mV/(-0.0113469117865109*mV**2*ms**2*exp(11/20)*exp(v/(80*mV))/(1.0*mV*ms*exp(0.1*v/mV) - 0.0333732699603261*mV*ms) + 0.34*mV**2*ms**2*exp(11/20)*exp(v/(80*mV))/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) - 0.000333732699603261*mV*ms**2*v*exp(11/20)*exp(v/(80*mV))/(1.0*mV*ms*exp(0.1*v/mV) - 0.0333732699603261*mV*ms) + 0.01*mV*ms**2*v*exp(11/20)*exp(v/(80*mV))/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) + 0.125*mV*ms - 0.00417165874504076*mV*ms*exp(-0.1*v/mV)) + 0.0005*v**2/(-0.0226938235730217*mV**3*ms**2/(1.0*mV*ms*exp(0.1*v/mV) - 0.0333732699603261*mV*ms) + 0.000378683550267233*mV**3*ms**2/(-0.0333732699603261*mV*ms*exp(0.1*v/mV) + 1.0*mV*ms*exp(0.2*v/mV)) + 0.34*mV**3*ms**2/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) - 0.000667465399206522*mV**2*ms**2*v/(1.0*mV*ms*exp(0.1*v/mV) - 0.0333732699603261*mV*ms) + 1.1137751478448e-5*mV**2*ms**2*v/(-0.0333732699603261*mV*ms*exp(0.1*v/mV) + 1.0*mV*ms*exp(0.2*v/mV)) + 0.01*mV**2*ms**2*v/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) + 0.0001392218934806*mV**2*ms*exp(-11/20)*exp(-0.2125*v/mV) - 0.00834331749008152*mV**2*ms*exp(-11/20)*exp(-0.1125*v/mV) + 0.125*mV**2*ms*exp(-11/20)*exp(-v/(80*mV))) + 0.00625*v/(-0.0113469117865109*mV**2*ms**2*exp(11/20)*exp(v/(80*mV))/(1.0*mV*ms*exp(0.1*v/mV) - 0.0333732699603261*mV*ms) + 0.34*mV**2*ms**2*exp(11/20)*exp(v/(80*mV))/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) - 0.000333732699603261*mV*ms**2*v*exp(11/20)*exp(v/(80*mV))/(1.0*mV*ms*exp(0.1*v/mV) - 0.0333732699603261*mV*ms) + 0.01*mV*ms**2*v*exp(11/20)*exp(v/(80*mV))/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) + 0.125*mV*ms - 0.00417165874504076*mV*ms*exp(-0.1*v/mV)))/(-1.7*mV/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) - 0.05*v/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) - 0.625*exp(-11/20)/(ms*exp(v/mV)**(1/80))) _n = -_BA_n + (_BA_n + n)*exp(dt*(-1.7*mV/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) - 0.05*v/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) - 0.625*exp(-11/20)/(ms*exp(v/mV)**(1/80)))) _BA_v = (-80*cm**2*gi*mV/(size*ufarad) + cm**2*r*inputs_stim(t)/(size*ufarad) + 1.925*h*m**3*mV*siemens/ufarad - 0.81*mV*n**4*siemens/ufarad - 0.0065*mV*siemens/ufarad + noise)/(-cm**2*ge/(size*ufarad) - cm**2*ge_ext/(size*ufarad) - cm**2*ge_hipp/(size*ufarad) - cm**2*gi/(size*ufarad) - 0.035*h*m**3*siemens/ufarad - 0.009*n**4*siemens/ufarad - 0.0001*siemens/ufarad) _v = -_BA_v + (_BA_v + v)*exp(dt*(-cm**2*ge/(size*ufarad) - cm**2*ge_ext/(size*ufarad) - cm**2*ge_hipp/(size*ufarad) - cm**2*gi/(size*ufarad) - 0.035*h*m**3*siemens/ufarad - 0.009*n**4*siemens/ufarad - 0.0001*siemens/ufarad)) ge = _ge ge_ext = _ge_ext ge_hipp = _ge_hipp gi = _gi h = _h he = _he he_ext = _he_ext he_hipp = _he_hipp hi = _hi m = _m n = _n v = _v 2021-11-05 15:15:06,963 DIAGNOSTIC brian2.devices.device: CA1_inh_stateupdater_codeobject snippet (scalar): t = _array_defaultclock_t[0] dt = _array_defaultclock_dt[0] _lio_1 = _timestep(0.003, dt) _lio_2 = exp(((- 3.33333333333333) * dt) / ms) _lio_3 = exp(((- 1.0) * dt) / ms) _lio_4 = 0.07 * ms _lio_5 = 0.060810062625218 * ((ms ** 2) * 18.17414536944306) _lio_6 = 0.05 / mV _lio_7 = 0.060810062625218 * ms _lio_8 = (- 0.05) / mV _lio_9 = (ms ** 2) * 18.17414536944306 _lio_10 = (- 0.1) / mV _lio_11 = 0.00425670438376526 * ms _lio_12 = (ms ** 2) * 330.2995599096486 _lio_13 = 0.1 / mV _lio_14 = 0.07 * (ms * 18.17414536944306) _lio_15 = 0.019258127019742523 / ms _lio_16 = 1.0 / mV _lio_17 = exp((0.2 * (- dt)) / ms) _lio_18 = exp((0.1 * (- dt)) / ms) _lio_19 = 61.25 * (mV ** 2) _lio_20 = ((- 7.0) * (mV ** 3)) * (ms ** 2) _lio_21 = 0.0 - (mV * ms) _lio_22 = (mV * ms) * 33.11545195869231 _lio_23 = 3.5 * ((mV ** 3) * (ms ** 2)) _lio_24 = ((- mV) * ms) * 33.11545195869231 _lio_25 = (mV * ms) * 1096.6331584284585 _lio_26 = 0.2 / mV _lio_27 = mV * ms _lio_28 = (mV * ms) * 0.0301973834223185 _lio_29 = 0.1 * ((mV ** 2) * (ms ** 2)) _lio_30 = 4.0 * (((mV ** 2) * ms) * 0.03567399334725241) _lio_31 = 0.05555555555555555 / mV _lio_32 = 4.0 * (((mV ** 2) * ms) * 3.253047117267129e-05) _lio_33 = (- 0.2555555555555556) / mV _lio_34 = 0.2 * ((mV ** 2) * (ms ** 2)) _lio_35 = 8.0 * (((mV ** 2) * ms) * 0.0010772612553122203) _lio_36 = (- 0.15555555555555556) / mV _lio_37 = 3.5 * mV _lio_38 = 70.0 * mV _lio_39 = 4.0 * (mV * ms) _lio_40 = (((- 3.5) * (mV ** 2)) * (ms ** 2)) * 28.03162489452614 _lio_41 = 3.5 * (((mV ** 2) * (ms ** 2)) * 28.03162489452614) _lio_42 = 0.1 * ((mV * (ms ** 2)) * 28.03162489452614) _lio_43 = 4.0 * ((mV * ms) * 0.0301973834223185) _lio_44 = (- 17.5) * mV _lio_45 = 0.7134798669450482 / ms _lio_46 = 0.578 * (mV ** 2) _lio_47 = ((- 0.0226938235730217) * (mV ** 3)) * (ms ** 2) _lio_48 = 0.0 - (0.0333732699603261 * (mV * ms)) _lio_49 = 0.000378683550267233 * ((mV ** 3) * (ms ** 2)) _lio_50 = ((- 0.0333732699603261) * mV) * ms _lio_51 = 0.34 * ((mV ** 3) * (ms ** 2)) _lio_52 = 0.0333732699603261 * (mV * ms) _lio_53 = 1.1137751478448e-05 * ((mV ** 2) * (ms ** 2)) _lio_54 = 0.01 * ((mV ** 2) * (ms ** 2)) _lio_55 = 0.0001392218934806 * (((mV ** 2) * ms) * 0.5769498103804866) _lio_56 = (- 0.2125) / mV _lio_57 = 0.125 * (((mV ** 2) * ms) * 0.5769498103804866) _lio_58 = 0.0125 / mV _lio_59 = 0.000667465399206522 * ((mV ** 2) * (ms ** 2)) _lio_60 = 0.00834331749008152 * (((mV ** 2) * ms) * 0.5769498103804866) _lio_61 = (- 0.1125) / mV _lio_62 = 0.034 * mV _lio_63 = 0.2125 * mV _lio_64 = 0.125 * (mV * ms) _lio_65 = (((- 0.0113469117865109) * (mV ** 2)) * (ms ** 2)) * 1.7332530178673953 _lio_66 = 0.34 * (((mV ** 2) * (ms ** 2)) * 1.7332530178673953) _lio_67 = 0.01 * ((mV * (ms ** 2)) * 1.7332530178673953) _lio_68 = 0.000333732699603261 * ((mV * (ms ** 2)) * 1.7332530178673953) _lio_69 = 0.00417165874504076 * (mV * ms) _lio_70 = (- 1.7) * mV _lio_71 = 0.36059363148780416 / ms _lio_72 = 0.0 - ((0.0065 * (mV * siemens)) / ufarad) _lio_73 = (((- 80.0) * (cm ** 2)) * mV) / ufarad _lio_74 = ((cm ** 2) * _timedarray(t)) / ufarad _lio_75 = (1.925 * (mV * siemens)) / ufarad _lio_76 = (0.81 * (mV * siemens)) / ufarad _lio_77 = 0.0 - ((0.0001 * siemens) / ufarad) _lio_78 = (- (cm ** 2)) / ufarad _lio_79 = (cm ** 2) / ufarad _lio_80 = (0.035 * siemens) / ufarad _lio_81 = (0.009 * siemens) / ufarad 2021-11-05 15:15:06,964 DIAGNOSTIC brian2.devices.device: CA1_inh_stateupdater_codeobject snippet (vector): hi = _array_CA1_inh_hi[_idx] lastspike = _array_CA1_inh_lastspike[_idx] gi = _array_CA1_inh_gi[_idx] ge = _array_CA1_inh_ge[_idx] noise = _array_CA1_inh_noise[_idx] v = _array_CA1_inh_v[_idx] h = _array_CA1_inh_h[_idx] he_hipp = _array_CA1_inh_he_hipp[_idx] n = _array_CA1_inh_n[_idx] r = _array_CA1_inh_r[_idx] size = _array_CA1_inh_size[_idx] he = _array_CA1_inh_he[_idx] ge_hipp = _array_CA1_inh_ge_hipp[_idx] m = _array_CA1_inh_m[_idx] ge_ext = _array_CA1_inh_ge_ext[_idx] he_ext = _array_CA1_inh_he_ext[_idx] not_refractory = _timestep(t - lastspike, dt) >= _lio_1 _BA_ge = (- 1.0) * he _ge = (- _BA_ge) + (_lio_2 * (_BA_ge + ge)) _BA_ge_ext = (- 1.0) * he_ext _ge_ext = (- _BA_ge_ext) + (_lio_2 * (_BA_ge_ext + ge_ext)) _BA_ge_hipp = (- 1.0) * he_hipp _ge_hipp = (- _BA_ge_hipp) + (_lio_2 * (_BA_ge_hipp + ge_hipp)) _BA_gi = (- 1.0) * hi _gi = (- _BA_gi) + (_lio_3 * (_BA_gi + gi)) _BA_h = ((0.35 / (_lio_4 + (((_lio_5 / ((ms * exp(_lio_6 * v)) + (_lio_7 * exp(_lio_8 * v)))) + ((_lio_9 * exp(_lio_6 * v)) / (ms + (_lio_7 * exp(_lio_10 * v))))) + (_lio_11 * exp(_lio_10 * v))))) + (0.0245 / (((_lio_12 * exp(_lio_13 * v)) / (ms + (_lio_7 * exp(_lio_10 * v)))) + (_lio_14 * exp(_lio_6 * v))))) / (((- 5.0) / (ms + (_lio_7 * exp(_lio_10 * v)))) - (_lio_15 / (exp(_lio_16 * v) ** 0.05))) _h = (- _BA_h) + ((_BA_h + h) * exp(dt * (((- 5.0) / (ms + (_lio_7 * exp(_lio_10 * v)))) - (_lio_15 / (exp(_lio_16 * v) ** 0.05))))) _he = _lio_17 * he _he_ext = _lio_17 * he_ext _he_hipp = _lio_17 * he_hipp _hi = _lio_18 * hi _BA_m = (((((_lio_19 / ((((((((_lio_20 / (_lio_21 + (_lio_22 * exp(_lio_13 * v)))) + (_lio_23 / ((_lio_24 * exp(_lio_13 * v)) + (_lio_25 * exp(_lio_26 * v))))) + (_lio_23 / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v)))))) + ((_lio_29 * v) / ((_lio_24 * exp(_lio_13 * v)) + (_lio_25 * exp(_lio_26 * v))))) + ((_lio_29 * v) / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v)))))) + (_lio_30 * exp(_lio_31 * (- v)))) + (_lio_32 * exp(_lio_33 * v))) - (((_lio_34 * v) / (_lio_21 + (_lio_22 * exp(_lio_13 * v)))) + (_lio_35 * exp(_lio_36 * v))))) + ((_lio_37 * v) / ((((((((_lio_20 / (_lio_21 + (_lio_22 * exp(_lio_13 * v)))) + (_lio_23 / ((_lio_24 * exp(_lio_13 * v)) + (_lio_25 * exp(_lio_26 * v))))) + (_lio_23 / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v)))))) + ((_lio_29 * v) / ((_lio_24 * exp(_lio_13 * v)) + (_lio_25 * exp(_lio_26 * v))))) + ((_lio_29 * v) / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v)))))) + (_lio_30 * exp(_lio_31 * (- v)))) + (_lio_32 * exp(_lio_33 * v))) - (((_lio_34 * v) / (_lio_21 + (_lio_22 * exp(_lio_13 * v)))) + (_lio_35 * exp(_lio_36 * v)))))) + (_lio_38 / ((_lio_39 + ((((_lio_40 * exp(_lio_31 * v)) / (_lio_21 + (_lio_22 * exp(_lio_13 * v)))) + ((_lio_41 * exp(_lio_31 * v)) / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v)))))) + ((_lio_42 * (v * exp(_lio_31 * v))) / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v))))))) - (((_lio_42 * (v * exp(_lio_31 * v))) / (_lio_21 + (_lio_22 * exp(_lio_13 * v)))) + (_lio_43 * exp(_lio_13 * (- v))))))) + ((0.05 * (v ** 2)) / ((((((((_lio_20 / (_lio_21 + (_lio_22 * exp(_lio_13 * v)))) + (_lio_23 / ((_lio_24 * exp(_lio_13 * v)) + (_lio_25 * exp(_lio_26 * v))))) + (_lio_23 / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v)))))) + ((_lio_29 * v) / ((_lio_24 * exp(_lio_13 * v)) + (_lio_25 * exp(_lio_26 * v))))) + ((_lio_29 * v) / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v)))))) + (_lio_30 * exp(_lio_31 * (- v)))) + (_lio_32 * exp(_lio_33 * v))) - (((_lio_34 * v) / (_lio_21 + (_lio_22 * exp(_lio_13 * v)))) + (_lio_35 * exp(_lio_36 * v)))))) + ((2.0 * v) / ((_lio_39 + ((((_lio_40 * exp(_lio_31 * v)) / (_lio_21 + (_lio_22 * exp(_lio_13 * v)))) + ((_lio_41 * exp(_lio_31 * v)) / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v)))))) + ((_lio_42 * (v * exp(_lio_31 * v))) / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v))))))) - (((_lio_42 * (v * exp(_lio_31 * v))) / (_lio_21 + (_lio_22 * exp(_lio_13 * v)))) + (_lio_43 * exp(_lio_13 * (- v))))))) / ((_lio_44 / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v))))) - (((0.5 * v) / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v))))) + (_lio_45 / (exp(_lio_16 * v) ** 0.05555555555555555)))) _m = (- _BA_m) + ((_BA_m + m) * exp(dt * ((_lio_44 / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v))))) - (((0.5 * v) / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v))))) + (_lio_45 / (exp(_lio_16 * v) ** 0.05555555555555555)))))) _BA_n = (((((_lio_46 / ((((((((_lio_47 / (_lio_48 + (_lio_27 * exp(_lio_13 * v)))) + (_lio_49 / ((_lio_50 * exp(_lio_13 * v)) + (_lio_27 * exp(_lio_26 * v))))) + (_lio_51 / (_lio_27 - (_lio_52 * exp(_lio_10 * v))))) + ((_lio_53 * v) / ((_lio_50 * exp(_lio_13 * v)) + (_lio_27 * exp(_lio_26 * v))))) + ((_lio_54 * v) / (_lio_27 - (_lio_52 * exp(_lio_10 * v))))) + (_lio_55 * exp(_lio_56 * v))) + (_lio_57 * exp(_lio_58 * (- v)))) - (((_lio_59 * v) / (_lio_48 + (_lio_27 * exp(_lio_13 * v)))) + (_lio_60 * exp(_lio_61 * v))))) + ((_lio_62 * v) / ((((((((_lio_47 / (_lio_48 + (_lio_27 * exp(_lio_13 * v)))) + (_lio_49 / ((_lio_50 * exp(_lio_13 * v)) + (_lio_27 * exp(_lio_26 * v))))) + (_lio_51 / (_lio_27 - (_lio_52 * exp(_lio_10 * v))))) + ((_lio_53 * v) / ((_lio_50 * exp(_lio_13 * v)) + (_lio_27 * exp(_lio_26 * v))))) + ((_lio_54 * v) / (_lio_27 - (_lio_52 * exp(_lio_10 * v))))) + (_lio_55 * exp(_lio_56 * v))) + (_lio_57 * exp(_lio_58 * (- v)))) - (((_lio_59 * v) / (_lio_48 + (_lio_27 * exp(_lio_13 * v)))) + (_lio_60 * exp(_lio_61 * v)))))) + (_lio_63 / ((_lio_64 + ((((_lio_65 * exp(_lio_58 * v)) / (_lio_48 + (_lio_27 * exp(_lio_13 * v)))) + ((_lio_66 * exp(_lio_58 * v)) / (_lio_27 - (_lio_52 * exp(_lio_10 * v))))) + ((_lio_67 * (v * exp(_lio_58 * v))) / (_lio_27 - (_lio_52 * exp(_lio_10 * v)))))) - (((_lio_68 * (v * exp(_lio_58 * v))) / (_lio_48 + (_lio_27 * exp(_lio_13 * v)))) + (_lio_69 * exp(_lio_10 * v)))))) + ((0.0005 * (v ** 2)) / ((((((((_lio_47 / (_lio_48 + (_lio_27 * exp(_lio_13 * v)))) + (_lio_49 / ((_lio_50 * exp(_lio_13 * v)) + (_lio_27 * exp(_lio_26 * v))))) + (_lio_51 / (_lio_27 - (_lio_52 * exp(_lio_10 * v))))) + ((_lio_53 * v) / ((_lio_50 * exp(_lio_13 * v)) + (_lio_27 * exp(_lio_26 * v))))) + ((_lio_54 * v) / (_lio_27 - (_lio_52 * exp(_lio_10 * v))))) + (_lio_55 * exp(_lio_56 * v))) + (_lio_57 * exp(_lio_58 * (- v)))) - (((_lio_59 * v) / (_lio_48 + (_lio_27 * exp(_lio_13 * v)))) + (_lio_60 * exp(_lio_61 * v)))))) + ((0.00625 * v) / ((_lio_64 + ((((_lio_65 * exp(_lio_58 * v)) / (_lio_48 + (_lio_27 * exp(_lio_13 * v)))) + ((_lio_66 * exp(_lio_58 * v)) / (_lio_27 - (_lio_52 * exp(_lio_10 * v))))) + ((_lio_67 * (v * exp(_lio_58 * v))) / (_lio_27 - (_lio_52 * exp(_lio_10 * v)))))) - (((_lio_68 * (v * exp(_lio_58 * v))) / (_lio_48 + (_lio_27 * exp(_lio_13 * v)))) + (_lio_69 * exp(_lio_10 * v)))))) / ((_lio_70 / (_lio_27 - (_lio_52 * exp(_lio_10 * v)))) - (((0.05 * v) / (_lio_27 - (_lio_52 * exp(_lio_10 * v)))) + (_lio_71 / (exp(_lio_16 * v) ** 0.0125)))) _n = (- _BA_n) + ((_BA_n + n) * exp(dt * ((_lio_70 / (_lio_27 - (_lio_52 * exp(_lio_10 * v)))) - (((0.05 * v) / (_lio_27 - (_lio_52 * exp(_lio_10 * v)))) + (_lio_71 / (exp(_lio_16 * v) ** 0.0125)))))) _BA_v = ((_lio_72 + (((((_lio_73 * gi) / size) + ((_lio_74 * r) / size)) + (_lio_75 * (h * (m ** 3)))) + noise)) - (_lio_76 * (n ** 4))) / ((_lio_77 + ((_lio_78 * ge) / size)) - ((((((_lio_79 * ge_ext) / size) + ((_lio_79 * ge_hipp) / size)) + ((_lio_79 * gi) / size)) + (_lio_80 * (h * (m ** 3)))) + (_lio_81 * (n ** 4)))) _v = (- _BA_v) + ((_BA_v + v) * exp(dt * ((_lio_77 + ((_lio_78 * ge) / size)) - ((((((_lio_79 * ge_ext) / size) + ((_lio_79 * ge_hipp) / size)) + ((_lio_79 * gi) / size)) + (_lio_80 * (h * (m ** 3)))) + (_lio_81 * (n ** 4)))))) ge = _ge ge_ext = _ge_ext ge_hipp = _ge_hipp gi = _gi h = _h he = _he he_ext = _he_ext he_hipp = _he_hipp hi = _hi m = _m n = _n v = _v _array_CA1_inh_hi[_idx] = hi _array_CA1_inh_ge[_idx] = ge _array_CA1_inh_gi[_idx] = gi _array_CA1_inh_v[_idx] = v _array_CA1_inh_h[_idx] = h _array_CA1_inh_he_hipp[_idx] = he_hipp _array_CA1_inh_n[_idx] = n _array_CA1_inh_ge_hipp[_idx] = ge_hipp _array_CA1_inh_m[_idx] = m _array_CA1_inh_he[_idx] = he _array_CA1_inh_ge_ext[_idx] = ge_ext _array_CA1_inh_he_ext[_idx] = he_ext _array_CA1_inh_not_refractory[_idx] = not_refractory 2021-11-05 15:15:06,964 DIAGNOSTIC brian2.devices.device: CA1_inh_stateupdater_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code cdef double *_namespace_timedarray_values cdef double _timedarray(const double t): global _namespace_timedarray_values cdef double epsilon = 0.001000000000000000 / 128 cdef int i = (int)((t/epsilon + 0.5)/128) if i < 0: i = 0 if i >= 2001: i = 2001 - 1 return _namespace_timedarray_values[i] cdef int64_t _timestep(double t, double dt): return ((t + 1e-3*dt)/dt) # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var_N = _namespace["_var_N"] cdef int64_t N = _namespace["N"] _var_cm = _namespace["_var_cm"] cdef double cm = _namespace["cm"] _var_dt = _namespace["_var_dt"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_dt = _namespace['_array_defaultclock_dt'] cdef double * _array_defaultclock_dt = _buf__array_defaultclock_dt.data cdef double dt = _namespace["dt"] _var_ge = _namespace["_var_ge"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_ge = _namespace['_array_CA1_inh_ge'] cdef double * _array_CA1_inh_ge = _buf__array_CA1_inh_ge.data cdef size_t _num_array_CA1_inh_ge = len(_namespace['_array_CA1_inh_ge']) cdef double ge _var_ge_ext = _namespace["_var_ge_ext"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_ge_ext = _namespace['_array_CA1_inh_ge_ext'] cdef double * _array_CA1_inh_ge_ext = _buf__array_CA1_inh_ge_ext.data cdef size_t _num_array_CA1_inh_ge_ext = len(_namespace['_array_CA1_inh_ge_ext']) cdef double ge_ext _var_ge_hipp = _namespace["_var_ge_hipp"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_ge_hipp = _namespace['_array_CA1_inh_ge_hipp'] cdef double * _array_CA1_inh_ge_hipp = _buf__array_CA1_inh_ge_hipp.data cdef size_t _num_array_CA1_inh_ge_hipp = len(_namespace['_array_CA1_inh_ge_hipp']) cdef double ge_hipp _var_gi = _namespace["_var_gi"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_gi = _namespace['_array_CA1_inh_gi'] cdef double * _array_CA1_inh_gi = _buf__array_CA1_inh_gi.data cdef size_t _num_array_CA1_inh_gi = len(_namespace['_array_CA1_inh_gi']) cdef double gi _var_h = _namespace["_var_h"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_h = _namespace['_array_CA1_inh_h'] cdef double * _array_CA1_inh_h = _buf__array_CA1_inh_h.data cdef size_t _num_array_CA1_inh_h = len(_namespace['_array_CA1_inh_h']) cdef double h _var_he = _namespace["_var_he"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_he = _namespace['_array_CA1_inh_he'] cdef double * _array_CA1_inh_he = _buf__array_CA1_inh_he.data cdef size_t _num_array_CA1_inh_he = len(_namespace['_array_CA1_inh_he']) cdef double he _var_he_ext = _namespace["_var_he_ext"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_he_ext = _namespace['_array_CA1_inh_he_ext'] cdef double * _array_CA1_inh_he_ext = _buf__array_CA1_inh_he_ext.data cdef size_t _num_array_CA1_inh_he_ext = len(_namespace['_array_CA1_inh_he_ext']) cdef double he_ext _var_he_hipp = _namespace["_var_he_hipp"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_he_hipp = _namespace['_array_CA1_inh_he_hipp'] cdef double * _array_CA1_inh_he_hipp = _buf__array_CA1_inh_he_hipp.data cdef size_t _num_array_CA1_inh_he_hipp = len(_namespace['_array_CA1_inh_he_hipp']) cdef double he_hipp _var_hi = _namespace["_var_hi"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_hi = _namespace['_array_CA1_inh_hi'] cdef double * _array_CA1_inh_hi = _buf__array_CA1_inh_hi.data cdef size_t _num_array_CA1_inh_hi = len(_namespace['_array_CA1_inh_hi']) cdef double hi # namespace for function inputs_stim global _namespace_timedarray_values global _namespace_num_timedarray_values cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__timedarray_values = _namespace['_timedarray_values'] _namespace_timedarray_values = _buf__timedarray_values.data _namespace_num_timedarray_values = len(_namespace['_timedarray_values']) _var_lastspike = _namespace["_var_lastspike"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_lastspike = _namespace['_array_CA1_inh_lastspike'] cdef double * _array_CA1_inh_lastspike = _buf__array_CA1_inh_lastspike.data cdef size_t _num_array_CA1_inh_lastspike = len(_namespace['_array_CA1_inh_lastspike']) cdef double lastspike _var_m = _namespace["_var_m"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_m = _namespace['_array_CA1_inh_m'] cdef double * _array_CA1_inh_m = _buf__array_CA1_inh_m.data cdef size_t _num_array_CA1_inh_m = len(_namespace['_array_CA1_inh_m']) cdef double m _var_mV = _namespace["_var_mV"] cdef double mV = _namespace["mV"] _var_ms = _namespace["_var_ms"] cdef double ms = _namespace["ms"] _var_n = _namespace["_var_n"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_n = _namespace['_array_CA1_inh_n'] cdef double * _array_CA1_inh_n = _buf__array_CA1_inh_n.data cdef size_t _num_array_CA1_inh_n = len(_namespace['_array_CA1_inh_n']) cdef double n _var_noise = _namespace["_var_noise"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_noise = _namespace['_array_CA1_inh_noise'] cdef double * _array_CA1_inh_noise = _buf__array_CA1_inh_noise.data cdef size_t _num_array_CA1_inh_noise = len(_namespace['_array_CA1_inh_noise']) cdef double noise _var_not_refractory = _namespace["_var_not_refractory"] cdef _numpy.ndarray[char, ndim=1, mode='c', cast=True] _buf__array_CA1_inh_not_refractory = _namespace['_array_CA1_inh_not_refractory'] cdef bool * _array_CA1_inh_not_refractory = _buf__array_CA1_inh_not_refractory.data cdef size_t _num_array_CA1_inh_not_refractory = len(_namespace['_array_CA1_inh_not_refractory']) cdef bool not_refractory _var_r = _namespace["_var_r"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_r = _namespace['_array_CA1_inh_r'] cdef double * _array_CA1_inh_r = _buf__array_CA1_inh_r.data cdef size_t _num_array_CA1_inh_r = len(_namespace['_array_CA1_inh_r']) cdef double r _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] _var_size = _namespace["_var_size"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_size = _namespace['_array_CA1_inh_size'] cdef double * _array_CA1_inh_size = _buf__array_CA1_inh_size.data cdef size_t _num_array_CA1_inh_size = len(_namespace['_array_CA1_inh_size']) cdef double size _var_t = _namespace["_var_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double t _var_ufarad = _namespace["_var_ufarad"] cdef double ufarad = _namespace["ufarad"] _var_v = _namespace["_var_v"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_v = _namespace['_array_CA1_inh_v'] cdef double * _array_CA1_inh_v = _buf__array_CA1_inh_v.data cdef size_t _num_array_CA1_inh_v = len(_namespace['_array_CA1_inh_v']) cdef double v cdef double _BA_ge cdef double _BA_ge_ext cdef double _BA_ge_hipp cdef double _BA_gi cdef double _BA_h cdef double _BA_m cdef double _BA_n cdef double _BA_v cdef double _ge cdef double _ge_ext cdef double _ge_hipp cdef double _gi cdef double _h cdef double _he cdef double _he_ext cdef double _he_hipp cdef double _hi cdef int64_t _lio_1 cdef double _lio_10 cdef double _lio_11 cdef double _lio_12 cdef double _lio_13 cdef double _lio_14 cdef double _lio_15 cdef double _lio_16 cdef double _lio_17 cdef double _lio_18 cdef double _lio_19 cdef double _lio_2 cdef double _lio_20 cdef double _lio_21 cdef double _lio_22 cdef double _lio_23 cdef double _lio_24 cdef double _lio_25 cdef double _lio_26 cdef double _lio_27 cdef double _lio_28 cdef double _lio_29 cdef double _lio_3 cdef double _lio_30 cdef double _lio_31 cdef double _lio_32 cdef double _lio_33 cdef double _lio_34 cdef double _lio_35 cdef double _lio_36 cdef double _lio_37 cdef double _lio_38 cdef double _lio_39 cdef double _lio_4 cdef double _lio_40 cdef double _lio_41 cdef double _lio_42 cdef double _lio_43 cdef double _lio_44 cdef double _lio_45 cdef double _lio_46 cdef double _lio_47 cdef double _lio_48 cdef double _lio_49 cdef double _lio_5 cdef double _lio_50 cdef double _lio_51 cdef double _lio_52 cdef double _lio_53 cdef double _lio_54 cdef double _lio_55 cdef double _lio_56 cdef double _lio_57 cdef double _lio_58 cdef double _lio_59 cdef double _lio_6 cdef double _lio_60 cdef double _lio_61 cdef double _lio_62 cdef double _lio_63 cdef double _lio_64 cdef double _lio_65 cdef double _lio_66 cdef double _lio_67 cdef double _lio_68 cdef double _lio_69 cdef double _lio_7 cdef double _lio_70 cdef double _lio_71 cdef double _lio_72 cdef double _lio_73 cdef double _lio_74 cdef double _lio_75 cdef double _lio_76 cdef double _lio_77 cdef double _lio_78 cdef double _lio_79 cdef double _lio_8 cdef double _lio_80 cdef double _lio_81 cdef double _lio_9 cdef double _m cdef double _n cdef double _v if '_owner' in _namespace: _owner = _namespace['_owner'] # scalar code _vectorisation_idx = 1 t = _array_defaultclock_t[0] dt = _array_defaultclock_dt[0] _lio_1 = _timestep(0.003, dt) _lio_2 = exp(((- 3.33333333333333) * dt) / ms) _lio_3 = exp(((- 1.0) * dt) / ms) _lio_4 = 0.07 * ms _lio_5 = 0.060810062625218 * ((ms ** 2) * 18.17414536944306) _lio_6 = 0.05 / mV _lio_7 = 0.060810062625218 * ms _lio_8 = (- 0.05) / mV _lio_9 = (ms ** 2) * 18.17414536944306 _lio_10 = (- 0.1) / mV _lio_11 = 0.00425670438376526 * ms _lio_12 = (ms ** 2) * 330.2995599096486 _lio_13 = 0.1 / mV _lio_14 = 0.07 * (ms * 18.17414536944306) _lio_15 = 0.019258127019742523 / ms _lio_16 = 1.0 / mV _lio_17 = exp((0.2 * (- dt)) / ms) _lio_18 = exp((0.1 * (- dt)) / ms) _lio_19 = 61.25 * (mV ** 2) _lio_20 = ((- 7.0) * (mV ** 3)) * (ms ** 2) _lio_21 = 0.0 - (mV * ms) _lio_22 = (mV * ms) * 33.11545195869231 _lio_23 = 3.5 * ((mV ** 3) * (ms ** 2)) _lio_24 = ((- mV) * ms) * 33.11545195869231 _lio_25 = (mV * ms) * 1096.6331584284585 _lio_26 = 0.2 / mV _lio_27 = mV * ms _lio_28 = (mV * ms) * 0.0301973834223185 _lio_29 = 0.1 * ((mV ** 2) * (ms ** 2)) _lio_30 = 4.0 * (((mV ** 2) * ms) * 0.03567399334725241) _lio_31 = 0.05555555555555555 / mV _lio_32 = 4.0 * (((mV ** 2) * ms) * 3.253047117267129e-05) _lio_33 = (- 0.2555555555555556) / mV _lio_34 = 0.2 * ((mV ** 2) * (ms ** 2)) _lio_35 = 8.0 * (((mV ** 2) * ms) * 0.0010772612553122203) _lio_36 = (- 0.15555555555555556) / mV _lio_37 = 3.5 * mV _lio_38 = 70.0 * mV _lio_39 = 4.0 * (mV * ms) _lio_40 = (((- 3.5) * (mV ** 2)) * (ms ** 2)) * 28.03162489452614 _lio_41 = 3.5 * (((mV ** 2) * (ms ** 2)) * 28.03162489452614) _lio_42 = 0.1 * ((mV * (ms ** 2)) * 28.03162489452614) _lio_43 = 4.0 * ((mV * ms) * 0.0301973834223185) _lio_44 = (- 17.5) * mV _lio_45 = 0.7134798669450482 / ms _lio_46 = 0.578 * (mV ** 2) _lio_47 = ((- 0.0226938235730217) * (mV ** 3)) * (ms ** 2) _lio_48 = 0.0 - (0.0333732699603261 * (mV * ms)) _lio_49 = 0.000378683550267233 * ((mV ** 3) * (ms ** 2)) _lio_50 = ((- 0.0333732699603261) * mV) * ms _lio_51 = 0.34 * ((mV ** 3) * (ms ** 2)) _lio_52 = 0.0333732699603261 * (mV * ms) _lio_53 = 1.1137751478448e-05 * ((mV ** 2) * (ms ** 2)) _lio_54 = 0.01 * ((mV ** 2) * (ms ** 2)) _lio_55 = 0.0001392218934806 * (((mV ** 2) * ms) * 0.5769498103804866) _lio_56 = (- 0.2125) / mV _lio_57 = 0.125 * (((mV ** 2) * ms) * 0.5769498103804866) _lio_58 = 0.0125 / mV _lio_59 = 0.000667465399206522 * ((mV ** 2) * (ms ** 2)) _lio_60 = 0.00834331749008152 * (((mV ** 2) * ms) * 0.5769498103804866) _lio_61 = (- 0.1125) / mV _lio_62 = 0.034 * mV _lio_63 = 0.2125 * mV _lio_64 = 0.125 * (mV * ms) _lio_65 = (((- 0.0113469117865109) * (mV ** 2)) * (ms ** 2)) * 1.7332530178673953 _lio_66 = 0.34 * (((mV ** 2) * (ms ** 2)) * 1.7332530178673953) _lio_67 = 0.01 * ((mV * (ms ** 2)) * 1.7332530178673953) _lio_68 = 0.000333732699603261 * ((mV * (ms ** 2)) * 1.7332530178673953) _lio_69 = 0.00417165874504076 * (mV * ms) _lio_70 = (- 1.7) * mV _lio_71 = 0.36059363148780416 / ms _lio_72 = 0.0 - ((0.0065 * (mV * siemens)) / ufarad) _lio_73 = (((- 80.0) * (cm ** 2)) * mV) / ufarad _lio_74 = ((cm ** 2) * _timedarray(t)) / ufarad _lio_75 = (1.925 * (mV * siemens)) / ufarad _lio_76 = (0.81 * (mV * siemens)) / ufarad _lio_77 = 0.0 - ((0.0001 * siemens) / ufarad) _lio_78 = (- (cm ** 2)) / ufarad _lio_79 = (cm ** 2) / ufarad _lio_80 = (0.035 * siemens) / ufarad _lio_81 = (0.009 * siemens) / ufarad # vector code for _idx in range(N): _vectorisation_idx = _idx hi = _array_CA1_inh_hi[_idx] lastspike = _array_CA1_inh_lastspike[_idx] gi = _array_CA1_inh_gi[_idx] ge = _array_CA1_inh_ge[_idx] noise = _array_CA1_inh_noise[_idx] v = _array_CA1_inh_v[_idx] h = _array_CA1_inh_h[_idx] he_hipp = _array_CA1_inh_he_hipp[_idx] n = _array_CA1_inh_n[_idx] r = _array_CA1_inh_r[_idx] size = _array_CA1_inh_size[_idx] he = _array_CA1_inh_he[_idx] ge_hipp = _array_CA1_inh_ge_hipp[_idx] m = _array_CA1_inh_m[_idx] ge_ext = _array_CA1_inh_ge_ext[_idx] he_ext = _array_CA1_inh_he_ext[_idx] not_refractory = _timestep(t - lastspike, dt) >= _lio_1 _BA_ge = (- 1.0) * he _ge = (- _BA_ge) + (_lio_2 * (_BA_ge + ge)) _BA_ge_ext = (- 1.0) * he_ext _ge_ext = (- _BA_ge_ext) + (_lio_2 * (_BA_ge_ext + ge_ext)) _BA_ge_hipp = (- 1.0) * he_hipp _ge_hipp = (- _BA_ge_hipp) + (_lio_2 * (_BA_ge_hipp + ge_hipp)) _BA_gi = (- 1.0) * hi _gi = (- _BA_gi) + (_lio_3 * (_BA_gi + gi)) _BA_h = ((0.35 / (_lio_4 + (((_lio_5 / ((ms * exp(_lio_6 * v)) + (_lio_7 * exp(_lio_8 * v)))) + ((_lio_9 * exp(_lio_6 * v)) / (ms + (_lio_7 * exp(_lio_10 * v))))) + (_lio_11 * exp(_lio_10 * v))))) + (0.0245 / (((_lio_12 * exp(_lio_13 * v)) / (ms + (_lio_7 * exp(_lio_10 * v)))) + (_lio_14 * exp(_lio_6 * v))))) / (((- 5.0) / (ms + (_lio_7 * exp(_lio_10 * v)))) - (_lio_15 / (exp(_lio_16 * v) ** 0.05))) _h = (- _BA_h) + ((_BA_h + h) * exp(dt * (((- 5.0) / (ms + (_lio_7 * exp(_lio_10 * v)))) - (_lio_15 / (exp(_lio_16 * v) ** 0.05))))) _he = _lio_17 * he _he_ext = _lio_17 * he_ext _he_hipp = _lio_17 * he_hipp _hi = _lio_18 * hi _BA_m = (((((_lio_19 / ((((((((_lio_20 / (_lio_21 + (_lio_22 * exp(_lio_13 * v)))) + (_lio_23 / ((_lio_24 * exp(_lio_13 * v)) + (_lio_25 * exp(_lio_26 * v))))) + (_lio_23 / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v)))))) + ((_lio_29 * v) / ((_lio_24 * exp(_lio_13 * v)) + (_lio_25 * exp(_lio_26 * v))))) + ((_lio_29 * v) / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v)))))) + (_lio_30 * exp(_lio_31 * (- v)))) + (_lio_32 * exp(_lio_33 * v))) - (((_lio_34 * v) / (_lio_21 + (_lio_22 * exp(_lio_13 * v)))) + (_lio_35 * exp(_lio_36 * v))))) + ((_lio_37 * v) / ((((((((_lio_20 / (_lio_21 + (_lio_22 * exp(_lio_13 * v)))) + (_lio_23 / ((_lio_24 * exp(_lio_13 * v)) + (_lio_25 * exp(_lio_26 * v))))) + (_lio_23 / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v)))))) + ((_lio_29 * v) / ((_lio_24 * exp(_lio_13 * v)) + (_lio_25 * exp(_lio_26 * v))))) + ((_lio_29 * v) / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v)))))) + (_lio_30 * exp(_lio_31 * (- v)))) + (_lio_32 * exp(_lio_33 * v))) - (((_lio_34 * v) / (_lio_21 + (_lio_22 * exp(_lio_13 * v)))) + (_lio_35 * exp(_lio_36 * v)))))) + (_lio_38 / ((_lio_39 + ((((_lio_40 * exp(_lio_31 * v)) / (_lio_21 + (_lio_22 * exp(_lio_13 * v)))) + ((_lio_41 * exp(_lio_31 * v)) / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v)))))) + ((_lio_42 * (v * exp(_lio_31 * v))) / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v))))))) - (((_lio_42 * (v * exp(_lio_31 * v))) / (_lio_21 + (_lio_22 * exp(_lio_13 * v)))) + (_lio_43 * exp(_lio_13 * (- v))))))) + ((0.05 * (v ** 2)) / ((((((((_lio_20 / (_lio_21 + (_lio_22 * exp(_lio_13 * v)))) + (_lio_23 / ((_lio_24 * exp(_lio_13 * v)) + (_lio_25 * exp(_lio_26 * v))))) + (_lio_23 / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v)))))) + ((_lio_29 * v) / ((_lio_24 * exp(_lio_13 * v)) + (_lio_25 * exp(_lio_26 * v))))) + ((_lio_29 * v) / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v)))))) + (_lio_30 * exp(_lio_31 * (- v)))) + (_lio_32 * exp(_lio_33 * v))) - (((_lio_34 * v) / (_lio_21 + (_lio_22 * exp(_lio_13 * v)))) + (_lio_35 * exp(_lio_36 * v)))))) + ((2.0 * v) / ((_lio_39 + ((((_lio_40 * exp(_lio_31 * v)) / (_lio_21 + (_lio_22 * exp(_lio_13 * v)))) + ((_lio_41 * exp(_lio_31 * v)) / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v)))))) + ((_lio_42 * (v * exp(_lio_31 * v))) / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v))))))) - (((_lio_42 * (v * exp(_lio_31 * v))) / (_lio_21 + (_lio_22 * exp(_lio_13 * v)))) + (_lio_43 * exp(_lio_13 * (- v))))))) / ((_lio_44 / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v))))) - (((0.5 * v) / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v))))) + (_lio_45 / (exp(_lio_16 * v) ** 0.05555555555555555)))) _m = (- _BA_m) + ((_BA_m + m) * exp(dt * ((_lio_44 / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v))))) - (((0.5 * v) / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v))))) + (_lio_45 / (exp(_lio_16 * v) ** 0.05555555555555555)))))) _BA_n = (((((_lio_46 / ((((((((_lio_47 / (_lio_48 + (_lio_27 * exp(_lio_13 * v)))) + (_lio_49 / ((_lio_50 * exp(_lio_13 * v)) + (_lio_27 * exp(_lio_26 * v))))) + (_lio_51 / (_lio_27 - (_lio_52 * exp(_lio_10 * v))))) + ((_lio_53 * v) / ((_lio_50 * exp(_lio_13 * v)) + (_lio_27 * exp(_lio_26 * v))))) + ((_lio_54 * v) / (_lio_27 - (_lio_52 * exp(_lio_10 * v))))) + (_lio_55 * exp(_lio_56 * v))) + (_lio_57 * exp(_lio_58 * (- v)))) - (((_lio_59 * v) / (_lio_48 + (_lio_27 * exp(_lio_13 * v)))) + (_lio_60 * exp(_lio_61 * v))))) + ((_lio_62 * v) / ((((((((_lio_47 / (_lio_48 + (_lio_27 * exp(_lio_13 * v)))) + (_lio_49 / ((_lio_50 * exp(_lio_13 * v)) + (_lio_27 * exp(_lio_26 * v))))) + (_lio_51 / (_lio_27 - (_lio_52 * exp(_lio_10 * v))))) + ((_lio_53 * v) / ((_lio_50 * exp(_lio_13 * v)) + (_lio_27 * exp(_lio_26 * v))))) + ((_lio_54 * v) / (_lio_27 - (_lio_52 * exp(_lio_10 * v))))) + (_lio_55 * exp(_lio_56 * v))) + (_lio_57 * exp(_lio_58 * (- v)))) - (((_lio_59 * v) / (_lio_48 + (_lio_27 * exp(_lio_13 * v)))) + (_lio_60 * exp(_lio_61 * v)))))) + (_lio_63 / ((_lio_64 + ((((_lio_65 * exp(_lio_58 * v)) / (_lio_48 + (_lio_27 * exp(_lio_13 * v)))) + ((_lio_66 * exp(_lio_58 * v)) / (_lio_27 - (_lio_52 * exp(_lio_10 * v))))) + ((_lio_67 * (v * exp(_lio_58 * v))) / (_lio_27 - (_lio_52 * exp(_lio_10 * v)))))) - (((_lio_68 * (v * exp(_lio_58 * v))) / (_lio_48 + (_lio_27 * exp(_lio_13 * v)))) + (_lio_69 * exp(_lio_10 * v)))))) + ((0.0005 * (v ** 2)) / ((((((((_lio_47 / (_lio_48 + (_lio_27 * exp(_lio_13 * v)))) + (_lio_49 / ((_lio_50 * exp(_lio_13 * v)) + (_lio_27 * exp(_lio_26 * v))))) + (_lio_51 / (_lio_27 - (_lio_52 * exp(_lio_10 * v))))) + ((_lio_53 * v) / ((_lio_50 * exp(_lio_13 * v)) + (_lio_27 * exp(_lio_26 * v))))) + ((_lio_54 * v) / (_lio_27 - (_lio_52 * exp(_lio_10 * v))))) + (_lio_55 * exp(_lio_56 * v))) + (_lio_57 * exp(_lio_58 * (- v)))) - (((_lio_59 * v) / (_lio_48 + (_lio_27 * exp(_lio_13 * v)))) + (_lio_60 * exp(_lio_61 * v)))))) + ((0.00625 * v) / ((_lio_64 + ((((_lio_65 * exp(_lio_58 * v)) / (_lio_48 + (_lio_27 * exp(_lio_13 * v)))) + ((_lio_66 * exp(_lio_58 * v)) / (_lio_27 - (_lio_52 * exp(_lio_10 * v))))) + ((_lio_67 * (v * exp(_lio_58 * v))) / (_lio_27 - (_lio_52 * exp(_lio_10 * v)))))) - (((_lio_68 * (v * exp(_lio_58 * v))) / (_lio_48 + (_lio_27 * exp(_lio_13 * v)))) + (_lio_69 * exp(_lio_10 * v)))))) / ((_lio_70 / (_lio_27 - (_lio_52 * exp(_lio_10 * v)))) - (((0.05 * v) / (_lio_27 - (_lio_52 * exp(_lio_10 * v)))) + (_lio_71 / (exp(_lio_16 * v) ** 0.0125)))) _n = (- _BA_n) + ((_BA_n + n) * exp(dt * ((_lio_70 / (_lio_27 - (_lio_52 * exp(_lio_10 * v)))) - (((0.05 * v) / (_lio_27 - (_lio_52 * exp(_lio_10 * v)))) + (_lio_71 / (exp(_lio_16 * v) ** 0.0125)))))) _BA_v = ((_lio_72 + (((((_lio_73 * gi) / size) + ((_lio_74 * r) / size)) + (_lio_75 * (h * (m ** 3)))) + noise)) - (_lio_76 * (n ** 4))) / ((_lio_77 + ((_lio_78 * ge) / size)) - ((((((_lio_79 * ge_ext) / size) + ((_lio_79 * ge_hipp) / size)) + ((_lio_79 * gi) / size)) + (_lio_80 * (h * (m ** 3)))) + (_lio_81 * (n ** 4)))) _v = (- _BA_v) + ((_BA_v + v) * exp(dt * ((_lio_77 + ((_lio_78 * ge) / size)) - ((((((_lio_79 * ge_ext) / size) + ((_lio_79 * ge_hipp) / size)) + ((_lio_79 * gi) / size)) + (_lio_80 * (h * (m ** 3)))) + (_lio_81 * (n ** 4)))))) ge = _ge ge_ext = _ge_ext ge_hipp = _ge_hipp gi = _gi h = _h he = _he he_ext = _he_ext he_hipp = _he_hipp hi = _hi m = _m n = _n v = _v _array_CA1_inh_hi[_idx] = hi _array_CA1_inh_ge[_idx] = ge _array_CA1_inh_gi[_idx] = gi _array_CA1_inh_v[_idx] = v _array_CA1_inh_h[_idx] = h _array_CA1_inh_he_hipp[_idx] = he_hipp _array_CA1_inh_n[_idx] = n _array_CA1_inh_ge_hipp[_idx] = ge_hipp _array_CA1_inh_m[_idx] = m _array_CA1_inh_he[_idx] = he _array_CA1_inh_ge_ext[_idx] = ge_ext _array_CA1_inh_he_ext[_idx] = he_ext _array_CA1_inh_not_refractory[_idx] = not_refractory before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef int64_t N = _namespace["N"] _var_cm = _namespace["_var_cm"] cdef double cm = _namespace["cm"] _var_dt = _namespace["_var_dt"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_dt = _namespace['_array_defaultclock_dt'] cdef double * _array_defaultclock_dt = _buf__array_defaultclock_dt.data cdef double dt = _namespace["dt"] _var_ge = _namespace["_var_ge"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_ge = _namespace['_array_CA1_inh_ge'] cdef double * _array_CA1_inh_ge = _buf__array_CA1_inh_ge.data cdef size_t _num_array_CA1_inh_ge = len(_namespace['_array_CA1_inh_ge']) cdef double ge _var_ge_ext = _namespace["_var_ge_ext"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_ge_ext = _namespace['_array_CA1_inh_ge_ext'] cdef double * _array_CA1_inh_ge_ext = _buf__array_CA1_inh_ge_ext.data cdef size_t _num_array_CA1_inh_ge_ext = len(_namespace['_array_CA1_inh_ge_ext']) cdef double ge_ext _var_ge_hipp = _namespace["_var_ge_hipp"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_ge_hipp = _namespace['_array_CA1_inh_ge_hipp'] cdef double * _array_CA1_inh_ge_hipp = _buf__array_CA1_inh_ge_hipp.data cdef size_t _num_array_CA1_inh_ge_hipp = len(_namespace['_array_CA1_inh_ge_hipp']) cdef double ge_hipp _var_gi = _namespace["_var_gi"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_gi = _namespace['_array_CA1_inh_gi'] cdef double * _array_CA1_inh_gi = _buf__array_CA1_inh_gi.data cdef size_t _num_array_CA1_inh_gi = len(_namespace['_array_CA1_inh_gi']) cdef double gi _var_h = _namespace["_var_h"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_h = _namespace['_array_CA1_inh_h'] cdef double * _array_CA1_inh_h = _buf__array_CA1_inh_h.data cdef size_t _num_array_CA1_inh_h = len(_namespace['_array_CA1_inh_h']) cdef double h _var_he = _namespace["_var_he"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_he = _namespace['_array_CA1_inh_he'] cdef double * _array_CA1_inh_he = _buf__array_CA1_inh_he.data cdef size_t _num_array_CA1_inh_he = len(_namespace['_array_CA1_inh_he']) cdef double he _var_he_ext = _namespace["_var_he_ext"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_he_ext = _namespace['_array_CA1_inh_he_ext'] cdef double * _array_CA1_inh_he_ext = _buf__array_CA1_inh_he_ext.data cdef size_t _num_array_CA1_inh_he_ext = len(_namespace['_array_CA1_inh_he_ext']) cdef double he_ext _var_he_hipp = _namespace["_var_he_hipp"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_he_hipp = _namespace['_array_CA1_inh_he_hipp'] cdef double * _array_CA1_inh_he_hipp = _buf__array_CA1_inh_he_hipp.data cdef size_t _num_array_CA1_inh_he_hipp = len(_namespace['_array_CA1_inh_he_hipp']) cdef double he_hipp _var_hi = _namespace["_var_hi"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_hi = _namespace['_array_CA1_inh_hi'] cdef double * _array_CA1_inh_hi = _buf__array_CA1_inh_hi.data cdef size_t _num_array_CA1_inh_hi = len(_namespace['_array_CA1_inh_hi']) cdef double hi # namespace for function inputs_stim global _namespace_timedarray_values global _namespace_num_timedarray_values cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__timedarray_values = _namespace['_timedarray_values'] _namespace_timedarray_values = _buf__timedarray_values.data _namespace_num_timedarray_values = len(_namespace['_timedarray_values']) _var_lastspike = _namespace["_var_lastspike"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_lastspike = _namespace['_array_CA1_inh_lastspike'] cdef double * _array_CA1_inh_lastspike = _buf__array_CA1_inh_lastspike.data cdef size_t _num_array_CA1_inh_lastspike = len(_namespace['_array_CA1_inh_lastspike']) cdef double lastspike _var_m = _namespace["_var_m"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_m = _namespace['_array_CA1_inh_m'] cdef double * _array_CA1_inh_m = _buf__array_CA1_inh_m.data cdef size_t _num_array_CA1_inh_m = len(_namespace['_array_CA1_inh_m']) cdef double m _var_mV = _namespace["_var_mV"] cdef double mV = _namespace["mV"] _var_ms = _namespace["_var_ms"] cdef double ms = _namespace["ms"] _var_n = _namespace["_var_n"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_n = _namespace['_array_CA1_inh_n'] cdef double * _array_CA1_inh_n = _buf__array_CA1_inh_n.data cdef size_t _num_array_CA1_inh_n = len(_namespace['_array_CA1_inh_n']) cdef double n _var_noise = _namespace["_var_noise"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_noise = _namespace['_array_CA1_inh_noise'] cdef double * _array_CA1_inh_noise = _buf__array_CA1_inh_noise.data cdef size_t _num_array_CA1_inh_noise = len(_namespace['_array_CA1_inh_noise']) cdef double noise _var_not_refractory = _namespace["_var_not_refractory"] cdef _numpy.ndarray[char, ndim=1, mode='c', cast=True] _buf__array_CA1_inh_not_refractory = _namespace['_array_CA1_inh_not_refractory'] cdef bool * _array_CA1_inh_not_refractory = _buf__array_CA1_inh_not_refractory.data cdef size_t _num_array_CA1_inh_not_refractory = len(_namespace['_array_CA1_inh_not_refractory']) cdef bool not_refractory _var_r = _namespace["_var_r"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_r = _namespace['_array_CA1_inh_r'] cdef double * _array_CA1_inh_r = _buf__array_CA1_inh_r.data cdef size_t _num_array_CA1_inh_r = len(_namespace['_array_CA1_inh_r']) cdef double r _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] _var_size = _namespace["_var_size"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_size = _namespace['_array_CA1_inh_size'] cdef double * _array_CA1_inh_size = _buf__array_CA1_inh_size.data cdef size_t _num_array_CA1_inh_size = len(_namespace['_array_CA1_inh_size']) cdef double size _var_t = _namespace["_var_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double t _var_ufarad = _namespace["_var_ufarad"] cdef double ufarad = _namespace["ufarad"] _var_v = _namespace["_var_v"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_v = _namespace['_array_CA1_inh_v'] cdef double * _array_CA1_inh_v = _buf__array_CA1_inh_v.data cdef size_t _num_array_CA1_inh_v = len(_namespace['_array_CA1_inh_v']) cdef double v cdef double _BA_ge cdef double _BA_ge_ext cdef double _BA_ge_hipp cdef double _BA_gi cdef double _BA_h cdef double _BA_m cdef double _BA_n cdef double _BA_v cdef double _ge cdef double _ge_ext cdef double _ge_hipp cdef double _gi cdef double _h cdef double _he cdef double _he_ext cdef double _he_hipp cdef double _hi cdef int64_t _lio_1 cdef double _lio_10 cdef double _lio_11 cdef double _lio_12 cdef double _lio_13 cdef double _lio_14 cdef double _lio_15 cdef double _lio_16 cdef double _lio_17 cdef double _lio_18 cdef double _lio_19 cdef double _lio_2 cdef double _lio_20 cdef double _lio_21 cdef double _lio_22 cdef double _lio_23 cdef double _lio_24 cdef double _lio_25 cdef double _lio_26 cdef double _lio_27 cdef double _lio_28 cdef double _lio_29 cdef double _lio_3 cdef double _lio_30 cdef double _lio_31 cdef double _lio_32 cdef double _lio_33 cdef double _lio_34 cdef double _lio_35 cdef double _lio_36 cdef double _lio_37 cdef double _lio_38 cdef double _lio_39 cdef double _lio_4 cdef double _lio_40 cdef double _lio_41 cdef double _lio_42 cdef double _lio_43 cdef double _lio_44 cdef double _lio_45 cdef double _lio_46 cdef double _lio_47 cdef double _lio_48 cdef double _lio_49 cdef double _lio_5 cdef double _lio_50 cdef double _lio_51 cdef double _lio_52 cdef double _lio_53 cdef double _lio_54 cdef double _lio_55 cdef double _lio_56 cdef double _lio_57 cdef double _lio_58 cdef double _lio_59 cdef double _lio_6 cdef double _lio_60 cdef double _lio_61 cdef double _lio_62 cdef double _lio_63 cdef double _lio_64 cdef double _lio_65 cdef double _lio_66 cdef double _lio_67 cdef double _lio_68 cdef double _lio_69 cdef double _lio_7 cdef double _lio_70 cdef double _lio_71 cdef double _lio_72 cdef double _lio_73 cdef double _lio_74 cdef double _lio_75 cdef double _lio_76 cdef double _lio_77 cdef double _lio_78 cdef double _lio_79 cdef double _lio_8 cdef double _lio_80 cdef double _lio_81 cdef double _lio_9 cdef double _m cdef double _n cdef double _v if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef int64_t N = _namespace["N"] _var_cm = _namespace["_var_cm"] cdef double cm = _namespace["cm"] _var_dt = _namespace["_var_dt"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_dt = _namespace['_array_defaultclock_dt'] cdef double * _array_defaultclock_dt = _buf__array_defaultclock_dt.data cdef double dt = _namespace["dt"] _var_ge = _namespace["_var_ge"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_ge = _namespace['_array_CA1_inh_ge'] cdef double * _array_CA1_inh_ge = _buf__array_CA1_inh_ge.data cdef size_t _num_array_CA1_inh_ge = len(_namespace['_array_CA1_inh_ge']) cdef double ge _var_ge_ext = _namespace["_var_ge_ext"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_ge_ext = _namespace['_array_CA1_inh_ge_ext'] cdef double * _array_CA1_inh_ge_ext = _buf__array_CA1_inh_ge_ext.data cdef size_t _num_array_CA1_inh_ge_ext = len(_namespace['_array_CA1_inh_ge_ext']) cdef double ge_ext _var_ge_hipp = _namespace["_var_ge_hipp"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_ge_hipp = _namespace['_array_CA1_inh_ge_hipp'] cdef double * _array_CA1_inh_ge_hipp = _buf__array_CA1_inh_ge_hipp.data cdef size_t _num_array_CA1_inh_ge_hipp = len(_namespace['_array_CA1_inh_ge_hipp']) cdef double ge_hipp _var_gi = _namespace["_var_gi"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_gi = _namespace['_array_CA1_inh_gi'] cdef double * _array_CA1_inh_gi = _buf__array_CA1_inh_gi.data cdef size_t _num_array_CA1_inh_gi = len(_namespace['_array_CA1_inh_gi']) cdef double gi _var_h = _namespace["_var_h"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_h = _namespace['_array_CA1_inh_h'] cdef double * _array_CA1_inh_h = _buf__array_CA1_inh_h.data cdef size_t _num_array_CA1_inh_h = len(_namespace['_array_CA1_inh_h']) cdef double h _var_he = _namespace["_var_he"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_he = _namespace['_array_CA1_inh_he'] cdef double * _array_CA1_inh_he = _buf__array_CA1_inh_he.data cdef size_t _num_array_CA1_inh_he = len(_namespace['_array_CA1_inh_he']) cdef double he _var_he_ext = _namespace["_var_he_ext"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_he_ext = _namespace['_array_CA1_inh_he_ext'] cdef double * _array_CA1_inh_he_ext = _buf__array_CA1_inh_he_ext.data cdef size_t _num_array_CA1_inh_he_ext = len(_namespace['_array_CA1_inh_he_ext']) cdef double he_ext _var_he_hipp = _namespace["_var_he_hipp"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_he_hipp = _namespace['_array_CA1_inh_he_hipp'] cdef double * _array_CA1_inh_he_hipp = _buf__array_CA1_inh_he_hipp.data cdef size_t _num_array_CA1_inh_he_hipp = len(_namespace['_array_CA1_inh_he_hipp']) cdef double he_hipp _var_hi = _namespace["_var_hi"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_hi = _namespace['_array_CA1_inh_hi'] cdef double * _array_CA1_inh_hi = _buf__array_CA1_inh_hi.data cdef size_t _num_array_CA1_inh_hi = len(_namespace['_array_CA1_inh_hi']) cdef double hi # namespace for function inputs_stim global _namespace_timedarray_values global _namespace_num_timedarray_values cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__timedarray_values = _namespace['_timedarray_values'] _namespace_timedarray_values = _buf__timedarray_values.data _namespace_num_timedarray_values = len(_namespace['_timedarray_values']) _var_lastspike = _namespace["_var_lastspike"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_lastspike = _namespace['_array_CA1_inh_lastspike'] cdef double * _array_CA1_inh_lastspike = _buf__array_CA1_inh_lastspike.data cdef size_t _num_array_CA1_inh_lastspike = len(_namespace['_array_CA1_inh_lastspike']) cdef double lastspike _var_m = _namespace["_var_m"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_m = _namespace['_array_CA1_inh_m'] cdef double * _array_CA1_inh_m = _buf__array_CA1_inh_m.data cdef size_t _num_array_CA1_inh_m = len(_namespace['_array_CA1_inh_m']) cdef double m _var_mV = _namespace["_var_mV"] cdef double mV = _namespace["mV"] _var_ms = _namespace["_var_ms"] cdef double ms = _namespace["ms"] _var_n = _namespace["_var_n"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_n = _namespace['_array_CA1_inh_n'] cdef double * _array_CA1_inh_n = _buf__array_CA1_inh_n.data cdef size_t _num_array_CA1_inh_n = len(_namespace['_array_CA1_inh_n']) cdef double n _var_noise = _namespace["_var_noise"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_noise = _namespace['_array_CA1_inh_noise'] cdef double * _array_CA1_inh_noise = _buf__array_CA1_inh_noise.data cdef size_t _num_array_CA1_inh_noise = len(_namespace['_array_CA1_inh_noise']) cdef double noise _var_not_refractory = _namespace["_var_not_refractory"] cdef _numpy.ndarray[char, ndim=1, mode='c', cast=True] _buf__array_CA1_inh_not_refractory = _namespace['_array_CA1_inh_not_refractory'] cdef bool * _array_CA1_inh_not_refractory = _buf__array_CA1_inh_not_refractory.data cdef size_t _num_array_CA1_inh_not_refractory = len(_namespace['_array_CA1_inh_not_refractory']) cdef bool not_refractory _var_r = _namespace["_var_r"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_r = _namespace['_array_CA1_inh_r'] cdef double * _array_CA1_inh_r = _buf__array_CA1_inh_r.data cdef size_t _num_array_CA1_inh_r = len(_namespace['_array_CA1_inh_r']) cdef double r _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] _var_size = _namespace["_var_size"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_size = _namespace['_array_CA1_inh_size'] cdef double * _array_CA1_inh_size = _buf__array_CA1_inh_size.data cdef size_t _num_array_CA1_inh_size = len(_namespace['_array_CA1_inh_size']) cdef double size _var_t = _namespace["_var_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double t _var_ufarad = _namespace["_var_ufarad"] cdef double ufarad = _namespace["ufarad"] _var_v = _namespace["_var_v"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_v = _namespace['_array_CA1_inh_v'] cdef double * _array_CA1_inh_v = _buf__array_CA1_inh_v.data cdef size_t _num_array_CA1_inh_v = len(_namespace['_array_CA1_inh_v']) cdef double v cdef double _BA_ge cdef double _BA_ge_ext cdef double _BA_ge_hipp cdef double _BA_gi cdef double _BA_h cdef double _BA_m cdef double _BA_n cdef double _BA_v cdef double _ge cdef double _ge_ext cdef double _ge_hipp cdef double _gi cdef double _h cdef double _he cdef double _he_ext cdef double _he_hipp cdef double _hi cdef int64_t _lio_1 cdef double _lio_10 cdef double _lio_11 cdef double _lio_12 cdef double _lio_13 cdef double _lio_14 cdef double _lio_15 cdef double _lio_16 cdef double _lio_17 cdef double _lio_18 cdef double _lio_19 cdef double _lio_2 cdef double _lio_20 cdef double _lio_21 cdef double _lio_22 cdef double _lio_23 cdef double _lio_24 cdef double _lio_25 cdef double _lio_26 cdef double _lio_27 cdef double _lio_28 cdef double _lio_29 cdef double _lio_3 cdef double _lio_30 cdef double _lio_31 cdef double _lio_32 cdef double _lio_33 cdef double _lio_34 cdef double _lio_35 cdef double _lio_36 cdef double _lio_37 cdef double _lio_38 cdef double _lio_39 cdef double _lio_4 cdef double _lio_40 cdef double _lio_41 cdef double _lio_42 cdef double _lio_43 cdef double _lio_44 cdef double _lio_45 cdef double _lio_46 cdef double _lio_47 cdef double _lio_48 cdef double _lio_49 cdef double _lio_5 cdef double _lio_50 cdef double _lio_51 cdef double _lio_52 cdef double _lio_53 cdef double _lio_54 cdef double _lio_55 cdef double _lio_56 cdef double _lio_57 cdef double _lio_58 cdef double _lio_59 cdef double _lio_6 cdef double _lio_60 cdef double _lio_61 cdef double _lio_62 cdef double _lio_63 cdef double _lio_64 cdef double _lio_65 cdef double _lio_66 cdef double _lio_67 cdef double _lio_68 cdef double _lio_69 cdef double _lio_7 cdef double _lio_70 cdef double _lio_71 cdef double _lio_72 cdef double _lio_73 cdef double _lio_74 cdef double _lio_75 cdef double _lio_76 cdef double _lio_77 cdef double _lio_78 cdef double _lio_79 cdef double _lio_8 cdef double _lio_80 cdef double _lio_81 cdef double _lio_9 cdef double _m cdef double _n cdef double _v if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:15:06,964 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name CA1_inh_stateupdater_codeobject 2021-11-05 15:15:06,966 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "CA1_inh_stateupdate" using Cython module "_cython_magic_7a35bb303ed4a8094147403e3ae43004" 2021-11-05 15:15:06,966 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140606219308816 on /home/nikos/.cython/brian_extensions/_cython_magic_7a35bb303ed4a8094147403e3ae43004.lock 2021-11-05 15:15:06,966 DEBUG brian2.utils.filelock: Lock 140606219308816 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_7a35bb303ed4a8094147403e3ae43004.lock 2021-11-05 15:15:08,785 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140606219308816 on /home/nikos/.cython/brian_extensions/_cython_magic_7a35bb303ed4a8094147403e3ae43004.lock 2021-11-05 15:15:08,785 DEBUG brian2.utils.filelock: Lock 140606219308816 released on /home/nikos/.cython/brian_extensions/_cython_magic_7a35bb303ed4a8094147403e3ae43004.lock 2021-11-05 15:15:09,159 DEBUG brian2.stateupdaters.base.method_choice: Group CA1_pyCAN: using numerical integration method exponential_euler (took 0.37s) 2021-11-05 15:15:09,159 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=CA1_pyCAN, template name=stateupdate) for abstract code: not_refractory = timestep(t - lastspike, dt) >= timestep(0.003000, dt) _BA_Ca_i = -200*ms*(1.2e-6*mole/(metre**3*ms) + 0.000621832540496844*hCaL*mCaL**2*mV*mole*siemens*size/(cm**4*coulomb*umetre) - 5.1819378374737e-6*hCaL*mCaL**2*mole*siemens*size*v/(cm**4*coulomb*umetre)) _Ca_i = -_BA_Ca_i + (Ca_i + _BA_Ca_i)*exp(-dt/(200*ms)) _Cl = Cl*exp(-dt/tau_Cl) _BA_ge = -1.0*he _ge = -_BA_ge + (_BA_ge + ge)*exp(-3.33333333333333*dt/ms) _BA_ge_ext = -1.0*he_ext _ge_ext = -_BA_ge_ext + (_BA_ge_ext + ge_ext)*exp(-3.33333333333333*dt/ms) _BA_ge_hipp = -1.0*he_hipp _ge_hipp = -_BA_ge_hipp + (_BA_ge_hipp + ge_hipp)*exp(-3.33333333333333*dt/ms) _BA_gi = -1.0*hi _gi = -_BA_gi + (_BA_gi + gi)*exp(-1.0*dt/ms) _BA_glu = -1 _glu = -_BA_glu + (_BA_glu + glu)*exp(-dt/(3*second)) _BA_h = 0.128*exp(-19/9)*exp(-v/(18*mV))/(ms*(-4.0/(ms + ms*exp(-3)*exp(-v/(5*mV))) - 0.128*exp(-19/9)/(ms*exp(v/mV)**(1/18)))) _h = -_BA_h + (_BA_h + h)*exp(dt*(-4.0/(ms + ms*exp(-3)*exp(-v/(5*mV))) - 0.128*exp(-19/9)/(ms*exp(v/mV)**(1/18)))) _BA_hCaL = 0.000457*exp(-13/50)*exp(-v/(50*mV))/(ms*(-0.0065/(1.0*ms + ms*exp(-15/28)*exp(-v/(28*mV))) - 0.000457*exp(-13/50)/(ms*exp(v/mV)**(1/50)))) _hCaL = -_BA_hCaL + (_BA_hCaL + hCaL)*exp(dt*(-0.0065/(1.0*ms + ms*exp(-15/28)*exp(-v/(28*mV))) - 0.000457*exp(-13/50)/(ms*exp(v/mV)**(1/50)))) _he = he*exp(-dt/(5*ms)) _he_ext = he_ext*exp(-dt/(5*ms)) _he_hipp = he_hipp*exp(-dt/(5*ms)) _hi = hi*exp(-dt/(10*ms)) _BA_m = (-13.44*mV/(-1.0*mV*ms + mV*ms*exp(-21/2)*exp(-v/(4*mV))) - 0.32*v/(-1.0*mV*ms + mV*ms*exp(-21/2)*exp(-v/(4*mV))))/(-4.2*mV/(mV*ms*exp(3)*exp(v/(5*mV)) - 1.0*mV*ms) + 13.44*mV/(-1.0*mV*ms + mV*ms*exp(-21/2)*exp(-v/(4*mV))) - 0.28*v/(mV*ms*exp(3)*exp(v/(5*mV)) - 1.0*mV*ms) + 0.32*v/(-1.0*mV*ms + mV*ms*exp(-21/2)*exp(-v/(4*mV)))) _m = -_BA_m + (_BA_m + m)*exp(dt*(-4.2*mV/(mV*ms*exp(3)*exp(v/(5*mV)) - 1.0*mV*ms) + 13.44*mV/(-1.0*mV*ms + mV*ms*exp(-21/2)*exp(-v/(4*mV))) - 0.28*v/(mV*ms*exp(3)*exp(v/(5*mV)) - 1.0*mV*ms) + 0.32*v/(-1.0*mV*ms + mV*ms*exp(-21/2)*exp(-v/(4*mV))))) _BA_mCAN = (2979543.50191749*Ca_i**4*metre**12/(800.0*Ca_i**2*metre**6*mole**2*ms + 0.0002*mole**4*ms) + 0.744885875479373*Ca_i**2*metre**6/(800.0*Ca_i**2*metre**6*ms + 0.0002*mole**2*ms))/(-3724.42937739686*Ca_i**2*metre**6/(mole**2*ms) - 0.000931107344349216/ms) _mCAN = -_BA_mCAN + (_BA_mCAN + mCAN)*exp(dt*(-3724.42937739686*Ca_i**2*metre**6/(mole**2*ms) - 0.000931107344349216/ms)) _BA_mCaL = (-1.485*mV/(-1.0*mV*ms + 0.000820773673798214*mV*ms*exp(-0.263157894736842*v/mV)) - 0.055*v/(-1.0*mV*ms + 0.000820773673798214*mV*ms*exp(-0.263157894736842*v/mV)))/(1.485*mV/(-1.0*mV*ms + 0.000820773673798214*mV*ms*exp(-0.263157894736842*v/mV)) + 0.055*v/(-1.0*mV*ms + 0.000820773673798214*mV*ms*exp(-0.263157894736842*v/mV)) - 0.94*exp(-75/17)/(ms*exp(v/mV)**(1/17))) _mCaL = -_BA_mCaL + (_BA_mCaL + mCaL)*exp(dt*(1.485*mV/(-1.0*mV*ms + 0.000820773673798214*mV*ms*exp(-0.263157894736842*v/mV)) + 0.055*v/(-1.0*mV*ms + 0.000820773673798214*mV*ms*exp(-0.263157894736842*v/mV)) - 0.94*exp(-75/17)/(ms*exp(v/mV)**(1/17)))) _BA_n = (-1.28*mV/(-1.0*mV*ms + mV*ms*exp(-8)*exp(-v/(5*mV))) - 0.032*v/(-1.0*mV*ms + mV*ms*exp(-8)*exp(-v/(5*mV))))/(1.28*mV/(-1.0*mV*ms + mV*ms*exp(-8)*exp(-v/(5*mV))) + 0.032*v/(-1.0*mV*ms + mV*ms*exp(-8)*exp(-v/(5*mV))) - 0.5*exp(-9/8)/(ms*exp(v/mV)**(1/40))) _n = -_BA_n + (_BA_n + n)*exp(dt*(1.28*mV/(-1.0*mV*ms + mV*ms*exp(-8)*exp(-v/(5*mV))) + 0.032*v/(-1.0*mV*ms + mV*ms*exp(-8)*exp(-v/(5*mV))) - 0.5*exp(-9/8)/(ms*exp(v/mV)**(1/40)))) _BA_p = (0.001/(ms*exp(7/4)*exp(v/(20*mV)) + ms*exp(-7/4)*exp(-v/(20*mV))) + 0.0033*exp(7/4)*exp(v/(20*mV))/(ms + ms*exp(-7/2)*exp(-v/(10*mV))))/(-0.0033*exp(7/4)*exp(v/mV)**(1/20)/ms - exp(-7/4)/(1000*ms*exp(v/mV)**(1/20))) _p = -_BA_p + (_BA_p + p)*exp(dt*(-0.0033*exp(7/4)*exp(v/mV)**(1/20)/ms - exp(-7/4)/(1000*ms*exp(v/mV)**(1/20)))) _BA_v = (Ek*cm**2*gM*p/ufarad + 5*Ek*msiemens*n**4/ufarad - 20*cm**2*gCAN*mCAN**2*mV/ufarad - 80*cm**2*gi*mV*int(Cl <= 0.5)/(size*ufarad) + cm**2*r*inputs_stim(t)/(size*ufarad) + 2500*h*m**3*mV*msiemens/ufarad + 0.012*hCaL*mCaL**2*mV*siemens/ufarad - 0.0007*mV*siemens/ufarad + noise)*(-cm**2*gCAN*mCAN**2/ufarad - cm**2*gM*p/ufarad - cm**2*ge/(size*ufarad) - cm**2*ge_ext/(size*ufarad) - cm**2*ge_hipp/(size*ufarad) - cm**2*gi*int(Cl <= 0.5)/(size*ufarad) - cm**2*gi*int(Cl > 0.5)/(size*ufarad) - 50*h*m**3*msiemens/ufarad - 0.0001*hCaL*mCaL**2*siemens/ufarad - 5*msiemens*n**4/ufarad - 1.0e-5*siemens/ufarad)**(-1) _v = -_BA_v + (_BA_v + v)*exp(dt*(-cm**2*gCAN*mCAN**2/ufarad - cm**2*gM*p/ufarad - cm**2*ge/(size*ufarad) - cm**2*ge_ext/(size*ufarad) - cm**2*ge_hipp/(size*ufarad) - cm**2*gi*int(Cl <= 0.5)/(size*ufarad) - cm**2*gi*int(Cl > 0.5)/(size*ufarad) - 50*h*m**3*msiemens/ufarad - 0.0001*hCaL*mCaL**2*siemens/ufarad - 5*msiemens*n**4/ufarad - 1.0e-5*siemens/ufarad)) Ca_i = _Ca_i Cl = _Cl ge = _ge ge_ext = _ge_ext ge_hipp = _ge_hipp gi = _gi glu = _glu h = _h hCaL = _hCaL he = _he he_ext = _he_ext he_hipp = _he_hipp hi = _hi m = _m mCAN = _mCAN mCaL = _mCaL n = _n p = _p v = _v 2021-11-05 15:15:09,162 WARNING brian2.parsing.bast.floating_point_division: The expression "(- 19) / 9" divides two integer values. In previous versions of Brian, this would have used either an integer ("flooring") or a floating point division, depending on the Python version and the code generation target. In the current version, it always uses a floating point division. Explicitly ask for an integer division ("//"), or turn one of the operands into a floating point value (e.g. replace "1/2" by "1.0/2") to no longer receive this warning. 2021-11-05 15:15:09,163 WARNING brian2.parsing.bast.floating_point_division: The expression "(- 13) / 50" divides two integer values. In previous versions of Brian, this would have used either an integer ("flooring") or a floating point division, depending on the Python version and the code generation target. In the current version, it always uses a floating point division. Explicitly ask for an integer division ("//"), or turn one of the operands into a floating point value (e.g. replace "1/2" by "1.0/2") to no longer receive this warning. 2021-11-05 15:15:09,163 WARNING brian2.parsing.bast.floating_point_division: The expression "(- 15) / 28" divides two integer values. In previous versions of Brian, this would have used either an integer ("flooring") or a floating point division, depending on the Python version and the code generation target. In the current version, it always uses a floating point division. Explicitly ask for an integer division ("//"), or turn one of the operands into a floating point value (e.g. replace "1/2" by "1.0/2") to no longer receive this warning. 2021-11-05 15:15:09,163 WARNING brian2.parsing.bast.floating_point_division: The expression "1 / 50" divides two integer values. In previous versions of Brian, this would have used either an integer ("flooring") or a floating point division, depending on the Python version and the code generation target. In the current version, it always uses a floating point division. Explicitly ask for an integer division ("//"), or turn one of the operands into a floating point value (e.g. replace "1/2" by "1.0/2") to no longer receive this warning. 2021-11-05 15:15:09,164 WARNING brian2.parsing.bast.floating_point_division: The expression "(- 21) / 2" divides two integer values. In previous versions of Brian, this would have used either an integer ("flooring") or a floating point division, depending on the Python version and the code generation target. In the current version, it always uses a floating point division. Explicitly ask for an integer division ("//"), or turn one of the operands into a floating point value (e.g. replace "1/2" by "1.0/2") to no longer receive this warning. 2021-11-05 15:15:09,166 WARNING brian2.parsing.bast.floating_point_division: The expression "(- 75) / 17" divides two integer values. In previous versions of Brian, this would have used either an integer ("flooring") or a floating point division, depending on the Python version and the code generation target. In the current version, it always uses a floating point division. Explicitly ask for an integer division ("//"), or turn one of the operands into a floating point value (e.g. replace "1/2" by "1.0/2") to no longer receive this warning. 2021-11-05 15:15:09,166 WARNING brian2.parsing.bast.floating_point_division: The expression "1 / 17" divides two integer values. In previous versions of Brian, this would have used either an integer ("flooring") or a floating point division, depending on the Python version and the code generation target. In the current version, it always uses a floating point division. Explicitly ask for an integer division ("//"), or turn one of the operands into a floating point value (e.g. replace "1/2" by "1.0/2") to no longer receive this warning. 2021-11-05 15:15:09,167 WARNING brian2.parsing.bast.floating_point_division: The expression "(- 9) / 8" divides two integer values. In previous versions of Brian, this would have used either an integer ("flooring") or a floating point division, depending on the Python version and the code generation target. In the current version, it always uses a floating point division. Explicitly ask for an integer division ("//"), or turn one of the operands into a floating point value (e.g. replace "1/2" by "1.0/2") to no longer receive this warning. 2021-11-05 15:15:09,167 WARNING brian2.parsing.bast.floating_point_division: The expression "1 / 40" divides two integer values. In previous versions of Brian, this would have used either an integer ("flooring") or a floating point division, depending on the Python version and the code generation target. In the current version, it always uses a floating point division. Explicitly ask for an integer division ("//"), or turn one of the operands into a floating point value (e.g. replace "1/2" by "1.0/2") to no longer receive this warning. 2021-11-05 15:15:09,168 WARNING brian2.parsing.bast.floating_point_division: The expression "7 / 4" divides two integer values. In previous versions of Brian, this would have used either an integer ("flooring") or a floating point division, depending on the Python version and the code generation target. In the current version, it always uses a floating point division. Explicitly ask for an integer division ("//"), or turn one of the operands into a floating point value (e.g. replace "1/2" by "1.0/2") to no longer receive this warning. 2021-11-05 15:15:09,168 WARNING brian2.parsing.bast.floating_point_division: The expression "(- 7) / 4" divides two integer values. In previous versions of Brian, this would have used either an integer ("flooring") or a floating point division, depending on the Python version and the code generation target. In the current version, it always uses a floating point division. Explicitly ask for an integer division ("//"), or turn one of the operands into a floating point value (e.g. replace "1/2" by "1.0/2") to no longer receive this warning. 2021-11-05 15:15:09,184 DIAGNOSTIC brian2.devices.device: CA1_pyCAN_stateupdater_codeobject abstract code: not_refractory = timestep(t - lastspike, dt) >= timestep(0.003000, dt) _BA_Ca_i = -200*ms*(1.2e-6*mole/(metre**3*ms) + 0.000621832540496844*hCaL*mCaL**2*mV*mole*siemens*size/(cm**4*coulomb*umetre) - 5.1819378374737e-6*hCaL*mCaL**2*mole*siemens*size*v/(cm**4*coulomb*umetre)) _Ca_i = -_BA_Ca_i + (Ca_i + _BA_Ca_i)*exp(-dt/(200*ms)) _Cl = Cl*exp(-dt/tau_Cl) _BA_ge = -1.0*he _ge = -_BA_ge + (_BA_ge + ge)*exp(-3.33333333333333*dt/ms) _BA_ge_ext = -1.0*he_ext _ge_ext = -_BA_ge_ext + (_BA_ge_ext + ge_ext)*exp(-3.33333333333333*dt/ms) _BA_ge_hipp = -1.0*he_hipp _ge_hipp = -_BA_ge_hipp + (_BA_ge_hipp + ge_hipp)*exp(-3.33333333333333*dt/ms) _BA_gi = -1.0*hi _gi = -_BA_gi + (_BA_gi + gi)*exp(-1.0*dt/ms) _BA_glu = -1 _glu = -_BA_glu + (_BA_glu + glu)*exp(-dt/(3*second)) _BA_h = 0.128*exp(-19/9)*exp(-v/(18*mV))/(ms*(-4.0/(ms + ms*exp(-3)*exp(-v/(5*mV))) - 0.128*exp(-19/9)/(ms*exp(v/mV)**(1/18)))) _h = -_BA_h + (_BA_h + h)*exp(dt*(-4.0/(ms + ms*exp(-3)*exp(-v/(5*mV))) - 0.128*exp(-19/9)/(ms*exp(v/mV)**(1/18)))) _BA_hCaL = 0.000457*exp(-13/50)*exp(-v/(50*mV))/(ms*(-0.0065/(1.0*ms + ms*exp(-15/28)*exp(-v/(28*mV))) - 0.000457*exp(-13/50)/(ms*exp(v/mV)**(1/50)))) _hCaL = -_BA_hCaL + (_BA_hCaL + hCaL)*exp(dt*(-0.0065/(1.0*ms + ms*exp(-15/28)*exp(-v/(28*mV))) - 0.000457*exp(-13/50)/(ms*exp(v/mV)**(1/50)))) _he = he*exp(-dt/(5*ms)) _he_ext = he_ext*exp(-dt/(5*ms)) _he_hipp = he_hipp*exp(-dt/(5*ms)) _hi = hi*exp(-dt/(10*ms)) _BA_m = (-13.44*mV/(-1.0*mV*ms + mV*ms*exp(-21/2)*exp(-v/(4*mV))) - 0.32*v/(-1.0*mV*ms + mV*ms*exp(-21/2)*exp(-v/(4*mV))))/(-4.2*mV/(mV*ms*exp(3)*exp(v/(5*mV)) - 1.0*mV*ms) + 13.44*mV/(-1.0*mV*ms + mV*ms*exp(-21/2)*exp(-v/(4*mV))) - 0.28*v/(mV*ms*exp(3)*exp(v/(5*mV)) - 1.0*mV*ms) + 0.32*v/(-1.0*mV*ms + mV*ms*exp(-21/2)*exp(-v/(4*mV)))) _m = -_BA_m + (_BA_m + m)*exp(dt*(-4.2*mV/(mV*ms*exp(3)*exp(v/(5*mV)) - 1.0*mV*ms) + 13.44*mV/(-1.0*mV*ms + mV*ms*exp(-21/2)*exp(-v/(4*mV))) - 0.28*v/(mV*ms*exp(3)*exp(v/(5*mV)) - 1.0*mV*ms) + 0.32*v/(-1.0*mV*ms + mV*ms*exp(-21/2)*exp(-v/(4*mV))))) _BA_mCAN = (2979543.50191749*Ca_i**4*metre**12/(800.0*Ca_i**2*metre**6*mole**2*ms + 0.0002*mole**4*ms) + 0.744885875479373*Ca_i**2*metre**6/(800.0*Ca_i**2*metre**6*ms + 0.0002*mole**2*ms))/(-3724.42937739686*Ca_i**2*metre**6/(mole**2*ms) - 0.000931107344349216/ms) _mCAN = -_BA_mCAN + (_BA_mCAN + mCAN)*exp(dt*(-3724.42937739686*Ca_i**2*metre**6/(mole**2*ms) - 0.000931107344349216/ms)) _BA_mCaL = (-1.485*mV/(-1.0*mV*ms + 0.000820773673798214*mV*ms*exp(-0.263157894736842*v/mV)) - 0.055*v/(-1.0*mV*ms + 0.000820773673798214*mV*ms*exp(-0.263157894736842*v/mV)))/(1.485*mV/(-1.0*mV*ms + 0.000820773673798214*mV*ms*exp(-0.263157894736842*v/mV)) + 0.055*v/(-1.0*mV*ms + 0.000820773673798214*mV*ms*exp(-0.263157894736842*v/mV)) - 0.94*exp(-75/17)/(ms*exp(v/mV)**(1/17))) _mCaL = -_BA_mCaL + (_BA_mCaL + mCaL)*exp(dt*(1.485*mV/(-1.0*mV*ms + 0.000820773673798214*mV*ms*exp(-0.263157894736842*v/mV)) + 0.055*v/(-1.0*mV*ms + 0.000820773673798214*mV*ms*exp(-0.263157894736842*v/mV)) - 0.94*exp(-75/17)/(ms*exp(v/mV)**(1/17)))) _BA_n = (-1.28*mV/(-1.0*mV*ms + mV*ms*exp(-8)*exp(-v/(5*mV))) - 0.032*v/(-1.0*mV*ms + mV*ms*exp(-8)*exp(-v/(5*mV))))/(1.28*mV/(-1.0*mV*ms + mV*ms*exp(-8)*exp(-v/(5*mV))) + 0.032*v/(-1.0*mV*ms + mV*ms*exp(-8)*exp(-v/(5*mV))) - 0.5*exp(-9/8)/(ms*exp(v/mV)**(1/40))) _n = -_BA_n + (_BA_n + n)*exp(dt*(1.28*mV/(-1.0*mV*ms + mV*ms*exp(-8)*exp(-v/(5*mV))) + 0.032*v/(-1.0*mV*ms + mV*ms*exp(-8)*exp(-v/(5*mV))) - 0.5*exp(-9/8)/(ms*exp(v/mV)**(1/40)))) _BA_p = (0.001/(ms*exp(7/4)*exp(v/(20*mV)) + ms*exp(-7/4)*exp(-v/(20*mV))) + 0.0033*exp(7/4)*exp(v/(20*mV))/(ms + ms*exp(-7/2)*exp(-v/(10*mV))))/(-0.0033*exp(7/4)*exp(v/mV)**(1/20)/ms - exp(-7/4)/(1000*ms*exp(v/mV)**(1/20))) _p = -_BA_p + (_BA_p + p)*exp(dt*(-0.0033*exp(7/4)*exp(v/mV)**(1/20)/ms - exp(-7/4)/(1000*ms*exp(v/mV)**(1/20)))) _BA_v = (Ek*cm**2*gM*p/ufarad + 5*Ek*msiemens*n**4/ufarad - 20*cm**2*gCAN*mCAN**2*mV/ufarad - 80*cm**2*gi*mV*int(Cl <= 0.5)/(size*ufarad) + cm**2*r*inputs_stim(t)/(size*ufarad) + 2500*h*m**3*mV*msiemens/ufarad + 0.012*hCaL*mCaL**2*mV*siemens/ufarad - 0.0007*mV*siemens/ufarad + noise)*(-cm**2*gCAN*mCAN**2/ufarad - cm**2*gM*p/ufarad - cm**2*ge/(size*ufarad) - cm**2*ge_ext/(size*ufarad) - cm**2*ge_hipp/(size*ufarad) - cm**2*gi*int(Cl <= 0.5)/(size*ufarad) - cm**2*gi*int(Cl > 0.5)/(size*ufarad) - 50*h*m**3*msiemens/ufarad - 0.0001*hCaL*mCaL**2*siemens/ufarad - 5*msiemens*n**4/ufarad - 1.0e-5*siemens/ufarad)**(-1) _v = -_BA_v + (_BA_v + v)*exp(dt*(-cm**2*gCAN*mCAN**2/ufarad - cm**2*gM*p/ufarad - cm**2*ge/(size*ufarad) - cm**2*ge_ext/(size*ufarad) - cm**2*ge_hipp/(size*ufarad) - cm**2*gi*int(Cl <= 0.5)/(size*ufarad) - cm**2*gi*int(Cl > 0.5)/(size*ufarad) - 50*h*m**3*msiemens/ufarad - 0.0001*hCaL*mCaL**2*siemens/ufarad - 5*msiemens*n**4/ufarad - 1.0e-5*siemens/ufarad)) Ca_i = _Ca_i Cl = _Cl ge = _ge ge_ext = _ge_ext ge_hipp = _ge_hipp gi = _gi glu = _glu h = _h hCaL = _hCaL he = _he he_ext = _he_ext he_hipp = _he_hipp hi = _hi m = _m mCAN = _mCAN mCaL = _mCaL n = _n p = _p v = _v 2021-11-05 15:15:09,304 DIAGNOSTIC brian2.devices.device: CA1_pyCAN_stateupdater_codeobject snippet (scalar): t = _array_defaultclock_t[0] dt = _array_defaultclock_dt[0] _BA_glu = - 1 _lio_1 = _timestep(0.003, dt) _lio_2 = (- 200.0) * ms _lio_3 = (1.2e-06 * mole) / ((metre ** 3) * ms) _lio_4 = (0.000621832540496844 * ((mV * mole) * siemens)) / (((cm ** 4) * coulomb) * umetre) _lio_5 = (5.1819378374737e-06 * (mole * siemens)) / (((cm ** 4) * coulomb) * umetre) _lio_6 = exp((0.005 * (- dt)) / ms) _lio_7 = exp((- dt) / tau_Cl) _lio_8 = exp(((- 3.33333333333333) * dt) / ms) _lio_9 = exp(((- 1.0) * dt) / ms) _lio_10 = - _BA_glu _lio_11 = exp((0.3333333333333333 * (- dt)) / second) _lio_12 = 0.015501226546218206 / ms _lio_13 = 0.05555555555555555 / mV _lio_14 = ms * 0.049787068367863944 _lio_15 = 0.2 / mV _lio_16 = 1.0 / mV _lio_17 = 0.00035237057471222975 / ms _lio_18 = 0.02 / mV _lio_19 = ms * 0.5852511043074123 _lio_20 = 0.03571428571428571 / mV _lio_21 = exp((0.2 * (- dt)) / ms) _lio_22 = exp((0.1 * (- dt)) / ms) _lio_23 = (- 13.44) * mV _lio_24 = ((- 1.0) * mV) * ms _lio_25 = (mV * ms) * 2.7536449349747158e-05 _lio_26 = 0.25 / mV _lio_27 = (- 4.2) * mV _lio_28 = 0.0 - (mV * ms) _lio_29 = (mV * ms) * 20.085536923187668 _lio_30 = 13.44 * mV _lio_31 = 2979543.50191749 * (metre ** 12) _lio_32 = 0.0002 * ((mole ** 4) * ms) _lio_33 = 800.0 * (((metre ** 6) * (mole ** 2)) * ms) _lio_34 = 0.744885875479373 * (metre ** 6) _lio_35 = 0.0002 * ((mole ** 2) * ms) _lio_36 = 800.0 * ((metre ** 6) * ms) _lio_37 = 0.0 - (0.000931107344349216 / ms) _lio_38 = ((- 3724.42937739686) * (metre ** 6)) / ((mole ** 2) * ms) _lio_39 = (- 1.485) * mV _lio_40 = 0.000820773673798214 * (mV * ms) _lio_41 = (- 0.263157894736842) / mV _lio_42 = 1.485 * mV _lio_43 = 0.011405722114984784 / ms _lio_44 = (- 1.28) * mV _lio_45 = (mV * ms) * 0.00033546262790251185 _lio_46 = 1.28 * mV _lio_47 = 0.16232623367917487 / ms _lio_48 = ms * 5.754602676005731 _lio_49 = 0.05 / mV _lio_50 = ms * 0.17377394345044514 _lio_51 = ms * 0.0301973834223185 _lio_52 = 0.1 / mV _lio_53 = (- 0.018990188830818912) / ms _lio_54 = 0.00017377394345044513 / ms _lio_55 = 0.0 - ((0.0007 * (mV * siemens)) / ufarad) _lio_56 = ((Ek * (cm ** 2)) * gM) / ufarad _lio_57 = (5.0 * (Ek * msiemens)) / ufarad _lio_58 = ((cm ** 2) * _timedarray(t)) / ufarad _lio_59 = (2500.0 * (mV * msiemens)) / ufarad _lio_60 = (0.012 * (mV * siemens)) / ufarad _lio_61 = (20.0 * (((cm ** 2) * gCAN) * mV)) / ufarad _lio_62 = (80.0 * ((cm ** 2) * mV)) / ufarad _lio_63 = 0.0 - ((1e-05 * siemens) / ufarad) _lio_64 = ((- (cm ** 2)) * gCAN) / ufarad _lio_65 = ((cm ** 2) * gM) / ufarad _lio_66 = (cm ** 2) / ufarad _lio_67 = (50.0 * msiemens) / ufarad _lio_68 = (0.0001 * siemens) / ufarad _lio_69 = (5.0 * msiemens) / ufarad 2021-11-05 15:15:09,304 DIAGNOSTIC brian2.devices.device: CA1_pyCAN_stateupdater_codeobject snippet (vector): gi = _array_CA1_pyCAN_gi[_idx] noise = _array_CA1_pyCAN_noise[_idx] r = _array_CA1_pyCAN_r[_idx] Cl = _array_CA1_pyCAN_Cl[_idx] mCaL = _array_CA1_pyCAN_mCaL[_idx] lastspike = _array_CA1_pyCAN_lastspike[_idx] Ca_i = _array_CA1_pyCAN_Ca_i[_idx] mCAN = _array_CA1_pyCAN_mCAN[_idx] v = _array_CA1_pyCAN_v[_idx] p = _array_CA1_pyCAN_p[_idx] ge_hipp = _array_CA1_pyCAN_ge_hipp[_idx] size = _array_CA1_pyCAN_size[_idx] m = _array_CA1_pyCAN_m[_idx] glu = _array_CA1_pyCAN_glu[_idx] h = _array_CA1_pyCAN_h[_idx] n = _array_CA1_pyCAN_n[_idx] he = _array_CA1_pyCAN_he[_idx] hi = _array_CA1_pyCAN_hi[_idx] ge = _array_CA1_pyCAN_ge[_idx] he_hipp = _array_CA1_pyCAN_he_hipp[_idx] ge_ext = _array_CA1_pyCAN_ge_ext[_idx] hCaL = _array_CA1_pyCAN_hCaL[_idx] he_ext = _array_CA1_pyCAN_he_ext[_idx] not_refractory = _timestep(t - lastspike, dt) >= _lio_1 _BA_Ca_i = _lio_2 * ((_lio_3 + (_lio_4 * ((hCaL * (mCaL ** 2)) * size))) - (_lio_5 * (((hCaL * (mCaL ** 2)) * size) * v))) _Ca_i = (- _BA_Ca_i) + (_lio_6 * (Ca_i + _BA_Ca_i)) _Cl = _lio_7 * Cl _BA_ge = (- 1.0) * he _ge = (- _BA_ge) + (_lio_8 * (_BA_ge + ge)) _BA_ge_ext = (- 1.0) * he_ext _ge_ext = (- _BA_ge_ext) + (_lio_8 * (_BA_ge_ext + ge_ext)) _BA_ge_hipp = (- 1.0) * he_hipp _ge_hipp = (- _BA_ge_hipp) + (_lio_8 * (_BA_ge_hipp + ge_hipp)) _BA_gi = (- 1.0) * hi _gi = (- _BA_gi) + (_lio_9 * (_BA_gi + gi)) _glu = _lio_10 + (_lio_11 * (_BA_glu + glu)) _BA_h = (_lio_12 * exp(_lio_13 * (- v))) / (((- 4.0) / (ms + (_lio_14 * exp(_lio_15 * (- v))))) - (_lio_12 / (exp(_lio_16 * v) ** 0.05555555555555555))) _h = (- _BA_h) + ((_BA_h + h) * exp(dt * (((- 4.0) / (ms + (_lio_14 * exp(_lio_15 * (- v))))) - (_lio_12 / (exp(_lio_16 * v) ** 0.05555555555555555))))) _BA_hCaL = (_lio_17 * exp(_lio_18 * (- v))) / (((- 0.0065) / (ms + (_lio_19 * exp(_lio_20 * (- v))))) - (_lio_17 / (exp(_lio_16 * v) ** 0.02))) _hCaL = (- _BA_hCaL) + ((_BA_hCaL + hCaL) * exp(dt * (((- 0.0065) / (ms + (_lio_19 * exp(_lio_20 * (- v))))) - (_lio_17 / (exp(_lio_16 * v) ** 0.02))))) _he = _lio_21 * he _he_ext = _lio_21 * he_ext _he_hipp = _lio_21 * he_hipp _hi = _lio_22 * hi _BA_m = ((_lio_23 / (_lio_24 + (_lio_25 * exp(_lio_26 * (- v))))) - ((0.32 * v) / (_lio_24 + (_lio_25 * exp(_lio_26 * (- v)))))) / ((((_lio_27 / (_lio_28 + (_lio_29 * exp(_lio_15 * v)))) + (_lio_30 / (_lio_24 + (_lio_25 * exp(_lio_26 * (- v)))))) + ((0.32 * v) / (_lio_24 + (_lio_25 * exp(_lio_26 * (- v)))))) - ((0.28 * v) / (_lio_28 + (_lio_29 * exp(_lio_15 * v))))) _m = (- _BA_m) + ((_BA_m + m) * exp(dt * ((((_lio_27 / (_lio_28 + (_lio_29 * exp(_lio_15 * v)))) + (_lio_30 / (_lio_24 + (_lio_25 * exp(_lio_26 * (- v)))))) + ((0.32 * v) / (_lio_24 + (_lio_25 * exp(_lio_26 * (- v)))))) - ((0.28 * v) / (_lio_28 + (_lio_29 * exp(_lio_15 * v))))))) _BA_mCAN = (((_lio_31 * (Ca_i ** 4)) / (_lio_32 + (_lio_33 * (Ca_i ** 2)))) + ((_lio_34 * (Ca_i ** 2)) / (_lio_35 + (_lio_36 * (Ca_i ** 2))))) / (_lio_37 + (_lio_38 * (Ca_i ** 2))) _mCAN = (- _BA_mCAN) + ((_BA_mCAN + mCAN) * exp(dt * (_lio_37 + (_lio_38 * (Ca_i ** 2))))) _BA_mCaL = ((_lio_39 / (_lio_24 + (_lio_40 * exp(_lio_41 * v)))) - ((0.055 * v) / (_lio_24 + (_lio_40 * exp(_lio_41 * v))))) / (((_lio_42 / (_lio_24 + (_lio_40 * exp(_lio_41 * v)))) + ((0.055 * v) / (_lio_24 + (_lio_40 * exp(_lio_41 * v))))) - (_lio_43 / (exp(_lio_16 * v) ** 0.058823529411764705))) _mCaL = (- _BA_mCaL) + ((_BA_mCaL + mCaL) * exp(dt * (((_lio_42 / (_lio_24 + (_lio_40 * exp(_lio_41 * v)))) + ((0.055 * v) / (_lio_24 + (_lio_40 * exp(_lio_41 * v))))) - (_lio_43 / (exp(_lio_16 * v) ** 0.058823529411764705))))) _BA_n = ((_lio_44 / (_lio_24 + (_lio_45 * exp(_lio_15 * (- v))))) - ((0.032 * v) / (_lio_24 + (_lio_45 * exp(_lio_15 * (- v)))))) / (((_lio_46 / (_lio_24 + (_lio_45 * exp(_lio_15 * (- v))))) + ((0.032 * v) / (_lio_24 + (_lio_45 * exp(_lio_15 * (- v)))))) - (_lio_47 / (exp(_lio_16 * v) ** 0.025))) _n = (- _BA_n) + ((_BA_n + n) * exp(dt * (((_lio_46 / (_lio_24 + (_lio_45 * exp(_lio_15 * (- v))))) + ((0.032 * v) / (_lio_24 + (_lio_45 * exp(_lio_15 * (- v)))))) - (_lio_47 / (exp(_lio_16 * v) ** 0.025))))) _BA_p = ((0.001 / ((_lio_48 * exp(_lio_49 * v)) + (_lio_50 * exp(_lio_49 * (- v))))) + ((0.018990188830818912 * exp(_lio_49 * v)) / (ms + (_lio_51 * exp(_lio_52 * (- v)))))) / ((_lio_53 * (exp(_lio_16 * v) ** 0.05)) - (_lio_54 / (exp(_lio_16 * v) ** 0.05))) _p = (- _BA_p) + ((_BA_p + p) * exp(dt * ((_lio_53 * (exp(_lio_16 * v) ** 0.05)) - (_lio_54 / (exp(_lio_16 * v) ** 0.05))))) _BA_v = ((_lio_55 + ((((((_lio_56 * p) + (_lio_57 * (n ** 4))) + ((_lio_58 * r) / size)) + (_lio_59 * (h * (m ** 3)))) + (_lio_60 * (hCaL * (mCaL ** 2)))) + noise)) - ((_lio_61 * (mCAN ** 2)) + ((_lio_62 * (gi * int_(Cl <= 0.5))) / size))) * (((_lio_63 + (_lio_64 * (mCAN ** 2))) - (((((((((_lio_65 * p) + ((_lio_66 * ge) / size)) + ((_lio_66 * ge_ext) / size)) + ((_lio_66 * ge_hipp) / size)) + ((_lio_66 * (gi * int_(Cl <= 0.5))) / size)) + ((_lio_66 * (gi * int_(Cl > 0.5))) / size)) + (_lio_67 * (h * (m ** 3)))) + (_lio_68 * (hCaL * (mCaL ** 2)))) + (_lio_69 * (n ** 4)))) ** (- 1)) _v = (- _BA_v) + ((_BA_v + v) * exp(dt * ((_lio_63 + (_lio_64 * (mCAN ** 2))) - (((((((((_lio_65 * p) + ((_lio_66 * ge) / size)) + ((_lio_66 * ge_ext) / size)) + ((_lio_66 * ge_hipp) / size)) + ((_lio_66 * (gi * int_(Cl <= 0.5))) / size)) + ((_lio_66 * (gi * int_(Cl > 0.5))) / size)) + (_lio_67 * (h * (m ** 3)))) + (_lio_68 * (hCaL * (mCaL ** 2)))) + (_lio_69 * (n ** 4)))))) Ca_i = _Ca_i Cl = _Cl ge = _ge ge_ext = _ge_ext ge_hipp = _ge_hipp gi = _gi glu = _glu h = _h hCaL = _hCaL he = _he he_ext = _he_ext he_hipp = _he_hipp hi = _hi m = _m mCAN = _mCAN mCaL = _mCaL n = _n p = _p v = _v _array_CA1_pyCAN_gi[_idx] = gi _array_CA1_pyCAN_not_refractory[_idx] = not_refractory _array_CA1_pyCAN_Cl[_idx] = Cl _array_CA1_pyCAN_mCaL[_idx] = mCaL _array_CA1_pyCAN_Ca_i[_idx] = Ca_i _array_CA1_pyCAN_mCAN[_idx] = mCAN _array_CA1_pyCAN_v[_idx] = v _array_CA1_pyCAN_p[_idx] = p _array_CA1_pyCAN_ge_hipp[_idx] = ge_hipp _array_CA1_pyCAN_m[_idx] = m _array_CA1_pyCAN_glu[_idx] = glu _array_CA1_pyCAN_h[_idx] = h _array_CA1_pyCAN_n[_idx] = n _array_CA1_pyCAN_he[_idx] = he _array_CA1_pyCAN_hi[_idx] = hi _array_CA1_pyCAN_ge[_idx] = ge _array_CA1_pyCAN_he_hipp[_idx] = he_hipp _array_CA1_pyCAN_ge_ext[_idx] = ge_ext _array_CA1_pyCAN_hCaL[_idx] = hCaL _array_CA1_pyCAN_he_ext[_idx] = he_ext 2021-11-05 15:15:09,305 DIAGNOSTIC brian2.devices.device: CA1_pyCAN_stateupdater_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code cdef double *_namespace_timedarray_values cdef double _timedarray(const double t): global _namespace_timedarray_values cdef double epsilon = 0.001000000000000000 / 128 cdef int i = (int)((t/epsilon + 0.5)/128) if i < 0: i = 0 if i >= 2001: i = 2001 - 1 return _namespace_timedarray_values[i] cdef int64_t _timestep(double t, double dt): return ((t + 1e-3*dt)/dt) # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var_Ca_i = _namespace["_var_Ca_i"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_Ca_i = _namespace['_array_CA1_pyCAN_Ca_i'] cdef double * _array_CA1_pyCAN_Ca_i = _buf__array_CA1_pyCAN_Ca_i.data cdef size_t _num_array_CA1_pyCAN_Ca_i = len(_namespace['_array_CA1_pyCAN_Ca_i']) cdef double Ca_i _var_Cl = _namespace["_var_Cl"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_Cl = _namespace['_array_CA1_pyCAN_Cl'] cdef double * _array_CA1_pyCAN_Cl = _buf__array_CA1_pyCAN_Cl.data cdef size_t _num_array_CA1_pyCAN_Cl = len(_namespace['_array_CA1_pyCAN_Cl']) cdef double Cl _var_Ek = _namespace["_var_Ek"] cdef double Ek = _namespace["Ek"] _var_N = _namespace["_var_N"] cdef int64_t N = _namespace["N"] _var_cm = _namespace["_var_cm"] cdef double cm = _namespace["cm"] _var_coulomb = _namespace["_var_coulomb"] cdef double coulomb = _namespace["coulomb"] _var_dt = _namespace["_var_dt"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_dt = _namespace['_array_defaultclock_dt'] cdef double * _array_defaultclock_dt = _buf__array_defaultclock_dt.data cdef double dt = _namespace["dt"] _var_gCAN = _namespace["_var_gCAN"] cdef double gCAN = _namespace["gCAN"] _var_gM = _namespace["_var_gM"] cdef double gM = _namespace["gM"] _var_ge = _namespace["_var_ge"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_ge = _namespace['_array_CA1_pyCAN_ge'] cdef double * _array_CA1_pyCAN_ge = _buf__array_CA1_pyCAN_ge.data cdef size_t _num_array_CA1_pyCAN_ge = len(_namespace['_array_CA1_pyCAN_ge']) cdef double ge _var_ge_ext = _namespace["_var_ge_ext"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_ge_ext = _namespace['_array_CA1_pyCAN_ge_ext'] cdef double * _array_CA1_pyCAN_ge_ext = _buf__array_CA1_pyCAN_ge_ext.data cdef size_t _num_array_CA1_pyCAN_ge_ext = len(_namespace['_array_CA1_pyCAN_ge_ext']) cdef double ge_ext _var_ge_hipp = _namespace["_var_ge_hipp"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_ge_hipp = _namespace['_array_CA1_pyCAN_ge_hipp'] cdef double * _array_CA1_pyCAN_ge_hipp = _buf__array_CA1_pyCAN_ge_hipp.data cdef size_t _num_array_CA1_pyCAN_ge_hipp = len(_namespace['_array_CA1_pyCAN_ge_hipp']) cdef double ge_hipp _var_gi = _namespace["_var_gi"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_gi = _namespace['_array_CA1_pyCAN_gi'] cdef double * _array_CA1_pyCAN_gi = _buf__array_CA1_pyCAN_gi.data cdef size_t _num_array_CA1_pyCAN_gi = len(_namespace['_array_CA1_pyCAN_gi']) cdef double gi _var_glu = _namespace["_var_glu"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_glu = _namespace['_array_CA1_pyCAN_glu'] cdef double * _array_CA1_pyCAN_glu = _buf__array_CA1_pyCAN_glu.data cdef size_t _num_array_CA1_pyCAN_glu = len(_namespace['_array_CA1_pyCAN_glu']) cdef double glu _var_h = _namespace["_var_h"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_h = _namespace['_array_CA1_pyCAN_h'] cdef double * _array_CA1_pyCAN_h = _buf__array_CA1_pyCAN_h.data cdef size_t _num_array_CA1_pyCAN_h = len(_namespace['_array_CA1_pyCAN_h']) cdef double h _var_hCaL = _namespace["_var_hCaL"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_hCaL = _namespace['_array_CA1_pyCAN_hCaL'] cdef double * _array_CA1_pyCAN_hCaL = _buf__array_CA1_pyCAN_hCaL.data cdef size_t _num_array_CA1_pyCAN_hCaL = len(_namespace['_array_CA1_pyCAN_hCaL']) cdef double hCaL _var_he = _namespace["_var_he"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_he = _namespace['_array_CA1_pyCAN_he'] cdef double * _array_CA1_pyCAN_he = _buf__array_CA1_pyCAN_he.data cdef size_t _num_array_CA1_pyCAN_he = len(_namespace['_array_CA1_pyCAN_he']) cdef double he _var_he_ext = _namespace["_var_he_ext"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_he_ext = _namespace['_array_CA1_pyCAN_he_ext'] cdef double * _array_CA1_pyCAN_he_ext = _buf__array_CA1_pyCAN_he_ext.data cdef size_t _num_array_CA1_pyCAN_he_ext = len(_namespace['_array_CA1_pyCAN_he_ext']) cdef double he_ext _var_he_hipp = _namespace["_var_he_hipp"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_he_hipp = _namespace['_array_CA1_pyCAN_he_hipp'] cdef double * _array_CA1_pyCAN_he_hipp = _buf__array_CA1_pyCAN_he_hipp.data cdef size_t _num_array_CA1_pyCAN_he_hipp = len(_namespace['_array_CA1_pyCAN_he_hipp']) cdef double he_hipp _var_hi = _namespace["_var_hi"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_hi = _namespace['_array_CA1_pyCAN_hi'] cdef double * _array_CA1_pyCAN_hi = _buf__array_CA1_pyCAN_hi.data cdef size_t _num_array_CA1_pyCAN_hi = len(_namespace['_array_CA1_pyCAN_hi']) cdef double hi # namespace for function inputs_stim global _namespace_timedarray_values global _namespace_num_timedarray_values cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__timedarray_values = _namespace['_timedarray_values'] _namespace_timedarray_values = _buf__timedarray_values.data _namespace_num_timedarray_values = len(_namespace['_timedarray_values']) _var_lastspike = _namespace["_var_lastspike"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_lastspike = _namespace['_array_CA1_pyCAN_lastspike'] cdef double * _array_CA1_pyCAN_lastspike = _buf__array_CA1_pyCAN_lastspike.data cdef size_t _num_array_CA1_pyCAN_lastspike = len(_namespace['_array_CA1_pyCAN_lastspike']) cdef double lastspike _var_m = _namespace["_var_m"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_m = _namespace['_array_CA1_pyCAN_m'] cdef double * _array_CA1_pyCAN_m = _buf__array_CA1_pyCAN_m.data cdef size_t _num_array_CA1_pyCAN_m = len(_namespace['_array_CA1_pyCAN_m']) cdef double m _var_mCAN = _namespace["_var_mCAN"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_mCAN = _namespace['_array_CA1_pyCAN_mCAN'] cdef double * _array_CA1_pyCAN_mCAN = _buf__array_CA1_pyCAN_mCAN.data cdef size_t _num_array_CA1_pyCAN_mCAN = len(_namespace['_array_CA1_pyCAN_mCAN']) cdef double mCAN _var_mCaL = _namespace["_var_mCaL"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_mCaL = _namespace['_array_CA1_pyCAN_mCaL'] cdef double * _array_CA1_pyCAN_mCaL = _buf__array_CA1_pyCAN_mCaL.data cdef size_t _num_array_CA1_pyCAN_mCaL = len(_namespace['_array_CA1_pyCAN_mCaL']) cdef double mCaL _var_mV = _namespace["_var_mV"] cdef double mV = _namespace["mV"] _var_metre = _namespace["_var_metre"] cdef double metre = _namespace["metre"] _var_mole = _namespace["_var_mole"] cdef double mole = _namespace["mole"] _var_ms = _namespace["_var_ms"] cdef double ms = _namespace["ms"] _var_msiemens = _namespace["_var_msiemens"] cdef double msiemens = _namespace["msiemens"] _var_n = _namespace["_var_n"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_n = _namespace['_array_CA1_pyCAN_n'] cdef double * _array_CA1_pyCAN_n = _buf__array_CA1_pyCAN_n.data cdef size_t _num_array_CA1_pyCAN_n = len(_namespace['_array_CA1_pyCAN_n']) cdef double n _var_noise = _namespace["_var_noise"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_noise = _namespace['_array_CA1_pyCAN_noise'] cdef double * _array_CA1_pyCAN_noise = _buf__array_CA1_pyCAN_noise.data cdef size_t _num_array_CA1_pyCAN_noise = len(_namespace['_array_CA1_pyCAN_noise']) cdef double noise _var_not_refractory = _namespace["_var_not_refractory"] cdef _numpy.ndarray[char, ndim=1, mode='c', cast=True] _buf__array_CA1_pyCAN_not_refractory = _namespace['_array_CA1_pyCAN_not_refractory'] cdef bool * _array_CA1_pyCAN_not_refractory = _buf__array_CA1_pyCAN_not_refractory.data cdef size_t _num_array_CA1_pyCAN_not_refractory = len(_namespace['_array_CA1_pyCAN_not_refractory']) cdef bool not_refractory _var_p = _namespace["_var_p"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_p = _namespace['_array_CA1_pyCAN_p'] cdef double * _array_CA1_pyCAN_p = _buf__array_CA1_pyCAN_p.data cdef size_t _num_array_CA1_pyCAN_p = len(_namespace['_array_CA1_pyCAN_p']) cdef double p _var_r = _namespace["_var_r"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_r = _namespace['_array_CA1_pyCAN_r'] cdef double * _array_CA1_pyCAN_r = _buf__array_CA1_pyCAN_r.data cdef size_t _num_array_CA1_pyCAN_r = len(_namespace['_array_CA1_pyCAN_r']) cdef double r _var_second = _namespace["_var_second"] cdef double second = _namespace["second"] _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] _var_size = _namespace["_var_size"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_size = _namespace['_array_CA1_pyCAN_size'] cdef double * _array_CA1_pyCAN_size = _buf__array_CA1_pyCAN_size.data cdef size_t _num_array_CA1_pyCAN_size = len(_namespace['_array_CA1_pyCAN_size']) cdef double size _var_t = _namespace["_var_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double t _var_tau_Cl = _namespace["_var_tau_Cl"] cdef double tau_Cl = _namespace["tau_Cl"] _var_ufarad = _namespace["_var_ufarad"] cdef double ufarad = _namespace["ufarad"] _var_umetre = _namespace["_var_umetre"] cdef double umetre = _namespace["umetre"] _var_v = _namespace["_var_v"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_v = _namespace['_array_CA1_pyCAN_v'] cdef double * _array_CA1_pyCAN_v = _buf__array_CA1_pyCAN_v.data cdef size_t _num_array_CA1_pyCAN_v = len(_namespace['_array_CA1_pyCAN_v']) cdef double v cdef double _BA_Ca_i cdef double _BA_ge cdef double _BA_ge_ext cdef double _BA_ge_hipp cdef double _BA_gi cdef int64_t _BA_glu cdef double _BA_h cdef double _BA_hCaL cdef double _BA_m cdef double _BA_mCAN cdef double _BA_mCaL cdef double _BA_n cdef double _BA_p cdef double _BA_v cdef double _Ca_i cdef double _Cl cdef double _ge cdef double _ge_ext cdef double _ge_hipp cdef double _gi cdef double _glu cdef double _h cdef double _hCaL cdef double _he cdef double _he_ext cdef double _he_hipp cdef double _hi cdef int64_t _lio_1 cdef int64_t _lio_10 cdef double _lio_11 cdef double _lio_12 cdef double _lio_13 cdef double _lio_14 cdef double _lio_15 cdef double _lio_16 cdef double _lio_17 cdef double _lio_18 cdef double _lio_19 cdef double _lio_2 cdef double _lio_20 cdef double _lio_21 cdef double _lio_22 cdef double _lio_23 cdef double _lio_24 cdef double _lio_25 cdef double _lio_26 cdef double _lio_27 cdef double _lio_28 cdef double _lio_29 cdef double _lio_3 cdef double _lio_30 cdef double _lio_31 cdef double _lio_32 cdef double _lio_33 cdef double _lio_34 cdef double _lio_35 cdef double _lio_36 cdef double _lio_37 cdef double _lio_38 cdef double _lio_39 cdef double _lio_4 cdef double _lio_40 cdef double _lio_41 cdef double _lio_42 cdef double _lio_43 cdef double _lio_44 cdef double _lio_45 cdef double _lio_46 cdef double _lio_47 cdef double _lio_48 cdef double _lio_49 cdef double _lio_5 cdef double _lio_50 cdef double _lio_51 cdef double _lio_52 cdef double _lio_53 cdef double _lio_54 cdef double _lio_55 cdef double _lio_56 cdef double _lio_57 cdef double _lio_58 cdef double _lio_59 cdef double _lio_6 cdef double _lio_60 cdef double _lio_61 cdef double _lio_62 cdef double _lio_63 cdef double _lio_64 cdef double _lio_65 cdef double _lio_66 cdef double _lio_67 cdef double _lio_68 cdef double _lio_69 cdef double _lio_7 cdef double _lio_8 cdef double _lio_9 cdef double _m cdef double _mCAN cdef double _mCaL cdef double _n cdef double _p cdef double _v if '_owner' in _namespace: _owner = _namespace['_owner'] # scalar code _vectorisation_idx = 1 t = _array_defaultclock_t[0] dt = _array_defaultclock_dt[0] _BA_glu = - 1 _lio_1 = _timestep(0.003, dt) _lio_2 = (- 200.0) * ms _lio_3 = (1.2e-06 * mole) / ((metre ** 3) * ms) _lio_4 = (0.000621832540496844 * ((mV * mole) * siemens)) / (((cm ** 4) * coulomb) * umetre) _lio_5 = (5.1819378374737e-06 * (mole * siemens)) / (((cm ** 4) * coulomb) * umetre) _lio_6 = exp((0.005 * (- dt)) / ms) _lio_7 = exp((- dt) / tau_Cl) _lio_8 = exp(((- 3.33333333333333) * dt) / ms) _lio_9 = exp(((- 1.0) * dt) / ms) _lio_10 = - _BA_glu _lio_11 = exp((0.3333333333333333 * (- dt)) / second) _lio_12 = 0.015501226546218206 / ms _lio_13 = 0.05555555555555555 / mV _lio_14 = ms * 0.049787068367863944 _lio_15 = 0.2 / mV _lio_16 = 1.0 / mV _lio_17 = 0.00035237057471222975 / ms _lio_18 = 0.02 / mV _lio_19 = ms * 0.5852511043074123 _lio_20 = 0.03571428571428571 / mV _lio_21 = exp((0.2 * (- dt)) / ms) _lio_22 = exp((0.1 * (- dt)) / ms) _lio_23 = (- 13.44) * mV _lio_24 = ((- 1.0) * mV) * ms _lio_25 = (mV * ms) * 2.7536449349747158e-05 _lio_26 = 0.25 / mV _lio_27 = (- 4.2) * mV _lio_28 = 0.0 - (mV * ms) _lio_29 = (mV * ms) * 20.085536923187668 _lio_30 = 13.44 * mV _lio_31 = 2979543.50191749 * (metre ** 12) _lio_32 = 0.0002 * ((mole ** 4) * ms) _lio_33 = 800.0 * (((metre ** 6) * (mole ** 2)) * ms) _lio_34 = 0.744885875479373 * (metre ** 6) _lio_35 = 0.0002 * ((mole ** 2) * ms) _lio_36 = 800.0 * ((metre ** 6) * ms) _lio_37 = 0.0 - (0.000931107344349216 / ms) _lio_38 = ((- 3724.42937739686) * (metre ** 6)) / ((mole ** 2) * ms) _lio_39 = (- 1.485) * mV _lio_40 = 0.000820773673798214 * (mV * ms) _lio_41 = (- 0.263157894736842) / mV _lio_42 = 1.485 * mV _lio_43 = 0.011405722114984784 / ms _lio_44 = (- 1.28) * mV _lio_45 = (mV * ms) * 0.00033546262790251185 _lio_46 = 1.28 * mV _lio_47 = 0.16232623367917487 / ms _lio_48 = ms * 5.754602676005731 _lio_49 = 0.05 / mV _lio_50 = ms * 0.17377394345044514 _lio_51 = ms * 0.0301973834223185 _lio_52 = 0.1 / mV _lio_53 = (- 0.018990188830818912) / ms _lio_54 = 0.00017377394345044513 / ms _lio_55 = 0.0 - ((0.0007 * (mV * siemens)) / ufarad) _lio_56 = ((Ek * (cm ** 2)) * gM) / ufarad _lio_57 = (5.0 * (Ek * msiemens)) / ufarad _lio_58 = ((cm ** 2) * _timedarray(t)) / ufarad _lio_59 = (2500.0 * (mV * msiemens)) / ufarad _lio_60 = (0.012 * (mV * siemens)) / ufarad _lio_61 = (20.0 * (((cm ** 2) * gCAN) * mV)) / ufarad _lio_62 = (80.0 * ((cm ** 2) * mV)) / ufarad _lio_63 = 0.0 - ((1e-05 * siemens) / ufarad) _lio_64 = ((- (cm ** 2)) * gCAN) / ufarad _lio_65 = ((cm ** 2) * gM) / ufarad _lio_66 = (cm ** 2) / ufarad _lio_67 = (50.0 * msiemens) / ufarad _lio_68 = (0.0001 * siemens) / ufarad _lio_69 = (5.0 * msiemens) / ufarad # vector code for _idx in range(N): _vectorisation_idx = _idx gi = _array_CA1_pyCAN_gi[_idx] noise = _array_CA1_pyCAN_noise[_idx] r = _array_CA1_pyCAN_r[_idx] Cl = _array_CA1_pyCAN_Cl[_idx] mCaL = _array_CA1_pyCAN_mCaL[_idx] lastspike = _array_CA1_pyCAN_lastspike[_idx] Ca_i = _array_CA1_pyCAN_Ca_i[_idx] mCAN = _array_CA1_pyCAN_mCAN[_idx] v = _array_CA1_pyCAN_v[_idx] p = _array_CA1_pyCAN_p[_idx] ge_hipp = _array_CA1_pyCAN_ge_hipp[_idx] size = _array_CA1_pyCAN_size[_idx] m = _array_CA1_pyCAN_m[_idx] glu = _array_CA1_pyCAN_glu[_idx] h = _array_CA1_pyCAN_h[_idx] n = _array_CA1_pyCAN_n[_idx] he = _array_CA1_pyCAN_he[_idx] hi = _array_CA1_pyCAN_hi[_idx] ge = _array_CA1_pyCAN_ge[_idx] he_hipp = _array_CA1_pyCAN_he_hipp[_idx] ge_ext = _array_CA1_pyCAN_ge_ext[_idx] hCaL = _array_CA1_pyCAN_hCaL[_idx] he_ext = _array_CA1_pyCAN_he_ext[_idx] not_refractory = _timestep(t - lastspike, dt) >= _lio_1 _BA_Ca_i = _lio_2 * ((_lio_3 + (_lio_4 * ((hCaL * (mCaL ** 2)) * size))) - (_lio_5 * (((hCaL * (mCaL ** 2)) * size) * v))) _Ca_i = (- _BA_Ca_i) + (_lio_6 * (Ca_i + _BA_Ca_i)) _Cl = _lio_7 * Cl _BA_ge = (- 1.0) * he _ge = (- _BA_ge) + (_lio_8 * (_BA_ge + ge)) _BA_ge_ext = (- 1.0) * he_ext _ge_ext = (- _BA_ge_ext) + (_lio_8 * (_BA_ge_ext + ge_ext)) _BA_ge_hipp = (- 1.0) * he_hipp _ge_hipp = (- _BA_ge_hipp) + (_lio_8 * (_BA_ge_hipp + ge_hipp)) _BA_gi = (- 1.0) * hi _gi = (- _BA_gi) + (_lio_9 * (_BA_gi + gi)) _glu = _lio_10 + (_lio_11 * (_BA_glu + glu)) _BA_h = (_lio_12 * exp(_lio_13 * (- v))) / (((- 4.0) / (ms + (_lio_14 * exp(_lio_15 * (- v))))) - (_lio_12 / (exp(_lio_16 * v) ** 0.05555555555555555))) _h = (- _BA_h) + ((_BA_h + h) * exp(dt * (((- 4.0) / (ms + (_lio_14 * exp(_lio_15 * (- v))))) - (_lio_12 / (exp(_lio_16 * v) ** 0.05555555555555555))))) _BA_hCaL = (_lio_17 * exp(_lio_18 * (- v))) / (((- 0.0065) / (ms + (_lio_19 * exp(_lio_20 * (- v))))) - (_lio_17 / (exp(_lio_16 * v) ** 0.02))) _hCaL = (- _BA_hCaL) + ((_BA_hCaL + hCaL) * exp(dt * (((- 0.0065) / (ms + (_lio_19 * exp(_lio_20 * (- v))))) - (_lio_17 / (exp(_lio_16 * v) ** 0.02))))) _he = _lio_21 * he _he_ext = _lio_21 * he_ext _he_hipp = _lio_21 * he_hipp _hi = _lio_22 * hi _BA_m = ((_lio_23 / (_lio_24 + (_lio_25 * exp(_lio_26 * (- v))))) - ((0.32 * v) / (_lio_24 + (_lio_25 * exp(_lio_26 * (- v)))))) / ((((_lio_27 / (_lio_28 + (_lio_29 * exp(_lio_15 * v)))) + (_lio_30 / (_lio_24 + (_lio_25 * exp(_lio_26 * (- v)))))) + ((0.32 * v) / (_lio_24 + (_lio_25 * exp(_lio_26 * (- v)))))) - ((0.28 * v) / (_lio_28 + (_lio_29 * exp(_lio_15 * v))))) _m = (- _BA_m) + ((_BA_m + m) * exp(dt * ((((_lio_27 / (_lio_28 + (_lio_29 * exp(_lio_15 * v)))) + (_lio_30 / (_lio_24 + (_lio_25 * exp(_lio_26 * (- v)))))) + ((0.32 * v) / (_lio_24 + (_lio_25 * exp(_lio_26 * (- v)))))) - ((0.28 * v) / (_lio_28 + (_lio_29 * exp(_lio_15 * v))))))) _BA_mCAN = (((_lio_31 * (Ca_i ** 4)) / (_lio_32 + (_lio_33 * (Ca_i ** 2)))) + ((_lio_34 * (Ca_i ** 2)) / (_lio_35 + (_lio_36 * (Ca_i ** 2))))) / (_lio_37 + (_lio_38 * (Ca_i ** 2))) _mCAN = (- _BA_mCAN) + ((_BA_mCAN + mCAN) * exp(dt * (_lio_37 + (_lio_38 * (Ca_i ** 2))))) _BA_mCaL = ((_lio_39 / (_lio_24 + (_lio_40 * exp(_lio_41 * v)))) - ((0.055 * v) / (_lio_24 + (_lio_40 * exp(_lio_41 * v))))) / (((_lio_42 / (_lio_24 + (_lio_40 * exp(_lio_41 * v)))) + ((0.055 * v) / (_lio_24 + (_lio_40 * exp(_lio_41 * v))))) - (_lio_43 / (exp(_lio_16 * v) ** 0.058823529411764705))) _mCaL = (- _BA_mCaL) + ((_BA_mCaL + mCaL) * exp(dt * (((_lio_42 / (_lio_24 + (_lio_40 * exp(_lio_41 * v)))) + ((0.055 * v) / (_lio_24 + (_lio_40 * exp(_lio_41 * v))))) - (_lio_43 / (exp(_lio_16 * v) ** 0.058823529411764705))))) _BA_n = ((_lio_44 / (_lio_24 + (_lio_45 * exp(_lio_15 * (- v))))) - ((0.032 * v) / (_lio_24 + (_lio_45 * exp(_lio_15 * (- v)))))) / (((_lio_46 / (_lio_24 + (_lio_45 * exp(_lio_15 * (- v))))) + ((0.032 * v) / (_lio_24 + (_lio_45 * exp(_lio_15 * (- v)))))) - (_lio_47 / (exp(_lio_16 * v) ** 0.025))) _n = (- _BA_n) + ((_BA_n + n) * exp(dt * (((_lio_46 / (_lio_24 + (_lio_45 * exp(_lio_15 * (- v))))) + ((0.032 * v) / (_lio_24 + (_lio_45 * exp(_lio_15 * (- v)))))) - (_lio_47 / (exp(_lio_16 * v) ** 0.025))))) _BA_p = ((0.001 / ((_lio_48 * exp(_lio_49 * v)) + (_lio_50 * exp(_lio_49 * (- v))))) + ((0.018990188830818912 * exp(_lio_49 * v)) / (ms + (_lio_51 * exp(_lio_52 * (- v)))))) / ((_lio_53 * (exp(_lio_16 * v) ** 0.05)) - (_lio_54 / (exp(_lio_16 * v) ** 0.05))) _p = (- _BA_p) + ((_BA_p + p) * exp(dt * ((_lio_53 * (exp(_lio_16 * v) ** 0.05)) - (_lio_54 / (exp(_lio_16 * v) ** 0.05))))) _BA_v = ((_lio_55 + ((((((_lio_56 * p) + (_lio_57 * (n ** 4))) + ((_lio_58 * r) / size)) + (_lio_59 * (h * (m ** 3)))) + (_lio_60 * (hCaL * (mCaL ** 2)))) + noise)) - ((_lio_61 * (mCAN ** 2)) + ((_lio_62 * (gi * int_(Cl <= 0.5))) / size))) * (((_lio_63 + (_lio_64 * (mCAN ** 2))) - (((((((((_lio_65 * p) + ((_lio_66 * ge) / size)) + ((_lio_66 * ge_ext) / size)) + ((_lio_66 * ge_hipp) / size)) + ((_lio_66 * (gi * int_(Cl <= 0.5))) / size)) + ((_lio_66 * (gi * int_(Cl > 0.5))) / size)) + (_lio_67 * (h * (m ** 3)))) + (_lio_68 * (hCaL * (mCaL ** 2)))) + (_lio_69 * (n ** 4)))) ** (- 1)) _v = (- _BA_v) + ((_BA_v + v) * exp(dt * ((_lio_63 + (_lio_64 * (mCAN ** 2))) - (((((((((_lio_65 * p) + ((_lio_66 * ge) / size)) + ((_lio_66 * ge_ext) / size)) + ((_lio_66 * ge_hipp) / size)) + ((_lio_66 * (gi * int_(Cl <= 0.5))) / size)) + ((_lio_66 * (gi * int_(Cl > 0.5))) / size)) + (_lio_67 * (h * (m ** 3)))) + (_lio_68 * (hCaL * (mCaL ** 2)))) + (_lio_69 * (n ** 4)))))) Ca_i = _Ca_i Cl = _Cl ge = _ge ge_ext = _ge_ext ge_hipp = _ge_hipp gi = _gi glu = _glu h = _h hCaL = _hCaL he = _he he_ext = _he_ext he_hipp = _he_hipp hi = _hi m = _m mCAN = _mCAN mCaL = _mCaL n = _n p = _p v = _v _array_CA1_pyCAN_gi[_idx] = gi _array_CA1_pyCAN_not_refractory[_idx] = not_refractory _array_CA1_pyCAN_Cl[_idx] = Cl _array_CA1_pyCAN_mCaL[_idx] = mCaL _array_CA1_pyCAN_Ca_i[_idx] = Ca_i _array_CA1_pyCAN_mCAN[_idx] = mCAN _array_CA1_pyCAN_v[_idx] = v _array_CA1_pyCAN_p[_idx] = p _array_CA1_pyCAN_ge_hipp[_idx] = ge_hipp _array_CA1_pyCAN_m[_idx] = m _array_CA1_pyCAN_glu[_idx] = glu _array_CA1_pyCAN_h[_idx] = h _array_CA1_pyCAN_n[_idx] = n _array_CA1_pyCAN_he[_idx] = he _array_CA1_pyCAN_hi[_idx] = hi _array_CA1_pyCAN_ge[_idx] = ge _array_CA1_pyCAN_he_hipp[_idx] = he_hipp _array_CA1_pyCAN_ge_ext[_idx] = ge_ext _array_CA1_pyCAN_hCaL[_idx] = hCaL _array_CA1_pyCAN_he_ext[_idx] = he_ext before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_Ca_i = _namespace["_var_Ca_i"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_Ca_i = _namespace['_array_CA1_pyCAN_Ca_i'] cdef double * _array_CA1_pyCAN_Ca_i = _buf__array_CA1_pyCAN_Ca_i.data cdef size_t _num_array_CA1_pyCAN_Ca_i = len(_namespace['_array_CA1_pyCAN_Ca_i']) cdef double Ca_i _var_Cl = _namespace["_var_Cl"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_Cl = _namespace['_array_CA1_pyCAN_Cl'] cdef double * _array_CA1_pyCAN_Cl = _buf__array_CA1_pyCAN_Cl.data cdef size_t _num_array_CA1_pyCAN_Cl = len(_namespace['_array_CA1_pyCAN_Cl']) cdef double Cl _var_Ek = _namespace["_var_Ek"] cdef double Ek = _namespace["Ek"] _var_N = _namespace["_var_N"] cdef int64_t N = _namespace["N"] _var_cm = _namespace["_var_cm"] cdef double cm = _namespace["cm"] _var_coulomb = _namespace["_var_coulomb"] cdef double coulomb = _namespace["coulomb"] _var_dt = _namespace["_var_dt"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_dt = _namespace['_array_defaultclock_dt'] cdef double * _array_defaultclock_dt = _buf__array_defaultclock_dt.data cdef double dt = _namespace["dt"] _var_gCAN = _namespace["_var_gCAN"] cdef double gCAN = _namespace["gCAN"] _var_gM = _namespace["_var_gM"] cdef double gM = _namespace["gM"] _var_ge = _namespace["_var_ge"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_ge = _namespace['_array_CA1_pyCAN_ge'] cdef double * _array_CA1_pyCAN_ge = _buf__array_CA1_pyCAN_ge.data cdef size_t _num_array_CA1_pyCAN_ge = len(_namespace['_array_CA1_pyCAN_ge']) cdef double ge _var_ge_ext = _namespace["_var_ge_ext"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_ge_ext = _namespace['_array_CA1_pyCAN_ge_ext'] cdef double * _array_CA1_pyCAN_ge_ext = _buf__array_CA1_pyCAN_ge_ext.data cdef size_t _num_array_CA1_pyCAN_ge_ext = len(_namespace['_array_CA1_pyCAN_ge_ext']) cdef double ge_ext _var_ge_hipp = _namespace["_var_ge_hipp"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_ge_hipp = _namespace['_array_CA1_pyCAN_ge_hipp'] cdef double * _array_CA1_pyCAN_ge_hipp = _buf__array_CA1_pyCAN_ge_hipp.data cdef size_t _num_array_CA1_pyCAN_ge_hipp = len(_namespace['_array_CA1_pyCAN_ge_hipp']) cdef double ge_hipp _var_gi = _namespace["_var_gi"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_gi = _namespace['_array_CA1_pyCAN_gi'] cdef double * _array_CA1_pyCAN_gi = _buf__array_CA1_pyCAN_gi.data cdef size_t _num_array_CA1_pyCAN_gi = len(_namespace['_array_CA1_pyCAN_gi']) cdef double gi _var_glu = _namespace["_var_glu"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_glu = _namespace['_array_CA1_pyCAN_glu'] cdef double * _array_CA1_pyCAN_glu = _buf__array_CA1_pyCAN_glu.data cdef size_t _num_array_CA1_pyCAN_glu = len(_namespace['_array_CA1_pyCAN_glu']) cdef double glu _var_h = _namespace["_var_h"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_h = _namespace['_array_CA1_pyCAN_h'] cdef double * _array_CA1_pyCAN_h = _buf__array_CA1_pyCAN_h.data cdef size_t _num_array_CA1_pyCAN_h = len(_namespace['_array_CA1_pyCAN_h']) cdef double h _var_hCaL = _namespace["_var_hCaL"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_hCaL = _namespace['_array_CA1_pyCAN_hCaL'] cdef double * _array_CA1_pyCAN_hCaL = _buf__array_CA1_pyCAN_hCaL.data cdef size_t _num_array_CA1_pyCAN_hCaL = len(_namespace['_array_CA1_pyCAN_hCaL']) cdef double hCaL _var_he = _namespace["_var_he"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_he = _namespace['_array_CA1_pyCAN_he'] cdef double * _array_CA1_pyCAN_he = _buf__array_CA1_pyCAN_he.data cdef size_t _num_array_CA1_pyCAN_he = len(_namespace['_array_CA1_pyCAN_he']) cdef double he _var_he_ext = _namespace["_var_he_ext"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_he_ext = _namespace['_array_CA1_pyCAN_he_ext'] cdef double * _array_CA1_pyCAN_he_ext = _buf__array_CA1_pyCAN_he_ext.data cdef size_t _num_array_CA1_pyCAN_he_ext = len(_namespace['_array_CA1_pyCAN_he_ext']) cdef double he_ext _var_he_hipp = _namespace["_var_he_hipp"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_he_hipp = _namespace['_array_CA1_pyCAN_he_hipp'] cdef double * _array_CA1_pyCAN_he_hipp = _buf__array_CA1_pyCAN_he_hipp.data cdef size_t _num_array_CA1_pyCAN_he_hipp = len(_namespace['_array_CA1_pyCAN_he_hipp']) cdef double he_hipp _var_hi = _namespace["_var_hi"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_hi = _namespace['_array_CA1_pyCAN_hi'] cdef double * _array_CA1_pyCAN_hi = _buf__array_CA1_pyCAN_hi.data cdef size_t _num_array_CA1_pyCAN_hi = len(_namespace['_array_CA1_pyCAN_hi']) cdef double hi # namespace for function inputs_stim global _namespace_timedarray_values global _namespace_num_timedarray_values cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__timedarray_values = _namespace['_timedarray_values'] _namespace_timedarray_values = _buf__timedarray_values.data _namespace_num_timedarray_values = len(_namespace['_timedarray_values']) _var_lastspike = _namespace["_var_lastspike"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_lastspike = _namespace['_array_CA1_pyCAN_lastspike'] cdef double * _array_CA1_pyCAN_lastspike = _buf__array_CA1_pyCAN_lastspike.data cdef size_t _num_array_CA1_pyCAN_lastspike = len(_namespace['_array_CA1_pyCAN_lastspike']) cdef double lastspike _var_m = _namespace["_var_m"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_m = _namespace['_array_CA1_pyCAN_m'] cdef double * _array_CA1_pyCAN_m = _buf__array_CA1_pyCAN_m.data cdef size_t _num_array_CA1_pyCAN_m = len(_namespace['_array_CA1_pyCAN_m']) cdef double m _var_mCAN = _namespace["_var_mCAN"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_mCAN = _namespace['_array_CA1_pyCAN_mCAN'] cdef double * _array_CA1_pyCAN_mCAN = _buf__array_CA1_pyCAN_mCAN.data cdef size_t _num_array_CA1_pyCAN_mCAN = len(_namespace['_array_CA1_pyCAN_mCAN']) cdef double mCAN _var_mCaL = _namespace["_var_mCaL"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_mCaL = _namespace['_array_CA1_pyCAN_mCaL'] cdef double * _array_CA1_pyCAN_mCaL = _buf__array_CA1_pyCAN_mCaL.data cdef size_t _num_array_CA1_pyCAN_mCaL = len(_namespace['_array_CA1_pyCAN_mCaL']) cdef double mCaL _var_mV = _namespace["_var_mV"] cdef double mV = _namespace["mV"] _var_metre = _namespace["_var_metre"] cdef double metre = _namespace["metre"] _var_mole = _namespace["_var_mole"] cdef double mole = _namespace["mole"] _var_ms = _namespace["_var_ms"] cdef double ms = _namespace["ms"] _var_msiemens = _namespace["_var_msiemens"] cdef double msiemens = _namespace["msiemens"] _var_n = _namespace["_var_n"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_n = _namespace['_array_CA1_pyCAN_n'] cdef double * _array_CA1_pyCAN_n = _buf__array_CA1_pyCAN_n.data cdef size_t _num_array_CA1_pyCAN_n = len(_namespace['_array_CA1_pyCAN_n']) cdef double n _var_noise = _namespace["_var_noise"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_noise = _namespace['_array_CA1_pyCAN_noise'] cdef double * _array_CA1_pyCAN_noise = _buf__array_CA1_pyCAN_noise.data cdef size_t _num_array_CA1_pyCAN_noise = len(_namespace['_array_CA1_pyCAN_noise']) cdef double noise _var_not_refractory = _namespace["_var_not_refractory"] cdef _numpy.ndarray[char, ndim=1, mode='c', cast=True] _buf__array_CA1_pyCAN_not_refractory = _namespace['_array_CA1_pyCAN_not_refractory'] cdef bool * _array_CA1_pyCAN_not_refractory = _buf__array_CA1_pyCAN_not_refractory.data cdef size_t _num_array_CA1_pyCAN_not_refractory = len(_namespace['_array_CA1_pyCAN_not_refractory']) cdef bool not_refractory _var_p = _namespace["_var_p"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_p = _namespace['_array_CA1_pyCAN_p'] cdef double * _array_CA1_pyCAN_p = _buf__array_CA1_pyCAN_p.data cdef size_t _num_array_CA1_pyCAN_p = len(_namespace['_array_CA1_pyCAN_p']) cdef double p _var_r = _namespace["_var_r"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_r = _namespace['_array_CA1_pyCAN_r'] cdef double * _array_CA1_pyCAN_r = _buf__array_CA1_pyCAN_r.data cdef size_t _num_array_CA1_pyCAN_r = len(_namespace['_array_CA1_pyCAN_r']) cdef double r _var_second = _namespace["_var_second"] cdef double second = _namespace["second"] _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] _var_size = _namespace["_var_size"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_size = _namespace['_array_CA1_pyCAN_size'] cdef double * _array_CA1_pyCAN_size = _buf__array_CA1_pyCAN_size.data cdef size_t _num_array_CA1_pyCAN_size = len(_namespace['_array_CA1_pyCAN_size']) cdef double size _var_t = _namespace["_var_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double t _var_tau_Cl = _namespace["_var_tau_Cl"] cdef double tau_Cl = _namespace["tau_Cl"] _var_ufarad = _namespace["_var_ufarad"] cdef double ufarad = _namespace["ufarad"] _var_umetre = _namespace["_var_umetre"] cdef double umetre = _namespace["umetre"] _var_v = _namespace["_var_v"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_v = _namespace['_array_CA1_pyCAN_v'] cdef double * _array_CA1_pyCAN_v = _buf__array_CA1_pyCAN_v.data cdef size_t _num_array_CA1_pyCAN_v = len(_namespace['_array_CA1_pyCAN_v']) cdef double v cdef double _BA_Ca_i cdef double _BA_ge cdef double _BA_ge_ext cdef double _BA_ge_hipp cdef double _BA_gi cdef int64_t _BA_glu cdef double _BA_h cdef double _BA_hCaL cdef double _BA_m cdef double _BA_mCAN cdef double _BA_mCaL cdef double _BA_n cdef double _BA_p cdef double _BA_v cdef double _Ca_i cdef double _Cl cdef double _ge cdef double _ge_ext cdef double _ge_hipp cdef double _gi cdef double _glu cdef double _h cdef double _hCaL cdef double _he cdef double _he_ext cdef double _he_hipp cdef double _hi cdef int64_t _lio_1 cdef int64_t _lio_10 cdef double _lio_11 cdef double _lio_12 cdef double _lio_13 cdef double _lio_14 cdef double _lio_15 cdef double _lio_16 cdef double _lio_17 cdef double _lio_18 cdef double _lio_19 cdef double _lio_2 cdef double _lio_20 cdef double _lio_21 cdef double _lio_22 cdef double _lio_23 cdef double _lio_24 cdef double _lio_25 cdef double _lio_26 cdef double _lio_27 cdef double _lio_28 cdef double _lio_29 cdef double _lio_3 cdef double _lio_30 cdef double _lio_31 cdef double _lio_32 cdef double _lio_33 cdef double _lio_34 cdef double _lio_35 cdef double _lio_36 cdef double _lio_37 cdef double _lio_38 cdef double _lio_39 cdef double _lio_4 cdef double _lio_40 cdef double _lio_41 cdef double _lio_42 cdef double _lio_43 cdef double _lio_44 cdef double _lio_45 cdef double _lio_46 cdef double _lio_47 cdef double _lio_48 cdef double _lio_49 cdef double _lio_5 cdef double _lio_50 cdef double _lio_51 cdef double _lio_52 cdef double _lio_53 cdef double _lio_54 cdef double _lio_55 cdef double _lio_56 cdef double _lio_57 cdef double _lio_58 cdef double _lio_59 cdef double _lio_6 cdef double _lio_60 cdef double _lio_61 cdef double _lio_62 cdef double _lio_63 cdef double _lio_64 cdef double _lio_65 cdef double _lio_66 cdef double _lio_67 cdef double _lio_68 cdef double _lio_69 cdef double _lio_7 cdef double _lio_8 cdef double _lio_9 cdef double _m cdef double _mCAN cdef double _mCaL cdef double _n cdef double _p cdef double _v if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_Ca_i = _namespace["_var_Ca_i"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_Ca_i = _namespace['_array_CA1_pyCAN_Ca_i'] cdef double * _array_CA1_pyCAN_Ca_i = _buf__array_CA1_pyCAN_Ca_i.data cdef size_t _num_array_CA1_pyCAN_Ca_i = len(_namespace['_array_CA1_pyCAN_Ca_i']) cdef double Ca_i _var_Cl = _namespace["_var_Cl"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_Cl = _namespace['_array_CA1_pyCAN_Cl'] cdef double * _array_CA1_pyCAN_Cl = _buf__array_CA1_pyCAN_Cl.data cdef size_t _num_array_CA1_pyCAN_Cl = len(_namespace['_array_CA1_pyCAN_Cl']) cdef double Cl _var_Ek = _namespace["_var_Ek"] cdef double Ek = _namespace["Ek"] _var_N = _namespace["_var_N"] cdef int64_t N = _namespace["N"] _var_cm = _namespace["_var_cm"] cdef double cm = _namespace["cm"] _var_coulomb = _namespace["_var_coulomb"] cdef double coulomb = _namespace["coulomb"] _var_dt = _namespace["_var_dt"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_dt = _namespace['_array_defaultclock_dt'] cdef double * _array_defaultclock_dt = _buf__array_defaultclock_dt.data cdef double dt = _namespace["dt"] _var_gCAN = _namespace["_var_gCAN"] cdef double gCAN = _namespace["gCAN"] _var_gM = _namespace["_var_gM"] cdef double gM = _namespace["gM"] _var_ge = _namespace["_var_ge"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_ge = _namespace['_array_CA1_pyCAN_ge'] cdef double * _array_CA1_pyCAN_ge = _buf__array_CA1_pyCAN_ge.data cdef size_t _num_array_CA1_pyCAN_ge = len(_namespace['_array_CA1_pyCAN_ge']) cdef double ge _var_ge_ext = _namespace["_var_ge_ext"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_ge_ext = _namespace['_array_CA1_pyCAN_ge_ext'] cdef double * _array_CA1_pyCAN_ge_ext = _buf__array_CA1_pyCAN_ge_ext.data cdef size_t _num_array_CA1_pyCAN_ge_ext = len(_namespace['_array_CA1_pyCAN_ge_ext']) cdef double ge_ext _var_ge_hipp = _namespace["_var_ge_hipp"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_ge_hipp = _namespace['_array_CA1_pyCAN_ge_hipp'] cdef double * _array_CA1_pyCAN_ge_hipp = _buf__array_CA1_pyCAN_ge_hipp.data cdef size_t _num_array_CA1_pyCAN_ge_hipp = len(_namespace['_array_CA1_pyCAN_ge_hipp']) cdef double ge_hipp _var_gi = _namespace["_var_gi"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_gi = _namespace['_array_CA1_pyCAN_gi'] cdef double * _array_CA1_pyCAN_gi = _buf__array_CA1_pyCAN_gi.data cdef size_t _num_array_CA1_pyCAN_gi = len(_namespace['_array_CA1_pyCAN_gi']) cdef double gi _var_glu = _namespace["_var_glu"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_glu = _namespace['_array_CA1_pyCAN_glu'] cdef double * _array_CA1_pyCAN_glu = _buf__array_CA1_pyCAN_glu.data cdef size_t _num_array_CA1_pyCAN_glu = len(_namespace['_array_CA1_pyCAN_glu']) cdef double glu _var_h = _namespace["_var_h"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_h = _namespace['_array_CA1_pyCAN_h'] cdef double * _array_CA1_pyCAN_h = _buf__array_CA1_pyCAN_h.data cdef size_t _num_array_CA1_pyCAN_h = len(_namespace['_array_CA1_pyCAN_h']) cdef double h _var_hCaL = _namespace["_var_hCaL"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_hCaL = _namespace['_array_CA1_pyCAN_hCaL'] cdef double * _array_CA1_pyCAN_hCaL = _buf__array_CA1_pyCAN_hCaL.data cdef size_t _num_array_CA1_pyCAN_hCaL = len(_namespace['_array_CA1_pyCAN_hCaL']) cdef double hCaL _var_he = _namespace["_var_he"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_he = _namespace['_array_CA1_pyCAN_he'] cdef double * _array_CA1_pyCAN_he = _buf__array_CA1_pyCAN_he.data cdef size_t _num_array_CA1_pyCAN_he = len(_namespace['_array_CA1_pyCAN_he']) cdef double he _var_he_ext = _namespace["_var_he_ext"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_he_ext = _namespace['_array_CA1_pyCAN_he_ext'] cdef double * _array_CA1_pyCAN_he_ext = _buf__array_CA1_pyCAN_he_ext.data cdef size_t _num_array_CA1_pyCAN_he_ext = len(_namespace['_array_CA1_pyCAN_he_ext']) cdef double he_ext _var_he_hipp = _namespace["_var_he_hipp"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_he_hipp = _namespace['_array_CA1_pyCAN_he_hipp'] cdef double * _array_CA1_pyCAN_he_hipp = _buf__array_CA1_pyCAN_he_hipp.data cdef size_t _num_array_CA1_pyCAN_he_hipp = len(_namespace['_array_CA1_pyCAN_he_hipp']) cdef double he_hipp _var_hi = _namespace["_var_hi"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_hi = _namespace['_array_CA1_pyCAN_hi'] cdef double * _array_CA1_pyCAN_hi = _buf__array_CA1_pyCAN_hi.data cdef size_t _num_array_CA1_pyCAN_hi = len(_namespace['_array_CA1_pyCAN_hi']) cdef double hi # namespace for function inputs_stim global _namespace_timedarray_values global _namespace_num_timedarray_values cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__timedarray_values = _namespace['_timedarray_values'] _namespace_timedarray_values = _buf__timedarray_values.data _namespace_num_timedarray_values = len(_namespace['_timedarray_values']) _var_lastspike = _namespace["_var_lastspike"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_lastspike = _namespace['_array_CA1_pyCAN_lastspike'] cdef double * _array_CA1_pyCAN_lastspike = _buf__array_CA1_pyCAN_lastspike.data cdef size_t _num_array_CA1_pyCAN_lastspike = len(_namespace['_array_CA1_pyCAN_lastspike']) cdef double lastspike _var_m = _namespace["_var_m"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_m = _namespace['_array_CA1_pyCAN_m'] cdef double * _array_CA1_pyCAN_m = _buf__array_CA1_pyCAN_m.data cdef size_t _num_array_CA1_pyCAN_m = len(_namespace['_array_CA1_pyCAN_m']) cdef double m _var_mCAN = _namespace["_var_mCAN"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_mCAN = _namespace['_array_CA1_pyCAN_mCAN'] cdef double * _array_CA1_pyCAN_mCAN = _buf__array_CA1_pyCAN_mCAN.data cdef size_t _num_array_CA1_pyCAN_mCAN = len(_namespace['_array_CA1_pyCAN_mCAN']) cdef double mCAN _var_mCaL = _namespace["_var_mCaL"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_mCaL = _namespace['_array_CA1_pyCAN_mCaL'] cdef double * _array_CA1_pyCAN_mCaL = _buf__array_CA1_pyCAN_mCaL.data cdef size_t _num_array_CA1_pyCAN_mCaL = len(_namespace['_array_CA1_pyCAN_mCaL']) cdef double mCaL _var_mV = _namespace["_var_mV"] cdef double mV = _namespace["mV"] _var_metre = _namespace["_var_metre"] cdef double metre = _namespace["metre"] _var_mole = _namespace["_var_mole"] cdef double mole = _namespace["mole"] _var_ms = _namespace["_var_ms"] cdef double ms = _namespace["ms"] _var_msiemens = _namespace["_var_msiemens"] cdef double msiemens = _namespace["msiemens"] _var_n = _namespace["_var_n"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_n = _namespace['_array_CA1_pyCAN_n'] cdef double * _array_CA1_pyCAN_n = _buf__array_CA1_pyCAN_n.data cdef size_t _num_array_CA1_pyCAN_n = len(_namespace['_array_CA1_pyCAN_n']) cdef double n _var_noise = _namespace["_var_noise"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_noise = _namespace['_array_CA1_pyCAN_noise'] cdef double * _array_CA1_pyCAN_noise = _buf__array_CA1_pyCAN_noise.data cdef size_t _num_array_CA1_pyCAN_noise = len(_namespace['_array_CA1_pyCAN_noise']) cdef double noise _var_not_refractory = _namespace["_var_not_refractory"] cdef _numpy.ndarray[char, ndim=1, mode='c', cast=True] _buf__array_CA1_pyCAN_not_refractory = _namespace['_array_CA1_pyCAN_not_refractory'] cdef bool * _array_CA1_pyCAN_not_refractory = _buf__array_CA1_pyCAN_not_refractory.data cdef size_t _num_array_CA1_pyCAN_not_refractory = len(_namespace['_array_CA1_pyCAN_not_refractory']) cdef bool not_refractory _var_p = _namespace["_var_p"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_p = _namespace['_array_CA1_pyCAN_p'] cdef double * _array_CA1_pyCAN_p = _buf__array_CA1_pyCAN_p.data cdef size_t _num_array_CA1_pyCAN_p = len(_namespace['_array_CA1_pyCAN_p']) cdef double p _var_r = _namespace["_var_r"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_r = _namespace['_array_CA1_pyCAN_r'] cdef double * _array_CA1_pyCAN_r = _buf__array_CA1_pyCAN_r.data cdef size_t _num_array_CA1_pyCAN_r = len(_namespace['_array_CA1_pyCAN_r']) cdef double r _var_second = _namespace["_var_second"] cdef double second = _namespace["second"] _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] _var_size = _namespace["_var_size"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_size = _namespace['_array_CA1_pyCAN_size'] cdef double * _array_CA1_pyCAN_size = _buf__array_CA1_pyCAN_size.data cdef size_t _num_array_CA1_pyCAN_size = len(_namespace['_array_CA1_pyCAN_size']) cdef double size _var_t = _namespace["_var_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double t _var_tau_Cl = _namespace["_var_tau_Cl"] cdef double tau_Cl = _namespace["tau_Cl"] _var_ufarad = _namespace["_var_ufarad"] cdef double ufarad = _namespace["ufarad"] _var_umetre = _namespace["_var_umetre"] cdef double umetre = _namespace["umetre"] _var_v = _namespace["_var_v"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_v = _namespace['_array_CA1_pyCAN_v'] cdef double * _array_CA1_pyCAN_v = _buf__array_CA1_pyCAN_v.data cdef size_t _num_array_CA1_pyCAN_v = len(_namespace['_array_CA1_pyCAN_v']) cdef double v cdef double _BA_Ca_i cdef double _BA_ge cdef double _BA_ge_ext cdef double _BA_ge_hipp cdef double _BA_gi cdef int64_t _BA_glu cdef double _BA_h cdef double _BA_hCaL cdef double _BA_m cdef double _BA_mCAN cdef double _BA_mCaL cdef double _BA_n cdef double _BA_p cdef double _BA_v cdef double _Ca_i cdef double _Cl cdef double _ge cdef double _ge_ext cdef double _ge_hipp cdef double _gi cdef double _glu cdef double _h cdef double _hCaL cdef double _he cdef double _he_ext cdef double _he_hipp cdef double _hi cdef int64_t _lio_1 cdef int64_t _lio_10 cdef double _lio_11 cdef double _lio_12 cdef double _lio_13 cdef double _lio_14 cdef double _lio_15 cdef double _lio_16 cdef double _lio_17 cdef double _lio_18 cdef double _lio_19 cdef double _lio_2 cdef double _lio_20 cdef double _lio_21 cdef double _lio_22 cdef double _lio_23 cdef double _lio_24 cdef double _lio_25 cdef double _lio_26 cdef double _lio_27 cdef double _lio_28 cdef double _lio_29 cdef double _lio_3 cdef double _lio_30 cdef double _lio_31 cdef double _lio_32 cdef double _lio_33 cdef double _lio_34 cdef double _lio_35 cdef double _lio_36 cdef double _lio_37 cdef double _lio_38 cdef double _lio_39 cdef double _lio_4 cdef double _lio_40 cdef double _lio_41 cdef double _lio_42 cdef double _lio_43 cdef double _lio_44 cdef double _lio_45 cdef double _lio_46 cdef double _lio_47 cdef double _lio_48 cdef double _lio_49 cdef double _lio_5 cdef double _lio_50 cdef double _lio_51 cdef double _lio_52 cdef double _lio_53 cdef double _lio_54 cdef double _lio_55 cdef double _lio_56 cdef double _lio_57 cdef double _lio_58 cdef double _lio_59 cdef double _lio_6 cdef double _lio_60 cdef double _lio_61 cdef double _lio_62 cdef double _lio_63 cdef double _lio_64 cdef double _lio_65 cdef double _lio_66 cdef double _lio_67 cdef double _lio_68 cdef double _lio_69 cdef double _lio_7 cdef double _lio_8 cdef double _lio_9 cdef double _m cdef double _mCAN cdef double _mCaL cdef double _n cdef double _p cdef double _v if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:15:09,305 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name CA1_pyCAN_stateupdater_codeobject 2021-11-05 15:15:09,307 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "CA1_pyCAN_stateupdate" using Cython module "_cython_magic_ac49a18d1639046ce956f2a1c518078b" 2021-11-05 15:15:09,307 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140606214371408 on /home/nikos/.cython/brian_extensions/_cython_magic_ac49a18d1639046ce956f2a1c518078b.lock 2021-11-05 15:15:09,307 DEBUG brian2.utils.filelock: Lock 140606214371408 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_ac49a18d1639046ce956f2a1c518078b.lock 2021-11-05 15:15:11,932 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140606214371408 on /home/nikos/.cython/brian_extensions/_cython_magic_ac49a18d1639046ce956f2a1c518078b.lock 2021-11-05 15:15:11,932 DEBUG brian2.utils.filelock: Lock 140606214371408 released on /home/nikos/.cython/brian_extensions/_cython_magic_ac49a18d1639046ce956f2a1c518078b.lock 2021-11-05 15:15:11,962 DEBUG brian2.stateupdaters.base.method_choice: Group CA3_inh: using numerical integration method exponential_euler (took 0.03s) 2021-11-05 15:15:11,962 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=CA3_inh, template name=stateupdate) for abstract code: not_refractory = timestep(t - lastspike, dt) >= timestep(0.003000, dt) _BA_ge = -1.0*he _ge = -_BA_ge + (_BA_ge + ge)*exp(-3.33333333333333*dt/ms) _BA_ge_ext = -1.0*he_ext _ge_ext = -_BA_ge_ext + (_BA_ge_ext + ge_ext)*exp(-3.33333333333333*dt/ms) _BA_ge_hipp = -1.0*he_hipp _ge_hipp = -_BA_ge_hipp + (_BA_ge_hipp + ge_hipp)*exp(-3.33333333333333*dt/ms) _BA_gi = -1.0*hi _gi = -_BA_gi + (_BA_gi + gi)*exp(-1.0*dt/ms) _BA_h = (0.35/(0.060810062625218*ms**2*exp(29/10)/(1.0*ms*exp(0.05*v/mV) + 0.060810062625218*ms*exp(-0.05*v/mV)) + 1.0*ms**2*exp(29/10)*exp(v/(20*mV))/(1.0*ms + 0.060810062625218*ms*exp(-0.1*v/mV)) + 0.07*ms + 0.00425670438376526*ms*exp(-0.1*v/mV)) + 0.0245/(1.0*ms**2*exp(29/5)*exp(v/(10*mV))/(1.0*ms + 0.060810062625218*ms*exp(-0.1*v/mV)) + 0.07*ms*exp(29/10)*exp(v/(20*mV))))/(-5.0/(1.0*ms + 0.060810062625218*ms*exp(-0.1*v/mV)) - 0.35*exp(-29/10)/(ms*exp(v/mV)**(1/20))) _h = -_BA_h + (_BA_h + h)*exp(dt*(-5.0/(1.0*ms + 0.060810062625218*ms*exp(-0.1*v/mV)) - 0.35*exp(-29/10)/(ms*exp(v/mV)**(1/20)))) _he = he*exp(-dt/(5*ms)) _he_ext = he_ext*exp(-dt/(5*ms)) _he_hipp = he_hipp*exp(-dt/(5*ms)) _hi = hi*exp(-dt/(10*ms)) _BA_m = (61.25*mV**2/(-7.0*mV**3*ms**2/(1.0*mV*ms*exp(7/2)*exp(v/(10*mV)) - mV*ms) + 3.5*mV**3*ms**2/(-mV*ms*exp(7/2)*exp(v/(10*mV)) + 1.0*mV*ms*exp(7)*exp(v/(5*mV))) + 3.5*mV**3*ms**2/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) - 0.2*mV**2*ms**2*v/(1.0*mV*ms*exp(7/2)*exp(v/(10*mV)) - mV*ms) + 0.1*mV**2*ms**2*v/(-mV*ms*exp(7/2)*exp(v/(10*mV)) + 1.0*mV*ms*exp(7)*exp(v/(5*mV))) + 0.1*mV**2*ms**2*v/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) + 4.0*mV**2*ms*exp(-10/3)*exp(-v/(18*mV)) - 8.0*mV**2*ms*exp(-41/6)*exp(-7*v/(45*mV)) + 4*mV**2*ms*exp(-31/3)*exp(-23*v/(90*mV))) + 3.5*mV*v/(-7.0*mV**3*ms**2/(1.0*mV*ms*exp(7/2)*exp(v/(10*mV)) - mV*ms) + 3.5*mV**3*ms**2/(-mV*ms*exp(7/2)*exp(v/(10*mV)) + 1.0*mV*ms*exp(7)*exp(v/(5*mV))) + 3.5*mV**3*ms**2/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) - 0.2*mV**2*ms**2*v/(1.0*mV*ms*exp(7/2)*exp(v/(10*mV)) - mV*ms) + 0.1*mV**2*ms**2*v/(-mV*ms*exp(7/2)*exp(v/(10*mV)) + 1.0*mV*ms*exp(7)*exp(v/(5*mV))) + 0.1*mV**2*ms**2*v/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) + 4.0*mV**2*ms*exp(-10/3)*exp(-v/(18*mV)) - 8.0*mV**2*ms*exp(-41/6)*exp(-7*v/(45*mV)) + 4*mV**2*ms*exp(-31/3)*exp(-23*v/(90*mV))) + 70.0*mV/(-3.5*mV**2*ms**2*exp(10/3)*exp(v/(18*mV))/(1.0*mV*ms*exp(7/2)*exp(v/(10*mV)) - mV*ms) + 3.5*mV**2*ms**2*exp(10/3)*exp(v/(18*mV))/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) - 0.1*mV*ms**2*v*exp(10/3)*exp(v/(18*mV))/(1.0*mV*ms*exp(7/2)*exp(v/(10*mV)) - mV*ms) + 0.1*mV*ms**2*v*exp(10/3)*exp(v/(18*mV))/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) + 4.0*mV*ms - 4*mV*ms*exp(-7/2)*exp(-v/(10*mV))) + 0.05*v**2/(-7.0*mV**3*ms**2/(1.0*mV*ms*exp(7/2)*exp(v/(10*mV)) - mV*ms) + 3.5*mV**3*ms**2/(-mV*ms*exp(7/2)*exp(v/(10*mV)) + 1.0*mV*ms*exp(7)*exp(v/(5*mV))) + 3.5*mV**3*ms**2/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) - 0.2*mV**2*ms**2*v/(1.0*mV*ms*exp(7/2)*exp(v/(10*mV)) - mV*ms) + 0.1*mV**2*ms**2*v/(-mV*ms*exp(7/2)*exp(v/(10*mV)) + 1.0*mV*ms*exp(7)*exp(v/(5*mV))) + 0.1*mV**2*ms**2*v/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) + 4.0*mV**2*ms*exp(-10/3)*exp(-v/(18*mV)) - 8.0*mV**2*ms*exp(-41/6)*exp(-7*v/(45*mV)) + 4*mV**2*ms*exp(-31/3)*exp(-23*v/(90*mV))) + 2.0*v/(-3.5*mV**2*ms**2*exp(10/3)*exp(v/(18*mV))/(1.0*mV*ms*exp(7/2)*exp(v/(10*mV)) - mV*ms) + 3.5*mV**2*ms**2*exp(10/3)*exp(v/(18*mV))/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) - 0.1*mV*ms**2*v*exp(10/3)*exp(v/(18*mV))/(1.0*mV*ms*exp(7/2)*exp(v/(10*mV)) - mV*ms) + 0.1*mV*ms**2*v*exp(10/3)*exp(v/(18*mV))/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) + 4.0*mV*ms - 4*mV*ms*exp(-7/2)*exp(-v/(10*mV))))/(-17.5*mV/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) - 0.5*v/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) - 20.0*exp(-10/3)/(ms*exp(v/mV)**(1/18))) _m = -_BA_m + (_BA_m + m)*exp(dt*(-17.5*mV/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) - 0.5*v/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) - 20.0*exp(-10/3)/(ms*exp(v/mV)**(1/18)))) _BA_n = (0.578*mV**2/(-0.0226938235730217*mV**3*ms**2/(1.0*mV*ms*exp(0.1*v/mV) - 0.0333732699603261*mV*ms) + 0.000378683550267233*mV**3*ms**2/(-0.0333732699603261*mV*ms*exp(0.1*v/mV) + 1.0*mV*ms*exp(0.2*v/mV)) + 0.34*mV**3*ms**2/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) - 0.000667465399206522*mV**2*ms**2*v/(1.0*mV*ms*exp(0.1*v/mV) - 0.0333732699603261*mV*ms) + 1.1137751478448e-5*mV**2*ms**2*v/(-0.0333732699603261*mV*ms*exp(0.1*v/mV) + 1.0*mV*ms*exp(0.2*v/mV)) + 0.01*mV**2*ms**2*v/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) + 0.0001392218934806*mV**2*ms*exp(-11/20)*exp(-0.2125*v/mV) - 0.00834331749008152*mV**2*ms*exp(-11/20)*exp(-0.1125*v/mV) + 0.125*mV**2*ms*exp(-11/20)*exp(-v/(80*mV))) + 0.034*mV*v/(-0.0226938235730217*mV**3*ms**2/(1.0*mV*ms*exp(0.1*v/mV) - 0.0333732699603261*mV*ms) + 0.000378683550267233*mV**3*ms**2/(-0.0333732699603261*mV*ms*exp(0.1*v/mV) + 1.0*mV*ms*exp(0.2*v/mV)) + 0.34*mV**3*ms**2/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) - 0.000667465399206522*mV**2*ms**2*v/(1.0*mV*ms*exp(0.1*v/mV) - 0.0333732699603261*mV*ms) + 1.1137751478448e-5*mV**2*ms**2*v/(-0.0333732699603261*mV*ms*exp(0.1*v/mV) + 1.0*mV*ms*exp(0.2*v/mV)) + 0.01*mV**2*ms**2*v/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) + 0.0001392218934806*mV**2*ms*exp(-11/20)*exp(-0.2125*v/mV) - 0.00834331749008152*mV**2*ms*exp(-11/20)*exp(-0.1125*v/mV) + 0.125*mV**2*ms*exp(-11/20)*exp(-v/(80*mV))) + 0.2125*mV/(-0.0113469117865109*mV**2*ms**2*exp(11/20)*exp(v/(80*mV))/(1.0*mV*ms*exp(0.1*v/mV) - 0.0333732699603261*mV*ms) + 0.34*mV**2*ms**2*exp(11/20)*exp(v/(80*mV))/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) - 0.000333732699603261*mV*ms**2*v*exp(11/20)*exp(v/(80*mV))/(1.0*mV*ms*exp(0.1*v/mV) - 0.0333732699603261*mV*ms) + 0.01*mV*ms**2*v*exp(11/20)*exp(v/(80*mV))/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) + 0.125*mV*ms - 0.00417165874504076*mV*ms*exp(-0.1*v/mV)) + 0.0005*v**2/(-0.0226938235730217*mV**3*ms**2/(1.0*mV*ms*exp(0.1*v/mV) - 0.0333732699603261*mV*ms) + 0.000378683550267233*mV**3*ms**2/(-0.0333732699603261*mV*ms*exp(0.1*v/mV) + 1.0*mV*ms*exp(0.2*v/mV)) + 0.34*mV**3*ms**2/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) - 0.000667465399206522*mV**2*ms**2*v/(1.0*mV*ms*exp(0.1*v/mV) - 0.0333732699603261*mV*ms) + 1.1137751478448e-5*mV**2*ms**2*v/(-0.0333732699603261*mV*ms*exp(0.1*v/mV) + 1.0*mV*ms*exp(0.2*v/mV)) + 0.01*mV**2*ms**2*v/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) + 0.0001392218934806*mV**2*ms*exp(-11/20)*exp(-0.2125*v/mV) - 0.00834331749008152*mV**2*ms*exp(-11/20)*exp(-0.1125*v/mV) + 0.125*mV**2*ms*exp(-11/20)*exp(-v/(80*mV))) + 0.00625*v/(-0.0113469117865109*mV**2*ms**2*exp(11/20)*exp(v/(80*mV))/(1.0*mV*ms*exp(0.1*v/mV) - 0.0333732699603261*mV*ms) + 0.34*mV**2*ms**2*exp(11/20)*exp(v/(80*mV))/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) - 0.000333732699603261*mV*ms**2*v*exp(11/20)*exp(v/(80*mV))/(1.0*mV*ms*exp(0.1*v/mV) - 0.0333732699603261*mV*ms) + 0.01*mV*ms**2*v*exp(11/20)*exp(v/(80*mV))/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) + 0.125*mV*ms - 0.00417165874504076*mV*ms*exp(-0.1*v/mV)))/(-1.7*mV/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) - 0.05*v/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) - 0.625*exp(-11/20)/(ms*exp(v/mV)**(1/80))) _n = -_BA_n + (_BA_n + n)*exp(dt*(-1.7*mV/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) - 0.05*v/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) - 0.625*exp(-11/20)/(ms*exp(v/mV)**(1/80)))) _BA_v = (-80*cm**2*gi*mV/(size*ufarad) + cm**2*r*inputs_stim(t)/(size*ufarad) + 1.925*h*m**3*mV*siemens/ufarad - 0.81*mV*n**4*siemens/ufarad - 0.0065*mV*siemens/ufarad + noise)/(-cm**2*ge/(size*ufarad) - cm**2*ge_ext/(size*ufarad) - cm**2*ge_hipp/(size*ufarad) - cm**2*gi/(size*ufarad) - 0.035*h*m**3*siemens/ufarad - 0.009*n**4*siemens/ufarad - 0.0001*siemens/ufarad) _v = -_BA_v + (_BA_v + v)*exp(dt*(-cm**2*ge/(size*ufarad) - cm**2*ge_ext/(size*ufarad) - cm**2*ge_hipp/(size*ufarad) - cm**2*gi/(size*ufarad) - 0.035*h*m**3*siemens/ufarad - 0.009*n**4*siemens/ufarad - 0.0001*siemens/ufarad)) ge = _ge ge_ext = _ge_ext ge_hipp = _ge_hipp gi = _gi h = _h he = _he he_ext = _he_ext he_hipp = _he_hipp hi = _hi m = _m n = _n v = _v 2021-11-05 15:15:11,976 DIAGNOSTIC brian2.devices.device: CA3_inh_stateupdater_codeobject abstract code: not_refractory = timestep(t - lastspike, dt) >= timestep(0.003000, dt) _BA_ge = -1.0*he _ge = -_BA_ge + (_BA_ge + ge)*exp(-3.33333333333333*dt/ms) _BA_ge_ext = -1.0*he_ext _ge_ext = -_BA_ge_ext + (_BA_ge_ext + ge_ext)*exp(-3.33333333333333*dt/ms) _BA_ge_hipp = -1.0*he_hipp _ge_hipp = -_BA_ge_hipp + (_BA_ge_hipp + ge_hipp)*exp(-3.33333333333333*dt/ms) _BA_gi = -1.0*hi _gi = -_BA_gi + (_BA_gi + gi)*exp(-1.0*dt/ms) _BA_h = (0.35/(0.060810062625218*ms**2*exp(29/10)/(1.0*ms*exp(0.05*v/mV) + 0.060810062625218*ms*exp(-0.05*v/mV)) + 1.0*ms**2*exp(29/10)*exp(v/(20*mV))/(1.0*ms + 0.060810062625218*ms*exp(-0.1*v/mV)) + 0.07*ms + 0.00425670438376526*ms*exp(-0.1*v/mV)) + 0.0245/(1.0*ms**2*exp(29/5)*exp(v/(10*mV))/(1.0*ms + 0.060810062625218*ms*exp(-0.1*v/mV)) + 0.07*ms*exp(29/10)*exp(v/(20*mV))))/(-5.0/(1.0*ms + 0.060810062625218*ms*exp(-0.1*v/mV)) - 0.35*exp(-29/10)/(ms*exp(v/mV)**(1/20))) _h = -_BA_h + (_BA_h + h)*exp(dt*(-5.0/(1.0*ms + 0.060810062625218*ms*exp(-0.1*v/mV)) - 0.35*exp(-29/10)/(ms*exp(v/mV)**(1/20)))) _he = he*exp(-dt/(5*ms)) _he_ext = he_ext*exp(-dt/(5*ms)) _he_hipp = he_hipp*exp(-dt/(5*ms)) _hi = hi*exp(-dt/(10*ms)) _BA_m = (61.25*mV**2/(-7.0*mV**3*ms**2/(1.0*mV*ms*exp(7/2)*exp(v/(10*mV)) - mV*ms) + 3.5*mV**3*ms**2/(-mV*ms*exp(7/2)*exp(v/(10*mV)) + 1.0*mV*ms*exp(7)*exp(v/(5*mV))) + 3.5*mV**3*ms**2/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) - 0.2*mV**2*ms**2*v/(1.0*mV*ms*exp(7/2)*exp(v/(10*mV)) - mV*ms) + 0.1*mV**2*ms**2*v/(-mV*ms*exp(7/2)*exp(v/(10*mV)) + 1.0*mV*ms*exp(7)*exp(v/(5*mV))) + 0.1*mV**2*ms**2*v/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) + 4.0*mV**2*ms*exp(-10/3)*exp(-v/(18*mV)) - 8.0*mV**2*ms*exp(-41/6)*exp(-7*v/(45*mV)) + 4*mV**2*ms*exp(-31/3)*exp(-23*v/(90*mV))) + 3.5*mV*v/(-7.0*mV**3*ms**2/(1.0*mV*ms*exp(7/2)*exp(v/(10*mV)) - mV*ms) + 3.5*mV**3*ms**2/(-mV*ms*exp(7/2)*exp(v/(10*mV)) + 1.0*mV*ms*exp(7)*exp(v/(5*mV))) + 3.5*mV**3*ms**2/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) - 0.2*mV**2*ms**2*v/(1.0*mV*ms*exp(7/2)*exp(v/(10*mV)) - mV*ms) + 0.1*mV**2*ms**2*v/(-mV*ms*exp(7/2)*exp(v/(10*mV)) + 1.0*mV*ms*exp(7)*exp(v/(5*mV))) + 0.1*mV**2*ms**2*v/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) + 4.0*mV**2*ms*exp(-10/3)*exp(-v/(18*mV)) - 8.0*mV**2*ms*exp(-41/6)*exp(-7*v/(45*mV)) + 4*mV**2*ms*exp(-31/3)*exp(-23*v/(90*mV))) + 70.0*mV/(-3.5*mV**2*ms**2*exp(10/3)*exp(v/(18*mV))/(1.0*mV*ms*exp(7/2)*exp(v/(10*mV)) - mV*ms) + 3.5*mV**2*ms**2*exp(10/3)*exp(v/(18*mV))/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) - 0.1*mV*ms**2*v*exp(10/3)*exp(v/(18*mV))/(1.0*mV*ms*exp(7/2)*exp(v/(10*mV)) - mV*ms) + 0.1*mV*ms**2*v*exp(10/3)*exp(v/(18*mV))/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) + 4.0*mV*ms - 4*mV*ms*exp(-7/2)*exp(-v/(10*mV))) + 0.05*v**2/(-7.0*mV**3*ms**2/(1.0*mV*ms*exp(7/2)*exp(v/(10*mV)) - mV*ms) + 3.5*mV**3*ms**2/(-mV*ms*exp(7/2)*exp(v/(10*mV)) + 1.0*mV*ms*exp(7)*exp(v/(5*mV))) + 3.5*mV**3*ms**2/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) - 0.2*mV**2*ms**2*v/(1.0*mV*ms*exp(7/2)*exp(v/(10*mV)) - mV*ms) + 0.1*mV**2*ms**2*v/(-mV*ms*exp(7/2)*exp(v/(10*mV)) + 1.0*mV*ms*exp(7)*exp(v/(5*mV))) + 0.1*mV**2*ms**2*v/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) + 4.0*mV**2*ms*exp(-10/3)*exp(-v/(18*mV)) - 8.0*mV**2*ms*exp(-41/6)*exp(-7*v/(45*mV)) + 4*mV**2*ms*exp(-31/3)*exp(-23*v/(90*mV))) + 2.0*v/(-3.5*mV**2*ms**2*exp(10/3)*exp(v/(18*mV))/(1.0*mV*ms*exp(7/2)*exp(v/(10*mV)) - mV*ms) + 3.5*mV**2*ms**2*exp(10/3)*exp(v/(18*mV))/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) - 0.1*mV*ms**2*v*exp(10/3)*exp(v/(18*mV))/(1.0*mV*ms*exp(7/2)*exp(v/(10*mV)) - mV*ms) + 0.1*mV*ms**2*v*exp(10/3)*exp(v/(18*mV))/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) + 4.0*mV*ms - 4*mV*ms*exp(-7/2)*exp(-v/(10*mV))))/(-17.5*mV/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) - 0.5*v/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) - 20.0*exp(-10/3)/(ms*exp(v/mV)**(1/18))) _m = -_BA_m + (_BA_m + m)*exp(dt*(-17.5*mV/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) - 0.5*v/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) - 20.0*exp(-10/3)/(ms*exp(v/mV)**(1/18)))) _BA_n = (0.578*mV**2/(-0.0226938235730217*mV**3*ms**2/(1.0*mV*ms*exp(0.1*v/mV) - 0.0333732699603261*mV*ms) + 0.000378683550267233*mV**3*ms**2/(-0.0333732699603261*mV*ms*exp(0.1*v/mV) + 1.0*mV*ms*exp(0.2*v/mV)) + 0.34*mV**3*ms**2/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) - 0.000667465399206522*mV**2*ms**2*v/(1.0*mV*ms*exp(0.1*v/mV) - 0.0333732699603261*mV*ms) + 1.1137751478448e-5*mV**2*ms**2*v/(-0.0333732699603261*mV*ms*exp(0.1*v/mV) + 1.0*mV*ms*exp(0.2*v/mV)) + 0.01*mV**2*ms**2*v/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) + 0.0001392218934806*mV**2*ms*exp(-11/20)*exp(-0.2125*v/mV) - 0.00834331749008152*mV**2*ms*exp(-11/20)*exp(-0.1125*v/mV) + 0.125*mV**2*ms*exp(-11/20)*exp(-v/(80*mV))) + 0.034*mV*v/(-0.0226938235730217*mV**3*ms**2/(1.0*mV*ms*exp(0.1*v/mV) - 0.0333732699603261*mV*ms) + 0.000378683550267233*mV**3*ms**2/(-0.0333732699603261*mV*ms*exp(0.1*v/mV) + 1.0*mV*ms*exp(0.2*v/mV)) + 0.34*mV**3*ms**2/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) - 0.000667465399206522*mV**2*ms**2*v/(1.0*mV*ms*exp(0.1*v/mV) - 0.0333732699603261*mV*ms) + 1.1137751478448e-5*mV**2*ms**2*v/(-0.0333732699603261*mV*ms*exp(0.1*v/mV) + 1.0*mV*ms*exp(0.2*v/mV)) + 0.01*mV**2*ms**2*v/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) + 0.0001392218934806*mV**2*ms*exp(-11/20)*exp(-0.2125*v/mV) - 0.00834331749008152*mV**2*ms*exp(-11/20)*exp(-0.1125*v/mV) + 0.125*mV**2*ms*exp(-11/20)*exp(-v/(80*mV))) + 0.2125*mV/(-0.0113469117865109*mV**2*ms**2*exp(11/20)*exp(v/(80*mV))/(1.0*mV*ms*exp(0.1*v/mV) - 0.0333732699603261*mV*ms) + 0.34*mV**2*ms**2*exp(11/20)*exp(v/(80*mV))/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) - 0.000333732699603261*mV*ms**2*v*exp(11/20)*exp(v/(80*mV))/(1.0*mV*ms*exp(0.1*v/mV) - 0.0333732699603261*mV*ms) + 0.01*mV*ms**2*v*exp(11/20)*exp(v/(80*mV))/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) + 0.125*mV*ms - 0.00417165874504076*mV*ms*exp(-0.1*v/mV)) + 0.0005*v**2/(-0.0226938235730217*mV**3*ms**2/(1.0*mV*ms*exp(0.1*v/mV) - 0.0333732699603261*mV*ms) + 0.000378683550267233*mV**3*ms**2/(-0.0333732699603261*mV*ms*exp(0.1*v/mV) + 1.0*mV*ms*exp(0.2*v/mV)) + 0.34*mV**3*ms**2/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) - 0.000667465399206522*mV**2*ms**2*v/(1.0*mV*ms*exp(0.1*v/mV) - 0.0333732699603261*mV*ms) + 1.1137751478448e-5*mV**2*ms**2*v/(-0.0333732699603261*mV*ms*exp(0.1*v/mV) + 1.0*mV*ms*exp(0.2*v/mV)) + 0.01*mV**2*ms**2*v/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) + 0.0001392218934806*mV**2*ms*exp(-11/20)*exp(-0.2125*v/mV) - 0.00834331749008152*mV**2*ms*exp(-11/20)*exp(-0.1125*v/mV) + 0.125*mV**2*ms*exp(-11/20)*exp(-v/(80*mV))) + 0.00625*v/(-0.0113469117865109*mV**2*ms**2*exp(11/20)*exp(v/(80*mV))/(1.0*mV*ms*exp(0.1*v/mV) - 0.0333732699603261*mV*ms) + 0.34*mV**2*ms**2*exp(11/20)*exp(v/(80*mV))/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) - 0.000333732699603261*mV*ms**2*v*exp(11/20)*exp(v/(80*mV))/(1.0*mV*ms*exp(0.1*v/mV) - 0.0333732699603261*mV*ms) + 0.01*mV*ms**2*v*exp(11/20)*exp(v/(80*mV))/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) + 0.125*mV*ms - 0.00417165874504076*mV*ms*exp(-0.1*v/mV)))/(-1.7*mV/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) - 0.05*v/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) - 0.625*exp(-11/20)/(ms*exp(v/mV)**(1/80))) _n = -_BA_n + (_BA_n + n)*exp(dt*(-1.7*mV/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) - 0.05*v/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) - 0.625*exp(-11/20)/(ms*exp(v/mV)**(1/80)))) _BA_v = (-80*cm**2*gi*mV/(size*ufarad) + cm**2*r*inputs_stim(t)/(size*ufarad) + 1.925*h*m**3*mV*siemens/ufarad - 0.81*mV*n**4*siemens/ufarad - 0.0065*mV*siemens/ufarad + noise)/(-cm**2*ge/(size*ufarad) - cm**2*ge_ext/(size*ufarad) - cm**2*ge_hipp/(size*ufarad) - cm**2*gi/(size*ufarad) - 0.035*h*m**3*siemens/ufarad - 0.009*n**4*siemens/ufarad - 0.0001*siemens/ufarad) _v = -_BA_v + (_BA_v + v)*exp(dt*(-cm**2*ge/(size*ufarad) - cm**2*ge_ext/(size*ufarad) - cm**2*ge_hipp/(size*ufarad) - cm**2*gi/(size*ufarad) - 0.035*h*m**3*siemens/ufarad - 0.009*n**4*siemens/ufarad - 0.0001*siemens/ufarad)) ge = _ge ge_ext = _ge_ext ge_hipp = _ge_hipp gi = _gi h = _h he = _he he_ext = _he_ext he_hipp = _he_hipp hi = _hi m = _m n = _n v = _v 2021-11-05 15:15:12,242 DIAGNOSTIC brian2.devices.device: CA3_inh_stateupdater_codeobject snippet (scalar): t = _array_defaultclock_t[0] dt = _array_defaultclock_dt[0] _lio_1 = _timestep(0.003, dt) _lio_2 = exp(((- 3.33333333333333) * dt) / ms) _lio_3 = exp(((- 1.0) * dt) / ms) _lio_4 = 0.07 * ms _lio_5 = 0.060810062625218 * ((ms ** 2) * 18.17414536944306) _lio_6 = 0.05 / mV _lio_7 = 0.060810062625218 * ms _lio_8 = (- 0.05) / mV _lio_9 = (ms ** 2) * 18.17414536944306 _lio_10 = (- 0.1) / mV _lio_11 = 0.00425670438376526 * ms _lio_12 = (ms ** 2) * 330.2995599096486 _lio_13 = 0.1 / mV _lio_14 = 0.07 * (ms * 18.17414536944306) _lio_15 = 0.019258127019742523 / ms _lio_16 = 1.0 / mV _lio_17 = exp((0.2 * (- dt)) / ms) _lio_18 = exp((0.1 * (- dt)) / ms) _lio_19 = 61.25 * (mV ** 2) _lio_20 = ((- 7.0) * (mV ** 3)) * (ms ** 2) _lio_21 = 0.0 - (mV * ms) _lio_22 = (mV * ms) * 33.11545195869231 _lio_23 = 3.5 * ((mV ** 3) * (ms ** 2)) _lio_24 = ((- mV) * ms) * 33.11545195869231 _lio_25 = (mV * ms) * 1096.6331584284585 _lio_26 = 0.2 / mV _lio_27 = mV * ms _lio_28 = (mV * ms) * 0.0301973834223185 _lio_29 = 0.1 * ((mV ** 2) * (ms ** 2)) _lio_30 = 4.0 * (((mV ** 2) * ms) * 0.03567399334725241) _lio_31 = 0.05555555555555555 / mV _lio_32 = 4.0 * (((mV ** 2) * ms) * 3.253047117267129e-05) _lio_33 = (- 0.2555555555555556) / mV _lio_34 = 0.2 * ((mV ** 2) * (ms ** 2)) _lio_35 = 8.0 * (((mV ** 2) * ms) * 0.0010772612553122203) _lio_36 = (- 0.15555555555555556) / mV _lio_37 = 3.5 * mV _lio_38 = 70.0 * mV _lio_39 = 4.0 * (mV * ms) _lio_40 = (((- 3.5) * (mV ** 2)) * (ms ** 2)) * 28.03162489452614 _lio_41 = 3.5 * (((mV ** 2) * (ms ** 2)) * 28.03162489452614) _lio_42 = 0.1 * ((mV * (ms ** 2)) * 28.03162489452614) _lio_43 = 4.0 * ((mV * ms) * 0.0301973834223185) _lio_44 = (- 17.5) * mV _lio_45 = 0.7134798669450482 / ms _lio_46 = 0.578 * (mV ** 2) _lio_47 = ((- 0.0226938235730217) * (mV ** 3)) * (ms ** 2) _lio_48 = 0.0 - (0.0333732699603261 * (mV * ms)) _lio_49 = 0.000378683550267233 * ((mV ** 3) * (ms ** 2)) _lio_50 = ((- 0.0333732699603261) * mV) * ms _lio_51 = 0.34 * ((mV ** 3) * (ms ** 2)) _lio_52 = 0.0333732699603261 * (mV * ms) _lio_53 = 1.1137751478448e-05 * ((mV ** 2) * (ms ** 2)) _lio_54 = 0.01 * ((mV ** 2) * (ms ** 2)) _lio_55 = 0.0001392218934806 * (((mV ** 2) * ms) * 0.5769498103804866) _lio_56 = (- 0.2125) / mV _lio_57 = 0.125 * (((mV ** 2) * ms) * 0.5769498103804866) _lio_58 = 0.0125 / mV _lio_59 = 0.000667465399206522 * ((mV ** 2) * (ms ** 2)) _lio_60 = 0.00834331749008152 * (((mV ** 2) * ms) * 0.5769498103804866) _lio_61 = (- 0.1125) / mV _lio_62 = 0.034 * mV _lio_63 = 0.2125 * mV _lio_64 = 0.125 * (mV * ms) _lio_65 = (((- 0.0113469117865109) * (mV ** 2)) * (ms ** 2)) * 1.7332530178673953 _lio_66 = 0.34 * (((mV ** 2) * (ms ** 2)) * 1.7332530178673953) _lio_67 = 0.01 * ((mV * (ms ** 2)) * 1.7332530178673953) _lio_68 = 0.000333732699603261 * ((mV * (ms ** 2)) * 1.7332530178673953) _lio_69 = 0.00417165874504076 * (mV * ms) _lio_70 = (- 1.7) * mV _lio_71 = 0.36059363148780416 / ms _lio_72 = 0.0 - ((0.0065 * (mV * siemens)) / ufarad) _lio_73 = (((- 80.0) * (cm ** 2)) * mV) / ufarad _lio_74 = ((cm ** 2) * _timedarray(t)) / ufarad _lio_75 = (1.925 * (mV * siemens)) / ufarad _lio_76 = (0.81 * (mV * siemens)) / ufarad _lio_77 = 0.0 - ((0.0001 * siemens) / ufarad) _lio_78 = (- (cm ** 2)) / ufarad _lio_79 = (cm ** 2) / ufarad _lio_80 = (0.035 * siemens) / ufarad _lio_81 = (0.009 * siemens) / ufarad 2021-11-05 15:15:12,242 DIAGNOSTIC brian2.devices.device: CA3_inh_stateupdater_codeobject snippet (vector): hi = _array_CA3_inh_hi[_idx] lastspike = _array_CA3_inh_lastspike[_idx] gi = _array_CA3_inh_gi[_idx] ge = _array_CA3_inh_ge[_idx] noise = _array_CA3_inh_noise[_idx] v = _array_CA3_inh_v[_idx] h = _array_CA3_inh_h[_idx] he_hipp = _array_CA3_inh_he_hipp[_idx] n = _array_CA3_inh_n[_idx] r = _array_CA3_inh_r[_idx] size = _array_CA3_inh_size[_idx] he = _array_CA3_inh_he[_idx] ge_hipp = _array_CA3_inh_ge_hipp[_idx] m = _array_CA3_inh_m[_idx] ge_ext = _array_CA3_inh_ge_ext[_idx] he_ext = _array_CA3_inh_he_ext[_idx] not_refractory = _timestep(t - lastspike, dt) >= _lio_1 _BA_ge = (- 1.0) * he _ge = (- _BA_ge) + (_lio_2 * (_BA_ge + ge)) _BA_ge_ext = (- 1.0) * he_ext _ge_ext = (- _BA_ge_ext) + (_lio_2 * (_BA_ge_ext + ge_ext)) _BA_ge_hipp = (- 1.0) * he_hipp _ge_hipp = (- _BA_ge_hipp) + (_lio_2 * (_BA_ge_hipp + ge_hipp)) _BA_gi = (- 1.0) * hi _gi = (- _BA_gi) + (_lio_3 * (_BA_gi + gi)) _BA_h = ((0.35 / (_lio_4 + (((_lio_5 / ((ms * exp(_lio_6 * v)) + (_lio_7 * exp(_lio_8 * v)))) + ((_lio_9 * exp(_lio_6 * v)) / (ms + (_lio_7 * exp(_lio_10 * v))))) + (_lio_11 * exp(_lio_10 * v))))) + (0.0245 / (((_lio_12 * exp(_lio_13 * v)) / (ms + (_lio_7 * exp(_lio_10 * v)))) + (_lio_14 * exp(_lio_6 * v))))) / (((- 5.0) / (ms + (_lio_7 * exp(_lio_10 * v)))) - (_lio_15 / (exp(_lio_16 * v) ** 0.05))) _h = (- _BA_h) + ((_BA_h + h) * exp(dt * (((- 5.0) / (ms + (_lio_7 * exp(_lio_10 * v)))) - (_lio_15 / (exp(_lio_16 * v) ** 0.05))))) _he = _lio_17 * he _he_ext = _lio_17 * he_ext _he_hipp = _lio_17 * he_hipp _hi = _lio_18 * hi _BA_m = (((((_lio_19 / ((((((((_lio_20 / (_lio_21 + (_lio_22 * exp(_lio_13 * v)))) + (_lio_23 / ((_lio_24 * exp(_lio_13 * v)) + (_lio_25 * exp(_lio_26 * v))))) + (_lio_23 / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v)))))) + ((_lio_29 * v) / ((_lio_24 * exp(_lio_13 * v)) + (_lio_25 * exp(_lio_26 * v))))) + ((_lio_29 * v) / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v)))))) + (_lio_30 * exp(_lio_31 * (- v)))) + (_lio_32 * exp(_lio_33 * v))) - (((_lio_34 * v) / (_lio_21 + (_lio_22 * exp(_lio_13 * v)))) + (_lio_35 * exp(_lio_36 * v))))) + ((_lio_37 * v) / ((((((((_lio_20 / (_lio_21 + (_lio_22 * exp(_lio_13 * v)))) + (_lio_23 / ((_lio_24 * exp(_lio_13 * v)) + (_lio_25 * exp(_lio_26 * v))))) + (_lio_23 / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v)))))) + ((_lio_29 * v) / ((_lio_24 * exp(_lio_13 * v)) + (_lio_25 * exp(_lio_26 * v))))) + ((_lio_29 * v) / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v)))))) + (_lio_30 * exp(_lio_31 * (- v)))) + (_lio_32 * exp(_lio_33 * v))) - (((_lio_34 * v) / (_lio_21 + (_lio_22 * exp(_lio_13 * v)))) + (_lio_35 * exp(_lio_36 * v)))))) + (_lio_38 / ((_lio_39 + ((((_lio_40 * exp(_lio_31 * v)) / (_lio_21 + (_lio_22 * exp(_lio_13 * v)))) + ((_lio_41 * exp(_lio_31 * v)) / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v)))))) + ((_lio_42 * (v * exp(_lio_31 * v))) / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v))))))) - (((_lio_42 * (v * exp(_lio_31 * v))) / (_lio_21 + (_lio_22 * exp(_lio_13 * v)))) + (_lio_43 * exp(_lio_13 * (- v))))))) + ((0.05 * (v ** 2)) / ((((((((_lio_20 / (_lio_21 + (_lio_22 * exp(_lio_13 * v)))) + (_lio_23 / ((_lio_24 * exp(_lio_13 * v)) + (_lio_25 * exp(_lio_26 * v))))) + (_lio_23 / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v)))))) + ((_lio_29 * v) / ((_lio_24 * exp(_lio_13 * v)) + (_lio_25 * exp(_lio_26 * v))))) + ((_lio_29 * v) / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v)))))) + (_lio_30 * exp(_lio_31 * (- v)))) + (_lio_32 * exp(_lio_33 * v))) - (((_lio_34 * v) / (_lio_21 + (_lio_22 * exp(_lio_13 * v)))) + (_lio_35 * exp(_lio_36 * v)))))) + ((2.0 * v) / ((_lio_39 + ((((_lio_40 * exp(_lio_31 * v)) / (_lio_21 + (_lio_22 * exp(_lio_13 * v)))) + ((_lio_41 * exp(_lio_31 * v)) / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v)))))) + ((_lio_42 * (v * exp(_lio_31 * v))) / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v))))))) - (((_lio_42 * (v * exp(_lio_31 * v))) / (_lio_21 + (_lio_22 * exp(_lio_13 * v)))) + (_lio_43 * exp(_lio_13 * (- v))))))) / ((_lio_44 / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v))))) - (((0.5 * v) / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v))))) + (_lio_45 / (exp(_lio_16 * v) ** 0.05555555555555555)))) _m = (- _BA_m) + ((_BA_m + m) * exp(dt * ((_lio_44 / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v))))) - (((0.5 * v) / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v))))) + (_lio_45 / (exp(_lio_16 * v) ** 0.05555555555555555)))))) _BA_n = (((((_lio_46 / ((((((((_lio_47 / (_lio_48 + (_lio_27 * exp(_lio_13 * v)))) + (_lio_49 / ((_lio_50 * exp(_lio_13 * v)) + (_lio_27 * exp(_lio_26 * v))))) + (_lio_51 / (_lio_27 - (_lio_52 * exp(_lio_10 * v))))) + ((_lio_53 * v) / ((_lio_50 * exp(_lio_13 * v)) + (_lio_27 * exp(_lio_26 * v))))) + ((_lio_54 * v) / (_lio_27 - (_lio_52 * exp(_lio_10 * v))))) + (_lio_55 * exp(_lio_56 * v))) + (_lio_57 * exp(_lio_58 * (- v)))) - (((_lio_59 * v) / (_lio_48 + (_lio_27 * exp(_lio_13 * v)))) + (_lio_60 * exp(_lio_61 * v))))) + ((_lio_62 * v) / ((((((((_lio_47 / (_lio_48 + (_lio_27 * exp(_lio_13 * v)))) + (_lio_49 / ((_lio_50 * exp(_lio_13 * v)) + (_lio_27 * exp(_lio_26 * v))))) + (_lio_51 / (_lio_27 - (_lio_52 * exp(_lio_10 * v))))) + ((_lio_53 * v) / ((_lio_50 * exp(_lio_13 * v)) + (_lio_27 * exp(_lio_26 * v))))) + ((_lio_54 * v) / (_lio_27 - (_lio_52 * exp(_lio_10 * v))))) + (_lio_55 * exp(_lio_56 * v))) + (_lio_57 * exp(_lio_58 * (- v)))) - (((_lio_59 * v) / (_lio_48 + (_lio_27 * exp(_lio_13 * v)))) + (_lio_60 * exp(_lio_61 * v)))))) + (_lio_63 / ((_lio_64 + ((((_lio_65 * exp(_lio_58 * v)) / (_lio_48 + (_lio_27 * exp(_lio_13 * v)))) + ((_lio_66 * exp(_lio_58 * v)) / (_lio_27 - (_lio_52 * exp(_lio_10 * v))))) + ((_lio_67 * (v * exp(_lio_58 * v))) / (_lio_27 - (_lio_52 * exp(_lio_10 * v)))))) - (((_lio_68 * (v * exp(_lio_58 * v))) / (_lio_48 + (_lio_27 * exp(_lio_13 * v)))) + (_lio_69 * exp(_lio_10 * v)))))) + ((0.0005 * (v ** 2)) / ((((((((_lio_47 / (_lio_48 + (_lio_27 * exp(_lio_13 * v)))) + (_lio_49 / ((_lio_50 * exp(_lio_13 * v)) + (_lio_27 * exp(_lio_26 * v))))) + (_lio_51 / (_lio_27 - (_lio_52 * exp(_lio_10 * v))))) + ((_lio_53 * v) / ((_lio_50 * exp(_lio_13 * v)) + (_lio_27 * exp(_lio_26 * v))))) + ((_lio_54 * v) / (_lio_27 - (_lio_52 * exp(_lio_10 * v))))) + (_lio_55 * exp(_lio_56 * v))) + (_lio_57 * exp(_lio_58 * (- v)))) - (((_lio_59 * v) / (_lio_48 + (_lio_27 * exp(_lio_13 * v)))) + (_lio_60 * exp(_lio_61 * v)))))) + ((0.00625 * v) / ((_lio_64 + ((((_lio_65 * exp(_lio_58 * v)) / (_lio_48 + (_lio_27 * exp(_lio_13 * v)))) + ((_lio_66 * exp(_lio_58 * v)) / (_lio_27 - (_lio_52 * exp(_lio_10 * v))))) + ((_lio_67 * (v * exp(_lio_58 * v))) / (_lio_27 - (_lio_52 * exp(_lio_10 * v)))))) - (((_lio_68 * (v * exp(_lio_58 * v))) / (_lio_48 + (_lio_27 * exp(_lio_13 * v)))) + (_lio_69 * exp(_lio_10 * v)))))) / ((_lio_70 / (_lio_27 - (_lio_52 * exp(_lio_10 * v)))) - (((0.05 * v) / (_lio_27 - (_lio_52 * exp(_lio_10 * v)))) + (_lio_71 / (exp(_lio_16 * v) ** 0.0125)))) _n = (- _BA_n) + ((_BA_n + n) * exp(dt * ((_lio_70 / (_lio_27 - (_lio_52 * exp(_lio_10 * v)))) - (((0.05 * v) / (_lio_27 - (_lio_52 * exp(_lio_10 * v)))) + (_lio_71 / (exp(_lio_16 * v) ** 0.0125)))))) _BA_v = ((_lio_72 + (((((_lio_73 * gi) / size) + ((_lio_74 * r) / size)) + (_lio_75 * (h * (m ** 3)))) + noise)) - (_lio_76 * (n ** 4))) / ((_lio_77 + ((_lio_78 * ge) / size)) - ((((((_lio_79 * ge_ext) / size) + ((_lio_79 * ge_hipp) / size)) + ((_lio_79 * gi) / size)) + (_lio_80 * (h * (m ** 3)))) + (_lio_81 * (n ** 4)))) _v = (- _BA_v) + ((_BA_v + v) * exp(dt * ((_lio_77 + ((_lio_78 * ge) / size)) - ((((((_lio_79 * ge_ext) / size) + ((_lio_79 * ge_hipp) / size)) + ((_lio_79 * gi) / size)) + (_lio_80 * (h * (m ** 3)))) + (_lio_81 * (n ** 4)))))) ge = _ge ge_ext = _ge_ext ge_hipp = _ge_hipp gi = _gi h = _h he = _he he_ext = _he_ext he_hipp = _he_hipp hi = _hi m = _m n = _n v = _v _array_CA3_inh_hi[_idx] = hi _array_CA3_inh_ge[_idx] = ge _array_CA3_inh_gi[_idx] = gi _array_CA3_inh_v[_idx] = v _array_CA3_inh_h[_idx] = h _array_CA3_inh_he_hipp[_idx] = he_hipp _array_CA3_inh_n[_idx] = n _array_CA3_inh_ge_hipp[_idx] = ge_hipp _array_CA3_inh_m[_idx] = m _array_CA3_inh_he[_idx] = he _array_CA3_inh_ge_ext[_idx] = ge_ext _array_CA3_inh_he_ext[_idx] = he_ext _array_CA3_inh_not_refractory[_idx] = not_refractory 2021-11-05 15:15:12,242 DIAGNOSTIC brian2.devices.device: CA3_inh_stateupdater_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code cdef double *_namespace_timedarray_values cdef double _timedarray(const double t): global _namespace_timedarray_values cdef double epsilon = 0.001000000000000000 / 128 cdef int i = (int)((t/epsilon + 0.5)/128) if i < 0: i = 0 if i >= 2001: i = 2001 - 1 return _namespace_timedarray_values[i] cdef int64_t _timestep(double t, double dt): return ((t + 1e-3*dt)/dt) # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var_N = _namespace["_var_N"] cdef int64_t N = _namespace["N"] _var_cm = _namespace["_var_cm"] cdef double cm = _namespace["cm"] _var_dt = _namespace["_var_dt"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_dt = _namespace['_array_defaultclock_dt'] cdef double * _array_defaultclock_dt = _buf__array_defaultclock_dt.data cdef double dt = _namespace["dt"] _var_ge = _namespace["_var_ge"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_inh_ge = _namespace['_array_CA3_inh_ge'] cdef double * _array_CA3_inh_ge = _buf__array_CA3_inh_ge.data cdef size_t _num_array_CA3_inh_ge = len(_namespace['_array_CA3_inh_ge']) cdef double ge _var_ge_ext = _namespace["_var_ge_ext"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_inh_ge_ext = _namespace['_array_CA3_inh_ge_ext'] cdef double * _array_CA3_inh_ge_ext = _buf__array_CA3_inh_ge_ext.data cdef size_t _num_array_CA3_inh_ge_ext = len(_namespace['_array_CA3_inh_ge_ext']) cdef double ge_ext _var_ge_hipp = _namespace["_var_ge_hipp"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_inh_ge_hipp = _namespace['_array_CA3_inh_ge_hipp'] cdef double * _array_CA3_inh_ge_hipp = _buf__array_CA3_inh_ge_hipp.data cdef size_t _num_array_CA3_inh_ge_hipp = len(_namespace['_array_CA3_inh_ge_hipp']) cdef double ge_hipp _var_gi = _namespace["_var_gi"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_inh_gi = _namespace['_array_CA3_inh_gi'] cdef double * _array_CA3_inh_gi = _buf__array_CA3_inh_gi.data cdef size_t _num_array_CA3_inh_gi = len(_namespace['_array_CA3_inh_gi']) cdef double gi _var_h = _namespace["_var_h"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_inh_h = _namespace['_array_CA3_inh_h'] cdef double * _array_CA3_inh_h = _buf__array_CA3_inh_h.data cdef size_t _num_array_CA3_inh_h = len(_namespace['_array_CA3_inh_h']) cdef double h _var_he = _namespace["_var_he"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_inh_he = _namespace['_array_CA3_inh_he'] cdef double * _array_CA3_inh_he = _buf__array_CA3_inh_he.data cdef size_t _num_array_CA3_inh_he = len(_namespace['_array_CA3_inh_he']) cdef double he _var_he_ext = _namespace["_var_he_ext"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_inh_he_ext = _namespace['_array_CA3_inh_he_ext'] cdef double * _array_CA3_inh_he_ext = _buf__array_CA3_inh_he_ext.data cdef size_t _num_array_CA3_inh_he_ext = len(_namespace['_array_CA3_inh_he_ext']) cdef double he_ext _var_he_hipp = _namespace["_var_he_hipp"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_inh_he_hipp = _namespace['_array_CA3_inh_he_hipp'] cdef double * _array_CA3_inh_he_hipp = _buf__array_CA3_inh_he_hipp.data cdef size_t _num_array_CA3_inh_he_hipp = len(_namespace['_array_CA3_inh_he_hipp']) cdef double he_hipp _var_hi = _namespace["_var_hi"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_inh_hi = _namespace['_array_CA3_inh_hi'] cdef double * _array_CA3_inh_hi = _buf__array_CA3_inh_hi.data cdef size_t _num_array_CA3_inh_hi = len(_namespace['_array_CA3_inh_hi']) cdef double hi # namespace for function inputs_stim global _namespace_timedarray_values global _namespace_num_timedarray_values cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__timedarray_values = _namespace['_timedarray_values'] _namespace_timedarray_values = _buf__timedarray_values.data _namespace_num_timedarray_values = len(_namespace['_timedarray_values']) _var_lastspike = _namespace["_var_lastspike"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_inh_lastspike = _namespace['_array_CA3_inh_lastspike'] cdef double * _array_CA3_inh_lastspike = _buf__array_CA3_inh_lastspike.data cdef size_t _num_array_CA3_inh_lastspike = len(_namespace['_array_CA3_inh_lastspike']) cdef double lastspike _var_m = _namespace["_var_m"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_inh_m = _namespace['_array_CA3_inh_m'] cdef double * _array_CA3_inh_m = _buf__array_CA3_inh_m.data cdef size_t _num_array_CA3_inh_m = len(_namespace['_array_CA3_inh_m']) cdef double m _var_mV = _namespace["_var_mV"] cdef double mV = _namespace["mV"] _var_ms = _namespace["_var_ms"] cdef double ms = _namespace["ms"] _var_n = _namespace["_var_n"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_inh_n = _namespace['_array_CA3_inh_n'] cdef double * _array_CA3_inh_n = _buf__array_CA3_inh_n.data cdef size_t _num_array_CA3_inh_n = len(_namespace['_array_CA3_inh_n']) cdef double n _var_noise = _namespace["_var_noise"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_inh_noise = _namespace['_array_CA3_inh_noise'] cdef double * _array_CA3_inh_noise = _buf__array_CA3_inh_noise.data cdef size_t _num_array_CA3_inh_noise = len(_namespace['_array_CA3_inh_noise']) cdef double noise _var_not_refractory = _namespace["_var_not_refractory"] cdef _numpy.ndarray[char, ndim=1, mode='c', cast=True] _buf__array_CA3_inh_not_refractory = _namespace['_array_CA3_inh_not_refractory'] cdef bool * _array_CA3_inh_not_refractory = _buf__array_CA3_inh_not_refractory.data cdef size_t _num_array_CA3_inh_not_refractory = len(_namespace['_array_CA3_inh_not_refractory']) cdef bool not_refractory _var_r = _namespace["_var_r"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_inh_r = _namespace['_array_CA3_inh_r'] cdef double * _array_CA3_inh_r = _buf__array_CA3_inh_r.data cdef size_t _num_array_CA3_inh_r = len(_namespace['_array_CA3_inh_r']) cdef double r _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] _var_size = _namespace["_var_size"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_inh_size = _namespace['_array_CA3_inh_size'] cdef double * _array_CA3_inh_size = _buf__array_CA3_inh_size.data cdef size_t _num_array_CA3_inh_size = len(_namespace['_array_CA3_inh_size']) cdef double size _var_t = _namespace["_var_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double t _var_ufarad = _namespace["_var_ufarad"] cdef double ufarad = _namespace["ufarad"] _var_v = _namespace["_var_v"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_inh_v = _namespace['_array_CA3_inh_v'] cdef double * _array_CA3_inh_v = _buf__array_CA3_inh_v.data cdef size_t _num_array_CA3_inh_v = len(_namespace['_array_CA3_inh_v']) cdef double v cdef double _BA_ge cdef double _BA_ge_ext cdef double _BA_ge_hipp cdef double _BA_gi cdef double _BA_h cdef double _BA_m cdef double _BA_n cdef double _BA_v cdef double _ge cdef double _ge_ext cdef double _ge_hipp cdef double _gi cdef double _h cdef double _he cdef double _he_ext cdef double _he_hipp cdef double _hi cdef int64_t _lio_1 cdef double _lio_10 cdef double _lio_11 cdef double _lio_12 cdef double _lio_13 cdef double _lio_14 cdef double _lio_15 cdef double _lio_16 cdef double _lio_17 cdef double _lio_18 cdef double _lio_19 cdef double _lio_2 cdef double _lio_20 cdef double _lio_21 cdef double _lio_22 cdef double _lio_23 cdef double _lio_24 cdef double _lio_25 cdef double _lio_26 cdef double _lio_27 cdef double _lio_28 cdef double _lio_29 cdef double _lio_3 cdef double _lio_30 cdef double _lio_31 cdef double _lio_32 cdef double _lio_33 cdef double _lio_34 cdef double _lio_35 cdef double _lio_36 cdef double _lio_37 cdef double _lio_38 cdef double _lio_39 cdef double _lio_4 cdef double _lio_40 cdef double _lio_41 cdef double _lio_42 cdef double _lio_43 cdef double _lio_44 cdef double _lio_45 cdef double _lio_46 cdef double _lio_47 cdef double _lio_48 cdef double _lio_49 cdef double _lio_5 cdef double _lio_50 cdef double _lio_51 cdef double _lio_52 cdef double _lio_53 cdef double _lio_54 cdef double _lio_55 cdef double _lio_56 cdef double _lio_57 cdef double _lio_58 cdef double _lio_59 cdef double _lio_6 cdef double _lio_60 cdef double _lio_61 cdef double _lio_62 cdef double _lio_63 cdef double _lio_64 cdef double _lio_65 cdef double _lio_66 cdef double _lio_67 cdef double _lio_68 cdef double _lio_69 cdef double _lio_7 cdef double _lio_70 cdef double _lio_71 cdef double _lio_72 cdef double _lio_73 cdef double _lio_74 cdef double _lio_75 cdef double _lio_76 cdef double _lio_77 cdef double _lio_78 cdef double _lio_79 cdef double _lio_8 cdef double _lio_80 cdef double _lio_81 cdef double _lio_9 cdef double _m cdef double _n cdef double _v if '_owner' in _namespace: _owner = _namespace['_owner'] # scalar code _vectorisation_idx = 1 t = _array_defaultclock_t[0] dt = _array_defaultclock_dt[0] _lio_1 = _timestep(0.003, dt) _lio_2 = exp(((- 3.33333333333333) * dt) / ms) _lio_3 = exp(((- 1.0) * dt) / ms) _lio_4 = 0.07 * ms _lio_5 = 0.060810062625218 * ((ms ** 2) * 18.17414536944306) _lio_6 = 0.05 / mV _lio_7 = 0.060810062625218 * ms _lio_8 = (- 0.05) / mV _lio_9 = (ms ** 2) * 18.17414536944306 _lio_10 = (- 0.1) / mV _lio_11 = 0.00425670438376526 * ms _lio_12 = (ms ** 2) * 330.2995599096486 _lio_13 = 0.1 / mV _lio_14 = 0.07 * (ms * 18.17414536944306) _lio_15 = 0.019258127019742523 / ms _lio_16 = 1.0 / mV _lio_17 = exp((0.2 * (- dt)) / ms) _lio_18 = exp((0.1 * (- dt)) / ms) _lio_19 = 61.25 * (mV ** 2) _lio_20 = ((- 7.0) * (mV ** 3)) * (ms ** 2) _lio_21 = 0.0 - (mV * ms) _lio_22 = (mV * ms) * 33.11545195869231 _lio_23 = 3.5 * ((mV ** 3) * (ms ** 2)) _lio_24 = ((- mV) * ms) * 33.11545195869231 _lio_25 = (mV * ms) * 1096.6331584284585 _lio_26 = 0.2 / mV _lio_27 = mV * ms _lio_28 = (mV * ms) * 0.0301973834223185 _lio_29 = 0.1 * ((mV ** 2) * (ms ** 2)) _lio_30 = 4.0 * (((mV ** 2) * ms) * 0.03567399334725241) _lio_31 = 0.05555555555555555 / mV _lio_32 = 4.0 * (((mV ** 2) * ms) * 3.253047117267129e-05) _lio_33 = (- 0.2555555555555556) / mV _lio_34 = 0.2 * ((mV ** 2) * (ms ** 2)) _lio_35 = 8.0 * (((mV ** 2) * ms) * 0.0010772612553122203) _lio_36 = (- 0.15555555555555556) / mV _lio_37 = 3.5 * mV _lio_38 = 70.0 * mV _lio_39 = 4.0 * (mV * ms) _lio_40 = (((- 3.5) * (mV ** 2)) * (ms ** 2)) * 28.03162489452614 _lio_41 = 3.5 * (((mV ** 2) * (ms ** 2)) * 28.03162489452614) _lio_42 = 0.1 * ((mV * (ms ** 2)) * 28.03162489452614) _lio_43 = 4.0 * ((mV * ms) * 0.0301973834223185) _lio_44 = (- 17.5) * mV _lio_45 = 0.7134798669450482 / ms _lio_46 = 0.578 * (mV ** 2) _lio_47 = ((- 0.0226938235730217) * (mV ** 3)) * (ms ** 2) _lio_48 = 0.0 - (0.0333732699603261 * (mV * ms)) _lio_49 = 0.000378683550267233 * ((mV ** 3) * (ms ** 2)) _lio_50 = ((- 0.0333732699603261) * mV) * ms _lio_51 = 0.34 * ((mV ** 3) * (ms ** 2)) _lio_52 = 0.0333732699603261 * (mV * ms) _lio_53 = 1.1137751478448e-05 * ((mV ** 2) * (ms ** 2)) _lio_54 = 0.01 * ((mV ** 2) * (ms ** 2)) _lio_55 = 0.0001392218934806 * (((mV ** 2) * ms) * 0.5769498103804866) _lio_56 = (- 0.2125) / mV _lio_57 = 0.125 * (((mV ** 2) * ms) * 0.5769498103804866) _lio_58 = 0.0125 / mV _lio_59 = 0.000667465399206522 * ((mV ** 2) * (ms ** 2)) _lio_60 = 0.00834331749008152 * (((mV ** 2) * ms) * 0.5769498103804866) _lio_61 = (- 0.1125) / mV _lio_62 = 0.034 * mV _lio_63 = 0.2125 * mV _lio_64 = 0.125 * (mV * ms) _lio_65 = (((- 0.0113469117865109) * (mV ** 2)) * (ms ** 2)) * 1.7332530178673953 _lio_66 = 0.34 * (((mV ** 2) * (ms ** 2)) * 1.7332530178673953) _lio_67 = 0.01 * ((mV * (ms ** 2)) * 1.7332530178673953) _lio_68 = 0.000333732699603261 * ((mV * (ms ** 2)) * 1.7332530178673953) _lio_69 = 0.00417165874504076 * (mV * ms) _lio_70 = (- 1.7) * mV _lio_71 = 0.36059363148780416 / ms _lio_72 = 0.0 - ((0.0065 * (mV * siemens)) / ufarad) _lio_73 = (((- 80.0) * (cm ** 2)) * mV) / ufarad _lio_74 = ((cm ** 2) * _timedarray(t)) / ufarad _lio_75 = (1.925 * (mV * siemens)) / ufarad _lio_76 = (0.81 * (mV * siemens)) / ufarad _lio_77 = 0.0 - ((0.0001 * siemens) / ufarad) _lio_78 = (- (cm ** 2)) / ufarad _lio_79 = (cm ** 2) / ufarad _lio_80 = (0.035 * siemens) / ufarad _lio_81 = (0.009 * siemens) / ufarad # vector code for _idx in range(N): _vectorisation_idx = _idx hi = _array_CA3_inh_hi[_idx] lastspike = _array_CA3_inh_lastspike[_idx] gi = _array_CA3_inh_gi[_idx] ge = _array_CA3_inh_ge[_idx] noise = _array_CA3_inh_noise[_idx] v = _array_CA3_inh_v[_idx] h = _array_CA3_inh_h[_idx] he_hipp = _array_CA3_inh_he_hipp[_idx] n = _array_CA3_inh_n[_idx] r = _array_CA3_inh_r[_idx] size = _array_CA3_inh_size[_idx] he = _array_CA3_inh_he[_idx] ge_hipp = _array_CA3_inh_ge_hipp[_idx] m = _array_CA3_inh_m[_idx] ge_ext = _array_CA3_inh_ge_ext[_idx] he_ext = _array_CA3_inh_he_ext[_idx] not_refractory = _timestep(t - lastspike, dt) >= _lio_1 _BA_ge = (- 1.0) * he _ge = (- _BA_ge) + (_lio_2 * (_BA_ge + ge)) _BA_ge_ext = (- 1.0) * he_ext _ge_ext = (- _BA_ge_ext) + (_lio_2 * (_BA_ge_ext + ge_ext)) _BA_ge_hipp = (- 1.0) * he_hipp _ge_hipp = (- _BA_ge_hipp) + (_lio_2 * (_BA_ge_hipp + ge_hipp)) _BA_gi = (- 1.0) * hi _gi = (- _BA_gi) + (_lio_3 * (_BA_gi + gi)) _BA_h = ((0.35 / (_lio_4 + (((_lio_5 / ((ms * exp(_lio_6 * v)) + (_lio_7 * exp(_lio_8 * v)))) + ((_lio_9 * exp(_lio_6 * v)) / (ms + (_lio_7 * exp(_lio_10 * v))))) + (_lio_11 * exp(_lio_10 * v))))) + (0.0245 / (((_lio_12 * exp(_lio_13 * v)) / (ms + (_lio_7 * exp(_lio_10 * v)))) + (_lio_14 * exp(_lio_6 * v))))) / (((- 5.0) / (ms + (_lio_7 * exp(_lio_10 * v)))) - (_lio_15 / (exp(_lio_16 * v) ** 0.05))) _h = (- _BA_h) + ((_BA_h + h) * exp(dt * (((- 5.0) / (ms + (_lio_7 * exp(_lio_10 * v)))) - (_lio_15 / (exp(_lio_16 * v) ** 0.05))))) _he = _lio_17 * he _he_ext = _lio_17 * he_ext _he_hipp = _lio_17 * he_hipp _hi = _lio_18 * hi _BA_m = (((((_lio_19 / ((((((((_lio_20 / (_lio_21 + (_lio_22 * exp(_lio_13 * v)))) + (_lio_23 / ((_lio_24 * exp(_lio_13 * v)) + (_lio_25 * exp(_lio_26 * v))))) + (_lio_23 / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v)))))) + ((_lio_29 * v) / ((_lio_24 * exp(_lio_13 * v)) + (_lio_25 * exp(_lio_26 * v))))) + ((_lio_29 * v) / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v)))))) + (_lio_30 * exp(_lio_31 * (- v)))) + (_lio_32 * exp(_lio_33 * v))) - (((_lio_34 * v) / (_lio_21 + (_lio_22 * exp(_lio_13 * v)))) + (_lio_35 * exp(_lio_36 * v))))) + ((_lio_37 * v) / ((((((((_lio_20 / (_lio_21 + (_lio_22 * exp(_lio_13 * v)))) + (_lio_23 / ((_lio_24 * exp(_lio_13 * v)) + (_lio_25 * exp(_lio_26 * v))))) + (_lio_23 / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v)))))) + ((_lio_29 * v) / ((_lio_24 * exp(_lio_13 * v)) + (_lio_25 * exp(_lio_26 * v))))) + ((_lio_29 * v) / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v)))))) + (_lio_30 * exp(_lio_31 * (- v)))) + (_lio_32 * exp(_lio_33 * v))) - (((_lio_34 * v) / (_lio_21 + (_lio_22 * exp(_lio_13 * v)))) + (_lio_35 * exp(_lio_36 * v)))))) + (_lio_38 / ((_lio_39 + ((((_lio_40 * exp(_lio_31 * v)) / (_lio_21 + (_lio_22 * exp(_lio_13 * v)))) + ((_lio_41 * exp(_lio_31 * v)) / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v)))))) + ((_lio_42 * (v * exp(_lio_31 * v))) / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v))))))) - (((_lio_42 * (v * exp(_lio_31 * v))) / (_lio_21 + (_lio_22 * exp(_lio_13 * v)))) + (_lio_43 * exp(_lio_13 * (- v))))))) + ((0.05 * (v ** 2)) / ((((((((_lio_20 / (_lio_21 + (_lio_22 * exp(_lio_13 * v)))) + (_lio_23 / ((_lio_24 * exp(_lio_13 * v)) + (_lio_25 * exp(_lio_26 * v))))) + (_lio_23 / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v)))))) + ((_lio_29 * v) / ((_lio_24 * exp(_lio_13 * v)) + (_lio_25 * exp(_lio_26 * v))))) + ((_lio_29 * v) / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v)))))) + (_lio_30 * exp(_lio_31 * (- v)))) + (_lio_32 * exp(_lio_33 * v))) - (((_lio_34 * v) / (_lio_21 + (_lio_22 * exp(_lio_13 * v)))) + (_lio_35 * exp(_lio_36 * v)))))) + ((2.0 * v) / ((_lio_39 + ((((_lio_40 * exp(_lio_31 * v)) / (_lio_21 + (_lio_22 * exp(_lio_13 * v)))) + ((_lio_41 * exp(_lio_31 * v)) / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v)))))) + ((_lio_42 * (v * exp(_lio_31 * v))) / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v))))))) - (((_lio_42 * (v * exp(_lio_31 * v))) / (_lio_21 + (_lio_22 * exp(_lio_13 * v)))) + (_lio_43 * exp(_lio_13 * (- v))))))) / ((_lio_44 / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v))))) - (((0.5 * v) / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v))))) + (_lio_45 / (exp(_lio_16 * v) ** 0.05555555555555555)))) _m = (- _BA_m) + ((_BA_m + m) * exp(dt * ((_lio_44 / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v))))) - (((0.5 * v) / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v))))) + (_lio_45 / (exp(_lio_16 * v) ** 0.05555555555555555)))))) _BA_n = (((((_lio_46 / ((((((((_lio_47 / (_lio_48 + (_lio_27 * exp(_lio_13 * v)))) + (_lio_49 / ((_lio_50 * exp(_lio_13 * v)) + (_lio_27 * exp(_lio_26 * v))))) + (_lio_51 / (_lio_27 - (_lio_52 * exp(_lio_10 * v))))) + ((_lio_53 * v) / ((_lio_50 * exp(_lio_13 * v)) + (_lio_27 * exp(_lio_26 * v))))) + ((_lio_54 * v) / (_lio_27 - (_lio_52 * exp(_lio_10 * v))))) + (_lio_55 * exp(_lio_56 * v))) + (_lio_57 * exp(_lio_58 * (- v)))) - (((_lio_59 * v) / (_lio_48 + (_lio_27 * exp(_lio_13 * v)))) + (_lio_60 * exp(_lio_61 * v))))) + ((_lio_62 * v) / ((((((((_lio_47 / (_lio_48 + (_lio_27 * exp(_lio_13 * v)))) + (_lio_49 / ((_lio_50 * exp(_lio_13 * v)) + (_lio_27 * exp(_lio_26 * v))))) + (_lio_51 / (_lio_27 - (_lio_52 * exp(_lio_10 * v))))) + ((_lio_53 * v) / ((_lio_50 * exp(_lio_13 * v)) + (_lio_27 * exp(_lio_26 * v))))) + ((_lio_54 * v) / (_lio_27 - (_lio_52 * exp(_lio_10 * v))))) + (_lio_55 * exp(_lio_56 * v))) + (_lio_57 * exp(_lio_58 * (- v)))) - (((_lio_59 * v) / (_lio_48 + (_lio_27 * exp(_lio_13 * v)))) + (_lio_60 * exp(_lio_61 * v)))))) + (_lio_63 / ((_lio_64 + ((((_lio_65 * exp(_lio_58 * v)) / (_lio_48 + (_lio_27 * exp(_lio_13 * v)))) + ((_lio_66 * exp(_lio_58 * v)) / (_lio_27 - (_lio_52 * exp(_lio_10 * v))))) + ((_lio_67 * (v * exp(_lio_58 * v))) / (_lio_27 - (_lio_52 * exp(_lio_10 * v)))))) - (((_lio_68 * (v * exp(_lio_58 * v))) / (_lio_48 + (_lio_27 * exp(_lio_13 * v)))) + (_lio_69 * exp(_lio_10 * v)))))) + ((0.0005 * (v ** 2)) / ((((((((_lio_47 / (_lio_48 + (_lio_27 * exp(_lio_13 * v)))) + (_lio_49 / ((_lio_50 * exp(_lio_13 * v)) + (_lio_27 * exp(_lio_26 * v))))) + (_lio_51 / (_lio_27 - (_lio_52 * exp(_lio_10 * v))))) + ((_lio_53 * v) / ((_lio_50 * exp(_lio_13 * v)) + (_lio_27 * exp(_lio_26 * v))))) + ((_lio_54 * v) / (_lio_27 - (_lio_52 * exp(_lio_10 * v))))) + (_lio_55 * exp(_lio_56 * v))) + (_lio_57 * exp(_lio_58 * (- v)))) - (((_lio_59 * v) / (_lio_48 + (_lio_27 * exp(_lio_13 * v)))) + (_lio_60 * exp(_lio_61 * v)))))) + ((0.00625 * v) / ((_lio_64 + ((((_lio_65 * exp(_lio_58 * v)) / (_lio_48 + (_lio_27 * exp(_lio_13 * v)))) + ((_lio_66 * exp(_lio_58 * v)) / (_lio_27 - (_lio_52 * exp(_lio_10 * v))))) + ((_lio_67 * (v * exp(_lio_58 * v))) / (_lio_27 - (_lio_52 * exp(_lio_10 * v)))))) - (((_lio_68 * (v * exp(_lio_58 * v))) / (_lio_48 + (_lio_27 * exp(_lio_13 * v)))) + (_lio_69 * exp(_lio_10 * v)))))) / ((_lio_70 / (_lio_27 - (_lio_52 * exp(_lio_10 * v)))) - (((0.05 * v) / (_lio_27 - (_lio_52 * exp(_lio_10 * v)))) + (_lio_71 / (exp(_lio_16 * v) ** 0.0125)))) _n = (- _BA_n) + ((_BA_n + n) * exp(dt * ((_lio_70 / (_lio_27 - (_lio_52 * exp(_lio_10 * v)))) - (((0.05 * v) / (_lio_27 - (_lio_52 * exp(_lio_10 * v)))) + (_lio_71 / (exp(_lio_16 * v) ** 0.0125)))))) _BA_v = ((_lio_72 + (((((_lio_73 * gi) / size) + ((_lio_74 * r) / size)) + (_lio_75 * (h * (m ** 3)))) + noise)) - (_lio_76 * (n ** 4))) / ((_lio_77 + ((_lio_78 * ge) / size)) - ((((((_lio_79 * ge_ext) / size) + ((_lio_79 * ge_hipp) / size)) + ((_lio_79 * gi) / size)) + (_lio_80 * (h * (m ** 3)))) + (_lio_81 * (n ** 4)))) _v = (- _BA_v) + ((_BA_v + v) * exp(dt * ((_lio_77 + ((_lio_78 * ge) / size)) - ((((((_lio_79 * ge_ext) / size) + ((_lio_79 * ge_hipp) / size)) + ((_lio_79 * gi) / size)) + (_lio_80 * (h * (m ** 3)))) + (_lio_81 * (n ** 4)))))) ge = _ge ge_ext = _ge_ext ge_hipp = _ge_hipp gi = _gi h = _h he = _he he_ext = _he_ext he_hipp = _he_hipp hi = _hi m = _m n = _n v = _v _array_CA3_inh_hi[_idx] = hi _array_CA3_inh_ge[_idx] = ge _array_CA3_inh_gi[_idx] = gi _array_CA3_inh_v[_idx] = v _array_CA3_inh_h[_idx] = h _array_CA3_inh_he_hipp[_idx] = he_hipp _array_CA3_inh_n[_idx] = n _array_CA3_inh_ge_hipp[_idx] = ge_hipp _array_CA3_inh_m[_idx] = m _array_CA3_inh_he[_idx] = he _array_CA3_inh_ge_ext[_idx] = ge_ext _array_CA3_inh_he_ext[_idx] = he_ext _array_CA3_inh_not_refractory[_idx] = not_refractory before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef int64_t N = _namespace["N"] _var_cm = _namespace["_var_cm"] cdef double cm = _namespace["cm"] _var_dt = _namespace["_var_dt"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_dt = _namespace['_array_defaultclock_dt'] cdef double * _array_defaultclock_dt = _buf__array_defaultclock_dt.data cdef double dt = _namespace["dt"] _var_ge = _namespace["_var_ge"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_inh_ge = _namespace['_array_CA3_inh_ge'] cdef double * _array_CA3_inh_ge = _buf__array_CA3_inh_ge.data cdef size_t _num_array_CA3_inh_ge = len(_namespace['_array_CA3_inh_ge']) cdef double ge _var_ge_ext = _namespace["_var_ge_ext"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_inh_ge_ext = _namespace['_array_CA3_inh_ge_ext'] cdef double * _array_CA3_inh_ge_ext = _buf__array_CA3_inh_ge_ext.data cdef size_t _num_array_CA3_inh_ge_ext = len(_namespace['_array_CA3_inh_ge_ext']) cdef double ge_ext _var_ge_hipp = _namespace["_var_ge_hipp"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_inh_ge_hipp = _namespace['_array_CA3_inh_ge_hipp'] cdef double * _array_CA3_inh_ge_hipp = _buf__array_CA3_inh_ge_hipp.data cdef size_t _num_array_CA3_inh_ge_hipp = len(_namespace['_array_CA3_inh_ge_hipp']) cdef double ge_hipp _var_gi = _namespace["_var_gi"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_inh_gi = _namespace['_array_CA3_inh_gi'] cdef double * _array_CA3_inh_gi = _buf__array_CA3_inh_gi.data cdef size_t _num_array_CA3_inh_gi = len(_namespace['_array_CA3_inh_gi']) cdef double gi _var_h = _namespace["_var_h"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_inh_h = _namespace['_array_CA3_inh_h'] cdef double * _array_CA3_inh_h = _buf__array_CA3_inh_h.data cdef size_t _num_array_CA3_inh_h = len(_namespace['_array_CA3_inh_h']) cdef double h _var_he = _namespace["_var_he"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_inh_he = _namespace['_array_CA3_inh_he'] cdef double * _array_CA3_inh_he = _buf__array_CA3_inh_he.data cdef size_t _num_array_CA3_inh_he = len(_namespace['_array_CA3_inh_he']) cdef double he _var_he_ext = _namespace["_var_he_ext"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_inh_he_ext = _namespace['_array_CA3_inh_he_ext'] cdef double * _array_CA3_inh_he_ext = _buf__array_CA3_inh_he_ext.data cdef size_t _num_array_CA3_inh_he_ext = len(_namespace['_array_CA3_inh_he_ext']) cdef double he_ext _var_he_hipp = _namespace["_var_he_hipp"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_inh_he_hipp = _namespace['_array_CA3_inh_he_hipp'] cdef double * _array_CA3_inh_he_hipp = _buf__array_CA3_inh_he_hipp.data cdef size_t _num_array_CA3_inh_he_hipp = len(_namespace['_array_CA3_inh_he_hipp']) cdef double he_hipp _var_hi = _namespace["_var_hi"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_inh_hi = _namespace['_array_CA3_inh_hi'] cdef double * _array_CA3_inh_hi = _buf__array_CA3_inh_hi.data cdef size_t _num_array_CA3_inh_hi = len(_namespace['_array_CA3_inh_hi']) cdef double hi # namespace for function inputs_stim global _namespace_timedarray_values global _namespace_num_timedarray_values cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__timedarray_values = _namespace['_timedarray_values'] _namespace_timedarray_values = _buf__timedarray_values.data _namespace_num_timedarray_values = len(_namespace['_timedarray_values']) _var_lastspike = _namespace["_var_lastspike"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_inh_lastspike = _namespace['_array_CA3_inh_lastspike'] cdef double * _array_CA3_inh_lastspike = _buf__array_CA3_inh_lastspike.data cdef size_t _num_array_CA3_inh_lastspike = len(_namespace['_array_CA3_inh_lastspike']) cdef double lastspike _var_m = _namespace["_var_m"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_inh_m = _namespace['_array_CA3_inh_m'] cdef double * _array_CA3_inh_m = _buf__array_CA3_inh_m.data cdef size_t _num_array_CA3_inh_m = len(_namespace['_array_CA3_inh_m']) cdef double m _var_mV = _namespace["_var_mV"] cdef double mV = _namespace["mV"] _var_ms = _namespace["_var_ms"] cdef double ms = _namespace["ms"] _var_n = _namespace["_var_n"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_inh_n = _namespace['_array_CA3_inh_n'] cdef double * _array_CA3_inh_n = _buf__array_CA3_inh_n.data cdef size_t _num_array_CA3_inh_n = len(_namespace['_array_CA3_inh_n']) cdef double n _var_noise = _namespace["_var_noise"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_inh_noise = _namespace['_array_CA3_inh_noise'] cdef double * _array_CA3_inh_noise = _buf__array_CA3_inh_noise.data cdef size_t _num_array_CA3_inh_noise = len(_namespace['_array_CA3_inh_noise']) cdef double noise _var_not_refractory = _namespace["_var_not_refractory"] cdef _numpy.ndarray[char, ndim=1, mode='c', cast=True] _buf__array_CA3_inh_not_refractory = _namespace['_array_CA3_inh_not_refractory'] cdef bool * _array_CA3_inh_not_refractory = _buf__array_CA3_inh_not_refractory.data cdef size_t _num_array_CA3_inh_not_refractory = len(_namespace['_array_CA3_inh_not_refractory']) cdef bool not_refractory _var_r = _namespace["_var_r"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_inh_r = _namespace['_array_CA3_inh_r'] cdef double * _array_CA3_inh_r = _buf__array_CA3_inh_r.data cdef size_t _num_array_CA3_inh_r = len(_namespace['_array_CA3_inh_r']) cdef double r _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] _var_size = _namespace["_var_size"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_inh_size = _namespace['_array_CA3_inh_size'] cdef double * _array_CA3_inh_size = _buf__array_CA3_inh_size.data cdef size_t _num_array_CA3_inh_size = len(_namespace['_array_CA3_inh_size']) cdef double size _var_t = _namespace["_var_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double t _var_ufarad = _namespace["_var_ufarad"] cdef double ufarad = _namespace["ufarad"] _var_v = _namespace["_var_v"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_inh_v = _namespace['_array_CA3_inh_v'] cdef double * _array_CA3_inh_v = _buf__array_CA3_inh_v.data cdef size_t _num_array_CA3_inh_v = len(_namespace['_array_CA3_inh_v']) cdef double v cdef double _BA_ge cdef double _BA_ge_ext cdef double _BA_ge_hipp cdef double _BA_gi cdef double _BA_h cdef double _BA_m cdef double _BA_n cdef double _BA_v cdef double _ge cdef double _ge_ext cdef double _ge_hipp cdef double _gi cdef double _h cdef double _he cdef double _he_ext cdef double _he_hipp cdef double _hi cdef int64_t _lio_1 cdef double _lio_10 cdef double _lio_11 cdef double _lio_12 cdef double _lio_13 cdef double _lio_14 cdef double _lio_15 cdef double _lio_16 cdef double _lio_17 cdef double _lio_18 cdef double _lio_19 cdef double _lio_2 cdef double _lio_20 cdef double _lio_21 cdef double _lio_22 cdef double _lio_23 cdef double _lio_24 cdef double _lio_25 cdef double _lio_26 cdef double _lio_27 cdef double _lio_28 cdef double _lio_29 cdef double _lio_3 cdef double _lio_30 cdef double _lio_31 cdef double _lio_32 cdef double _lio_33 cdef double _lio_34 cdef double _lio_35 cdef double _lio_36 cdef double _lio_37 cdef double _lio_38 cdef double _lio_39 cdef double _lio_4 cdef double _lio_40 cdef double _lio_41 cdef double _lio_42 cdef double _lio_43 cdef double _lio_44 cdef double _lio_45 cdef double _lio_46 cdef double _lio_47 cdef double _lio_48 cdef double _lio_49 cdef double _lio_5 cdef double _lio_50 cdef double _lio_51 cdef double _lio_52 cdef double _lio_53 cdef double _lio_54 cdef double _lio_55 cdef double _lio_56 cdef double _lio_57 cdef double _lio_58 cdef double _lio_59 cdef double _lio_6 cdef double _lio_60 cdef double _lio_61 cdef double _lio_62 cdef double _lio_63 cdef double _lio_64 cdef double _lio_65 cdef double _lio_66 cdef double _lio_67 cdef double _lio_68 cdef double _lio_69 cdef double _lio_7 cdef double _lio_70 cdef double _lio_71 cdef double _lio_72 cdef double _lio_73 cdef double _lio_74 cdef double _lio_75 cdef double _lio_76 cdef double _lio_77 cdef double _lio_78 cdef double _lio_79 cdef double _lio_8 cdef double _lio_80 cdef double _lio_81 cdef double _lio_9 cdef double _m cdef double _n cdef double _v if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef int64_t N = _namespace["N"] _var_cm = _namespace["_var_cm"] cdef double cm = _namespace["cm"] _var_dt = _namespace["_var_dt"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_dt = _namespace['_array_defaultclock_dt'] cdef double * _array_defaultclock_dt = _buf__array_defaultclock_dt.data cdef double dt = _namespace["dt"] _var_ge = _namespace["_var_ge"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_inh_ge = _namespace['_array_CA3_inh_ge'] cdef double * _array_CA3_inh_ge = _buf__array_CA3_inh_ge.data cdef size_t _num_array_CA3_inh_ge = len(_namespace['_array_CA3_inh_ge']) cdef double ge _var_ge_ext = _namespace["_var_ge_ext"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_inh_ge_ext = _namespace['_array_CA3_inh_ge_ext'] cdef double * _array_CA3_inh_ge_ext = _buf__array_CA3_inh_ge_ext.data cdef size_t _num_array_CA3_inh_ge_ext = len(_namespace['_array_CA3_inh_ge_ext']) cdef double ge_ext _var_ge_hipp = _namespace["_var_ge_hipp"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_inh_ge_hipp = _namespace['_array_CA3_inh_ge_hipp'] cdef double * _array_CA3_inh_ge_hipp = _buf__array_CA3_inh_ge_hipp.data cdef size_t _num_array_CA3_inh_ge_hipp = len(_namespace['_array_CA3_inh_ge_hipp']) cdef double ge_hipp _var_gi = _namespace["_var_gi"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_inh_gi = _namespace['_array_CA3_inh_gi'] cdef double * _array_CA3_inh_gi = _buf__array_CA3_inh_gi.data cdef size_t _num_array_CA3_inh_gi = len(_namespace['_array_CA3_inh_gi']) cdef double gi _var_h = _namespace["_var_h"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_inh_h = _namespace['_array_CA3_inh_h'] cdef double * _array_CA3_inh_h = _buf__array_CA3_inh_h.data cdef size_t _num_array_CA3_inh_h = len(_namespace['_array_CA3_inh_h']) cdef double h _var_he = _namespace["_var_he"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_inh_he = _namespace['_array_CA3_inh_he'] cdef double * _array_CA3_inh_he = _buf__array_CA3_inh_he.data cdef size_t _num_array_CA3_inh_he = len(_namespace['_array_CA3_inh_he']) cdef double he _var_he_ext = _namespace["_var_he_ext"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_inh_he_ext = _namespace['_array_CA3_inh_he_ext'] cdef double * _array_CA3_inh_he_ext = _buf__array_CA3_inh_he_ext.data cdef size_t _num_array_CA3_inh_he_ext = len(_namespace['_array_CA3_inh_he_ext']) cdef double he_ext _var_he_hipp = _namespace["_var_he_hipp"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_inh_he_hipp = _namespace['_array_CA3_inh_he_hipp'] cdef double * _array_CA3_inh_he_hipp = _buf__array_CA3_inh_he_hipp.data cdef size_t _num_array_CA3_inh_he_hipp = len(_namespace['_array_CA3_inh_he_hipp']) cdef double he_hipp _var_hi = _namespace["_var_hi"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_inh_hi = _namespace['_array_CA3_inh_hi'] cdef double * _array_CA3_inh_hi = _buf__array_CA3_inh_hi.data cdef size_t _num_array_CA3_inh_hi = len(_namespace['_array_CA3_inh_hi']) cdef double hi # namespace for function inputs_stim global _namespace_timedarray_values global _namespace_num_timedarray_values cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__timedarray_values = _namespace['_timedarray_values'] _namespace_timedarray_values = _buf__timedarray_values.data _namespace_num_timedarray_values = len(_namespace['_timedarray_values']) _var_lastspike = _namespace["_var_lastspike"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_inh_lastspike = _namespace['_array_CA3_inh_lastspike'] cdef double * _array_CA3_inh_lastspike = _buf__array_CA3_inh_lastspike.data cdef size_t _num_array_CA3_inh_lastspike = len(_namespace['_array_CA3_inh_lastspike']) cdef double lastspike _var_m = _namespace["_var_m"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_inh_m = _namespace['_array_CA3_inh_m'] cdef double * _array_CA3_inh_m = _buf__array_CA3_inh_m.data cdef size_t _num_array_CA3_inh_m = len(_namespace['_array_CA3_inh_m']) cdef double m _var_mV = _namespace["_var_mV"] cdef double mV = _namespace["mV"] _var_ms = _namespace["_var_ms"] cdef double ms = _namespace["ms"] _var_n = _namespace["_var_n"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_inh_n = _namespace['_array_CA3_inh_n'] cdef double * _array_CA3_inh_n = _buf__array_CA3_inh_n.data cdef size_t _num_array_CA3_inh_n = len(_namespace['_array_CA3_inh_n']) cdef double n _var_noise = _namespace["_var_noise"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_inh_noise = _namespace['_array_CA3_inh_noise'] cdef double * _array_CA3_inh_noise = _buf__array_CA3_inh_noise.data cdef size_t _num_array_CA3_inh_noise = len(_namespace['_array_CA3_inh_noise']) cdef double noise _var_not_refractory = _namespace["_var_not_refractory"] cdef _numpy.ndarray[char, ndim=1, mode='c', cast=True] _buf__array_CA3_inh_not_refractory = _namespace['_array_CA3_inh_not_refractory'] cdef bool * _array_CA3_inh_not_refractory = _buf__array_CA3_inh_not_refractory.data cdef size_t _num_array_CA3_inh_not_refractory = len(_namespace['_array_CA3_inh_not_refractory']) cdef bool not_refractory _var_r = _namespace["_var_r"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_inh_r = _namespace['_array_CA3_inh_r'] cdef double * _array_CA3_inh_r = _buf__array_CA3_inh_r.data cdef size_t _num_array_CA3_inh_r = len(_namespace['_array_CA3_inh_r']) cdef double r _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] _var_size = _namespace["_var_size"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_inh_size = _namespace['_array_CA3_inh_size'] cdef double * _array_CA3_inh_size = _buf__array_CA3_inh_size.data cdef size_t _num_array_CA3_inh_size = len(_namespace['_array_CA3_inh_size']) cdef double size _var_t = _namespace["_var_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double t _var_ufarad = _namespace["_var_ufarad"] cdef double ufarad = _namespace["ufarad"] _var_v = _namespace["_var_v"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_inh_v = _namespace['_array_CA3_inh_v'] cdef double * _array_CA3_inh_v = _buf__array_CA3_inh_v.data cdef size_t _num_array_CA3_inh_v = len(_namespace['_array_CA3_inh_v']) cdef double v cdef double _BA_ge cdef double _BA_ge_ext cdef double _BA_ge_hipp cdef double _BA_gi cdef double _BA_h cdef double _BA_m cdef double _BA_n cdef double _BA_v cdef double _ge cdef double _ge_ext cdef double _ge_hipp cdef double _gi cdef double _h cdef double _he cdef double _he_ext cdef double _he_hipp cdef double _hi cdef int64_t _lio_1 cdef double _lio_10 cdef double _lio_11 cdef double _lio_12 cdef double _lio_13 cdef double _lio_14 cdef double _lio_15 cdef double _lio_16 cdef double _lio_17 cdef double _lio_18 cdef double _lio_19 cdef double _lio_2 cdef double _lio_20 cdef double _lio_21 cdef double _lio_22 cdef double _lio_23 cdef double _lio_24 cdef double _lio_25 cdef double _lio_26 cdef double _lio_27 cdef double _lio_28 cdef double _lio_29 cdef double _lio_3 cdef double _lio_30 cdef double _lio_31 cdef double _lio_32 cdef double _lio_33 cdef double _lio_34 cdef double _lio_35 cdef double _lio_36 cdef double _lio_37 cdef double _lio_38 cdef double _lio_39 cdef double _lio_4 cdef double _lio_40 cdef double _lio_41 cdef double _lio_42 cdef double _lio_43 cdef double _lio_44 cdef double _lio_45 cdef double _lio_46 cdef double _lio_47 cdef double _lio_48 cdef double _lio_49 cdef double _lio_5 cdef double _lio_50 cdef double _lio_51 cdef double _lio_52 cdef double _lio_53 cdef double _lio_54 cdef double _lio_55 cdef double _lio_56 cdef double _lio_57 cdef double _lio_58 cdef double _lio_59 cdef double _lio_6 cdef double _lio_60 cdef double _lio_61 cdef double _lio_62 cdef double _lio_63 cdef double _lio_64 cdef double _lio_65 cdef double _lio_66 cdef double _lio_67 cdef double _lio_68 cdef double _lio_69 cdef double _lio_7 cdef double _lio_70 cdef double _lio_71 cdef double _lio_72 cdef double _lio_73 cdef double _lio_74 cdef double _lio_75 cdef double _lio_76 cdef double _lio_77 cdef double _lio_78 cdef double _lio_79 cdef double _lio_8 cdef double _lio_80 cdef double _lio_81 cdef double _lio_9 cdef double _m cdef double _n cdef double _v if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:15:12,243 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name CA3_inh_stateupdater_codeobject 2021-11-05 15:15:12,244 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "CA3_inh_stateupdate" using Cython module "_cython_magic_9352d47247b001e90d86e90f9e33fd41" 2021-11-05 15:15:12,244 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140606334024432 on /home/nikos/.cython/brian_extensions/_cython_magic_9352d47247b001e90d86e90f9e33fd41.lock 2021-11-05 15:15:12,244 DEBUG brian2.utils.filelock: Lock 140606334024432 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_9352d47247b001e90d86e90f9e33fd41.lock 2021-11-05 15:15:14,024 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140606334024432 on /home/nikos/.cython/brian_extensions/_cython_magic_9352d47247b001e90d86e90f9e33fd41.lock 2021-11-05 15:15:14,024 DEBUG brian2.utils.filelock: Lock 140606334024432 released on /home/nikos/.cython/brian_extensions/_cython_magic_9352d47247b001e90d86e90f9e33fd41.lock 2021-11-05 15:15:14,049 DEBUG brian2.stateupdaters.base.method_choice: Group CA3_pyCAN: using numerical integration method exponential_euler (took 0.02s) 2021-11-05 15:15:14,049 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=CA3_pyCAN, template name=stateupdate) for abstract code: not_refractory = timestep(t - lastspike, dt) >= timestep(0.003000, dt) _BA_Ca_i = -200*ms*(1.2e-6*mole/(metre**3*ms) + 0.000621832540496844*hCaL*mCaL**2*mV*mole*siemens*size/(cm**4*coulomb*umetre) - 5.1819378374737e-6*hCaL*mCaL**2*mole*siemens*size*v/(cm**4*coulomb*umetre)) _Ca_i = -_BA_Ca_i + (Ca_i + _BA_Ca_i)*exp(-dt/(200*ms)) _Cl = Cl*exp(-dt/tau_Cl) _BA_ge = -1.0*he _ge = -_BA_ge + (_BA_ge + ge)*exp(-3.33333333333333*dt/ms) _BA_ge_ext = -1.0*he_ext _ge_ext = -_BA_ge_ext + (_BA_ge_ext + ge_ext)*exp(-3.33333333333333*dt/ms) _BA_ge_hipp = -1.0*he_hipp _ge_hipp = -_BA_ge_hipp + (_BA_ge_hipp + ge_hipp)*exp(-3.33333333333333*dt/ms) _BA_gi = -1.0*hi _gi = -_BA_gi + (_BA_gi + gi)*exp(-1.0*dt/ms) _BA_glu = -1 _glu = -_BA_glu + (_BA_glu + glu)*exp(-dt/(3*second)) _BA_h = 0.128*exp(-19/9)*exp(-v/(18*mV))/(ms*(-4.0/(ms + ms*exp(-3)*exp(-v/(5*mV))) - 0.128*exp(-19/9)/(ms*exp(v/mV)**(1/18)))) _h = -_BA_h + (_BA_h + h)*exp(dt*(-4.0/(ms + ms*exp(-3)*exp(-v/(5*mV))) - 0.128*exp(-19/9)/(ms*exp(v/mV)**(1/18)))) _BA_hCaL = 0.000457*exp(-13/50)*exp(-v/(50*mV))/(ms*(-0.0065/(1.0*ms + ms*exp(-15/28)*exp(-v/(28*mV))) - 0.000457*exp(-13/50)/(ms*exp(v/mV)**(1/50)))) _hCaL = -_BA_hCaL + (_BA_hCaL + hCaL)*exp(dt*(-0.0065/(1.0*ms + ms*exp(-15/28)*exp(-v/(28*mV))) - 0.000457*exp(-13/50)/(ms*exp(v/mV)**(1/50)))) _he = he*exp(-dt/(5*ms)) _he_ext = he_ext*exp(-dt/(5*ms)) _he_hipp = he_hipp*exp(-dt/(5*ms)) _hi = hi*exp(-dt/(10*ms)) _BA_m = (-13.44*mV/(-1.0*mV*ms + mV*ms*exp(-21/2)*exp(-v/(4*mV))) - 0.32*v/(-1.0*mV*ms + mV*ms*exp(-21/2)*exp(-v/(4*mV))))/(-4.2*mV/(mV*ms*exp(3)*exp(v/(5*mV)) - 1.0*mV*ms) + 13.44*mV/(-1.0*mV*ms + mV*ms*exp(-21/2)*exp(-v/(4*mV))) - 0.28*v/(mV*ms*exp(3)*exp(v/(5*mV)) - 1.0*mV*ms) + 0.32*v/(-1.0*mV*ms + mV*ms*exp(-21/2)*exp(-v/(4*mV)))) _m = -_BA_m + (_BA_m + m)*exp(dt*(-4.2*mV/(mV*ms*exp(3)*exp(v/(5*mV)) - 1.0*mV*ms) + 13.44*mV/(-1.0*mV*ms + mV*ms*exp(-21/2)*exp(-v/(4*mV))) - 0.28*v/(mV*ms*exp(3)*exp(v/(5*mV)) - 1.0*mV*ms) + 0.32*v/(-1.0*mV*ms + mV*ms*exp(-21/2)*exp(-v/(4*mV))))) _BA_mCAN = (2979543.50191749*Ca_i**4*metre**12/(800.0*Ca_i**2*metre**6*mole**2*ms + 0.0002*mole**4*ms) + 0.744885875479373*Ca_i**2*metre**6/(800.0*Ca_i**2*metre**6*ms + 0.0002*mole**2*ms))/(-3724.42937739686*Ca_i**2*metre**6/(mole**2*ms) - 0.000931107344349216/ms) _mCAN = -_BA_mCAN + (_BA_mCAN + mCAN)*exp(dt*(-3724.42937739686*Ca_i**2*metre**6/(mole**2*ms) - 0.000931107344349216/ms)) _BA_mCaL = (-1.485*mV/(-1.0*mV*ms + 0.000820773673798214*mV*ms*exp(-0.263157894736842*v/mV)) - 0.055*v/(-1.0*mV*ms + 0.000820773673798214*mV*ms*exp(-0.263157894736842*v/mV)))/(1.485*mV/(-1.0*mV*ms + 0.000820773673798214*mV*ms*exp(-0.263157894736842*v/mV)) + 0.055*v/(-1.0*mV*ms + 0.000820773673798214*mV*ms*exp(-0.263157894736842*v/mV)) - 0.94*exp(-75/17)/(ms*exp(v/mV)**(1/17))) _mCaL = -_BA_mCaL + (_BA_mCaL + mCaL)*exp(dt*(1.485*mV/(-1.0*mV*ms + 0.000820773673798214*mV*ms*exp(-0.263157894736842*v/mV)) + 0.055*v/(-1.0*mV*ms + 0.000820773673798214*mV*ms*exp(-0.263157894736842*v/mV)) - 0.94*exp(-75/17)/(ms*exp(v/mV)**(1/17)))) _BA_n = (-1.28*mV/(-1.0*mV*ms + mV*ms*exp(-8)*exp(-v/(5*mV))) - 0.032*v/(-1.0*mV*ms + mV*ms*exp(-8)*exp(-v/(5*mV))))/(1.28*mV/(-1.0*mV*ms + mV*ms*exp(-8)*exp(-v/(5*mV))) + 0.032*v/(-1.0*mV*ms + mV*ms*exp(-8)*exp(-v/(5*mV))) - 0.5*exp(-9/8)/(ms*exp(v/mV)**(1/40))) _n = -_BA_n + (_BA_n + n)*exp(dt*(1.28*mV/(-1.0*mV*ms + mV*ms*exp(-8)*exp(-v/(5*mV))) + 0.032*v/(-1.0*mV*ms + mV*ms*exp(-8)*exp(-v/(5*mV))) - 0.5*exp(-9/8)/(ms*exp(v/mV)**(1/40)))) _BA_p = (0.001/(ms*exp(7/4)*exp(v/(20*mV)) + ms*exp(-7/4)*exp(-v/(20*mV))) + 0.0033*exp(7/4)*exp(v/(20*mV))/(ms + ms*exp(-7/2)*exp(-v/(10*mV))))/(-0.0033*exp(7/4)*exp(v/mV)**(1/20)/ms - exp(-7/4)/(1000*ms*exp(v/mV)**(1/20))) _p = -_BA_p + (_BA_p + p)*exp(dt*(-0.0033*exp(7/4)*exp(v/mV)**(1/20)/ms - exp(-7/4)/(1000*ms*exp(v/mV)**(1/20)))) _BA_v = (Ek*cm**2*gM*p/ufarad + 5*Ek*msiemens*n**4/ufarad - 20*cm**2*gCAN*mCAN**2*mV/ufarad - 80*cm**2*gi*mV*int(Cl <= 0.5)/(size*ufarad) + cm**2*r*inputs_stim(t)/(size*ufarad) + 2500*h*m**3*mV*msiemens/ufarad + 0.012*hCaL*mCaL**2*mV*siemens/ufarad - 0.0007*mV*siemens/ufarad + noise)*(-cm**2*gCAN*mCAN**2/ufarad - cm**2*gM*p/ufarad - cm**2*ge/(size*ufarad) - cm**2*ge_ext/(size*ufarad) - cm**2*ge_hipp/(size*ufarad) - cm**2*gi*int(Cl <= 0.5)/(size*ufarad) - cm**2*gi*int(Cl > 0.5)/(size*ufarad) - 50*h*m**3*msiemens/ufarad - 0.0001*hCaL*mCaL**2*siemens/ufarad - 5*msiemens*n**4/ufarad - 1.0e-5*siemens/ufarad)**(-1) _v = -_BA_v + (_BA_v + v)*exp(dt*(-cm**2*gCAN*mCAN**2/ufarad - cm**2*gM*p/ufarad - cm**2*ge/(size*ufarad) - cm**2*ge_ext/(size*ufarad) - cm**2*ge_hipp/(size*ufarad) - cm**2*gi*int(Cl <= 0.5)/(size*ufarad) - cm**2*gi*int(Cl > 0.5)/(size*ufarad) - 50*h*m**3*msiemens/ufarad - 0.0001*hCaL*mCaL**2*siemens/ufarad - 5*msiemens*n**4/ufarad - 1.0e-5*siemens/ufarad)) Ca_i = _Ca_i Cl = _Cl ge = _ge ge_ext = _ge_ext ge_hipp = _ge_hipp gi = _gi glu = _glu h = _h hCaL = _hCaL he = _he he_ext = _he_ext he_hipp = _he_hipp hi = _hi m = _m mCAN = _mCAN mCaL = _mCaL n = _n p = _p v = _v 2021-11-05 15:15:14,063 DIAGNOSTIC brian2.devices.device: CA3_pyCAN_stateupdater_codeobject abstract code: not_refractory = timestep(t - lastspike, dt) >= timestep(0.003000, dt) _BA_Ca_i = -200*ms*(1.2e-6*mole/(metre**3*ms) + 0.000621832540496844*hCaL*mCaL**2*mV*mole*siemens*size/(cm**4*coulomb*umetre) - 5.1819378374737e-6*hCaL*mCaL**2*mole*siemens*size*v/(cm**4*coulomb*umetre)) _Ca_i = -_BA_Ca_i + (Ca_i + _BA_Ca_i)*exp(-dt/(200*ms)) _Cl = Cl*exp(-dt/tau_Cl) _BA_ge = -1.0*he _ge = -_BA_ge + (_BA_ge + ge)*exp(-3.33333333333333*dt/ms) _BA_ge_ext = -1.0*he_ext _ge_ext = -_BA_ge_ext + (_BA_ge_ext + ge_ext)*exp(-3.33333333333333*dt/ms) _BA_ge_hipp = -1.0*he_hipp _ge_hipp = -_BA_ge_hipp + (_BA_ge_hipp + ge_hipp)*exp(-3.33333333333333*dt/ms) _BA_gi = -1.0*hi _gi = -_BA_gi + (_BA_gi + gi)*exp(-1.0*dt/ms) _BA_glu = -1 _glu = -_BA_glu + (_BA_glu + glu)*exp(-dt/(3*second)) _BA_h = 0.128*exp(-19/9)*exp(-v/(18*mV))/(ms*(-4.0/(ms + ms*exp(-3)*exp(-v/(5*mV))) - 0.128*exp(-19/9)/(ms*exp(v/mV)**(1/18)))) _h = -_BA_h + (_BA_h + h)*exp(dt*(-4.0/(ms + ms*exp(-3)*exp(-v/(5*mV))) - 0.128*exp(-19/9)/(ms*exp(v/mV)**(1/18)))) _BA_hCaL = 0.000457*exp(-13/50)*exp(-v/(50*mV))/(ms*(-0.0065/(1.0*ms + ms*exp(-15/28)*exp(-v/(28*mV))) - 0.000457*exp(-13/50)/(ms*exp(v/mV)**(1/50)))) _hCaL = -_BA_hCaL + (_BA_hCaL + hCaL)*exp(dt*(-0.0065/(1.0*ms + ms*exp(-15/28)*exp(-v/(28*mV))) - 0.000457*exp(-13/50)/(ms*exp(v/mV)**(1/50)))) _he = he*exp(-dt/(5*ms)) _he_ext = he_ext*exp(-dt/(5*ms)) _he_hipp = he_hipp*exp(-dt/(5*ms)) _hi = hi*exp(-dt/(10*ms)) _BA_m = (-13.44*mV/(-1.0*mV*ms + mV*ms*exp(-21/2)*exp(-v/(4*mV))) - 0.32*v/(-1.0*mV*ms + mV*ms*exp(-21/2)*exp(-v/(4*mV))))/(-4.2*mV/(mV*ms*exp(3)*exp(v/(5*mV)) - 1.0*mV*ms) + 13.44*mV/(-1.0*mV*ms + mV*ms*exp(-21/2)*exp(-v/(4*mV))) - 0.28*v/(mV*ms*exp(3)*exp(v/(5*mV)) - 1.0*mV*ms) + 0.32*v/(-1.0*mV*ms + mV*ms*exp(-21/2)*exp(-v/(4*mV)))) _m = -_BA_m + (_BA_m + m)*exp(dt*(-4.2*mV/(mV*ms*exp(3)*exp(v/(5*mV)) - 1.0*mV*ms) + 13.44*mV/(-1.0*mV*ms + mV*ms*exp(-21/2)*exp(-v/(4*mV))) - 0.28*v/(mV*ms*exp(3)*exp(v/(5*mV)) - 1.0*mV*ms) + 0.32*v/(-1.0*mV*ms + mV*ms*exp(-21/2)*exp(-v/(4*mV))))) _BA_mCAN = (2979543.50191749*Ca_i**4*metre**12/(800.0*Ca_i**2*metre**6*mole**2*ms + 0.0002*mole**4*ms) + 0.744885875479373*Ca_i**2*metre**6/(800.0*Ca_i**2*metre**6*ms + 0.0002*mole**2*ms))/(-3724.42937739686*Ca_i**2*metre**6/(mole**2*ms) - 0.000931107344349216/ms) _mCAN = -_BA_mCAN + (_BA_mCAN + mCAN)*exp(dt*(-3724.42937739686*Ca_i**2*metre**6/(mole**2*ms) - 0.000931107344349216/ms)) _BA_mCaL = (-1.485*mV/(-1.0*mV*ms + 0.000820773673798214*mV*ms*exp(-0.263157894736842*v/mV)) - 0.055*v/(-1.0*mV*ms + 0.000820773673798214*mV*ms*exp(-0.263157894736842*v/mV)))/(1.485*mV/(-1.0*mV*ms + 0.000820773673798214*mV*ms*exp(-0.263157894736842*v/mV)) + 0.055*v/(-1.0*mV*ms + 0.000820773673798214*mV*ms*exp(-0.263157894736842*v/mV)) - 0.94*exp(-75/17)/(ms*exp(v/mV)**(1/17))) _mCaL = -_BA_mCaL + (_BA_mCaL + mCaL)*exp(dt*(1.485*mV/(-1.0*mV*ms + 0.000820773673798214*mV*ms*exp(-0.263157894736842*v/mV)) + 0.055*v/(-1.0*mV*ms + 0.000820773673798214*mV*ms*exp(-0.263157894736842*v/mV)) - 0.94*exp(-75/17)/(ms*exp(v/mV)**(1/17)))) _BA_n = (-1.28*mV/(-1.0*mV*ms + mV*ms*exp(-8)*exp(-v/(5*mV))) - 0.032*v/(-1.0*mV*ms + mV*ms*exp(-8)*exp(-v/(5*mV))))/(1.28*mV/(-1.0*mV*ms + mV*ms*exp(-8)*exp(-v/(5*mV))) + 0.032*v/(-1.0*mV*ms + mV*ms*exp(-8)*exp(-v/(5*mV))) - 0.5*exp(-9/8)/(ms*exp(v/mV)**(1/40))) _n = -_BA_n + (_BA_n + n)*exp(dt*(1.28*mV/(-1.0*mV*ms + mV*ms*exp(-8)*exp(-v/(5*mV))) + 0.032*v/(-1.0*mV*ms + mV*ms*exp(-8)*exp(-v/(5*mV))) - 0.5*exp(-9/8)/(ms*exp(v/mV)**(1/40)))) _BA_p = (0.001/(ms*exp(7/4)*exp(v/(20*mV)) + ms*exp(-7/4)*exp(-v/(20*mV))) + 0.0033*exp(7/4)*exp(v/(20*mV))/(ms + ms*exp(-7/2)*exp(-v/(10*mV))))/(-0.0033*exp(7/4)*exp(v/mV)**(1/20)/ms - exp(-7/4)/(1000*ms*exp(v/mV)**(1/20))) _p = -_BA_p + (_BA_p + p)*exp(dt*(-0.0033*exp(7/4)*exp(v/mV)**(1/20)/ms - exp(-7/4)/(1000*ms*exp(v/mV)**(1/20)))) _BA_v = (Ek*cm**2*gM*p/ufarad + 5*Ek*msiemens*n**4/ufarad - 20*cm**2*gCAN*mCAN**2*mV/ufarad - 80*cm**2*gi*mV*int(Cl <= 0.5)/(size*ufarad) + cm**2*r*inputs_stim(t)/(size*ufarad) + 2500*h*m**3*mV*msiemens/ufarad + 0.012*hCaL*mCaL**2*mV*siemens/ufarad - 0.0007*mV*siemens/ufarad + noise)*(-cm**2*gCAN*mCAN**2/ufarad - cm**2*gM*p/ufarad - cm**2*ge/(size*ufarad) - cm**2*ge_ext/(size*ufarad) - cm**2*ge_hipp/(size*ufarad) - cm**2*gi*int(Cl <= 0.5)/(size*ufarad) - cm**2*gi*int(Cl > 0.5)/(size*ufarad) - 50*h*m**3*msiemens/ufarad - 0.0001*hCaL*mCaL**2*siemens/ufarad - 5*msiemens*n**4/ufarad - 1.0e-5*siemens/ufarad)**(-1) _v = -_BA_v + (_BA_v + v)*exp(dt*(-cm**2*gCAN*mCAN**2/ufarad - cm**2*gM*p/ufarad - cm**2*ge/(size*ufarad) - cm**2*ge_ext/(size*ufarad) - cm**2*ge_hipp/(size*ufarad) - cm**2*gi*int(Cl <= 0.5)/(size*ufarad) - cm**2*gi*int(Cl > 0.5)/(size*ufarad) - 50*h*m**3*msiemens/ufarad - 0.0001*hCaL*mCaL**2*siemens/ufarad - 5*msiemens*n**4/ufarad - 1.0e-5*siemens/ufarad)) Ca_i = _Ca_i Cl = _Cl ge = _ge ge_ext = _ge_ext ge_hipp = _ge_hipp gi = _gi glu = _glu h = _h hCaL = _hCaL he = _he he_ext = _he_ext he_hipp = _he_hipp hi = _hi m = _m mCAN = _mCAN mCaL = _mCaL n = _n p = _p v = _v 2021-11-05 15:15:14,189 DIAGNOSTIC brian2.devices.device: CA3_pyCAN_stateupdater_codeobject snippet (scalar): t = _array_defaultclock_t[0] dt = _array_defaultclock_dt[0] _BA_glu = - 1 _lio_1 = _timestep(0.003, dt) _lio_2 = (- 200.0) * ms _lio_3 = (1.2e-06 * mole) / ((metre ** 3) * ms) _lio_4 = (0.000621832540496844 * ((mV * mole) * siemens)) / (((cm ** 4) * coulomb) * umetre) _lio_5 = (5.1819378374737e-06 * (mole * siemens)) / (((cm ** 4) * coulomb) * umetre) _lio_6 = exp((0.005 * (- dt)) / ms) _lio_7 = exp((- dt) / tau_Cl) _lio_8 = exp(((- 3.33333333333333) * dt) / ms) _lio_9 = exp(((- 1.0) * dt) / ms) _lio_10 = - _BA_glu _lio_11 = exp((0.3333333333333333 * (- dt)) / second) _lio_12 = 0.015501226546218206 / ms _lio_13 = 0.05555555555555555 / mV _lio_14 = ms * 0.049787068367863944 _lio_15 = 0.2 / mV _lio_16 = 1.0 / mV _lio_17 = 0.00035237057471222975 / ms _lio_18 = 0.02 / mV _lio_19 = ms * 0.5852511043074123 _lio_20 = 0.03571428571428571 / mV _lio_21 = exp((0.2 * (- dt)) / ms) _lio_22 = exp((0.1 * (- dt)) / ms) _lio_23 = (- 13.44) * mV _lio_24 = ((- 1.0) * mV) * ms _lio_25 = (mV * ms) * 2.7536449349747158e-05 _lio_26 = 0.25 / mV _lio_27 = (- 4.2) * mV _lio_28 = 0.0 - (mV * ms) _lio_29 = (mV * ms) * 20.085536923187668 _lio_30 = 13.44 * mV _lio_31 = 2979543.50191749 * (metre ** 12) _lio_32 = 0.0002 * ((mole ** 4) * ms) _lio_33 = 800.0 * (((metre ** 6) * (mole ** 2)) * ms) _lio_34 = 0.744885875479373 * (metre ** 6) _lio_35 = 0.0002 * ((mole ** 2) * ms) _lio_36 = 800.0 * ((metre ** 6) * ms) _lio_37 = 0.0 - (0.000931107344349216 / ms) _lio_38 = ((- 3724.42937739686) * (metre ** 6)) / ((mole ** 2) * ms) _lio_39 = (- 1.485) * mV _lio_40 = 0.000820773673798214 * (mV * ms) _lio_41 = (- 0.263157894736842) / mV _lio_42 = 1.485 * mV _lio_43 = 0.011405722114984784 / ms _lio_44 = (- 1.28) * mV _lio_45 = (mV * ms) * 0.00033546262790251185 _lio_46 = 1.28 * mV _lio_47 = 0.16232623367917487 / ms _lio_48 = ms * 5.754602676005731 _lio_49 = 0.05 / mV _lio_50 = ms * 0.17377394345044514 _lio_51 = ms * 0.0301973834223185 _lio_52 = 0.1 / mV _lio_53 = (- 0.018990188830818912) / ms _lio_54 = 0.00017377394345044513 / ms _lio_55 = 0.0 - ((0.0007 * (mV * siemens)) / ufarad) _lio_56 = ((Ek * (cm ** 2)) * gM) / ufarad _lio_57 = (5.0 * (Ek * msiemens)) / ufarad _lio_58 = ((cm ** 2) * _timedarray(t)) / ufarad _lio_59 = (2500.0 * (mV * msiemens)) / ufarad _lio_60 = (0.012 * (mV * siemens)) / ufarad _lio_61 = (20.0 * (((cm ** 2) * gCAN) * mV)) / ufarad _lio_62 = (80.0 * ((cm ** 2) * mV)) / ufarad _lio_63 = 0.0 - ((1e-05 * siemens) / ufarad) _lio_64 = ((- (cm ** 2)) * gCAN) / ufarad _lio_65 = ((cm ** 2) * gM) / ufarad _lio_66 = (cm ** 2) / ufarad _lio_67 = (50.0 * msiemens) / ufarad _lio_68 = (0.0001 * siemens) / ufarad _lio_69 = (5.0 * msiemens) / ufarad 2021-11-05 15:15:14,189 DIAGNOSTIC brian2.devices.device: CA3_pyCAN_stateupdater_codeobject snippet (vector): gi = _array_CA3_pyCAN_gi[_idx] noise = _array_CA3_pyCAN_noise[_idx] r = _array_CA3_pyCAN_r[_idx] Cl = _array_CA3_pyCAN_Cl[_idx] mCaL = _array_CA3_pyCAN_mCaL[_idx] lastspike = _array_CA3_pyCAN_lastspike[_idx] Ca_i = _array_CA3_pyCAN_Ca_i[_idx] mCAN = _array_CA3_pyCAN_mCAN[_idx] v = _array_CA3_pyCAN_v[_idx] p = _array_CA3_pyCAN_p[_idx] ge_hipp = _array_CA3_pyCAN_ge_hipp[_idx] size = _array_CA3_pyCAN_size[_idx] m = _array_CA3_pyCAN_m[_idx] glu = _array_CA3_pyCAN_glu[_idx] h = _array_CA3_pyCAN_h[_idx] n = _array_CA3_pyCAN_n[_idx] he = _array_CA3_pyCAN_he[_idx] hi = _array_CA3_pyCAN_hi[_idx] ge = _array_CA3_pyCAN_ge[_idx] he_hipp = _array_CA3_pyCAN_he_hipp[_idx] ge_ext = _array_CA3_pyCAN_ge_ext[_idx] hCaL = _array_CA3_pyCAN_hCaL[_idx] he_ext = _array_CA3_pyCAN_he_ext[_idx] not_refractory = _timestep(t - lastspike, dt) >= _lio_1 _BA_Ca_i = _lio_2 * ((_lio_3 + (_lio_4 * ((hCaL * (mCaL ** 2)) * size))) - (_lio_5 * (((hCaL * (mCaL ** 2)) * size) * v))) _Ca_i = (- _BA_Ca_i) + (_lio_6 * (Ca_i + _BA_Ca_i)) _Cl = _lio_7 * Cl _BA_ge = (- 1.0) * he _ge = (- _BA_ge) + (_lio_8 * (_BA_ge + ge)) _BA_ge_ext = (- 1.0) * he_ext _ge_ext = (- _BA_ge_ext) + (_lio_8 * (_BA_ge_ext + ge_ext)) _BA_ge_hipp = (- 1.0) * he_hipp _ge_hipp = (- _BA_ge_hipp) + (_lio_8 * (_BA_ge_hipp + ge_hipp)) _BA_gi = (- 1.0) * hi _gi = (- _BA_gi) + (_lio_9 * (_BA_gi + gi)) _glu = _lio_10 + (_lio_11 * (_BA_glu + glu)) _BA_h = (_lio_12 * exp(_lio_13 * (- v))) / (((- 4.0) / (ms + (_lio_14 * exp(_lio_15 * (- v))))) - (_lio_12 / (exp(_lio_16 * v) ** 0.05555555555555555))) _h = (- _BA_h) + ((_BA_h + h) * exp(dt * (((- 4.0) / (ms + (_lio_14 * exp(_lio_15 * (- v))))) - (_lio_12 / (exp(_lio_16 * v) ** 0.05555555555555555))))) _BA_hCaL = (_lio_17 * exp(_lio_18 * (- v))) / (((- 0.0065) / (ms + (_lio_19 * exp(_lio_20 * (- v))))) - (_lio_17 / (exp(_lio_16 * v) ** 0.02))) _hCaL = (- _BA_hCaL) + ((_BA_hCaL + hCaL) * exp(dt * (((- 0.0065) / (ms + (_lio_19 * exp(_lio_20 * (- v))))) - (_lio_17 / (exp(_lio_16 * v) ** 0.02))))) _he = _lio_21 * he _he_ext = _lio_21 * he_ext _he_hipp = _lio_21 * he_hipp _hi = _lio_22 * hi _BA_m = ((_lio_23 / (_lio_24 + (_lio_25 * exp(_lio_26 * (- v))))) - ((0.32 * v) / (_lio_24 + (_lio_25 * exp(_lio_26 * (- v)))))) / ((((_lio_27 / (_lio_28 + (_lio_29 * exp(_lio_15 * v)))) + (_lio_30 / (_lio_24 + (_lio_25 * exp(_lio_26 * (- v)))))) + ((0.32 * v) / (_lio_24 + (_lio_25 * exp(_lio_26 * (- v)))))) - ((0.28 * v) / (_lio_28 + (_lio_29 * exp(_lio_15 * v))))) _m = (- _BA_m) + ((_BA_m + m) * exp(dt * ((((_lio_27 / (_lio_28 + (_lio_29 * exp(_lio_15 * v)))) + (_lio_30 / (_lio_24 + (_lio_25 * exp(_lio_26 * (- v)))))) + ((0.32 * v) / (_lio_24 + (_lio_25 * exp(_lio_26 * (- v)))))) - ((0.28 * v) / (_lio_28 + (_lio_29 * exp(_lio_15 * v))))))) _BA_mCAN = (((_lio_31 * (Ca_i ** 4)) / (_lio_32 + (_lio_33 * (Ca_i ** 2)))) + ((_lio_34 * (Ca_i ** 2)) / (_lio_35 + (_lio_36 * (Ca_i ** 2))))) / (_lio_37 + (_lio_38 * (Ca_i ** 2))) _mCAN = (- _BA_mCAN) + ((_BA_mCAN + mCAN) * exp(dt * (_lio_37 + (_lio_38 * (Ca_i ** 2))))) _BA_mCaL = ((_lio_39 / (_lio_24 + (_lio_40 * exp(_lio_41 * v)))) - ((0.055 * v) / (_lio_24 + (_lio_40 * exp(_lio_41 * v))))) / (((_lio_42 / (_lio_24 + (_lio_40 * exp(_lio_41 * v)))) + ((0.055 * v) / (_lio_24 + (_lio_40 * exp(_lio_41 * v))))) - (_lio_43 / (exp(_lio_16 * v) ** 0.058823529411764705))) _mCaL = (- _BA_mCaL) + ((_BA_mCaL + mCaL) * exp(dt * (((_lio_42 / (_lio_24 + (_lio_40 * exp(_lio_41 * v)))) + ((0.055 * v) / (_lio_24 + (_lio_40 * exp(_lio_41 * v))))) - (_lio_43 / (exp(_lio_16 * v) ** 0.058823529411764705))))) _BA_n = ((_lio_44 / (_lio_24 + (_lio_45 * exp(_lio_15 * (- v))))) - ((0.032 * v) / (_lio_24 + (_lio_45 * exp(_lio_15 * (- v)))))) / (((_lio_46 / (_lio_24 + (_lio_45 * exp(_lio_15 * (- v))))) + ((0.032 * v) / (_lio_24 + (_lio_45 * exp(_lio_15 * (- v)))))) - (_lio_47 / (exp(_lio_16 * v) ** 0.025))) _n = (- _BA_n) + ((_BA_n + n) * exp(dt * (((_lio_46 / (_lio_24 + (_lio_45 * exp(_lio_15 * (- v))))) + ((0.032 * v) / (_lio_24 + (_lio_45 * exp(_lio_15 * (- v)))))) - (_lio_47 / (exp(_lio_16 * v) ** 0.025))))) _BA_p = ((0.001 / ((_lio_48 * exp(_lio_49 * v)) + (_lio_50 * exp(_lio_49 * (- v))))) + ((0.018990188830818912 * exp(_lio_49 * v)) / (ms + (_lio_51 * exp(_lio_52 * (- v)))))) / ((_lio_53 * (exp(_lio_16 * v) ** 0.05)) - (_lio_54 / (exp(_lio_16 * v) ** 0.05))) _p = (- _BA_p) + ((_BA_p + p) * exp(dt * ((_lio_53 * (exp(_lio_16 * v) ** 0.05)) - (_lio_54 / (exp(_lio_16 * v) ** 0.05))))) _BA_v = ((_lio_55 + ((((((_lio_56 * p) + (_lio_57 * (n ** 4))) + ((_lio_58 * r) / size)) + (_lio_59 * (h * (m ** 3)))) + (_lio_60 * (hCaL * (mCaL ** 2)))) + noise)) - ((_lio_61 * (mCAN ** 2)) + ((_lio_62 * (gi * int_(Cl <= 0.5))) / size))) * (((_lio_63 + (_lio_64 * (mCAN ** 2))) - (((((((((_lio_65 * p) + ((_lio_66 * ge) / size)) + ((_lio_66 * ge_ext) / size)) + ((_lio_66 * ge_hipp) / size)) + ((_lio_66 * (gi * int_(Cl <= 0.5))) / size)) + ((_lio_66 * (gi * int_(Cl > 0.5))) / size)) + (_lio_67 * (h * (m ** 3)))) + (_lio_68 * (hCaL * (mCaL ** 2)))) + (_lio_69 * (n ** 4)))) ** (- 1)) _v = (- _BA_v) + ((_BA_v + v) * exp(dt * ((_lio_63 + (_lio_64 * (mCAN ** 2))) - (((((((((_lio_65 * p) + ((_lio_66 * ge) / size)) + ((_lio_66 * ge_ext) / size)) + ((_lio_66 * ge_hipp) / size)) + ((_lio_66 * (gi * int_(Cl <= 0.5))) / size)) + ((_lio_66 * (gi * int_(Cl > 0.5))) / size)) + (_lio_67 * (h * (m ** 3)))) + (_lio_68 * (hCaL * (mCaL ** 2)))) + (_lio_69 * (n ** 4)))))) Ca_i = _Ca_i Cl = _Cl ge = _ge ge_ext = _ge_ext ge_hipp = _ge_hipp gi = _gi glu = _glu h = _h hCaL = _hCaL he = _he he_ext = _he_ext he_hipp = _he_hipp hi = _hi m = _m mCAN = _mCAN mCaL = _mCaL n = _n p = _p v = _v _array_CA3_pyCAN_gi[_idx] = gi _array_CA3_pyCAN_not_refractory[_idx] = not_refractory _array_CA3_pyCAN_Cl[_idx] = Cl _array_CA3_pyCAN_mCaL[_idx] = mCaL _array_CA3_pyCAN_Ca_i[_idx] = Ca_i _array_CA3_pyCAN_mCAN[_idx] = mCAN _array_CA3_pyCAN_v[_idx] = v _array_CA3_pyCAN_p[_idx] = p _array_CA3_pyCAN_ge_hipp[_idx] = ge_hipp _array_CA3_pyCAN_m[_idx] = m _array_CA3_pyCAN_glu[_idx] = glu _array_CA3_pyCAN_h[_idx] = h _array_CA3_pyCAN_n[_idx] = n _array_CA3_pyCAN_he[_idx] = he _array_CA3_pyCAN_hi[_idx] = hi _array_CA3_pyCAN_ge[_idx] = ge _array_CA3_pyCAN_he_hipp[_idx] = he_hipp _array_CA3_pyCAN_ge_ext[_idx] = ge_ext _array_CA3_pyCAN_hCaL[_idx] = hCaL _array_CA3_pyCAN_he_ext[_idx] = he_ext 2021-11-05 15:15:14,190 DIAGNOSTIC brian2.devices.device: CA3_pyCAN_stateupdater_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code cdef double *_namespace_timedarray_values cdef double _timedarray(const double t): global _namespace_timedarray_values cdef double epsilon = 0.001000000000000000 / 128 cdef int i = (int)((t/epsilon + 0.5)/128) if i < 0: i = 0 if i >= 2001: i = 2001 - 1 return _namespace_timedarray_values[i] cdef int64_t _timestep(double t, double dt): return ((t + 1e-3*dt)/dt) # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var_Ca_i = _namespace["_var_Ca_i"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_Ca_i = _namespace['_array_CA3_pyCAN_Ca_i'] cdef double * _array_CA3_pyCAN_Ca_i = _buf__array_CA3_pyCAN_Ca_i.data cdef size_t _num_array_CA3_pyCAN_Ca_i = len(_namespace['_array_CA3_pyCAN_Ca_i']) cdef double Ca_i _var_Cl = _namespace["_var_Cl"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_Cl = _namespace['_array_CA3_pyCAN_Cl'] cdef double * _array_CA3_pyCAN_Cl = _buf__array_CA3_pyCAN_Cl.data cdef size_t _num_array_CA3_pyCAN_Cl = len(_namespace['_array_CA3_pyCAN_Cl']) cdef double Cl _var_Ek = _namespace["_var_Ek"] cdef double Ek = _namespace["Ek"] _var_N = _namespace["_var_N"] cdef int64_t N = _namespace["N"] _var_cm = _namespace["_var_cm"] cdef double cm = _namespace["cm"] _var_coulomb = _namespace["_var_coulomb"] cdef double coulomb = _namespace["coulomb"] _var_dt = _namespace["_var_dt"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_dt = _namespace['_array_defaultclock_dt'] cdef double * _array_defaultclock_dt = _buf__array_defaultclock_dt.data cdef double dt = _namespace["dt"] _var_gCAN = _namespace["_var_gCAN"] cdef double gCAN = _namespace["gCAN"] _var_gM = _namespace["_var_gM"] cdef double gM = _namespace["gM"] _var_ge = _namespace["_var_ge"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_ge = _namespace['_array_CA3_pyCAN_ge'] cdef double * _array_CA3_pyCAN_ge = _buf__array_CA3_pyCAN_ge.data cdef size_t _num_array_CA3_pyCAN_ge = len(_namespace['_array_CA3_pyCAN_ge']) cdef double ge _var_ge_ext = _namespace["_var_ge_ext"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_ge_ext = _namespace['_array_CA3_pyCAN_ge_ext'] cdef double * _array_CA3_pyCAN_ge_ext = _buf__array_CA3_pyCAN_ge_ext.data cdef size_t _num_array_CA3_pyCAN_ge_ext = len(_namespace['_array_CA3_pyCAN_ge_ext']) cdef double ge_ext _var_ge_hipp = _namespace["_var_ge_hipp"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_ge_hipp = _namespace['_array_CA3_pyCAN_ge_hipp'] cdef double * _array_CA3_pyCAN_ge_hipp = _buf__array_CA3_pyCAN_ge_hipp.data cdef size_t _num_array_CA3_pyCAN_ge_hipp = len(_namespace['_array_CA3_pyCAN_ge_hipp']) cdef double ge_hipp _var_gi = _namespace["_var_gi"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_gi = _namespace['_array_CA3_pyCAN_gi'] cdef double * _array_CA3_pyCAN_gi = _buf__array_CA3_pyCAN_gi.data cdef size_t _num_array_CA3_pyCAN_gi = len(_namespace['_array_CA3_pyCAN_gi']) cdef double gi _var_glu = _namespace["_var_glu"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_glu = _namespace['_array_CA3_pyCAN_glu'] cdef double * _array_CA3_pyCAN_glu = _buf__array_CA3_pyCAN_glu.data cdef size_t _num_array_CA3_pyCAN_glu = len(_namespace['_array_CA3_pyCAN_glu']) cdef double glu _var_h = _namespace["_var_h"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_h = _namespace['_array_CA3_pyCAN_h'] cdef double * _array_CA3_pyCAN_h = _buf__array_CA3_pyCAN_h.data cdef size_t _num_array_CA3_pyCAN_h = len(_namespace['_array_CA3_pyCAN_h']) cdef double h _var_hCaL = _namespace["_var_hCaL"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_hCaL = _namespace['_array_CA3_pyCAN_hCaL'] cdef double * _array_CA3_pyCAN_hCaL = _buf__array_CA3_pyCAN_hCaL.data cdef size_t _num_array_CA3_pyCAN_hCaL = len(_namespace['_array_CA3_pyCAN_hCaL']) cdef double hCaL _var_he = _namespace["_var_he"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_he = _namespace['_array_CA3_pyCAN_he'] cdef double * _array_CA3_pyCAN_he = _buf__array_CA3_pyCAN_he.data cdef size_t _num_array_CA3_pyCAN_he = len(_namespace['_array_CA3_pyCAN_he']) cdef double he _var_he_ext = _namespace["_var_he_ext"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_he_ext = _namespace['_array_CA3_pyCAN_he_ext'] cdef double * _array_CA3_pyCAN_he_ext = _buf__array_CA3_pyCAN_he_ext.data cdef size_t _num_array_CA3_pyCAN_he_ext = len(_namespace['_array_CA3_pyCAN_he_ext']) cdef double he_ext _var_he_hipp = _namespace["_var_he_hipp"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_he_hipp = _namespace['_array_CA3_pyCAN_he_hipp'] cdef double * _array_CA3_pyCAN_he_hipp = _buf__array_CA3_pyCAN_he_hipp.data cdef size_t _num_array_CA3_pyCAN_he_hipp = len(_namespace['_array_CA3_pyCAN_he_hipp']) cdef double he_hipp _var_hi = _namespace["_var_hi"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_hi = _namespace['_array_CA3_pyCAN_hi'] cdef double * _array_CA3_pyCAN_hi = _buf__array_CA3_pyCAN_hi.data cdef size_t _num_array_CA3_pyCAN_hi = len(_namespace['_array_CA3_pyCAN_hi']) cdef double hi # namespace for function inputs_stim global _namespace_timedarray_values global _namespace_num_timedarray_values cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__timedarray_values = _namespace['_timedarray_values'] _namespace_timedarray_values = _buf__timedarray_values.data _namespace_num_timedarray_values = len(_namespace['_timedarray_values']) _var_lastspike = _namespace["_var_lastspike"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_lastspike = _namespace['_array_CA3_pyCAN_lastspike'] cdef double * _array_CA3_pyCAN_lastspike = _buf__array_CA3_pyCAN_lastspike.data cdef size_t _num_array_CA3_pyCAN_lastspike = len(_namespace['_array_CA3_pyCAN_lastspike']) cdef double lastspike _var_m = _namespace["_var_m"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_m = _namespace['_array_CA3_pyCAN_m'] cdef double * _array_CA3_pyCAN_m = _buf__array_CA3_pyCAN_m.data cdef size_t _num_array_CA3_pyCAN_m = len(_namespace['_array_CA3_pyCAN_m']) cdef double m _var_mCAN = _namespace["_var_mCAN"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_mCAN = _namespace['_array_CA3_pyCAN_mCAN'] cdef double * _array_CA3_pyCAN_mCAN = _buf__array_CA3_pyCAN_mCAN.data cdef size_t _num_array_CA3_pyCAN_mCAN = len(_namespace['_array_CA3_pyCAN_mCAN']) cdef double mCAN _var_mCaL = _namespace["_var_mCaL"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_mCaL = _namespace['_array_CA3_pyCAN_mCaL'] cdef double * _array_CA3_pyCAN_mCaL = _buf__array_CA3_pyCAN_mCaL.data cdef size_t _num_array_CA3_pyCAN_mCaL = len(_namespace['_array_CA3_pyCAN_mCaL']) cdef double mCaL _var_mV = _namespace["_var_mV"] cdef double mV = _namespace["mV"] _var_metre = _namespace["_var_metre"] cdef double metre = _namespace["metre"] _var_mole = _namespace["_var_mole"] cdef double mole = _namespace["mole"] _var_ms = _namespace["_var_ms"] cdef double ms = _namespace["ms"] _var_msiemens = _namespace["_var_msiemens"] cdef double msiemens = _namespace["msiemens"] _var_n = _namespace["_var_n"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_n = _namespace['_array_CA3_pyCAN_n'] cdef double * _array_CA3_pyCAN_n = _buf__array_CA3_pyCAN_n.data cdef size_t _num_array_CA3_pyCAN_n = len(_namespace['_array_CA3_pyCAN_n']) cdef double n _var_noise = _namespace["_var_noise"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_noise = _namespace['_array_CA3_pyCAN_noise'] cdef double * _array_CA3_pyCAN_noise = _buf__array_CA3_pyCAN_noise.data cdef size_t _num_array_CA3_pyCAN_noise = len(_namespace['_array_CA3_pyCAN_noise']) cdef double noise _var_not_refractory = _namespace["_var_not_refractory"] cdef _numpy.ndarray[char, ndim=1, mode='c', cast=True] _buf__array_CA3_pyCAN_not_refractory = _namespace['_array_CA3_pyCAN_not_refractory'] cdef bool * _array_CA3_pyCAN_not_refractory = _buf__array_CA3_pyCAN_not_refractory.data cdef size_t _num_array_CA3_pyCAN_not_refractory = len(_namespace['_array_CA3_pyCAN_not_refractory']) cdef bool not_refractory _var_p = _namespace["_var_p"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_p = _namespace['_array_CA3_pyCAN_p'] cdef double * _array_CA3_pyCAN_p = _buf__array_CA3_pyCAN_p.data cdef size_t _num_array_CA3_pyCAN_p = len(_namespace['_array_CA3_pyCAN_p']) cdef double p _var_r = _namespace["_var_r"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_r = _namespace['_array_CA3_pyCAN_r'] cdef double * _array_CA3_pyCAN_r = _buf__array_CA3_pyCAN_r.data cdef size_t _num_array_CA3_pyCAN_r = len(_namespace['_array_CA3_pyCAN_r']) cdef double r _var_second = _namespace["_var_second"] cdef double second = _namespace["second"] _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] _var_size = _namespace["_var_size"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_size = _namespace['_array_CA3_pyCAN_size'] cdef double * _array_CA3_pyCAN_size = _buf__array_CA3_pyCAN_size.data cdef size_t _num_array_CA3_pyCAN_size = len(_namespace['_array_CA3_pyCAN_size']) cdef double size _var_t = _namespace["_var_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double t _var_tau_Cl = _namespace["_var_tau_Cl"] cdef double tau_Cl = _namespace["tau_Cl"] _var_ufarad = _namespace["_var_ufarad"] cdef double ufarad = _namespace["ufarad"] _var_umetre = _namespace["_var_umetre"] cdef double umetre = _namespace["umetre"] _var_v = _namespace["_var_v"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_v = _namespace['_array_CA3_pyCAN_v'] cdef double * _array_CA3_pyCAN_v = _buf__array_CA3_pyCAN_v.data cdef size_t _num_array_CA3_pyCAN_v = len(_namespace['_array_CA3_pyCAN_v']) cdef double v cdef double _BA_Ca_i cdef double _BA_ge cdef double _BA_ge_ext cdef double _BA_ge_hipp cdef double _BA_gi cdef int64_t _BA_glu cdef double _BA_h cdef double _BA_hCaL cdef double _BA_m cdef double _BA_mCAN cdef double _BA_mCaL cdef double _BA_n cdef double _BA_p cdef double _BA_v cdef double _Ca_i cdef double _Cl cdef double _ge cdef double _ge_ext cdef double _ge_hipp cdef double _gi cdef double _glu cdef double _h cdef double _hCaL cdef double _he cdef double _he_ext cdef double _he_hipp cdef double _hi cdef int64_t _lio_1 cdef int64_t _lio_10 cdef double _lio_11 cdef double _lio_12 cdef double _lio_13 cdef double _lio_14 cdef double _lio_15 cdef double _lio_16 cdef double _lio_17 cdef double _lio_18 cdef double _lio_19 cdef double _lio_2 cdef double _lio_20 cdef double _lio_21 cdef double _lio_22 cdef double _lio_23 cdef double _lio_24 cdef double _lio_25 cdef double _lio_26 cdef double _lio_27 cdef double _lio_28 cdef double _lio_29 cdef double _lio_3 cdef double _lio_30 cdef double _lio_31 cdef double _lio_32 cdef double _lio_33 cdef double _lio_34 cdef double _lio_35 cdef double _lio_36 cdef double _lio_37 cdef double _lio_38 cdef double _lio_39 cdef double _lio_4 cdef double _lio_40 cdef double _lio_41 cdef double _lio_42 cdef double _lio_43 cdef double _lio_44 cdef double _lio_45 cdef double _lio_46 cdef double _lio_47 cdef double _lio_48 cdef double _lio_49 cdef double _lio_5 cdef double _lio_50 cdef double _lio_51 cdef double _lio_52 cdef double _lio_53 cdef double _lio_54 cdef double _lio_55 cdef double _lio_56 cdef double _lio_57 cdef double _lio_58 cdef double _lio_59 cdef double _lio_6 cdef double _lio_60 cdef double _lio_61 cdef double _lio_62 cdef double _lio_63 cdef double _lio_64 cdef double _lio_65 cdef double _lio_66 cdef double _lio_67 cdef double _lio_68 cdef double _lio_69 cdef double _lio_7 cdef double _lio_8 cdef double _lio_9 cdef double _m cdef double _mCAN cdef double _mCaL cdef double _n cdef double _p cdef double _v if '_owner' in _namespace: _owner = _namespace['_owner'] # scalar code _vectorisation_idx = 1 t = _array_defaultclock_t[0] dt = _array_defaultclock_dt[0] _BA_glu = - 1 _lio_1 = _timestep(0.003, dt) _lio_2 = (- 200.0) * ms _lio_3 = (1.2e-06 * mole) / ((metre ** 3) * ms) _lio_4 = (0.000621832540496844 * ((mV * mole) * siemens)) / (((cm ** 4) * coulomb) * umetre) _lio_5 = (5.1819378374737e-06 * (mole * siemens)) / (((cm ** 4) * coulomb) * umetre) _lio_6 = exp((0.005 * (- dt)) / ms) _lio_7 = exp((- dt) / tau_Cl) _lio_8 = exp(((- 3.33333333333333) * dt) / ms) _lio_9 = exp(((- 1.0) * dt) / ms) _lio_10 = - _BA_glu _lio_11 = exp((0.3333333333333333 * (- dt)) / second) _lio_12 = 0.015501226546218206 / ms _lio_13 = 0.05555555555555555 / mV _lio_14 = ms * 0.049787068367863944 _lio_15 = 0.2 / mV _lio_16 = 1.0 / mV _lio_17 = 0.00035237057471222975 / ms _lio_18 = 0.02 / mV _lio_19 = ms * 0.5852511043074123 _lio_20 = 0.03571428571428571 / mV _lio_21 = exp((0.2 * (- dt)) / ms) _lio_22 = exp((0.1 * (- dt)) / ms) _lio_23 = (- 13.44) * mV _lio_24 = ((- 1.0) * mV) * ms _lio_25 = (mV * ms) * 2.7536449349747158e-05 _lio_26 = 0.25 / mV _lio_27 = (- 4.2) * mV _lio_28 = 0.0 - (mV * ms) _lio_29 = (mV * ms) * 20.085536923187668 _lio_30 = 13.44 * mV _lio_31 = 2979543.50191749 * (metre ** 12) _lio_32 = 0.0002 * ((mole ** 4) * ms) _lio_33 = 800.0 * (((metre ** 6) * (mole ** 2)) * ms) _lio_34 = 0.744885875479373 * (metre ** 6) _lio_35 = 0.0002 * ((mole ** 2) * ms) _lio_36 = 800.0 * ((metre ** 6) * ms) _lio_37 = 0.0 - (0.000931107344349216 / ms) _lio_38 = ((- 3724.42937739686) * (metre ** 6)) / ((mole ** 2) * ms) _lio_39 = (- 1.485) * mV _lio_40 = 0.000820773673798214 * (mV * ms) _lio_41 = (- 0.263157894736842) / mV _lio_42 = 1.485 * mV _lio_43 = 0.011405722114984784 / ms _lio_44 = (- 1.28) * mV _lio_45 = (mV * ms) * 0.00033546262790251185 _lio_46 = 1.28 * mV _lio_47 = 0.16232623367917487 / ms _lio_48 = ms * 5.754602676005731 _lio_49 = 0.05 / mV _lio_50 = ms * 0.17377394345044514 _lio_51 = ms * 0.0301973834223185 _lio_52 = 0.1 / mV _lio_53 = (- 0.018990188830818912) / ms _lio_54 = 0.00017377394345044513 / ms _lio_55 = 0.0 - ((0.0007 * (mV * siemens)) / ufarad) _lio_56 = ((Ek * (cm ** 2)) * gM) / ufarad _lio_57 = (5.0 * (Ek * msiemens)) / ufarad _lio_58 = ((cm ** 2) * _timedarray(t)) / ufarad _lio_59 = (2500.0 * (mV * msiemens)) / ufarad _lio_60 = (0.012 * (mV * siemens)) / ufarad _lio_61 = (20.0 * (((cm ** 2) * gCAN) * mV)) / ufarad _lio_62 = (80.0 * ((cm ** 2) * mV)) / ufarad _lio_63 = 0.0 - ((1e-05 * siemens) / ufarad) _lio_64 = ((- (cm ** 2)) * gCAN) / ufarad _lio_65 = ((cm ** 2) * gM) / ufarad _lio_66 = (cm ** 2) / ufarad _lio_67 = (50.0 * msiemens) / ufarad _lio_68 = (0.0001 * siemens) / ufarad _lio_69 = (5.0 * msiemens) / ufarad # vector code for _idx in range(N): _vectorisation_idx = _idx gi = _array_CA3_pyCAN_gi[_idx] noise = _array_CA3_pyCAN_noise[_idx] r = _array_CA3_pyCAN_r[_idx] Cl = _array_CA3_pyCAN_Cl[_idx] mCaL = _array_CA3_pyCAN_mCaL[_idx] lastspike = _array_CA3_pyCAN_lastspike[_idx] Ca_i = _array_CA3_pyCAN_Ca_i[_idx] mCAN = _array_CA3_pyCAN_mCAN[_idx] v = _array_CA3_pyCAN_v[_idx] p = _array_CA3_pyCAN_p[_idx] ge_hipp = _array_CA3_pyCAN_ge_hipp[_idx] size = _array_CA3_pyCAN_size[_idx] m = _array_CA3_pyCAN_m[_idx] glu = _array_CA3_pyCAN_glu[_idx] h = _array_CA3_pyCAN_h[_idx] n = _array_CA3_pyCAN_n[_idx] he = _array_CA3_pyCAN_he[_idx] hi = _array_CA3_pyCAN_hi[_idx] ge = _array_CA3_pyCAN_ge[_idx] he_hipp = _array_CA3_pyCAN_he_hipp[_idx] ge_ext = _array_CA3_pyCAN_ge_ext[_idx] hCaL = _array_CA3_pyCAN_hCaL[_idx] he_ext = _array_CA3_pyCAN_he_ext[_idx] not_refractory = _timestep(t - lastspike, dt) >= _lio_1 _BA_Ca_i = _lio_2 * ((_lio_3 + (_lio_4 * ((hCaL * (mCaL ** 2)) * size))) - (_lio_5 * (((hCaL * (mCaL ** 2)) * size) * v))) _Ca_i = (- _BA_Ca_i) + (_lio_6 * (Ca_i + _BA_Ca_i)) _Cl = _lio_7 * Cl _BA_ge = (- 1.0) * he _ge = (- _BA_ge) + (_lio_8 * (_BA_ge + ge)) _BA_ge_ext = (- 1.0) * he_ext _ge_ext = (- _BA_ge_ext) + (_lio_8 * (_BA_ge_ext + ge_ext)) _BA_ge_hipp = (- 1.0) * he_hipp _ge_hipp = (- _BA_ge_hipp) + (_lio_8 * (_BA_ge_hipp + ge_hipp)) _BA_gi = (- 1.0) * hi _gi = (- _BA_gi) + (_lio_9 * (_BA_gi + gi)) _glu = _lio_10 + (_lio_11 * (_BA_glu + glu)) _BA_h = (_lio_12 * exp(_lio_13 * (- v))) / (((- 4.0) / (ms + (_lio_14 * exp(_lio_15 * (- v))))) - (_lio_12 / (exp(_lio_16 * v) ** 0.05555555555555555))) _h = (- _BA_h) + ((_BA_h + h) * exp(dt * (((- 4.0) / (ms + (_lio_14 * exp(_lio_15 * (- v))))) - (_lio_12 / (exp(_lio_16 * v) ** 0.05555555555555555))))) _BA_hCaL = (_lio_17 * exp(_lio_18 * (- v))) / (((- 0.0065) / (ms + (_lio_19 * exp(_lio_20 * (- v))))) - (_lio_17 / (exp(_lio_16 * v) ** 0.02))) _hCaL = (- _BA_hCaL) + ((_BA_hCaL + hCaL) * exp(dt * (((- 0.0065) / (ms + (_lio_19 * exp(_lio_20 * (- v))))) - (_lio_17 / (exp(_lio_16 * v) ** 0.02))))) _he = _lio_21 * he _he_ext = _lio_21 * he_ext _he_hipp = _lio_21 * he_hipp _hi = _lio_22 * hi _BA_m = ((_lio_23 / (_lio_24 + (_lio_25 * exp(_lio_26 * (- v))))) - ((0.32 * v) / (_lio_24 + (_lio_25 * exp(_lio_26 * (- v)))))) / ((((_lio_27 / (_lio_28 + (_lio_29 * exp(_lio_15 * v)))) + (_lio_30 / (_lio_24 + (_lio_25 * exp(_lio_26 * (- v)))))) + ((0.32 * v) / (_lio_24 + (_lio_25 * exp(_lio_26 * (- v)))))) - ((0.28 * v) / (_lio_28 + (_lio_29 * exp(_lio_15 * v))))) _m = (- _BA_m) + ((_BA_m + m) * exp(dt * ((((_lio_27 / (_lio_28 + (_lio_29 * exp(_lio_15 * v)))) + (_lio_30 / (_lio_24 + (_lio_25 * exp(_lio_26 * (- v)))))) + ((0.32 * v) / (_lio_24 + (_lio_25 * exp(_lio_26 * (- v)))))) - ((0.28 * v) / (_lio_28 + (_lio_29 * exp(_lio_15 * v))))))) _BA_mCAN = (((_lio_31 * (Ca_i ** 4)) / (_lio_32 + (_lio_33 * (Ca_i ** 2)))) + ((_lio_34 * (Ca_i ** 2)) / (_lio_35 + (_lio_36 * (Ca_i ** 2))))) / (_lio_37 + (_lio_38 * (Ca_i ** 2))) _mCAN = (- _BA_mCAN) + ((_BA_mCAN + mCAN) * exp(dt * (_lio_37 + (_lio_38 * (Ca_i ** 2))))) _BA_mCaL = ((_lio_39 / (_lio_24 + (_lio_40 * exp(_lio_41 * v)))) - ((0.055 * v) / (_lio_24 + (_lio_40 * exp(_lio_41 * v))))) / (((_lio_42 / (_lio_24 + (_lio_40 * exp(_lio_41 * v)))) + ((0.055 * v) / (_lio_24 + (_lio_40 * exp(_lio_41 * v))))) - (_lio_43 / (exp(_lio_16 * v) ** 0.058823529411764705))) _mCaL = (- _BA_mCaL) + ((_BA_mCaL + mCaL) * exp(dt * (((_lio_42 / (_lio_24 + (_lio_40 * exp(_lio_41 * v)))) + ((0.055 * v) / (_lio_24 + (_lio_40 * exp(_lio_41 * v))))) - (_lio_43 / (exp(_lio_16 * v) ** 0.058823529411764705))))) _BA_n = ((_lio_44 / (_lio_24 + (_lio_45 * exp(_lio_15 * (- v))))) - ((0.032 * v) / (_lio_24 + (_lio_45 * exp(_lio_15 * (- v)))))) / (((_lio_46 / (_lio_24 + (_lio_45 * exp(_lio_15 * (- v))))) + ((0.032 * v) / (_lio_24 + (_lio_45 * exp(_lio_15 * (- v)))))) - (_lio_47 / (exp(_lio_16 * v) ** 0.025))) _n = (- _BA_n) + ((_BA_n + n) * exp(dt * (((_lio_46 / (_lio_24 + (_lio_45 * exp(_lio_15 * (- v))))) + ((0.032 * v) / (_lio_24 + (_lio_45 * exp(_lio_15 * (- v)))))) - (_lio_47 / (exp(_lio_16 * v) ** 0.025))))) _BA_p = ((0.001 / ((_lio_48 * exp(_lio_49 * v)) + (_lio_50 * exp(_lio_49 * (- v))))) + ((0.018990188830818912 * exp(_lio_49 * v)) / (ms + (_lio_51 * exp(_lio_52 * (- v)))))) / ((_lio_53 * (exp(_lio_16 * v) ** 0.05)) - (_lio_54 / (exp(_lio_16 * v) ** 0.05))) _p = (- _BA_p) + ((_BA_p + p) * exp(dt * ((_lio_53 * (exp(_lio_16 * v) ** 0.05)) - (_lio_54 / (exp(_lio_16 * v) ** 0.05))))) _BA_v = ((_lio_55 + ((((((_lio_56 * p) + (_lio_57 * (n ** 4))) + ((_lio_58 * r) / size)) + (_lio_59 * (h * (m ** 3)))) + (_lio_60 * (hCaL * (mCaL ** 2)))) + noise)) - ((_lio_61 * (mCAN ** 2)) + ((_lio_62 * (gi * int_(Cl <= 0.5))) / size))) * (((_lio_63 + (_lio_64 * (mCAN ** 2))) - (((((((((_lio_65 * p) + ((_lio_66 * ge) / size)) + ((_lio_66 * ge_ext) / size)) + ((_lio_66 * ge_hipp) / size)) + ((_lio_66 * (gi * int_(Cl <= 0.5))) / size)) + ((_lio_66 * (gi * int_(Cl > 0.5))) / size)) + (_lio_67 * (h * (m ** 3)))) + (_lio_68 * (hCaL * (mCaL ** 2)))) + (_lio_69 * (n ** 4)))) ** (- 1)) _v = (- _BA_v) + ((_BA_v + v) * exp(dt * ((_lio_63 + (_lio_64 * (mCAN ** 2))) - (((((((((_lio_65 * p) + ((_lio_66 * ge) / size)) + ((_lio_66 * ge_ext) / size)) + ((_lio_66 * ge_hipp) / size)) + ((_lio_66 * (gi * int_(Cl <= 0.5))) / size)) + ((_lio_66 * (gi * int_(Cl > 0.5))) / size)) + (_lio_67 * (h * (m ** 3)))) + (_lio_68 * (hCaL * (mCaL ** 2)))) + (_lio_69 * (n ** 4)))))) Ca_i = _Ca_i Cl = _Cl ge = _ge ge_ext = _ge_ext ge_hipp = _ge_hipp gi = _gi glu = _glu h = _h hCaL = _hCaL he = _he he_ext = _he_ext he_hipp = _he_hipp hi = _hi m = _m mCAN = _mCAN mCaL = _mCaL n = _n p = _p v = _v _array_CA3_pyCAN_gi[_idx] = gi _array_CA3_pyCAN_not_refractory[_idx] = not_refractory _array_CA3_pyCAN_Cl[_idx] = Cl _array_CA3_pyCAN_mCaL[_idx] = mCaL _array_CA3_pyCAN_Ca_i[_idx] = Ca_i _array_CA3_pyCAN_mCAN[_idx] = mCAN _array_CA3_pyCAN_v[_idx] = v _array_CA3_pyCAN_p[_idx] = p _array_CA3_pyCAN_ge_hipp[_idx] = ge_hipp _array_CA3_pyCAN_m[_idx] = m _array_CA3_pyCAN_glu[_idx] = glu _array_CA3_pyCAN_h[_idx] = h _array_CA3_pyCAN_n[_idx] = n _array_CA3_pyCAN_he[_idx] = he _array_CA3_pyCAN_hi[_idx] = hi _array_CA3_pyCAN_ge[_idx] = ge _array_CA3_pyCAN_he_hipp[_idx] = he_hipp _array_CA3_pyCAN_ge_ext[_idx] = ge_ext _array_CA3_pyCAN_hCaL[_idx] = hCaL _array_CA3_pyCAN_he_ext[_idx] = he_ext before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_Ca_i = _namespace["_var_Ca_i"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_Ca_i = _namespace['_array_CA3_pyCAN_Ca_i'] cdef double * _array_CA3_pyCAN_Ca_i = _buf__array_CA3_pyCAN_Ca_i.data cdef size_t _num_array_CA3_pyCAN_Ca_i = len(_namespace['_array_CA3_pyCAN_Ca_i']) cdef double Ca_i _var_Cl = _namespace["_var_Cl"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_Cl = _namespace['_array_CA3_pyCAN_Cl'] cdef double * _array_CA3_pyCAN_Cl = _buf__array_CA3_pyCAN_Cl.data cdef size_t _num_array_CA3_pyCAN_Cl = len(_namespace['_array_CA3_pyCAN_Cl']) cdef double Cl _var_Ek = _namespace["_var_Ek"] cdef double Ek = _namespace["Ek"] _var_N = _namespace["_var_N"] cdef int64_t N = _namespace["N"] _var_cm = _namespace["_var_cm"] cdef double cm = _namespace["cm"] _var_coulomb = _namespace["_var_coulomb"] cdef double coulomb = _namespace["coulomb"] _var_dt = _namespace["_var_dt"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_dt = _namespace['_array_defaultclock_dt'] cdef double * _array_defaultclock_dt = _buf__array_defaultclock_dt.data cdef double dt = _namespace["dt"] _var_gCAN = _namespace["_var_gCAN"] cdef double gCAN = _namespace["gCAN"] _var_gM = _namespace["_var_gM"] cdef double gM = _namespace["gM"] _var_ge = _namespace["_var_ge"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_ge = _namespace['_array_CA3_pyCAN_ge'] cdef double * _array_CA3_pyCAN_ge = _buf__array_CA3_pyCAN_ge.data cdef size_t _num_array_CA3_pyCAN_ge = len(_namespace['_array_CA3_pyCAN_ge']) cdef double ge _var_ge_ext = _namespace["_var_ge_ext"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_ge_ext = _namespace['_array_CA3_pyCAN_ge_ext'] cdef double * _array_CA3_pyCAN_ge_ext = _buf__array_CA3_pyCAN_ge_ext.data cdef size_t _num_array_CA3_pyCAN_ge_ext = len(_namespace['_array_CA3_pyCAN_ge_ext']) cdef double ge_ext _var_ge_hipp = _namespace["_var_ge_hipp"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_ge_hipp = _namespace['_array_CA3_pyCAN_ge_hipp'] cdef double * _array_CA3_pyCAN_ge_hipp = _buf__array_CA3_pyCAN_ge_hipp.data cdef size_t _num_array_CA3_pyCAN_ge_hipp = len(_namespace['_array_CA3_pyCAN_ge_hipp']) cdef double ge_hipp _var_gi = _namespace["_var_gi"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_gi = _namespace['_array_CA3_pyCAN_gi'] cdef double * _array_CA3_pyCAN_gi = _buf__array_CA3_pyCAN_gi.data cdef size_t _num_array_CA3_pyCAN_gi = len(_namespace['_array_CA3_pyCAN_gi']) cdef double gi _var_glu = _namespace["_var_glu"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_glu = _namespace['_array_CA3_pyCAN_glu'] cdef double * _array_CA3_pyCAN_glu = _buf__array_CA3_pyCAN_glu.data cdef size_t _num_array_CA3_pyCAN_glu = len(_namespace['_array_CA3_pyCAN_glu']) cdef double glu _var_h = _namespace["_var_h"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_h = _namespace['_array_CA3_pyCAN_h'] cdef double * _array_CA3_pyCAN_h = _buf__array_CA3_pyCAN_h.data cdef size_t _num_array_CA3_pyCAN_h = len(_namespace['_array_CA3_pyCAN_h']) cdef double h _var_hCaL = _namespace["_var_hCaL"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_hCaL = _namespace['_array_CA3_pyCAN_hCaL'] cdef double * _array_CA3_pyCAN_hCaL = _buf__array_CA3_pyCAN_hCaL.data cdef size_t _num_array_CA3_pyCAN_hCaL = len(_namespace['_array_CA3_pyCAN_hCaL']) cdef double hCaL _var_he = _namespace["_var_he"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_he = _namespace['_array_CA3_pyCAN_he'] cdef double * _array_CA3_pyCAN_he = _buf__array_CA3_pyCAN_he.data cdef size_t _num_array_CA3_pyCAN_he = len(_namespace['_array_CA3_pyCAN_he']) cdef double he _var_he_ext = _namespace["_var_he_ext"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_he_ext = _namespace['_array_CA3_pyCAN_he_ext'] cdef double * _array_CA3_pyCAN_he_ext = _buf__array_CA3_pyCAN_he_ext.data cdef size_t _num_array_CA3_pyCAN_he_ext = len(_namespace['_array_CA3_pyCAN_he_ext']) cdef double he_ext _var_he_hipp = _namespace["_var_he_hipp"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_he_hipp = _namespace['_array_CA3_pyCAN_he_hipp'] cdef double * _array_CA3_pyCAN_he_hipp = _buf__array_CA3_pyCAN_he_hipp.data cdef size_t _num_array_CA3_pyCAN_he_hipp = len(_namespace['_array_CA3_pyCAN_he_hipp']) cdef double he_hipp _var_hi = _namespace["_var_hi"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_hi = _namespace['_array_CA3_pyCAN_hi'] cdef double * _array_CA3_pyCAN_hi = _buf__array_CA3_pyCAN_hi.data cdef size_t _num_array_CA3_pyCAN_hi = len(_namespace['_array_CA3_pyCAN_hi']) cdef double hi # namespace for function inputs_stim global _namespace_timedarray_values global _namespace_num_timedarray_values cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__timedarray_values = _namespace['_timedarray_values'] _namespace_timedarray_values = _buf__timedarray_values.data _namespace_num_timedarray_values = len(_namespace['_timedarray_values']) _var_lastspike = _namespace["_var_lastspike"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_lastspike = _namespace['_array_CA3_pyCAN_lastspike'] cdef double * _array_CA3_pyCAN_lastspike = _buf__array_CA3_pyCAN_lastspike.data cdef size_t _num_array_CA3_pyCAN_lastspike = len(_namespace['_array_CA3_pyCAN_lastspike']) cdef double lastspike _var_m = _namespace["_var_m"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_m = _namespace['_array_CA3_pyCAN_m'] cdef double * _array_CA3_pyCAN_m = _buf__array_CA3_pyCAN_m.data cdef size_t _num_array_CA3_pyCAN_m = len(_namespace['_array_CA3_pyCAN_m']) cdef double m _var_mCAN = _namespace["_var_mCAN"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_mCAN = _namespace['_array_CA3_pyCAN_mCAN'] cdef double * _array_CA3_pyCAN_mCAN = _buf__array_CA3_pyCAN_mCAN.data cdef size_t _num_array_CA3_pyCAN_mCAN = len(_namespace['_array_CA3_pyCAN_mCAN']) cdef double mCAN _var_mCaL = _namespace["_var_mCaL"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_mCaL = _namespace['_array_CA3_pyCAN_mCaL'] cdef double * _array_CA3_pyCAN_mCaL = _buf__array_CA3_pyCAN_mCaL.data cdef size_t _num_array_CA3_pyCAN_mCaL = len(_namespace['_array_CA3_pyCAN_mCaL']) cdef double mCaL _var_mV = _namespace["_var_mV"] cdef double mV = _namespace["mV"] _var_metre = _namespace["_var_metre"] cdef double metre = _namespace["metre"] _var_mole = _namespace["_var_mole"] cdef double mole = _namespace["mole"] _var_ms = _namespace["_var_ms"] cdef double ms = _namespace["ms"] _var_msiemens = _namespace["_var_msiemens"] cdef double msiemens = _namespace["msiemens"] _var_n = _namespace["_var_n"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_n = _namespace['_array_CA3_pyCAN_n'] cdef double * _array_CA3_pyCAN_n = _buf__array_CA3_pyCAN_n.data cdef size_t _num_array_CA3_pyCAN_n = len(_namespace['_array_CA3_pyCAN_n']) cdef double n _var_noise = _namespace["_var_noise"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_noise = _namespace['_array_CA3_pyCAN_noise'] cdef double * _array_CA3_pyCAN_noise = _buf__array_CA3_pyCAN_noise.data cdef size_t _num_array_CA3_pyCAN_noise = len(_namespace['_array_CA3_pyCAN_noise']) cdef double noise _var_not_refractory = _namespace["_var_not_refractory"] cdef _numpy.ndarray[char, ndim=1, mode='c', cast=True] _buf__array_CA3_pyCAN_not_refractory = _namespace['_array_CA3_pyCAN_not_refractory'] cdef bool * _array_CA3_pyCAN_not_refractory = _buf__array_CA3_pyCAN_not_refractory.data cdef size_t _num_array_CA3_pyCAN_not_refractory = len(_namespace['_array_CA3_pyCAN_not_refractory']) cdef bool not_refractory _var_p = _namespace["_var_p"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_p = _namespace['_array_CA3_pyCAN_p'] cdef double * _array_CA3_pyCAN_p = _buf__array_CA3_pyCAN_p.data cdef size_t _num_array_CA3_pyCAN_p = len(_namespace['_array_CA3_pyCAN_p']) cdef double p _var_r = _namespace["_var_r"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_r = _namespace['_array_CA3_pyCAN_r'] cdef double * _array_CA3_pyCAN_r = _buf__array_CA3_pyCAN_r.data cdef size_t _num_array_CA3_pyCAN_r = len(_namespace['_array_CA3_pyCAN_r']) cdef double r _var_second = _namespace["_var_second"] cdef double second = _namespace["second"] _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] _var_size = _namespace["_var_size"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_size = _namespace['_array_CA3_pyCAN_size'] cdef double * _array_CA3_pyCAN_size = _buf__array_CA3_pyCAN_size.data cdef size_t _num_array_CA3_pyCAN_size = len(_namespace['_array_CA3_pyCAN_size']) cdef double size _var_t = _namespace["_var_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double t _var_tau_Cl = _namespace["_var_tau_Cl"] cdef double tau_Cl = _namespace["tau_Cl"] _var_ufarad = _namespace["_var_ufarad"] cdef double ufarad = _namespace["ufarad"] _var_umetre = _namespace["_var_umetre"] cdef double umetre = _namespace["umetre"] _var_v = _namespace["_var_v"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_v = _namespace['_array_CA3_pyCAN_v'] cdef double * _array_CA3_pyCAN_v = _buf__array_CA3_pyCAN_v.data cdef size_t _num_array_CA3_pyCAN_v = len(_namespace['_array_CA3_pyCAN_v']) cdef double v cdef double _BA_Ca_i cdef double _BA_ge cdef double _BA_ge_ext cdef double _BA_ge_hipp cdef double _BA_gi cdef int64_t _BA_glu cdef double _BA_h cdef double _BA_hCaL cdef double _BA_m cdef double _BA_mCAN cdef double _BA_mCaL cdef double _BA_n cdef double _BA_p cdef double _BA_v cdef double _Ca_i cdef double _Cl cdef double _ge cdef double _ge_ext cdef double _ge_hipp cdef double _gi cdef double _glu cdef double _h cdef double _hCaL cdef double _he cdef double _he_ext cdef double _he_hipp cdef double _hi cdef int64_t _lio_1 cdef int64_t _lio_10 cdef double _lio_11 cdef double _lio_12 cdef double _lio_13 cdef double _lio_14 cdef double _lio_15 cdef double _lio_16 cdef double _lio_17 cdef double _lio_18 cdef double _lio_19 cdef double _lio_2 cdef double _lio_20 cdef double _lio_21 cdef double _lio_22 cdef double _lio_23 cdef double _lio_24 cdef double _lio_25 cdef double _lio_26 cdef double _lio_27 cdef double _lio_28 cdef double _lio_29 cdef double _lio_3 cdef double _lio_30 cdef double _lio_31 cdef double _lio_32 cdef double _lio_33 cdef double _lio_34 cdef double _lio_35 cdef double _lio_36 cdef double _lio_37 cdef double _lio_38 cdef double _lio_39 cdef double _lio_4 cdef double _lio_40 cdef double _lio_41 cdef double _lio_42 cdef double _lio_43 cdef double _lio_44 cdef double _lio_45 cdef double _lio_46 cdef double _lio_47 cdef double _lio_48 cdef double _lio_49 cdef double _lio_5 cdef double _lio_50 cdef double _lio_51 cdef double _lio_52 cdef double _lio_53 cdef double _lio_54 cdef double _lio_55 cdef double _lio_56 cdef double _lio_57 cdef double _lio_58 cdef double _lio_59 cdef double _lio_6 cdef double _lio_60 cdef double _lio_61 cdef double _lio_62 cdef double _lio_63 cdef double _lio_64 cdef double _lio_65 cdef double _lio_66 cdef double _lio_67 cdef double _lio_68 cdef double _lio_69 cdef double _lio_7 cdef double _lio_8 cdef double _lio_9 cdef double _m cdef double _mCAN cdef double _mCaL cdef double _n cdef double _p cdef double _v if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_Ca_i = _namespace["_var_Ca_i"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_Ca_i = _namespace['_array_CA3_pyCAN_Ca_i'] cdef double * _array_CA3_pyCAN_Ca_i = _buf__array_CA3_pyCAN_Ca_i.data cdef size_t _num_array_CA3_pyCAN_Ca_i = len(_namespace['_array_CA3_pyCAN_Ca_i']) cdef double Ca_i _var_Cl = _namespace["_var_Cl"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_Cl = _namespace['_array_CA3_pyCAN_Cl'] cdef double * _array_CA3_pyCAN_Cl = _buf__array_CA3_pyCAN_Cl.data cdef size_t _num_array_CA3_pyCAN_Cl = len(_namespace['_array_CA3_pyCAN_Cl']) cdef double Cl _var_Ek = _namespace["_var_Ek"] cdef double Ek = _namespace["Ek"] _var_N = _namespace["_var_N"] cdef int64_t N = _namespace["N"] _var_cm = _namespace["_var_cm"] cdef double cm = _namespace["cm"] _var_coulomb = _namespace["_var_coulomb"] cdef double coulomb = _namespace["coulomb"] _var_dt = _namespace["_var_dt"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_dt = _namespace['_array_defaultclock_dt'] cdef double * _array_defaultclock_dt = _buf__array_defaultclock_dt.data cdef double dt = _namespace["dt"] _var_gCAN = _namespace["_var_gCAN"] cdef double gCAN = _namespace["gCAN"] _var_gM = _namespace["_var_gM"] cdef double gM = _namespace["gM"] _var_ge = _namespace["_var_ge"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_ge = _namespace['_array_CA3_pyCAN_ge'] cdef double * _array_CA3_pyCAN_ge = _buf__array_CA3_pyCAN_ge.data cdef size_t _num_array_CA3_pyCAN_ge = len(_namespace['_array_CA3_pyCAN_ge']) cdef double ge _var_ge_ext = _namespace["_var_ge_ext"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_ge_ext = _namespace['_array_CA3_pyCAN_ge_ext'] cdef double * _array_CA3_pyCAN_ge_ext = _buf__array_CA3_pyCAN_ge_ext.data cdef size_t _num_array_CA3_pyCAN_ge_ext = len(_namespace['_array_CA3_pyCAN_ge_ext']) cdef double ge_ext _var_ge_hipp = _namespace["_var_ge_hipp"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_ge_hipp = _namespace['_array_CA3_pyCAN_ge_hipp'] cdef double * _array_CA3_pyCAN_ge_hipp = _buf__array_CA3_pyCAN_ge_hipp.data cdef size_t _num_array_CA3_pyCAN_ge_hipp = len(_namespace['_array_CA3_pyCAN_ge_hipp']) cdef double ge_hipp _var_gi = _namespace["_var_gi"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_gi = _namespace['_array_CA3_pyCAN_gi'] cdef double * _array_CA3_pyCAN_gi = _buf__array_CA3_pyCAN_gi.data cdef size_t _num_array_CA3_pyCAN_gi = len(_namespace['_array_CA3_pyCAN_gi']) cdef double gi _var_glu = _namespace["_var_glu"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_glu = _namespace['_array_CA3_pyCAN_glu'] cdef double * _array_CA3_pyCAN_glu = _buf__array_CA3_pyCAN_glu.data cdef size_t _num_array_CA3_pyCAN_glu = len(_namespace['_array_CA3_pyCAN_glu']) cdef double glu _var_h = _namespace["_var_h"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_h = _namespace['_array_CA3_pyCAN_h'] cdef double * _array_CA3_pyCAN_h = _buf__array_CA3_pyCAN_h.data cdef size_t _num_array_CA3_pyCAN_h = len(_namespace['_array_CA3_pyCAN_h']) cdef double h _var_hCaL = _namespace["_var_hCaL"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_hCaL = _namespace['_array_CA3_pyCAN_hCaL'] cdef double * _array_CA3_pyCAN_hCaL = _buf__array_CA3_pyCAN_hCaL.data cdef size_t _num_array_CA3_pyCAN_hCaL = len(_namespace['_array_CA3_pyCAN_hCaL']) cdef double hCaL _var_he = _namespace["_var_he"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_he = _namespace['_array_CA3_pyCAN_he'] cdef double * _array_CA3_pyCAN_he = _buf__array_CA3_pyCAN_he.data cdef size_t _num_array_CA3_pyCAN_he = len(_namespace['_array_CA3_pyCAN_he']) cdef double he _var_he_ext = _namespace["_var_he_ext"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_he_ext = _namespace['_array_CA3_pyCAN_he_ext'] cdef double * _array_CA3_pyCAN_he_ext = _buf__array_CA3_pyCAN_he_ext.data cdef size_t _num_array_CA3_pyCAN_he_ext = len(_namespace['_array_CA3_pyCAN_he_ext']) cdef double he_ext _var_he_hipp = _namespace["_var_he_hipp"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_he_hipp = _namespace['_array_CA3_pyCAN_he_hipp'] cdef double * _array_CA3_pyCAN_he_hipp = _buf__array_CA3_pyCAN_he_hipp.data cdef size_t _num_array_CA3_pyCAN_he_hipp = len(_namespace['_array_CA3_pyCAN_he_hipp']) cdef double he_hipp _var_hi = _namespace["_var_hi"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_hi = _namespace['_array_CA3_pyCAN_hi'] cdef double * _array_CA3_pyCAN_hi = _buf__array_CA3_pyCAN_hi.data cdef size_t _num_array_CA3_pyCAN_hi = len(_namespace['_array_CA3_pyCAN_hi']) cdef double hi # namespace for function inputs_stim global _namespace_timedarray_values global _namespace_num_timedarray_values cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__timedarray_values = _namespace['_timedarray_values'] _namespace_timedarray_values = _buf__timedarray_values.data _namespace_num_timedarray_values = len(_namespace['_timedarray_values']) _var_lastspike = _namespace["_var_lastspike"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_lastspike = _namespace['_array_CA3_pyCAN_lastspike'] cdef double * _array_CA3_pyCAN_lastspike = _buf__array_CA3_pyCAN_lastspike.data cdef size_t _num_array_CA3_pyCAN_lastspike = len(_namespace['_array_CA3_pyCAN_lastspike']) cdef double lastspike _var_m = _namespace["_var_m"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_m = _namespace['_array_CA3_pyCAN_m'] cdef double * _array_CA3_pyCAN_m = _buf__array_CA3_pyCAN_m.data cdef size_t _num_array_CA3_pyCAN_m = len(_namespace['_array_CA3_pyCAN_m']) cdef double m _var_mCAN = _namespace["_var_mCAN"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_mCAN = _namespace['_array_CA3_pyCAN_mCAN'] cdef double * _array_CA3_pyCAN_mCAN = _buf__array_CA3_pyCAN_mCAN.data cdef size_t _num_array_CA3_pyCAN_mCAN = len(_namespace['_array_CA3_pyCAN_mCAN']) cdef double mCAN _var_mCaL = _namespace["_var_mCaL"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_mCaL = _namespace['_array_CA3_pyCAN_mCaL'] cdef double * _array_CA3_pyCAN_mCaL = _buf__array_CA3_pyCAN_mCaL.data cdef size_t _num_array_CA3_pyCAN_mCaL = len(_namespace['_array_CA3_pyCAN_mCaL']) cdef double mCaL _var_mV = _namespace["_var_mV"] cdef double mV = _namespace["mV"] _var_metre = _namespace["_var_metre"] cdef double metre = _namespace["metre"] _var_mole = _namespace["_var_mole"] cdef double mole = _namespace["mole"] _var_ms = _namespace["_var_ms"] cdef double ms = _namespace["ms"] _var_msiemens = _namespace["_var_msiemens"] cdef double msiemens = _namespace["msiemens"] _var_n = _namespace["_var_n"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_n = _namespace['_array_CA3_pyCAN_n'] cdef double * _array_CA3_pyCAN_n = _buf__array_CA3_pyCAN_n.data cdef size_t _num_array_CA3_pyCAN_n = len(_namespace['_array_CA3_pyCAN_n']) cdef double n _var_noise = _namespace["_var_noise"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_noise = _namespace['_array_CA3_pyCAN_noise'] cdef double * _array_CA3_pyCAN_noise = _buf__array_CA3_pyCAN_noise.data cdef size_t _num_array_CA3_pyCAN_noise = len(_namespace['_array_CA3_pyCAN_noise']) cdef double noise _var_not_refractory = _namespace["_var_not_refractory"] cdef _numpy.ndarray[char, ndim=1, mode='c', cast=True] _buf__array_CA3_pyCAN_not_refractory = _namespace['_array_CA3_pyCAN_not_refractory'] cdef bool * _array_CA3_pyCAN_not_refractory = _buf__array_CA3_pyCAN_not_refractory.data cdef size_t _num_array_CA3_pyCAN_not_refractory = len(_namespace['_array_CA3_pyCAN_not_refractory']) cdef bool not_refractory _var_p = _namespace["_var_p"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_p = _namespace['_array_CA3_pyCAN_p'] cdef double * _array_CA3_pyCAN_p = _buf__array_CA3_pyCAN_p.data cdef size_t _num_array_CA3_pyCAN_p = len(_namespace['_array_CA3_pyCAN_p']) cdef double p _var_r = _namespace["_var_r"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_r = _namespace['_array_CA3_pyCAN_r'] cdef double * _array_CA3_pyCAN_r = _buf__array_CA3_pyCAN_r.data cdef size_t _num_array_CA3_pyCAN_r = len(_namespace['_array_CA3_pyCAN_r']) cdef double r _var_second = _namespace["_var_second"] cdef double second = _namespace["second"] _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] _var_size = _namespace["_var_size"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_size = _namespace['_array_CA3_pyCAN_size'] cdef double * _array_CA3_pyCAN_size = _buf__array_CA3_pyCAN_size.data cdef size_t _num_array_CA3_pyCAN_size = len(_namespace['_array_CA3_pyCAN_size']) cdef double size _var_t = _namespace["_var_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double t _var_tau_Cl = _namespace["_var_tau_Cl"] cdef double tau_Cl = _namespace["tau_Cl"] _var_ufarad = _namespace["_var_ufarad"] cdef double ufarad = _namespace["ufarad"] _var_umetre = _namespace["_var_umetre"] cdef double umetre = _namespace["umetre"] _var_v = _namespace["_var_v"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_v = _namespace['_array_CA3_pyCAN_v'] cdef double * _array_CA3_pyCAN_v = _buf__array_CA3_pyCAN_v.data cdef size_t _num_array_CA3_pyCAN_v = len(_namespace['_array_CA3_pyCAN_v']) cdef double v cdef double _BA_Ca_i cdef double _BA_ge cdef double _BA_ge_ext cdef double _BA_ge_hipp cdef double _BA_gi cdef int64_t _BA_glu cdef double _BA_h cdef double _BA_hCaL cdef double _BA_m cdef double _BA_mCAN cdef double _BA_mCaL cdef double _BA_n cdef double _BA_p cdef double _BA_v cdef double _Ca_i cdef double _Cl cdef double _ge cdef double _ge_ext cdef double _ge_hipp cdef double _gi cdef double _glu cdef double _h cdef double _hCaL cdef double _he cdef double _he_ext cdef double _he_hipp cdef double _hi cdef int64_t _lio_1 cdef int64_t _lio_10 cdef double _lio_11 cdef double _lio_12 cdef double _lio_13 cdef double _lio_14 cdef double _lio_15 cdef double _lio_16 cdef double _lio_17 cdef double _lio_18 cdef double _lio_19 cdef double _lio_2 cdef double _lio_20 cdef double _lio_21 cdef double _lio_22 cdef double _lio_23 cdef double _lio_24 cdef double _lio_25 cdef double _lio_26 cdef double _lio_27 cdef double _lio_28 cdef double _lio_29 cdef double _lio_3 cdef double _lio_30 cdef double _lio_31 cdef double _lio_32 cdef double _lio_33 cdef double _lio_34 cdef double _lio_35 cdef double _lio_36 cdef double _lio_37 cdef double _lio_38 cdef double _lio_39 cdef double _lio_4 cdef double _lio_40 cdef double _lio_41 cdef double _lio_42 cdef double _lio_43 cdef double _lio_44 cdef double _lio_45 cdef double _lio_46 cdef double _lio_47 cdef double _lio_48 cdef double _lio_49 cdef double _lio_5 cdef double _lio_50 cdef double _lio_51 cdef double _lio_52 cdef double _lio_53 cdef double _lio_54 cdef double _lio_55 cdef double _lio_56 cdef double _lio_57 cdef double _lio_58 cdef double _lio_59 cdef double _lio_6 cdef double _lio_60 cdef double _lio_61 cdef double _lio_62 cdef double _lio_63 cdef double _lio_64 cdef double _lio_65 cdef double _lio_66 cdef double _lio_67 cdef double _lio_68 cdef double _lio_69 cdef double _lio_7 cdef double _lio_8 cdef double _lio_9 cdef double _m cdef double _mCAN cdef double _mCaL cdef double _n cdef double _p cdef double _v if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:15:14,191 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name CA3_pyCAN_stateupdater_codeobject 2021-11-05 15:15:14,192 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "CA3_pyCAN_stateupdate" using Cython module "_cython_magic_d5596b59fa5866126ef0f73d400fc8d8" 2021-11-05 15:15:14,192 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140606217357296 on /home/nikos/.cython/brian_extensions/_cython_magic_d5596b59fa5866126ef0f73d400fc8d8.lock 2021-11-05 15:15:14,192 DEBUG brian2.utils.filelock: Lock 140606217357296 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_d5596b59fa5866126ef0f73d400fc8d8.lock 2021-11-05 15:15:16,835 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140606217357296 on /home/nikos/.cython/brian_extensions/_cython_magic_d5596b59fa5866126ef0f73d400fc8d8.lock 2021-11-05 15:15:16,835 DEBUG brian2.utils.filelock: Lock 140606217357296 released on /home/nikos/.cython/brian_extensions/_cython_magic_d5596b59fa5866126ef0f73d400fc8d8.lock 2021-11-05 15:15:16,849 DEBUG brian2.stateupdaters.base.method_choice: Group DG_inh: using numerical integration method exponential_euler (took 0.01s) 2021-11-05 15:15:16,849 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=DG_inh, template name=stateupdate) for abstract code: not_refractory = timestep(t - lastspike, dt) >= timestep(0.003000, dt) _BA_ge = -1.0*he _ge = -_BA_ge + (_BA_ge + ge)*exp(-3.33333333333333*dt/ms) _BA_ge_ext = -1.0*he_ext _ge_ext = -_BA_ge_ext + (_BA_ge_ext + ge_ext)*exp(-3.33333333333333*dt/ms) _BA_ge_hipp = -1.0*he_hipp _ge_hipp = -_BA_ge_hipp + (_BA_ge_hipp + ge_hipp)*exp(-3.33333333333333*dt/ms) _BA_gi = -1.0*hi _gi = -_BA_gi + (_BA_gi + gi)*exp(-1.0*dt/ms) _BA_h = (0.35/(0.060810062625218*ms**2*exp(29/10)/(1.0*ms*exp(0.05*v/mV) + 0.060810062625218*ms*exp(-0.05*v/mV)) + 1.0*ms**2*exp(29/10)*exp(v/(20*mV))/(1.0*ms + 0.060810062625218*ms*exp(-0.1*v/mV)) + 0.07*ms + 0.00425670438376526*ms*exp(-0.1*v/mV)) + 0.0245/(1.0*ms**2*exp(29/5)*exp(v/(10*mV))/(1.0*ms + 0.060810062625218*ms*exp(-0.1*v/mV)) + 0.07*ms*exp(29/10)*exp(v/(20*mV))))/(-5.0/(1.0*ms + 0.060810062625218*ms*exp(-0.1*v/mV)) - 0.35*exp(-29/10)/(ms*exp(v/mV)**(1/20))) _h = -_BA_h + (_BA_h + h)*exp(dt*(-5.0/(1.0*ms + 0.060810062625218*ms*exp(-0.1*v/mV)) - 0.35*exp(-29/10)/(ms*exp(v/mV)**(1/20)))) _he = he*exp(-dt/(5*ms)) _he_ext = he_ext*exp(-dt/(5*ms)) _he_hipp = he_hipp*exp(-dt/(5*ms)) _hi = hi*exp(-dt/(10*ms)) _BA_m = (61.25*mV**2/(-7.0*mV**3*ms**2/(1.0*mV*ms*exp(7/2)*exp(v/(10*mV)) - mV*ms) + 3.5*mV**3*ms**2/(-mV*ms*exp(7/2)*exp(v/(10*mV)) + 1.0*mV*ms*exp(7)*exp(v/(5*mV))) + 3.5*mV**3*ms**2/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) - 0.2*mV**2*ms**2*v/(1.0*mV*ms*exp(7/2)*exp(v/(10*mV)) - mV*ms) + 0.1*mV**2*ms**2*v/(-mV*ms*exp(7/2)*exp(v/(10*mV)) + 1.0*mV*ms*exp(7)*exp(v/(5*mV))) + 0.1*mV**2*ms**2*v/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) + 4.0*mV**2*ms*exp(-10/3)*exp(-v/(18*mV)) - 8.0*mV**2*ms*exp(-41/6)*exp(-7*v/(45*mV)) + 4*mV**2*ms*exp(-31/3)*exp(-23*v/(90*mV))) + 3.5*mV*v/(-7.0*mV**3*ms**2/(1.0*mV*ms*exp(7/2)*exp(v/(10*mV)) - mV*ms) + 3.5*mV**3*ms**2/(-mV*ms*exp(7/2)*exp(v/(10*mV)) + 1.0*mV*ms*exp(7)*exp(v/(5*mV))) + 3.5*mV**3*ms**2/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) - 0.2*mV**2*ms**2*v/(1.0*mV*ms*exp(7/2)*exp(v/(10*mV)) - mV*ms) + 0.1*mV**2*ms**2*v/(-mV*ms*exp(7/2)*exp(v/(10*mV)) + 1.0*mV*ms*exp(7)*exp(v/(5*mV))) + 0.1*mV**2*ms**2*v/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) + 4.0*mV**2*ms*exp(-10/3)*exp(-v/(18*mV)) - 8.0*mV**2*ms*exp(-41/6)*exp(-7*v/(45*mV)) + 4*mV**2*ms*exp(-31/3)*exp(-23*v/(90*mV))) + 70.0*mV/(-3.5*mV**2*ms**2*exp(10/3)*exp(v/(18*mV))/(1.0*mV*ms*exp(7/2)*exp(v/(10*mV)) - mV*ms) + 3.5*mV**2*ms**2*exp(10/3)*exp(v/(18*mV))/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) - 0.1*mV*ms**2*v*exp(10/3)*exp(v/(18*mV))/(1.0*mV*ms*exp(7/2)*exp(v/(10*mV)) - mV*ms) + 0.1*mV*ms**2*v*exp(10/3)*exp(v/(18*mV))/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) + 4.0*mV*ms - 4*mV*ms*exp(-7/2)*exp(-v/(10*mV))) + 0.05*v**2/(-7.0*mV**3*ms**2/(1.0*mV*ms*exp(7/2)*exp(v/(10*mV)) - mV*ms) + 3.5*mV**3*ms**2/(-mV*ms*exp(7/2)*exp(v/(10*mV)) + 1.0*mV*ms*exp(7)*exp(v/(5*mV))) + 3.5*mV**3*ms**2/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) - 0.2*mV**2*ms**2*v/(1.0*mV*ms*exp(7/2)*exp(v/(10*mV)) - mV*ms) + 0.1*mV**2*ms**2*v/(-mV*ms*exp(7/2)*exp(v/(10*mV)) + 1.0*mV*ms*exp(7)*exp(v/(5*mV))) + 0.1*mV**2*ms**2*v/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) + 4.0*mV**2*ms*exp(-10/3)*exp(-v/(18*mV)) - 8.0*mV**2*ms*exp(-41/6)*exp(-7*v/(45*mV)) + 4*mV**2*ms*exp(-31/3)*exp(-23*v/(90*mV))) + 2.0*v/(-3.5*mV**2*ms**2*exp(10/3)*exp(v/(18*mV))/(1.0*mV*ms*exp(7/2)*exp(v/(10*mV)) - mV*ms) + 3.5*mV**2*ms**2*exp(10/3)*exp(v/(18*mV))/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) - 0.1*mV*ms**2*v*exp(10/3)*exp(v/(18*mV))/(1.0*mV*ms*exp(7/2)*exp(v/(10*mV)) - mV*ms) + 0.1*mV*ms**2*v*exp(10/3)*exp(v/(18*mV))/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) + 4.0*mV*ms - 4*mV*ms*exp(-7/2)*exp(-v/(10*mV))))/(-17.5*mV/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) - 0.5*v/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) - 20.0*exp(-10/3)/(ms*exp(v/mV)**(1/18))) _m = -_BA_m + (_BA_m + m)*exp(dt*(-17.5*mV/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) - 0.5*v/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) - 20.0*exp(-10/3)/(ms*exp(v/mV)**(1/18)))) _BA_n = (0.578*mV**2/(-0.0226938235730217*mV**3*ms**2/(1.0*mV*ms*exp(0.1*v/mV) - 0.0333732699603261*mV*ms) + 0.000378683550267233*mV**3*ms**2/(-0.0333732699603261*mV*ms*exp(0.1*v/mV) + 1.0*mV*ms*exp(0.2*v/mV)) + 0.34*mV**3*ms**2/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) - 0.000667465399206522*mV**2*ms**2*v/(1.0*mV*ms*exp(0.1*v/mV) - 0.0333732699603261*mV*ms) + 1.1137751478448e-5*mV**2*ms**2*v/(-0.0333732699603261*mV*ms*exp(0.1*v/mV) + 1.0*mV*ms*exp(0.2*v/mV)) + 0.01*mV**2*ms**2*v/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) + 0.0001392218934806*mV**2*ms*exp(-11/20)*exp(-0.2125*v/mV) - 0.00834331749008152*mV**2*ms*exp(-11/20)*exp(-0.1125*v/mV) + 0.125*mV**2*ms*exp(-11/20)*exp(-v/(80*mV))) + 0.034*mV*v/(-0.0226938235730217*mV**3*ms**2/(1.0*mV*ms*exp(0.1*v/mV) - 0.0333732699603261*mV*ms) + 0.000378683550267233*mV**3*ms**2/(-0.0333732699603261*mV*ms*exp(0.1*v/mV) + 1.0*mV*ms*exp(0.2*v/mV)) + 0.34*mV**3*ms**2/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) - 0.000667465399206522*mV**2*ms**2*v/(1.0*mV*ms*exp(0.1*v/mV) - 0.0333732699603261*mV*ms) + 1.1137751478448e-5*mV**2*ms**2*v/(-0.0333732699603261*mV*ms*exp(0.1*v/mV) + 1.0*mV*ms*exp(0.2*v/mV)) + 0.01*mV**2*ms**2*v/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) + 0.0001392218934806*mV**2*ms*exp(-11/20)*exp(-0.2125*v/mV) - 0.00834331749008152*mV**2*ms*exp(-11/20)*exp(-0.1125*v/mV) + 0.125*mV**2*ms*exp(-11/20)*exp(-v/(80*mV))) + 0.2125*mV/(-0.0113469117865109*mV**2*ms**2*exp(11/20)*exp(v/(80*mV))/(1.0*mV*ms*exp(0.1*v/mV) - 0.0333732699603261*mV*ms) + 0.34*mV**2*ms**2*exp(11/20)*exp(v/(80*mV))/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) - 0.000333732699603261*mV*ms**2*v*exp(11/20)*exp(v/(80*mV))/(1.0*mV*ms*exp(0.1*v/mV) - 0.0333732699603261*mV*ms) + 0.01*mV*ms**2*v*exp(11/20)*exp(v/(80*mV))/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) + 0.125*mV*ms - 0.00417165874504076*mV*ms*exp(-0.1*v/mV)) + 0.0005*v**2/(-0.0226938235730217*mV**3*ms**2/(1.0*mV*ms*exp(0.1*v/mV) - 0.0333732699603261*mV*ms) + 0.000378683550267233*mV**3*ms**2/(-0.0333732699603261*mV*ms*exp(0.1*v/mV) + 1.0*mV*ms*exp(0.2*v/mV)) + 0.34*mV**3*ms**2/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) - 0.000667465399206522*mV**2*ms**2*v/(1.0*mV*ms*exp(0.1*v/mV) - 0.0333732699603261*mV*ms) + 1.1137751478448e-5*mV**2*ms**2*v/(-0.0333732699603261*mV*ms*exp(0.1*v/mV) + 1.0*mV*ms*exp(0.2*v/mV)) + 0.01*mV**2*ms**2*v/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) + 0.0001392218934806*mV**2*ms*exp(-11/20)*exp(-0.2125*v/mV) - 0.00834331749008152*mV**2*ms*exp(-11/20)*exp(-0.1125*v/mV) + 0.125*mV**2*ms*exp(-11/20)*exp(-v/(80*mV))) + 0.00625*v/(-0.0113469117865109*mV**2*ms**2*exp(11/20)*exp(v/(80*mV))/(1.0*mV*ms*exp(0.1*v/mV) - 0.0333732699603261*mV*ms) + 0.34*mV**2*ms**2*exp(11/20)*exp(v/(80*mV))/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) - 0.000333732699603261*mV*ms**2*v*exp(11/20)*exp(v/(80*mV))/(1.0*mV*ms*exp(0.1*v/mV) - 0.0333732699603261*mV*ms) + 0.01*mV*ms**2*v*exp(11/20)*exp(v/(80*mV))/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) + 0.125*mV*ms - 0.00417165874504076*mV*ms*exp(-0.1*v/mV)))/(-1.7*mV/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) - 0.05*v/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) - 0.625*exp(-11/20)/(ms*exp(v/mV)**(1/80))) _n = -_BA_n + (_BA_n + n)*exp(dt*(-1.7*mV/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) - 0.05*v/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) - 0.625*exp(-11/20)/(ms*exp(v/mV)**(1/80)))) _BA_v = (-80*cm**2*gi*mV/(size*ufarad) + cm**2*r*inputs_stim(t)/(size*ufarad) + 1.925*h*m**3*mV*siemens/ufarad - 0.81*mV*n**4*siemens/ufarad - 0.0065*mV*siemens/ufarad + noise)/(-cm**2*ge/(size*ufarad) - cm**2*ge_ext/(size*ufarad) - cm**2*ge_hipp/(size*ufarad) - cm**2*gi/(size*ufarad) - 0.035*h*m**3*siemens/ufarad - 0.009*n**4*siemens/ufarad - 0.0001*siemens/ufarad) _v = -_BA_v + (_BA_v + v)*exp(dt*(-cm**2*ge/(size*ufarad) - cm**2*ge_ext/(size*ufarad) - cm**2*ge_hipp/(size*ufarad) - cm**2*gi/(size*ufarad) - 0.035*h*m**3*siemens/ufarad - 0.009*n**4*siemens/ufarad - 0.0001*siemens/ufarad)) ge = _ge ge_ext = _ge_ext ge_hipp = _ge_hipp gi = _gi h = _h he = _he he_ext = _he_ext he_hipp = _he_hipp hi = _hi m = _m n = _n v = _v 2021-11-05 15:15:16,852 DIAGNOSTIC brian2.devices.device: DG_inh_stateupdater_codeobject abstract code: not_refractory = timestep(t - lastspike, dt) >= timestep(0.003000, dt) _BA_ge = -1.0*he _ge = -_BA_ge + (_BA_ge + ge)*exp(-3.33333333333333*dt/ms) _BA_ge_ext = -1.0*he_ext _ge_ext = -_BA_ge_ext + (_BA_ge_ext + ge_ext)*exp(-3.33333333333333*dt/ms) _BA_ge_hipp = -1.0*he_hipp _ge_hipp = -_BA_ge_hipp + (_BA_ge_hipp + ge_hipp)*exp(-3.33333333333333*dt/ms) _BA_gi = -1.0*hi _gi = -_BA_gi + (_BA_gi + gi)*exp(-1.0*dt/ms) _BA_h = (0.35/(0.060810062625218*ms**2*exp(29/10)/(1.0*ms*exp(0.05*v/mV) + 0.060810062625218*ms*exp(-0.05*v/mV)) + 1.0*ms**2*exp(29/10)*exp(v/(20*mV))/(1.0*ms + 0.060810062625218*ms*exp(-0.1*v/mV)) + 0.07*ms + 0.00425670438376526*ms*exp(-0.1*v/mV)) + 0.0245/(1.0*ms**2*exp(29/5)*exp(v/(10*mV))/(1.0*ms + 0.060810062625218*ms*exp(-0.1*v/mV)) + 0.07*ms*exp(29/10)*exp(v/(20*mV))))/(-5.0/(1.0*ms + 0.060810062625218*ms*exp(-0.1*v/mV)) - 0.35*exp(-29/10)/(ms*exp(v/mV)**(1/20))) _h = -_BA_h + (_BA_h + h)*exp(dt*(-5.0/(1.0*ms + 0.060810062625218*ms*exp(-0.1*v/mV)) - 0.35*exp(-29/10)/(ms*exp(v/mV)**(1/20)))) _he = he*exp(-dt/(5*ms)) _he_ext = he_ext*exp(-dt/(5*ms)) _he_hipp = he_hipp*exp(-dt/(5*ms)) _hi = hi*exp(-dt/(10*ms)) _BA_m = (61.25*mV**2/(-7.0*mV**3*ms**2/(1.0*mV*ms*exp(7/2)*exp(v/(10*mV)) - mV*ms) + 3.5*mV**3*ms**2/(-mV*ms*exp(7/2)*exp(v/(10*mV)) + 1.0*mV*ms*exp(7)*exp(v/(5*mV))) + 3.5*mV**3*ms**2/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) - 0.2*mV**2*ms**2*v/(1.0*mV*ms*exp(7/2)*exp(v/(10*mV)) - mV*ms) + 0.1*mV**2*ms**2*v/(-mV*ms*exp(7/2)*exp(v/(10*mV)) + 1.0*mV*ms*exp(7)*exp(v/(5*mV))) + 0.1*mV**2*ms**2*v/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) + 4.0*mV**2*ms*exp(-10/3)*exp(-v/(18*mV)) - 8.0*mV**2*ms*exp(-41/6)*exp(-7*v/(45*mV)) + 4*mV**2*ms*exp(-31/3)*exp(-23*v/(90*mV))) + 3.5*mV*v/(-7.0*mV**3*ms**2/(1.0*mV*ms*exp(7/2)*exp(v/(10*mV)) - mV*ms) + 3.5*mV**3*ms**2/(-mV*ms*exp(7/2)*exp(v/(10*mV)) + 1.0*mV*ms*exp(7)*exp(v/(5*mV))) + 3.5*mV**3*ms**2/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) - 0.2*mV**2*ms**2*v/(1.0*mV*ms*exp(7/2)*exp(v/(10*mV)) - mV*ms) + 0.1*mV**2*ms**2*v/(-mV*ms*exp(7/2)*exp(v/(10*mV)) + 1.0*mV*ms*exp(7)*exp(v/(5*mV))) + 0.1*mV**2*ms**2*v/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) + 4.0*mV**2*ms*exp(-10/3)*exp(-v/(18*mV)) - 8.0*mV**2*ms*exp(-41/6)*exp(-7*v/(45*mV)) + 4*mV**2*ms*exp(-31/3)*exp(-23*v/(90*mV))) + 70.0*mV/(-3.5*mV**2*ms**2*exp(10/3)*exp(v/(18*mV))/(1.0*mV*ms*exp(7/2)*exp(v/(10*mV)) - mV*ms) + 3.5*mV**2*ms**2*exp(10/3)*exp(v/(18*mV))/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) - 0.1*mV*ms**2*v*exp(10/3)*exp(v/(18*mV))/(1.0*mV*ms*exp(7/2)*exp(v/(10*mV)) - mV*ms) + 0.1*mV*ms**2*v*exp(10/3)*exp(v/(18*mV))/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) + 4.0*mV*ms - 4*mV*ms*exp(-7/2)*exp(-v/(10*mV))) + 0.05*v**2/(-7.0*mV**3*ms**2/(1.0*mV*ms*exp(7/2)*exp(v/(10*mV)) - mV*ms) + 3.5*mV**3*ms**2/(-mV*ms*exp(7/2)*exp(v/(10*mV)) + 1.0*mV*ms*exp(7)*exp(v/(5*mV))) + 3.5*mV**3*ms**2/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) - 0.2*mV**2*ms**2*v/(1.0*mV*ms*exp(7/2)*exp(v/(10*mV)) - mV*ms) + 0.1*mV**2*ms**2*v/(-mV*ms*exp(7/2)*exp(v/(10*mV)) + 1.0*mV*ms*exp(7)*exp(v/(5*mV))) + 0.1*mV**2*ms**2*v/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) + 4.0*mV**2*ms*exp(-10/3)*exp(-v/(18*mV)) - 8.0*mV**2*ms*exp(-41/6)*exp(-7*v/(45*mV)) + 4*mV**2*ms*exp(-31/3)*exp(-23*v/(90*mV))) + 2.0*v/(-3.5*mV**2*ms**2*exp(10/3)*exp(v/(18*mV))/(1.0*mV*ms*exp(7/2)*exp(v/(10*mV)) - mV*ms) + 3.5*mV**2*ms**2*exp(10/3)*exp(v/(18*mV))/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) - 0.1*mV*ms**2*v*exp(10/3)*exp(v/(18*mV))/(1.0*mV*ms*exp(7/2)*exp(v/(10*mV)) - mV*ms) + 0.1*mV*ms**2*v*exp(10/3)*exp(v/(18*mV))/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) + 4.0*mV*ms - 4*mV*ms*exp(-7/2)*exp(-v/(10*mV))))/(-17.5*mV/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) - 0.5*v/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) - 20.0*exp(-10/3)/(ms*exp(v/mV)**(1/18))) _m = -_BA_m + (_BA_m + m)*exp(dt*(-17.5*mV/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) - 0.5*v/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) - 20.0*exp(-10/3)/(ms*exp(v/mV)**(1/18)))) _BA_n = (0.578*mV**2/(-0.0226938235730217*mV**3*ms**2/(1.0*mV*ms*exp(0.1*v/mV) - 0.0333732699603261*mV*ms) + 0.000378683550267233*mV**3*ms**2/(-0.0333732699603261*mV*ms*exp(0.1*v/mV) + 1.0*mV*ms*exp(0.2*v/mV)) + 0.34*mV**3*ms**2/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) - 0.000667465399206522*mV**2*ms**2*v/(1.0*mV*ms*exp(0.1*v/mV) - 0.0333732699603261*mV*ms) + 1.1137751478448e-5*mV**2*ms**2*v/(-0.0333732699603261*mV*ms*exp(0.1*v/mV) + 1.0*mV*ms*exp(0.2*v/mV)) + 0.01*mV**2*ms**2*v/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) + 0.0001392218934806*mV**2*ms*exp(-11/20)*exp(-0.2125*v/mV) - 0.00834331749008152*mV**2*ms*exp(-11/20)*exp(-0.1125*v/mV) + 0.125*mV**2*ms*exp(-11/20)*exp(-v/(80*mV))) + 0.034*mV*v/(-0.0226938235730217*mV**3*ms**2/(1.0*mV*ms*exp(0.1*v/mV) - 0.0333732699603261*mV*ms) + 0.000378683550267233*mV**3*ms**2/(-0.0333732699603261*mV*ms*exp(0.1*v/mV) + 1.0*mV*ms*exp(0.2*v/mV)) + 0.34*mV**3*ms**2/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) - 0.000667465399206522*mV**2*ms**2*v/(1.0*mV*ms*exp(0.1*v/mV) - 0.0333732699603261*mV*ms) + 1.1137751478448e-5*mV**2*ms**2*v/(-0.0333732699603261*mV*ms*exp(0.1*v/mV) + 1.0*mV*ms*exp(0.2*v/mV)) + 0.01*mV**2*ms**2*v/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) + 0.0001392218934806*mV**2*ms*exp(-11/20)*exp(-0.2125*v/mV) - 0.00834331749008152*mV**2*ms*exp(-11/20)*exp(-0.1125*v/mV) + 0.125*mV**2*ms*exp(-11/20)*exp(-v/(80*mV))) + 0.2125*mV/(-0.0113469117865109*mV**2*ms**2*exp(11/20)*exp(v/(80*mV))/(1.0*mV*ms*exp(0.1*v/mV) - 0.0333732699603261*mV*ms) + 0.34*mV**2*ms**2*exp(11/20)*exp(v/(80*mV))/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) - 0.000333732699603261*mV*ms**2*v*exp(11/20)*exp(v/(80*mV))/(1.0*mV*ms*exp(0.1*v/mV) - 0.0333732699603261*mV*ms) + 0.01*mV*ms**2*v*exp(11/20)*exp(v/(80*mV))/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) + 0.125*mV*ms - 0.00417165874504076*mV*ms*exp(-0.1*v/mV)) + 0.0005*v**2/(-0.0226938235730217*mV**3*ms**2/(1.0*mV*ms*exp(0.1*v/mV) - 0.0333732699603261*mV*ms) + 0.000378683550267233*mV**3*ms**2/(-0.0333732699603261*mV*ms*exp(0.1*v/mV) + 1.0*mV*ms*exp(0.2*v/mV)) + 0.34*mV**3*ms**2/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) - 0.000667465399206522*mV**2*ms**2*v/(1.0*mV*ms*exp(0.1*v/mV) - 0.0333732699603261*mV*ms) + 1.1137751478448e-5*mV**2*ms**2*v/(-0.0333732699603261*mV*ms*exp(0.1*v/mV) + 1.0*mV*ms*exp(0.2*v/mV)) + 0.01*mV**2*ms**2*v/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) + 0.0001392218934806*mV**2*ms*exp(-11/20)*exp(-0.2125*v/mV) - 0.00834331749008152*mV**2*ms*exp(-11/20)*exp(-0.1125*v/mV) + 0.125*mV**2*ms*exp(-11/20)*exp(-v/(80*mV))) + 0.00625*v/(-0.0113469117865109*mV**2*ms**2*exp(11/20)*exp(v/(80*mV))/(1.0*mV*ms*exp(0.1*v/mV) - 0.0333732699603261*mV*ms) + 0.34*mV**2*ms**2*exp(11/20)*exp(v/(80*mV))/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) - 0.000333732699603261*mV*ms**2*v*exp(11/20)*exp(v/(80*mV))/(1.0*mV*ms*exp(0.1*v/mV) - 0.0333732699603261*mV*ms) + 0.01*mV*ms**2*v*exp(11/20)*exp(v/(80*mV))/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) + 0.125*mV*ms - 0.00417165874504076*mV*ms*exp(-0.1*v/mV)))/(-1.7*mV/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) - 0.05*v/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) - 0.625*exp(-11/20)/(ms*exp(v/mV)**(1/80))) _n = -_BA_n + (_BA_n + n)*exp(dt*(-1.7*mV/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) - 0.05*v/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) - 0.625*exp(-11/20)/(ms*exp(v/mV)**(1/80)))) _BA_v = (-80*cm**2*gi*mV/(size*ufarad) + cm**2*r*inputs_stim(t)/(size*ufarad) + 1.925*h*m**3*mV*siemens/ufarad - 0.81*mV*n**4*siemens/ufarad - 0.0065*mV*siemens/ufarad + noise)/(-cm**2*ge/(size*ufarad) - cm**2*ge_ext/(size*ufarad) - cm**2*ge_hipp/(size*ufarad) - cm**2*gi/(size*ufarad) - 0.035*h*m**3*siemens/ufarad - 0.009*n**4*siemens/ufarad - 0.0001*siemens/ufarad) _v = -_BA_v + (_BA_v + v)*exp(dt*(-cm**2*ge/(size*ufarad) - cm**2*ge_ext/(size*ufarad) - cm**2*ge_hipp/(size*ufarad) - cm**2*gi/(size*ufarad) - 0.035*h*m**3*siemens/ufarad - 0.009*n**4*siemens/ufarad - 0.0001*siemens/ufarad)) ge = _ge ge_ext = _ge_ext ge_hipp = _ge_hipp gi = _gi h = _h he = _he he_ext = _he_ext he_hipp = _he_hipp hi = _hi m = _m n = _n v = _v 2021-11-05 15:15:16,859 DIAGNOSTIC brian2.devices.device: DG_inh_stateupdater_codeobject snippet (scalar): t = _array_defaultclock_t[0] dt = _array_defaultclock_dt[0] _lio_1 = _timestep(0.003, dt) _lio_2 = exp(((- 3.33333333333333) * dt) / ms) _lio_3 = exp(((- 1.0) * dt) / ms) _lio_4 = 0.07 * ms _lio_5 = 0.060810062625218 * ((ms ** 2) * 18.17414536944306) _lio_6 = 0.05 / mV _lio_7 = 0.060810062625218 * ms _lio_8 = (- 0.05) / mV _lio_9 = (ms ** 2) * 18.17414536944306 _lio_10 = (- 0.1) / mV _lio_11 = 0.00425670438376526 * ms _lio_12 = (ms ** 2) * 330.2995599096486 _lio_13 = 0.1 / mV _lio_14 = 0.07 * (ms * 18.17414536944306) _lio_15 = 0.019258127019742523 / ms _lio_16 = 1.0 / mV _lio_17 = exp((0.2 * (- dt)) / ms) _lio_18 = exp((0.1 * (- dt)) / ms) _lio_19 = 61.25 * (mV ** 2) _lio_20 = ((- 7.0) * (mV ** 3)) * (ms ** 2) _lio_21 = 0.0 - (mV * ms) _lio_22 = (mV * ms) * 33.11545195869231 _lio_23 = 3.5 * ((mV ** 3) * (ms ** 2)) _lio_24 = ((- mV) * ms) * 33.11545195869231 _lio_25 = (mV * ms) * 1096.6331584284585 _lio_26 = 0.2 / mV _lio_27 = mV * ms _lio_28 = (mV * ms) * 0.0301973834223185 _lio_29 = 0.1 * ((mV ** 2) * (ms ** 2)) _lio_30 = 4.0 * (((mV ** 2) * ms) * 0.03567399334725241) _lio_31 = 0.05555555555555555 / mV _lio_32 = 4.0 * (((mV ** 2) * ms) * 3.253047117267129e-05) _lio_33 = (- 0.2555555555555556) / mV _lio_34 = 0.2 * ((mV ** 2) * (ms ** 2)) _lio_35 = 8.0 * (((mV ** 2) * ms) * 0.0010772612553122203) _lio_36 = (- 0.15555555555555556) / mV _lio_37 = 3.5 * mV _lio_38 = 70.0 * mV _lio_39 = 4.0 * (mV * ms) _lio_40 = (((- 3.5) * (mV ** 2)) * (ms ** 2)) * 28.03162489452614 _lio_41 = 3.5 * (((mV ** 2) * (ms ** 2)) * 28.03162489452614) _lio_42 = 0.1 * ((mV * (ms ** 2)) * 28.03162489452614) _lio_43 = 4.0 * ((mV * ms) * 0.0301973834223185) _lio_44 = (- 17.5) * mV _lio_45 = 0.7134798669450482 / ms _lio_46 = 0.578 * (mV ** 2) _lio_47 = ((- 0.0226938235730217) * (mV ** 3)) * (ms ** 2) _lio_48 = 0.0 - (0.0333732699603261 * (mV * ms)) _lio_49 = 0.000378683550267233 * ((mV ** 3) * (ms ** 2)) _lio_50 = ((- 0.0333732699603261) * mV) * ms _lio_51 = 0.34 * ((mV ** 3) * (ms ** 2)) _lio_52 = 0.0333732699603261 * (mV * ms) _lio_53 = 1.1137751478448e-05 * ((mV ** 2) * (ms ** 2)) _lio_54 = 0.01 * ((mV ** 2) * (ms ** 2)) _lio_55 = 0.0001392218934806 * (((mV ** 2) * ms) * 0.5769498103804866) _lio_56 = (- 0.2125) / mV _lio_57 = 0.125 * (((mV ** 2) * ms) * 0.5769498103804866) _lio_58 = 0.0125 / mV _lio_59 = 0.000667465399206522 * ((mV ** 2) * (ms ** 2)) _lio_60 = 0.00834331749008152 * (((mV ** 2) * ms) * 0.5769498103804866) _lio_61 = (- 0.1125) / mV _lio_62 = 0.034 * mV _lio_63 = 0.2125 * mV _lio_64 = 0.125 * (mV * ms) _lio_65 = (((- 0.0113469117865109) * (mV ** 2)) * (ms ** 2)) * 1.7332530178673953 _lio_66 = 0.34 * (((mV ** 2) * (ms ** 2)) * 1.7332530178673953) _lio_67 = 0.01 * ((mV * (ms ** 2)) * 1.7332530178673953) _lio_68 = 0.000333732699603261 * ((mV * (ms ** 2)) * 1.7332530178673953) _lio_69 = 0.00417165874504076 * (mV * ms) _lio_70 = (- 1.7) * mV _lio_71 = 0.36059363148780416 / ms _lio_72 = 0.0 - ((0.0065 * (mV * siemens)) / ufarad) _lio_73 = (((- 80.0) * (cm ** 2)) * mV) / ufarad _lio_74 = ((cm ** 2) * _timedarray(t)) / ufarad _lio_75 = (1.925 * (mV * siemens)) / ufarad _lio_76 = (0.81 * (mV * siemens)) / ufarad _lio_77 = 0.0 - ((0.0001 * siemens) / ufarad) _lio_78 = (- (cm ** 2)) / ufarad _lio_79 = (cm ** 2) / ufarad _lio_80 = (0.035 * siemens) / ufarad _lio_81 = (0.009 * siemens) / ufarad 2021-11-05 15:15:16,859 DIAGNOSTIC brian2.devices.device: DG_inh_stateupdater_codeobject snippet (vector): hi = _array_DG_inh_hi[_idx] lastspike = _array_DG_inh_lastspike[_idx] gi = _array_DG_inh_gi[_idx] ge = _array_DG_inh_ge[_idx] noise = _array_DG_inh_noise[_idx] v = _array_DG_inh_v[_idx] h = _array_DG_inh_h[_idx] he_hipp = _array_DG_inh_he_hipp[_idx] n = _array_DG_inh_n[_idx] r = _array_DG_inh_r[_idx] size = _array_DG_inh_size[_idx] he = _array_DG_inh_he[_idx] ge_hipp = _array_DG_inh_ge_hipp[_idx] m = _array_DG_inh_m[_idx] ge_ext = _array_DG_inh_ge_ext[_idx] he_ext = _array_DG_inh_he_ext[_idx] not_refractory = _timestep(t - lastspike, dt) >= _lio_1 _BA_ge = (- 1.0) * he _ge = (- _BA_ge) + (_lio_2 * (_BA_ge + ge)) _BA_ge_ext = (- 1.0) * he_ext _ge_ext = (- _BA_ge_ext) + (_lio_2 * (_BA_ge_ext + ge_ext)) _BA_ge_hipp = (- 1.0) * he_hipp _ge_hipp = (- _BA_ge_hipp) + (_lio_2 * (_BA_ge_hipp + ge_hipp)) _BA_gi = (- 1.0) * hi _gi = (- _BA_gi) + (_lio_3 * (_BA_gi + gi)) _BA_h = ((0.35 / (_lio_4 + (((_lio_5 / ((ms * exp(_lio_6 * v)) + (_lio_7 * exp(_lio_8 * v)))) + ((_lio_9 * exp(_lio_6 * v)) / (ms + (_lio_7 * exp(_lio_10 * v))))) + (_lio_11 * exp(_lio_10 * v))))) + (0.0245 / (((_lio_12 * exp(_lio_13 * v)) / (ms + (_lio_7 * exp(_lio_10 * v)))) + (_lio_14 * exp(_lio_6 * v))))) / (((- 5.0) / (ms + (_lio_7 * exp(_lio_10 * v)))) - (_lio_15 / (exp(_lio_16 * v) ** 0.05))) _h = (- _BA_h) + ((_BA_h + h) * exp(dt * (((- 5.0) / (ms + (_lio_7 * exp(_lio_10 * v)))) - (_lio_15 / (exp(_lio_16 * v) ** 0.05))))) _he = _lio_17 * he _he_ext = _lio_17 * he_ext _he_hipp = _lio_17 * he_hipp _hi = _lio_18 * hi _BA_m = (((((_lio_19 / ((((((((_lio_20 / (_lio_21 + (_lio_22 * exp(_lio_13 * v)))) + (_lio_23 / ((_lio_24 * exp(_lio_13 * v)) + (_lio_25 * exp(_lio_26 * v))))) + (_lio_23 / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v)))))) + ((_lio_29 * v) / ((_lio_24 * exp(_lio_13 * v)) + (_lio_25 * exp(_lio_26 * v))))) + ((_lio_29 * v) / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v)))))) + (_lio_30 * exp(_lio_31 * (- v)))) + (_lio_32 * exp(_lio_33 * v))) - (((_lio_34 * v) / (_lio_21 + (_lio_22 * exp(_lio_13 * v)))) + (_lio_35 * exp(_lio_36 * v))))) + ((_lio_37 * v) / ((((((((_lio_20 / (_lio_21 + (_lio_22 * exp(_lio_13 * v)))) + (_lio_23 / ((_lio_24 * exp(_lio_13 * v)) + (_lio_25 * exp(_lio_26 * v))))) + (_lio_23 / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v)))))) + ((_lio_29 * v) / ((_lio_24 * exp(_lio_13 * v)) + (_lio_25 * exp(_lio_26 * v))))) + ((_lio_29 * v) / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v)))))) + (_lio_30 * exp(_lio_31 * (- v)))) + (_lio_32 * exp(_lio_33 * v))) - (((_lio_34 * v) / (_lio_21 + (_lio_22 * exp(_lio_13 * v)))) + (_lio_35 * exp(_lio_36 * v)))))) + (_lio_38 / ((_lio_39 + ((((_lio_40 * exp(_lio_31 * v)) / (_lio_21 + (_lio_22 * exp(_lio_13 * v)))) + ((_lio_41 * exp(_lio_31 * v)) / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v)))))) + ((_lio_42 * (v * exp(_lio_31 * v))) / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v))))))) - (((_lio_42 * (v * exp(_lio_31 * v))) / (_lio_21 + (_lio_22 * exp(_lio_13 * v)))) + (_lio_43 * exp(_lio_13 * (- v))))))) + ((0.05 * (v ** 2)) / ((((((((_lio_20 / (_lio_21 + (_lio_22 * exp(_lio_13 * v)))) + (_lio_23 / ((_lio_24 * exp(_lio_13 * v)) + (_lio_25 * exp(_lio_26 * v))))) + (_lio_23 / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v)))))) + ((_lio_29 * v) / ((_lio_24 * exp(_lio_13 * v)) + (_lio_25 * exp(_lio_26 * v))))) + ((_lio_29 * v) / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v)))))) + (_lio_30 * exp(_lio_31 * (- v)))) + (_lio_32 * exp(_lio_33 * v))) - (((_lio_34 * v) / (_lio_21 + (_lio_22 * exp(_lio_13 * v)))) + (_lio_35 * exp(_lio_36 * v)))))) + ((2.0 * v) / ((_lio_39 + ((((_lio_40 * exp(_lio_31 * v)) / (_lio_21 + (_lio_22 * exp(_lio_13 * v)))) + ((_lio_41 * exp(_lio_31 * v)) / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v)))))) + ((_lio_42 * (v * exp(_lio_31 * v))) / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v))))))) - (((_lio_42 * (v * exp(_lio_31 * v))) / (_lio_21 + (_lio_22 * exp(_lio_13 * v)))) + (_lio_43 * exp(_lio_13 * (- v))))))) / ((_lio_44 / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v))))) - (((0.5 * v) / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v))))) + (_lio_45 / (exp(_lio_16 * v) ** 0.05555555555555555)))) _m = (- _BA_m) + ((_BA_m + m) * exp(dt * ((_lio_44 / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v))))) - (((0.5 * v) / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v))))) + (_lio_45 / (exp(_lio_16 * v) ** 0.05555555555555555)))))) _BA_n = (((((_lio_46 / ((((((((_lio_47 / (_lio_48 + (_lio_27 * exp(_lio_13 * v)))) + (_lio_49 / ((_lio_50 * exp(_lio_13 * v)) + (_lio_27 * exp(_lio_26 * v))))) + (_lio_51 / (_lio_27 - (_lio_52 * exp(_lio_10 * v))))) + ((_lio_53 * v) / ((_lio_50 * exp(_lio_13 * v)) + (_lio_27 * exp(_lio_26 * v))))) + ((_lio_54 * v) / (_lio_27 - (_lio_52 * exp(_lio_10 * v))))) + (_lio_55 * exp(_lio_56 * v))) + (_lio_57 * exp(_lio_58 * (- v)))) - (((_lio_59 * v) / (_lio_48 + (_lio_27 * exp(_lio_13 * v)))) + (_lio_60 * exp(_lio_61 * v))))) + ((_lio_62 * v) / ((((((((_lio_47 / (_lio_48 + (_lio_27 * exp(_lio_13 * v)))) + (_lio_49 / ((_lio_50 * exp(_lio_13 * v)) + (_lio_27 * exp(_lio_26 * v))))) + (_lio_51 / (_lio_27 - (_lio_52 * exp(_lio_10 * v))))) + ((_lio_53 * v) / ((_lio_50 * exp(_lio_13 * v)) + (_lio_27 * exp(_lio_26 * v))))) + ((_lio_54 * v) / (_lio_27 - (_lio_52 * exp(_lio_10 * v))))) + (_lio_55 * exp(_lio_56 * v))) + (_lio_57 * exp(_lio_58 * (- v)))) - (((_lio_59 * v) / (_lio_48 + (_lio_27 * exp(_lio_13 * v)))) + (_lio_60 * exp(_lio_61 * v)))))) + (_lio_63 / ((_lio_64 + ((((_lio_65 * exp(_lio_58 * v)) / (_lio_48 + (_lio_27 * exp(_lio_13 * v)))) + ((_lio_66 * exp(_lio_58 * v)) / (_lio_27 - (_lio_52 * exp(_lio_10 * v))))) + ((_lio_67 * (v * exp(_lio_58 * v))) / (_lio_27 - (_lio_52 * exp(_lio_10 * v)))))) - (((_lio_68 * (v * exp(_lio_58 * v))) / (_lio_48 + (_lio_27 * exp(_lio_13 * v)))) + (_lio_69 * exp(_lio_10 * v)))))) + ((0.0005 * (v ** 2)) / ((((((((_lio_47 / (_lio_48 + (_lio_27 * exp(_lio_13 * v)))) + (_lio_49 / ((_lio_50 * exp(_lio_13 * v)) + (_lio_27 * exp(_lio_26 * v))))) + (_lio_51 / (_lio_27 - (_lio_52 * exp(_lio_10 * v))))) + ((_lio_53 * v) / ((_lio_50 * exp(_lio_13 * v)) + (_lio_27 * exp(_lio_26 * v))))) + ((_lio_54 * v) / (_lio_27 - (_lio_52 * exp(_lio_10 * v))))) + (_lio_55 * exp(_lio_56 * v))) + (_lio_57 * exp(_lio_58 * (- v)))) - (((_lio_59 * v) / (_lio_48 + (_lio_27 * exp(_lio_13 * v)))) + (_lio_60 * exp(_lio_61 * v)))))) + ((0.00625 * v) / ((_lio_64 + ((((_lio_65 * exp(_lio_58 * v)) / (_lio_48 + (_lio_27 * exp(_lio_13 * v)))) + ((_lio_66 * exp(_lio_58 * v)) / (_lio_27 - (_lio_52 * exp(_lio_10 * v))))) + ((_lio_67 * (v * exp(_lio_58 * v))) / (_lio_27 - (_lio_52 * exp(_lio_10 * v)))))) - (((_lio_68 * (v * exp(_lio_58 * v))) / (_lio_48 + (_lio_27 * exp(_lio_13 * v)))) + (_lio_69 * exp(_lio_10 * v)))))) / ((_lio_70 / (_lio_27 - (_lio_52 * exp(_lio_10 * v)))) - (((0.05 * v) / (_lio_27 - (_lio_52 * exp(_lio_10 * v)))) + (_lio_71 / (exp(_lio_16 * v) ** 0.0125)))) _n = (- _BA_n) + ((_BA_n + n) * exp(dt * ((_lio_70 / (_lio_27 - (_lio_52 * exp(_lio_10 * v)))) - (((0.05 * v) / (_lio_27 - (_lio_52 * exp(_lio_10 * v)))) + (_lio_71 / (exp(_lio_16 * v) ** 0.0125)))))) _BA_v = ((_lio_72 + (((((_lio_73 * gi) / size) + ((_lio_74 * r) / size)) + (_lio_75 * (h * (m ** 3)))) + noise)) - (_lio_76 * (n ** 4))) / ((_lio_77 + ((_lio_78 * ge) / size)) - ((((((_lio_79 * ge_ext) / size) + ((_lio_79 * ge_hipp) / size)) + ((_lio_79 * gi) / size)) + (_lio_80 * (h * (m ** 3)))) + (_lio_81 * (n ** 4)))) _v = (- _BA_v) + ((_BA_v + v) * exp(dt * ((_lio_77 + ((_lio_78 * ge) / size)) - ((((((_lio_79 * ge_ext) / size) + ((_lio_79 * ge_hipp) / size)) + ((_lio_79 * gi) / size)) + (_lio_80 * (h * (m ** 3)))) + (_lio_81 * (n ** 4)))))) ge = _ge ge_ext = _ge_ext ge_hipp = _ge_hipp gi = _gi h = _h he = _he he_ext = _he_ext he_hipp = _he_hipp hi = _hi m = _m n = _n v = _v _array_DG_inh_hi[_idx] = hi _array_DG_inh_ge[_idx] = ge _array_DG_inh_gi[_idx] = gi _array_DG_inh_v[_idx] = v _array_DG_inh_h[_idx] = h _array_DG_inh_he_hipp[_idx] = he_hipp _array_DG_inh_n[_idx] = n _array_DG_inh_ge_hipp[_idx] = ge_hipp _array_DG_inh_m[_idx] = m _array_DG_inh_he[_idx] = he _array_DG_inh_ge_ext[_idx] = ge_ext _array_DG_inh_he_ext[_idx] = he_ext _array_DG_inh_not_refractory[_idx] = not_refractory 2021-11-05 15:15:16,860 DIAGNOSTIC brian2.devices.device: DG_inh_stateupdater_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code cdef double *_namespace_timedarray_values cdef double _timedarray(const double t): global _namespace_timedarray_values cdef double epsilon = 0.001000000000000000 / 128 cdef int i = (int)((t/epsilon + 0.5)/128) if i < 0: i = 0 if i >= 2001: i = 2001 - 1 return _namespace_timedarray_values[i] cdef int64_t _timestep(double t, double dt): return ((t + 1e-3*dt)/dt) # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var_N = _namespace["_var_N"] cdef int64_t N = _namespace["N"] _var_cm = _namespace["_var_cm"] cdef double cm = _namespace["cm"] _var_dt = _namespace["_var_dt"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_dt = _namespace['_array_defaultclock_dt'] cdef double * _array_defaultclock_dt = _buf__array_defaultclock_dt.data cdef double dt = _namespace["dt"] _var_ge = _namespace["_var_ge"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_inh_ge = _namespace['_array_DG_inh_ge'] cdef double * _array_DG_inh_ge = _buf__array_DG_inh_ge.data cdef size_t _num_array_DG_inh_ge = len(_namespace['_array_DG_inh_ge']) cdef double ge _var_ge_ext = _namespace["_var_ge_ext"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_inh_ge_ext = _namespace['_array_DG_inh_ge_ext'] cdef double * _array_DG_inh_ge_ext = _buf__array_DG_inh_ge_ext.data cdef size_t _num_array_DG_inh_ge_ext = len(_namespace['_array_DG_inh_ge_ext']) cdef double ge_ext _var_ge_hipp = _namespace["_var_ge_hipp"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_inh_ge_hipp = _namespace['_array_DG_inh_ge_hipp'] cdef double * _array_DG_inh_ge_hipp = _buf__array_DG_inh_ge_hipp.data cdef size_t _num_array_DG_inh_ge_hipp = len(_namespace['_array_DG_inh_ge_hipp']) cdef double ge_hipp _var_gi = _namespace["_var_gi"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_inh_gi = _namespace['_array_DG_inh_gi'] cdef double * _array_DG_inh_gi = _buf__array_DG_inh_gi.data cdef size_t _num_array_DG_inh_gi = len(_namespace['_array_DG_inh_gi']) cdef double gi _var_h = _namespace["_var_h"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_inh_h = _namespace['_array_DG_inh_h'] cdef double * _array_DG_inh_h = _buf__array_DG_inh_h.data cdef size_t _num_array_DG_inh_h = len(_namespace['_array_DG_inh_h']) cdef double h _var_he = _namespace["_var_he"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_inh_he = _namespace['_array_DG_inh_he'] cdef double * _array_DG_inh_he = _buf__array_DG_inh_he.data cdef size_t _num_array_DG_inh_he = len(_namespace['_array_DG_inh_he']) cdef double he _var_he_ext = _namespace["_var_he_ext"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_inh_he_ext = _namespace['_array_DG_inh_he_ext'] cdef double * _array_DG_inh_he_ext = _buf__array_DG_inh_he_ext.data cdef size_t _num_array_DG_inh_he_ext = len(_namespace['_array_DG_inh_he_ext']) cdef double he_ext _var_he_hipp = _namespace["_var_he_hipp"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_inh_he_hipp = _namespace['_array_DG_inh_he_hipp'] cdef double * _array_DG_inh_he_hipp = _buf__array_DG_inh_he_hipp.data cdef size_t _num_array_DG_inh_he_hipp = len(_namespace['_array_DG_inh_he_hipp']) cdef double he_hipp _var_hi = _namespace["_var_hi"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_inh_hi = _namespace['_array_DG_inh_hi'] cdef double * _array_DG_inh_hi = _buf__array_DG_inh_hi.data cdef size_t _num_array_DG_inh_hi = len(_namespace['_array_DG_inh_hi']) cdef double hi # namespace for function inputs_stim global _namespace_timedarray_values global _namespace_num_timedarray_values cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__timedarray_values = _namespace['_timedarray_values'] _namespace_timedarray_values = _buf__timedarray_values.data _namespace_num_timedarray_values = len(_namespace['_timedarray_values']) _var_lastspike = _namespace["_var_lastspike"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_inh_lastspike = _namespace['_array_DG_inh_lastspike'] cdef double * _array_DG_inh_lastspike = _buf__array_DG_inh_lastspike.data cdef size_t _num_array_DG_inh_lastspike = len(_namespace['_array_DG_inh_lastspike']) cdef double lastspike _var_m = _namespace["_var_m"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_inh_m = _namespace['_array_DG_inh_m'] cdef double * _array_DG_inh_m = _buf__array_DG_inh_m.data cdef size_t _num_array_DG_inh_m = len(_namespace['_array_DG_inh_m']) cdef double m _var_mV = _namespace["_var_mV"] cdef double mV = _namespace["mV"] _var_ms = _namespace["_var_ms"] cdef double ms = _namespace["ms"] _var_n = _namespace["_var_n"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_inh_n = _namespace['_array_DG_inh_n'] cdef double * _array_DG_inh_n = _buf__array_DG_inh_n.data cdef size_t _num_array_DG_inh_n = len(_namespace['_array_DG_inh_n']) cdef double n _var_noise = _namespace["_var_noise"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_inh_noise = _namespace['_array_DG_inh_noise'] cdef double * _array_DG_inh_noise = _buf__array_DG_inh_noise.data cdef size_t _num_array_DG_inh_noise = len(_namespace['_array_DG_inh_noise']) cdef double noise _var_not_refractory = _namespace["_var_not_refractory"] cdef _numpy.ndarray[char, ndim=1, mode='c', cast=True] _buf__array_DG_inh_not_refractory = _namespace['_array_DG_inh_not_refractory'] cdef bool * _array_DG_inh_not_refractory = _buf__array_DG_inh_not_refractory.data cdef size_t _num_array_DG_inh_not_refractory = len(_namespace['_array_DG_inh_not_refractory']) cdef bool not_refractory _var_r = _namespace["_var_r"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_inh_r = _namespace['_array_DG_inh_r'] cdef double * _array_DG_inh_r = _buf__array_DG_inh_r.data cdef size_t _num_array_DG_inh_r = len(_namespace['_array_DG_inh_r']) cdef double r _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] _var_size = _namespace["_var_size"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_inh_size = _namespace['_array_DG_inh_size'] cdef double * _array_DG_inh_size = _buf__array_DG_inh_size.data cdef size_t _num_array_DG_inh_size = len(_namespace['_array_DG_inh_size']) cdef double size _var_t = _namespace["_var_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double t _var_ufarad = _namespace["_var_ufarad"] cdef double ufarad = _namespace["ufarad"] _var_v = _namespace["_var_v"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_inh_v = _namespace['_array_DG_inh_v'] cdef double * _array_DG_inh_v = _buf__array_DG_inh_v.data cdef size_t _num_array_DG_inh_v = len(_namespace['_array_DG_inh_v']) cdef double v cdef double _BA_ge cdef double _BA_ge_ext cdef double _BA_ge_hipp cdef double _BA_gi cdef double _BA_h cdef double _BA_m cdef double _BA_n cdef double _BA_v cdef double _ge cdef double _ge_ext cdef double _ge_hipp cdef double _gi cdef double _h cdef double _he cdef double _he_ext cdef double _he_hipp cdef double _hi cdef int64_t _lio_1 cdef double _lio_10 cdef double _lio_11 cdef double _lio_12 cdef double _lio_13 cdef double _lio_14 cdef double _lio_15 cdef double _lio_16 cdef double _lio_17 cdef double _lio_18 cdef double _lio_19 cdef double _lio_2 cdef double _lio_20 cdef double _lio_21 cdef double _lio_22 cdef double _lio_23 cdef double _lio_24 cdef double _lio_25 cdef double _lio_26 cdef double _lio_27 cdef double _lio_28 cdef double _lio_29 cdef double _lio_3 cdef double _lio_30 cdef double _lio_31 cdef double _lio_32 cdef double _lio_33 cdef double _lio_34 cdef double _lio_35 cdef double _lio_36 cdef double _lio_37 cdef double _lio_38 cdef double _lio_39 cdef double _lio_4 cdef double _lio_40 cdef double _lio_41 cdef double _lio_42 cdef double _lio_43 cdef double _lio_44 cdef double _lio_45 cdef double _lio_46 cdef double _lio_47 cdef double _lio_48 cdef double _lio_49 cdef double _lio_5 cdef double _lio_50 cdef double _lio_51 cdef double _lio_52 cdef double _lio_53 cdef double _lio_54 cdef double _lio_55 cdef double _lio_56 cdef double _lio_57 cdef double _lio_58 cdef double _lio_59 cdef double _lio_6 cdef double _lio_60 cdef double _lio_61 cdef double _lio_62 cdef double _lio_63 cdef double _lio_64 cdef double _lio_65 cdef double _lio_66 cdef double _lio_67 cdef double _lio_68 cdef double _lio_69 cdef double _lio_7 cdef double _lio_70 cdef double _lio_71 cdef double _lio_72 cdef double _lio_73 cdef double _lio_74 cdef double _lio_75 cdef double _lio_76 cdef double _lio_77 cdef double _lio_78 cdef double _lio_79 cdef double _lio_8 cdef double _lio_80 cdef double _lio_81 cdef double _lio_9 cdef double _m cdef double _n cdef double _v if '_owner' in _namespace: _owner = _namespace['_owner'] # scalar code _vectorisation_idx = 1 t = _array_defaultclock_t[0] dt = _array_defaultclock_dt[0] _lio_1 = _timestep(0.003, dt) _lio_2 = exp(((- 3.33333333333333) * dt) / ms) _lio_3 = exp(((- 1.0) * dt) / ms) _lio_4 = 0.07 * ms _lio_5 = 0.060810062625218 * ((ms ** 2) * 18.17414536944306) _lio_6 = 0.05 / mV _lio_7 = 0.060810062625218 * ms _lio_8 = (- 0.05) / mV _lio_9 = (ms ** 2) * 18.17414536944306 _lio_10 = (- 0.1) / mV _lio_11 = 0.00425670438376526 * ms _lio_12 = (ms ** 2) * 330.2995599096486 _lio_13 = 0.1 / mV _lio_14 = 0.07 * (ms * 18.17414536944306) _lio_15 = 0.019258127019742523 / ms _lio_16 = 1.0 / mV _lio_17 = exp((0.2 * (- dt)) / ms) _lio_18 = exp((0.1 * (- dt)) / ms) _lio_19 = 61.25 * (mV ** 2) _lio_20 = ((- 7.0) * (mV ** 3)) * (ms ** 2) _lio_21 = 0.0 - (mV * ms) _lio_22 = (mV * ms) * 33.11545195869231 _lio_23 = 3.5 * ((mV ** 3) * (ms ** 2)) _lio_24 = ((- mV) * ms) * 33.11545195869231 _lio_25 = (mV * ms) * 1096.6331584284585 _lio_26 = 0.2 / mV _lio_27 = mV * ms _lio_28 = (mV * ms) * 0.0301973834223185 _lio_29 = 0.1 * ((mV ** 2) * (ms ** 2)) _lio_30 = 4.0 * (((mV ** 2) * ms) * 0.03567399334725241) _lio_31 = 0.05555555555555555 / mV _lio_32 = 4.0 * (((mV ** 2) * ms) * 3.253047117267129e-05) _lio_33 = (- 0.2555555555555556) / mV _lio_34 = 0.2 * ((mV ** 2) * (ms ** 2)) _lio_35 = 8.0 * (((mV ** 2) * ms) * 0.0010772612553122203) _lio_36 = (- 0.15555555555555556) / mV _lio_37 = 3.5 * mV _lio_38 = 70.0 * mV _lio_39 = 4.0 * (mV * ms) _lio_40 = (((- 3.5) * (mV ** 2)) * (ms ** 2)) * 28.03162489452614 _lio_41 = 3.5 * (((mV ** 2) * (ms ** 2)) * 28.03162489452614) _lio_42 = 0.1 * ((mV * (ms ** 2)) * 28.03162489452614) _lio_43 = 4.0 * ((mV * ms) * 0.0301973834223185) _lio_44 = (- 17.5) * mV _lio_45 = 0.7134798669450482 / ms _lio_46 = 0.578 * (mV ** 2) _lio_47 = ((- 0.0226938235730217) * (mV ** 3)) * (ms ** 2) _lio_48 = 0.0 - (0.0333732699603261 * (mV * ms)) _lio_49 = 0.000378683550267233 * ((mV ** 3) * (ms ** 2)) _lio_50 = ((- 0.0333732699603261) * mV) * ms _lio_51 = 0.34 * ((mV ** 3) * (ms ** 2)) _lio_52 = 0.0333732699603261 * (mV * ms) _lio_53 = 1.1137751478448e-05 * ((mV ** 2) * (ms ** 2)) _lio_54 = 0.01 * ((mV ** 2) * (ms ** 2)) _lio_55 = 0.0001392218934806 * (((mV ** 2) * ms) * 0.5769498103804866) _lio_56 = (- 0.2125) / mV _lio_57 = 0.125 * (((mV ** 2) * ms) * 0.5769498103804866) _lio_58 = 0.0125 / mV _lio_59 = 0.000667465399206522 * ((mV ** 2) * (ms ** 2)) _lio_60 = 0.00834331749008152 * (((mV ** 2) * ms) * 0.5769498103804866) _lio_61 = (- 0.1125) / mV _lio_62 = 0.034 * mV _lio_63 = 0.2125 * mV _lio_64 = 0.125 * (mV * ms) _lio_65 = (((- 0.0113469117865109) * (mV ** 2)) * (ms ** 2)) * 1.7332530178673953 _lio_66 = 0.34 * (((mV ** 2) * (ms ** 2)) * 1.7332530178673953) _lio_67 = 0.01 * ((mV * (ms ** 2)) * 1.7332530178673953) _lio_68 = 0.000333732699603261 * ((mV * (ms ** 2)) * 1.7332530178673953) _lio_69 = 0.00417165874504076 * (mV * ms) _lio_70 = (- 1.7) * mV _lio_71 = 0.36059363148780416 / ms _lio_72 = 0.0 - ((0.0065 * (mV * siemens)) / ufarad) _lio_73 = (((- 80.0) * (cm ** 2)) * mV) / ufarad _lio_74 = ((cm ** 2) * _timedarray(t)) / ufarad _lio_75 = (1.925 * (mV * siemens)) / ufarad _lio_76 = (0.81 * (mV * siemens)) / ufarad _lio_77 = 0.0 - ((0.0001 * siemens) / ufarad) _lio_78 = (- (cm ** 2)) / ufarad _lio_79 = (cm ** 2) / ufarad _lio_80 = (0.035 * siemens) / ufarad _lio_81 = (0.009 * siemens) / ufarad # vector code for _idx in range(N): _vectorisation_idx = _idx hi = _array_DG_inh_hi[_idx] lastspike = _array_DG_inh_lastspike[_idx] gi = _array_DG_inh_gi[_idx] ge = _array_DG_inh_ge[_idx] noise = _array_DG_inh_noise[_idx] v = _array_DG_inh_v[_idx] h = _array_DG_inh_h[_idx] he_hipp = _array_DG_inh_he_hipp[_idx] n = _array_DG_inh_n[_idx] r = _array_DG_inh_r[_idx] size = _array_DG_inh_size[_idx] he = _array_DG_inh_he[_idx] ge_hipp = _array_DG_inh_ge_hipp[_idx] m = _array_DG_inh_m[_idx] ge_ext = _array_DG_inh_ge_ext[_idx] he_ext = _array_DG_inh_he_ext[_idx] not_refractory = _timestep(t - lastspike, dt) >= _lio_1 _BA_ge = (- 1.0) * he _ge = (- _BA_ge) + (_lio_2 * (_BA_ge + ge)) _BA_ge_ext = (- 1.0) * he_ext _ge_ext = (- _BA_ge_ext) + (_lio_2 * (_BA_ge_ext + ge_ext)) _BA_ge_hipp = (- 1.0) * he_hipp _ge_hipp = (- _BA_ge_hipp) + (_lio_2 * (_BA_ge_hipp + ge_hipp)) _BA_gi = (- 1.0) * hi _gi = (- _BA_gi) + (_lio_3 * (_BA_gi + gi)) _BA_h = ((0.35 / (_lio_4 + (((_lio_5 / ((ms * exp(_lio_6 * v)) + (_lio_7 * exp(_lio_8 * v)))) + ((_lio_9 * exp(_lio_6 * v)) / (ms + (_lio_7 * exp(_lio_10 * v))))) + (_lio_11 * exp(_lio_10 * v))))) + (0.0245 / (((_lio_12 * exp(_lio_13 * v)) / (ms + (_lio_7 * exp(_lio_10 * v)))) + (_lio_14 * exp(_lio_6 * v))))) / (((- 5.0) / (ms + (_lio_7 * exp(_lio_10 * v)))) - (_lio_15 / (exp(_lio_16 * v) ** 0.05))) _h = (- _BA_h) + ((_BA_h + h) * exp(dt * (((- 5.0) / (ms + (_lio_7 * exp(_lio_10 * v)))) - (_lio_15 / (exp(_lio_16 * v) ** 0.05))))) _he = _lio_17 * he _he_ext = _lio_17 * he_ext _he_hipp = _lio_17 * he_hipp _hi = _lio_18 * hi _BA_m = (((((_lio_19 / ((((((((_lio_20 / (_lio_21 + (_lio_22 * exp(_lio_13 * v)))) + (_lio_23 / ((_lio_24 * exp(_lio_13 * v)) + (_lio_25 * exp(_lio_26 * v))))) + (_lio_23 / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v)))))) + ((_lio_29 * v) / ((_lio_24 * exp(_lio_13 * v)) + (_lio_25 * exp(_lio_26 * v))))) + ((_lio_29 * v) / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v)))))) + (_lio_30 * exp(_lio_31 * (- v)))) + (_lio_32 * exp(_lio_33 * v))) - (((_lio_34 * v) / (_lio_21 + (_lio_22 * exp(_lio_13 * v)))) + (_lio_35 * exp(_lio_36 * v))))) + ((_lio_37 * v) / ((((((((_lio_20 / (_lio_21 + (_lio_22 * exp(_lio_13 * v)))) + (_lio_23 / ((_lio_24 * exp(_lio_13 * v)) + (_lio_25 * exp(_lio_26 * v))))) + (_lio_23 / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v)))))) + ((_lio_29 * v) / ((_lio_24 * exp(_lio_13 * v)) + (_lio_25 * exp(_lio_26 * v))))) + ((_lio_29 * v) / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v)))))) + (_lio_30 * exp(_lio_31 * (- v)))) + (_lio_32 * exp(_lio_33 * v))) - (((_lio_34 * v) / (_lio_21 + (_lio_22 * exp(_lio_13 * v)))) + (_lio_35 * exp(_lio_36 * v)))))) + (_lio_38 / ((_lio_39 + ((((_lio_40 * exp(_lio_31 * v)) / (_lio_21 + (_lio_22 * exp(_lio_13 * v)))) + ((_lio_41 * exp(_lio_31 * v)) / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v)))))) + ((_lio_42 * (v * exp(_lio_31 * v))) / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v))))))) - (((_lio_42 * (v * exp(_lio_31 * v))) / (_lio_21 + (_lio_22 * exp(_lio_13 * v)))) + (_lio_43 * exp(_lio_13 * (- v))))))) + ((0.05 * (v ** 2)) / ((((((((_lio_20 / (_lio_21 + (_lio_22 * exp(_lio_13 * v)))) + (_lio_23 / ((_lio_24 * exp(_lio_13 * v)) + (_lio_25 * exp(_lio_26 * v))))) + (_lio_23 / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v)))))) + ((_lio_29 * v) / ((_lio_24 * exp(_lio_13 * v)) + (_lio_25 * exp(_lio_26 * v))))) + ((_lio_29 * v) / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v)))))) + (_lio_30 * exp(_lio_31 * (- v)))) + (_lio_32 * exp(_lio_33 * v))) - (((_lio_34 * v) / (_lio_21 + (_lio_22 * exp(_lio_13 * v)))) + (_lio_35 * exp(_lio_36 * v)))))) + ((2.0 * v) / ((_lio_39 + ((((_lio_40 * exp(_lio_31 * v)) / (_lio_21 + (_lio_22 * exp(_lio_13 * v)))) + ((_lio_41 * exp(_lio_31 * v)) / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v)))))) + ((_lio_42 * (v * exp(_lio_31 * v))) / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v))))))) - (((_lio_42 * (v * exp(_lio_31 * v))) / (_lio_21 + (_lio_22 * exp(_lio_13 * v)))) + (_lio_43 * exp(_lio_13 * (- v))))))) / ((_lio_44 / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v))))) - (((0.5 * v) / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v))))) + (_lio_45 / (exp(_lio_16 * v) ** 0.05555555555555555)))) _m = (- _BA_m) + ((_BA_m + m) * exp(dt * ((_lio_44 / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v))))) - (((0.5 * v) / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v))))) + (_lio_45 / (exp(_lio_16 * v) ** 0.05555555555555555)))))) _BA_n = (((((_lio_46 / ((((((((_lio_47 / (_lio_48 + (_lio_27 * exp(_lio_13 * v)))) + (_lio_49 / ((_lio_50 * exp(_lio_13 * v)) + (_lio_27 * exp(_lio_26 * v))))) + (_lio_51 / (_lio_27 - (_lio_52 * exp(_lio_10 * v))))) + ((_lio_53 * v) / ((_lio_50 * exp(_lio_13 * v)) + (_lio_27 * exp(_lio_26 * v))))) + ((_lio_54 * v) / (_lio_27 - (_lio_52 * exp(_lio_10 * v))))) + (_lio_55 * exp(_lio_56 * v))) + (_lio_57 * exp(_lio_58 * (- v)))) - (((_lio_59 * v) / (_lio_48 + (_lio_27 * exp(_lio_13 * v)))) + (_lio_60 * exp(_lio_61 * v))))) + ((_lio_62 * v) / ((((((((_lio_47 / (_lio_48 + (_lio_27 * exp(_lio_13 * v)))) + (_lio_49 / ((_lio_50 * exp(_lio_13 * v)) + (_lio_27 * exp(_lio_26 * v))))) + (_lio_51 / (_lio_27 - (_lio_52 * exp(_lio_10 * v))))) + ((_lio_53 * v) / ((_lio_50 * exp(_lio_13 * v)) + (_lio_27 * exp(_lio_26 * v))))) + ((_lio_54 * v) / (_lio_27 - (_lio_52 * exp(_lio_10 * v))))) + (_lio_55 * exp(_lio_56 * v))) + (_lio_57 * exp(_lio_58 * (- v)))) - (((_lio_59 * v) / (_lio_48 + (_lio_27 * exp(_lio_13 * v)))) + (_lio_60 * exp(_lio_61 * v)))))) + (_lio_63 / ((_lio_64 + ((((_lio_65 * exp(_lio_58 * v)) / (_lio_48 + (_lio_27 * exp(_lio_13 * v)))) + ((_lio_66 * exp(_lio_58 * v)) / (_lio_27 - (_lio_52 * exp(_lio_10 * v))))) + ((_lio_67 * (v * exp(_lio_58 * v))) / (_lio_27 - (_lio_52 * exp(_lio_10 * v)))))) - (((_lio_68 * (v * exp(_lio_58 * v))) / (_lio_48 + (_lio_27 * exp(_lio_13 * v)))) + (_lio_69 * exp(_lio_10 * v)))))) + ((0.0005 * (v ** 2)) / ((((((((_lio_47 / (_lio_48 + (_lio_27 * exp(_lio_13 * v)))) + (_lio_49 / ((_lio_50 * exp(_lio_13 * v)) + (_lio_27 * exp(_lio_26 * v))))) + (_lio_51 / (_lio_27 - (_lio_52 * exp(_lio_10 * v))))) + ((_lio_53 * v) / ((_lio_50 * exp(_lio_13 * v)) + (_lio_27 * exp(_lio_26 * v))))) + ((_lio_54 * v) / (_lio_27 - (_lio_52 * exp(_lio_10 * v))))) + (_lio_55 * exp(_lio_56 * v))) + (_lio_57 * exp(_lio_58 * (- v)))) - (((_lio_59 * v) / (_lio_48 + (_lio_27 * exp(_lio_13 * v)))) + (_lio_60 * exp(_lio_61 * v)))))) + ((0.00625 * v) / ((_lio_64 + ((((_lio_65 * exp(_lio_58 * v)) / (_lio_48 + (_lio_27 * exp(_lio_13 * v)))) + ((_lio_66 * exp(_lio_58 * v)) / (_lio_27 - (_lio_52 * exp(_lio_10 * v))))) + ((_lio_67 * (v * exp(_lio_58 * v))) / (_lio_27 - (_lio_52 * exp(_lio_10 * v)))))) - (((_lio_68 * (v * exp(_lio_58 * v))) / (_lio_48 + (_lio_27 * exp(_lio_13 * v)))) + (_lio_69 * exp(_lio_10 * v)))))) / ((_lio_70 / (_lio_27 - (_lio_52 * exp(_lio_10 * v)))) - (((0.05 * v) / (_lio_27 - (_lio_52 * exp(_lio_10 * v)))) + (_lio_71 / (exp(_lio_16 * v) ** 0.0125)))) _n = (- _BA_n) + ((_BA_n + n) * exp(dt * ((_lio_70 / (_lio_27 - (_lio_52 * exp(_lio_10 * v)))) - (((0.05 * v) / (_lio_27 - (_lio_52 * exp(_lio_10 * v)))) + (_lio_71 / (exp(_lio_16 * v) ** 0.0125)))))) _BA_v = ((_lio_72 + (((((_lio_73 * gi) / size) + ((_lio_74 * r) / size)) + (_lio_75 * (h * (m ** 3)))) + noise)) - (_lio_76 * (n ** 4))) / ((_lio_77 + ((_lio_78 * ge) / size)) - ((((((_lio_79 * ge_ext) / size) + ((_lio_79 * ge_hipp) / size)) + ((_lio_79 * gi) / size)) + (_lio_80 * (h * (m ** 3)))) + (_lio_81 * (n ** 4)))) _v = (- _BA_v) + ((_BA_v + v) * exp(dt * ((_lio_77 + ((_lio_78 * ge) / size)) - ((((((_lio_79 * ge_ext) / size) + ((_lio_79 * ge_hipp) / size)) + ((_lio_79 * gi) / size)) + (_lio_80 * (h * (m ** 3)))) + (_lio_81 * (n ** 4)))))) ge = _ge ge_ext = _ge_ext ge_hipp = _ge_hipp gi = _gi h = _h he = _he he_ext = _he_ext he_hipp = _he_hipp hi = _hi m = _m n = _n v = _v _array_DG_inh_hi[_idx] = hi _array_DG_inh_ge[_idx] = ge _array_DG_inh_gi[_idx] = gi _array_DG_inh_v[_idx] = v _array_DG_inh_h[_idx] = h _array_DG_inh_he_hipp[_idx] = he_hipp _array_DG_inh_n[_idx] = n _array_DG_inh_ge_hipp[_idx] = ge_hipp _array_DG_inh_m[_idx] = m _array_DG_inh_he[_idx] = he _array_DG_inh_ge_ext[_idx] = ge_ext _array_DG_inh_he_ext[_idx] = he_ext _array_DG_inh_not_refractory[_idx] = not_refractory before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef int64_t N = _namespace["N"] _var_cm = _namespace["_var_cm"] cdef double cm = _namespace["cm"] _var_dt = _namespace["_var_dt"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_dt = _namespace['_array_defaultclock_dt'] cdef double * _array_defaultclock_dt = _buf__array_defaultclock_dt.data cdef double dt = _namespace["dt"] _var_ge = _namespace["_var_ge"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_inh_ge = _namespace['_array_DG_inh_ge'] cdef double * _array_DG_inh_ge = _buf__array_DG_inh_ge.data cdef size_t _num_array_DG_inh_ge = len(_namespace['_array_DG_inh_ge']) cdef double ge _var_ge_ext = _namespace["_var_ge_ext"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_inh_ge_ext = _namespace['_array_DG_inh_ge_ext'] cdef double * _array_DG_inh_ge_ext = _buf__array_DG_inh_ge_ext.data cdef size_t _num_array_DG_inh_ge_ext = len(_namespace['_array_DG_inh_ge_ext']) cdef double ge_ext _var_ge_hipp = _namespace["_var_ge_hipp"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_inh_ge_hipp = _namespace['_array_DG_inh_ge_hipp'] cdef double * _array_DG_inh_ge_hipp = _buf__array_DG_inh_ge_hipp.data cdef size_t _num_array_DG_inh_ge_hipp = len(_namespace['_array_DG_inh_ge_hipp']) cdef double ge_hipp _var_gi = _namespace["_var_gi"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_inh_gi = _namespace['_array_DG_inh_gi'] cdef double * _array_DG_inh_gi = _buf__array_DG_inh_gi.data cdef size_t _num_array_DG_inh_gi = len(_namespace['_array_DG_inh_gi']) cdef double gi _var_h = _namespace["_var_h"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_inh_h = _namespace['_array_DG_inh_h'] cdef double * _array_DG_inh_h = _buf__array_DG_inh_h.data cdef size_t _num_array_DG_inh_h = len(_namespace['_array_DG_inh_h']) cdef double h _var_he = _namespace["_var_he"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_inh_he = _namespace['_array_DG_inh_he'] cdef double * _array_DG_inh_he = _buf__array_DG_inh_he.data cdef size_t _num_array_DG_inh_he = len(_namespace['_array_DG_inh_he']) cdef double he _var_he_ext = _namespace["_var_he_ext"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_inh_he_ext = _namespace['_array_DG_inh_he_ext'] cdef double * _array_DG_inh_he_ext = _buf__array_DG_inh_he_ext.data cdef size_t _num_array_DG_inh_he_ext = len(_namespace['_array_DG_inh_he_ext']) cdef double he_ext _var_he_hipp = _namespace["_var_he_hipp"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_inh_he_hipp = _namespace['_array_DG_inh_he_hipp'] cdef double * _array_DG_inh_he_hipp = _buf__array_DG_inh_he_hipp.data cdef size_t _num_array_DG_inh_he_hipp = len(_namespace['_array_DG_inh_he_hipp']) cdef double he_hipp _var_hi = _namespace["_var_hi"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_inh_hi = _namespace['_array_DG_inh_hi'] cdef double * _array_DG_inh_hi = _buf__array_DG_inh_hi.data cdef size_t _num_array_DG_inh_hi = len(_namespace['_array_DG_inh_hi']) cdef double hi # namespace for function inputs_stim global _namespace_timedarray_values global _namespace_num_timedarray_values cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__timedarray_values = _namespace['_timedarray_values'] _namespace_timedarray_values = _buf__timedarray_values.data _namespace_num_timedarray_values = len(_namespace['_timedarray_values']) _var_lastspike = _namespace["_var_lastspike"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_inh_lastspike = _namespace['_array_DG_inh_lastspike'] cdef double * _array_DG_inh_lastspike = _buf__array_DG_inh_lastspike.data cdef size_t _num_array_DG_inh_lastspike = len(_namespace['_array_DG_inh_lastspike']) cdef double lastspike _var_m = _namespace["_var_m"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_inh_m = _namespace['_array_DG_inh_m'] cdef double * _array_DG_inh_m = _buf__array_DG_inh_m.data cdef size_t _num_array_DG_inh_m = len(_namespace['_array_DG_inh_m']) cdef double m _var_mV = _namespace["_var_mV"] cdef double mV = _namespace["mV"] _var_ms = _namespace["_var_ms"] cdef double ms = _namespace["ms"] _var_n = _namespace["_var_n"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_inh_n = _namespace['_array_DG_inh_n'] cdef double * _array_DG_inh_n = _buf__array_DG_inh_n.data cdef size_t _num_array_DG_inh_n = len(_namespace['_array_DG_inh_n']) cdef double n _var_noise = _namespace["_var_noise"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_inh_noise = _namespace['_array_DG_inh_noise'] cdef double * _array_DG_inh_noise = _buf__array_DG_inh_noise.data cdef size_t _num_array_DG_inh_noise = len(_namespace['_array_DG_inh_noise']) cdef double noise _var_not_refractory = _namespace["_var_not_refractory"] cdef _numpy.ndarray[char, ndim=1, mode='c', cast=True] _buf__array_DG_inh_not_refractory = _namespace['_array_DG_inh_not_refractory'] cdef bool * _array_DG_inh_not_refractory = _buf__array_DG_inh_not_refractory.data cdef size_t _num_array_DG_inh_not_refractory = len(_namespace['_array_DG_inh_not_refractory']) cdef bool not_refractory _var_r = _namespace["_var_r"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_inh_r = _namespace['_array_DG_inh_r'] cdef double * _array_DG_inh_r = _buf__array_DG_inh_r.data cdef size_t _num_array_DG_inh_r = len(_namespace['_array_DG_inh_r']) cdef double r _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] _var_size = _namespace["_var_size"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_inh_size = _namespace['_array_DG_inh_size'] cdef double * _array_DG_inh_size = _buf__array_DG_inh_size.data cdef size_t _num_array_DG_inh_size = len(_namespace['_array_DG_inh_size']) cdef double size _var_t = _namespace["_var_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double t _var_ufarad = _namespace["_var_ufarad"] cdef double ufarad = _namespace["ufarad"] _var_v = _namespace["_var_v"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_inh_v = _namespace['_array_DG_inh_v'] cdef double * _array_DG_inh_v = _buf__array_DG_inh_v.data cdef size_t _num_array_DG_inh_v = len(_namespace['_array_DG_inh_v']) cdef double v cdef double _BA_ge cdef double _BA_ge_ext cdef double _BA_ge_hipp cdef double _BA_gi cdef double _BA_h cdef double _BA_m cdef double _BA_n cdef double _BA_v cdef double _ge cdef double _ge_ext cdef double _ge_hipp cdef double _gi cdef double _h cdef double _he cdef double _he_ext cdef double _he_hipp cdef double _hi cdef int64_t _lio_1 cdef double _lio_10 cdef double _lio_11 cdef double _lio_12 cdef double _lio_13 cdef double _lio_14 cdef double _lio_15 cdef double _lio_16 cdef double _lio_17 cdef double _lio_18 cdef double _lio_19 cdef double _lio_2 cdef double _lio_20 cdef double _lio_21 cdef double _lio_22 cdef double _lio_23 cdef double _lio_24 cdef double _lio_25 cdef double _lio_26 cdef double _lio_27 cdef double _lio_28 cdef double _lio_29 cdef double _lio_3 cdef double _lio_30 cdef double _lio_31 cdef double _lio_32 cdef double _lio_33 cdef double _lio_34 cdef double _lio_35 cdef double _lio_36 cdef double _lio_37 cdef double _lio_38 cdef double _lio_39 cdef double _lio_4 cdef double _lio_40 cdef double _lio_41 cdef double _lio_42 cdef double _lio_43 cdef double _lio_44 cdef double _lio_45 cdef double _lio_46 cdef double _lio_47 cdef double _lio_48 cdef double _lio_49 cdef double _lio_5 cdef double _lio_50 cdef double _lio_51 cdef double _lio_52 cdef double _lio_53 cdef double _lio_54 cdef double _lio_55 cdef double _lio_56 cdef double _lio_57 cdef double _lio_58 cdef double _lio_59 cdef double _lio_6 cdef double _lio_60 cdef double _lio_61 cdef double _lio_62 cdef double _lio_63 cdef double _lio_64 cdef double _lio_65 cdef double _lio_66 cdef double _lio_67 cdef double _lio_68 cdef double _lio_69 cdef double _lio_7 cdef double _lio_70 cdef double _lio_71 cdef double _lio_72 cdef double _lio_73 cdef double _lio_74 cdef double _lio_75 cdef double _lio_76 cdef double _lio_77 cdef double _lio_78 cdef double _lio_79 cdef double _lio_8 cdef double _lio_80 cdef double _lio_81 cdef double _lio_9 cdef double _m cdef double _n cdef double _v if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef int64_t N = _namespace["N"] _var_cm = _namespace["_var_cm"] cdef double cm = _namespace["cm"] _var_dt = _namespace["_var_dt"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_dt = _namespace['_array_defaultclock_dt'] cdef double * _array_defaultclock_dt = _buf__array_defaultclock_dt.data cdef double dt = _namespace["dt"] _var_ge = _namespace["_var_ge"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_inh_ge = _namespace['_array_DG_inh_ge'] cdef double * _array_DG_inh_ge = _buf__array_DG_inh_ge.data cdef size_t _num_array_DG_inh_ge = len(_namespace['_array_DG_inh_ge']) cdef double ge _var_ge_ext = _namespace["_var_ge_ext"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_inh_ge_ext = _namespace['_array_DG_inh_ge_ext'] cdef double * _array_DG_inh_ge_ext = _buf__array_DG_inh_ge_ext.data cdef size_t _num_array_DG_inh_ge_ext = len(_namespace['_array_DG_inh_ge_ext']) cdef double ge_ext _var_ge_hipp = _namespace["_var_ge_hipp"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_inh_ge_hipp = _namespace['_array_DG_inh_ge_hipp'] cdef double * _array_DG_inh_ge_hipp = _buf__array_DG_inh_ge_hipp.data cdef size_t _num_array_DG_inh_ge_hipp = len(_namespace['_array_DG_inh_ge_hipp']) cdef double ge_hipp _var_gi = _namespace["_var_gi"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_inh_gi = _namespace['_array_DG_inh_gi'] cdef double * _array_DG_inh_gi = _buf__array_DG_inh_gi.data cdef size_t _num_array_DG_inh_gi = len(_namespace['_array_DG_inh_gi']) cdef double gi _var_h = _namespace["_var_h"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_inh_h = _namespace['_array_DG_inh_h'] cdef double * _array_DG_inh_h = _buf__array_DG_inh_h.data cdef size_t _num_array_DG_inh_h = len(_namespace['_array_DG_inh_h']) cdef double h _var_he = _namespace["_var_he"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_inh_he = _namespace['_array_DG_inh_he'] cdef double * _array_DG_inh_he = _buf__array_DG_inh_he.data cdef size_t _num_array_DG_inh_he = len(_namespace['_array_DG_inh_he']) cdef double he _var_he_ext = _namespace["_var_he_ext"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_inh_he_ext = _namespace['_array_DG_inh_he_ext'] cdef double * _array_DG_inh_he_ext = _buf__array_DG_inh_he_ext.data cdef size_t _num_array_DG_inh_he_ext = len(_namespace['_array_DG_inh_he_ext']) cdef double he_ext _var_he_hipp = _namespace["_var_he_hipp"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_inh_he_hipp = _namespace['_array_DG_inh_he_hipp'] cdef double * _array_DG_inh_he_hipp = _buf__array_DG_inh_he_hipp.data cdef size_t _num_array_DG_inh_he_hipp = len(_namespace['_array_DG_inh_he_hipp']) cdef double he_hipp _var_hi = _namespace["_var_hi"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_inh_hi = _namespace['_array_DG_inh_hi'] cdef double * _array_DG_inh_hi = _buf__array_DG_inh_hi.data cdef size_t _num_array_DG_inh_hi = len(_namespace['_array_DG_inh_hi']) cdef double hi # namespace for function inputs_stim global _namespace_timedarray_values global _namespace_num_timedarray_values cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__timedarray_values = _namespace['_timedarray_values'] _namespace_timedarray_values = _buf__timedarray_values.data _namespace_num_timedarray_values = len(_namespace['_timedarray_values']) _var_lastspike = _namespace["_var_lastspike"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_inh_lastspike = _namespace['_array_DG_inh_lastspike'] cdef double * _array_DG_inh_lastspike = _buf__array_DG_inh_lastspike.data cdef size_t _num_array_DG_inh_lastspike = len(_namespace['_array_DG_inh_lastspike']) cdef double lastspike _var_m = _namespace["_var_m"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_inh_m = _namespace['_array_DG_inh_m'] cdef double * _array_DG_inh_m = _buf__array_DG_inh_m.data cdef size_t _num_array_DG_inh_m = len(_namespace['_array_DG_inh_m']) cdef double m _var_mV = _namespace["_var_mV"] cdef double mV = _namespace["mV"] _var_ms = _namespace["_var_ms"] cdef double ms = _namespace["ms"] _var_n = _namespace["_var_n"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_inh_n = _namespace['_array_DG_inh_n'] cdef double * _array_DG_inh_n = _buf__array_DG_inh_n.data cdef size_t _num_array_DG_inh_n = len(_namespace['_array_DG_inh_n']) cdef double n _var_noise = _namespace["_var_noise"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_inh_noise = _namespace['_array_DG_inh_noise'] cdef double * _array_DG_inh_noise = _buf__array_DG_inh_noise.data cdef size_t _num_array_DG_inh_noise = len(_namespace['_array_DG_inh_noise']) cdef double noise _var_not_refractory = _namespace["_var_not_refractory"] cdef _numpy.ndarray[char, ndim=1, mode='c', cast=True] _buf__array_DG_inh_not_refractory = _namespace['_array_DG_inh_not_refractory'] cdef bool * _array_DG_inh_not_refractory = _buf__array_DG_inh_not_refractory.data cdef size_t _num_array_DG_inh_not_refractory = len(_namespace['_array_DG_inh_not_refractory']) cdef bool not_refractory _var_r = _namespace["_var_r"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_inh_r = _namespace['_array_DG_inh_r'] cdef double * _array_DG_inh_r = _buf__array_DG_inh_r.data cdef size_t _num_array_DG_inh_r = len(_namespace['_array_DG_inh_r']) cdef double r _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] _var_size = _namespace["_var_size"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_inh_size = _namespace['_array_DG_inh_size'] cdef double * _array_DG_inh_size = _buf__array_DG_inh_size.data cdef size_t _num_array_DG_inh_size = len(_namespace['_array_DG_inh_size']) cdef double size _var_t = _namespace["_var_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double t _var_ufarad = _namespace["_var_ufarad"] cdef double ufarad = _namespace["ufarad"] _var_v = _namespace["_var_v"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_inh_v = _namespace['_array_DG_inh_v'] cdef double * _array_DG_inh_v = _buf__array_DG_inh_v.data cdef size_t _num_array_DG_inh_v = len(_namespace['_array_DG_inh_v']) cdef double v cdef double _BA_ge cdef double _BA_ge_ext cdef double _BA_ge_hipp cdef double _BA_gi cdef double _BA_h cdef double _BA_m cdef double _BA_n cdef double _BA_v cdef double _ge cdef double _ge_ext cdef double _ge_hipp cdef double _gi cdef double _h cdef double _he cdef double _he_ext cdef double _he_hipp cdef double _hi cdef int64_t _lio_1 cdef double _lio_10 cdef double _lio_11 cdef double _lio_12 cdef double _lio_13 cdef double _lio_14 cdef double _lio_15 cdef double _lio_16 cdef double _lio_17 cdef double _lio_18 cdef double _lio_19 cdef double _lio_2 cdef double _lio_20 cdef double _lio_21 cdef double _lio_22 cdef double _lio_23 cdef double _lio_24 cdef double _lio_25 cdef double _lio_26 cdef double _lio_27 cdef double _lio_28 cdef double _lio_29 cdef double _lio_3 cdef double _lio_30 cdef double _lio_31 cdef double _lio_32 cdef double _lio_33 cdef double _lio_34 cdef double _lio_35 cdef double _lio_36 cdef double _lio_37 cdef double _lio_38 cdef double _lio_39 cdef double _lio_4 cdef double _lio_40 cdef double _lio_41 cdef double _lio_42 cdef double _lio_43 cdef double _lio_44 cdef double _lio_45 cdef double _lio_46 cdef double _lio_47 cdef double _lio_48 cdef double _lio_49 cdef double _lio_5 cdef double _lio_50 cdef double _lio_51 cdef double _lio_52 cdef double _lio_53 cdef double _lio_54 cdef double _lio_55 cdef double _lio_56 cdef double _lio_57 cdef double _lio_58 cdef double _lio_59 cdef double _lio_6 cdef double _lio_60 cdef double _lio_61 cdef double _lio_62 cdef double _lio_63 cdef double _lio_64 cdef double _lio_65 cdef double _lio_66 cdef double _lio_67 cdef double _lio_68 cdef double _lio_69 cdef double _lio_7 cdef double _lio_70 cdef double _lio_71 cdef double _lio_72 cdef double _lio_73 cdef double _lio_74 cdef double _lio_75 cdef double _lio_76 cdef double _lio_77 cdef double _lio_78 cdef double _lio_79 cdef double _lio_8 cdef double _lio_80 cdef double _lio_81 cdef double _lio_9 cdef double _m cdef double _n cdef double _v if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:15:16,860 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name DG_inh_stateupdater_codeobject 2021-11-05 15:15:16,861 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "DG_inh_stateupdate" using Cython module "_cython_magic_ce5347a5472e6d6f50aa6e19ff6e12a4" 2021-11-05 15:15:16,861 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140606216721072 on /home/nikos/.cython/brian_extensions/_cython_magic_ce5347a5472e6d6f50aa6e19ff6e12a4.lock 2021-11-05 15:15:16,862 DEBUG brian2.utils.filelock: Lock 140606216721072 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_ce5347a5472e6d6f50aa6e19ff6e12a4.lock 2021-11-05 15:15:18,649 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140606216721072 on /home/nikos/.cython/brian_extensions/_cython_magic_ce5347a5472e6d6f50aa6e19ff6e12a4.lock 2021-11-05 15:15:18,649 DEBUG brian2.utils.filelock: Lock 140606216721072 released on /home/nikos/.cython/brian_extensions/_cython_magic_ce5347a5472e6d6f50aa6e19ff6e12a4.lock 2021-11-05 15:15:18,700 DEBUG brian2.stateupdaters.base.method_choice: Group DG_py: using numerical integration method exponential_euler (took 0.05s) 2021-11-05 15:15:18,700 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=DG_py, template name=stateupdate) for abstract code: not_refractory = timestep(t - lastspike, dt) >= timestep(0.003000, dt) _BA_Ca_i = -200*ms*(1.2e-6*mole/(metre**3*ms) + 0.000621832540496844*hCaL*mCaL**2*mV*mole*siemens*size/(cm**4*coulomb*umetre) - 5.1819378374737e-6*hCaL*mCaL**2*mole*siemens*size*v/(cm**4*coulomb*umetre)) _Ca_i = -_BA_Ca_i + (Ca_i + _BA_Ca_i)*exp(-dt/(200*ms)) _Cl = Cl*exp(-dt/tau_Cl) _BA_ge = -1.0*he _ge = -_BA_ge + (_BA_ge + ge)*exp(-3.33333333333333*dt/ms) _BA_ge_ext = -1.0*he_ext _ge_ext = -_BA_ge_ext + (_BA_ge_ext + ge_ext)*exp(-3.33333333333333*dt/ms) _BA_ge_hipp = -1.0*he_hipp _ge_hipp = -_BA_ge_hipp + (_BA_ge_hipp + ge_hipp)*exp(-3.33333333333333*dt/ms) _BA_gi = -1.0*hi _gi = -_BA_gi + (_BA_gi + gi)*exp(-1.0*dt/ms) _BA_glu = -1 _glu = -_BA_glu + (_BA_glu + glu)*exp(-dt/(3*second)) _BA_h = 0.128*exp(-19/9)*exp(-v/(18*mV))/(ms*(-4.0/(ms + ms*exp(-3)*exp(-v/(5*mV))) - 0.128*exp(-19/9)/(ms*exp(v/mV)**(1/18)))) _h = -_BA_h + (_BA_h + h)*exp(dt*(-4.0/(ms + ms*exp(-3)*exp(-v/(5*mV))) - 0.128*exp(-19/9)/(ms*exp(v/mV)**(1/18)))) _BA_hCaL = 0.000457*exp(-13/50)*exp(-v/(50*mV))/(ms*(-0.0065/(1.0*ms + ms*exp(-15/28)*exp(-v/(28*mV))) - 0.000457*exp(-13/50)/(ms*exp(v/mV)**(1/50)))) _hCaL = -_BA_hCaL + (_BA_hCaL + hCaL)*exp(dt*(-0.0065/(1.0*ms + ms*exp(-15/28)*exp(-v/(28*mV))) - 0.000457*exp(-13/50)/(ms*exp(v/mV)**(1/50)))) _he = he*exp(-dt/(5*ms)) _he_ext = he_ext*exp(-dt/(5*ms)) _he_hipp = he_hipp*exp(-dt/(5*ms)) _hi = hi*exp(-dt/(10*ms)) _BA_m = (-13.44*mV/(-1.0*mV*ms + mV*ms*exp(-21/2)*exp(-v/(4*mV))) - 0.32*v/(-1.0*mV*ms + mV*ms*exp(-21/2)*exp(-v/(4*mV))))/(-4.2*mV/(mV*ms*exp(3)*exp(v/(5*mV)) - 1.0*mV*ms) + 13.44*mV/(-1.0*mV*ms + mV*ms*exp(-21/2)*exp(-v/(4*mV))) - 0.28*v/(mV*ms*exp(3)*exp(v/(5*mV)) - 1.0*mV*ms) + 0.32*v/(-1.0*mV*ms + mV*ms*exp(-21/2)*exp(-v/(4*mV)))) _m = -_BA_m + (_BA_m + m)*exp(dt*(-4.2*mV/(mV*ms*exp(3)*exp(v/(5*mV)) - 1.0*mV*ms) + 13.44*mV/(-1.0*mV*ms + mV*ms*exp(-21/2)*exp(-v/(4*mV))) - 0.28*v/(mV*ms*exp(3)*exp(v/(5*mV)) - 1.0*mV*ms) + 0.32*v/(-1.0*mV*ms + mV*ms*exp(-21/2)*exp(-v/(4*mV))))) _BA_mCaL = (-1.485*mV/(-1.0*mV*ms + 0.000820773673798214*mV*ms*exp(-0.263157894736842*v/mV)) - 0.055*v/(-1.0*mV*ms + 0.000820773673798214*mV*ms*exp(-0.263157894736842*v/mV)))/(1.485*mV/(-1.0*mV*ms + 0.000820773673798214*mV*ms*exp(-0.263157894736842*v/mV)) + 0.055*v/(-1.0*mV*ms + 0.000820773673798214*mV*ms*exp(-0.263157894736842*v/mV)) - 0.94*exp(-75/17)/(ms*exp(v/mV)**(1/17))) _mCaL = -_BA_mCaL + (_BA_mCaL + mCaL)*exp(dt*(1.485*mV/(-1.0*mV*ms + 0.000820773673798214*mV*ms*exp(-0.263157894736842*v/mV)) + 0.055*v/(-1.0*mV*ms + 0.000820773673798214*mV*ms*exp(-0.263157894736842*v/mV)) - 0.94*exp(-75/17)/(ms*exp(v/mV)**(1/17)))) _BA_n = (-1.28*mV/(-1.0*mV*ms + mV*ms*exp(-8)*exp(-v/(5*mV))) - 0.032*v/(-1.0*mV*ms + mV*ms*exp(-8)*exp(-v/(5*mV))))/(1.28*mV/(-1.0*mV*ms + mV*ms*exp(-8)*exp(-v/(5*mV))) + 0.032*v/(-1.0*mV*ms + mV*ms*exp(-8)*exp(-v/(5*mV))) - 0.5*exp(-9/8)/(ms*exp(v/mV)**(1/40))) _n = -_BA_n + (_BA_n + n)*exp(dt*(1.28*mV/(-1.0*mV*ms + mV*ms*exp(-8)*exp(-v/(5*mV))) + 0.032*v/(-1.0*mV*ms + mV*ms*exp(-8)*exp(-v/(5*mV))) - 0.5*exp(-9/8)/(ms*exp(v/mV)**(1/40)))) _BA_p = (0.001/(ms*exp(7/4)*exp(v/(20*mV)) + ms*exp(-7/4)*exp(-v/(20*mV))) + 0.0033*exp(7/4)*exp(v/(20*mV))/(ms + ms*exp(-7/2)*exp(-v/(10*mV))))/(-0.0033*exp(7/4)*exp(v/mV)**(1/20)/ms - exp(-7/4)/(1000*ms*exp(v/mV)**(1/20))) _p = -_BA_p + (_BA_p + p)*exp(dt*(-0.0033*exp(7/4)*exp(v/mV)**(1/20)/ms - exp(-7/4)/(1000*ms*exp(v/mV)**(1/20)))) _BA_v = (Ek*cm**2*gM*p/ufarad + 5*Ek*msiemens*n**4/ufarad - 80*cm**2*gi*mV*int(Cl <= 0.5)/(size*ufarad) + cm**2*r*inputs_stim(t)/(size*ufarad) + 2500*h*m**3*mV*msiemens/ufarad + 0.012*hCaL*mCaL**2*mV*siemens/ufarad - 0.0007*mV*siemens/ufarad + noise)*(-cm**2*gM*p/ufarad - cm**2*ge/(size*ufarad) - cm**2*ge_ext/(size*ufarad) - cm**2*ge_hipp/(size*ufarad) - cm**2*gi*int(Cl <= 0.5)/(size*ufarad) - cm**2*gi*int(Cl > 0.5)/(size*ufarad) - 50*h*m**3*msiemens/ufarad - 0.0001*hCaL*mCaL**2*siemens/ufarad - 5*msiemens*n**4/ufarad - 1.0e-5*siemens/ufarad)**(-1) _v = -_BA_v + (_BA_v + v)*exp(dt*(-cm**2*gM*p/ufarad - cm**2*ge/(size*ufarad) - cm**2*ge_ext/(size*ufarad) - cm**2*ge_hipp/(size*ufarad) - cm**2*gi*int(Cl <= 0.5)/(size*ufarad) - cm**2*gi*int(Cl > 0.5)/(size*ufarad) - 50*h*m**3*msiemens/ufarad - 0.0001*hCaL*mCaL**2*siemens/ufarad - 5*msiemens*n**4/ufarad - 1.0e-5*siemens/ufarad)) Ca_i = _Ca_i Cl = _Cl ge = _ge ge_ext = _ge_ext ge_hipp = _ge_hipp gi = _gi glu = _glu h = _h hCaL = _hCaL he = _he he_ext = _he_ext he_hipp = _he_hipp hi = _hi m = _m mCaL = _mCaL n = _n p = _p v = _v 2021-11-05 15:15:18,714 DIAGNOSTIC brian2.devices.device: DG_py_stateupdater_codeobject abstract code: not_refractory = timestep(t - lastspike, dt) >= timestep(0.003000, dt) _BA_Ca_i = -200*ms*(1.2e-6*mole/(metre**3*ms) + 0.000621832540496844*hCaL*mCaL**2*mV*mole*siemens*size/(cm**4*coulomb*umetre) - 5.1819378374737e-6*hCaL*mCaL**2*mole*siemens*size*v/(cm**4*coulomb*umetre)) _Ca_i = -_BA_Ca_i + (Ca_i + _BA_Ca_i)*exp(-dt/(200*ms)) _Cl = Cl*exp(-dt/tau_Cl) _BA_ge = -1.0*he _ge = -_BA_ge + (_BA_ge + ge)*exp(-3.33333333333333*dt/ms) _BA_ge_ext = -1.0*he_ext _ge_ext = -_BA_ge_ext + (_BA_ge_ext + ge_ext)*exp(-3.33333333333333*dt/ms) _BA_ge_hipp = -1.0*he_hipp _ge_hipp = -_BA_ge_hipp + (_BA_ge_hipp + ge_hipp)*exp(-3.33333333333333*dt/ms) _BA_gi = -1.0*hi _gi = -_BA_gi + (_BA_gi + gi)*exp(-1.0*dt/ms) _BA_glu = -1 _glu = -_BA_glu + (_BA_glu + glu)*exp(-dt/(3*second)) _BA_h = 0.128*exp(-19/9)*exp(-v/(18*mV))/(ms*(-4.0/(ms + ms*exp(-3)*exp(-v/(5*mV))) - 0.128*exp(-19/9)/(ms*exp(v/mV)**(1/18)))) _h = -_BA_h + (_BA_h + h)*exp(dt*(-4.0/(ms + ms*exp(-3)*exp(-v/(5*mV))) - 0.128*exp(-19/9)/(ms*exp(v/mV)**(1/18)))) _BA_hCaL = 0.000457*exp(-13/50)*exp(-v/(50*mV))/(ms*(-0.0065/(1.0*ms + ms*exp(-15/28)*exp(-v/(28*mV))) - 0.000457*exp(-13/50)/(ms*exp(v/mV)**(1/50)))) _hCaL = -_BA_hCaL + (_BA_hCaL + hCaL)*exp(dt*(-0.0065/(1.0*ms + ms*exp(-15/28)*exp(-v/(28*mV))) - 0.000457*exp(-13/50)/(ms*exp(v/mV)**(1/50)))) _he = he*exp(-dt/(5*ms)) _he_ext = he_ext*exp(-dt/(5*ms)) _he_hipp = he_hipp*exp(-dt/(5*ms)) _hi = hi*exp(-dt/(10*ms)) _BA_m = (-13.44*mV/(-1.0*mV*ms + mV*ms*exp(-21/2)*exp(-v/(4*mV))) - 0.32*v/(-1.0*mV*ms + mV*ms*exp(-21/2)*exp(-v/(4*mV))))/(-4.2*mV/(mV*ms*exp(3)*exp(v/(5*mV)) - 1.0*mV*ms) + 13.44*mV/(-1.0*mV*ms + mV*ms*exp(-21/2)*exp(-v/(4*mV))) - 0.28*v/(mV*ms*exp(3)*exp(v/(5*mV)) - 1.0*mV*ms) + 0.32*v/(-1.0*mV*ms + mV*ms*exp(-21/2)*exp(-v/(4*mV)))) _m = -_BA_m + (_BA_m + m)*exp(dt*(-4.2*mV/(mV*ms*exp(3)*exp(v/(5*mV)) - 1.0*mV*ms) + 13.44*mV/(-1.0*mV*ms + mV*ms*exp(-21/2)*exp(-v/(4*mV))) - 0.28*v/(mV*ms*exp(3)*exp(v/(5*mV)) - 1.0*mV*ms) + 0.32*v/(-1.0*mV*ms + mV*ms*exp(-21/2)*exp(-v/(4*mV))))) _BA_mCaL = (-1.485*mV/(-1.0*mV*ms + 0.000820773673798214*mV*ms*exp(-0.263157894736842*v/mV)) - 0.055*v/(-1.0*mV*ms + 0.000820773673798214*mV*ms*exp(-0.263157894736842*v/mV)))/(1.485*mV/(-1.0*mV*ms + 0.000820773673798214*mV*ms*exp(-0.263157894736842*v/mV)) + 0.055*v/(-1.0*mV*ms + 0.000820773673798214*mV*ms*exp(-0.263157894736842*v/mV)) - 0.94*exp(-75/17)/(ms*exp(v/mV)**(1/17))) _mCaL = -_BA_mCaL + (_BA_mCaL + mCaL)*exp(dt*(1.485*mV/(-1.0*mV*ms + 0.000820773673798214*mV*ms*exp(-0.263157894736842*v/mV)) + 0.055*v/(-1.0*mV*ms + 0.000820773673798214*mV*ms*exp(-0.263157894736842*v/mV)) - 0.94*exp(-75/17)/(ms*exp(v/mV)**(1/17)))) _BA_n = (-1.28*mV/(-1.0*mV*ms + mV*ms*exp(-8)*exp(-v/(5*mV))) - 0.032*v/(-1.0*mV*ms + mV*ms*exp(-8)*exp(-v/(5*mV))))/(1.28*mV/(-1.0*mV*ms + mV*ms*exp(-8)*exp(-v/(5*mV))) + 0.032*v/(-1.0*mV*ms + mV*ms*exp(-8)*exp(-v/(5*mV))) - 0.5*exp(-9/8)/(ms*exp(v/mV)**(1/40))) _n = -_BA_n + (_BA_n + n)*exp(dt*(1.28*mV/(-1.0*mV*ms + mV*ms*exp(-8)*exp(-v/(5*mV))) + 0.032*v/(-1.0*mV*ms + mV*ms*exp(-8)*exp(-v/(5*mV))) - 0.5*exp(-9/8)/(ms*exp(v/mV)**(1/40)))) _BA_p = (0.001/(ms*exp(7/4)*exp(v/(20*mV)) + ms*exp(-7/4)*exp(-v/(20*mV))) + 0.0033*exp(7/4)*exp(v/(20*mV))/(ms + ms*exp(-7/2)*exp(-v/(10*mV))))/(-0.0033*exp(7/4)*exp(v/mV)**(1/20)/ms - exp(-7/4)/(1000*ms*exp(v/mV)**(1/20))) _p = -_BA_p + (_BA_p + p)*exp(dt*(-0.0033*exp(7/4)*exp(v/mV)**(1/20)/ms - exp(-7/4)/(1000*ms*exp(v/mV)**(1/20)))) _BA_v = (Ek*cm**2*gM*p/ufarad + 5*Ek*msiemens*n**4/ufarad - 80*cm**2*gi*mV*int(Cl <= 0.5)/(size*ufarad) + cm**2*r*inputs_stim(t)/(size*ufarad) + 2500*h*m**3*mV*msiemens/ufarad + 0.012*hCaL*mCaL**2*mV*siemens/ufarad - 0.0007*mV*siemens/ufarad + noise)*(-cm**2*gM*p/ufarad - cm**2*ge/(size*ufarad) - cm**2*ge_ext/(size*ufarad) - cm**2*ge_hipp/(size*ufarad) - cm**2*gi*int(Cl <= 0.5)/(size*ufarad) - cm**2*gi*int(Cl > 0.5)/(size*ufarad) - 50*h*m**3*msiemens/ufarad - 0.0001*hCaL*mCaL**2*siemens/ufarad - 5*msiemens*n**4/ufarad - 1.0e-5*siemens/ufarad)**(-1) _v = -_BA_v + (_BA_v + v)*exp(dt*(-cm**2*gM*p/ufarad - cm**2*ge/(size*ufarad) - cm**2*ge_ext/(size*ufarad) - cm**2*ge_hipp/(size*ufarad) - cm**2*gi*int(Cl <= 0.5)/(size*ufarad) - cm**2*gi*int(Cl > 0.5)/(size*ufarad) - 50*h*m**3*msiemens/ufarad - 0.0001*hCaL*mCaL**2*siemens/ufarad - 5*msiemens*n**4/ufarad - 1.0e-5*siemens/ufarad)) Ca_i = _Ca_i Cl = _Cl ge = _ge ge_ext = _ge_ext ge_hipp = _ge_hipp gi = _gi glu = _glu h = _h hCaL = _hCaL he = _he he_ext = _he_ext he_hipp = _he_hipp hi = _hi m = _m mCaL = _mCaL n = _n p = _p v = _v 2021-11-05 15:15:18,827 DIAGNOSTIC brian2.devices.device: DG_py_stateupdater_codeobject snippet (scalar): t = _array_defaultclock_t[0] dt = _array_defaultclock_dt[0] _BA_glu = - 1 _lio_1 = _timestep(0.003, dt) _lio_2 = (- 200.0) * ms _lio_3 = (1.2e-06 * mole) / ((metre ** 3) * ms) _lio_4 = (0.000621832540496844 * ((mV * mole) * siemens)) / (((cm ** 4) * coulomb) * umetre) _lio_5 = (5.1819378374737e-06 * (mole * siemens)) / (((cm ** 4) * coulomb) * umetre) _lio_6 = exp((0.005 * (- dt)) / ms) _lio_7 = exp((- dt) / tau_Cl) _lio_8 = exp(((- 3.33333333333333) * dt) / ms) _lio_9 = exp(((- 1.0) * dt) / ms) _lio_10 = - _BA_glu _lio_11 = exp((0.3333333333333333 * (- dt)) / second) _lio_12 = 0.015501226546218206 / ms _lio_13 = 0.05555555555555555 / mV _lio_14 = ms * 0.049787068367863944 _lio_15 = 0.2 / mV _lio_16 = 1.0 / mV _lio_17 = 0.00035237057471222975 / ms _lio_18 = 0.02 / mV _lio_19 = ms * 0.5852511043074123 _lio_20 = 0.03571428571428571 / mV _lio_21 = exp((0.2 * (- dt)) / ms) _lio_22 = exp((0.1 * (- dt)) / ms) _lio_23 = (- 13.44) * mV _lio_24 = ((- 1.0) * mV) * ms _lio_25 = (mV * ms) * 2.7536449349747158e-05 _lio_26 = 0.25 / mV _lio_27 = (- 4.2) * mV _lio_28 = 0.0 - (mV * ms) _lio_29 = (mV * ms) * 20.085536923187668 _lio_30 = 13.44 * mV _lio_31 = (- 1.485) * mV _lio_32 = 0.000820773673798214 * (mV * ms) _lio_33 = (- 0.263157894736842) / mV _lio_34 = 1.485 * mV _lio_35 = 0.011405722114984784 / ms _lio_36 = (- 1.28) * mV _lio_37 = (mV * ms) * 0.00033546262790251185 _lio_38 = 1.28 * mV _lio_39 = 0.16232623367917487 / ms _lio_40 = ms * 5.754602676005731 _lio_41 = 0.05 / mV _lio_42 = ms * 0.17377394345044514 _lio_43 = ms * 0.0301973834223185 _lio_44 = 0.1 / mV _lio_45 = (- 0.018990188830818912) / ms _lio_46 = 0.00017377394345044513 / ms _lio_47 = 0.0 - ((0.0007 * (mV * siemens)) / ufarad) _lio_48 = ((Ek * (cm ** 2)) * gM) / ufarad _lio_49 = (5.0 * (Ek * msiemens)) / ufarad _lio_50 = ((cm ** 2) * _timedarray(t)) / ufarad _lio_51 = (2500.0 * (mV * msiemens)) / ufarad _lio_52 = (0.012 * (mV * siemens)) / ufarad _lio_53 = (80.0 * ((cm ** 2) * mV)) / ufarad _lio_54 = 0.0 - ((1e-05 * siemens) / ufarad) _lio_55 = ((- (cm ** 2)) * gM) / ufarad _lio_56 = (cm ** 2) / ufarad _lio_57 = (50.0 * msiemens) / ufarad _lio_58 = (0.0001 * siemens) / ufarad _lio_59 = (5.0 * msiemens) / ufarad 2021-11-05 15:15:18,827 DIAGNOSTIC brian2.devices.device: DG_py_stateupdater_codeobject snippet (vector): gi = _array_DG_py_gi[_idx] noise = _array_DG_py_noise[_idx] r = _array_DG_py_r[_idx] Cl = _array_DG_py_Cl[_idx] mCaL = _array_DG_py_mCaL[_idx] lastspike = _array_DG_py_lastspike[_idx] Ca_i = _array_DG_py_Ca_i[_idx] v = _array_DG_py_v[_idx] p = _array_DG_py_p[_idx] ge_hipp = _array_DG_py_ge_hipp[_idx] size = _array_DG_py_size[_idx] m = _array_DG_py_m[_idx] glu = _array_DG_py_glu[_idx] h = _array_DG_py_h[_idx] n = _array_DG_py_n[_idx] he = _array_DG_py_he[_idx] hi = _array_DG_py_hi[_idx] ge = _array_DG_py_ge[_idx] he_hipp = _array_DG_py_he_hipp[_idx] ge_ext = _array_DG_py_ge_ext[_idx] hCaL = _array_DG_py_hCaL[_idx] he_ext = _array_DG_py_he_ext[_idx] not_refractory = _timestep(t - lastspike, dt) >= _lio_1 _BA_Ca_i = _lio_2 * ((_lio_3 + (_lio_4 * ((hCaL * (mCaL ** 2)) * size))) - (_lio_5 * (((hCaL * (mCaL ** 2)) * size) * v))) _Ca_i = (- _BA_Ca_i) + (_lio_6 * (Ca_i + _BA_Ca_i)) _Cl = _lio_7 * Cl _BA_ge = (- 1.0) * he _ge = (- _BA_ge) + (_lio_8 * (_BA_ge + ge)) _BA_ge_ext = (- 1.0) * he_ext _ge_ext = (- _BA_ge_ext) + (_lio_8 * (_BA_ge_ext + ge_ext)) _BA_ge_hipp = (- 1.0) * he_hipp _ge_hipp = (- _BA_ge_hipp) + (_lio_8 * (_BA_ge_hipp + ge_hipp)) _BA_gi = (- 1.0) * hi _gi = (- _BA_gi) + (_lio_9 * (_BA_gi + gi)) _glu = _lio_10 + (_lio_11 * (_BA_glu + glu)) _BA_h = (_lio_12 * exp(_lio_13 * (- v))) / (((- 4.0) / (ms + (_lio_14 * exp(_lio_15 * (- v))))) - (_lio_12 / (exp(_lio_16 * v) ** 0.05555555555555555))) _h = (- _BA_h) + ((_BA_h + h) * exp(dt * (((- 4.0) / (ms + (_lio_14 * exp(_lio_15 * (- v))))) - (_lio_12 / (exp(_lio_16 * v) ** 0.05555555555555555))))) _BA_hCaL = (_lio_17 * exp(_lio_18 * (- v))) / (((- 0.0065) / (ms + (_lio_19 * exp(_lio_20 * (- v))))) - (_lio_17 / (exp(_lio_16 * v) ** 0.02))) _hCaL = (- _BA_hCaL) + ((_BA_hCaL + hCaL) * exp(dt * (((- 0.0065) / (ms + (_lio_19 * exp(_lio_20 * (- v))))) - (_lio_17 / (exp(_lio_16 * v) ** 0.02))))) _he = _lio_21 * he _he_ext = _lio_21 * he_ext _he_hipp = _lio_21 * he_hipp _hi = _lio_22 * hi _BA_m = ((_lio_23 / (_lio_24 + (_lio_25 * exp(_lio_26 * (- v))))) - ((0.32 * v) / (_lio_24 + (_lio_25 * exp(_lio_26 * (- v)))))) / ((((_lio_27 / (_lio_28 + (_lio_29 * exp(_lio_15 * v)))) + (_lio_30 / (_lio_24 + (_lio_25 * exp(_lio_26 * (- v)))))) + ((0.32 * v) / (_lio_24 + (_lio_25 * exp(_lio_26 * (- v)))))) - ((0.28 * v) / (_lio_28 + (_lio_29 * exp(_lio_15 * v))))) _m = (- _BA_m) + ((_BA_m + m) * exp(dt * ((((_lio_27 / (_lio_28 + (_lio_29 * exp(_lio_15 * v)))) + (_lio_30 / (_lio_24 + (_lio_25 * exp(_lio_26 * (- v)))))) + ((0.32 * v) / (_lio_24 + (_lio_25 * exp(_lio_26 * (- v)))))) - ((0.28 * v) / (_lio_28 + (_lio_29 * exp(_lio_15 * v))))))) _BA_mCaL = ((_lio_31 / (_lio_24 + (_lio_32 * exp(_lio_33 * v)))) - ((0.055 * v) / (_lio_24 + (_lio_32 * exp(_lio_33 * v))))) / (((_lio_34 / (_lio_24 + (_lio_32 * exp(_lio_33 * v)))) + ((0.055 * v) / (_lio_24 + (_lio_32 * exp(_lio_33 * v))))) - (_lio_35 / (exp(_lio_16 * v) ** 0.058823529411764705))) _mCaL = (- _BA_mCaL) + ((_BA_mCaL + mCaL) * exp(dt * (((_lio_34 / (_lio_24 + (_lio_32 * exp(_lio_33 * v)))) + ((0.055 * v) / (_lio_24 + (_lio_32 * exp(_lio_33 * v))))) - (_lio_35 / (exp(_lio_16 * v) ** 0.058823529411764705))))) _BA_n = ((_lio_36 / (_lio_24 + (_lio_37 * exp(_lio_15 * (- v))))) - ((0.032 * v) / (_lio_24 + (_lio_37 * exp(_lio_15 * (- v)))))) / (((_lio_38 / (_lio_24 + (_lio_37 * exp(_lio_15 * (- v))))) + ((0.032 * v) / (_lio_24 + (_lio_37 * exp(_lio_15 * (- v)))))) - (_lio_39 / (exp(_lio_16 * v) ** 0.025))) _n = (- _BA_n) + ((_BA_n + n) * exp(dt * (((_lio_38 / (_lio_24 + (_lio_37 * exp(_lio_15 * (- v))))) + ((0.032 * v) / (_lio_24 + (_lio_37 * exp(_lio_15 * (- v)))))) - (_lio_39 / (exp(_lio_16 * v) ** 0.025))))) _BA_p = ((0.001 / ((_lio_40 * exp(_lio_41 * v)) + (_lio_42 * exp(_lio_41 * (- v))))) + ((0.018990188830818912 * exp(_lio_41 * v)) / (ms + (_lio_43 * exp(_lio_44 * (- v)))))) / ((_lio_45 * (exp(_lio_16 * v) ** 0.05)) - (_lio_46 / (exp(_lio_16 * v) ** 0.05))) _p = (- _BA_p) + ((_BA_p + p) * exp(dt * ((_lio_45 * (exp(_lio_16 * v) ** 0.05)) - (_lio_46 / (exp(_lio_16 * v) ** 0.05))))) _BA_v = ((_lio_47 + ((((((_lio_48 * p) + (_lio_49 * (n ** 4))) + ((_lio_50 * r) / size)) + (_lio_51 * (h * (m ** 3)))) + (_lio_52 * (hCaL * (mCaL ** 2)))) + noise)) - ((_lio_53 * (gi * int_(Cl <= 0.5))) / size)) * (((_lio_54 + (_lio_55 * p)) - (((((((((_lio_56 * ge) / size) + ((_lio_56 * ge_ext) / size)) + ((_lio_56 * ge_hipp) / size)) + ((_lio_56 * (gi * int_(Cl <= 0.5))) / size)) + ((_lio_56 * (gi * int_(Cl > 0.5))) / size)) + (_lio_57 * (h * (m ** 3)))) + (_lio_58 * (hCaL * (mCaL ** 2)))) + (_lio_59 * (n ** 4)))) ** (- 1)) _v = (- _BA_v) + ((_BA_v + v) * exp(dt * ((_lio_54 + (_lio_55 * p)) - (((((((((_lio_56 * ge) / size) + ((_lio_56 * ge_ext) / size)) + ((_lio_56 * ge_hipp) / size)) + ((_lio_56 * (gi * int_(Cl <= 0.5))) / size)) + ((_lio_56 * (gi * int_(Cl > 0.5))) / size)) + (_lio_57 * (h * (m ** 3)))) + (_lio_58 * (hCaL * (mCaL ** 2)))) + (_lio_59 * (n ** 4)))))) Ca_i = _Ca_i Cl = _Cl ge = _ge ge_ext = _ge_ext ge_hipp = _ge_hipp gi = _gi glu = _glu h = _h hCaL = _hCaL he = _he he_ext = _he_ext he_hipp = _he_hipp hi = _hi m = _m mCaL = _mCaL n = _n p = _p v = _v _array_DG_py_gi[_idx] = gi _array_DG_py_not_refractory[_idx] = not_refractory _array_DG_py_Cl[_idx] = Cl _array_DG_py_mCaL[_idx] = mCaL _array_DG_py_Ca_i[_idx] = Ca_i _array_DG_py_v[_idx] = v _array_DG_py_p[_idx] = p _array_DG_py_ge_hipp[_idx] = ge_hipp _array_DG_py_m[_idx] = m _array_DG_py_glu[_idx] = glu _array_DG_py_h[_idx] = h _array_DG_py_n[_idx] = n _array_DG_py_he[_idx] = he _array_DG_py_hi[_idx] = hi _array_DG_py_ge[_idx] = ge _array_DG_py_he_hipp[_idx] = he_hipp _array_DG_py_ge_ext[_idx] = ge_ext _array_DG_py_hCaL[_idx] = hCaL _array_DG_py_he_ext[_idx] = he_ext 2021-11-05 15:15:18,828 DIAGNOSTIC brian2.devices.device: DG_py_stateupdater_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code cdef double *_namespace_timedarray_values cdef double _timedarray(const double t): global _namespace_timedarray_values cdef double epsilon = 0.001000000000000000 / 128 cdef int i = (int)((t/epsilon + 0.5)/128) if i < 0: i = 0 if i >= 2001: i = 2001 - 1 return _namespace_timedarray_values[i] cdef int64_t _timestep(double t, double dt): return ((t + 1e-3*dt)/dt) # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var_Ca_i = _namespace["_var_Ca_i"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_Ca_i = _namespace['_array_DG_py_Ca_i'] cdef double * _array_DG_py_Ca_i = _buf__array_DG_py_Ca_i.data cdef size_t _num_array_DG_py_Ca_i = len(_namespace['_array_DG_py_Ca_i']) cdef double Ca_i _var_Cl = _namespace["_var_Cl"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_Cl = _namespace['_array_DG_py_Cl'] cdef double * _array_DG_py_Cl = _buf__array_DG_py_Cl.data cdef size_t _num_array_DG_py_Cl = len(_namespace['_array_DG_py_Cl']) cdef double Cl _var_Ek = _namespace["_var_Ek"] cdef double Ek = _namespace["Ek"] _var_N = _namespace["_var_N"] cdef int64_t N = _namespace["N"] _var_cm = _namespace["_var_cm"] cdef double cm = _namespace["cm"] _var_coulomb = _namespace["_var_coulomb"] cdef double coulomb = _namespace["coulomb"] _var_dt = _namespace["_var_dt"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_dt = _namespace['_array_defaultclock_dt'] cdef double * _array_defaultclock_dt = _buf__array_defaultclock_dt.data cdef double dt = _namespace["dt"] _var_gM = _namespace["_var_gM"] cdef double gM = _namespace["gM"] _var_ge = _namespace["_var_ge"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_ge = _namespace['_array_DG_py_ge'] cdef double * _array_DG_py_ge = _buf__array_DG_py_ge.data cdef size_t _num_array_DG_py_ge = len(_namespace['_array_DG_py_ge']) cdef double ge _var_ge_ext = _namespace["_var_ge_ext"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_ge_ext = _namespace['_array_DG_py_ge_ext'] cdef double * _array_DG_py_ge_ext = _buf__array_DG_py_ge_ext.data cdef size_t _num_array_DG_py_ge_ext = len(_namespace['_array_DG_py_ge_ext']) cdef double ge_ext _var_ge_hipp = _namespace["_var_ge_hipp"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_ge_hipp = _namespace['_array_DG_py_ge_hipp'] cdef double * _array_DG_py_ge_hipp = _buf__array_DG_py_ge_hipp.data cdef size_t _num_array_DG_py_ge_hipp = len(_namespace['_array_DG_py_ge_hipp']) cdef double ge_hipp _var_gi = _namespace["_var_gi"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_gi = _namespace['_array_DG_py_gi'] cdef double * _array_DG_py_gi = _buf__array_DG_py_gi.data cdef size_t _num_array_DG_py_gi = len(_namespace['_array_DG_py_gi']) cdef double gi _var_glu = _namespace["_var_glu"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_glu = _namespace['_array_DG_py_glu'] cdef double * _array_DG_py_glu = _buf__array_DG_py_glu.data cdef size_t _num_array_DG_py_glu = len(_namespace['_array_DG_py_glu']) cdef double glu _var_h = _namespace["_var_h"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_h = _namespace['_array_DG_py_h'] cdef double * _array_DG_py_h = _buf__array_DG_py_h.data cdef size_t _num_array_DG_py_h = len(_namespace['_array_DG_py_h']) cdef double h _var_hCaL = _namespace["_var_hCaL"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_hCaL = _namespace['_array_DG_py_hCaL'] cdef double * _array_DG_py_hCaL = _buf__array_DG_py_hCaL.data cdef size_t _num_array_DG_py_hCaL = len(_namespace['_array_DG_py_hCaL']) cdef double hCaL _var_he = _namespace["_var_he"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_he = _namespace['_array_DG_py_he'] cdef double * _array_DG_py_he = _buf__array_DG_py_he.data cdef size_t _num_array_DG_py_he = len(_namespace['_array_DG_py_he']) cdef double he _var_he_ext = _namespace["_var_he_ext"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_he_ext = _namespace['_array_DG_py_he_ext'] cdef double * _array_DG_py_he_ext = _buf__array_DG_py_he_ext.data cdef size_t _num_array_DG_py_he_ext = len(_namespace['_array_DG_py_he_ext']) cdef double he_ext _var_he_hipp = _namespace["_var_he_hipp"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_he_hipp = _namespace['_array_DG_py_he_hipp'] cdef double * _array_DG_py_he_hipp = _buf__array_DG_py_he_hipp.data cdef size_t _num_array_DG_py_he_hipp = len(_namespace['_array_DG_py_he_hipp']) cdef double he_hipp _var_hi = _namespace["_var_hi"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_hi = _namespace['_array_DG_py_hi'] cdef double * _array_DG_py_hi = _buf__array_DG_py_hi.data cdef size_t _num_array_DG_py_hi = len(_namespace['_array_DG_py_hi']) cdef double hi # namespace for function inputs_stim global _namespace_timedarray_values global _namespace_num_timedarray_values cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__timedarray_values = _namespace['_timedarray_values'] _namespace_timedarray_values = _buf__timedarray_values.data _namespace_num_timedarray_values = len(_namespace['_timedarray_values']) _var_lastspike = _namespace["_var_lastspike"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_lastspike = _namespace['_array_DG_py_lastspike'] cdef double * _array_DG_py_lastspike = _buf__array_DG_py_lastspike.data cdef size_t _num_array_DG_py_lastspike = len(_namespace['_array_DG_py_lastspike']) cdef double lastspike _var_m = _namespace["_var_m"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_m = _namespace['_array_DG_py_m'] cdef double * _array_DG_py_m = _buf__array_DG_py_m.data cdef size_t _num_array_DG_py_m = len(_namespace['_array_DG_py_m']) cdef double m _var_mCaL = _namespace["_var_mCaL"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_mCaL = _namespace['_array_DG_py_mCaL'] cdef double * _array_DG_py_mCaL = _buf__array_DG_py_mCaL.data cdef size_t _num_array_DG_py_mCaL = len(_namespace['_array_DG_py_mCaL']) cdef double mCaL _var_mV = _namespace["_var_mV"] cdef double mV = _namespace["mV"] _var_metre = _namespace["_var_metre"] cdef double metre = _namespace["metre"] _var_mole = _namespace["_var_mole"] cdef double mole = _namespace["mole"] _var_ms = _namespace["_var_ms"] cdef double ms = _namespace["ms"] _var_msiemens = _namespace["_var_msiemens"] cdef double msiemens = _namespace["msiemens"] _var_n = _namespace["_var_n"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_n = _namespace['_array_DG_py_n'] cdef double * _array_DG_py_n = _buf__array_DG_py_n.data cdef size_t _num_array_DG_py_n = len(_namespace['_array_DG_py_n']) cdef double n _var_noise = _namespace["_var_noise"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_noise = _namespace['_array_DG_py_noise'] cdef double * _array_DG_py_noise = _buf__array_DG_py_noise.data cdef size_t _num_array_DG_py_noise = len(_namespace['_array_DG_py_noise']) cdef double noise _var_not_refractory = _namespace["_var_not_refractory"] cdef _numpy.ndarray[char, ndim=1, mode='c', cast=True] _buf__array_DG_py_not_refractory = _namespace['_array_DG_py_not_refractory'] cdef bool * _array_DG_py_not_refractory = _buf__array_DG_py_not_refractory.data cdef size_t _num_array_DG_py_not_refractory = len(_namespace['_array_DG_py_not_refractory']) cdef bool not_refractory _var_p = _namespace["_var_p"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_p = _namespace['_array_DG_py_p'] cdef double * _array_DG_py_p = _buf__array_DG_py_p.data cdef size_t _num_array_DG_py_p = len(_namespace['_array_DG_py_p']) cdef double p _var_r = _namespace["_var_r"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_r = _namespace['_array_DG_py_r'] cdef double * _array_DG_py_r = _buf__array_DG_py_r.data cdef size_t _num_array_DG_py_r = len(_namespace['_array_DG_py_r']) cdef double r _var_second = _namespace["_var_second"] cdef double second = _namespace["second"] _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] _var_size = _namespace["_var_size"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_size = _namespace['_array_DG_py_size'] cdef double * _array_DG_py_size = _buf__array_DG_py_size.data cdef size_t _num_array_DG_py_size = len(_namespace['_array_DG_py_size']) cdef double size _var_t = _namespace["_var_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double t _var_tau_Cl = _namespace["_var_tau_Cl"] cdef double tau_Cl = _namespace["tau_Cl"] _var_ufarad = _namespace["_var_ufarad"] cdef double ufarad = _namespace["ufarad"] _var_umetre = _namespace["_var_umetre"] cdef double umetre = _namespace["umetre"] _var_v = _namespace["_var_v"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_v = _namespace['_array_DG_py_v'] cdef double * _array_DG_py_v = _buf__array_DG_py_v.data cdef size_t _num_array_DG_py_v = len(_namespace['_array_DG_py_v']) cdef double v cdef double _BA_Ca_i cdef double _BA_ge cdef double _BA_ge_ext cdef double _BA_ge_hipp cdef double _BA_gi cdef int64_t _BA_glu cdef double _BA_h cdef double _BA_hCaL cdef double _BA_m cdef double _BA_mCaL cdef double _BA_n cdef double _BA_p cdef double _BA_v cdef double _Ca_i cdef double _Cl cdef double _ge cdef double _ge_ext cdef double _ge_hipp cdef double _gi cdef double _glu cdef double _h cdef double _hCaL cdef double _he cdef double _he_ext cdef double _he_hipp cdef double _hi cdef int64_t _lio_1 cdef int64_t _lio_10 cdef double _lio_11 cdef double _lio_12 cdef double _lio_13 cdef double _lio_14 cdef double _lio_15 cdef double _lio_16 cdef double _lio_17 cdef double _lio_18 cdef double _lio_19 cdef double _lio_2 cdef double _lio_20 cdef double _lio_21 cdef double _lio_22 cdef double _lio_23 cdef double _lio_24 cdef double _lio_25 cdef double _lio_26 cdef double _lio_27 cdef double _lio_28 cdef double _lio_29 cdef double _lio_3 cdef double _lio_30 cdef double _lio_31 cdef double _lio_32 cdef double _lio_33 cdef double _lio_34 cdef double _lio_35 cdef double _lio_36 cdef double _lio_37 cdef double _lio_38 cdef double _lio_39 cdef double _lio_4 cdef double _lio_40 cdef double _lio_41 cdef double _lio_42 cdef double _lio_43 cdef double _lio_44 cdef double _lio_45 cdef double _lio_46 cdef double _lio_47 cdef double _lio_48 cdef double _lio_49 cdef double _lio_5 cdef double _lio_50 cdef double _lio_51 cdef double _lio_52 cdef double _lio_53 cdef double _lio_54 cdef double _lio_55 cdef double _lio_56 cdef double _lio_57 cdef double _lio_58 cdef double _lio_59 cdef double _lio_6 cdef double _lio_7 cdef double _lio_8 cdef double _lio_9 cdef double _m cdef double _mCaL cdef double _n cdef double _p cdef double _v if '_owner' in _namespace: _owner = _namespace['_owner'] # scalar code _vectorisation_idx = 1 t = _array_defaultclock_t[0] dt = _array_defaultclock_dt[0] _BA_glu = - 1 _lio_1 = _timestep(0.003, dt) _lio_2 = (- 200.0) * ms _lio_3 = (1.2e-06 * mole) / ((metre ** 3) * ms) _lio_4 = (0.000621832540496844 * ((mV * mole) * siemens)) / (((cm ** 4) * coulomb) * umetre) _lio_5 = (5.1819378374737e-06 * (mole * siemens)) / (((cm ** 4) * coulomb) * umetre) _lio_6 = exp((0.005 * (- dt)) / ms) _lio_7 = exp((- dt) / tau_Cl) _lio_8 = exp(((- 3.33333333333333) * dt) / ms) _lio_9 = exp(((- 1.0) * dt) / ms) _lio_10 = - _BA_glu _lio_11 = exp((0.3333333333333333 * (- dt)) / second) _lio_12 = 0.015501226546218206 / ms _lio_13 = 0.05555555555555555 / mV _lio_14 = ms * 0.049787068367863944 _lio_15 = 0.2 / mV _lio_16 = 1.0 / mV _lio_17 = 0.00035237057471222975 / ms _lio_18 = 0.02 / mV _lio_19 = ms * 0.5852511043074123 _lio_20 = 0.03571428571428571 / mV _lio_21 = exp((0.2 * (- dt)) / ms) _lio_22 = exp((0.1 * (- dt)) / ms) _lio_23 = (- 13.44) * mV _lio_24 = ((- 1.0) * mV) * ms _lio_25 = (mV * ms) * 2.7536449349747158e-05 _lio_26 = 0.25 / mV _lio_27 = (- 4.2) * mV _lio_28 = 0.0 - (mV * ms) _lio_29 = (mV * ms) * 20.085536923187668 _lio_30 = 13.44 * mV _lio_31 = (- 1.485) * mV _lio_32 = 0.000820773673798214 * (mV * ms) _lio_33 = (- 0.263157894736842) / mV _lio_34 = 1.485 * mV _lio_35 = 0.011405722114984784 / ms _lio_36 = (- 1.28) * mV _lio_37 = (mV * ms) * 0.00033546262790251185 _lio_38 = 1.28 * mV _lio_39 = 0.16232623367917487 / ms _lio_40 = ms * 5.754602676005731 _lio_41 = 0.05 / mV _lio_42 = ms * 0.17377394345044514 _lio_43 = ms * 0.0301973834223185 _lio_44 = 0.1 / mV _lio_45 = (- 0.018990188830818912) / ms _lio_46 = 0.00017377394345044513 / ms _lio_47 = 0.0 - ((0.0007 * (mV * siemens)) / ufarad) _lio_48 = ((Ek * (cm ** 2)) * gM) / ufarad _lio_49 = (5.0 * (Ek * msiemens)) / ufarad _lio_50 = ((cm ** 2) * _timedarray(t)) / ufarad _lio_51 = (2500.0 * (mV * msiemens)) / ufarad _lio_52 = (0.012 * (mV * siemens)) / ufarad _lio_53 = (80.0 * ((cm ** 2) * mV)) / ufarad _lio_54 = 0.0 - ((1e-05 * siemens) / ufarad) _lio_55 = ((- (cm ** 2)) * gM) / ufarad _lio_56 = (cm ** 2) / ufarad _lio_57 = (50.0 * msiemens) / ufarad _lio_58 = (0.0001 * siemens) / ufarad _lio_59 = (5.0 * msiemens) / ufarad # vector code for _idx in range(N): _vectorisation_idx = _idx gi = _array_DG_py_gi[_idx] noise = _array_DG_py_noise[_idx] r = _array_DG_py_r[_idx] Cl = _array_DG_py_Cl[_idx] mCaL = _array_DG_py_mCaL[_idx] lastspike = _array_DG_py_lastspike[_idx] Ca_i = _array_DG_py_Ca_i[_idx] v = _array_DG_py_v[_idx] p = _array_DG_py_p[_idx] ge_hipp = _array_DG_py_ge_hipp[_idx] size = _array_DG_py_size[_idx] m = _array_DG_py_m[_idx] glu = _array_DG_py_glu[_idx] h = _array_DG_py_h[_idx] n = _array_DG_py_n[_idx] he = _array_DG_py_he[_idx] hi = _array_DG_py_hi[_idx] ge = _array_DG_py_ge[_idx] he_hipp = _array_DG_py_he_hipp[_idx] ge_ext = _array_DG_py_ge_ext[_idx] hCaL = _array_DG_py_hCaL[_idx] he_ext = _array_DG_py_he_ext[_idx] not_refractory = _timestep(t - lastspike, dt) >= _lio_1 _BA_Ca_i = _lio_2 * ((_lio_3 + (_lio_4 * ((hCaL * (mCaL ** 2)) * size))) - (_lio_5 * (((hCaL * (mCaL ** 2)) * size) * v))) _Ca_i = (- _BA_Ca_i) + (_lio_6 * (Ca_i + _BA_Ca_i)) _Cl = _lio_7 * Cl _BA_ge = (- 1.0) * he _ge = (- _BA_ge) + (_lio_8 * (_BA_ge + ge)) _BA_ge_ext = (- 1.0) * he_ext _ge_ext = (- _BA_ge_ext) + (_lio_8 * (_BA_ge_ext + ge_ext)) _BA_ge_hipp = (- 1.0) * he_hipp _ge_hipp = (- _BA_ge_hipp) + (_lio_8 * (_BA_ge_hipp + ge_hipp)) _BA_gi = (- 1.0) * hi _gi = (- _BA_gi) + (_lio_9 * (_BA_gi + gi)) _glu = _lio_10 + (_lio_11 * (_BA_glu + glu)) _BA_h = (_lio_12 * exp(_lio_13 * (- v))) / (((- 4.0) / (ms + (_lio_14 * exp(_lio_15 * (- v))))) - (_lio_12 / (exp(_lio_16 * v) ** 0.05555555555555555))) _h = (- _BA_h) + ((_BA_h + h) * exp(dt * (((- 4.0) / (ms + (_lio_14 * exp(_lio_15 * (- v))))) - (_lio_12 / (exp(_lio_16 * v) ** 0.05555555555555555))))) _BA_hCaL = (_lio_17 * exp(_lio_18 * (- v))) / (((- 0.0065) / (ms + (_lio_19 * exp(_lio_20 * (- v))))) - (_lio_17 / (exp(_lio_16 * v) ** 0.02))) _hCaL = (- _BA_hCaL) + ((_BA_hCaL + hCaL) * exp(dt * (((- 0.0065) / (ms + (_lio_19 * exp(_lio_20 * (- v))))) - (_lio_17 / (exp(_lio_16 * v) ** 0.02))))) _he = _lio_21 * he _he_ext = _lio_21 * he_ext _he_hipp = _lio_21 * he_hipp _hi = _lio_22 * hi _BA_m = ((_lio_23 / (_lio_24 + (_lio_25 * exp(_lio_26 * (- v))))) - ((0.32 * v) / (_lio_24 + (_lio_25 * exp(_lio_26 * (- v)))))) / ((((_lio_27 / (_lio_28 + (_lio_29 * exp(_lio_15 * v)))) + (_lio_30 / (_lio_24 + (_lio_25 * exp(_lio_26 * (- v)))))) + ((0.32 * v) / (_lio_24 + (_lio_25 * exp(_lio_26 * (- v)))))) - ((0.28 * v) / (_lio_28 + (_lio_29 * exp(_lio_15 * v))))) _m = (- _BA_m) + ((_BA_m + m) * exp(dt * ((((_lio_27 / (_lio_28 + (_lio_29 * exp(_lio_15 * v)))) + (_lio_30 / (_lio_24 + (_lio_25 * exp(_lio_26 * (- v)))))) + ((0.32 * v) / (_lio_24 + (_lio_25 * exp(_lio_26 * (- v)))))) - ((0.28 * v) / (_lio_28 + (_lio_29 * exp(_lio_15 * v))))))) _BA_mCaL = ((_lio_31 / (_lio_24 + (_lio_32 * exp(_lio_33 * v)))) - ((0.055 * v) / (_lio_24 + (_lio_32 * exp(_lio_33 * v))))) / (((_lio_34 / (_lio_24 + (_lio_32 * exp(_lio_33 * v)))) + ((0.055 * v) / (_lio_24 + (_lio_32 * exp(_lio_33 * v))))) - (_lio_35 / (exp(_lio_16 * v) ** 0.058823529411764705))) _mCaL = (- _BA_mCaL) + ((_BA_mCaL + mCaL) * exp(dt * (((_lio_34 / (_lio_24 + (_lio_32 * exp(_lio_33 * v)))) + ((0.055 * v) / (_lio_24 + (_lio_32 * exp(_lio_33 * v))))) - (_lio_35 / (exp(_lio_16 * v) ** 0.058823529411764705))))) _BA_n = ((_lio_36 / (_lio_24 + (_lio_37 * exp(_lio_15 * (- v))))) - ((0.032 * v) / (_lio_24 + (_lio_37 * exp(_lio_15 * (- v)))))) / (((_lio_38 / (_lio_24 + (_lio_37 * exp(_lio_15 * (- v))))) + ((0.032 * v) / (_lio_24 + (_lio_37 * exp(_lio_15 * (- v)))))) - (_lio_39 / (exp(_lio_16 * v) ** 0.025))) _n = (- _BA_n) + ((_BA_n + n) * exp(dt * (((_lio_38 / (_lio_24 + (_lio_37 * exp(_lio_15 * (- v))))) + ((0.032 * v) / (_lio_24 + (_lio_37 * exp(_lio_15 * (- v)))))) - (_lio_39 / (exp(_lio_16 * v) ** 0.025))))) _BA_p = ((0.001 / ((_lio_40 * exp(_lio_41 * v)) + (_lio_42 * exp(_lio_41 * (- v))))) + ((0.018990188830818912 * exp(_lio_41 * v)) / (ms + (_lio_43 * exp(_lio_44 * (- v)))))) / ((_lio_45 * (exp(_lio_16 * v) ** 0.05)) - (_lio_46 / (exp(_lio_16 * v) ** 0.05))) _p = (- _BA_p) + ((_BA_p + p) * exp(dt * ((_lio_45 * (exp(_lio_16 * v) ** 0.05)) - (_lio_46 / (exp(_lio_16 * v) ** 0.05))))) _BA_v = ((_lio_47 + ((((((_lio_48 * p) + (_lio_49 * (n ** 4))) + ((_lio_50 * r) / size)) + (_lio_51 * (h * (m ** 3)))) + (_lio_52 * (hCaL * (mCaL ** 2)))) + noise)) - ((_lio_53 * (gi * int_(Cl <= 0.5))) / size)) * (((_lio_54 + (_lio_55 * p)) - (((((((((_lio_56 * ge) / size) + ((_lio_56 * ge_ext) / size)) + ((_lio_56 * ge_hipp) / size)) + ((_lio_56 * (gi * int_(Cl <= 0.5))) / size)) + ((_lio_56 * (gi * int_(Cl > 0.5))) / size)) + (_lio_57 * (h * (m ** 3)))) + (_lio_58 * (hCaL * (mCaL ** 2)))) + (_lio_59 * (n ** 4)))) ** (- 1)) _v = (- _BA_v) + ((_BA_v + v) * exp(dt * ((_lio_54 + (_lio_55 * p)) - (((((((((_lio_56 * ge) / size) + ((_lio_56 * ge_ext) / size)) + ((_lio_56 * ge_hipp) / size)) + ((_lio_56 * (gi * int_(Cl <= 0.5))) / size)) + ((_lio_56 * (gi * int_(Cl > 0.5))) / size)) + (_lio_57 * (h * (m ** 3)))) + (_lio_58 * (hCaL * (mCaL ** 2)))) + (_lio_59 * (n ** 4)))))) Ca_i = _Ca_i Cl = _Cl ge = _ge ge_ext = _ge_ext ge_hipp = _ge_hipp gi = _gi glu = _glu h = _h hCaL = _hCaL he = _he he_ext = _he_ext he_hipp = _he_hipp hi = _hi m = _m mCaL = _mCaL n = _n p = _p v = _v _array_DG_py_gi[_idx] = gi _array_DG_py_not_refractory[_idx] = not_refractory _array_DG_py_Cl[_idx] = Cl _array_DG_py_mCaL[_idx] = mCaL _array_DG_py_Ca_i[_idx] = Ca_i _array_DG_py_v[_idx] = v _array_DG_py_p[_idx] = p _array_DG_py_ge_hipp[_idx] = ge_hipp _array_DG_py_m[_idx] = m _array_DG_py_glu[_idx] = glu _array_DG_py_h[_idx] = h _array_DG_py_n[_idx] = n _array_DG_py_he[_idx] = he _array_DG_py_hi[_idx] = hi _array_DG_py_ge[_idx] = ge _array_DG_py_he_hipp[_idx] = he_hipp _array_DG_py_ge_ext[_idx] = ge_ext _array_DG_py_hCaL[_idx] = hCaL _array_DG_py_he_ext[_idx] = he_ext before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_Ca_i = _namespace["_var_Ca_i"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_Ca_i = _namespace['_array_DG_py_Ca_i'] cdef double * _array_DG_py_Ca_i = _buf__array_DG_py_Ca_i.data cdef size_t _num_array_DG_py_Ca_i = len(_namespace['_array_DG_py_Ca_i']) cdef double Ca_i _var_Cl = _namespace["_var_Cl"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_Cl = _namespace['_array_DG_py_Cl'] cdef double * _array_DG_py_Cl = _buf__array_DG_py_Cl.data cdef size_t _num_array_DG_py_Cl = len(_namespace['_array_DG_py_Cl']) cdef double Cl _var_Ek = _namespace["_var_Ek"] cdef double Ek = _namespace["Ek"] _var_N = _namespace["_var_N"] cdef int64_t N = _namespace["N"] _var_cm = _namespace["_var_cm"] cdef double cm = _namespace["cm"] _var_coulomb = _namespace["_var_coulomb"] cdef double coulomb = _namespace["coulomb"] _var_dt = _namespace["_var_dt"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_dt = _namespace['_array_defaultclock_dt'] cdef double * _array_defaultclock_dt = _buf__array_defaultclock_dt.data cdef double dt = _namespace["dt"] _var_gM = _namespace["_var_gM"] cdef double gM = _namespace["gM"] _var_ge = _namespace["_var_ge"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_ge = _namespace['_array_DG_py_ge'] cdef double * _array_DG_py_ge = _buf__array_DG_py_ge.data cdef size_t _num_array_DG_py_ge = len(_namespace['_array_DG_py_ge']) cdef double ge _var_ge_ext = _namespace["_var_ge_ext"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_ge_ext = _namespace['_array_DG_py_ge_ext'] cdef double * _array_DG_py_ge_ext = _buf__array_DG_py_ge_ext.data cdef size_t _num_array_DG_py_ge_ext = len(_namespace['_array_DG_py_ge_ext']) cdef double ge_ext _var_ge_hipp = _namespace["_var_ge_hipp"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_ge_hipp = _namespace['_array_DG_py_ge_hipp'] cdef double * _array_DG_py_ge_hipp = _buf__array_DG_py_ge_hipp.data cdef size_t _num_array_DG_py_ge_hipp = len(_namespace['_array_DG_py_ge_hipp']) cdef double ge_hipp _var_gi = _namespace["_var_gi"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_gi = _namespace['_array_DG_py_gi'] cdef double * _array_DG_py_gi = _buf__array_DG_py_gi.data cdef size_t _num_array_DG_py_gi = len(_namespace['_array_DG_py_gi']) cdef double gi _var_glu = _namespace["_var_glu"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_glu = _namespace['_array_DG_py_glu'] cdef double * _array_DG_py_glu = _buf__array_DG_py_glu.data cdef size_t _num_array_DG_py_glu = len(_namespace['_array_DG_py_glu']) cdef double glu _var_h = _namespace["_var_h"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_h = _namespace['_array_DG_py_h'] cdef double * _array_DG_py_h = _buf__array_DG_py_h.data cdef size_t _num_array_DG_py_h = len(_namespace['_array_DG_py_h']) cdef double h _var_hCaL = _namespace["_var_hCaL"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_hCaL = _namespace['_array_DG_py_hCaL'] cdef double * _array_DG_py_hCaL = _buf__array_DG_py_hCaL.data cdef size_t _num_array_DG_py_hCaL = len(_namespace['_array_DG_py_hCaL']) cdef double hCaL _var_he = _namespace["_var_he"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_he = _namespace['_array_DG_py_he'] cdef double * _array_DG_py_he = _buf__array_DG_py_he.data cdef size_t _num_array_DG_py_he = len(_namespace['_array_DG_py_he']) cdef double he _var_he_ext = _namespace["_var_he_ext"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_he_ext = _namespace['_array_DG_py_he_ext'] cdef double * _array_DG_py_he_ext = _buf__array_DG_py_he_ext.data cdef size_t _num_array_DG_py_he_ext = len(_namespace['_array_DG_py_he_ext']) cdef double he_ext _var_he_hipp = _namespace["_var_he_hipp"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_he_hipp = _namespace['_array_DG_py_he_hipp'] cdef double * _array_DG_py_he_hipp = _buf__array_DG_py_he_hipp.data cdef size_t _num_array_DG_py_he_hipp = len(_namespace['_array_DG_py_he_hipp']) cdef double he_hipp _var_hi = _namespace["_var_hi"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_hi = _namespace['_array_DG_py_hi'] cdef double * _array_DG_py_hi = _buf__array_DG_py_hi.data cdef size_t _num_array_DG_py_hi = len(_namespace['_array_DG_py_hi']) cdef double hi # namespace for function inputs_stim global _namespace_timedarray_values global _namespace_num_timedarray_values cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__timedarray_values = _namespace['_timedarray_values'] _namespace_timedarray_values = _buf__timedarray_values.data _namespace_num_timedarray_values = len(_namespace['_timedarray_values']) _var_lastspike = _namespace["_var_lastspike"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_lastspike = _namespace['_array_DG_py_lastspike'] cdef double * _array_DG_py_lastspike = _buf__array_DG_py_lastspike.data cdef size_t _num_array_DG_py_lastspike = len(_namespace['_array_DG_py_lastspike']) cdef double lastspike _var_m = _namespace["_var_m"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_m = _namespace['_array_DG_py_m'] cdef double * _array_DG_py_m = _buf__array_DG_py_m.data cdef size_t _num_array_DG_py_m = len(_namespace['_array_DG_py_m']) cdef double m _var_mCaL = _namespace["_var_mCaL"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_mCaL = _namespace['_array_DG_py_mCaL'] cdef double * _array_DG_py_mCaL = _buf__array_DG_py_mCaL.data cdef size_t _num_array_DG_py_mCaL = len(_namespace['_array_DG_py_mCaL']) cdef double mCaL _var_mV = _namespace["_var_mV"] cdef double mV = _namespace["mV"] _var_metre = _namespace["_var_metre"] cdef double metre = _namespace["metre"] _var_mole = _namespace["_var_mole"] cdef double mole = _namespace["mole"] _var_ms = _namespace["_var_ms"] cdef double ms = _namespace["ms"] _var_msiemens = _namespace["_var_msiemens"] cdef double msiemens = _namespace["msiemens"] _var_n = _namespace["_var_n"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_n = _namespace['_array_DG_py_n'] cdef double * _array_DG_py_n = _buf__array_DG_py_n.data cdef size_t _num_array_DG_py_n = len(_namespace['_array_DG_py_n']) cdef double n _var_noise = _namespace["_var_noise"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_noise = _namespace['_array_DG_py_noise'] cdef double * _array_DG_py_noise = _buf__array_DG_py_noise.data cdef size_t _num_array_DG_py_noise = len(_namespace['_array_DG_py_noise']) cdef double noise _var_not_refractory = _namespace["_var_not_refractory"] cdef _numpy.ndarray[char, ndim=1, mode='c', cast=True] _buf__array_DG_py_not_refractory = _namespace['_array_DG_py_not_refractory'] cdef bool * _array_DG_py_not_refractory = _buf__array_DG_py_not_refractory.data cdef size_t _num_array_DG_py_not_refractory = len(_namespace['_array_DG_py_not_refractory']) cdef bool not_refractory _var_p = _namespace["_var_p"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_p = _namespace['_array_DG_py_p'] cdef double * _array_DG_py_p = _buf__array_DG_py_p.data cdef size_t _num_array_DG_py_p = len(_namespace['_array_DG_py_p']) cdef double p _var_r = _namespace["_var_r"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_r = _namespace['_array_DG_py_r'] cdef double * _array_DG_py_r = _buf__array_DG_py_r.data cdef size_t _num_array_DG_py_r = len(_namespace['_array_DG_py_r']) cdef double r _var_second = _namespace["_var_second"] cdef double second = _namespace["second"] _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] _var_size = _namespace["_var_size"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_size = _namespace['_array_DG_py_size'] cdef double * _array_DG_py_size = _buf__array_DG_py_size.data cdef size_t _num_array_DG_py_size = len(_namespace['_array_DG_py_size']) cdef double size _var_t = _namespace["_var_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double t _var_tau_Cl = _namespace["_var_tau_Cl"] cdef double tau_Cl = _namespace["tau_Cl"] _var_ufarad = _namespace["_var_ufarad"] cdef double ufarad = _namespace["ufarad"] _var_umetre = _namespace["_var_umetre"] cdef double umetre = _namespace["umetre"] _var_v = _namespace["_var_v"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_v = _namespace['_array_DG_py_v'] cdef double * _array_DG_py_v = _buf__array_DG_py_v.data cdef size_t _num_array_DG_py_v = len(_namespace['_array_DG_py_v']) cdef double v cdef double _BA_Ca_i cdef double _BA_ge cdef double _BA_ge_ext cdef double _BA_ge_hipp cdef double _BA_gi cdef int64_t _BA_glu cdef double _BA_h cdef double _BA_hCaL cdef double _BA_m cdef double _BA_mCaL cdef double _BA_n cdef double _BA_p cdef double _BA_v cdef double _Ca_i cdef double _Cl cdef double _ge cdef double _ge_ext cdef double _ge_hipp cdef double _gi cdef double _glu cdef double _h cdef double _hCaL cdef double _he cdef double _he_ext cdef double _he_hipp cdef double _hi cdef int64_t _lio_1 cdef int64_t _lio_10 cdef double _lio_11 cdef double _lio_12 cdef double _lio_13 cdef double _lio_14 cdef double _lio_15 cdef double _lio_16 cdef double _lio_17 cdef double _lio_18 cdef double _lio_19 cdef double _lio_2 cdef double _lio_20 cdef double _lio_21 cdef double _lio_22 cdef double _lio_23 cdef double _lio_24 cdef double _lio_25 cdef double _lio_26 cdef double _lio_27 cdef double _lio_28 cdef double _lio_29 cdef double _lio_3 cdef double _lio_30 cdef double _lio_31 cdef double _lio_32 cdef double _lio_33 cdef double _lio_34 cdef double _lio_35 cdef double _lio_36 cdef double _lio_37 cdef double _lio_38 cdef double _lio_39 cdef double _lio_4 cdef double _lio_40 cdef double _lio_41 cdef double _lio_42 cdef double _lio_43 cdef double _lio_44 cdef double _lio_45 cdef double _lio_46 cdef double _lio_47 cdef double _lio_48 cdef double _lio_49 cdef double _lio_5 cdef double _lio_50 cdef double _lio_51 cdef double _lio_52 cdef double _lio_53 cdef double _lio_54 cdef double _lio_55 cdef double _lio_56 cdef double _lio_57 cdef double _lio_58 cdef double _lio_59 cdef double _lio_6 cdef double _lio_7 cdef double _lio_8 cdef double _lio_9 cdef double _m cdef double _mCaL cdef double _n cdef double _p cdef double _v if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_Ca_i = _namespace["_var_Ca_i"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_Ca_i = _namespace['_array_DG_py_Ca_i'] cdef double * _array_DG_py_Ca_i = _buf__array_DG_py_Ca_i.data cdef size_t _num_array_DG_py_Ca_i = len(_namespace['_array_DG_py_Ca_i']) cdef double Ca_i _var_Cl = _namespace["_var_Cl"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_Cl = _namespace['_array_DG_py_Cl'] cdef double * _array_DG_py_Cl = _buf__array_DG_py_Cl.data cdef size_t _num_array_DG_py_Cl = len(_namespace['_array_DG_py_Cl']) cdef double Cl _var_Ek = _namespace["_var_Ek"] cdef double Ek = _namespace["Ek"] _var_N = _namespace["_var_N"] cdef int64_t N = _namespace["N"] _var_cm = _namespace["_var_cm"] cdef double cm = _namespace["cm"] _var_coulomb = _namespace["_var_coulomb"] cdef double coulomb = _namespace["coulomb"] _var_dt = _namespace["_var_dt"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_dt = _namespace['_array_defaultclock_dt'] cdef double * _array_defaultclock_dt = _buf__array_defaultclock_dt.data cdef double dt = _namespace["dt"] _var_gM = _namespace["_var_gM"] cdef double gM = _namespace["gM"] _var_ge = _namespace["_var_ge"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_ge = _namespace['_array_DG_py_ge'] cdef double * _array_DG_py_ge = _buf__array_DG_py_ge.data cdef size_t _num_array_DG_py_ge = len(_namespace['_array_DG_py_ge']) cdef double ge _var_ge_ext = _namespace["_var_ge_ext"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_ge_ext = _namespace['_array_DG_py_ge_ext'] cdef double * _array_DG_py_ge_ext = _buf__array_DG_py_ge_ext.data cdef size_t _num_array_DG_py_ge_ext = len(_namespace['_array_DG_py_ge_ext']) cdef double ge_ext _var_ge_hipp = _namespace["_var_ge_hipp"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_ge_hipp = _namespace['_array_DG_py_ge_hipp'] cdef double * _array_DG_py_ge_hipp = _buf__array_DG_py_ge_hipp.data cdef size_t _num_array_DG_py_ge_hipp = len(_namespace['_array_DG_py_ge_hipp']) cdef double ge_hipp _var_gi = _namespace["_var_gi"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_gi = _namespace['_array_DG_py_gi'] cdef double * _array_DG_py_gi = _buf__array_DG_py_gi.data cdef size_t _num_array_DG_py_gi = len(_namespace['_array_DG_py_gi']) cdef double gi _var_glu = _namespace["_var_glu"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_glu = _namespace['_array_DG_py_glu'] cdef double * _array_DG_py_glu = _buf__array_DG_py_glu.data cdef size_t _num_array_DG_py_glu = len(_namespace['_array_DG_py_glu']) cdef double glu _var_h = _namespace["_var_h"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_h = _namespace['_array_DG_py_h'] cdef double * _array_DG_py_h = _buf__array_DG_py_h.data cdef size_t _num_array_DG_py_h = len(_namespace['_array_DG_py_h']) cdef double h _var_hCaL = _namespace["_var_hCaL"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_hCaL = _namespace['_array_DG_py_hCaL'] cdef double * _array_DG_py_hCaL = _buf__array_DG_py_hCaL.data cdef size_t _num_array_DG_py_hCaL = len(_namespace['_array_DG_py_hCaL']) cdef double hCaL _var_he = _namespace["_var_he"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_he = _namespace['_array_DG_py_he'] cdef double * _array_DG_py_he = _buf__array_DG_py_he.data cdef size_t _num_array_DG_py_he = len(_namespace['_array_DG_py_he']) cdef double he _var_he_ext = _namespace["_var_he_ext"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_he_ext = _namespace['_array_DG_py_he_ext'] cdef double * _array_DG_py_he_ext = _buf__array_DG_py_he_ext.data cdef size_t _num_array_DG_py_he_ext = len(_namespace['_array_DG_py_he_ext']) cdef double he_ext _var_he_hipp = _namespace["_var_he_hipp"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_he_hipp = _namespace['_array_DG_py_he_hipp'] cdef double * _array_DG_py_he_hipp = _buf__array_DG_py_he_hipp.data cdef size_t _num_array_DG_py_he_hipp = len(_namespace['_array_DG_py_he_hipp']) cdef double he_hipp _var_hi = _namespace["_var_hi"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_hi = _namespace['_array_DG_py_hi'] cdef double * _array_DG_py_hi = _buf__array_DG_py_hi.data cdef size_t _num_array_DG_py_hi = len(_namespace['_array_DG_py_hi']) cdef double hi # namespace for function inputs_stim global _namespace_timedarray_values global _namespace_num_timedarray_values cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__timedarray_values = _namespace['_timedarray_values'] _namespace_timedarray_values = _buf__timedarray_values.data _namespace_num_timedarray_values = len(_namespace['_timedarray_values']) _var_lastspike = _namespace["_var_lastspike"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_lastspike = _namespace['_array_DG_py_lastspike'] cdef double * _array_DG_py_lastspike = _buf__array_DG_py_lastspike.data cdef size_t _num_array_DG_py_lastspike = len(_namespace['_array_DG_py_lastspike']) cdef double lastspike _var_m = _namespace["_var_m"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_m = _namespace['_array_DG_py_m'] cdef double * _array_DG_py_m = _buf__array_DG_py_m.data cdef size_t _num_array_DG_py_m = len(_namespace['_array_DG_py_m']) cdef double m _var_mCaL = _namespace["_var_mCaL"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_mCaL = _namespace['_array_DG_py_mCaL'] cdef double * _array_DG_py_mCaL = _buf__array_DG_py_mCaL.data cdef size_t _num_array_DG_py_mCaL = len(_namespace['_array_DG_py_mCaL']) cdef double mCaL _var_mV = _namespace["_var_mV"] cdef double mV = _namespace["mV"] _var_metre = _namespace["_var_metre"] cdef double metre = _namespace["metre"] _var_mole = _namespace["_var_mole"] cdef double mole = _namespace["mole"] _var_ms = _namespace["_var_ms"] cdef double ms = _namespace["ms"] _var_msiemens = _namespace["_var_msiemens"] cdef double msiemens = _namespace["msiemens"] _var_n = _namespace["_var_n"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_n = _namespace['_array_DG_py_n'] cdef double * _array_DG_py_n = _buf__array_DG_py_n.data cdef size_t _num_array_DG_py_n = len(_namespace['_array_DG_py_n']) cdef double n _var_noise = _namespace["_var_noise"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_noise = _namespace['_array_DG_py_noise'] cdef double * _array_DG_py_noise = _buf__array_DG_py_noise.data cdef size_t _num_array_DG_py_noise = len(_namespace['_array_DG_py_noise']) cdef double noise _var_not_refractory = _namespace["_var_not_refractory"] cdef _numpy.ndarray[char, ndim=1, mode='c', cast=True] _buf__array_DG_py_not_refractory = _namespace['_array_DG_py_not_refractory'] cdef bool * _array_DG_py_not_refractory = _buf__array_DG_py_not_refractory.data cdef size_t _num_array_DG_py_not_refractory = len(_namespace['_array_DG_py_not_refractory']) cdef bool not_refractory _var_p = _namespace["_var_p"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_p = _namespace['_array_DG_py_p'] cdef double * _array_DG_py_p = _buf__array_DG_py_p.data cdef size_t _num_array_DG_py_p = len(_namespace['_array_DG_py_p']) cdef double p _var_r = _namespace["_var_r"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_r = _namespace['_array_DG_py_r'] cdef double * _array_DG_py_r = _buf__array_DG_py_r.data cdef size_t _num_array_DG_py_r = len(_namespace['_array_DG_py_r']) cdef double r _var_second = _namespace["_var_second"] cdef double second = _namespace["second"] _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] _var_size = _namespace["_var_size"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_size = _namespace['_array_DG_py_size'] cdef double * _array_DG_py_size = _buf__array_DG_py_size.data cdef size_t _num_array_DG_py_size = len(_namespace['_array_DG_py_size']) cdef double size _var_t = _namespace["_var_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double t _var_tau_Cl = _namespace["_var_tau_Cl"] cdef double tau_Cl = _namespace["tau_Cl"] _var_ufarad = _namespace["_var_ufarad"] cdef double ufarad = _namespace["ufarad"] _var_umetre = _namespace["_var_umetre"] cdef double umetre = _namespace["umetre"] _var_v = _namespace["_var_v"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_v = _namespace['_array_DG_py_v'] cdef double * _array_DG_py_v = _buf__array_DG_py_v.data cdef size_t _num_array_DG_py_v = len(_namespace['_array_DG_py_v']) cdef double v cdef double _BA_Ca_i cdef double _BA_ge cdef double _BA_ge_ext cdef double _BA_ge_hipp cdef double _BA_gi cdef int64_t _BA_glu cdef double _BA_h cdef double _BA_hCaL cdef double _BA_m cdef double _BA_mCaL cdef double _BA_n cdef double _BA_p cdef double _BA_v cdef double _Ca_i cdef double _Cl cdef double _ge cdef double _ge_ext cdef double _ge_hipp cdef double _gi cdef double _glu cdef double _h cdef double _hCaL cdef double _he cdef double _he_ext cdef double _he_hipp cdef double _hi cdef int64_t _lio_1 cdef int64_t _lio_10 cdef double _lio_11 cdef double _lio_12 cdef double _lio_13 cdef double _lio_14 cdef double _lio_15 cdef double _lio_16 cdef double _lio_17 cdef double _lio_18 cdef double _lio_19 cdef double _lio_2 cdef double _lio_20 cdef double _lio_21 cdef double _lio_22 cdef double _lio_23 cdef double _lio_24 cdef double _lio_25 cdef double _lio_26 cdef double _lio_27 cdef double _lio_28 cdef double _lio_29 cdef double _lio_3 cdef double _lio_30 cdef double _lio_31 cdef double _lio_32 cdef double _lio_33 cdef double _lio_34 cdef double _lio_35 cdef double _lio_36 cdef double _lio_37 cdef double _lio_38 cdef double _lio_39 cdef double _lio_4 cdef double _lio_40 cdef double _lio_41 cdef double _lio_42 cdef double _lio_43 cdef double _lio_44 cdef double _lio_45 cdef double _lio_46 cdef double _lio_47 cdef double _lio_48 cdef double _lio_49 cdef double _lio_5 cdef double _lio_50 cdef double _lio_51 cdef double _lio_52 cdef double _lio_53 cdef double _lio_54 cdef double _lio_55 cdef double _lio_56 cdef double _lio_57 cdef double _lio_58 cdef double _lio_59 cdef double _lio_6 cdef double _lio_7 cdef double _lio_8 cdef double _lio_9 cdef double _m cdef double _mCaL cdef double _n cdef double _p cdef double _v if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:15:18,828 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name DG_py_stateupdater_codeobject 2021-11-05 15:15:18,829 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "DG_py_stateupdate" using Cython module "_cython_magic_90204579248eb98fc2ecfa8772daeb2e" 2021-11-05 15:15:18,829 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140606220169424 on /home/nikos/.cython/brian_extensions/_cython_magic_90204579248eb98fc2ecfa8772daeb2e.lock 2021-11-05 15:15:18,829 DEBUG brian2.utils.filelock: Lock 140606220169424 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_90204579248eb98fc2ecfa8772daeb2e.lock 2021-11-05 15:15:21,298 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140606220169424 on /home/nikos/.cython/brian_extensions/_cython_magic_90204579248eb98fc2ecfa8772daeb2e.lock 2021-11-05 15:15:21,298 DEBUG brian2.utils.filelock: Lock 140606220169424 released on /home/nikos/.cython/brian_extensions/_cython_magic_90204579248eb98fc2ecfa8772daeb2e.lock 2021-11-05 15:15:21,347 DEBUG brian2.stateupdaters.base.method_choice: Group EC_inh: using numerical integration method exponential_euler (took 0.05s) 2021-11-05 15:15:21,347 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=EC_inh, template name=stateupdate) for abstract code: not_refractory = timestep(t - lastspike, dt) >= timestep(0.003000, dt) _BA_ge = -1.0*he _ge = -_BA_ge + (_BA_ge + ge)*exp(-3.33333333333333*dt/ms) _BA_ge_ext = -1.0*he_ext _ge_ext = -_BA_ge_ext + (_BA_ge_ext + ge_ext)*exp(-3.33333333333333*dt/ms) _BA_ge_hipp = -1.0*he_hipp _ge_hipp = -_BA_ge_hipp + (_BA_ge_hipp + ge_hipp)*exp(-3.33333333333333*dt/ms) _BA_gi = -1.0*hi _gi = -_BA_gi + (_BA_gi + gi)*exp(-1.0*dt/ms) _BA_h = (0.35/(0.060810062625218*ms**2*exp(29/10)/(1.0*ms*exp(0.05*v/mV) + 0.060810062625218*ms*exp(-0.05*v/mV)) + 1.0*ms**2*exp(29/10)*exp(v/(20*mV))/(1.0*ms + 0.060810062625218*ms*exp(-0.1*v/mV)) + 0.07*ms + 0.00425670438376526*ms*exp(-0.1*v/mV)) + 0.0245/(1.0*ms**2*exp(29/5)*exp(v/(10*mV))/(1.0*ms + 0.060810062625218*ms*exp(-0.1*v/mV)) + 0.07*ms*exp(29/10)*exp(v/(20*mV))))/(-5.0/(1.0*ms + 0.060810062625218*ms*exp(-0.1*v/mV)) - 0.35*exp(-29/10)/(ms*exp(v/mV)**(1/20))) _h = -_BA_h + (_BA_h + h)*exp(dt*(-5.0/(1.0*ms + 0.060810062625218*ms*exp(-0.1*v/mV)) - 0.35*exp(-29/10)/(ms*exp(v/mV)**(1/20)))) _he = he*exp(-dt/(5*ms)) _he_ext = he_ext*exp(-dt/(5*ms)) _he_hipp = he_hipp*exp(-dt/(5*ms)) _hi = hi*exp(-dt/(10*ms)) _BA_m = (61.25*mV**2/(-7.0*mV**3*ms**2/(1.0*mV*ms*exp(7/2)*exp(v/(10*mV)) - mV*ms) + 3.5*mV**3*ms**2/(-mV*ms*exp(7/2)*exp(v/(10*mV)) + 1.0*mV*ms*exp(7)*exp(v/(5*mV))) + 3.5*mV**3*ms**2/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) - 0.2*mV**2*ms**2*v/(1.0*mV*ms*exp(7/2)*exp(v/(10*mV)) - mV*ms) + 0.1*mV**2*ms**2*v/(-mV*ms*exp(7/2)*exp(v/(10*mV)) + 1.0*mV*ms*exp(7)*exp(v/(5*mV))) + 0.1*mV**2*ms**2*v/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) + 4.0*mV**2*ms*exp(-10/3)*exp(-v/(18*mV)) - 8.0*mV**2*ms*exp(-41/6)*exp(-7*v/(45*mV)) + 4*mV**2*ms*exp(-31/3)*exp(-23*v/(90*mV))) + 3.5*mV*v/(-7.0*mV**3*ms**2/(1.0*mV*ms*exp(7/2)*exp(v/(10*mV)) - mV*ms) + 3.5*mV**3*ms**2/(-mV*ms*exp(7/2)*exp(v/(10*mV)) + 1.0*mV*ms*exp(7)*exp(v/(5*mV))) + 3.5*mV**3*ms**2/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) - 0.2*mV**2*ms**2*v/(1.0*mV*ms*exp(7/2)*exp(v/(10*mV)) - mV*ms) + 0.1*mV**2*ms**2*v/(-mV*ms*exp(7/2)*exp(v/(10*mV)) + 1.0*mV*ms*exp(7)*exp(v/(5*mV))) + 0.1*mV**2*ms**2*v/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) + 4.0*mV**2*ms*exp(-10/3)*exp(-v/(18*mV)) - 8.0*mV**2*ms*exp(-41/6)*exp(-7*v/(45*mV)) + 4*mV**2*ms*exp(-31/3)*exp(-23*v/(90*mV))) + 70.0*mV/(-3.5*mV**2*ms**2*exp(10/3)*exp(v/(18*mV))/(1.0*mV*ms*exp(7/2)*exp(v/(10*mV)) - mV*ms) + 3.5*mV**2*ms**2*exp(10/3)*exp(v/(18*mV))/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) - 0.1*mV*ms**2*v*exp(10/3)*exp(v/(18*mV))/(1.0*mV*ms*exp(7/2)*exp(v/(10*mV)) - mV*ms) + 0.1*mV*ms**2*v*exp(10/3)*exp(v/(18*mV))/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) + 4.0*mV*ms - 4*mV*ms*exp(-7/2)*exp(-v/(10*mV))) + 0.05*v**2/(-7.0*mV**3*ms**2/(1.0*mV*ms*exp(7/2)*exp(v/(10*mV)) - mV*ms) + 3.5*mV**3*ms**2/(-mV*ms*exp(7/2)*exp(v/(10*mV)) + 1.0*mV*ms*exp(7)*exp(v/(5*mV))) + 3.5*mV**3*ms**2/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) - 0.2*mV**2*ms**2*v/(1.0*mV*ms*exp(7/2)*exp(v/(10*mV)) - mV*ms) + 0.1*mV**2*ms**2*v/(-mV*ms*exp(7/2)*exp(v/(10*mV)) + 1.0*mV*ms*exp(7)*exp(v/(5*mV))) + 0.1*mV**2*ms**2*v/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) + 4.0*mV**2*ms*exp(-10/3)*exp(-v/(18*mV)) - 8.0*mV**2*ms*exp(-41/6)*exp(-7*v/(45*mV)) + 4*mV**2*ms*exp(-31/3)*exp(-23*v/(90*mV))) + 2.0*v/(-3.5*mV**2*ms**2*exp(10/3)*exp(v/(18*mV))/(1.0*mV*ms*exp(7/2)*exp(v/(10*mV)) - mV*ms) + 3.5*mV**2*ms**2*exp(10/3)*exp(v/(18*mV))/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) - 0.1*mV*ms**2*v*exp(10/3)*exp(v/(18*mV))/(1.0*mV*ms*exp(7/2)*exp(v/(10*mV)) - mV*ms) + 0.1*mV*ms**2*v*exp(10/3)*exp(v/(18*mV))/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) + 4.0*mV*ms - 4*mV*ms*exp(-7/2)*exp(-v/(10*mV))))/(-17.5*mV/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) - 0.5*v/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) - 20.0*exp(-10/3)/(ms*exp(v/mV)**(1/18))) _m = -_BA_m + (_BA_m + m)*exp(dt*(-17.5*mV/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) - 0.5*v/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) - 20.0*exp(-10/3)/(ms*exp(v/mV)**(1/18)))) _BA_n = (0.578*mV**2/(-0.0226938235730217*mV**3*ms**2/(1.0*mV*ms*exp(0.1*v/mV) - 0.0333732699603261*mV*ms) + 0.000378683550267233*mV**3*ms**2/(-0.0333732699603261*mV*ms*exp(0.1*v/mV) + 1.0*mV*ms*exp(0.2*v/mV)) + 0.34*mV**3*ms**2/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) - 0.000667465399206522*mV**2*ms**2*v/(1.0*mV*ms*exp(0.1*v/mV) - 0.0333732699603261*mV*ms) + 1.1137751478448e-5*mV**2*ms**2*v/(-0.0333732699603261*mV*ms*exp(0.1*v/mV) + 1.0*mV*ms*exp(0.2*v/mV)) + 0.01*mV**2*ms**2*v/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) + 0.0001392218934806*mV**2*ms*exp(-11/20)*exp(-0.2125*v/mV) - 0.00834331749008152*mV**2*ms*exp(-11/20)*exp(-0.1125*v/mV) + 0.125*mV**2*ms*exp(-11/20)*exp(-v/(80*mV))) + 0.034*mV*v/(-0.0226938235730217*mV**3*ms**2/(1.0*mV*ms*exp(0.1*v/mV) - 0.0333732699603261*mV*ms) + 0.000378683550267233*mV**3*ms**2/(-0.0333732699603261*mV*ms*exp(0.1*v/mV) + 1.0*mV*ms*exp(0.2*v/mV)) + 0.34*mV**3*ms**2/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) - 0.000667465399206522*mV**2*ms**2*v/(1.0*mV*ms*exp(0.1*v/mV) - 0.0333732699603261*mV*ms) + 1.1137751478448e-5*mV**2*ms**2*v/(-0.0333732699603261*mV*ms*exp(0.1*v/mV) + 1.0*mV*ms*exp(0.2*v/mV)) + 0.01*mV**2*ms**2*v/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) + 0.0001392218934806*mV**2*ms*exp(-11/20)*exp(-0.2125*v/mV) - 0.00834331749008152*mV**2*ms*exp(-11/20)*exp(-0.1125*v/mV) + 0.125*mV**2*ms*exp(-11/20)*exp(-v/(80*mV))) + 0.2125*mV/(-0.0113469117865109*mV**2*ms**2*exp(11/20)*exp(v/(80*mV))/(1.0*mV*ms*exp(0.1*v/mV) - 0.0333732699603261*mV*ms) + 0.34*mV**2*ms**2*exp(11/20)*exp(v/(80*mV))/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) - 0.000333732699603261*mV*ms**2*v*exp(11/20)*exp(v/(80*mV))/(1.0*mV*ms*exp(0.1*v/mV) - 0.0333732699603261*mV*ms) + 0.01*mV*ms**2*v*exp(11/20)*exp(v/(80*mV))/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) + 0.125*mV*ms - 0.00417165874504076*mV*ms*exp(-0.1*v/mV)) + 0.0005*v**2/(-0.0226938235730217*mV**3*ms**2/(1.0*mV*ms*exp(0.1*v/mV) - 0.0333732699603261*mV*ms) + 0.000378683550267233*mV**3*ms**2/(-0.0333732699603261*mV*ms*exp(0.1*v/mV) + 1.0*mV*ms*exp(0.2*v/mV)) + 0.34*mV**3*ms**2/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) - 0.000667465399206522*mV**2*ms**2*v/(1.0*mV*ms*exp(0.1*v/mV) - 0.0333732699603261*mV*ms) + 1.1137751478448e-5*mV**2*ms**2*v/(-0.0333732699603261*mV*ms*exp(0.1*v/mV) + 1.0*mV*ms*exp(0.2*v/mV)) + 0.01*mV**2*ms**2*v/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) + 0.0001392218934806*mV**2*ms*exp(-11/20)*exp(-0.2125*v/mV) - 0.00834331749008152*mV**2*ms*exp(-11/20)*exp(-0.1125*v/mV) + 0.125*mV**2*ms*exp(-11/20)*exp(-v/(80*mV))) + 0.00625*v/(-0.0113469117865109*mV**2*ms**2*exp(11/20)*exp(v/(80*mV))/(1.0*mV*ms*exp(0.1*v/mV) - 0.0333732699603261*mV*ms) + 0.34*mV**2*ms**2*exp(11/20)*exp(v/(80*mV))/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) - 0.000333732699603261*mV*ms**2*v*exp(11/20)*exp(v/(80*mV))/(1.0*mV*ms*exp(0.1*v/mV) - 0.0333732699603261*mV*ms) + 0.01*mV*ms**2*v*exp(11/20)*exp(v/(80*mV))/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) + 0.125*mV*ms - 0.00417165874504076*mV*ms*exp(-0.1*v/mV)))/(-1.7*mV/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) - 0.05*v/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) - 0.625*exp(-11/20)/(ms*exp(v/mV)**(1/80))) _n = -_BA_n + (_BA_n + n)*exp(dt*(-1.7*mV/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) - 0.05*v/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) - 0.625*exp(-11/20)/(ms*exp(v/mV)**(1/80)))) _BA_v = (1.5*I_exc*cm**2*int(z_soma < 100*scale)*int(z_soma > 0)/(size*ufarad) - 80*cm**2*gi*mV/(size*ufarad) + cm**2*r*inputs_stim(t)/(size*ufarad) + 1.925*h*m**3*mV*siemens/ufarad - 0.81*mV*n**4*siemens/ufarad - 0.0065*mV*siemens/ufarad + noise)/(-cm**2*ge/(size*ufarad) - cm**2*ge_ext/(size*ufarad) - cm**2*ge_hipp/(size*ufarad) - cm**2*gi/(size*ufarad) - 0.035*h*m**3*siemens/ufarad - 0.009*n**4*siemens/ufarad - 0.0001*siemens/ufarad) _v = -_BA_v + (_BA_v + v)*exp(dt*(-cm**2*ge/(size*ufarad) - cm**2*ge_ext/(size*ufarad) - cm**2*ge_hipp/(size*ufarad) - cm**2*gi/(size*ufarad) - 0.035*h*m**3*siemens/ufarad - 0.009*n**4*siemens/ufarad - 0.0001*siemens/ufarad)) ge = _ge ge_ext = _ge_ext ge_hipp = _ge_hipp gi = _gi h = _h he = _he he_ext = _he_ext he_hipp = _he_hipp hi = _hi m = _m n = _n v = _v 2021-11-05 15:15:21,364 DIAGNOSTIC brian2.devices.device: EC_inh_stateupdater_codeobject abstract code: not_refractory = timestep(t - lastspike, dt) >= timestep(0.003000, dt) _BA_ge = -1.0*he _ge = -_BA_ge + (_BA_ge + ge)*exp(-3.33333333333333*dt/ms) _BA_ge_ext = -1.0*he_ext _ge_ext = -_BA_ge_ext + (_BA_ge_ext + ge_ext)*exp(-3.33333333333333*dt/ms) _BA_ge_hipp = -1.0*he_hipp _ge_hipp = -_BA_ge_hipp + (_BA_ge_hipp + ge_hipp)*exp(-3.33333333333333*dt/ms) _BA_gi = -1.0*hi _gi = -_BA_gi + (_BA_gi + gi)*exp(-1.0*dt/ms) _BA_h = (0.35/(0.060810062625218*ms**2*exp(29/10)/(1.0*ms*exp(0.05*v/mV) + 0.060810062625218*ms*exp(-0.05*v/mV)) + 1.0*ms**2*exp(29/10)*exp(v/(20*mV))/(1.0*ms + 0.060810062625218*ms*exp(-0.1*v/mV)) + 0.07*ms + 0.00425670438376526*ms*exp(-0.1*v/mV)) + 0.0245/(1.0*ms**2*exp(29/5)*exp(v/(10*mV))/(1.0*ms + 0.060810062625218*ms*exp(-0.1*v/mV)) + 0.07*ms*exp(29/10)*exp(v/(20*mV))))/(-5.0/(1.0*ms + 0.060810062625218*ms*exp(-0.1*v/mV)) - 0.35*exp(-29/10)/(ms*exp(v/mV)**(1/20))) _h = -_BA_h + (_BA_h + h)*exp(dt*(-5.0/(1.0*ms + 0.060810062625218*ms*exp(-0.1*v/mV)) - 0.35*exp(-29/10)/(ms*exp(v/mV)**(1/20)))) _he = he*exp(-dt/(5*ms)) _he_ext = he_ext*exp(-dt/(5*ms)) _he_hipp = he_hipp*exp(-dt/(5*ms)) _hi = hi*exp(-dt/(10*ms)) _BA_m = (61.25*mV**2/(-7.0*mV**3*ms**2/(1.0*mV*ms*exp(7/2)*exp(v/(10*mV)) - mV*ms) + 3.5*mV**3*ms**2/(-mV*ms*exp(7/2)*exp(v/(10*mV)) + 1.0*mV*ms*exp(7)*exp(v/(5*mV))) + 3.5*mV**3*ms**2/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) - 0.2*mV**2*ms**2*v/(1.0*mV*ms*exp(7/2)*exp(v/(10*mV)) - mV*ms) + 0.1*mV**2*ms**2*v/(-mV*ms*exp(7/2)*exp(v/(10*mV)) + 1.0*mV*ms*exp(7)*exp(v/(5*mV))) + 0.1*mV**2*ms**2*v/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) + 4.0*mV**2*ms*exp(-10/3)*exp(-v/(18*mV)) - 8.0*mV**2*ms*exp(-41/6)*exp(-7*v/(45*mV)) + 4*mV**2*ms*exp(-31/3)*exp(-23*v/(90*mV))) + 3.5*mV*v/(-7.0*mV**3*ms**2/(1.0*mV*ms*exp(7/2)*exp(v/(10*mV)) - mV*ms) + 3.5*mV**3*ms**2/(-mV*ms*exp(7/2)*exp(v/(10*mV)) + 1.0*mV*ms*exp(7)*exp(v/(5*mV))) + 3.5*mV**3*ms**2/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) - 0.2*mV**2*ms**2*v/(1.0*mV*ms*exp(7/2)*exp(v/(10*mV)) - mV*ms) + 0.1*mV**2*ms**2*v/(-mV*ms*exp(7/2)*exp(v/(10*mV)) + 1.0*mV*ms*exp(7)*exp(v/(5*mV))) + 0.1*mV**2*ms**2*v/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) + 4.0*mV**2*ms*exp(-10/3)*exp(-v/(18*mV)) - 8.0*mV**2*ms*exp(-41/6)*exp(-7*v/(45*mV)) + 4*mV**2*ms*exp(-31/3)*exp(-23*v/(90*mV))) + 70.0*mV/(-3.5*mV**2*ms**2*exp(10/3)*exp(v/(18*mV))/(1.0*mV*ms*exp(7/2)*exp(v/(10*mV)) - mV*ms) + 3.5*mV**2*ms**2*exp(10/3)*exp(v/(18*mV))/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) - 0.1*mV*ms**2*v*exp(10/3)*exp(v/(18*mV))/(1.0*mV*ms*exp(7/2)*exp(v/(10*mV)) - mV*ms) + 0.1*mV*ms**2*v*exp(10/3)*exp(v/(18*mV))/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) + 4.0*mV*ms - 4*mV*ms*exp(-7/2)*exp(-v/(10*mV))) + 0.05*v**2/(-7.0*mV**3*ms**2/(1.0*mV*ms*exp(7/2)*exp(v/(10*mV)) - mV*ms) + 3.5*mV**3*ms**2/(-mV*ms*exp(7/2)*exp(v/(10*mV)) + 1.0*mV*ms*exp(7)*exp(v/(5*mV))) + 3.5*mV**3*ms**2/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) - 0.2*mV**2*ms**2*v/(1.0*mV*ms*exp(7/2)*exp(v/(10*mV)) - mV*ms) + 0.1*mV**2*ms**2*v/(-mV*ms*exp(7/2)*exp(v/(10*mV)) + 1.0*mV*ms*exp(7)*exp(v/(5*mV))) + 0.1*mV**2*ms**2*v/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) + 4.0*mV**2*ms*exp(-10/3)*exp(-v/(18*mV)) - 8.0*mV**2*ms*exp(-41/6)*exp(-7*v/(45*mV)) + 4*mV**2*ms*exp(-31/3)*exp(-23*v/(90*mV))) + 2.0*v/(-3.5*mV**2*ms**2*exp(10/3)*exp(v/(18*mV))/(1.0*mV*ms*exp(7/2)*exp(v/(10*mV)) - mV*ms) + 3.5*mV**2*ms**2*exp(10/3)*exp(v/(18*mV))/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) - 0.1*mV*ms**2*v*exp(10/3)*exp(v/(18*mV))/(1.0*mV*ms*exp(7/2)*exp(v/(10*mV)) - mV*ms) + 0.1*mV*ms**2*v*exp(10/3)*exp(v/(18*mV))/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) + 4.0*mV*ms - 4*mV*ms*exp(-7/2)*exp(-v/(10*mV))))/(-17.5*mV/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) - 0.5*v/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) - 20.0*exp(-10/3)/(ms*exp(v/mV)**(1/18))) _m = -_BA_m + (_BA_m + m)*exp(dt*(-17.5*mV/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) - 0.5*v/(1.0*mV*ms - mV*ms*exp(-7/2)*exp(-v/(10*mV))) - 20.0*exp(-10/3)/(ms*exp(v/mV)**(1/18)))) _BA_n = (0.578*mV**2/(-0.0226938235730217*mV**3*ms**2/(1.0*mV*ms*exp(0.1*v/mV) - 0.0333732699603261*mV*ms) + 0.000378683550267233*mV**3*ms**2/(-0.0333732699603261*mV*ms*exp(0.1*v/mV) + 1.0*mV*ms*exp(0.2*v/mV)) + 0.34*mV**3*ms**2/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) - 0.000667465399206522*mV**2*ms**2*v/(1.0*mV*ms*exp(0.1*v/mV) - 0.0333732699603261*mV*ms) + 1.1137751478448e-5*mV**2*ms**2*v/(-0.0333732699603261*mV*ms*exp(0.1*v/mV) + 1.0*mV*ms*exp(0.2*v/mV)) + 0.01*mV**2*ms**2*v/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) + 0.0001392218934806*mV**2*ms*exp(-11/20)*exp(-0.2125*v/mV) - 0.00834331749008152*mV**2*ms*exp(-11/20)*exp(-0.1125*v/mV) + 0.125*mV**2*ms*exp(-11/20)*exp(-v/(80*mV))) + 0.034*mV*v/(-0.0226938235730217*mV**3*ms**2/(1.0*mV*ms*exp(0.1*v/mV) - 0.0333732699603261*mV*ms) + 0.000378683550267233*mV**3*ms**2/(-0.0333732699603261*mV*ms*exp(0.1*v/mV) + 1.0*mV*ms*exp(0.2*v/mV)) + 0.34*mV**3*ms**2/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) - 0.000667465399206522*mV**2*ms**2*v/(1.0*mV*ms*exp(0.1*v/mV) - 0.0333732699603261*mV*ms) + 1.1137751478448e-5*mV**2*ms**2*v/(-0.0333732699603261*mV*ms*exp(0.1*v/mV) + 1.0*mV*ms*exp(0.2*v/mV)) + 0.01*mV**2*ms**2*v/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) + 0.0001392218934806*mV**2*ms*exp(-11/20)*exp(-0.2125*v/mV) - 0.00834331749008152*mV**2*ms*exp(-11/20)*exp(-0.1125*v/mV) + 0.125*mV**2*ms*exp(-11/20)*exp(-v/(80*mV))) + 0.2125*mV/(-0.0113469117865109*mV**2*ms**2*exp(11/20)*exp(v/(80*mV))/(1.0*mV*ms*exp(0.1*v/mV) - 0.0333732699603261*mV*ms) + 0.34*mV**2*ms**2*exp(11/20)*exp(v/(80*mV))/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) - 0.000333732699603261*mV*ms**2*v*exp(11/20)*exp(v/(80*mV))/(1.0*mV*ms*exp(0.1*v/mV) - 0.0333732699603261*mV*ms) + 0.01*mV*ms**2*v*exp(11/20)*exp(v/(80*mV))/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) + 0.125*mV*ms - 0.00417165874504076*mV*ms*exp(-0.1*v/mV)) + 0.0005*v**2/(-0.0226938235730217*mV**3*ms**2/(1.0*mV*ms*exp(0.1*v/mV) - 0.0333732699603261*mV*ms) + 0.000378683550267233*mV**3*ms**2/(-0.0333732699603261*mV*ms*exp(0.1*v/mV) + 1.0*mV*ms*exp(0.2*v/mV)) + 0.34*mV**3*ms**2/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) - 0.000667465399206522*mV**2*ms**2*v/(1.0*mV*ms*exp(0.1*v/mV) - 0.0333732699603261*mV*ms) + 1.1137751478448e-5*mV**2*ms**2*v/(-0.0333732699603261*mV*ms*exp(0.1*v/mV) + 1.0*mV*ms*exp(0.2*v/mV)) + 0.01*mV**2*ms**2*v/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) + 0.0001392218934806*mV**2*ms*exp(-11/20)*exp(-0.2125*v/mV) - 0.00834331749008152*mV**2*ms*exp(-11/20)*exp(-0.1125*v/mV) + 0.125*mV**2*ms*exp(-11/20)*exp(-v/(80*mV))) + 0.00625*v/(-0.0113469117865109*mV**2*ms**2*exp(11/20)*exp(v/(80*mV))/(1.0*mV*ms*exp(0.1*v/mV) - 0.0333732699603261*mV*ms) + 0.34*mV**2*ms**2*exp(11/20)*exp(v/(80*mV))/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) - 0.000333732699603261*mV*ms**2*v*exp(11/20)*exp(v/(80*mV))/(1.0*mV*ms*exp(0.1*v/mV) - 0.0333732699603261*mV*ms) + 0.01*mV*ms**2*v*exp(11/20)*exp(v/(80*mV))/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) + 0.125*mV*ms - 0.00417165874504076*mV*ms*exp(-0.1*v/mV)))/(-1.7*mV/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) - 0.05*v/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) - 0.625*exp(-11/20)/(ms*exp(v/mV)**(1/80))) _n = -_BA_n + (_BA_n + n)*exp(dt*(-1.7*mV/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) - 0.05*v/(1.0*mV*ms - 0.0333732699603261*mV*ms*exp(-0.1*v/mV)) - 0.625*exp(-11/20)/(ms*exp(v/mV)**(1/80)))) _BA_v = (1.5*I_exc*cm**2*int(z_soma < 100*scale)*int(z_soma > 0)/(size*ufarad) - 80*cm**2*gi*mV/(size*ufarad) + cm**2*r*inputs_stim(t)/(size*ufarad) + 1.925*h*m**3*mV*siemens/ufarad - 0.81*mV*n**4*siemens/ufarad - 0.0065*mV*siemens/ufarad + noise)/(-cm**2*ge/(size*ufarad) - cm**2*ge_ext/(size*ufarad) - cm**2*ge_hipp/(size*ufarad) - cm**2*gi/(size*ufarad) - 0.035*h*m**3*siemens/ufarad - 0.009*n**4*siemens/ufarad - 0.0001*siemens/ufarad) _v = -_BA_v + (_BA_v + v)*exp(dt*(-cm**2*ge/(size*ufarad) - cm**2*ge_ext/(size*ufarad) - cm**2*ge_hipp/(size*ufarad) - cm**2*gi/(size*ufarad) - 0.035*h*m**3*siemens/ufarad - 0.009*n**4*siemens/ufarad - 0.0001*siemens/ufarad)) ge = _ge ge_ext = _ge_ext ge_hipp = _ge_hipp gi = _gi h = _h he = _he he_ext = _he_ext he_hipp = _he_hipp hi = _hi m = _m n = _n v = _v 2021-11-05 15:15:21,633 DIAGNOSTIC brian2.devices.device: EC_inh_stateupdater_codeobject snippet (scalar): t = _array_defaultclock_t[0] dt = _array_defaultclock_dt[0] _lio_1 = _timestep(0.003, dt) _lio_2 = exp(((- 3.33333333333333) * dt) / ms) _lio_3 = exp(((- 1.0) * dt) / ms) _lio_4 = 0.07 * ms _lio_5 = 0.060810062625218 * ((ms ** 2) * 18.17414536944306) _lio_6 = 0.05 / mV _lio_7 = 0.060810062625218 * ms _lio_8 = (- 0.05) / mV _lio_9 = (ms ** 2) * 18.17414536944306 _lio_10 = (- 0.1) / mV _lio_11 = 0.00425670438376526 * ms _lio_12 = (ms ** 2) * 330.2995599096486 _lio_13 = 0.1 / mV _lio_14 = 0.07 * (ms * 18.17414536944306) _lio_15 = 0.019258127019742523 / ms _lio_16 = 1.0 / mV _lio_17 = exp((0.2 * (- dt)) / ms) _lio_18 = exp((0.1 * (- dt)) / ms) _lio_19 = 61.25 * (mV ** 2) _lio_20 = ((- 7.0) * (mV ** 3)) * (ms ** 2) _lio_21 = 0.0 - (mV * ms) _lio_22 = (mV * ms) * 33.11545195869231 _lio_23 = 3.5 * ((mV ** 3) * (ms ** 2)) _lio_24 = ((- mV) * ms) * 33.11545195869231 _lio_25 = (mV * ms) * 1096.6331584284585 _lio_26 = 0.2 / mV _lio_27 = mV * ms _lio_28 = (mV * ms) * 0.0301973834223185 _lio_29 = 0.1 * ((mV ** 2) * (ms ** 2)) _lio_30 = 4.0 * (((mV ** 2) * ms) * 0.03567399334725241) _lio_31 = 0.05555555555555555 / mV _lio_32 = 4.0 * (((mV ** 2) * ms) * 3.253047117267129e-05) _lio_33 = (- 0.2555555555555556) / mV _lio_34 = 0.2 * ((mV ** 2) * (ms ** 2)) _lio_35 = 8.0 * (((mV ** 2) * ms) * 0.0010772612553122203) _lio_36 = (- 0.15555555555555556) / mV _lio_37 = 3.5 * mV _lio_38 = 70.0 * mV _lio_39 = 4.0 * (mV * ms) _lio_40 = (((- 3.5) * (mV ** 2)) * (ms ** 2)) * 28.03162489452614 _lio_41 = 3.5 * (((mV ** 2) * (ms ** 2)) * 28.03162489452614) _lio_42 = 0.1 * ((mV * (ms ** 2)) * 28.03162489452614) _lio_43 = 4.0 * ((mV * ms) * 0.0301973834223185) _lio_44 = (- 17.5) * mV _lio_45 = 0.7134798669450482 / ms _lio_46 = 0.578 * (mV ** 2) _lio_47 = ((- 0.0226938235730217) * (mV ** 3)) * (ms ** 2) _lio_48 = 0.0 - (0.0333732699603261 * (mV * ms)) _lio_49 = 0.000378683550267233 * ((mV ** 3) * (ms ** 2)) _lio_50 = ((- 0.0333732699603261) * mV) * ms _lio_51 = 0.34 * ((mV ** 3) * (ms ** 2)) _lio_52 = 0.0333732699603261 * (mV * ms) _lio_53 = 1.1137751478448e-05 * ((mV ** 2) * (ms ** 2)) _lio_54 = 0.01 * ((mV ** 2) * (ms ** 2)) _lio_55 = 0.0001392218934806 * (((mV ** 2) * ms) * 0.5769498103804866) _lio_56 = (- 0.2125) / mV _lio_57 = 0.125 * (((mV ** 2) * ms) * 0.5769498103804866) _lio_58 = 0.0125 / mV _lio_59 = 0.000667465399206522 * ((mV ** 2) * (ms ** 2)) _lio_60 = 0.00834331749008152 * (((mV ** 2) * ms) * 0.5769498103804866) _lio_61 = (- 0.1125) / mV _lio_62 = 0.034 * mV _lio_63 = 0.2125 * mV _lio_64 = 0.125 * (mV * ms) _lio_65 = (((- 0.0113469117865109) * (mV ** 2)) * (ms ** 2)) * 1.7332530178673953 _lio_66 = 0.34 * (((mV ** 2) * (ms ** 2)) * 1.7332530178673953) _lio_67 = 0.01 * ((mV * (ms ** 2)) * 1.7332530178673953) _lio_68 = 0.000333732699603261 * ((mV * (ms ** 2)) * 1.7332530178673953) _lio_69 = 0.00417165874504076 * (mV * ms) _lio_70 = (- 1.7) * mV _lio_71 = 0.36059363148780416 / ms _lio_72 = 0.0 - ((0.0065 * (mV * siemens)) / ufarad) _lio_73 = (1.5 * (cm ** 2)) / ufarad _lio_74 = 100.0 * scale _lio_75 = ((cm ** 2) * _timedarray(t)) / ufarad _lio_76 = (1.925 * (mV * siemens)) / ufarad _lio_77 = (80.0 * ((cm ** 2) * mV)) / ufarad _lio_78 = (0.81 * (mV * siemens)) / ufarad _lio_79 = 0.0 - ((0.0001 * siemens) / ufarad) _lio_80 = (- (cm ** 2)) / ufarad _lio_81 = (cm ** 2) / ufarad _lio_82 = (0.035 * siemens) / ufarad _lio_83 = (0.009 * siemens) / ufarad 2021-11-05 15:15:21,633 DIAGNOSTIC brian2.devices.device: EC_inh_stateupdater_codeobject snippet (vector): gi = _array_EC_inh_gi[_idx] noise = _array_EC_inh_noise[_idx] r = _array_EC_inh_r[_idx] ___I_exc_neurongroup_rhythm_pos_neurongroup_coherence_neurongroup_y = _array_neurongroup_y[0] lastspike = _array_EC_inh_lastspike[_idx] v = _array_EC_inh_v[_idx] ge_hipp = _array_EC_inh_ge_hipp[_idx] size = _array_EC_inh_size[_idx] m = _array_EC_inh_m[_idx] ___I_exc_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_x = _array_neurongroup_x[0] h = _array_EC_inh_h[_idx] n = _array_EC_inh_n[_idx] he = _array_EC_inh_he[_idx] hi = _array_EC_inh_hi[_idx] ___I_exc_neurongroup_rhythm_pos_neurongroup_coherence_neurongroup_x = _array_neurongroup_x[0] ___I_exc_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_y = _array_neurongroup_y[0] ge = _array_EC_inh_ge[_idx] he_hipp = _array_EC_inh_he_hipp[_idx] ge_ext = _array_EC_inh_ge_ext[_idx] z_soma = _array_EC_inh_z_soma[_idx] he_ext = _array_EC_inh_he_ext[_idx] not_refractory = _timestep(t - lastspike, dt) >= _lio_1 _BA_ge = (- 1.0) * he _ge = (- _BA_ge) + (_lio_2 * (_BA_ge + ge)) _BA_ge_ext = (- 1.0) * he_ext _ge_ext = (- _BA_ge_ext) + (_lio_2 * (_BA_ge_ext + ge_ext)) _BA_ge_hipp = (- 1.0) * he_hipp _ge_hipp = (- _BA_ge_hipp) + (_lio_2 * (_BA_ge_hipp + ge_hipp)) _BA_gi = (- 1.0) * hi _gi = (- _BA_gi) + (_lio_3 * (_BA_gi + gi)) _BA_h = ((0.35 / (_lio_4 + (((_lio_5 / ((ms * exp(_lio_6 * v)) + (_lio_7 * exp(_lio_8 * v)))) + ((_lio_9 * exp(_lio_6 * v)) / (ms + (_lio_7 * exp(_lio_10 * v))))) + (_lio_11 * exp(_lio_10 * v))))) + (0.0245 / (((_lio_12 * exp(_lio_13 * v)) / (ms + (_lio_7 * exp(_lio_10 * v)))) + (_lio_14 * exp(_lio_6 * v))))) / (((- 5.0) / (ms + (_lio_7 * exp(_lio_10 * v)))) - (_lio_15 / (exp(_lio_16 * v) ** 0.05))) _h = (- _BA_h) + ((_BA_h + h) * exp(dt * (((- 5.0) / (ms + (_lio_7 * exp(_lio_10 * v)))) - (_lio_15 / (exp(_lio_16 * v) ** 0.05))))) _he = _lio_17 * he _he_ext = _lio_17 * he_ext _he_hipp = _lio_17 * he_hipp _hi = _lio_18 * hi _BA_m = (((((_lio_19 / ((((((((_lio_20 / (_lio_21 + (_lio_22 * exp(_lio_13 * v)))) + (_lio_23 / ((_lio_24 * exp(_lio_13 * v)) + (_lio_25 * exp(_lio_26 * v))))) + (_lio_23 / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v)))))) + ((_lio_29 * v) / ((_lio_24 * exp(_lio_13 * v)) + (_lio_25 * exp(_lio_26 * v))))) + ((_lio_29 * v) / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v)))))) + (_lio_30 * exp(_lio_31 * (- v)))) + (_lio_32 * exp(_lio_33 * v))) - (((_lio_34 * v) / (_lio_21 + (_lio_22 * exp(_lio_13 * v)))) + (_lio_35 * exp(_lio_36 * v))))) + ((_lio_37 * v) / ((((((((_lio_20 / (_lio_21 + (_lio_22 * exp(_lio_13 * v)))) + (_lio_23 / ((_lio_24 * exp(_lio_13 * v)) + (_lio_25 * exp(_lio_26 * v))))) + (_lio_23 / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v)))))) + ((_lio_29 * v) / ((_lio_24 * exp(_lio_13 * v)) + (_lio_25 * exp(_lio_26 * v))))) + ((_lio_29 * v) / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v)))))) + (_lio_30 * exp(_lio_31 * (- v)))) + (_lio_32 * exp(_lio_33 * v))) - (((_lio_34 * v) / (_lio_21 + (_lio_22 * exp(_lio_13 * v)))) + (_lio_35 * exp(_lio_36 * v)))))) + (_lio_38 / ((_lio_39 + ((((_lio_40 * exp(_lio_31 * v)) / (_lio_21 + (_lio_22 * exp(_lio_13 * v)))) + ((_lio_41 * exp(_lio_31 * v)) / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v)))))) + ((_lio_42 * (v * exp(_lio_31 * v))) / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v))))))) - (((_lio_42 * (v * exp(_lio_31 * v))) / (_lio_21 + (_lio_22 * exp(_lio_13 * v)))) + (_lio_43 * exp(_lio_13 * (- v))))))) + ((0.05 * (v ** 2)) / ((((((((_lio_20 / (_lio_21 + (_lio_22 * exp(_lio_13 * v)))) + (_lio_23 / ((_lio_24 * exp(_lio_13 * v)) + (_lio_25 * exp(_lio_26 * v))))) + (_lio_23 / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v)))))) + ((_lio_29 * v) / ((_lio_24 * exp(_lio_13 * v)) + (_lio_25 * exp(_lio_26 * v))))) + ((_lio_29 * v) / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v)))))) + (_lio_30 * exp(_lio_31 * (- v)))) + (_lio_32 * exp(_lio_33 * v))) - (((_lio_34 * v) / (_lio_21 + (_lio_22 * exp(_lio_13 * v)))) + (_lio_35 * exp(_lio_36 * v)))))) + ((2.0 * v) / ((_lio_39 + ((((_lio_40 * exp(_lio_31 * v)) / (_lio_21 + (_lio_22 * exp(_lio_13 * v)))) + ((_lio_41 * exp(_lio_31 * v)) / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v)))))) + ((_lio_42 * (v * exp(_lio_31 * v))) / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v))))))) - (((_lio_42 * (v * exp(_lio_31 * v))) / (_lio_21 + (_lio_22 * exp(_lio_13 * v)))) + (_lio_43 * exp(_lio_13 * (- v))))))) / ((_lio_44 / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v))))) - (((0.5 * v) / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v))))) + (_lio_45 / (exp(_lio_16 * v) ** 0.05555555555555555)))) _m = (- _BA_m) + ((_BA_m + m) * exp(dt * ((_lio_44 / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v))))) - (((0.5 * v) / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v))))) + (_lio_45 / (exp(_lio_16 * v) ** 0.05555555555555555)))))) _BA_n = (((((_lio_46 / ((((((((_lio_47 / (_lio_48 + (_lio_27 * exp(_lio_13 * v)))) + (_lio_49 / ((_lio_50 * exp(_lio_13 * v)) + (_lio_27 * exp(_lio_26 * v))))) + (_lio_51 / (_lio_27 - (_lio_52 * exp(_lio_10 * v))))) + ((_lio_53 * v) / ((_lio_50 * exp(_lio_13 * v)) + (_lio_27 * exp(_lio_26 * v))))) + ((_lio_54 * v) / (_lio_27 - (_lio_52 * exp(_lio_10 * v))))) + (_lio_55 * exp(_lio_56 * v))) + (_lio_57 * exp(_lio_58 * (- v)))) - (((_lio_59 * v) / (_lio_48 + (_lio_27 * exp(_lio_13 * v)))) + (_lio_60 * exp(_lio_61 * v))))) + ((_lio_62 * v) / ((((((((_lio_47 / (_lio_48 + (_lio_27 * exp(_lio_13 * v)))) + (_lio_49 / ((_lio_50 * exp(_lio_13 * v)) + (_lio_27 * exp(_lio_26 * v))))) + (_lio_51 / (_lio_27 - (_lio_52 * exp(_lio_10 * v))))) + ((_lio_53 * v) / ((_lio_50 * exp(_lio_13 * v)) + (_lio_27 * exp(_lio_26 * v))))) + ((_lio_54 * v) / (_lio_27 - (_lio_52 * exp(_lio_10 * v))))) + (_lio_55 * exp(_lio_56 * v))) + (_lio_57 * exp(_lio_58 * (- v)))) - (((_lio_59 * v) / (_lio_48 + (_lio_27 * exp(_lio_13 * v)))) + (_lio_60 * exp(_lio_61 * v)))))) + (_lio_63 / ((_lio_64 + ((((_lio_65 * exp(_lio_58 * v)) / (_lio_48 + (_lio_27 * exp(_lio_13 * v)))) + ((_lio_66 * exp(_lio_58 * v)) / (_lio_27 - (_lio_52 * exp(_lio_10 * v))))) + ((_lio_67 * (v * exp(_lio_58 * v))) / (_lio_27 - (_lio_52 * exp(_lio_10 * v)))))) - (((_lio_68 * (v * exp(_lio_58 * v))) / (_lio_48 + (_lio_27 * exp(_lio_13 * v)))) + (_lio_69 * exp(_lio_10 * v)))))) + ((0.0005 * (v ** 2)) / ((((((((_lio_47 / (_lio_48 + (_lio_27 * exp(_lio_13 * v)))) + (_lio_49 / ((_lio_50 * exp(_lio_13 * v)) + (_lio_27 * exp(_lio_26 * v))))) + (_lio_51 / (_lio_27 - (_lio_52 * exp(_lio_10 * v))))) + ((_lio_53 * v) / ((_lio_50 * exp(_lio_13 * v)) + (_lio_27 * exp(_lio_26 * v))))) + ((_lio_54 * v) / (_lio_27 - (_lio_52 * exp(_lio_10 * v))))) + (_lio_55 * exp(_lio_56 * v))) + (_lio_57 * exp(_lio_58 * (- v)))) - (((_lio_59 * v) / (_lio_48 + (_lio_27 * exp(_lio_13 * v)))) + (_lio_60 * exp(_lio_61 * v)))))) + ((0.00625 * v) / ((_lio_64 + ((((_lio_65 * exp(_lio_58 * v)) / (_lio_48 + (_lio_27 * exp(_lio_13 * v)))) + ((_lio_66 * exp(_lio_58 * v)) / (_lio_27 - (_lio_52 * exp(_lio_10 * v))))) + ((_lio_67 * (v * exp(_lio_58 * v))) / (_lio_27 - (_lio_52 * exp(_lio_10 * v)))))) - (((_lio_68 * (v * exp(_lio_58 * v))) / (_lio_48 + (_lio_27 * exp(_lio_13 * v)))) + (_lio_69 * exp(_lio_10 * v)))))) / ((_lio_70 / (_lio_27 - (_lio_52 * exp(_lio_10 * v)))) - (((0.05 * v) / (_lio_27 - (_lio_52 * exp(_lio_10 * v)))) + (_lio_71 / (exp(_lio_16 * v) ** 0.0125)))) _n = (- _BA_n) + ((_BA_n + n) * exp(dt * ((_lio_70 / (_lio_27 - (_lio_52 * exp(_lio_10 * v)))) - (((0.05 * v) / (_lio_27 - (_lio_52 * exp(_lio_10 * v)))) + (_lio_71 / (exp(_lio_16 * v) ** 0.0125)))))) __I_exc_neurongroup_rhythm_pos_neurongroup_coherence = sqrt((___I_exc_neurongroup_rhythm_pos_neurongroup_coherence_neurongroup_x ** 2) + (___I_exc_neurongroup_rhythm_pos_neurongroup_coherence_neurongroup_y ** 2)) __I_exc_neurongroup_rhythm_pos_neurongroup_phase = (atan(___I_exc_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_y / ___I_exc_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_x) + (pi * int_((___I_exc_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_x < 0) and (___I_exc_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_y > 0)))) - (pi * int_((___I_exc_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_x < 0) and (___I_exc_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_y < 0))) _I_exc_neurongroup_rhythm_pos = 0.5 * (__I_exc_neurongroup_rhythm_pos_neurongroup_coherence * (1.0 + sin(__I_exc_neurongroup_rhythm_pos_neurongroup_phase))) I_exc = nA * _I_exc_neurongroup_rhythm_pos _BA_v = ((_lio_72 + (((((_lio_73 * ((I_exc * int_(z_soma < _lio_74)) * int_(z_soma > 0))) / size) + ((_lio_75 * r) / size)) + (_lio_76 * (h * (m ** 3)))) + noise)) - (((_lio_77 * gi) / size) + (_lio_78 * (n ** 4)))) / ((_lio_79 + ((_lio_80 * ge) / size)) - ((((((_lio_81 * ge_ext) / size) + ((_lio_81 * ge_hipp) / size)) + ((_lio_81 * gi) / size)) + (_lio_82 * (h * (m ** 3)))) + (_lio_83 * (n ** 4)))) _v = (- _BA_v) + ((_BA_v + v) * exp(dt * ((_lio_79 + ((_lio_80 * ge) / size)) - ((((((_lio_81 * ge_ext) / size) + ((_lio_81 * ge_hipp) / size)) + ((_lio_81 * gi) / size)) + (_lio_82 * (h * (m ** 3)))) + (_lio_83 * (n ** 4)))))) ge = _ge ge_ext = _ge_ext ge_hipp = _ge_hipp gi = _gi h = _h he = _he he_ext = _he_ext he_hipp = _he_hipp hi = _hi m = _m n = _n v = _v _array_EC_inh_hi[_idx] = hi _array_EC_inh_ge[_idx] = ge _array_EC_inh_gi[_idx] = gi _array_EC_inh_v[_idx] = v _array_EC_inh_h[_idx] = h _array_EC_inh_he_hipp[_idx] = he_hipp _array_EC_inh_ge_hipp[_idx] = ge_hipp _array_EC_inh_n[_idx] = n _array_EC_inh_m[_idx] = m _array_EC_inh_he[_idx] = he _array_EC_inh_ge_ext[_idx] = ge_ext _array_EC_inh_he_ext[_idx] = he_ext _array_EC_inh_not_refractory[_idx] = not_refractory 2021-11-05 15:15:21,634 DIAGNOSTIC brian2.devices.device: EC_inh_stateupdater_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code cdef double *_namespace_timedarray_values cdef double _timedarray(const double t): global _namespace_timedarray_values cdef double epsilon = 0.001000000000000000 / 128 cdef int i = (int)((t/epsilon + 0.5)/128) if i < 0: i = 0 if i >= 2001: i = 2001 - 1 return _namespace_timedarray_values[i] cdef int64_t _timestep(double t, double dt): return ((t + 1e-3*dt)/dt) # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx cdef double I_exc _var_N = _namespace["_var_N"] cdef int64_t N = _namespace["N"] cdef double _I_exc_neurongroup_rhythm_pos cdef double __I_exc_neurongroup_rhythm_pos_neurongroup_coherence cdef double __I_exc_neurongroup_rhythm_pos_neurongroup_phase _var____I_exc_neurongroup_rhythm_pos_neurongroup_coherence_neurongroup_x = _namespace["_var____I_exc_neurongroup_rhythm_pos_neurongroup_coherence_neurongroup_x"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_neurongroup_x = _namespace['_array_neurongroup_x'] cdef double * _array_neurongroup_x = _buf__array_neurongroup_x.data cdef size_t _num_array_neurongroup_x = len(_namespace['_array_neurongroup_x']) cdef double ___I_exc_neurongroup_rhythm_pos_neurongroup_coherence_neurongroup_x _var____I_exc_neurongroup_rhythm_pos_neurongroup_coherence_neurongroup_y = _namespace["_var____I_exc_neurongroup_rhythm_pos_neurongroup_coherence_neurongroup_y"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_neurongroup_y = _namespace['_array_neurongroup_y'] cdef double * _array_neurongroup_y = _buf__array_neurongroup_y.data cdef size_t _num_array_neurongroup_y = len(_namespace['_array_neurongroup_y']) cdef double ___I_exc_neurongroup_rhythm_pos_neurongroup_coherence_neurongroup_y _var____I_exc_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_x = _namespace["_var____I_exc_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_x"] _var____I_exc_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_y = _namespace["_var____I_exc_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_y"] _var_cm = _namespace["_var_cm"] cdef double cm = _namespace["cm"] _var_dt = _namespace["_var_dt"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_dt = _namespace['_array_defaultclock_dt'] cdef double * _array_defaultclock_dt = _buf__array_defaultclock_dt.data cdef double dt = _namespace["dt"] _var_ge = _namespace["_var_ge"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_inh_ge = _namespace['_array_EC_inh_ge'] cdef double * _array_EC_inh_ge = _buf__array_EC_inh_ge.data cdef size_t _num_array_EC_inh_ge = len(_namespace['_array_EC_inh_ge']) cdef double ge _var_ge_ext = _namespace["_var_ge_ext"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_inh_ge_ext = _namespace['_array_EC_inh_ge_ext'] cdef double * _array_EC_inh_ge_ext = _buf__array_EC_inh_ge_ext.data cdef size_t _num_array_EC_inh_ge_ext = len(_namespace['_array_EC_inh_ge_ext']) cdef double ge_ext _var_ge_hipp = _namespace["_var_ge_hipp"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_inh_ge_hipp = _namespace['_array_EC_inh_ge_hipp'] cdef double * _array_EC_inh_ge_hipp = _buf__array_EC_inh_ge_hipp.data cdef size_t _num_array_EC_inh_ge_hipp = len(_namespace['_array_EC_inh_ge_hipp']) cdef double ge_hipp _var_gi = _namespace["_var_gi"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_inh_gi = _namespace['_array_EC_inh_gi'] cdef double * _array_EC_inh_gi = _buf__array_EC_inh_gi.data cdef size_t _num_array_EC_inh_gi = len(_namespace['_array_EC_inh_gi']) cdef double gi _var_h = _namespace["_var_h"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_inh_h = _namespace['_array_EC_inh_h'] cdef double * _array_EC_inh_h = _buf__array_EC_inh_h.data cdef size_t _num_array_EC_inh_h = len(_namespace['_array_EC_inh_h']) cdef double h _var_he = _namespace["_var_he"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_inh_he = _namespace['_array_EC_inh_he'] cdef double * _array_EC_inh_he = _buf__array_EC_inh_he.data cdef size_t _num_array_EC_inh_he = len(_namespace['_array_EC_inh_he']) cdef double he _var_he_ext = _namespace["_var_he_ext"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_inh_he_ext = _namespace['_array_EC_inh_he_ext'] cdef double * _array_EC_inh_he_ext = _buf__array_EC_inh_he_ext.data cdef size_t _num_array_EC_inh_he_ext = len(_namespace['_array_EC_inh_he_ext']) cdef double he_ext _var_he_hipp = _namespace["_var_he_hipp"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_inh_he_hipp = _namespace['_array_EC_inh_he_hipp'] cdef double * _array_EC_inh_he_hipp = _buf__array_EC_inh_he_hipp.data cdef size_t _num_array_EC_inh_he_hipp = len(_namespace['_array_EC_inh_he_hipp']) cdef double he_hipp _var_hi = _namespace["_var_hi"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_inh_hi = _namespace['_array_EC_inh_hi'] cdef double * _array_EC_inh_hi = _buf__array_EC_inh_hi.data cdef size_t _num_array_EC_inh_hi = len(_namespace['_array_EC_inh_hi']) cdef double hi # namespace for function inputs_stim global _namespace_timedarray_values global _namespace_num_timedarray_values cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__timedarray_values = _namespace['_timedarray_values'] _namespace_timedarray_values = _buf__timedarray_values.data _namespace_num_timedarray_values = len(_namespace['_timedarray_values']) _var_lastspike = _namespace["_var_lastspike"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_inh_lastspike = _namespace['_array_EC_inh_lastspike'] cdef double * _array_EC_inh_lastspike = _buf__array_EC_inh_lastspike.data cdef size_t _num_array_EC_inh_lastspike = len(_namespace['_array_EC_inh_lastspike']) cdef double lastspike _var_m = _namespace["_var_m"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_inh_m = _namespace['_array_EC_inh_m'] cdef double * _array_EC_inh_m = _buf__array_EC_inh_m.data cdef size_t _num_array_EC_inh_m = len(_namespace['_array_EC_inh_m']) cdef double m _var_mV = _namespace["_var_mV"] cdef double mV = _namespace["mV"] _var_ms = _namespace["_var_ms"] cdef double ms = _namespace["ms"] _var_n = _namespace["_var_n"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_inh_n = _namespace['_array_EC_inh_n'] cdef double * _array_EC_inh_n = _buf__array_EC_inh_n.data cdef size_t _num_array_EC_inh_n = len(_namespace['_array_EC_inh_n']) cdef double n _var_nA = _namespace["_var_nA"] cdef double nA = _namespace["nA"] _var_noise = _namespace["_var_noise"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_inh_noise = _namespace['_array_EC_inh_noise'] cdef double * _array_EC_inh_noise = _buf__array_EC_inh_noise.data cdef size_t _num_array_EC_inh_noise = len(_namespace['_array_EC_inh_noise']) cdef double noise _var_not_refractory = _namespace["_var_not_refractory"] cdef _numpy.ndarray[char, ndim=1, mode='c', cast=True] _buf__array_EC_inh_not_refractory = _namespace['_array_EC_inh_not_refractory'] cdef bool * _array_EC_inh_not_refractory = _buf__array_EC_inh_not_refractory.data cdef size_t _num_array_EC_inh_not_refractory = len(_namespace['_array_EC_inh_not_refractory']) cdef bool not_refractory _var_pi = _namespace["_var_pi"] cdef double pi = _namespace["pi"] _var_r = _namespace["_var_r"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_inh_r = _namespace['_array_EC_inh_r'] cdef double * _array_EC_inh_r = _buf__array_EC_inh_r.data cdef size_t _num_array_EC_inh_r = len(_namespace['_array_EC_inh_r']) cdef double r _var_scale = _namespace["_var_scale"] cdef double scale = _namespace["scale"] _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] _var_size = _namespace["_var_size"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_inh_size = _namespace['_array_EC_inh_size'] cdef double * _array_EC_inh_size = _buf__array_EC_inh_size.data cdef size_t _num_array_EC_inh_size = len(_namespace['_array_EC_inh_size']) cdef double size _var_t = _namespace["_var_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double t _var_ufarad = _namespace["_var_ufarad"] cdef double ufarad = _namespace["ufarad"] _var_v = _namespace["_var_v"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_inh_v = _namespace['_array_EC_inh_v'] cdef double * _array_EC_inh_v = _buf__array_EC_inh_v.data cdef size_t _num_array_EC_inh_v = len(_namespace['_array_EC_inh_v']) cdef double v _var_z_soma = _namespace["_var_z_soma"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_inh_z_soma = _namespace['_array_EC_inh_z_soma'] cdef double * _array_EC_inh_z_soma = _buf__array_EC_inh_z_soma.data cdef size_t _num_array_EC_inh_z_soma = len(_namespace['_array_EC_inh_z_soma']) cdef double z_soma cdef double _BA_ge cdef double _BA_ge_ext cdef double _BA_ge_hipp cdef double _BA_gi cdef double _BA_h cdef double _BA_m cdef double _BA_n cdef double _BA_v cdef double _ge cdef double _ge_ext cdef double _ge_hipp cdef double _gi cdef double _h cdef double _he cdef double _he_ext cdef double _he_hipp cdef double _hi cdef int64_t _lio_1 cdef double _lio_10 cdef double _lio_11 cdef double _lio_12 cdef double _lio_13 cdef double _lio_14 cdef double _lio_15 cdef double _lio_16 cdef double _lio_17 cdef double _lio_18 cdef double _lio_19 cdef double _lio_2 cdef double _lio_20 cdef double _lio_21 cdef double _lio_22 cdef double _lio_23 cdef double _lio_24 cdef double _lio_25 cdef double _lio_26 cdef double _lio_27 cdef double _lio_28 cdef double _lio_29 cdef double _lio_3 cdef double _lio_30 cdef double _lio_31 cdef double _lio_32 cdef double _lio_33 cdef double _lio_34 cdef double _lio_35 cdef double _lio_36 cdef double _lio_37 cdef double _lio_38 cdef double _lio_39 cdef double _lio_4 cdef double _lio_40 cdef double _lio_41 cdef double _lio_42 cdef double _lio_43 cdef double _lio_44 cdef double _lio_45 cdef double _lio_46 cdef double _lio_47 cdef double _lio_48 cdef double _lio_49 cdef double _lio_5 cdef double _lio_50 cdef double _lio_51 cdef double _lio_52 cdef double _lio_53 cdef double _lio_54 cdef double _lio_55 cdef double _lio_56 cdef double _lio_57 cdef double _lio_58 cdef double _lio_59 cdef double _lio_6 cdef double _lio_60 cdef double _lio_61 cdef double _lio_62 cdef double _lio_63 cdef double _lio_64 cdef double _lio_65 cdef double _lio_66 cdef double _lio_67 cdef double _lio_68 cdef double _lio_69 cdef double _lio_7 cdef double _lio_70 cdef double _lio_71 cdef double _lio_72 cdef double _lio_73 cdef double _lio_74 cdef double _lio_75 cdef double _lio_76 cdef double _lio_77 cdef double _lio_78 cdef double _lio_79 cdef double _lio_8 cdef double _lio_80 cdef double _lio_81 cdef double _lio_82 cdef double _lio_83 cdef double _lio_9 cdef double _m cdef double _n cdef double _v if '_owner' in _namespace: _owner = _namespace['_owner'] # scalar code _vectorisation_idx = 1 t = _array_defaultclock_t[0] dt = _array_defaultclock_dt[0] _lio_1 = _timestep(0.003, dt) _lio_2 = exp(((- 3.33333333333333) * dt) / ms) _lio_3 = exp(((- 1.0) * dt) / ms) _lio_4 = 0.07 * ms _lio_5 = 0.060810062625218 * ((ms ** 2) * 18.17414536944306) _lio_6 = 0.05 / mV _lio_7 = 0.060810062625218 * ms _lio_8 = (- 0.05) / mV _lio_9 = (ms ** 2) * 18.17414536944306 _lio_10 = (- 0.1) / mV _lio_11 = 0.00425670438376526 * ms _lio_12 = (ms ** 2) * 330.2995599096486 _lio_13 = 0.1 / mV _lio_14 = 0.07 * (ms * 18.17414536944306) _lio_15 = 0.019258127019742523 / ms _lio_16 = 1.0 / mV _lio_17 = exp((0.2 * (- dt)) / ms) _lio_18 = exp((0.1 * (- dt)) / ms) _lio_19 = 61.25 * (mV ** 2) _lio_20 = ((- 7.0) * (mV ** 3)) * (ms ** 2) _lio_21 = 0.0 - (mV * ms) _lio_22 = (mV * ms) * 33.11545195869231 _lio_23 = 3.5 * ((mV ** 3) * (ms ** 2)) _lio_24 = ((- mV) * ms) * 33.11545195869231 _lio_25 = (mV * ms) * 1096.6331584284585 _lio_26 = 0.2 / mV _lio_27 = mV * ms _lio_28 = (mV * ms) * 0.0301973834223185 _lio_29 = 0.1 * ((mV ** 2) * (ms ** 2)) _lio_30 = 4.0 * (((mV ** 2) * ms) * 0.03567399334725241) _lio_31 = 0.05555555555555555 / mV _lio_32 = 4.0 * (((mV ** 2) * ms) * 3.253047117267129e-05) _lio_33 = (- 0.2555555555555556) / mV _lio_34 = 0.2 * ((mV ** 2) * (ms ** 2)) _lio_35 = 8.0 * (((mV ** 2) * ms) * 0.0010772612553122203) _lio_36 = (- 0.15555555555555556) / mV _lio_37 = 3.5 * mV _lio_38 = 70.0 * mV _lio_39 = 4.0 * (mV * ms) _lio_40 = (((- 3.5) * (mV ** 2)) * (ms ** 2)) * 28.03162489452614 _lio_41 = 3.5 * (((mV ** 2) * (ms ** 2)) * 28.03162489452614) _lio_42 = 0.1 * ((mV * (ms ** 2)) * 28.03162489452614) _lio_43 = 4.0 * ((mV * ms) * 0.0301973834223185) _lio_44 = (- 17.5) * mV _lio_45 = 0.7134798669450482 / ms _lio_46 = 0.578 * (mV ** 2) _lio_47 = ((- 0.0226938235730217) * (mV ** 3)) * (ms ** 2) _lio_48 = 0.0 - (0.0333732699603261 * (mV * ms)) _lio_49 = 0.000378683550267233 * ((mV ** 3) * (ms ** 2)) _lio_50 = ((- 0.0333732699603261) * mV) * ms _lio_51 = 0.34 * ((mV ** 3) * (ms ** 2)) _lio_52 = 0.0333732699603261 * (mV * ms) _lio_53 = 1.1137751478448e-05 * ((mV ** 2) * (ms ** 2)) _lio_54 = 0.01 * ((mV ** 2) * (ms ** 2)) _lio_55 = 0.0001392218934806 * (((mV ** 2) * ms) * 0.5769498103804866) _lio_56 = (- 0.2125) / mV _lio_57 = 0.125 * (((mV ** 2) * ms) * 0.5769498103804866) _lio_58 = 0.0125 / mV _lio_59 = 0.000667465399206522 * ((mV ** 2) * (ms ** 2)) _lio_60 = 0.00834331749008152 * (((mV ** 2) * ms) * 0.5769498103804866) _lio_61 = (- 0.1125) / mV _lio_62 = 0.034 * mV _lio_63 = 0.2125 * mV _lio_64 = 0.125 * (mV * ms) _lio_65 = (((- 0.0113469117865109) * (mV ** 2)) * (ms ** 2)) * 1.7332530178673953 _lio_66 = 0.34 * (((mV ** 2) * (ms ** 2)) * 1.7332530178673953) _lio_67 = 0.01 * ((mV * (ms ** 2)) * 1.7332530178673953) _lio_68 = 0.000333732699603261 * ((mV * (ms ** 2)) * 1.7332530178673953) _lio_69 = 0.00417165874504076 * (mV * ms) _lio_70 = (- 1.7) * mV _lio_71 = 0.36059363148780416 / ms _lio_72 = 0.0 - ((0.0065 * (mV * siemens)) / ufarad) _lio_73 = (1.5 * (cm ** 2)) / ufarad _lio_74 = 100.0 * scale _lio_75 = ((cm ** 2) * _timedarray(t)) / ufarad _lio_76 = (1.925 * (mV * siemens)) / ufarad _lio_77 = (80.0 * ((cm ** 2) * mV)) / ufarad _lio_78 = (0.81 * (mV * siemens)) / ufarad _lio_79 = 0.0 - ((0.0001 * siemens) / ufarad) _lio_80 = (- (cm ** 2)) / ufarad _lio_81 = (cm ** 2) / ufarad _lio_82 = (0.035 * siemens) / ufarad _lio_83 = (0.009 * siemens) / ufarad # vector code for _idx in range(N): _vectorisation_idx = _idx gi = _array_EC_inh_gi[_idx] noise = _array_EC_inh_noise[_idx] r = _array_EC_inh_r[_idx] ___I_exc_neurongroup_rhythm_pos_neurongroup_coherence_neurongroup_y = _array_neurongroup_y[0] lastspike = _array_EC_inh_lastspike[_idx] v = _array_EC_inh_v[_idx] ge_hipp = _array_EC_inh_ge_hipp[_idx] size = _array_EC_inh_size[_idx] m = _array_EC_inh_m[_idx] ___I_exc_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_x = _array_neurongroup_x[0] h = _array_EC_inh_h[_idx] n = _array_EC_inh_n[_idx] he = _array_EC_inh_he[_idx] hi = _array_EC_inh_hi[_idx] ___I_exc_neurongroup_rhythm_pos_neurongroup_coherence_neurongroup_x = _array_neurongroup_x[0] ___I_exc_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_y = _array_neurongroup_y[0] ge = _array_EC_inh_ge[_idx] he_hipp = _array_EC_inh_he_hipp[_idx] ge_ext = _array_EC_inh_ge_ext[_idx] z_soma = _array_EC_inh_z_soma[_idx] he_ext = _array_EC_inh_he_ext[_idx] not_refractory = _timestep(t - lastspike, dt) >= _lio_1 _BA_ge = (- 1.0) * he _ge = (- _BA_ge) + (_lio_2 * (_BA_ge + ge)) _BA_ge_ext = (- 1.0) * he_ext _ge_ext = (- _BA_ge_ext) + (_lio_2 * (_BA_ge_ext + ge_ext)) _BA_ge_hipp = (- 1.0) * he_hipp _ge_hipp = (- _BA_ge_hipp) + (_lio_2 * (_BA_ge_hipp + ge_hipp)) _BA_gi = (- 1.0) * hi _gi = (- _BA_gi) + (_lio_3 * (_BA_gi + gi)) _BA_h = ((0.35 / (_lio_4 + (((_lio_5 / ((ms * exp(_lio_6 * v)) + (_lio_7 * exp(_lio_8 * v)))) + ((_lio_9 * exp(_lio_6 * v)) / (ms + (_lio_7 * exp(_lio_10 * v))))) + (_lio_11 * exp(_lio_10 * v))))) + (0.0245 / (((_lio_12 * exp(_lio_13 * v)) / (ms + (_lio_7 * exp(_lio_10 * v)))) + (_lio_14 * exp(_lio_6 * v))))) / (((- 5.0) / (ms + (_lio_7 * exp(_lio_10 * v)))) - (_lio_15 / (exp(_lio_16 * v) ** 0.05))) _h = (- _BA_h) + ((_BA_h + h) * exp(dt * (((- 5.0) / (ms + (_lio_7 * exp(_lio_10 * v)))) - (_lio_15 / (exp(_lio_16 * v) ** 0.05))))) _he = _lio_17 * he _he_ext = _lio_17 * he_ext _he_hipp = _lio_17 * he_hipp _hi = _lio_18 * hi _BA_m = (((((_lio_19 / ((((((((_lio_20 / (_lio_21 + (_lio_22 * exp(_lio_13 * v)))) + (_lio_23 / ((_lio_24 * exp(_lio_13 * v)) + (_lio_25 * exp(_lio_26 * v))))) + (_lio_23 / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v)))))) + ((_lio_29 * v) / ((_lio_24 * exp(_lio_13 * v)) + (_lio_25 * exp(_lio_26 * v))))) + ((_lio_29 * v) / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v)))))) + (_lio_30 * exp(_lio_31 * (- v)))) + (_lio_32 * exp(_lio_33 * v))) - (((_lio_34 * v) / (_lio_21 + (_lio_22 * exp(_lio_13 * v)))) + (_lio_35 * exp(_lio_36 * v))))) + ((_lio_37 * v) / ((((((((_lio_20 / (_lio_21 + (_lio_22 * exp(_lio_13 * v)))) + (_lio_23 / ((_lio_24 * exp(_lio_13 * v)) + (_lio_25 * exp(_lio_26 * v))))) + (_lio_23 / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v)))))) + ((_lio_29 * v) / ((_lio_24 * exp(_lio_13 * v)) + (_lio_25 * exp(_lio_26 * v))))) + ((_lio_29 * v) / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v)))))) + (_lio_30 * exp(_lio_31 * (- v)))) + (_lio_32 * exp(_lio_33 * v))) - (((_lio_34 * v) / (_lio_21 + (_lio_22 * exp(_lio_13 * v)))) + (_lio_35 * exp(_lio_36 * v)))))) + (_lio_38 / ((_lio_39 + ((((_lio_40 * exp(_lio_31 * v)) / (_lio_21 + (_lio_22 * exp(_lio_13 * v)))) + ((_lio_41 * exp(_lio_31 * v)) / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v)))))) + ((_lio_42 * (v * exp(_lio_31 * v))) / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v))))))) - (((_lio_42 * (v * exp(_lio_31 * v))) / (_lio_21 + (_lio_22 * exp(_lio_13 * v)))) + (_lio_43 * exp(_lio_13 * (- v))))))) + ((0.05 * (v ** 2)) / ((((((((_lio_20 / (_lio_21 + (_lio_22 * exp(_lio_13 * v)))) + (_lio_23 / ((_lio_24 * exp(_lio_13 * v)) + (_lio_25 * exp(_lio_26 * v))))) + (_lio_23 / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v)))))) + ((_lio_29 * v) / ((_lio_24 * exp(_lio_13 * v)) + (_lio_25 * exp(_lio_26 * v))))) + ((_lio_29 * v) / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v)))))) + (_lio_30 * exp(_lio_31 * (- v)))) + (_lio_32 * exp(_lio_33 * v))) - (((_lio_34 * v) / (_lio_21 + (_lio_22 * exp(_lio_13 * v)))) + (_lio_35 * exp(_lio_36 * v)))))) + ((2.0 * v) / ((_lio_39 + ((((_lio_40 * exp(_lio_31 * v)) / (_lio_21 + (_lio_22 * exp(_lio_13 * v)))) + ((_lio_41 * exp(_lio_31 * v)) / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v)))))) + ((_lio_42 * (v * exp(_lio_31 * v))) / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v))))))) - (((_lio_42 * (v * exp(_lio_31 * v))) / (_lio_21 + (_lio_22 * exp(_lio_13 * v)))) + (_lio_43 * exp(_lio_13 * (- v))))))) / ((_lio_44 / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v))))) - (((0.5 * v) / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v))))) + (_lio_45 / (exp(_lio_16 * v) ** 0.05555555555555555)))) _m = (- _BA_m) + ((_BA_m + m) * exp(dt * ((_lio_44 / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v))))) - (((0.5 * v) / (_lio_27 - (_lio_28 * exp(_lio_13 * (- v))))) + (_lio_45 / (exp(_lio_16 * v) ** 0.05555555555555555)))))) _BA_n = (((((_lio_46 / ((((((((_lio_47 / (_lio_48 + (_lio_27 * exp(_lio_13 * v)))) + (_lio_49 / ((_lio_50 * exp(_lio_13 * v)) + (_lio_27 * exp(_lio_26 * v))))) + (_lio_51 / (_lio_27 - (_lio_52 * exp(_lio_10 * v))))) + ((_lio_53 * v) / ((_lio_50 * exp(_lio_13 * v)) + (_lio_27 * exp(_lio_26 * v))))) + ((_lio_54 * v) / (_lio_27 - (_lio_52 * exp(_lio_10 * v))))) + (_lio_55 * exp(_lio_56 * v))) + (_lio_57 * exp(_lio_58 * (- v)))) - (((_lio_59 * v) / (_lio_48 + (_lio_27 * exp(_lio_13 * v)))) + (_lio_60 * exp(_lio_61 * v))))) + ((_lio_62 * v) / ((((((((_lio_47 / (_lio_48 + (_lio_27 * exp(_lio_13 * v)))) + (_lio_49 / ((_lio_50 * exp(_lio_13 * v)) + (_lio_27 * exp(_lio_26 * v))))) + (_lio_51 / (_lio_27 - (_lio_52 * exp(_lio_10 * v))))) + ((_lio_53 * v) / ((_lio_50 * exp(_lio_13 * v)) + (_lio_27 * exp(_lio_26 * v))))) + ((_lio_54 * v) / (_lio_27 - (_lio_52 * exp(_lio_10 * v))))) + (_lio_55 * exp(_lio_56 * v))) + (_lio_57 * exp(_lio_58 * (- v)))) - (((_lio_59 * v) / (_lio_48 + (_lio_27 * exp(_lio_13 * v)))) + (_lio_60 * exp(_lio_61 * v)))))) + (_lio_63 / ((_lio_64 + ((((_lio_65 * exp(_lio_58 * v)) / (_lio_48 + (_lio_27 * exp(_lio_13 * v)))) + ((_lio_66 * exp(_lio_58 * v)) / (_lio_27 - (_lio_52 * exp(_lio_10 * v))))) + ((_lio_67 * (v * exp(_lio_58 * v))) / (_lio_27 - (_lio_52 * exp(_lio_10 * v)))))) - (((_lio_68 * (v * exp(_lio_58 * v))) / (_lio_48 + (_lio_27 * exp(_lio_13 * v)))) + (_lio_69 * exp(_lio_10 * v)))))) + ((0.0005 * (v ** 2)) / ((((((((_lio_47 / (_lio_48 + (_lio_27 * exp(_lio_13 * v)))) + (_lio_49 / ((_lio_50 * exp(_lio_13 * v)) + (_lio_27 * exp(_lio_26 * v))))) + (_lio_51 / (_lio_27 - (_lio_52 * exp(_lio_10 * v))))) + ((_lio_53 * v) / ((_lio_50 * exp(_lio_13 * v)) + (_lio_27 * exp(_lio_26 * v))))) + ((_lio_54 * v) / (_lio_27 - (_lio_52 * exp(_lio_10 * v))))) + (_lio_55 * exp(_lio_56 * v))) + (_lio_57 * exp(_lio_58 * (- v)))) - (((_lio_59 * v) / (_lio_48 + (_lio_27 * exp(_lio_13 * v)))) + (_lio_60 * exp(_lio_61 * v)))))) + ((0.00625 * v) / ((_lio_64 + ((((_lio_65 * exp(_lio_58 * v)) / (_lio_48 + (_lio_27 * exp(_lio_13 * v)))) + ((_lio_66 * exp(_lio_58 * v)) / (_lio_27 - (_lio_52 * exp(_lio_10 * v))))) + ((_lio_67 * (v * exp(_lio_58 * v))) / (_lio_27 - (_lio_52 * exp(_lio_10 * v)))))) - (((_lio_68 * (v * exp(_lio_58 * v))) / (_lio_48 + (_lio_27 * exp(_lio_13 * v)))) + (_lio_69 * exp(_lio_10 * v)))))) / ((_lio_70 / (_lio_27 - (_lio_52 * exp(_lio_10 * v)))) - (((0.05 * v) / (_lio_27 - (_lio_52 * exp(_lio_10 * v)))) + (_lio_71 / (exp(_lio_16 * v) ** 0.0125)))) _n = (- _BA_n) + ((_BA_n + n) * exp(dt * ((_lio_70 / (_lio_27 - (_lio_52 * exp(_lio_10 * v)))) - (((0.05 * v) / (_lio_27 - (_lio_52 * exp(_lio_10 * v)))) + (_lio_71 / (exp(_lio_16 * v) ** 0.0125)))))) __I_exc_neurongroup_rhythm_pos_neurongroup_coherence = sqrt((___I_exc_neurongroup_rhythm_pos_neurongroup_coherence_neurongroup_x ** 2) + (___I_exc_neurongroup_rhythm_pos_neurongroup_coherence_neurongroup_y ** 2)) __I_exc_neurongroup_rhythm_pos_neurongroup_phase = (atan(___I_exc_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_y / ___I_exc_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_x) + (pi * int_((___I_exc_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_x < 0) and (___I_exc_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_y > 0)))) - (pi * int_((___I_exc_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_x < 0) and (___I_exc_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_y < 0))) _I_exc_neurongroup_rhythm_pos = 0.5 * (__I_exc_neurongroup_rhythm_pos_neurongroup_coherence * (1.0 + sin(__I_exc_neurongroup_rhythm_pos_neurongroup_phase))) I_exc = nA * _I_exc_neurongroup_rhythm_pos _BA_v = ((_lio_72 + (((((_lio_73 * ((I_exc * int_(z_soma < _lio_74)) * int_(z_soma > 0))) / size) + ((_lio_75 * r) / size)) + (_lio_76 * (h * (m ** 3)))) + noise)) - (((_lio_77 * gi) / size) + (_lio_78 * (n ** 4)))) / ((_lio_79 + ((_lio_80 * ge) / size)) - ((((((_lio_81 * ge_ext) / size) + ((_lio_81 * ge_hipp) / size)) + ((_lio_81 * gi) / size)) + (_lio_82 * (h * (m ** 3)))) + (_lio_83 * (n ** 4)))) _v = (- _BA_v) + ((_BA_v + v) * exp(dt * ((_lio_79 + ((_lio_80 * ge) / size)) - ((((((_lio_81 * ge_ext) / size) + ((_lio_81 * ge_hipp) / size)) + ((_lio_81 * gi) / size)) + (_lio_82 * (h * (m ** 3)))) + (_lio_83 * (n ** 4)))))) ge = _ge ge_ext = _ge_ext ge_hipp = _ge_hipp gi = _gi h = _h he = _he he_ext = _he_ext he_hipp = _he_hipp hi = _hi m = _m n = _n v = _v _array_EC_inh_hi[_idx] = hi _array_EC_inh_ge[_idx] = ge _array_EC_inh_gi[_idx] = gi _array_EC_inh_v[_idx] = v _array_EC_inh_h[_idx] = h _array_EC_inh_he_hipp[_idx] = he_hipp _array_EC_inh_ge_hipp[_idx] = ge_hipp _array_EC_inh_n[_idx] = n _array_EC_inh_m[_idx] = m _array_EC_inh_he[_idx] = he _array_EC_inh_ge_ext[_idx] = ge_ext _array_EC_inh_he_ext[_idx] = he_ext _array_EC_inh_not_refractory[_idx] = not_refractory before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): cdef double I_exc _var_N = _namespace["_var_N"] cdef int64_t N = _namespace["N"] cdef double _I_exc_neurongroup_rhythm_pos cdef double __I_exc_neurongroup_rhythm_pos_neurongroup_coherence cdef double __I_exc_neurongroup_rhythm_pos_neurongroup_phase _var____I_exc_neurongroup_rhythm_pos_neurongroup_coherence_neurongroup_x = _namespace["_var____I_exc_neurongroup_rhythm_pos_neurongroup_coherence_neurongroup_x"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_neurongroup_x = _namespace['_array_neurongroup_x'] cdef double * _array_neurongroup_x = _buf__array_neurongroup_x.data cdef size_t _num_array_neurongroup_x = len(_namespace['_array_neurongroup_x']) cdef double ___I_exc_neurongroup_rhythm_pos_neurongroup_coherence_neurongroup_x _var____I_exc_neurongroup_rhythm_pos_neurongroup_coherence_neurongroup_y = _namespace["_var____I_exc_neurongroup_rhythm_pos_neurongroup_coherence_neurongroup_y"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_neurongroup_y = _namespace['_array_neurongroup_y'] cdef double * _array_neurongroup_y = _buf__array_neurongroup_y.data cdef size_t _num_array_neurongroup_y = len(_namespace['_array_neurongroup_y']) cdef double ___I_exc_neurongroup_rhythm_pos_neurongroup_coherence_neurongroup_y _var____I_exc_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_x = _namespace["_var____I_exc_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_x"] _var____I_exc_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_y = _namespace["_var____I_exc_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_y"] _var_cm = _namespace["_var_cm"] cdef double cm = _namespace["cm"] _var_dt = _namespace["_var_dt"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_dt = _namespace['_array_defaultclock_dt'] cdef double * _array_defaultclock_dt = _buf__array_defaultclock_dt.data cdef double dt = _namespace["dt"] _var_ge = _namespace["_var_ge"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_inh_ge = _namespace['_array_EC_inh_ge'] cdef double * _array_EC_inh_ge = _buf__array_EC_inh_ge.data cdef size_t _num_array_EC_inh_ge = len(_namespace['_array_EC_inh_ge']) cdef double ge _var_ge_ext = _namespace["_var_ge_ext"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_inh_ge_ext = _namespace['_array_EC_inh_ge_ext'] cdef double * _array_EC_inh_ge_ext = _buf__array_EC_inh_ge_ext.data cdef size_t _num_array_EC_inh_ge_ext = len(_namespace['_array_EC_inh_ge_ext']) cdef double ge_ext _var_ge_hipp = _namespace["_var_ge_hipp"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_inh_ge_hipp = _namespace['_array_EC_inh_ge_hipp'] cdef double * _array_EC_inh_ge_hipp = _buf__array_EC_inh_ge_hipp.data cdef size_t _num_array_EC_inh_ge_hipp = len(_namespace['_array_EC_inh_ge_hipp']) cdef double ge_hipp _var_gi = _namespace["_var_gi"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_inh_gi = _namespace['_array_EC_inh_gi'] cdef double * _array_EC_inh_gi = _buf__array_EC_inh_gi.data cdef size_t _num_array_EC_inh_gi = len(_namespace['_array_EC_inh_gi']) cdef double gi _var_h = _namespace["_var_h"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_inh_h = _namespace['_array_EC_inh_h'] cdef double * _array_EC_inh_h = _buf__array_EC_inh_h.data cdef size_t _num_array_EC_inh_h = len(_namespace['_array_EC_inh_h']) cdef double h _var_he = _namespace["_var_he"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_inh_he = _namespace['_array_EC_inh_he'] cdef double * _array_EC_inh_he = _buf__array_EC_inh_he.data cdef size_t _num_array_EC_inh_he = len(_namespace['_array_EC_inh_he']) cdef double he _var_he_ext = _namespace["_var_he_ext"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_inh_he_ext = _namespace['_array_EC_inh_he_ext'] cdef double * _array_EC_inh_he_ext = _buf__array_EC_inh_he_ext.data cdef size_t _num_array_EC_inh_he_ext = len(_namespace['_array_EC_inh_he_ext']) cdef double he_ext _var_he_hipp = _namespace["_var_he_hipp"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_inh_he_hipp = _namespace['_array_EC_inh_he_hipp'] cdef double * _array_EC_inh_he_hipp = _buf__array_EC_inh_he_hipp.data cdef size_t _num_array_EC_inh_he_hipp = len(_namespace['_array_EC_inh_he_hipp']) cdef double he_hipp _var_hi = _namespace["_var_hi"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_inh_hi = _namespace['_array_EC_inh_hi'] cdef double * _array_EC_inh_hi = _buf__array_EC_inh_hi.data cdef size_t _num_array_EC_inh_hi = len(_namespace['_array_EC_inh_hi']) cdef double hi # namespace for function inputs_stim global _namespace_timedarray_values global _namespace_num_timedarray_values cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__timedarray_values = _namespace['_timedarray_values'] _namespace_timedarray_values = _buf__timedarray_values.data _namespace_num_timedarray_values = len(_namespace['_timedarray_values']) _var_lastspike = _namespace["_var_lastspike"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_inh_lastspike = _namespace['_array_EC_inh_lastspike'] cdef double * _array_EC_inh_lastspike = _buf__array_EC_inh_lastspike.data cdef size_t _num_array_EC_inh_lastspike = len(_namespace['_array_EC_inh_lastspike']) cdef double lastspike _var_m = _namespace["_var_m"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_inh_m = _namespace['_array_EC_inh_m'] cdef double * _array_EC_inh_m = _buf__array_EC_inh_m.data cdef size_t _num_array_EC_inh_m = len(_namespace['_array_EC_inh_m']) cdef double m _var_mV = _namespace["_var_mV"] cdef double mV = _namespace["mV"] _var_ms = _namespace["_var_ms"] cdef double ms = _namespace["ms"] _var_n = _namespace["_var_n"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_inh_n = _namespace['_array_EC_inh_n'] cdef double * _array_EC_inh_n = _buf__array_EC_inh_n.data cdef size_t _num_array_EC_inh_n = len(_namespace['_array_EC_inh_n']) cdef double n _var_nA = _namespace["_var_nA"] cdef double nA = _namespace["nA"] _var_noise = _namespace["_var_noise"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_inh_noise = _namespace['_array_EC_inh_noise'] cdef double * _array_EC_inh_noise = _buf__array_EC_inh_noise.data cdef size_t _num_array_EC_inh_noise = len(_namespace['_array_EC_inh_noise']) cdef double noise _var_not_refractory = _namespace["_var_not_refractory"] cdef _numpy.ndarray[char, ndim=1, mode='c', cast=True] _buf__array_EC_inh_not_refractory = _namespace['_array_EC_inh_not_refractory'] cdef bool * _array_EC_inh_not_refractory = _buf__array_EC_inh_not_refractory.data cdef size_t _num_array_EC_inh_not_refractory = len(_namespace['_array_EC_inh_not_refractory']) cdef bool not_refractory _var_pi = _namespace["_var_pi"] cdef double pi = _namespace["pi"] _var_r = _namespace["_var_r"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_inh_r = _namespace['_array_EC_inh_r'] cdef double * _array_EC_inh_r = _buf__array_EC_inh_r.data cdef size_t _num_array_EC_inh_r = len(_namespace['_array_EC_inh_r']) cdef double r _var_scale = _namespace["_var_scale"] cdef double scale = _namespace["scale"] _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] _var_size = _namespace["_var_size"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_inh_size = _namespace['_array_EC_inh_size'] cdef double * _array_EC_inh_size = _buf__array_EC_inh_size.data cdef size_t _num_array_EC_inh_size = len(_namespace['_array_EC_inh_size']) cdef double size _var_t = _namespace["_var_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double t _var_ufarad = _namespace["_var_ufarad"] cdef double ufarad = _namespace["ufarad"] _var_v = _namespace["_var_v"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_inh_v = _namespace['_array_EC_inh_v'] cdef double * _array_EC_inh_v = _buf__array_EC_inh_v.data cdef size_t _num_array_EC_inh_v = len(_namespace['_array_EC_inh_v']) cdef double v _var_z_soma = _namespace["_var_z_soma"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_inh_z_soma = _namespace['_array_EC_inh_z_soma'] cdef double * _array_EC_inh_z_soma = _buf__array_EC_inh_z_soma.data cdef size_t _num_array_EC_inh_z_soma = len(_namespace['_array_EC_inh_z_soma']) cdef double z_soma cdef double _BA_ge cdef double _BA_ge_ext cdef double _BA_ge_hipp cdef double _BA_gi cdef double _BA_h cdef double _BA_m cdef double _BA_n cdef double _BA_v cdef double _ge cdef double _ge_ext cdef double _ge_hipp cdef double _gi cdef double _h cdef double _he cdef double _he_ext cdef double _he_hipp cdef double _hi cdef int64_t _lio_1 cdef double _lio_10 cdef double _lio_11 cdef double _lio_12 cdef double _lio_13 cdef double _lio_14 cdef double _lio_15 cdef double _lio_16 cdef double _lio_17 cdef double _lio_18 cdef double _lio_19 cdef double _lio_2 cdef double _lio_20 cdef double _lio_21 cdef double _lio_22 cdef double _lio_23 cdef double _lio_24 cdef double _lio_25 cdef double _lio_26 cdef double _lio_27 cdef double _lio_28 cdef double _lio_29 cdef double _lio_3 cdef double _lio_30 cdef double _lio_31 cdef double _lio_32 cdef double _lio_33 cdef double _lio_34 cdef double _lio_35 cdef double _lio_36 cdef double _lio_37 cdef double _lio_38 cdef double _lio_39 cdef double _lio_4 cdef double _lio_40 cdef double _lio_41 cdef double _lio_42 cdef double _lio_43 cdef double _lio_44 cdef double _lio_45 cdef double _lio_46 cdef double _lio_47 cdef double _lio_48 cdef double _lio_49 cdef double _lio_5 cdef double _lio_50 cdef double _lio_51 cdef double _lio_52 cdef double _lio_53 cdef double _lio_54 cdef double _lio_55 cdef double _lio_56 cdef double _lio_57 cdef double _lio_58 cdef double _lio_59 cdef double _lio_6 cdef double _lio_60 cdef double _lio_61 cdef double _lio_62 cdef double _lio_63 cdef double _lio_64 cdef double _lio_65 cdef double _lio_66 cdef double _lio_67 cdef double _lio_68 cdef double _lio_69 cdef double _lio_7 cdef double _lio_70 cdef double _lio_71 cdef double _lio_72 cdef double _lio_73 cdef double _lio_74 cdef double _lio_75 cdef double _lio_76 cdef double _lio_77 cdef double _lio_78 cdef double _lio_79 cdef double _lio_8 cdef double _lio_80 cdef double _lio_81 cdef double _lio_82 cdef double _lio_83 cdef double _lio_9 cdef double _m cdef double _n cdef double _v if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): cdef double I_exc _var_N = _namespace["_var_N"] cdef int64_t N = _namespace["N"] cdef double _I_exc_neurongroup_rhythm_pos cdef double __I_exc_neurongroup_rhythm_pos_neurongroup_coherence cdef double __I_exc_neurongroup_rhythm_pos_neurongroup_phase _var____I_exc_neurongroup_rhythm_pos_neurongroup_coherence_neurongroup_x = _namespace["_var____I_exc_neurongroup_rhythm_pos_neurongroup_coherence_neurongroup_x"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_neurongroup_x = _namespace['_array_neurongroup_x'] cdef double * _array_neurongroup_x = _buf__array_neurongroup_x.data cdef size_t _num_array_neurongroup_x = len(_namespace['_array_neurongroup_x']) cdef double ___I_exc_neurongroup_rhythm_pos_neurongroup_coherence_neurongroup_x _var____I_exc_neurongroup_rhythm_pos_neurongroup_coherence_neurongroup_y = _namespace["_var____I_exc_neurongroup_rhythm_pos_neurongroup_coherence_neurongroup_y"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_neurongroup_y = _namespace['_array_neurongroup_y'] cdef double * _array_neurongroup_y = _buf__array_neurongroup_y.data cdef size_t _num_array_neurongroup_y = len(_namespace['_array_neurongroup_y']) cdef double ___I_exc_neurongroup_rhythm_pos_neurongroup_coherence_neurongroup_y _var____I_exc_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_x = _namespace["_var____I_exc_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_x"] _var____I_exc_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_y = _namespace["_var____I_exc_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_y"] _var_cm = _namespace["_var_cm"] cdef double cm = _namespace["cm"] _var_dt = _namespace["_var_dt"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_dt = _namespace['_array_defaultclock_dt'] cdef double * _array_defaultclock_dt = _buf__array_defaultclock_dt.data cdef double dt = _namespace["dt"] _var_ge = _namespace["_var_ge"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_inh_ge = _namespace['_array_EC_inh_ge'] cdef double * _array_EC_inh_ge = _buf__array_EC_inh_ge.data cdef size_t _num_array_EC_inh_ge = len(_namespace['_array_EC_inh_ge']) cdef double ge _var_ge_ext = _namespace["_var_ge_ext"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_inh_ge_ext = _namespace['_array_EC_inh_ge_ext'] cdef double * _array_EC_inh_ge_ext = _buf__array_EC_inh_ge_ext.data cdef size_t _num_array_EC_inh_ge_ext = len(_namespace['_array_EC_inh_ge_ext']) cdef double ge_ext _var_ge_hipp = _namespace["_var_ge_hipp"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_inh_ge_hipp = _namespace['_array_EC_inh_ge_hipp'] cdef double * _array_EC_inh_ge_hipp = _buf__array_EC_inh_ge_hipp.data cdef size_t _num_array_EC_inh_ge_hipp = len(_namespace['_array_EC_inh_ge_hipp']) cdef double ge_hipp _var_gi = _namespace["_var_gi"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_inh_gi = _namespace['_array_EC_inh_gi'] cdef double * _array_EC_inh_gi = _buf__array_EC_inh_gi.data cdef size_t _num_array_EC_inh_gi = len(_namespace['_array_EC_inh_gi']) cdef double gi _var_h = _namespace["_var_h"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_inh_h = _namespace['_array_EC_inh_h'] cdef double * _array_EC_inh_h = _buf__array_EC_inh_h.data cdef size_t _num_array_EC_inh_h = len(_namespace['_array_EC_inh_h']) cdef double h _var_he = _namespace["_var_he"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_inh_he = _namespace['_array_EC_inh_he'] cdef double * _array_EC_inh_he = _buf__array_EC_inh_he.data cdef size_t _num_array_EC_inh_he = len(_namespace['_array_EC_inh_he']) cdef double he _var_he_ext = _namespace["_var_he_ext"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_inh_he_ext = _namespace['_array_EC_inh_he_ext'] cdef double * _array_EC_inh_he_ext = _buf__array_EC_inh_he_ext.data cdef size_t _num_array_EC_inh_he_ext = len(_namespace['_array_EC_inh_he_ext']) cdef double he_ext _var_he_hipp = _namespace["_var_he_hipp"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_inh_he_hipp = _namespace['_array_EC_inh_he_hipp'] cdef double * _array_EC_inh_he_hipp = _buf__array_EC_inh_he_hipp.data cdef size_t _num_array_EC_inh_he_hipp = len(_namespace['_array_EC_inh_he_hipp']) cdef double he_hipp _var_hi = _namespace["_var_hi"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_inh_hi = _namespace['_array_EC_inh_hi'] cdef double * _array_EC_inh_hi = _buf__array_EC_inh_hi.data cdef size_t _num_array_EC_inh_hi = len(_namespace['_array_EC_inh_hi']) cdef double hi # namespace for function inputs_stim global _namespace_timedarray_values global _namespace_num_timedarray_values cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__timedarray_values = _namespace['_timedarray_values'] _namespace_timedarray_values = _buf__timedarray_values.data _namespace_num_timedarray_values = len(_namespace['_timedarray_values']) _var_lastspike = _namespace["_var_lastspike"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_inh_lastspike = _namespace['_array_EC_inh_lastspike'] cdef double * _array_EC_inh_lastspike = _buf__array_EC_inh_lastspike.data cdef size_t _num_array_EC_inh_lastspike = len(_namespace['_array_EC_inh_lastspike']) cdef double lastspike _var_m = _namespace["_var_m"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_inh_m = _namespace['_array_EC_inh_m'] cdef double * _array_EC_inh_m = _buf__array_EC_inh_m.data cdef size_t _num_array_EC_inh_m = len(_namespace['_array_EC_inh_m']) cdef double m _var_mV = _namespace["_var_mV"] cdef double mV = _namespace["mV"] _var_ms = _namespace["_var_ms"] cdef double ms = _namespace["ms"] _var_n = _namespace["_var_n"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_inh_n = _namespace['_array_EC_inh_n'] cdef double * _array_EC_inh_n = _buf__array_EC_inh_n.data cdef size_t _num_array_EC_inh_n = len(_namespace['_array_EC_inh_n']) cdef double n _var_nA = _namespace["_var_nA"] cdef double nA = _namespace["nA"] _var_noise = _namespace["_var_noise"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_inh_noise = _namespace['_array_EC_inh_noise'] cdef double * _array_EC_inh_noise = _buf__array_EC_inh_noise.data cdef size_t _num_array_EC_inh_noise = len(_namespace['_array_EC_inh_noise']) cdef double noise _var_not_refractory = _namespace["_var_not_refractory"] cdef _numpy.ndarray[char, ndim=1, mode='c', cast=True] _buf__array_EC_inh_not_refractory = _namespace['_array_EC_inh_not_refractory'] cdef bool * _array_EC_inh_not_refractory = _buf__array_EC_inh_not_refractory.data cdef size_t _num_array_EC_inh_not_refractory = len(_namespace['_array_EC_inh_not_refractory']) cdef bool not_refractory _var_pi = _namespace["_var_pi"] cdef double pi = _namespace["pi"] _var_r = _namespace["_var_r"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_inh_r = _namespace['_array_EC_inh_r'] cdef double * _array_EC_inh_r = _buf__array_EC_inh_r.data cdef size_t _num_array_EC_inh_r = len(_namespace['_array_EC_inh_r']) cdef double r _var_scale = _namespace["_var_scale"] cdef double scale = _namespace["scale"] _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] _var_size = _namespace["_var_size"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_inh_size = _namespace['_array_EC_inh_size'] cdef double * _array_EC_inh_size = _buf__array_EC_inh_size.data cdef size_t _num_array_EC_inh_size = len(_namespace['_array_EC_inh_size']) cdef double size _var_t = _namespace["_var_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double t _var_ufarad = _namespace["_var_ufarad"] cdef double ufarad = _namespace["ufarad"] _var_v = _namespace["_var_v"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_inh_v = _namespace['_array_EC_inh_v'] cdef double * _array_EC_inh_v = _buf__array_EC_inh_v.data cdef size_t _num_array_EC_inh_v = len(_namespace['_array_EC_inh_v']) cdef double v _var_z_soma = _namespace["_var_z_soma"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_inh_z_soma = _namespace['_array_EC_inh_z_soma'] cdef double * _array_EC_inh_z_soma = _buf__array_EC_inh_z_soma.data cdef size_t _num_array_EC_inh_z_soma = len(_namespace['_array_EC_inh_z_soma']) cdef double z_soma cdef double _BA_ge cdef double _BA_ge_ext cdef double _BA_ge_hipp cdef double _BA_gi cdef double _BA_h cdef double _BA_m cdef double _BA_n cdef double _BA_v cdef double _ge cdef double _ge_ext cdef double _ge_hipp cdef double _gi cdef double _h cdef double _he cdef double _he_ext cdef double _he_hipp cdef double _hi cdef int64_t _lio_1 cdef double _lio_10 cdef double _lio_11 cdef double _lio_12 cdef double _lio_13 cdef double _lio_14 cdef double _lio_15 cdef double _lio_16 cdef double _lio_17 cdef double _lio_18 cdef double _lio_19 cdef double _lio_2 cdef double _lio_20 cdef double _lio_21 cdef double _lio_22 cdef double _lio_23 cdef double _lio_24 cdef double _lio_25 cdef double _lio_26 cdef double _lio_27 cdef double _lio_28 cdef double _lio_29 cdef double _lio_3 cdef double _lio_30 cdef double _lio_31 cdef double _lio_32 cdef double _lio_33 cdef double _lio_34 cdef double _lio_35 cdef double _lio_36 cdef double _lio_37 cdef double _lio_38 cdef double _lio_39 cdef double _lio_4 cdef double _lio_40 cdef double _lio_41 cdef double _lio_42 cdef double _lio_43 cdef double _lio_44 cdef double _lio_45 cdef double _lio_46 cdef double _lio_47 cdef double _lio_48 cdef double _lio_49 cdef double _lio_5 cdef double _lio_50 cdef double _lio_51 cdef double _lio_52 cdef double _lio_53 cdef double _lio_54 cdef double _lio_55 cdef double _lio_56 cdef double _lio_57 cdef double _lio_58 cdef double _lio_59 cdef double _lio_6 cdef double _lio_60 cdef double _lio_61 cdef double _lio_62 cdef double _lio_63 cdef double _lio_64 cdef double _lio_65 cdef double _lio_66 cdef double _lio_67 cdef double _lio_68 cdef double _lio_69 cdef double _lio_7 cdef double _lio_70 cdef double _lio_71 cdef double _lio_72 cdef double _lio_73 cdef double _lio_74 cdef double _lio_75 cdef double _lio_76 cdef double _lio_77 cdef double _lio_78 cdef double _lio_79 cdef double _lio_8 cdef double _lio_80 cdef double _lio_81 cdef double _lio_82 cdef double _lio_83 cdef double _lio_9 cdef double _m cdef double _n cdef double _v if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:15:21,634 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name EC_inh_stateupdater_codeobject 2021-11-05 15:15:21,635 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "EC_inh_stateupdate" using Cython module "_cython_magic_1ca079d7308871beb739c23d92d1d98a" 2021-11-05 15:15:21,635 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140606219354272 on /home/nikos/.cython/brian_extensions/_cython_magic_1ca079d7308871beb739c23d92d1d98a.lock 2021-11-05 15:15:21,635 DEBUG brian2.utils.filelock: Lock 140606219354272 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_1ca079d7308871beb739c23d92d1d98a.lock 2021-11-05 15:15:23,720 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140606219354272 on /home/nikos/.cython/brian_extensions/_cython_magic_1ca079d7308871beb739c23d92d1d98a.lock 2021-11-05 15:15:23,720 DEBUG brian2.utils.filelock: Lock 140606219354272 released on /home/nikos/.cython/brian_extensions/_cython_magic_1ca079d7308871beb739c23d92d1d98a.lock 2021-11-05 15:15:23,761 DEBUG brian2.stateupdaters.base.method_choice: Group EC_pyCAN: using numerical integration method exponential_euler (took 0.04s) 2021-11-05 15:15:23,762 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=EC_pyCAN, template name=stateupdate) for abstract code: not_refractory = timestep(t - lastspike, dt) >= timestep(0.003000, dt) _BA_Ca_i = -200*ms*(1.2e-6*mole/(metre**3*ms) + 0.000621832540496844*hCaL*mCaL**2*mV*mole*siemens*size/(cm**4*coulomb*umetre) - 5.1819378374737e-6*hCaL*mCaL**2*mole*siemens*size*v/(cm**4*coulomb*umetre)) _Ca_i = -_BA_Ca_i + (Ca_i + _BA_Ca_i)*exp(-dt/(200*ms)) _Cl = Cl*exp(-dt/tau_Cl) _BA_ge = -1.0*he _ge = -_BA_ge + (_BA_ge + ge)*exp(-3.33333333333333*dt/ms) _BA_ge_ext = -1.0*he_ext _ge_ext = -_BA_ge_ext + (_BA_ge_ext + ge_ext)*exp(-3.33333333333333*dt/ms) _BA_ge_hipp = -1.0*he_hipp _ge_hipp = -_BA_ge_hipp + (_BA_ge_hipp + ge_hipp)*exp(-3.33333333333333*dt/ms) _BA_gi = -1.0*hi _gi = -_BA_gi + (_BA_gi + gi)*exp(-1.0*dt/ms) _BA_glu = -1 _glu = -_BA_glu + (_BA_glu + glu)*exp(-dt/(3*second)) _BA_h = 0.128*exp(-19/9)*exp(-v/(18*mV))/(ms*(-4.0/(ms + ms*exp(-3)*exp(-v/(5*mV))) - 0.128*exp(-19/9)/(ms*exp(v/mV)**(1/18)))) _h = -_BA_h + (_BA_h + h)*exp(dt*(-4.0/(ms + ms*exp(-3)*exp(-v/(5*mV))) - 0.128*exp(-19/9)/(ms*exp(v/mV)**(1/18)))) _BA_hCaL = 0.000457*exp(-13/50)*exp(-v/(50*mV))/(ms*(-0.0065/(1.0*ms + ms*exp(-15/28)*exp(-v/(28*mV))) - 0.000457*exp(-13/50)/(ms*exp(v/mV)**(1/50)))) _hCaL = -_BA_hCaL + (_BA_hCaL + hCaL)*exp(dt*(-0.0065/(1.0*ms + ms*exp(-15/28)*exp(-v/(28*mV))) - 0.000457*exp(-13/50)/(ms*exp(v/mV)**(1/50)))) _he = he*exp(-dt/(5*ms)) _he_ext = he_ext*exp(-dt/(5*ms)) _he_hipp = he_hipp*exp(-dt/(5*ms)) _hi = hi*exp(-dt/(10*ms)) _BA_m = (-13.44*mV/(-1.0*mV*ms + mV*ms*exp(-21/2)*exp(-v/(4*mV))) - 0.32*v/(-1.0*mV*ms + mV*ms*exp(-21/2)*exp(-v/(4*mV))))/(-4.2*mV/(mV*ms*exp(3)*exp(v/(5*mV)) - 1.0*mV*ms) + 13.44*mV/(-1.0*mV*ms + mV*ms*exp(-21/2)*exp(-v/(4*mV))) - 0.28*v/(mV*ms*exp(3)*exp(v/(5*mV)) - 1.0*mV*ms) + 0.32*v/(-1.0*mV*ms + mV*ms*exp(-21/2)*exp(-v/(4*mV)))) _m = -_BA_m + (_BA_m + m)*exp(dt*(-4.2*mV/(mV*ms*exp(3)*exp(v/(5*mV)) - 1.0*mV*ms) + 13.44*mV/(-1.0*mV*ms + mV*ms*exp(-21/2)*exp(-v/(4*mV))) - 0.28*v/(mV*ms*exp(3)*exp(v/(5*mV)) - 1.0*mV*ms) + 0.32*v/(-1.0*mV*ms + mV*ms*exp(-21/2)*exp(-v/(4*mV))))) _BA_mCAN = (2979543.50191749*Ca_i**4*metre**12/(800.0*Ca_i**2*metre**6*mole**2*ms + 0.0002*mole**4*ms) + 0.744885875479373*Ca_i**2*metre**6/(800.0*Ca_i**2*metre**6*ms + 0.0002*mole**2*ms))/(-3724.42937739686*Ca_i**2*metre**6/(mole**2*ms) - 0.000931107344349216/ms) _mCAN = -_BA_mCAN + (_BA_mCAN + mCAN)*exp(dt*(-3724.42937739686*Ca_i**2*metre**6/(mole**2*ms) - 0.000931107344349216/ms)) _BA_mCaL = (-1.485*mV/(-1.0*mV*ms + 0.000820773673798214*mV*ms*exp(-0.263157894736842*v/mV)) - 0.055*v/(-1.0*mV*ms + 0.000820773673798214*mV*ms*exp(-0.263157894736842*v/mV)))/(1.485*mV/(-1.0*mV*ms + 0.000820773673798214*mV*ms*exp(-0.263157894736842*v/mV)) + 0.055*v/(-1.0*mV*ms + 0.000820773673798214*mV*ms*exp(-0.263157894736842*v/mV)) - 0.94*exp(-75/17)/(ms*exp(v/mV)**(1/17))) _mCaL = -_BA_mCaL + (_BA_mCaL + mCaL)*exp(dt*(1.485*mV/(-1.0*mV*ms + 0.000820773673798214*mV*ms*exp(-0.263157894736842*v/mV)) + 0.055*v/(-1.0*mV*ms + 0.000820773673798214*mV*ms*exp(-0.263157894736842*v/mV)) - 0.94*exp(-75/17)/(ms*exp(v/mV)**(1/17)))) _BA_n = (-1.28*mV/(-1.0*mV*ms + mV*ms*exp(-8)*exp(-v/(5*mV))) - 0.032*v/(-1.0*mV*ms + mV*ms*exp(-8)*exp(-v/(5*mV))))/(1.28*mV/(-1.0*mV*ms + mV*ms*exp(-8)*exp(-v/(5*mV))) + 0.032*v/(-1.0*mV*ms + mV*ms*exp(-8)*exp(-v/(5*mV))) - 0.5*exp(-9/8)/(ms*exp(v/mV)**(1/40))) _n = -_BA_n + (_BA_n + n)*exp(dt*(1.28*mV/(-1.0*mV*ms + mV*ms*exp(-8)*exp(-v/(5*mV))) + 0.032*v/(-1.0*mV*ms + mV*ms*exp(-8)*exp(-v/(5*mV))) - 0.5*exp(-9/8)/(ms*exp(v/mV)**(1/40)))) _BA_p = (0.001/(ms*exp(7/4)*exp(v/(20*mV)) + ms*exp(-7/4)*exp(-v/(20*mV))) + 0.0033*exp(7/4)*exp(v/(20*mV))/(ms + ms*exp(-7/2)*exp(-v/(10*mV))))/(-0.0033*exp(7/4)*exp(v/mV)**(1/20)/ms - exp(-7/4)/(1000*ms*exp(v/mV)**(1/20))) _p = -_BA_p + (_BA_p + p)*exp(dt*(-0.0033*exp(7/4)*exp(v/mV)**(1/20)/ms - exp(-7/4)/(1000*ms*exp(v/mV)**(1/20)))) _BA_v = (Ek*cm**2*gM*p/ufarad + 5*Ek*msiemens*n**4/ufarad + 1.5*I_exc*cm**2*int(z_soma < 100*scale)*int(z_soma > 0)/(size*ufarad) - 20*cm**2*gCAN*mCAN**2*mV/ufarad - 80*cm**2*gi*mV*int(Cl <= 0.5)/(size*ufarad) + cm**2*r*inputs_stim(t)/(size*ufarad) + 2500*h*m**3*mV*msiemens/ufarad + 0.012*hCaL*mCaL**2*mV*siemens/ufarad - 0.0007*mV*siemens/ufarad + noise)*(-cm**2*gCAN*mCAN**2/ufarad - cm**2*gM*p/ufarad - cm**2*ge/(size*ufarad) - cm**2*ge_ext/(size*ufarad) - cm**2*ge_hipp/(size*ufarad) - cm**2*gi*int(Cl <= 0.5)/(size*ufarad) - cm**2*gi*int(Cl > 0.5)/(size*ufarad) - 50*h*m**3*msiemens/ufarad - 0.0001*hCaL*mCaL**2*siemens/ufarad - 5*msiemens*n**4/ufarad - 1.0e-5*siemens/ufarad)**(-1) _v = -_BA_v + (_BA_v + v)*exp(dt*(-cm**2*gCAN*mCAN**2/ufarad - cm**2*gM*p/ufarad - cm**2*ge/(size*ufarad) - cm**2*ge_ext/(size*ufarad) - cm**2*ge_hipp/(size*ufarad) - cm**2*gi*int(Cl <= 0.5)/(size*ufarad) - cm**2*gi*int(Cl > 0.5)/(size*ufarad) - 50*h*m**3*msiemens/ufarad - 0.0001*hCaL*mCaL**2*siemens/ufarad - 5*msiemens*n**4/ufarad - 1.0e-5*siemens/ufarad)) Ca_i = _Ca_i Cl = _Cl ge = _ge ge_ext = _ge_ext ge_hipp = _ge_hipp gi = _gi glu = _glu h = _h hCaL = _hCaL he = _he he_ext = _he_ext he_hipp = _he_hipp hi = _hi m = _m mCAN = _mCAN mCaL = _mCaL n = _n p = _p v = _v 2021-11-05 15:15:23,777 DIAGNOSTIC brian2.devices.device: EC_pyCAN_stateupdater_codeobject abstract code: not_refractory = timestep(t - lastspike, dt) >= timestep(0.003000, dt) _BA_Ca_i = -200*ms*(1.2e-6*mole/(metre**3*ms) + 0.000621832540496844*hCaL*mCaL**2*mV*mole*siemens*size/(cm**4*coulomb*umetre) - 5.1819378374737e-6*hCaL*mCaL**2*mole*siemens*size*v/(cm**4*coulomb*umetre)) _Ca_i = -_BA_Ca_i + (Ca_i + _BA_Ca_i)*exp(-dt/(200*ms)) _Cl = Cl*exp(-dt/tau_Cl) _BA_ge = -1.0*he _ge = -_BA_ge + (_BA_ge + ge)*exp(-3.33333333333333*dt/ms) _BA_ge_ext = -1.0*he_ext _ge_ext = -_BA_ge_ext + (_BA_ge_ext + ge_ext)*exp(-3.33333333333333*dt/ms) _BA_ge_hipp = -1.0*he_hipp _ge_hipp = -_BA_ge_hipp + (_BA_ge_hipp + ge_hipp)*exp(-3.33333333333333*dt/ms) _BA_gi = -1.0*hi _gi = -_BA_gi + (_BA_gi + gi)*exp(-1.0*dt/ms) _BA_glu = -1 _glu = -_BA_glu + (_BA_glu + glu)*exp(-dt/(3*second)) _BA_h = 0.128*exp(-19/9)*exp(-v/(18*mV))/(ms*(-4.0/(ms + ms*exp(-3)*exp(-v/(5*mV))) - 0.128*exp(-19/9)/(ms*exp(v/mV)**(1/18)))) _h = -_BA_h + (_BA_h + h)*exp(dt*(-4.0/(ms + ms*exp(-3)*exp(-v/(5*mV))) - 0.128*exp(-19/9)/(ms*exp(v/mV)**(1/18)))) _BA_hCaL = 0.000457*exp(-13/50)*exp(-v/(50*mV))/(ms*(-0.0065/(1.0*ms + ms*exp(-15/28)*exp(-v/(28*mV))) - 0.000457*exp(-13/50)/(ms*exp(v/mV)**(1/50)))) _hCaL = -_BA_hCaL + (_BA_hCaL + hCaL)*exp(dt*(-0.0065/(1.0*ms + ms*exp(-15/28)*exp(-v/(28*mV))) - 0.000457*exp(-13/50)/(ms*exp(v/mV)**(1/50)))) _he = he*exp(-dt/(5*ms)) _he_ext = he_ext*exp(-dt/(5*ms)) _he_hipp = he_hipp*exp(-dt/(5*ms)) _hi = hi*exp(-dt/(10*ms)) _BA_m = (-13.44*mV/(-1.0*mV*ms + mV*ms*exp(-21/2)*exp(-v/(4*mV))) - 0.32*v/(-1.0*mV*ms + mV*ms*exp(-21/2)*exp(-v/(4*mV))))/(-4.2*mV/(mV*ms*exp(3)*exp(v/(5*mV)) - 1.0*mV*ms) + 13.44*mV/(-1.0*mV*ms + mV*ms*exp(-21/2)*exp(-v/(4*mV))) - 0.28*v/(mV*ms*exp(3)*exp(v/(5*mV)) - 1.0*mV*ms) + 0.32*v/(-1.0*mV*ms + mV*ms*exp(-21/2)*exp(-v/(4*mV)))) _m = -_BA_m + (_BA_m + m)*exp(dt*(-4.2*mV/(mV*ms*exp(3)*exp(v/(5*mV)) - 1.0*mV*ms) + 13.44*mV/(-1.0*mV*ms + mV*ms*exp(-21/2)*exp(-v/(4*mV))) - 0.28*v/(mV*ms*exp(3)*exp(v/(5*mV)) - 1.0*mV*ms) + 0.32*v/(-1.0*mV*ms + mV*ms*exp(-21/2)*exp(-v/(4*mV))))) _BA_mCAN = (2979543.50191749*Ca_i**4*metre**12/(800.0*Ca_i**2*metre**6*mole**2*ms + 0.0002*mole**4*ms) + 0.744885875479373*Ca_i**2*metre**6/(800.0*Ca_i**2*metre**6*ms + 0.0002*mole**2*ms))/(-3724.42937739686*Ca_i**2*metre**6/(mole**2*ms) - 0.000931107344349216/ms) _mCAN = -_BA_mCAN + (_BA_mCAN + mCAN)*exp(dt*(-3724.42937739686*Ca_i**2*metre**6/(mole**2*ms) - 0.000931107344349216/ms)) _BA_mCaL = (-1.485*mV/(-1.0*mV*ms + 0.000820773673798214*mV*ms*exp(-0.263157894736842*v/mV)) - 0.055*v/(-1.0*mV*ms + 0.000820773673798214*mV*ms*exp(-0.263157894736842*v/mV)))/(1.485*mV/(-1.0*mV*ms + 0.000820773673798214*mV*ms*exp(-0.263157894736842*v/mV)) + 0.055*v/(-1.0*mV*ms + 0.000820773673798214*mV*ms*exp(-0.263157894736842*v/mV)) - 0.94*exp(-75/17)/(ms*exp(v/mV)**(1/17))) _mCaL = -_BA_mCaL + (_BA_mCaL + mCaL)*exp(dt*(1.485*mV/(-1.0*mV*ms + 0.000820773673798214*mV*ms*exp(-0.263157894736842*v/mV)) + 0.055*v/(-1.0*mV*ms + 0.000820773673798214*mV*ms*exp(-0.263157894736842*v/mV)) - 0.94*exp(-75/17)/(ms*exp(v/mV)**(1/17)))) _BA_n = (-1.28*mV/(-1.0*mV*ms + mV*ms*exp(-8)*exp(-v/(5*mV))) - 0.032*v/(-1.0*mV*ms + mV*ms*exp(-8)*exp(-v/(5*mV))))/(1.28*mV/(-1.0*mV*ms + mV*ms*exp(-8)*exp(-v/(5*mV))) + 0.032*v/(-1.0*mV*ms + mV*ms*exp(-8)*exp(-v/(5*mV))) - 0.5*exp(-9/8)/(ms*exp(v/mV)**(1/40))) _n = -_BA_n + (_BA_n + n)*exp(dt*(1.28*mV/(-1.0*mV*ms + mV*ms*exp(-8)*exp(-v/(5*mV))) + 0.032*v/(-1.0*mV*ms + mV*ms*exp(-8)*exp(-v/(5*mV))) - 0.5*exp(-9/8)/(ms*exp(v/mV)**(1/40)))) _BA_p = (0.001/(ms*exp(7/4)*exp(v/(20*mV)) + ms*exp(-7/4)*exp(-v/(20*mV))) + 0.0033*exp(7/4)*exp(v/(20*mV))/(ms + ms*exp(-7/2)*exp(-v/(10*mV))))/(-0.0033*exp(7/4)*exp(v/mV)**(1/20)/ms - exp(-7/4)/(1000*ms*exp(v/mV)**(1/20))) _p = -_BA_p + (_BA_p + p)*exp(dt*(-0.0033*exp(7/4)*exp(v/mV)**(1/20)/ms - exp(-7/4)/(1000*ms*exp(v/mV)**(1/20)))) _BA_v = (Ek*cm**2*gM*p/ufarad + 5*Ek*msiemens*n**4/ufarad + 1.5*I_exc*cm**2*int(z_soma < 100*scale)*int(z_soma > 0)/(size*ufarad) - 20*cm**2*gCAN*mCAN**2*mV/ufarad - 80*cm**2*gi*mV*int(Cl <= 0.5)/(size*ufarad) + cm**2*r*inputs_stim(t)/(size*ufarad) + 2500*h*m**3*mV*msiemens/ufarad + 0.012*hCaL*mCaL**2*mV*siemens/ufarad - 0.0007*mV*siemens/ufarad + noise)*(-cm**2*gCAN*mCAN**2/ufarad - cm**2*gM*p/ufarad - cm**2*ge/(size*ufarad) - cm**2*ge_ext/(size*ufarad) - cm**2*ge_hipp/(size*ufarad) - cm**2*gi*int(Cl <= 0.5)/(size*ufarad) - cm**2*gi*int(Cl > 0.5)/(size*ufarad) - 50*h*m**3*msiemens/ufarad - 0.0001*hCaL*mCaL**2*siemens/ufarad - 5*msiemens*n**4/ufarad - 1.0e-5*siemens/ufarad)**(-1) _v = -_BA_v + (_BA_v + v)*exp(dt*(-cm**2*gCAN*mCAN**2/ufarad - cm**2*gM*p/ufarad - cm**2*ge/(size*ufarad) - cm**2*ge_ext/(size*ufarad) - cm**2*ge_hipp/(size*ufarad) - cm**2*gi*int(Cl <= 0.5)/(size*ufarad) - cm**2*gi*int(Cl > 0.5)/(size*ufarad) - 50*h*m**3*msiemens/ufarad - 0.0001*hCaL*mCaL**2*siemens/ufarad - 5*msiemens*n**4/ufarad - 1.0e-5*siemens/ufarad)) Ca_i = _Ca_i Cl = _Cl ge = _ge ge_ext = _ge_ext ge_hipp = _ge_hipp gi = _gi glu = _glu h = _h hCaL = _hCaL he = _he he_ext = _he_ext he_hipp = _he_hipp hi = _hi m = _m mCAN = _mCAN mCaL = _mCaL n = _n p = _p v = _v 2021-11-05 15:15:23,904 DIAGNOSTIC brian2.devices.device: EC_pyCAN_stateupdater_codeobject snippet (scalar): t = _array_defaultclock_t[0] dt = _array_defaultclock_dt[0] _BA_glu = - 1 _lio_1 = _timestep(0.003, dt) _lio_2 = (- 200.0) * ms _lio_3 = (1.2e-06 * mole) / ((metre ** 3) * ms) _lio_4 = (0.000621832540496844 * ((mV * mole) * siemens)) / (((cm ** 4) * coulomb) * umetre) _lio_5 = (5.1819378374737e-06 * (mole * siemens)) / (((cm ** 4) * coulomb) * umetre) _lio_6 = exp((0.005 * (- dt)) / ms) _lio_7 = exp((- dt) / tau_Cl) _lio_8 = exp(((- 3.33333333333333) * dt) / ms) _lio_9 = exp(((- 1.0) * dt) / ms) _lio_10 = - _BA_glu _lio_11 = exp((0.3333333333333333 * (- dt)) / second) _lio_12 = 0.015501226546218206 / ms _lio_13 = 0.05555555555555555 / mV _lio_14 = ms * 0.049787068367863944 _lio_15 = 0.2 / mV _lio_16 = 1.0 / mV _lio_17 = 0.00035237057471222975 / ms _lio_18 = 0.02 / mV _lio_19 = ms * 0.5852511043074123 _lio_20 = 0.03571428571428571 / mV _lio_21 = exp((0.2 * (- dt)) / ms) _lio_22 = exp((0.1 * (- dt)) / ms) _lio_23 = (- 13.44) * mV _lio_24 = ((- 1.0) * mV) * ms _lio_25 = (mV * ms) * 2.7536449349747158e-05 _lio_26 = 0.25 / mV _lio_27 = (- 4.2) * mV _lio_28 = 0.0 - (mV * ms) _lio_29 = (mV * ms) * 20.085536923187668 _lio_30 = 13.44 * mV _lio_31 = 2979543.50191749 * (metre ** 12) _lio_32 = 0.0002 * ((mole ** 4) * ms) _lio_33 = 800.0 * (((metre ** 6) * (mole ** 2)) * ms) _lio_34 = 0.744885875479373 * (metre ** 6) _lio_35 = 0.0002 * ((mole ** 2) * ms) _lio_36 = 800.0 * ((metre ** 6) * ms) _lio_37 = 0.0 - (0.000931107344349216 / ms) _lio_38 = ((- 3724.42937739686) * (metre ** 6)) / ((mole ** 2) * ms) _lio_39 = (- 1.485) * mV _lio_40 = 0.000820773673798214 * (mV * ms) _lio_41 = (- 0.263157894736842) / mV _lio_42 = 1.485 * mV _lio_43 = 0.011405722114984784 / ms _lio_44 = (- 1.28) * mV _lio_45 = (mV * ms) * 0.00033546262790251185 _lio_46 = 1.28 * mV _lio_47 = 0.16232623367917487 / ms _lio_48 = ms * 5.754602676005731 _lio_49 = 0.05 / mV _lio_50 = ms * 0.17377394345044514 _lio_51 = ms * 0.0301973834223185 _lio_52 = 0.1 / mV _lio_53 = (- 0.018990188830818912) / ms _lio_54 = 0.00017377394345044513 / ms _lio_55 = 0.0 - ((0.0007 * (mV * siemens)) / ufarad) _lio_56 = ((Ek * (cm ** 2)) * gM) / ufarad _lio_57 = (5.0 * (Ek * msiemens)) / ufarad _lio_58 = (1.5 * (cm ** 2)) / ufarad _lio_59 = 100.0 * scale _lio_60 = ((cm ** 2) * _timedarray(t)) / ufarad _lio_61 = (2500.0 * (mV * msiemens)) / ufarad _lio_62 = (0.012 * (mV * siemens)) / ufarad _lio_63 = (20.0 * (((cm ** 2) * gCAN) * mV)) / ufarad _lio_64 = (80.0 * ((cm ** 2) * mV)) / ufarad _lio_65 = 0.0 - ((1e-05 * siemens) / ufarad) _lio_66 = ((- (cm ** 2)) * gCAN) / ufarad _lio_67 = ((cm ** 2) * gM) / ufarad _lio_68 = (cm ** 2) / ufarad _lio_69 = (50.0 * msiemens) / ufarad _lio_70 = (0.0001 * siemens) / ufarad _lio_71 = (5.0 * msiemens) / ufarad 2021-11-05 15:15:23,904 DIAGNOSTIC brian2.devices.device: EC_pyCAN_stateupdater_codeobject snippet (vector): gi = _array_EC_pyCAN_gi[_idx] noise = _array_EC_pyCAN_noise[_idx] r = _array_EC_pyCAN_r[_idx] Cl = _array_EC_pyCAN_Cl[_idx] ___I_exc_neurongroup_rhythm_pos_neurongroup_coherence_neurongroup_y = _array_neurongroup_y[0] mCaL = _array_EC_pyCAN_mCaL[_idx] lastspike = _array_EC_pyCAN_lastspike[_idx] Ca_i = _array_EC_pyCAN_Ca_i[_idx] mCAN = _array_EC_pyCAN_mCAN[_idx] v = _array_EC_pyCAN_v[_idx] p = _array_EC_pyCAN_p[_idx] size = _array_EC_pyCAN_size[_idx] ge_hipp = _array_EC_pyCAN_ge_hipp[_idx] m = _array_EC_pyCAN_m[_idx] ___I_exc_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_x = _array_neurongroup_x[0] glu = _array_EC_pyCAN_glu[_idx] h = _array_EC_pyCAN_h[_idx] n = _array_EC_pyCAN_n[_idx] he = _array_EC_pyCAN_he[_idx] hi = _array_EC_pyCAN_hi[_idx] ___I_exc_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_y = _array_neurongroup_y[0] ___I_exc_neurongroup_rhythm_pos_neurongroup_coherence_neurongroup_x = _array_neurongroup_x[0] ge = _array_EC_pyCAN_ge[_idx] he_hipp = _array_EC_pyCAN_he_hipp[_idx] ge_ext = _array_EC_pyCAN_ge_ext[_idx] z_soma = _array_EC_pyCAN_z_soma[_idx] hCaL = _array_EC_pyCAN_hCaL[_idx] he_ext = _array_EC_pyCAN_he_ext[_idx] not_refractory = _timestep(t - lastspike, dt) >= _lio_1 _BA_Ca_i = _lio_2 * ((_lio_3 + (_lio_4 * ((hCaL * (mCaL ** 2)) * size))) - (_lio_5 * (((hCaL * (mCaL ** 2)) * size) * v))) _Ca_i = (- _BA_Ca_i) + (_lio_6 * (Ca_i + _BA_Ca_i)) _Cl = _lio_7 * Cl _BA_ge = (- 1.0) * he _ge = (- _BA_ge) + (_lio_8 * (_BA_ge + ge)) _BA_ge_ext = (- 1.0) * he_ext _ge_ext = (- _BA_ge_ext) + (_lio_8 * (_BA_ge_ext + ge_ext)) _BA_ge_hipp = (- 1.0) * he_hipp _ge_hipp = (- _BA_ge_hipp) + (_lio_8 * (_BA_ge_hipp + ge_hipp)) _BA_gi = (- 1.0) * hi _gi = (- _BA_gi) + (_lio_9 * (_BA_gi + gi)) _glu = _lio_10 + (_lio_11 * (_BA_glu + glu)) _BA_h = (_lio_12 * exp(_lio_13 * (- v))) / (((- 4.0) / (ms + (_lio_14 * exp(_lio_15 * (- v))))) - (_lio_12 / (exp(_lio_16 * v) ** 0.05555555555555555))) _h = (- _BA_h) + ((_BA_h + h) * exp(dt * (((- 4.0) / (ms + (_lio_14 * exp(_lio_15 * (- v))))) - (_lio_12 / (exp(_lio_16 * v) ** 0.05555555555555555))))) _BA_hCaL = (_lio_17 * exp(_lio_18 * (- v))) / (((- 0.0065) / (ms + (_lio_19 * exp(_lio_20 * (- v))))) - (_lio_17 / (exp(_lio_16 * v) ** 0.02))) _hCaL = (- _BA_hCaL) + ((_BA_hCaL + hCaL) * exp(dt * (((- 0.0065) / (ms + (_lio_19 * exp(_lio_20 * (- v))))) - (_lio_17 / (exp(_lio_16 * v) ** 0.02))))) _he = _lio_21 * he _he_ext = _lio_21 * he_ext _he_hipp = _lio_21 * he_hipp _hi = _lio_22 * hi _BA_m = ((_lio_23 / (_lio_24 + (_lio_25 * exp(_lio_26 * (- v))))) - ((0.32 * v) / (_lio_24 + (_lio_25 * exp(_lio_26 * (- v)))))) / ((((_lio_27 / (_lio_28 + (_lio_29 * exp(_lio_15 * v)))) + (_lio_30 / (_lio_24 + (_lio_25 * exp(_lio_26 * (- v)))))) + ((0.32 * v) / (_lio_24 + (_lio_25 * exp(_lio_26 * (- v)))))) - ((0.28 * v) / (_lio_28 + (_lio_29 * exp(_lio_15 * v))))) _m = (- _BA_m) + ((_BA_m + m) * exp(dt * ((((_lio_27 / (_lio_28 + (_lio_29 * exp(_lio_15 * v)))) + (_lio_30 / (_lio_24 + (_lio_25 * exp(_lio_26 * (- v)))))) + ((0.32 * v) / (_lio_24 + (_lio_25 * exp(_lio_26 * (- v)))))) - ((0.28 * v) / (_lio_28 + (_lio_29 * exp(_lio_15 * v))))))) _BA_mCAN = (((_lio_31 * (Ca_i ** 4)) / (_lio_32 + (_lio_33 * (Ca_i ** 2)))) + ((_lio_34 * (Ca_i ** 2)) / (_lio_35 + (_lio_36 * (Ca_i ** 2))))) / (_lio_37 + (_lio_38 * (Ca_i ** 2))) _mCAN = (- _BA_mCAN) + ((_BA_mCAN + mCAN) * exp(dt * (_lio_37 + (_lio_38 * (Ca_i ** 2))))) _BA_mCaL = ((_lio_39 / (_lio_24 + (_lio_40 * exp(_lio_41 * v)))) - ((0.055 * v) / (_lio_24 + (_lio_40 * exp(_lio_41 * v))))) / (((_lio_42 / (_lio_24 + (_lio_40 * exp(_lio_41 * v)))) + ((0.055 * v) / (_lio_24 + (_lio_40 * exp(_lio_41 * v))))) - (_lio_43 / (exp(_lio_16 * v) ** 0.058823529411764705))) _mCaL = (- _BA_mCaL) + ((_BA_mCaL + mCaL) * exp(dt * (((_lio_42 / (_lio_24 + (_lio_40 * exp(_lio_41 * v)))) + ((0.055 * v) / (_lio_24 + (_lio_40 * exp(_lio_41 * v))))) - (_lio_43 / (exp(_lio_16 * v) ** 0.058823529411764705))))) _BA_n = ((_lio_44 / (_lio_24 + (_lio_45 * exp(_lio_15 * (- v))))) - ((0.032 * v) / (_lio_24 + (_lio_45 * exp(_lio_15 * (- v)))))) / (((_lio_46 / (_lio_24 + (_lio_45 * exp(_lio_15 * (- v))))) + ((0.032 * v) / (_lio_24 + (_lio_45 * exp(_lio_15 * (- v)))))) - (_lio_47 / (exp(_lio_16 * v) ** 0.025))) _n = (- _BA_n) + ((_BA_n + n) * exp(dt * (((_lio_46 / (_lio_24 + (_lio_45 * exp(_lio_15 * (- v))))) + ((0.032 * v) / (_lio_24 + (_lio_45 * exp(_lio_15 * (- v)))))) - (_lio_47 / (exp(_lio_16 * v) ** 0.025))))) _BA_p = ((0.001 / ((_lio_48 * exp(_lio_49 * v)) + (_lio_50 * exp(_lio_49 * (- v))))) + ((0.018990188830818912 * exp(_lio_49 * v)) / (ms + (_lio_51 * exp(_lio_52 * (- v)))))) / ((_lio_53 * (exp(_lio_16 * v) ** 0.05)) - (_lio_54 / (exp(_lio_16 * v) ** 0.05))) _p = (- _BA_p) + ((_BA_p + p) * exp(dt * ((_lio_53 * (exp(_lio_16 * v) ** 0.05)) - (_lio_54 / (exp(_lio_16 * v) ** 0.05))))) __I_exc_neurongroup_rhythm_pos_neurongroup_coherence = sqrt((___I_exc_neurongroup_rhythm_pos_neurongroup_coherence_neurongroup_x ** 2) + (___I_exc_neurongroup_rhythm_pos_neurongroup_coherence_neurongroup_y ** 2)) __I_exc_neurongroup_rhythm_pos_neurongroup_phase = (atan(___I_exc_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_y / ___I_exc_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_x) + (pi * int_((___I_exc_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_x < 0) and (___I_exc_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_y > 0)))) - (pi * int_((___I_exc_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_x < 0) and (___I_exc_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_y < 0))) _I_exc_neurongroup_rhythm_pos = 0.5 * (__I_exc_neurongroup_rhythm_pos_neurongroup_coherence * (1.0 + sin(__I_exc_neurongroup_rhythm_pos_neurongroup_phase))) I_exc = nA * _I_exc_neurongroup_rhythm_pos _BA_v = ((_lio_55 + (((((((_lio_56 * p) + (_lio_57 * (n ** 4))) + ((_lio_58 * ((I_exc * int_(z_soma < _lio_59)) * int_(z_soma > 0))) / size)) + ((_lio_60 * r) / size)) + (_lio_61 * (h * (m ** 3)))) + (_lio_62 * (hCaL * (mCaL ** 2)))) + noise)) - ((_lio_63 * (mCAN ** 2)) + ((_lio_64 * (gi * int_(Cl <= 0.5))) / size))) * (((_lio_65 + (_lio_66 * (mCAN ** 2))) - (((((((((_lio_67 * p) + ((_lio_68 * ge) / size)) + ((_lio_68 * ge_ext) / size)) + ((_lio_68 * ge_hipp) / size)) + ((_lio_68 * (gi * int_(Cl <= 0.5))) / size)) + ((_lio_68 * (gi * int_(Cl > 0.5))) / size)) + (_lio_69 * (h * (m ** 3)))) + (_lio_70 * (hCaL * (mCaL ** 2)))) + (_lio_71 * (n ** 4)))) ** (- 1)) _v = (- _BA_v) + ((_BA_v + v) * exp(dt * ((_lio_65 + (_lio_66 * (mCAN ** 2))) - (((((((((_lio_67 * p) + ((_lio_68 * ge) / size)) + ((_lio_68 * ge_ext) / size)) + ((_lio_68 * ge_hipp) / size)) + ((_lio_68 * (gi * int_(Cl <= 0.5))) / size)) + ((_lio_68 * (gi * int_(Cl > 0.5))) / size)) + (_lio_69 * (h * (m ** 3)))) + (_lio_70 * (hCaL * (mCaL ** 2)))) + (_lio_71 * (n ** 4)))))) Ca_i = _Ca_i Cl = _Cl ge = _ge ge_ext = _ge_ext ge_hipp = _ge_hipp gi = _gi glu = _glu h = _h hCaL = _hCaL he = _he he_ext = _he_ext he_hipp = _he_hipp hi = _hi m = _m mCAN = _mCAN mCaL = _mCaL n = _n p = _p v = _v _array_EC_pyCAN_gi[_idx] = gi _array_EC_pyCAN_not_refractory[_idx] = not_refractory _array_EC_pyCAN_Cl[_idx] = Cl _array_EC_pyCAN_mCaL[_idx] = mCaL _array_EC_pyCAN_Ca_i[_idx] = Ca_i _array_EC_pyCAN_mCAN[_idx] = mCAN _array_EC_pyCAN_v[_idx] = v _array_EC_pyCAN_p[_idx] = p _array_EC_pyCAN_ge_hipp[_idx] = ge_hipp _array_EC_pyCAN_m[_idx] = m _array_EC_pyCAN_glu[_idx] = glu _array_EC_pyCAN_h[_idx] = h _array_EC_pyCAN_n[_idx] = n _array_EC_pyCAN_he[_idx] = he _array_EC_pyCAN_hi[_idx] = hi _array_EC_pyCAN_ge[_idx] = ge _array_EC_pyCAN_he_hipp[_idx] = he_hipp _array_EC_pyCAN_ge_ext[_idx] = ge_ext _array_EC_pyCAN_hCaL[_idx] = hCaL _array_EC_pyCAN_he_ext[_idx] = he_ext 2021-11-05 15:15:23,905 DIAGNOSTIC brian2.devices.device: EC_pyCAN_stateupdater_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code cdef double *_namespace_timedarray_values cdef double _timedarray(const double t): global _namespace_timedarray_values cdef double epsilon = 0.001000000000000000 / 128 cdef int i = (int)((t/epsilon + 0.5)/128) if i < 0: i = 0 if i >= 2001: i = 2001 - 1 return _namespace_timedarray_values[i] cdef int64_t _timestep(double t, double dt): return ((t + 1e-3*dt)/dt) # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var_Ca_i = _namespace["_var_Ca_i"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_Ca_i = _namespace['_array_EC_pyCAN_Ca_i'] cdef double * _array_EC_pyCAN_Ca_i = _buf__array_EC_pyCAN_Ca_i.data cdef size_t _num_array_EC_pyCAN_Ca_i = len(_namespace['_array_EC_pyCAN_Ca_i']) cdef double Ca_i _var_Cl = _namespace["_var_Cl"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_Cl = _namespace['_array_EC_pyCAN_Cl'] cdef double * _array_EC_pyCAN_Cl = _buf__array_EC_pyCAN_Cl.data cdef size_t _num_array_EC_pyCAN_Cl = len(_namespace['_array_EC_pyCAN_Cl']) cdef double Cl _var_Ek = _namespace["_var_Ek"] cdef double Ek = _namespace["Ek"] cdef double I_exc _var_N = _namespace["_var_N"] cdef int64_t N = _namespace["N"] cdef double _I_exc_neurongroup_rhythm_pos cdef double __I_exc_neurongroup_rhythm_pos_neurongroup_coherence cdef double __I_exc_neurongroup_rhythm_pos_neurongroup_phase _var____I_exc_neurongroup_rhythm_pos_neurongroup_coherence_neurongroup_x = _namespace["_var____I_exc_neurongroup_rhythm_pos_neurongroup_coherence_neurongroup_x"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_neurongroup_x = _namespace['_array_neurongroup_x'] cdef double * _array_neurongroup_x = _buf__array_neurongroup_x.data cdef size_t _num_array_neurongroup_x = len(_namespace['_array_neurongroup_x']) cdef double ___I_exc_neurongroup_rhythm_pos_neurongroup_coherence_neurongroup_x _var____I_exc_neurongroup_rhythm_pos_neurongroup_coherence_neurongroup_y = _namespace["_var____I_exc_neurongroup_rhythm_pos_neurongroup_coherence_neurongroup_y"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_neurongroup_y = _namespace['_array_neurongroup_y'] cdef double * _array_neurongroup_y = _buf__array_neurongroup_y.data cdef size_t _num_array_neurongroup_y = len(_namespace['_array_neurongroup_y']) cdef double ___I_exc_neurongroup_rhythm_pos_neurongroup_coherence_neurongroup_y _var____I_exc_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_x = _namespace["_var____I_exc_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_x"] _var____I_exc_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_y = _namespace["_var____I_exc_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_y"] _var_cm = _namespace["_var_cm"] cdef double cm = _namespace["cm"] _var_coulomb = _namespace["_var_coulomb"] cdef double coulomb = _namespace["coulomb"] _var_dt = _namespace["_var_dt"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_dt = _namespace['_array_defaultclock_dt'] cdef double * _array_defaultclock_dt = _buf__array_defaultclock_dt.data cdef double dt = _namespace["dt"] _var_gCAN = _namespace["_var_gCAN"] cdef double gCAN = _namespace["gCAN"] _var_gM = _namespace["_var_gM"] cdef double gM = _namespace["gM"] _var_ge = _namespace["_var_ge"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_ge = _namespace['_array_EC_pyCAN_ge'] cdef double * _array_EC_pyCAN_ge = _buf__array_EC_pyCAN_ge.data cdef size_t _num_array_EC_pyCAN_ge = len(_namespace['_array_EC_pyCAN_ge']) cdef double ge _var_ge_ext = _namespace["_var_ge_ext"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_ge_ext = _namespace['_array_EC_pyCAN_ge_ext'] cdef double * _array_EC_pyCAN_ge_ext = _buf__array_EC_pyCAN_ge_ext.data cdef size_t _num_array_EC_pyCAN_ge_ext = len(_namespace['_array_EC_pyCAN_ge_ext']) cdef double ge_ext _var_ge_hipp = _namespace["_var_ge_hipp"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_ge_hipp = _namespace['_array_EC_pyCAN_ge_hipp'] cdef double * _array_EC_pyCAN_ge_hipp = _buf__array_EC_pyCAN_ge_hipp.data cdef size_t _num_array_EC_pyCAN_ge_hipp = len(_namespace['_array_EC_pyCAN_ge_hipp']) cdef double ge_hipp _var_gi = _namespace["_var_gi"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_gi = _namespace['_array_EC_pyCAN_gi'] cdef double * _array_EC_pyCAN_gi = _buf__array_EC_pyCAN_gi.data cdef size_t _num_array_EC_pyCAN_gi = len(_namespace['_array_EC_pyCAN_gi']) cdef double gi _var_glu = _namespace["_var_glu"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_glu = _namespace['_array_EC_pyCAN_glu'] cdef double * _array_EC_pyCAN_glu = _buf__array_EC_pyCAN_glu.data cdef size_t _num_array_EC_pyCAN_glu = len(_namespace['_array_EC_pyCAN_glu']) cdef double glu _var_h = _namespace["_var_h"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_h = _namespace['_array_EC_pyCAN_h'] cdef double * _array_EC_pyCAN_h = _buf__array_EC_pyCAN_h.data cdef size_t _num_array_EC_pyCAN_h = len(_namespace['_array_EC_pyCAN_h']) cdef double h _var_hCaL = _namespace["_var_hCaL"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_hCaL = _namespace['_array_EC_pyCAN_hCaL'] cdef double * _array_EC_pyCAN_hCaL = _buf__array_EC_pyCAN_hCaL.data cdef size_t _num_array_EC_pyCAN_hCaL = len(_namespace['_array_EC_pyCAN_hCaL']) cdef double hCaL _var_he = _namespace["_var_he"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_he = _namespace['_array_EC_pyCAN_he'] cdef double * _array_EC_pyCAN_he = _buf__array_EC_pyCAN_he.data cdef size_t _num_array_EC_pyCAN_he = len(_namespace['_array_EC_pyCAN_he']) cdef double he _var_he_ext = _namespace["_var_he_ext"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_he_ext = _namespace['_array_EC_pyCAN_he_ext'] cdef double * _array_EC_pyCAN_he_ext = _buf__array_EC_pyCAN_he_ext.data cdef size_t _num_array_EC_pyCAN_he_ext = len(_namespace['_array_EC_pyCAN_he_ext']) cdef double he_ext _var_he_hipp = _namespace["_var_he_hipp"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_he_hipp = _namespace['_array_EC_pyCAN_he_hipp'] cdef double * _array_EC_pyCAN_he_hipp = _buf__array_EC_pyCAN_he_hipp.data cdef size_t _num_array_EC_pyCAN_he_hipp = len(_namespace['_array_EC_pyCAN_he_hipp']) cdef double he_hipp _var_hi = _namespace["_var_hi"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_hi = _namespace['_array_EC_pyCAN_hi'] cdef double * _array_EC_pyCAN_hi = _buf__array_EC_pyCAN_hi.data cdef size_t _num_array_EC_pyCAN_hi = len(_namespace['_array_EC_pyCAN_hi']) cdef double hi # namespace for function inputs_stim global _namespace_timedarray_values global _namespace_num_timedarray_values cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__timedarray_values = _namespace['_timedarray_values'] _namespace_timedarray_values = _buf__timedarray_values.data _namespace_num_timedarray_values = len(_namespace['_timedarray_values']) _var_lastspike = _namespace["_var_lastspike"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_lastspike = _namespace['_array_EC_pyCAN_lastspike'] cdef double * _array_EC_pyCAN_lastspike = _buf__array_EC_pyCAN_lastspike.data cdef size_t _num_array_EC_pyCAN_lastspike = len(_namespace['_array_EC_pyCAN_lastspike']) cdef double lastspike _var_m = _namespace["_var_m"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_m = _namespace['_array_EC_pyCAN_m'] cdef double * _array_EC_pyCAN_m = _buf__array_EC_pyCAN_m.data cdef size_t _num_array_EC_pyCAN_m = len(_namespace['_array_EC_pyCAN_m']) cdef double m _var_mCAN = _namespace["_var_mCAN"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_mCAN = _namespace['_array_EC_pyCAN_mCAN'] cdef double * _array_EC_pyCAN_mCAN = _buf__array_EC_pyCAN_mCAN.data cdef size_t _num_array_EC_pyCAN_mCAN = len(_namespace['_array_EC_pyCAN_mCAN']) cdef double mCAN _var_mCaL = _namespace["_var_mCaL"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_mCaL = _namespace['_array_EC_pyCAN_mCaL'] cdef double * _array_EC_pyCAN_mCaL = _buf__array_EC_pyCAN_mCaL.data cdef size_t _num_array_EC_pyCAN_mCaL = len(_namespace['_array_EC_pyCAN_mCaL']) cdef double mCaL _var_mV = _namespace["_var_mV"] cdef double mV = _namespace["mV"] _var_metre = _namespace["_var_metre"] cdef double metre = _namespace["metre"] _var_mole = _namespace["_var_mole"] cdef double mole = _namespace["mole"] _var_ms = _namespace["_var_ms"] cdef double ms = _namespace["ms"] _var_msiemens = _namespace["_var_msiemens"] cdef double msiemens = _namespace["msiemens"] _var_n = _namespace["_var_n"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_n = _namespace['_array_EC_pyCAN_n'] cdef double * _array_EC_pyCAN_n = _buf__array_EC_pyCAN_n.data cdef size_t _num_array_EC_pyCAN_n = len(_namespace['_array_EC_pyCAN_n']) cdef double n _var_nA = _namespace["_var_nA"] cdef double nA = _namespace["nA"] _var_noise = _namespace["_var_noise"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_noise = _namespace['_array_EC_pyCAN_noise'] cdef double * _array_EC_pyCAN_noise = _buf__array_EC_pyCAN_noise.data cdef size_t _num_array_EC_pyCAN_noise = len(_namespace['_array_EC_pyCAN_noise']) cdef double noise _var_not_refractory = _namespace["_var_not_refractory"] cdef _numpy.ndarray[char, ndim=1, mode='c', cast=True] _buf__array_EC_pyCAN_not_refractory = _namespace['_array_EC_pyCAN_not_refractory'] cdef bool * _array_EC_pyCAN_not_refractory = _buf__array_EC_pyCAN_not_refractory.data cdef size_t _num_array_EC_pyCAN_not_refractory = len(_namespace['_array_EC_pyCAN_not_refractory']) cdef bool not_refractory _var_p = _namespace["_var_p"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_p = _namespace['_array_EC_pyCAN_p'] cdef double * _array_EC_pyCAN_p = _buf__array_EC_pyCAN_p.data cdef size_t _num_array_EC_pyCAN_p = len(_namespace['_array_EC_pyCAN_p']) cdef double p _var_pi = _namespace["_var_pi"] cdef double pi = _namespace["pi"] _var_r = _namespace["_var_r"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_r = _namespace['_array_EC_pyCAN_r'] cdef double * _array_EC_pyCAN_r = _buf__array_EC_pyCAN_r.data cdef size_t _num_array_EC_pyCAN_r = len(_namespace['_array_EC_pyCAN_r']) cdef double r _var_scale = _namespace["_var_scale"] cdef double scale = _namespace["scale"] _var_second = _namespace["_var_second"] cdef double second = _namespace["second"] _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] _var_size = _namespace["_var_size"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_size = _namespace['_array_EC_pyCAN_size'] cdef double * _array_EC_pyCAN_size = _buf__array_EC_pyCAN_size.data cdef size_t _num_array_EC_pyCAN_size = len(_namespace['_array_EC_pyCAN_size']) cdef double size _var_t = _namespace["_var_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double t _var_tau_Cl = _namespace["_var_tau_Cl"] cdef double tau_Cl = _namespace["tau_Cl"] _var_ufarad = _namespace["_var_ufarad"] cdef double ufarad = _namespace["ufarad"] _var_umetre = _namespace["_var_umetre"] cdef double umetre = _namespace["umetre"] _var_v = _namespace["_var_v"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_v = _namespace['_array_EC_pyCAN_v'] cdef double * _array_EC_pyCAN_v = _buf__array_EC_pyCAN_v.data cdef size_t _num_array_EC_pyCAN_v = len(_namespace['_array_EC_pyCAN_v']) cdef double v _var_z_soma = _namespace["_var_z_soma"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_z_soma = _namespace['_array_EC_pyCAN_z_soma'] cdef double * _array_EC_pyCAN_z_soma = _buf__array_EC_pyCAN_z_soma.data cdef size_t _num_array_EC_pyCAN_z_soma = len(_namespace['_array_EC_pyCAN_z_soma']) cdef double z_soma cdef double _BA_Ca_i cdef double _BA_ge cdef double _BA_ge_ext cdef double _BA_ge_hipp cdef double _BA_gi cdef int64_t _BA_glu cdef double _BA_h cdef double _BA_hCaL cdef double _BA_m cdef double _BA_mCAN cdef double _BA_mCaL cdef double _BA_n cdef double _BA_p cdef double _BA_v cdef double _Ca_i cdef double _Cl cdef double _ge cdef double _ge_ext cdef double _ge_hipp cdef double _gi cdef double _glu cdef double _h cdef double _hCaL cdef double _he cdef double _he_ext cdef double _he_hipp cdef double _hi cdef int64_t _lio_1 cdef int64_t _lio_10 cdef double _lio_11 cdef double _lio_12 cdef double _lio_13 cdef double _lio_14 cdef double _lio_15 cdef double _lio_16 cdef double _lio_17 cdef double _lio_18 cdef double _lio_19 cdef double _lio_2 cdef double _lio_20 cdef double _lio_21 cdef double _lio_22 cdef double _lio_23 cdef double _lio_24 cdef double _lio_25 cdef double _lio_26 cdef double _lio_27 cdef double _lio_28 cdef double _lio_29 cdef double _lio_3 cdef double _lio_30 cdef double _lio_31 cdef double _lio_32 cdef double _lio_33 cdef double _lio_34 cdef double _lio_35 cdef double _lio_36 cdef double _lio_37 cdef double _lio_38 cdef double _lio_39 cdef double _lio_4 cdef double _lio_40 cdef double _lio_41 cdef double _lio_42 cdef double _lio_43 cdef double _lio_44 cdef double _lio_45 cdef double _lio_46 cdef double _lio_47 cdef double _lio_48 cdef double _lio_49 cdef double _lio_5 cdef double _lio_50 cdef double _lio_51 cdef double _lio_52 cdef double _lio_53 cdef double _lio_54 cdef double _lio_55 cdef double _lio_56 cdef double _lio_57 cdef double _lio_58 cdef double _lio_59 cdef double _lio_6 cdef double _lio_60 cdef double _lio_61 cdef double _lio_62 cdef double _lio_63 cdef double _lio_64 cdef double _lio_65 cdef double _lio_66 cdef double _lio_67 cdef double _lio_68 cdef double _lio_69 cdef double _lio_7 cdef double _lio_70 cdef double _lio_71 cdef double _lio_8 cdef double _lio_9 cdef double _m cdef double _mCAN cdef double _mCaL cdef double _n cdef double _p cdef double _v if '_owner' in _namespace: _owner = _namespace['_owner'] # scalar code _vectorisation_idx = 1 t = _array_defaultclock_t[0] dt = _array_defaultclock_dt[0] _BA_glu = - 1 _lio_1 = _timestep(0.003, dt) _lio_2 = (- 200.0) * ms _lio_3 = (1.2e-06 * mole) / ((metre ** 3) * ms) _lio_4 = (0.000621832540496844 * ((mV * mole) * siemens)) / (((cm ** 4) * coulomb) * umetre) _lio_5 = (5.1819378374737e-06 * (mole * siemens)) / (((cm ** 4) * coulomb) * umetre) _lio_6 = exp((0.005 * (- dt)) / ms) _lio_7 = exp((- dt) / tau_Cl) _lio_8 = exp(((- 3.33333333333333) * dt) / ms) _lio_9 = exp(((- 1.0) * dt) / ms) _lio_10 = - _BA_glu _lio_11 = exp((0.3333333333333333 * (- dt)) / second) _lio_12 = 0.015501226546218206 / ms _lio_13 = 0.05555555555555555 / mV _lio_14 = ms * 0.049787068367863944 _lio_15 = 0.2 / mV _lio_16 = 1.0 / mV _lio_17 = 0.00035237057471222975 / ms _lio_18 = 0.02 / mV _lio_19 = ms * 0.5852511043074123 _lio_20 = 0.03571428571428571 / mV _lio_21 = exp((0.2 * (- dt)) / ms) _lio_22 = exp((0.1 * (- dt)) / ms) _lio_23 = (- 13.44) * mV _lio_24 = ((- 1.0) * mV) * ms _lio_25 = (mV * ms) * 2.7536449349747158e-05 _lio_26 = 0.25 / mV _lio_27 = (- 4.2) * mV _lio_28 = 0.0 - (mV * ms) _lio_29 = (mV * ms) * 20.085536923187668 _lio_30 = 13.44 * mV _lio_31 = 2979543.50191749 * (metre ** 12) _lio_32 = 0.0002 * ((mole ** 4) * ms) _lio_33 = 800.0 * (((metre ** 6) * (mole ** 2)) * ms) _lio_34 = 0.744885875479373 * (metre ** 6) _lio_35 = 0.0002 * ((mole ** 2) * ms) _lio_36 = 800.0 * ((metre ** 6) * ms) _lio_37 = 0.0 - (0.000931107344349216 / ms) _lio_38 = ((- 3724.42937739686) * (metre ** 6)) / ((mole ** 2) * ms) _lio_39 = (- 1.485) * mV _lio_40 = 0.000820773673798214 * (mV * ms) _lio_41 = (- 0.263157894736842) / mV _lio_42 = 1.485 * mV _lio_43 = 0.011405722114984784 / ms _lio_44 = (- 1.28) * mV _lio_45 = (mV * ms) * 0.00033546262790251185 _lio_46 = 1.28 * mV _lio_47 = 0.16232623367917487 / ms _lio_48 = ms * 5.754602676005731 _lio_49 = 0.05 / mV _lio_50 = ms * 0.17377394345044514 _lio_51 = ms * 0.0301973834223185 _lio_52 = 0.1 / mV _lio_53 = (- 0.018990188830818912) / ms _lio_54 = 0.00017377394345044513 / ms _lio_55 = 0.0 - ((0.0007 * (mV * siemens)) / ufarad) _lio_56 = ((Ek * (cm ** 2)) * gM) / ufarad _lio_57 = (5.0 * (Ek * msiemens)) / ufarad _lio_58 = (1.5 * (cm ** 2)) / ufarad _lio_59 = 100.0 * scale _lio_60 = ((cm ** 2) * _timedarray(t)) / ufarad _lio_61 = (2500.0 * (mV * msiemens)) / ufarad _lio_62 = (0.012 * (mV * siemens)) / ufarad _lio_63 = (20.0 * (((cm ** 2) * gCAN) * mV)) / ufarad _lio_64 = (80.0 * ((cm ** 2) * mV)) / ufarad _lio_65 = 0.0 - ((1e-05 * siemens) / ufarad) _lio_66 = ((- (cm ** 2)) * gCAN) / ufarad _lio_67 = ((cm ** 2) * gM) / ufarad _lio_68 = (cm ** 2) / ufarad _lio_69 = (50.0 * msiemens) / ufarad _lio_70 = (0.0001 * siemens) / ufarad _lio_71 = (5.0 * msiemens) / ufarad # vector code for _idx in range(N): _vectorisation_idx = _idx gi = _array_EC_pyCAN_gi[_idx] noise = _array_EC_pyCAN_noise[_idx] r = _array_EC_pyCAN_r[_idx] Cl = _array_EC_pyCAN_Cl[_idx] ___I_exc_neurongroup_rhythm_pos_neurongroup_coherence_neurongroup_y = _array_neurongroup_y[0] mCaL = _array_EC_pyCAN_mCaL[_idx] lastspike = _array_EC_pyCAN_lastspike[_idx] Ca_i = _array_EC_pyCAN_Ca_i[_idx] mCAN = _array_EC_pyCAN_mCAN[_idx] v = _array_EC_pyCAN_v[_idx] p = _array_EC_pyCAN_p[_idx] size = _array_EC_pyCAN_size[_idx] ge_hipp = _array_EC_pyCAN_ge_hipp[_idx] m = _array_EC_pyCAN_m[_idx] ___I_exc_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_x = _array_neurongroup_x[0] glu = _array_EC_pyCAN_glu[_idx] h = _array_EC_pyCAN_h[_idx] n = _array_EC_pyCAN_n[_idx] he = _array_EC_pyCAN_he[_idx] hi = _array_EC_pyCAN_hi[_idx] ___I_exc_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_y = _array_neurongroup_y[0] ___I_exc_neurongroup_rhythm_pos_neurongroup_coherence_neurongroup_x = _array_neurongroup_x[0] ge = _array_EC_pyCAN_ge[_idx] he_hipp = _array_EC_pyCAN_he_hipp[_idx] ge_ext = _array_EC_pyCAN_ge_ext[_idx] z_soma = _array_EC_pyCAN_z_soma[_idx] hCaL = _array_EC_pyCAN_hCaL[_idx] he_ext = _array_EC_pyCAN_he_ext[_idx] not_refractory = _timestep(t - lastspike, dt) >= _lio_1 _BA_Ca_i = _lio_2 * ((_lio_3 + (_lio_4 * ((hCaL * (mCaL ** 2)) * size))) - (_lio_5 * (((hCaL * (mCaL ** 2)) * size) * v))) _Ca_i = (- _BA_Ca_i) + (_lio_6 * (Ca_i + _BA_Ca_i)) _Cl = _lio_7 * Cl _BA_ge = (- 1.0) * he _ge = (- _BA_ge) + (_lio_8 * (_BA_ge + ge)) _BA_ge_ext = (- 1.0) * he_ext _ge_ext = (- _BA_ge_ext) + (_lio_8 * (_BA_ge_ext + ge_ext)) _BA_ge_hipp = (- 1.0) * he_hipp _ge_hipp = (- _BA_ge_hipp) + (_lio_8 * (_BA_ge_hipp + ge_hipp)) _BA_gi = (- 1.0) * hi _gi = (- _BA_gi) + (_lio_9 * (_BA_gi + gi)) _glu = _lio_10 + (_lio_11 * (_BA_glu + glu)) _BA_h = (_lio_12 * exp(_lio_13 * (- v))) / (((- 4.0) / (ms + (_lio_14 * exp(_lio_15 * (- v))))) - (_lio_12 / (exp(_lio_16 * v) ** 0.05555555555555555))) _h = (- _BA_h) + ((_BA_h + h) * exp(dt * (((- 4.0) / (ms + (_lio_14 * exp(_lio_15 * (- v))))) - (_lio_12 / (exp(_lio_16 * v) ** 0.05555555555555555))))) _BA_hCaL = (_lio_17 * exp(_lio_18 * (- v))) / (((- 0.0065) / (ms + (_lio_19 * exp(_lio_20 * (- v))))) - (_lio_17 / (exp(_lio_16 * v) ** 0.02))) _hCaL = (- _BA_hCaL) + ((_BA_hCaL + hCaL) * exp(dt * (((- 0.0065) / (ms + (_lio_19 * exp(_lio_20 * (- v))))) - (_lio_17 / (exp(_lio_16 * v) ** 0.02))))) _he = _lio_21 * he _he_ext = _lio_21 * he_ext _he_hipp = _lio_21 * he_hipp _hi = _lio_22 * hi _BA_m = ((_lio_23 / (_lio_24 + (_lio_25 * exp(_lio_26 * (- v))))) - ((0.32 * v) / (_lio_24 + (_lio_25 * exp(_lio_26 * (- v)))))) / ((((_lio_27 / (_lio_28 + (_lio_29 * exp(_lio_15 * v)))) + (_lio_30 / (_lio_24 + (_lio_25 * exp(_lio_26 * (- v)))))) + ((0.32 * v) / (_lio_24 + (_lio_25 * exp(_lio_26 * (- v)))))) - ((0.28 * v) / (_lio_28 + (_lio_29 * exp(_lio_15 * v))))) _m = (- _BA_m) + ((_BA_m + m) * exp(dt * ((((_lio_27 / (_lio_28 + (_lio_29 * exp(_lio_15 * v)))) + (_lio_30 / (_lio_24 + (_lio_25 * exp(_lio_26 * (- v)))))) + ((0.32 * v) / (_lio_24 + (_lio_25 * exp(_lio_26 * (- v)))))) - ((0.28 * v) / (_lio_28 + (_lio_29 * exp(_lio_15 * v))))))) _BA_mCAN = (((_lio_31 * (Ca_i ** 4)) / (_lio_32 + (_lio_33 * (Ca_i ** 2)))) + ((_lio_34 * (Ca_i ** 2)) / (_lio_35 + (_lio_36 * (Ca_i ** 2))))) / (_lio_37 + (_lio_38 * (Ca_i ** 2))) _mCAN = (- _BA_mCAN) + ((_BA_mCAN + mCAN) * exp(dt * (_lio_37 + (_lio_38 * (Ca_i ** 2))))) _BA_mCaL = ((_lio_39 / (_lio_24 + (_lio_40 * exp(_lio_41 * v)))) - ((0.055 * v) / (_lio_24 + (_lio_40 * exp(_lio_41 * v))))) / (((_lio_42 / (_lio_24 + (_lio_40 * exp(_lio_41 * v)))) + ((0.055 * v) / (_lio_24 + (_lio_40 * exp(_lio_41 * v))))) - (_lio_43 / (exp(_lio_16 * v) ** 0.058823529411764705))) _mCaL = (- _BA_mCaL) + ((_BA_mCaL + mCaL) * exp(dt * (((_lio_42 / (_lio_24 + (_lio_40 * exp(_lio_41 * v)))) + ((0.055 * v) / (_lio_24 + (_lio_40 * exp(_lio_41 * v))))) - (_lio_43 / (exp(_lio_16 * v) ** 0.058823529411764705))))) _BA_n = ((_lio_44 / (_lio_24 + (_lio_45 * exp(_lio_15 * (- v))))) - ((0.032 * v) / (_lio_24 + (_lio_45 * exp(_lio_15 * (- v)))))) / (((_lio_46 / (_lio_24 + (_lio_45 * exp(_lio_15 * (- v))))) + ((0.032 * v) / (_lio_24 + (_lio_45 * exp(_lio_15 * (- v)))))) - (_lio_47 / (exp(_lio_16 * v) ** 0.025))) _n = (- _BA_n) + ((_BA_n + n) * exp(dt * (((_lio_46 / (_lio_24 + (_lio_45 * exp(_lio_15 * (- v))))) + ((0.032 * v) / (_lio_24 + (_lio_45 * exp(_lio_15 * (- v)))))) - (_lio_47 / (exp(_lio_16 * v) ** 0.025))))) _BA_p = ((0.001 / ((_lio_48 * exp(_lio_49 * v)) + (_lio_50 * exp(_lio_49 * (- v))))) + ((0.018990188830818912 * exp(_lio_49 * v)) / (ms + (_lio_51 * exp(_lio_52 * (- v)))))) / ((_lio_53 * (exp(_lio_16 * v) ** 0.05)) - (_lio_54 / (exp(_lio_16 * v) ** 0.05))) _p = (- _BA_p) + ((_BA_p + p) * exp(dt * ((_lio_53 * (exp(_lio_16 * v) ** 0.05)) - (_lio_54 / (exp(_lio_16 * v) ** 0.05))))) __I_exc_neurongroup_rhythm_pos_neurongroup_coherence = sqrt((___I_exc_neurongroup_rhythm_pos_neurongroup_coherence_neurongroup_x ** 2) + (___I_exc_neurongroup_rhythm_pos_neurongroup_coherence_neurongroup_y ** 2)) __I_exc_neurongroup_rhythm_pos_neurongroup_phase = (atan(___I_exc_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_y / ___I_exc_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_x) + (pi * int_((___I_exc_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_x < 0) and (___I_exc_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_y > 0)))) - (pi * int_((___I_exc_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_x < 0) and (___I_exc_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_y < 0))) _I_exc_neurongroup_rhythm_pos = 0.5 * (__I_exc_neurongroup_rhythm_pos_neurongroup_coherence * (1.0 + sin(__I_exc_neurongroup_rhythm_pos_neurongroup_phase))) I_exc = nA * _I_exc_neurongroup_rhythm_pos _BA_v = ((_lio_55 + (((((((_lio_56 * p) + (_lio_57 * (n ** 4))) + ((_lio_58 * ((I_exc * int_(z_soma < _lio_59)) * int_(z_soma > 0))) / size)) + ((_lio_60 * r) / size)) + (_lio_61 * (h * (m ** 3)))) + (_lio_62 * (hCaL * (mCaL ** 2)))) + noise)) - ((_lio_63 * (mCAN ** 2)) + ((_lio_64 * (gi * int_(Cl <= 0.5))) / size))) * (((_lio_65 + (_lio_66 * (mCAN ** 2))) - (((((((((_lio_67 * p) + ((_lio_68 * ge) / size)) + ((_lio_68 * ge_ext) / size)) + ((_lio_68 * ge_hipp) / size)) + ((_lio_68 * (gi * int_(Cl <= 0.5))) / size)) + ((_lio_68 * (gi * int_(Cl > 0.5))) / size)) + (_lio_69 * (h * (m ** 3)))) + (_lio_70 * (hCaL * (mCaL ** 2)))) + (_lio_71 * (n ** 4)))) ** (- 1)) _v = (- _BA_v) + ((_BA_v + v) * exp(dt * ((_lio_65 + (_lio_66 * (mCAN ** 2))) - (((((((((_lio_67 * p) + ((_lio_68 * ge) / size)) + ((_lio_68 * ge_ext) / size)) + ((_lio_68 * ge_hipp) / size)) + ((_lio_68 * (gi * int_(Cl <= 0.5))) / size)) + ((_lio_68 * (gi * int_(Cl > 0.5))) / size)) + (_lio_69 * (h * (m ** 3)))) + (_lio_70 * (hCaL * (mCaL ** 2)))) + (_lio_71 * (n ** 4)))))) Ca_i = _Ca_i Cl = _Cl ge = _ge ge_ext = _ge_ext ge_hipp = _ge_hipp gi = _gi glu = _glu h = _h hCaL = _hCaL he = _he he_ext = _he_ext he_hipp = _he_hipp hi = _hi m = _m mCAN = _mCAN mCaL = _mCaL n = _n p = _p v = _v _array_EC_pyCAN_gi[_idx] = gi _array_EC_pyCAN_not_refractory[_idx] = not_refractory _array_EC_pyCAN_Cl[_idx] = Cl _array_EC_pyCAN_mCaL[_idx] = mCaL _array_EC_pyCAN_Ca_i[_idx] = Ca_i _array_EC_pyCAN_mCAN[_idx] = mCAN _array_EC_pyCAN_v[_idx] = v _array_EC_pyCAN_p[_idx] = p _array_EC_pyCAN_ge_hipp[_idx] = ge_hipp _array_EC_pyCAN_m[_idx] = m _array_EC_pyCAN_glu[_idx] = glu _array_EC_pyCAN_h[_idx] = h _array_EC_pyCAN_n[_idx] = n _array_EC_pyCAN_he[_idx] = he _array_EC_pyCAN_hi[_idx] = hi _array_EC_pyCAN_ge[_idx] = ge _array_EC_pyCAN_he_hipp[_idx] = he_hipp _array_EC_pyCAN_ge_ext[_idx] = ge_ext _array_EC_pyCAN_hCaL[_idx] = hCaL _array_EC_pyCAN_he_ext[_idx] = he_ext before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_Ca_i = _namespace["_var_Ca_i"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_Ca_i = _namespace['_array_EC_pyCAN_Ca_i'] cdef double * _array_EC_pyCAN_Ca_i = _buf__array_EC_pyCAN_Ca_i.data cdef size_t _num_array_EC_pyCAN_Ca_i = len(_namespace['_array_EC_pyCAN_Ca_i']) cdef double Ca_i _var_Cl = _namespace["_var_Cl"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_Cl = _namespace['_array_EC_pyCAN_Cl'] cdef double * _array_EC_pyCAN_Cl = _buf__array_EC_pyCAN_Cl.data cdef size_t _num_array_EC_pyCAN_Cl = len(_namespace['_array_EC_pyCAN_Cl']) cdef double Cl _var_Ek = _namespace["_var_Ek"] cdef double Ek = _namespace["Ek"] cdef double I_exc _var_N = _namespace["_var_N"] cdef int64_t N = _namespace["N"] cdef double _I_exc_neurongroup_rhythm_pos cdef double __I_exc_neurongroup_rhythm_pos_neurongroup_coherence cdef double __I_exc_neurongroup_rhythm_pos_neurongroup_phase _var____I_exc_neurongroup_rhythm_pos_neurongroup_coherence_neurongroup_x = _namespace["_var____I_exc_neurongroup_rhythm_pos_neurongroup_coherence_neurongroup_x"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_neurongroup_x = _namespace['_array_neurongroup_x'] cdef double * _array_neurongroup_x = _buf__array_neurongroup_x.data cdef size_t _num_array_neurongroup_x = len(_namespace['_array_neurongroup_x']) cdef double ___I_exc_neurongroup_rhythm_pos_neurongroup_coherence_neurongroup_x _var____I_exc_neurongroup_rhythm_pos_neurongroup_coherence_neurongroup_y = _namespace["_var____I_exc_neurongroup_rhythm_pos_neurongroup_coherence_neurongroup_y"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_neurongroup_y = _namespace['_array_neurongroup_y'] cdef double * _array_neurongroup_y = _buf__array_neurongroup_y.data cdef size_t _num_array_neurongroup_y = len(_namespace['_array_neurongroup_y']) cdef double ___I_exc_neurongroup_rhythm_pos_neurongroup_coherence_neurongroup_y _var____I_exc_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_x = _namespace["_var____I_exc_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_x"] _var____I_exc_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_y = _namespace["_var____I_exc_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_y"] _var_cm = _namespace["_var_cm"] cdef double cm = _namespace["cm"] _var_coulomb = _namespace["_var_coulomb"] cdef double coulomb = _namespace["coulomb"] _var_dt = _namespace["_var_dt"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_dt = _namespace['_array_defaultclock_dt'] cdef double * _array_defaultclock_dt = _buf__array_defaultclock_dt.data cdef double dt = _namespace["dt"] _var_gCAN = _namespace["_var_gCAN"] cdef double gCAN = _namespace["gCAN"] _var_gM = _namespace["_var_gM"] cdef double gM = _namespace["gM"] _var_ge = _namespace["_var_ge"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_ge = _namespace['_array_EC_pyCAN_ge'] cdef double * _array_EC_pyCAN_ge = _buf__array_EC_pyCAN_ge.data cdef size_t _num_array_EC_pyCAN_ge = len(_namespace['_array_EC_pyCAN_ge']) cdef double ge _var_ge_ext = _namespace["_var_ge_ext"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_ge_ext = _namespace['_array_EC_pyCAN_ge_ext'] cdef double * _array_EC_pyCAN_ge_ext = _buf__array_EC_pyCAN_ge_ext.data cdef size_t _num_array_EC_pyCAN_ge_ext = len(_namespace['_array_EC_pyCAN_ge_ext']) cdef double ge_ext _var_ge_hipp = _namespace["_var_ge_hipp"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_ge_hipp = _namespace['_array_EC_pyCAN_ge_hipp'] cdef double * _array_EC_pyCAN_ge_hipp = _buf__array_EC_pyCAN_ge_hipp.data cdef size_t _num_array_EC_pyCAN_ge_hipp = len(_namespace['_array_EC_pyCAN_ge_hipp']) cdef double ge_hipp _var_gi = _namespace["_var_gi"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_gi = _namespace['_array_EC_pyCAN_gi'] cdef double * _array_EC_pyCAN_gi = _buf__array_EC_pyCAN_gi.data cdef size_t _num_array_EC_pyCAN_gi = len(_namespace['_array_EC_pyCAN_gi']) cdef double gi _var_glu = _namespace["_var_glu"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_glu = _namespace['_array_EC_pyCAN_glu'] cdef double * _array_EC_pyCAN_glu = _buf__array_EC_pyCAN_glu.data cdef size_t _num_array_EC_pyCAN_glu = len(_namespace['_array_EC_pyCAN_glu']) cdef double glu _var_h = _namespace["_var_h"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_h = _namespace['_array_EC_pyCAN_h'] cdef double * _array_EC_pyCAN_h = _buf__array_EC_pyCAN_h.data cdef size_t _num_array_EC_pyCAN_h = len(_namespace['_array_EC_pyCAN_h']) cdef double h _var_hCaL = _namespace["_var_hCaL"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_hCaL = _namespace['_array_EC_pyCAN_hCaL'] cdef double * _array_EC_pyCAN_hCaL = _buf__array_EC_pyCAN_hCaL.data cdef size_t _num_array_EC_pyCAN_hCaL = len(_namespace['_array_EC_pyCAN_hCaL']) cdef double hCaL _var_he = _namespace["_var_he"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_he = _namespace['_array_EC_pyCAN_he'] cdef double * _array_EC_pyCAN_he = _buf__array_EC_pyCAN_he.data cdef size_t _num_array_EC_pyCAN_he = len(_namespace['_array_EC_pyCAN_he']) cdef double he _var_he_ext = _namespace["_var_he_ext"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_he_ext = _namespace['_array_EC_pyCAN_he_ext'] cdef double * _array_EC_pyCAN_he_ext = _buf__array_EC_pyCAN_he_ext.data cdef size_t _num_array_EC_pyCAN_he_ext = len(_namespace['_array_EC_pyCAN_he_ext']) cdef double he_ext _var_he_hipp = _namespace["_var_he_hipp"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_he_hipp = _namespace['_array_EC_pyCAN_he_hipp'] cdef double * _array_EC_pyCAN_he_hipp = _buf__array_EC_pyCAN_he_hipp.data cdef size_t _num_array_EC_pyCAN_he_hipp = len(_namespace['_array_EC_pyCAN_he_hipp']) cdef double he_hipp _var_hi = _namespace["_var_hi"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_hi = _namespace['_array_EC_pyCAN_hi'] cdef double * _array_EC_pyCAN_hi = _buf__array_EC_pyCAN_hi.data cdef size_t _num_array_EC_pyCAN_hi = len(_namespace['_array_EC_pyCAN_hi']) cdef double hi # namespace for function inputs_stim global _namespace_timedarray_values global _namespace_num_timedarray_values cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__timedarray_values = _namespace['_timedarray_values'] _namespace_timedarray_values = _buf__timedarray_values.data _namespace_num_timedarray_values = len(_namespace['_timedarray_values']) _var_lastspike = _namespace["_var_lastspike"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_lastspike = _namespace['_array_EC_pyCAN_lastspike'] cdef double * _array_EC_pyCAN_lastspike = _buf__array_EC_pyCAN_lastspike.data cdef size_t _num_array_EC_pyCAN_lastspike = len(_namespace['_array_EC_pyCAN_lastspike']) cdef double lastspike _var_m = _namespace["_var_m"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_m = _namespace['_array_EC_pyCAN_m'] cdef double * _array_EC_pyCAN_m = _buf__array_EC_pyCAN_m.data cdef size_t _num_array_EC_pyCAN_m = len(_namespace['_array_EC_pyCAN_m']) cdef double m _var_mCAN = _namespace["_var_mCAN"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_mCAN = _namespace['_array_EC_pyCAN_mCAN'] cdef double * _array_EC_pyCAN_mCAN = _buf__array_EC_pyCAN_mCAN.data cdef size_t _num_array_EC_pyCAN_mCAN = len(_namespace['_array_EC_pyCAN_mCAN']) cdef double mCAN _var_mCaL = _namespace["_var_mCaL"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_mCaL = _namespace['_array_EC_pyCAN_mCaL'] cdef double * _array_EC_pyCAN_mCaL = _buf__array_EC_pyCAN_mCaL.data cdef size_t _num_array_EC_pyCAN_mCaL = len(_namespace['_array_EC_pyCAN_mCaL']) cdef double mCaL _var_mV = _namespace["_var_mV"] cdef double mV = _namespace["mV"] _var_metre = _namespace["_var_metre"] cdef double metre = _namespace["metre"] _var_mole = _namespace["_var_mole"] cdef double mole = _namespace["mole"] _var_ms = _namespace["_var_ms"] cdef double ms = _namespace["ms"] _var_msiemens = _namespace["_var_msiemens"] cdef double msiemens = _namespace["msiemens"] _var_n = _namespace["_var_n"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_n = _namespace['_array_EC_pyCAN_n'] cdef double * _array_EC_pyCAN_n = _buf__array_EC_pyCAN_n.data cdef size_t _num_array_EC_pyCAN_n = len(_namespace['_array_EC_pyCAN_n']) cdef double n _var_nA = _namespace["_var_nA"] cdef double nA = _namespace["nA"] _var_noise = _namespace["_var_noise"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_noise = _namespace['_array_EC_pyCAN_noise'] cdef double * _array_EC_pyCAN_noise = _buf__array_EC_pyCAN_noise.data cdef size_t _num_array_EC_pyCAN_noise = len(_namespace['_array_EC_pyCAN_noise']) cdef double noise _var_not_refractory = _namespace["_var_not_refractory"] cdef _numpy.ndarray[char, ndim=1, mode='c', cast=True] _buf__array_EC_pyCAN_not_refractory = _namespace['_array_EC_pyCAN_not_refractory'] cdef bool * _array_EC_pyCAN_not_refractory = _buf__array_EC_pyCAN_not_refractory.data cdef size_t _num_array_EC_pyCAN_not_refractory = len(_namespace['_array_EC_pyCAN_not_refractory']) cdef bool not_refractory _var_p = _namespace["_var_p"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_p = _namespace['_array_EC_pyCAN_p'] cdef double * _array_EC_pyCAN_p = _buf__array_EC_pyCAN_p.data cdef size_t _num_array_EC_pyCAN_p = len(_namespace['_array_EC_pyCAN_p']) cdef double p _var_pi = _namespace["_var_pi"] cdef double pi = _namespace["pi"] _var_r = _namespace["_var_r"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_r = _namespace['_array_EC_pyCAN_r'] cdef double * _array_EC_pyCAN_r = _buf__array_EC_pyCAN_r.data cdef size_t _num_array_EC_pyCAN_r = len(_namespace['_array_EC_pyCAN_r']) cdef double r _var_scale = _namespace["_var_scale"] cdef double scale = _namespace["scale"] _var_second = _namespace["_var_second"] cdef double second = _namespace["second"] _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] _var_size = _namespace["_var_size"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_size = _namespace['_array_EC_pyCAN_size'] cdef double * _array_EC_pyCAN_size = _buf__array_EC_pyCAN_size.data cdef size_t _num_array_EC_pyCAN_size = len(_namespace['_array_EC_pyCAN_size']) cdef double size _var_t = _namespace["_var_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double t _var_tau_Cl = _namespace["_var_tau_Cl"] cdef double tau_Cl = _namespace["tau_Cl"] _var_ufarad = _namespace["_var_ufarad"] cdef double ufarad = _namespace["ufarad"] _var_umetre = _namespace["_var_umetre"] cdef double umetre = _namespace["umetre"] _var_v = _namespace["_var_v"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_v = _namespace['_array_EC_pyCAN_v'] cdef double * _array_EC_pyCAN_v = _buf__array_EC_pyCAN_v.data cdef size_t _num_array_EC_pyCAN_v = len(_namespace['_array_EC_pyCAN_v']) cdef double v _var_z_soma = _namespace["_var_z_soma"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_z_soma = _namespace['_array_EC_pyCAN_z_soma'] cdef double * _array_EC_pyCAN_z_soma = _buf__array_EC_pyCAN_z_soma.data cdef size_t _num_array_EC_pyCAN_z_soma = len(_namespace['_array_EC_pyCAN_z_soma']) cdef double z_soma cdef double _BA_Ca_i cdef double _BA_ge cdef double _BA_ge_ext cdef double _BA_ge_hipp cdef double _BA_gi cdef int64_t _BA_glu cdef double _BA_h cdef double _BA_hCaL cdef double _BA_m cdef double _BA_mCAN cdef double _BA_mCaL cdef double _BA_n cdef double _BA_p cdef double _BA_v cdef double _Ca_i cdef double _Cl cdef double _ge cdef double _ge_ext cdef double _ge_hipp cdef double _gi cdef double _glu cdef double _h cdef double _hCaL cdef double _he cdef double _he_ext cdef double _he_hipp cdef double _hi cdef int64_t _lio_1 cdef int64_t _lio_10 cdef double _lio_11 cdef double _lio_12 cdef double _lio_13 cdef double _lio_14 cdef double _lio_15 cdef double _lio_16 cdef double _lio_17 cdef double _lio_18 cdef double _lio_19 cdef double _lio_2 cdef double _lio_20 cdef double _lio_21 cdef double _lio_22 cdef double _lio_23 cdef double _lio_24 cdef double _lio_25 cdef double _lio_26 cdef double _lio_27 cdef double _lio_28 cdef double _lio_29 cdef double _lio_3 cdef double _lio_30 cdef double _lio_31 cdef double _lio_32 cdef double _lio_33 cdef double _lio_34 cdef double _lio_35 cdef double _lio_36 cdef double _lio_37 cdef double _lio_38 cdef double _lio_39 cdef double _lio_4 cdef double _lio_40 cdef double _lio_41 cdef double _lio_42 cdef double _lio_43 cdef double _lio_44 cdef double _lio_45 cdef double _lio_46 cdef double _lio_47 cdef double _lio_48 cdef double _lio_49 cdef double _lio_5 cdef double _lio_50 cdef double _lio_51 cdef double _lio_52 cdef double _lio_53 cdef double _lio_54 cdef double _lio_55 cdef double _lio_56 cdef double _lio_57 cdef double _lio_58 cdef double _lio_59 cdef double _lio_6 cdef double _lio_60 cdef double _lio_61 cdef double _lio_62 cdef double _lio_63 cdef double _lio_64 cdef double _lio_65 cdef double _lio_66 cdef double _lio_67 cdef double _lio_68 cdef double _lio_69 cdef double _lio_7 cdef double _lio_70 cdef double _lio_71 cdef double _lio_8 cdef double _lio_9 cdef double _m cdef double _mCAN cdef double _mCaL cdef double _n cdef double _p cdef double _v if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_Ca_i = _namespace["_var_Ca_i"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_Ca_i = _namespace['_array_EC_pyCAN_Ca_i'] cdef double * _array_EC_pyCAN_Ca_i = _buf__array_EC_pyCAN_Ca_i.data cdef size_t _num_array_EC_pyCAN_Ca_i = len(_namespace['_array_EC_pyCAN_Ca_i']) cdef double Ca_i _var_Cl = _namespace["_var_Cl"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_Cl = _namespace['_array_EC_pyCAN_Cl'] cdef double * _array_EC_pyCAN_Cl = _buf__array_EC_pyCAN_Cl.data cdef size_t _num_array_EC_pyCAN_Cl = len(_namespace['_array_EC_pyCAN_Cl']) cdef double Cl _var_Ek = _namespace["_var_Ek"] cdef double Ek = _namespace["Ek"] cdef double I_exc _var_N = _namespace["_var_N"] cdef int64_t N = _namespace["N"] cdef double _I_exc_neurongroup_rhythm_pos cdef double __I_exc_neurongroup_rhythm_pos_neurongroup_coherence cdef double __I_exc_neurongroup_rhythm_pos_neurongroup_phase _var____I_exc_neurongroup_rhythm_pos_neurongroup_coherence_neurongroup_x = _namespace["_var____I_exc_neurongroup_rhythm_pos_neurongroup_coherence_neurongroup_x"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_neurongroup_x = _namespace['_array_neurongroup_x'] cdef double * _array_neurongroup_x = _buf__array_neurongroup_x.data cdef size_t _num_array_neurongroup_x = len(_namespace['_array_neurongroup_x']) cdef double ___I_exc_neurongroup_rhythm_pos_neurongroup_coherence_neurongroup_x _var____I_exc_neurongroup_rhythm_pos_neurongroup_coherence_neurongroup_y = _namespace["_var____I_exc_neurongroup_rhythm_pos_neurongroup_coherence_neurongroup_y"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_neurongroup_y = _namespace['_array_neurongroup_y'] cdef double * _array_neurongroup_y = _buf__array_neurongroup_y.data cdef size_t _num_array_neurongroup_y = len(_namespace['_array_neurongroup_y']) cdef double ___I_exc_neurongroup_rhythm_pos_neurongroup_coherence_neurongroup_y _var____I_exc_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_x = _namespace["_var____I_exc_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_x"] _var____I_exc_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_y = _namespace["_var____I_exc_neurongroup_rhythm_pos_neurongroup_phase_neurongroup_y"] _var_cm = _namespace["_var_cm"] cdef double cm = _namespace["cm"] _var_coulomb = _namespace["_var_coulomb"] cdef double coulomb = _namespace["coulomb"] _var_dt = _namespace["_var_dt"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_dt = _namespace['_array_defaultclock_dt'] cdef double * _array_defaultclock_dt = _buf__array_defaultclock_dt.data cdef double dt = _namespace["dt"] _var_gCAN = _namespace["_var_gCAN"] cdef double gCAN = _namespace["gCAN"] _var_gM = _namespace["_var_gM"] cdef double gM = _namespace["gM"] _var_ge = _namespace["_var_ge"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_ge = _namespace['_array_EC_pyCAN_ge'] cdef double * _array_EC_pyCAN_ge = _buf__array_EC_pyCAN_ge.data cdef size_t _num_array_EC_pyCAN_ge = len(_namespace['_array_EC_pyCAN_ge']) cdef double ge _var_ge_ext = _namespace["_var_ge_ext"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_ge_ext = _namespace['_array_EC_pyCAN_ge_ext'] cdef double * _array_EC_pyCAN_ge_ext = _buf__array_EC_pyCAN_ge_ext.data cdef size_t _num_array_EC_pyCAN_ge_ext = len(_namespace['_array_EC_pyCAN_ge_ext']) cdef double ge_ext _var_ge_hipp = _namespace["_var_ge_hipp"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_ge_hipp = _namespace['_array_EC_pyCAN_ge_hipp'] cdef double * _array_EC_pyCAN_ge_hipp = _buf__array_EC_pyCAN_ge_hipp.data cdef size_t _num_array_EC_pyCAN_ge_hipp = len(_namespace['_array_EC_pyCAN_ge_hipp']) cdef double ge_hipp _var_gi = _namespace["_var_gi"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_gi = _namespace['_array_EC_pyCAN_gi'] cdef double * _array_EC_pyCAN_gi = _buf__array_EC_pyCAN_gi.data cdef size_t _num_array_EC_pyCAN_gi = len(_namespace['_array_EC_pyCAN_gi']) cdef double gi _var_glu = _namespace["_var_glu"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_glu = _namespace['_array_EC_pyCAN_glu'] cdef double * _array_EC_pyCAN_glu = _buf__array_EC_pyCAN_glu.data cdef size_t _num_array_EC_pyCAN_glu = len(_namespace['_array_EC_pyCAN_glu']) cdef double glu _var_h = _namespace["_var_h"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_h = _namespace['_array_EC_pyCAN_h'] cdef double * _array_EC_pyCAN_h = _buf__array_EC_pyCAN_h.data cdef size_t _num_array_EC_pyCAN_h = len(_namespace['_array_EC_pyCAN_h']) cdef double h _var_hCaL = _namespace["_var_hCaL"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_hCaL = _namespace['_array_EC_pyCAN_hCaL'] cdef double * _array_EC_pyCAN_hCaL = _buf__array_EC_pyCAN_hCaL.data cdef size_t _num_array_EC_pyCAN_hCaL = len(_namespace['_array_EC_pyCAN_hCaL']) cdef double hCaL _var_he = _namespace["_var_he"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_he = _namespace['_array_EC_pyCAN_he'] cdef double * _array_EC_pyCAN_he = _buf__array_EC_pyCAN_he.data cdef size_t _num_array_EC_pyCAN_he = len(_namespace['_array_EC_pyCAN_he']) cdef double he _var_he_ext = _namespace["_var_he_ext"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_he_ext = _namespace['_array_EC_pyCAN_he_ext'] cdef double * _array_EC_pyCAN_he_ext = _buf__array_EC_pyCAN_he_ext.data cdef size_t _num_array_EC_pyCAN_he_ext = len(_namespace['_array_EC_pyCAN_he_ext']) cdef double he_ext _var_he_hipp = _namespace["_var_he_hipp"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_he_hipp = _namespace['_array_EC_pyCAN_he_hipp'] cdef double * _array_EC_pyCAN_he_hipp = _buf__array_EC_pyCAN_he_hipp.data cdef size_t _num_array_EC_pyCAN_he_hipp = len(_namespace['_array_EC_pyCAN_he_hipp']) cdef double he_hipp _var_hi = _namespace["_var_hi"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_hi = _namespace['_array_EC_pyCAN_hi'] cdef double * _array_EC_pyCAN_hi = _buf__array_EC_pyCAN_hi.data cdef size_t _num_array_EC_pyCAN_hi = len(_namespace['_array_EC_pyCAN_hi']) cdef double hi # namespace for function inputs_stim global _namespace_timedarray_values global _namespace_num_timedarray_values cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__timedarray_values = _namespace['_timedarray_values'] _namespace_timedarray_values = _buf__timedarray_values.data _namespace_num_timedarray_values = len(_namespace['_timedarray_values']) _var_lastspike = _namespace["_var_lastspike"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_lastspike = _namespace['_array_EC_pyCAN_lastspike'] cdef double * _array_EC_pyCAN_lastspike = _buf__array_EC_pyCAN_lastspike.data cdef size_t _num_array_EC_pyCAN_lastspike = len(_namespace['_array_EC_pyCAN_lastspike']) cdef double lastspike _var_m = _namespace["_var_m"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_m = _namespace['_array_EC_pyCAN_m'] cdef double * _array_EC_pyCAN_m = _buf__array_EC_pyCAN_m.data cdef size_t _num_array_EC_pyCAN_m = len(_namespace['_array_EC_pyCAN_m']) cdef double m _var_mCAN = _namespace["_var_mCAN"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_mCAN = _namespace['_array_EC_pyCAN_mCAN'] cdef double * _array_EC_pyCAN_mCAN = _buf__array_EC_pyCAN_mCAN.data cdef size_t _num_array_EC_pyCAN_mCAN = len(_namespace['_array_EC_pyCAN_mCAN']) cdef double mCAN _var_mCaL = _namespace["_var_mCaL"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_mCaL = _namespace['_array_EC_pyCAN_mCaL'] cdef double * _array_EC_pyCAN_mCaL = _buf__array_EC_pyCAN_mCaL.data cdef size_t _num_array_EC_pyCAN_mCaL = len(_namespace['_array_EC_pyCAN_mCaL']) cdef double mCaL _var_mV = _namespace["_var_mV"] cdef double mV = _namespace["mV"] _var_metre = _namespace["_var_metre"] cdef double metre = _namespace["metre"] _var_mole = _namespace["_var_mole"] cdef double mole = _namespace["mole"] _var_ms = _namespace["_var_ms"] cdef double ms = _namespace["ms"] _var_msiemens = _namespace["_var_msiemens"] cdef double msiemens = _namespace["msiemens"] _var_n = _namespace["_var_n"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_n = _namespace['_array_EC_pyCAN_n'] cdef double * _array_EC_pyCAN_n = _buf__array_EC_pyCAN_n.data cdef size_t _num_array_EC_pyCAN_n = len(_namespace['_array_EC_pyCAN_n']) cdef double n _var_nA = _namespace["_var_nA"] cdef double nA = _namespace["nA"] _var_noise = _namespace["_var_noise"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_noise = _namespace['_array_EC_pyCAN_noise'] cdef double * _array_EC_pyCAN_noise = _buf__array_EC_pyCAN_noise.data cdef size_t _num_array_EC_pyCAN_noise = len(_namespace['_array_EC_pyCAN_noise']) cdef double noise _var_not_refractory = _namespace["_var_not_refractory"] cdef _numpy.ndarray[char, ndim=1, mode='c', cast=True] _buf__array_EC_pyCAN_not_refractory = _namespace['_array_EC_pyCAN_not_refractory'] cdef bool * _array_EC_pyCAN_not_refractory = _buf__array_EC_pyCAN_not_refractory.data cdef size_t _num_array_EC_pyCAN_not_refractory = len(_namespace['_array_EC_pyCAN_not_refractory']) cdef bool not_refractory _var_p = _namespace["_var_p"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_p = _namespace['_array_EC_pyCAN_p'] cdef double * _array_EC_pyCAN_p = _buf__array_EC_pyCAN_p.data cdef size_t _num_array_EC_pyCAN_p = len(_namespace['_array_EC_pyCAN_p']) cdef double p _var_pi = _namespace["_var_pi"] cdef double pi = _namespace["pi"] _var_r = _namespace["_var_r"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_r = _namespace['_array_EC_pyCAN_r'] cdef double * _array_EC_pyCAN_r = _buf__array_EC_pyCAN_r.data cdef size_t _num_array_EC_pyCAN_r = len(_namespace['_array_EC_pyCAN_r']) cdef double r _var_scale = _namespace["_var_scale"] cdef double scale = _namespace["scale"] _var_second = _namespace["_var_second"] cdef double second = _namespace["second"] _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] _var_size = _namespace["_var_size"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_size = _namespace['_array_EC_pyCAN_size'] cdef double * _array_EC_pyCAN_size = _buf__array_EC_pyCAN_size.data cdef size_t _num_array_EC_pyCAN_size = len(_namespace['_array_EC_pyCAN_size']) cdef double size _var_t = _namespace["_var_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double t _var_tau_Cl = _namespace["_var_tau_Cl"] cdef double tau_Cl = _namespace["tau_Cl"] _var_ufarad = _namespace["_var_ufarad"] cdef double ufarad = _namespace["ufarad"] _var_umetre = _namespace["_var_umetre"] cdef double umetre = _namespace["umetre"] _var_v = _namespace["_var_v"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_v = _namespace['_array_EC_pyCAN_v'] cdef double * _array_EC_pyCAN_v = _buf__array_EC_pyCAN_v.data cdef size_t _num_array_EC_pyCAN_v = len(_namespace['_array_EC_pyCAN_v']) cdef double v _var_z_soma = _namespace["_var_z_soma"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_z_soma = _namespace['_array_EC_pyCAN_z_soma'] cdef double * _array_EC_pyCAN_z_soma = _buf__array_EC_pyCAN_z_soma.data cdef size_t _num_array_EC_pyCAN_z_soma = len(_namespace['_array_EC_pyCAN_z_soma']) cdef double z_soma cdef double _BA_Ca_i cdef double _BA_ge cdef double _BA_ge_ext cdef double _BA_ge_hipp cdef double _BA_gi cdef int64_t _BA_glu cdef double _BA_h cdef double _BA_hCaL cdef double _BA_m cdef double _BA_mCAN cdef double _BA_mCaL cdef double _BA_n cdef double _BA_p cdef double _BA_v cdef double _Ca_i cdef double _Cl cdef double _ge cdef double _ge_ext cdef double _ge_hipp cdef double _gi cdef double _glu cdef double _h cdef double _hCaL cdef double _he cdef double _he_ext cdef double _he_hipp cdef double _hi cdef int64_t _lio_1 cdef int64_t _lio_10 cdef double _lio_11 cdef double _lio_12 cdef double _lio_13 cdef double _lio_14 cdef double _lio_15 cdef double _lio_16 cdef double _lio_17 cdef double _lio_18 cdef double _lio_19 cdef double _lio_2 cdef double _lio_20 cdef double _lio_21 cdef double _lio_22 cdef double _lio_23 cdef double _lio_24 cdef double _lio_25 cdef double _lio_26 cdef double _lio_27 cdef double _lio_28 cdef double _lio_29 cdef double _lio_3 cdef double _lio_30 cdef double _lio_31 cdef double _lio_32 cdef double _lio_33 cdef double _lio_34 cdef double _lio_35 cdef double _lio_36 cdef double _lio_37 cdef double _lio_38 cdef double _lio_39 cdef double _lio_4 cdef double _lio_40 cdef double _lio_41 cdef double _lio_42 cdef double _lio_43 cdef double _lio_44 cdef double _lio_45 cdef double _lio_46 cdef double _lio_47 cdef double _lio_48 cdef double _lio_49 cdef double _lio_5 cdef double _lio_50 cdef double _lio_51 cdef double _lio_52 cdef double _lio_53 cdef double _lio_54 cdef double _lio_55 cdef double _lio_56 cdef double _lio_57 cdef double _lio_58 cdef double _lio_59 cdef double _lio_6 cdef double _lio_60 cdef double _lio_61 cdef double _lio_62 cdef double _lio_63 cdef double _lio_64 cdef double _lio_65 cdef double _lio_66 cdef double _lio_67 cdef double _lio_68 cdef double _lio_69 cdef double _lio_7 cdef double _lio_70 cdef double _lio_71 cdef double _lio_8 cdef double _lio_9 cdef double _m cdef double _mCAN cdef double _mCaL cdef double _n cdef double _p cdef double _v if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:15:23,905 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name EC_pyCAN_stateupdater_codeobject 2021-11-05 15:15:23,907 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "EC_pyCAN_stateupdate" using Cython module "_cython_magic_20c404c4610cb20c7128b465f73034dc" 2021-11-05 15:15:23,907 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140605133629616 on /home/nikos/.cython/brian_extensions/_cython_magic_20c404c4610cb20c7128b465f73034dc.lock 2021-11-05 15:15:23,907 DEBUG brian2.utils.filelock: Lock 140605133629616 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_20c404c4610cb20c7128b465f73034dc.lock 2021-11-05 15:15:27,041 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140605133629616 on /home/nikos/.cython/brian_extensions/_cython_magic_20c404c4610cb20c7128b465f73034dc.lock 2021-11-05 15:15:27,041 DEBUG brian2.utils.filelock: Lock 140605133629616 released on /home/nikos/.cython/brian_extensions/_cython_magic_20c404c4610cb20c7128b465f73034dc.lock 2021-11-05 15:15:27,060 DEBUG brian2.stateupdaters.base.method_choice: Group Kuramoto_oscillators_N_50: using numerical integration method euler (took 0.02s) 2021-11-05 15:15:27,060 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=Kuramoto_oscillators_N_50, template name=stateupdate) for abstract code: _Theta = Theta + dt*(X*kG*cos(Theta) - 0.5*kN*sin(Theta - ThetaPreInput) + omega)/second Theta = _Theta 2021-11-05 15:15:27,062 DIAGNOSTIC brian2.devices.device: Kuramoto_oscillators_N_50_stateupdater_codeobject abstract code: _Theta = Theta + dt*(X*kG*cos(Theta) - 0.5*kN*sin(Theta - ThetaPreInput) + omega)/second Theta = _Theta 2021-11-05 15:15:27,065 DIAGNOSTIC brian2.devices.device: Kuramoto_oscillators_N_50_stateupdater_codeobject snippet (scalar): dt = _array_defaultclock_dt[0] _lio_1 = 1.0 / Hz _lio_2 = dt / second 2021-11-05 15:15:27,065 DIAGNOSTIC brian2.devices.device: Kuramoto_oscillators_N_50_stateupdater_codeobject snippet (vector): ThetaPreInput = _array_Kuramoto_oscillators_N_50_ThetaPreInput[_idx] Theta = _array_Kuramoto_oscillators_N_50_Theta[_idx] kG = _array_Kuramoto_oscillators_N_50_kG[_idx] _X_neurongroup_1_Y = _array_neurongroup_1_Y[0] kN = _array_Kuramoto_oscillators_N_50_kN[_idx] omega = _array_Kuramoto_oscillators_N_50_omega[_idx] X = _lio_1 * _X_neurongroup_1_Y _Theta = Theta + (_lio_2 * ((((X * kG) * cos(Theta)) + omega) - (0.5 * (kN * sin(Theta - ThetaPreInput))))) Theta = _Theta _array_Kuramoto_oscillators_N_50_Theta[_idx] = Theta 2021-11-05 15:15:27,065 DIAGNOSTIC brian2.devices.device: Kuramoto_oscillators_N_50_stateupdater_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var_Hz = _namespace["_var_Hz"] cdef double Hz = _namespace["Hz"] _var_N = _namespace["_var_N"] cdef int64_t N = _namespace["N"] _var_Theta = _namespace["_var_Theta"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_Kuramoto_oscillators_N_50_Theta = _namespace['_array_Kuramoto_oscillators_N_50_Theta'] cdef double * _array_Kuramoto_oscillators_N_50_Theta = _buf__array_Kuramoto_oscillators_N_50_Theta.data cdef size_t _num_array_Kuramoto_oscillators_N_50_Theta = len(_namespace['_array_Kuramoto_oscillators_N_50_Theta']) cdef double Theta _var_ThetaPreInput = _namespace["_var_ThetaPreInput"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_Kuramoto_oscillators_N_50_ThetaPreInput = _namespace['_array_Kuramoto_oscillators_N_50_ThetaPreInput'] cdef double * _array_Kuramoto_oscillators_N_50_ThetaPreInput = _buf__array_Kuramoto_oscillators_N_50_ThetaPreInput.data cdef size_t _num_array_Kuramoto_oscillators_N_50_ThetaPreInput = len(_namespace['_array_Kuramoto_oscillators_N_50_ThetaPreInput']) cdef double ThetaPreInput cdef double X _var__X_neurongroup_1_Y = _namespace["_var__X_neurongroup_1_Y"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_neurongroup_1_Y = _namespace['_array_neurongroup_1_Y'] cdef double * _array_neurongroup_1_Y = _buf__array_neurongroup_1_Y.data cdef size_t _num_array_neurongroup_1_Y = len(_namespace['_array_neurongroup_1_Y']) cdef double _X_neurongroup_1_Y _var_dt = _namespace["_var_dt"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_dt = _namespace['_array_defaultclock_dt'] cdef double * _array_defaultclock_dt = _buf__array_defaultclock_dt.data cdef double dt = _namespace["dt"] _var_kG = _namespace["_var_kG"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_Kuramoto_oscillators_N_50_kG = _namespace['_array_Kuramoto_oscillators_N_50_kG'] cdef double * _array_Kuramoto_oscillators_N_50_kG = _buf__array_Kuramoto_oscillators_N_50_kG.data cdef size_t _num_array_Kuramoto_oscillators_N_50_kG = len(_namespace['_array_Kuramoto_oscillators_N_50_kG']) cdef double kG _var_kN = _namespace["_var_kN"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_Kuramoto_oscillators_N_50_kN = _namespace['_array_Kuramoto_oscillators_N_50_kN'] cdef double * _array_Kuramoto_oscillators_N_50_kN = _buf__array_Kuramoto_oscillators_N_50_kN.data cdef size_t _num_array_Kuramoto_oscillators_N_50_kN = len(_namespace['_array_Kuramoto_oscillators_N_50_kN']) cdef double kN _var_omega = _namespace["_var_omega"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_Kuramoto_oscillators_N_50_omega = _namespace['_array_Kuramoto_oscillators_N_50_omega'] cdef double * _array_Kuramoto_oscillators_N_50_omega = _buf__array_Kuramoto_oscillators_N_50_omega.data cdef size_t _num_array_Kuramoto_oscillators_N_50_omega = len(_namespace['_array_Kuramoto_oscillators_N_50_omega']) cdef double omega _var_second = _namespace["_var_second"] cdef double second = _namespace["second"] cdef double _Theta cdef double _lio_1 cdef double _lio_2 if '_owner' in _namespace: _owner = _namespace['_owner'] # scalar code _vectorisation_idx = 1 dt = _array_defaultclock_dt[0] _lio_1 = 1.0 / Hz _lio_2 = dt / second # vector code for _idx in range(N): _vectorisation_idx = _idx ThetaPreInput = _array_Kuramoto_oscillators_N_50_ThetaPreInput[_idx] Theta = _array_Kuramoto_oscillators_N_50_Theta[_idx] kG = _array_Kuramoto_oscillators_N_50_kG[_idx] _X_neurongroup_1_Y = _array_neurongroup_1_Y[0] kN = _array_Kuramoto_oscillators_N_50_kN[_idx] omega = _array_Kuramoto_oscillators_N_50_omega[_idx] X = _lio_1 * _X_neurongroup_1_Y _Theta = Theta + (_lio_2 * ((((X * kG) * cos(Theta)) + omega) - (0.5 * (kN * sin(Theta - ThetaPreInput))))) Theta = _Theta _array_Kuramoto_oscillators_N_50_Theta[_idx] = Theta before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_Hz = _namespace["_var_Hz"] cdef double Hz = _namespace["Hz"] _var_N = _namespace["_var_N"] cdef int64_t N = _namespace["N"] _var_Theta = _namespace["_var_Theta"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_Kuramoto_oscillators_N_50_Theta = _namespace['_array_Kuramoto_oscillators_N_50_Theta'] cdef double * _array_Kuramoto_oscillators_N_50_Theta = _buf__array_Kuramoto_oscillators_N_50_Theta.data cdef size_t _num_array_Kuramoto_oscillators_N_50_Theta = len(_namespace['_array_Kuramoto_oscillators_N_50_Theta']) cdef double Theta _var_ThetaPreInput = _namespace["_var_ThetaPreInput"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_Kuramoto_oscillators_N_50_ThetaPreInput = _namespace['_array_Kuramoto_oscillators_N_50_ThetaPreInput'] cdef double * _array_Kuramoto_oscillators_N_50_ThetaPreInput = _buf__array_Kuramoto_oscillators_N_50_ThetaPreInput.data cdef size_t _num_array_Kuramoto_oscillators_N_50_ThetaPreInput = len(_namespace['_array_Kuramoto_oscillators_N_50_ThetaPreInput']) cdef double ThetaPreInput cdef double X _var__X_neurongroup_1_Y = _namespace["_var__X_neurongroup_1_Y"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_neurongroup_1_Y = _namespace['_array_neurongroup_1_Y'] cdef double * _array_neurongroup_1_Y = _buf__array_neurongroup_1_Y.data cdef size_t _num_array_neurongroup_1_Y = len(_namespace['_array_neurongroup_1_Y']) cdef double _X_neurongroup_1_Y _var_dt = _namespace["_var_dt"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_dt = _namespace['_array_defaultclock_dt'] cdef double * _array_defaultclock_dt = _buf__array_defaultclock_dt.data cdef double dt = _namespace["dt"] _var_kG = _namespace["_var_kG"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_Kuramoto_oscillators_N_50_kG = _namespace['_array_Kuramoto_oscillators_N_50_kG'] cdef double * _array_Kuramoto_oscillators_N_50_kG = _buf__array_Kuramoto_oscillators_N_50_kG.data cdef size_t _num_array_Kuramoto_oscillators_N_50_kG = len(_namespace['_array_Kuramoto_oscillators_N_50_kG']) cdef double kG _var_kN = _namespace["_var_kN"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_Kuramoto_oscillators_N_50_kN = _namespace['_array_Kuramoto_oscillators_N_50_kN'] cdef double * _array_Kuramoto_oscillators_N_50_kN = _buf__array_Kuramoto_oscillators_N_50_kN.data cdef size_t _num_array_Kuramoto_oscillators_N_50_kN = len(_namespace['_array_Kuramoto_oscillators_N_50_kN']) cdef double kN _var_omega = _namespace["_var_omega"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_Kuramoto_oscillators_N_50_omega = _namespace['_array_Kuramoto_oscillators_N_50_omega'] cdef double * _array_Kuramoto_oscillators_N_50_omega = _buf__array_Kuramoto_oscillators_N_50_omega.data cdef size_t _num_array_Kuramoto_oscillators_N_50_omega = len(_namespace['_array_Kuramoto_oscillators_N_50_omega']) cdef double omega _var_second = _namespace["_var_second"] cdef double second = _namespace["second"] cdef double _Theta cdef double _lio_1 cdef double _lio_2 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_Hz = _namespace["_var_Hz"] cdef double Hz = _namespace["Hz"] _var_N = _namespace["_var_N"] cdef int64_t N = _namespace["N"] _var_Theta = _namespace["_var_Theta"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_Kuramoto_oscillators_N_50_Theta = _namespace['_array_Kuramoto_oscillators_N_50_Theta'] cdef double * _array_Kuramoto_oscillators_N_50_Theta = _buf__array_Kuramoto_oscillators_N_50_Theta.data cdef size_t _num_array_Kuramoto_oscillators_N_50_Theta = len(_namespace['_array_Kuramoto_oscillators_N_50_Theta']) cdef double Theta _var_ThetaPreInput = _namespace["_var_ThetaPreInput"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_Kuramoto_oscillators_N_50_ThetaPreInput = _namespace['_array_Kuramoto_oscillators_N_50_ThetaPreInput'] cdef double * _array_Kuramoto_oscillators_N_50_ThetaPreInput = _buf__array_Kuramoto_oscillators_N_50_ThetaPreInput.data cdef size_t _num_array_Kuramoto_oscillators_N_50_ThetaPreInput = len(_namespace['_array_Kuramoto_oscillators_N_50_ThetaPreInput']) cdef double ThetaPreInput cdef double X _var__X_neurongroup_1_Y = _namespace["_var__X_neurongroup_1_Y"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_neurongroup_1_Y = _namespace['_array_neurongroup_1_Y'] cdef double * _array_neurongroup_1_Y = _buf__array_neurongroup_1_Y.data cdef size_t _num_array_neurongroup_1_Y = len(_namespace['_array_neurongroup_1_Y']) cdef double _X_neurongroup_1_Y _var_dt = _namespace["_var_dt"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_dt = _namespace['_array_defaultclock_dt'] cdef double * _array_defaultclock_dt = _buf__array_defaultclock_dt.data cdef double dt = _namespace["dt"] _var_kG = _namespace["_var_kG"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_Kuramoto_oscillators_N_50_kG = _namespace['_array_Kuramoto_oscillators_N_50_kG'] cdef double * _array_Kuramoto_oscillators_N_50_kG = _buf__array_Kuramoto_oscillators_N_50_kG.data cdef size_t _num_array_Kuramoto_oscillators_N_50_kG = len(_namespace['_array_Kuramoto_oscillators_N_50_kG']) cdef double kG _var_kN = _namespace["_var_kN"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_Kuramoto_oscillators_N_50_kN = _namespace['_array_Kuramoto_oscillators_N_50_kN'] cdef double * _array_Kuramoto_oscillators_N_50_kN = _buf__array_Kuramoto_oscillators_N_50_kN.data cdef size_t _num_array_Kuramoto_oscillators_N_50_kN = len(_namespace['_array_Kuramoto_oscillators_N_50_kN']) cdef double kN _var_omega = _namespace["_var_omega"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_Kuramoto_oscillators_N_50_omega = _namespace['_array_Kuramoto_oscillators_N_50_omega'] cdef double * _array_Kuramoto_oscillators_N_50_omega = _buf__array_Kuramoto_oscillators_N_50_omega.data cdef size_t _num_array_Kuramoto_oscillators_N_50_omega = len(_namespace['_array_Kuramoto_oscillators_N_50_omega']) cdef double omega _var_second = _namespace["_var_second"] cdef double second = _namespace["second"] cdef double _Theta cdef double _lio_1 cdef double _lio_2 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:15:27,066 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name Kuramoto_oscillators_N_50_stateupdater_codeobject 2021-11-05 15:15:27,066 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "Kuramoto_oscillators_N_50_stateupdate" using Cython module "_cython_magic_c3c0ccb595661e33a408d645049c656f" 2021-11-05 15:15:27,066 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140606216944752 on /home/nikos/.cython/brian_extensions/_cython_magic_c3c0ccb595661e33a408d645049c656f.lock 2021-11-05 15:15:27,066 DEBUG brian2.utils.filelock: Lock 140606216944752 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_c3c0ccb595661e33a408d645049c656f.lock 2021-11-05 15:15:27,988 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140606216944752 on /home/nikos/.cython/brian_extensions/_cython_magic_c3c0ccb595661e33a408d645049c656f.lock 2021-11-05 15:15:27,988 DEBUG brian2.utils.filelock: Lock 140606216944752 released on /home/nikos/.cython/brian_extensions/_cython_magic_c3c0ccb595661e33a408d645049c656f.lock 2021-11-05 15:15:28,007 DEBUG brian2.stateupdaters.base.method_choice: Group neurongroup_1: using numerical integration method exact (took 0.02s) 2021-11-05 15:15:28,007 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=neurongroup_1, template name=stateupdate) for abstract code: _Y = Y*exp(-dt/tauFR) Y = _Y 2021-11-05 15:15:28,009 DIAGNOSTIC brian2.devices.device: neurongroup_1_stateupdater_codeobject abstract code: _Y = Y*exp(-dt/tauFR) Y = _Y 2021-11-05 15:15:28,010 DIAGNOSTIC brian2.devices.device: neurongroup_1_stateupdater_codeobject snippet (scalar): dt = _array_defaultclock_dt[0] _lio_1 = exp((- dt) / tauFR) 2021-11-05 15:15:28,010 DIAGNOSTIC brian2.devices.device: neurongroup_1_stateupdater_codeobject snippet (vector): Y = _array_neurongroup_1_Y[_idx] _Y = _lio_1 * Y Y = _Y _array_neurongroup_1_Y[_idx] = Y 2021-11-05 15:15:28,010 DIAGNOSTIC brian2.devices.device: neurongroup_1_stateupdater_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var_N = _namespace["_var_N"] cdef int64_t N = _namespace["N"] _var_Y = _namespace["_var_Y"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_neurongroup_1_Y = _namespace['_array_neurongroup_1_Y'] cdef double * _array_neurongroup_1_Y = _buf__array_neurongroup_1_Y.data cdef size_t _num_array_neurongroup_1_Y = len(_namespace['_array_neurongroup_1_Y']) cdef double Y _var_dt = _namespace["_var_dt"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_dt = _namespace['_array_defaultclock_dt'] cdef double * _array_defaultclock_dt = _buf__array_defaultclock_dt.data cdef double dt = _namespace["dt"] _var_tauFR = _namespace["_var_tauFR"] cdef double tauFR = _namespace["tauFR"] cdef double _Y cdef double _lio_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # scalar code _vectorisation_idx = 1 dt = _array_defaultclock_dt[0] _lio_1 = exp((- dt) / tauFR) # vector code for _idx in range(N): _vectorisation_idx = _idx Y = _array_neurongroup_1_Y[_idx] _Y = _lio_1 * Y Y = _Y _array_neurongroup_1_Y[_idx] = Y before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef int64_t N = _namespace["N"] _var_Y = _namespace["_var_Y"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_neurongroup_1_Y = _namespace['_array_neurongroup_1_Y'] cdef double * _array_neurongroup_1_Y = _buf__array_neurongroup_1_Y.data cdef size_t _num_array_neurongroup_1_Y = len(_namespace['_array_neurongroup_1_Y']) cdef double Y _var_dt = _namespace["_var_dt"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_dt = _namespace['_array_defaultclock_dt'] cdef double * _array_defaultclock_dt = _buf__array_defaultclock_dt.data cdef double dt = _namespace["dt"] _var_tauFR = _namespace["_var_tauFR"] cdef double tauFR = _namespace["tauFR"] cdef double _Y cdef double _lio_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef int64_t N = _namespace["N"] _var_Y = _namespace["_var_Y"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_neurongroup_1_Y = _namespace['_array_neurongroup_1_Y'] cdef double * _array_neurongroup_1_Y = _buf__array_neurongroup_1_Y.data cdef size_t _num_array_neurongroup_1_Y = len(_namespace['_array_neurongroup_1_Y']) cdef double Y _var_dt = _namespace["_var_dt"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_dt = _namespace['_array_defaultclock_dt'] cdef double * _array_defaultclock_dt = _buf__array_defaultclock_dt.data cdef double dt = _namespace["dt"] _var_tauFR = _namespace["_var_tauFR"] cdef double tauFR = _namespace["tauFR"] cdef double _Y cdef double _lio_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:15:28,010 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name neurongroup_1_stateupdater_codeobject 2021-11-05 15:15:28,011 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "neurongroup_1_stateupdate" using Cython module "_cython_magic_460e271232b325014880f2c6c143b33f" 2021-11-05 15:15:28,011 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140606221464480 on /home/nikos/.cython/brian_extensions/_cython_magic_460e271232b325014880f2c6c143b33f.lock 2021-11-05 15:15:28,011 DEBUG brian2.utils.filelock: Lock 140606221464480 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_460e271232b325014880f2c6c143b33f.lock 2021-11-05 15:15:28,011 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140606221464480 on /home/nikos/.cython/brian_extensions/_cython_magic_460e271232b325014880f2c6c143b33f.lock 2021-11-05 15:15:28,011 DEBUG brian2.utils.filelock: Lock 140606221464480 released on /home/nikos/.cython/brian_extensions/_cython_magic_460e271232b325014880f2c6c143b33f.lock 2021-11-05 15:15:28,042 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=CA1_inh, template name=threshold) for abstract code: _cond = (v>V_th) and not_refractory 2021-11-05 15:15:28,046 DIAGNOSTIC brian2.devices.device: CA1_inh_thresholder_codeobject abstract code: _cond = (v>V_th) and not_refractory 2021-11-05 15:15:28,047 DIAGNOSTIC brian2.devices.device: CA1_inh_thresholder_codeobject snippet (scalar): 2021-11-05 15:15:28,047 DIAGNOSTIC brian2.devices.device: CA1_inh_thresholder_codeobject snippet (vector): v = _array_CA1_inh_v[_idx] not_refractory = _array_CA1_inh_not_refractory[_idx] _cond = (v > V_th) and not_refractory 2021-11-05 15:15:28,048 DIAGNOSTIC brian2.devices.device: CA1_inh_thresholder_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var_N = _namespace["_var_N"] cdef int64_t N = _namespace["N"] _var_V_th = _namespace["_var_V_th"] cdef double V_th = _namespace["V_th"] cdef bool _cond _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_inh__spikespace = _namespace['_array_CA1_inh__spikespace'] cdef int32_t * _array_CA1_inh__spikespace = _buf__array_CA1_inh__spikespace.data cdef size_t _num_array_CA1_inh__spikespace = len(_namespace['_array_CA1_inh__spikespace']) cdef int32_t _spikespace _var_lastspike = _namespace["_var_lastspike"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_lastspike = _namespace['_array_CA1_inh_lastspike'] cdef double * _array_CA1_inh_lastspike = _buf__array_CA1_inh_lastspike.data cdef size_t _num_array_CA1_inh_lastspike = len(_namespace['_array_CA1_inh_lastspike']) cdef double lastspike _var_not_refractory = _namespace["_var_not_refractory"] cdef _numpy.ndarray[char, ndim=1, mode='c', cast=True] _buf__array_CA1_inh_not_refractory = _namespace['_array_CA1_inh_not_refractory'] cdef bool * _array_CA1_inh_not_refractory = _buf__array_CA1_inh_not_refractory.data cdef size_t _num_array_CA1_inh_not_refractory = len(_namespace['_array_CA1_inh_not_refractory']) cdef bool not_refractory _var_t = _namespace["_var_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double t _var_v = _namespace["_var_v"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_v = _namespace['_array_CA1_inh_v'] cdef double * _array_CA1_inh_v = _buf__array_CA1_inh_v.data cdef size_t _num_array_CA1_inh_v = len(_namespace['_array_CA1_inh_v']) cdef double v if '_owner' in _namespace: _owner = _namespace['_owner'] # scalar code _vectorisation_idx = 1 cdef size_t _cpp_numevents = 0 for _idx in range(N): # vector code _vectorisation_idx = _idx v = _array_CA1_inh_v[_idx] not_refractory = _array_CA1_inh_not_refractory[_idx] _cond = (v > V_th) and not_refractory if _cond: _array_CA1_inh__spikespace[_cpp_numevents] = _idx _cpp_numevents += 1 _array_CA1_inh_not_refractory[_idx] = False _array_CA1_inh_lastspike[_idx] = _array_defaultclock_t[0] _array_CA1_inh__spikespace[N] = _cpp_numevents before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef int64_t N = _namespace["N"] _var_V_th = _namespace["_var_V_th"] cdef double V_th = _namespace["V_th"] cdef bool _cond _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_inh__spikespace = _namespace['_array_CA1_inh__spikespace'] cdef int32_t * _array_CA1_inh__spikespace = _buf__array_CA1_inh__spikespace.data cdef size_t _num_array_CA1_inh__spikespace = len(_namespace['_array_CA1_inh__spikespace']) cdef int32_t _spikespace _var_lastspike = _namespace["_var_lastspike"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_lastspike = _namespace['_array_CA1_inh_lastspike'] cdef double * _array_CA1_inh_lastspike = _buf__array_CA1_inh_lastspike.data cdef size_t _num_array_CA1_inh_lastspike = len(_namespace['_array_CA1_inh_lastspike']) cdef double lastspike _var_not_refractory = _namespace["_var_not_refractory"] cdef _numpy.ndarray[char, ndim=1, mode='c', cast=True] _buf__array_CA1_inh_not_refractory = _namespace['_array_CA1_inh_not_refractory'] cdef bool * _array_CA1_inh_not_refractory = _buf__array_CA1_inh_not_refractory.data cdef size_t _num_array_CA1_inh_not_refractory = len(_namespace['_array_CA1_inh_not_refractory']) cdef bool not_refractory _var_t = _namespace["_var_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double t _var_v = _namespace["_var_v"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_v = _namespace['_array_CA1_inh_v'] cdef double * _array_CA1_inh_v = _buf__array_CA1_inh_v.data cdef size_t _num_array_CA1_inh_v = len(_namespace['_array_CA1_inh_v']) cdef double v if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef int64_t N = _namespace["N"] _var_V_th = _namespace["_var_V_th"] cdef double V_th = _namespace["V_th"] cdef bool _cond _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_inh__spikespace = _namespace['_array_CA1_inh__spikespace'] cdef int32_t * _array_CA1_inh__spikespace = _buf__array_CA1_inh__spikespace.data cdef size_t _num_array_CA1_inh__spikespace = len(_namespace['_array_CA1_inh__spikespace']) cdef int32_t _spikespace _var_lastspike = _namespace["_var_lastspike"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_lastspike = _namespace['_array_CA1_inh_lastspike'] cdef double * _array_CA1_inh_lastspike = _buf__array_CA1_inh_lastspike.data cdef size_t _num_array_CA1_inh_lastspike = len(_namespace['_array_CA1_inh_lastspike']) cdef double lastspike _var_not_refractory = _namespace["_var_not_refractory"] cdef _numpy.ndarray[char, ndim=1, mode='c', cast=True] _buf__array_CA1_inh_not_refractory = _namespace['_array_CA1_inh_not_refractory'] cdef bool * _array_CA1_inh_not_refractory = _buf__array_CA1_inh_not_refractory.data cdef size_t _num_array_CA1_inh_not_refractory = len(_namespace['_array_CA1_inh_not_refractory']) cdef bool not_refractory _var_t = _namespace["_var_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double t _var_v = _namespace["_var_v"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_v = _namespace['_array_CA1_inh_v'] cdef double * _array_CA1_inh_v = _buf__array_CA1_inh_v.data cdef size_t _num_array_CA1_inh_v = len(_namespace['_array_CA1_inh_v']) cdef double v if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:15:28,048 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name CA1_inh_thresholder_codeobject 2021-11-05 15:15:28,048 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "CA1_inh_threshold" using Cython module "_cython_magic_b1ece767bf95a0b409b2502b574c3fd4" 2021-11-05 15:15:28,048 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140606142727504 on /home/nikos/.cython/brian_extensions/_cython_magic_b1ece767bf95a0b409b2502b574c3fd4.lock 2021-11-05 15:15:28,048 DEBUG brian2.utils.filelock: Lock 140606142727504 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_b1ece767bf95a0b409b2502b574c3fd4.lock 2021-11-05 15:15:28,048 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140606142727504 on /home/nikos/.cython/brian_extensions/_cython_magic_b1ece767bf95a0b409b2502b574c3fd4.lock 2021-11-05 15:15:28,049 DEBUG brian2.utils.filelock: Lock 140606142727504 released on /home/nikos/.cython/brian_extensions/_cython_magic_b1ece767bf95a0b409b2502b574c3fd4.lock 2021-11-05 15:15:28,049 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=CA1_pyCAN, template name=threshold) for abstract code: _cond = (v>V_th) and not_refractory 2021-11-05 15:15:28,051 DIAGNOSTIC brian2.devices.device: CA1_pyCAN_thresholder_codeobject abstract code: _cond = (v>V_th) and not_refractory 2021-11-05 15:15:28,053 DIAGNOSTIC brian2.devices.device: CA1_pyCAN_thresholder_codeobject snippet (scalar): 2021-11-05 15:15:28,053 DIAGNOSTIC brian2.devices.device: CA1_pyCAN_thresholder_codeobject snippet (vector): v = _array_CA1_pyCAN_v[_idx] not_refractory = _array_CA1_pyCAN_not_refractory[_idx] _cond = (v > V_th) and not_refractory 2021-11-05 15:15:28,054 DIAGNOSTIC brian2.devices.device: CA1_pyCAN_thresholder_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var_N = _namespace["_var_N"] cdef int64_t N = _namespace["N"] _var_V_th = _namespace["_var_V_th"] cdef double V_th = _namespace["V_th"] cdef bool _cond _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_pyCAN__spikespace = _namespace['_array_CA1_pyCAN__spikespace'] cdef int32_t * _array_CA1_pyCAN__spikespace = _buf__array_CA1_pyCAN__spikespace.data cdef size_t _num_array_CA1_pyCAN__spikespace = len(_namespace['_array_CA1_pyCAN__spikespace']) cdef int32_t _spikespace _var_lastspike = _namespace["_var_lastspike"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_lastspike = _namespace['_array_CA1_pyCAN_lastspike'] cdef double * _array_CA1_pyCAN_lastspike = _buf__array_CA1_pyCAN_lastspike.data cdef size_t _num_array_CA1_pyCAN_lastspike = len(_namespace['_array_CA1_pyCAN_lastspike']) cdef double lastspike _var_not_refractory = _namespace["_var_not_refractory"] cdef _numpy.ndarray[char, ndim=1, mode='c', cast=True] _buf__array_CA1_pyCAN_not_refractory = _namespace['_array_CA1_pyCAN_not_refractory'] cdef bool * _array_CA1_pyCAN_not_refractory = _buf__array_CA1_pyCAN_not_refractory.data cdef size_t _num_array_CA1_pyCAN_not_refractory = len(_namespace['_array_CA1_pyCAN_not_refractory']) cdef bool not_refractory _var_t = _namespace["_var_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double t _var_v = _namespace["_var_v"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_v = _namespace['_array_CA1_pyCAN_v'] cdef double * _array_CA1_pyCAN_v = _buf__array_CA1_pyCAN_v.data cdef size_t _num_array_CA1_pyCAN_v = len(_namespace['_array_CA1_pyCAN_v']) cdef double v if '_owner' in _namespace: _owner = _namespace['_owner'] # scalar code _vectorisation_idx = 1 cdef size_t _cpp_numevents = 0 for _idx in range(N): # vector code _vectorisation_idx = _idx v = _array_CA1_pyCAN_v[_idx] not_refractory = _array_CA1_pyCAN_not_refractory[_idx] _cond = (v > V_th) and not_refractory if _cond: _array_CA1_pyCAN__spikespace[_cpp_numevents] = _idx _cpp_numevents += 1 _array_CA1_pyCAN_not_refractory[_idx] = False _array_CA1_pyCAN_lastspike[_idx] = _array_defaultclock_t[0] _array_CA1_pyCAN__spikespace[N] = _cpp_numevents before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef int64_t N = _namespace["N"] _var_V_th = _namespace["_var_V_th"] cdef double V_th = _namespace["V_th"] cdef bool _cond _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_pyCAN__spikespace = _namespace['_array_CA1_pyCAN__spikespace'] cdef int32_t * _array_CA1_pyCAN__spikespace = _buf__array_CA1_pyCAN__spikespace.data cdef size_t _num_array_CA1_pyCAN__spikespace = len(_namespace['_array_CA1_pyCAN__spikespace']) cdef int32_t _spikespace _var_lastspike = _namespace["_var_lastspike"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_lastspike = _namespace['_array_CA1_pyCAN_lastspike'] cdef double * _array_CA1_pyCAN_lastspike = _buf__array_CA1_pyCAN_lastspike.data cdef size_t _num_array_CA1_pyCAN_lastspike = len(_namespace['_array_CA1_pyCAN_lastspike']) cdef double lastspike _var_not_refractory = _namespace["_var_not_refractory"] cdef _numpy.ndarray[char, ndim=1, mode='c', cast=True] _buf__array_CA1_pyCAN_not_refractory = _namespace['_array_CA1_pyCAN_not_refractory'] cdef bool * _array_CA1_pyCAN_not_refractory = _buf__array_CA1_pyCAN_not_refractory.data cdef size_t _num_array_CA1_pyCAN_not_refractory = len(_namespace['_array_CA1_pyCAN_not_refractory']) cdef bool not_refractory _var_t = _namespace["_var_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double t _var_v = _namespace["_var_v"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_v = _namespace['_array_CA1_pyCAN_v'] cdef double * _array_CA1_pyCAN_v = _buf__array_CA1_pyCAN_v.data cdef size_t _num_array_CA1_pyCAN_v = len(_namespace['_array_CA1_pyCAN_v']) cdef double v if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef int64_t N = _namespace["N"] _var_V_th = _namespace["_var_V_th"] cdef double V_th = _namespace["V_th"] cdef bool _cond _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_pyCAN__spikespace = _namespace['_array_CA1_pyCAN__spikespace'] cdef int32_t * _array_CA1_pyCAN__spikespace = _buf__array_CA1_pyCAN__spikespace.data cdef size_t _num_array_CA1_pyCAN__spikespace = len(_namespace['_array_CA1_pyCAN__spikespace']) cdef int32_t _spikespace _var_lastspike = _namespace["_var_lastspike"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_lastspike = _namespace['_array_CA1_pyCAN_lastspike'] cdef double * _array_CA1_pyCAN_lastspike = _buf__array_CA1_pyCAN_lastspike.data cdef size_t _num_array_CA1_pyCAN_lastspike = len(_namespace['_array_CA1_pyCAN_lastspike']) cdef double lastspike _var_not_refractory = _namespace["_var_not_refractory"] cdef _numpy.ndarray[char, ndim=1, mode='c', cast=True] _buf__array_CA1_pyCAN_not_refractory = _namespace['_array_CA1_pyCAN_not_refractory'] cdef bool * _array_CA1_pyCAN_not_refractory = _buf__array_CA1_pyCAN_not_refractory.data cdef size_t _num_array_CA1_pyCAN_not_refractory = len(_namespace['_array_CA1_pyCAN_not_refractory']) cdef bool not_refractory _var_t = _namespace["_var_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double t _var_v = _namespace["_var_v"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_v = _namespace['_array_CA1_pyCAN_v'] cdef double * _array_CA1_pyCAN_v = _buf__array_CA1_pyCAN_v.data cdef size_t _num_array_CA1_pyCAN_v = len(_namespace['_array_CA1_pyCAN_v']) cdef double v if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:15:28,054 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name CA1_pyCAN_thresholder_codeobject 2021-11-05 15:15:28,054 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "CA1_pyCAN_threshold" using Cython module "_cython_magic_950d06f1d7028a9d8843ec739daed789" 2021-11-05 15:15:28,054 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140606332147696 on /home/nikos/.cython/brian_extensions/_cython_magic_950d06f1d7028a9d8843ec739daed789.lock 2021-11-05 15:15:28,054 DEBUG brian2.utils.filelock: Lock 140606332147696 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_950d06f1d7028a9d8843ec739daed789.lock 2021-11-05 15:15:28,054 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140606332147696 on /home/nikos/.cython/brian_extensions/_cython_magic_950d06f1d7028a9d8843ec739daed789.lock 2021-11-05 15:15:28,055 DEBUG brian2.utils.filelock: Lock 140606332147696 released on /home/nikos/.cython/brian_extensions/_cython_magic_950d06f1d7028a9d8843ec739daed789.lock 2021-11-05 15:15:28,055 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=CA3_inh, template name=threshold) for abstract code: _cond = (v>V_th) and not_refractory 2021-11-05 15:15:28,057 DIAGNOSTIC brian2.devices.device: CA3_inh_thresholder_codeobject abstract code: _cond = (v>V_th) and not_refractory 2021-11-05 15:15:28,058 DIAGNOSTIC brian2.devices.device: CA3_inh_thresholder_codeobject snippet (scalar): 2021-11-05 15:15:28,058 DIAGNOSTIC brian2.devices.device: CA3_inh_thresholder_codeobject snippet (vector): v = _array_CA3_inh_v[_idx] not_refractory = _array_CA3_inh_not_refractory[_idx] _cond = (v > V_th) and not_refractory 2021-11-05 15:15:28,058 DIAGNOSTIC brian2.devices.device: CA3_inh_thresholder_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var_N = _namespace["_var_N"] cdef int64_t N = _namespace["N"] _var_V_th = _namespace["_var_V_th"] cdef double V_th = _namespace["V_th"] cdef bool _cond _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_inh__spikespace = _namespace['_array_CA3_inh__spikespace'] cdef int32_t * _array_CA3_inh__spikespace = _buf__array_CA3_inh__spikespace.data cdef size_t _num_array_CA3_inh__spikespace = len(_namespace['_array_CA3_inh__spikespace']) cdef int32_t _spikespace _var_lastspike = _namespace["_var_lastspike"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_inh_lastspike = _namespace['_array_CA3_inh_lastspike'] cdef double * _array_CA3_inh_lastspike = _buf__array_CA3_inh_lastspike.data cdef size_t _num_array_CA3_inh_lastspike = len(_namespace['_array_CA3_inh_lastspike']) cdef double lastspike _var_not_refractory = _namespace["_var_not_refractory"] cdef _numpy.ndarray[char, ndim=1, mode='c', cast=True] _buf__array_CA3_inh_not_refractory = _namespace['_array_CA3_inh_not_refractory'] cdef bool * _array_CA3_inh_not_refractory = _buf__array_CA3_inh_not_refractory.data cdef size_t _num_array_CA3_inh_not_refractory = len(_namespace['_array_CA3_inh_not_refractory']) cdef bool not_refractory _var_t = _namespace["_var_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double t _var_v = _namespace["_var_v"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_inh_v = _namespace['_array_CA3_inh_v'] cdef double * _array_CA3_inh_v = _buf__array_CA3_inh_v.data cdef size_t _num_array_CA3_inh_v = len(_namespace['_array_CA3_inh_v']) cdef double v if '_owner' in _namespace: _owner = _namespace['_owner'] # scalar code _vectorisation_idx = 1 cdef size_t _cpp_numevents = 0 for _idx in range(N): # vector code _vectorisation_idx = _idx v = _array_CA3_inh_v[_idx] not_refractory = _array_CA3_inh_not_refractory[_idx] _cond = (v > V_th) and not_refractory if _cond: _array_CA3_inh__spikespace[_cpp_numevents] = _idx _cpp_numevents += 1 _array_CA3_inh_not_refractory[_idx] = False _array_CA3_inh_lastspike[_idx] = _array_defaultclock_t[0] _array_CA3_inh__spikespace[N] = _cpp_numevents before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef int64_t N = _namespace["N"] _var_V_th = _namespace["_var_V_th"] cdef double V_th = _namespace["V_th"] cdef bool _cond _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_inh__spikespace = _namespace['_array_CA3_inh__spikespace'] cdef int32_t * _array_CA3_inh__spikespace = _buf__array_CA3_inh__spikespace.data cdef size_t _num_array_CA3_inh__spikespace = len(_namespace['_array_CA3_inh__spikespace']) cdef int32_t _spikespace _var_lastspike = _namespace["_var_lastspike"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_inh_lastspike = _namespace['_array_CA3_inh_lastspike'] cdef double * _array_CA3_inh_lastspike = _buf__array_CA3_inh_lastspike.data cdef size_t _num_array_CA3_inh_lastspike = len(_namespace['_array_CA3_inh_lastspike']) cdef double lastspike _var_not_refractory = _namespace["_var_not_refractory"] cdef _numpy.ndarray[char, ndim=1, mode='c', cast=True] _buf__array_CA3_inh_not_refractory = _namespace['_array_CA3_inh_not_refractory'] cdef bool * _array_CA3_inh_not_refractory = _buf__array_CA3_inh_not_refractory.data cdef size_t _num_array_CA3_inh_not_refractory = len(_namespace['_array_CA3_inh_not_refractory']) cdef bool not_refractory _var_t = _namespace["_var_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double t _var_v = _namespace["_var_v"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_inh_v = _namespace['_array_CA3_inh_v'] cdef double * _array_CA3_inh_v = _buf__array_CA3_inh_v.data cdef size_t _num_array_CA3_inh_v = len(_namespace['_array_CA3_inh_v']) cdef double v if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef int64_t N = _namespace["N"] _var_V_th = _namespace["_var_V_th"] cdef double V_th = _namespace["V_th"] cdef bool _cond _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_inh__spikespace = _namespace['_array_CA3_inh__spikespace'] cdef int32_t * _array_CA3_inh__spikespace = _buf__array_CA3_inh__spikespace.data cdef size_t _num_array_CA3_inh__spikespace = len(_namespace['_array_CA3_inh__spikespace']) cdef int32_t _spikespace _var_lastspike = _namespace["_var_lastspike"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_inh_lastspike = _namespace['_array_CA3_inh_lastspike'] cdef double * _array_CA3_inh_lastspike = _buf__array_CA3_inh_lastspike.data cdef size_t _num_array_CA3_inh_lastspike = len(_namespace['_array_CA3_inh_lastspike']) cdef double lastspike _var_not_refractory = _namespace["_var_not_refractory"] cdef _numpy.ndarray[char, ndim=1, mode='c', cast=True] _buf__array_CA3_inh_not_refractory = _namespace['_array_CA3_inh_not_refractory'] cdef bool * _array_CA3_inh_not_refractory = _buf__array_CA3_inh_not_refractory.data cdef size_t _num_array_CA3_inh_not_refractory = len(_namespace['_array_CA3_inh_not_refractory']) cdef bool not_refractory _var_t = _namespace["_var_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double t _var_v = _namespace["_var_v"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_inh_v = _namespace['_array_CA3_inh_v'] cdef double * _array_CA3_inh_v = _buf__array_CA3_inh_v.data cdef size_t _num_array_CA3_inh_v = len(_namespace['_array_CA3_inh_v']) cdef double v if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:15:28,058 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name CA3_inh_thresholder_codeobject 2021-11-05 15:15:28,059 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "CA3_inh_threshold" using Cython module "_cython_magic_5604911c2c6ed150020e1fd9ad8ce813" 2021-11-05 15:15:28,059 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140605133234384 on /home/nikos/.cython/brian_extensions/_cython_magic_5604911c2c6ed150020e1fd9ad8ce813.lock 2021-11-05 15:15:28,059 DEBUG brian2.utils.filelock: Lock 140605133234384 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_5604911c2c6ed150020e1fd9ad8ce813.lock 2021-11-05 15:15:28,059 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140605133234384 on /home/nikos/.cython/brian_extensions/_cython_magic_5604911c2c6ed150020e1fd9ad8ce813.lock 2021-11-05 15:15:28,059 DEBUG brian2.utils.filelock: Lock 140605133234384 released on /home/nikos/.cython/brian_extensions/_cython_magic_5604911c2c6ed150020e1fd9ad8ce813.lock 2021-11-05 15:15:28,059 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=CA3_pyCAN, template name=threshold) for abstract code: _cond = (v>V_th) and not_refractory 2021-11-05 15:15:28,062 DIAGNOSTIC brian2.devices.device: CA3_pyCAN_thresholder_codeobject abstract code: _cond = (v>V_th) and not_refractory 2021-11-05 15:15:28,063 DIAGNOSTIC brian2.devices.device: CA3_pyCAN_thresholder_codeobject snippet (scalar): 2021-11-05 15:15:28,063 DIAGNOSTIC brian2.devices.device: CA3_pyCAN_thresholder_codeobject snippet (vector): v = _array_CA3_pyCAN_v[_idx] not_refractory = _array_CA3_pyCAN_not_refractory[_idx] _cond = (v > V_th) and not_refractory 2021-11-05 15:15:28,063 DIAGNOSTIC brian2.devices.device: CA3_pyCAN_thresholder_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var_N = _namespace["_var_N"] cdef int64_t N = _namespace["N"] _var_V_th = _namespace["_var_V_th"] cdef double V_th = _namespace["V_th"] cdef bool _cond _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_pyCAN__spikespace = _namespace['_array_CA3_pyCAN__spikespace'] cdef int32_t * _array_CA3_pyCAN__spikespace = _buf__array_CA3_pyCAN__spikespace.data cdef size_t _num_array_CA3_pyCAN__spikespace = len(_namespace['_array_CA3_pyCAN__spikespace']) cdef int32_t _spikespace _var_lastspike = _namespace["_var_lastspike"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_lastspike = _namespace['_array_CA3_pyCAN_lastspike'] cdef double * _array_CA3_pyCAN_lastspike = _buf__array_CA3_pyCAN_lastspike.data cdef size_t _num_array_CA3_pyCAN_lastspike = len(_namespace['_array_CA3_pyCAN_lastspike']) cdef double lastspike _var_not_refractory = _namespace["_var_not_refractory"] cdef _numpy.ndarray[char, ndim=1, mode='c', cast=True] _buf__array_CA3_pyCAN_not_refractory = _namespace['_array_CA3_pyCAN_not_refractory'] cdef bool * _array_CA3_pyCAN_not_refractory = _buf__array_CA3_pyCAN_not_refractory.data cdef size_t _num_array_CA3_pyCAN_not_refractory = len(_namespace['_array_CA3_pyCAN_not_refractory']) cdef bool not_refractory _var_t = _namespace["_var_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double t _var_v = _namespace["_var_v"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_v = _namespace['_array_CA3_pyCAN_v'] cdef double * _array_CA3_pyCAN_v = _buf__array_CA3_pyCAN_v.data cdef size_t _num_array_CA3_pyCAN_v = len(_namespace['_array_CA3_pyCAN_v']) cdef double v if '_owner' in _namespace: _owner = _namespace['_owner'] # scalar code _vectorisation_idx = 1 cdef size_t _cpp_numevents = 0 for _idx in range(N): # vector code _vectorisation_idx = _idx v = _array_CA3_pyCAN_v[_idx] not_refractory = _array_CA3_pyCAN_not_refractory[_idx] _cond = (v > V_th) and not_refractory if _cond: _array_CA3_pyCAN__spikespace[_cpp_numevents] = _idx _cpp_numevents += 1 _array_CA3_pyCAN_not_refractory[_idx] = False _array_CA3_pyCAN_lastspike[_idx] = _array_defaultclock_t[0] _array_CA3_pyCAN__spikespace[N] = _cpp_numevents before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef int64_t N = _namespace["N"] _var_V_th = _namespace["_var_V_th"] cdef double V_th = _namespace["V_th"] cdef bool _cond _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_pyCAN__spikespace = _namespace['_array_CA3_pyCAN__spikespace'] cdef int32_t * _array_CA3_pyCAN__spikespace = _buf__array_CA3_pyCAN__spikespace.data cdef size_t _num_array_CA3_pyCAN__spikespace = len(_namespace['_array_CA3_pyCAN__spikespace']) cdef int32_t _spikespace _var_lastspike = _namespace["_var_lastspike"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_lastspike = _namespace['_array_CA3_pyCAN_lastspike'] cdef double * _array_CA3_pyCAN_lastspike = _buf__array_CA3_pyCAN_lastspike.data cdef size_t _num_array_CA3_pyCAN_lastspike = len(_namespace['_array_CA3_pyCAN_lastspike']) cdef double lastspike _var_not_refractory = _namespace["_var_not_refractory"] cdef _numpy.ndarray[char, ndim=1, mode='c', cast=True] _buf__array_CA3_pyCAN_not_refractory = _namespace['_array_CA3_pyCAN_not_refractory'] cdef bool * _array_CA3_pyCAN_not_refractory = _buf__array_CA3_pyCAN_not_refractory.data cdef size_t _num_array_CA3_pyCAN_not_refractory = len(_namespace['_array_CA3_pyCAN_not_refractory']) cdef bool not_refractory _var_t = _namespace["_var_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double t _var_v = _namespace["_var_v"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_v = _namespace['_array_CA3_pyCAN_v'] cdef double * _array_CA3_pyCAN_v = _buf__array_CA3_pyCAN_v.data cdef size_t _num_array_CA3_pyCAN_v = len(_namespace['_array_CA3_pyCAN_v']) cdef double v if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef int64_t N = _namespace["N"] _var_V_th = _namespace["_var_V_th"] cdef double V_th = _namespace["V_th"] cdef bool _cond _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_pyCAN__spikespace = _namespace['_array_CA3_pyCAN__spikespace'] cdef int32_t * _array_CA3_pyCAN__spikespace = _buf__array_CA3_pyCAN__spikespace.data cdef size_t _num_array_CA3_pyCAN__spikespace = len(_namespace['_array_CA3_pyCAN__spikespace']) cdef int32_t _spikespace _var_lastspike = _namespace["_var_lastspike"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_lastspike = _namespace['_array_CA3_pyCAN_lastspike'] cdef double * _array_CA3_pyCAN_lastspike = _buf__array_CA3_pyCAN_lastspike.data cdef size_t _num_array_CA3_pyCAN_lastspike = len(_namespace['_array_CA3_pyCAN_lastspike']) cdef double lastspike _var_not_refractory = _namespace["_var_not_refractory"] cdef _numpy.ndarray[char, ndim=1, mode='c', cast=True] _buf__array_CA3_pyCAN_not_refractory = _namespace['_array_CA3_pyCAN_not_refractory'] cdef bool * _array_CA3_pyCAN_not_refractory = _buf__array_CA3_pyCAN_not_refractory.data cdef size_t _num_array_CA3_pyCAN_not_refractory = len(_namespace['_array_CA3_pyCAN_not_refractory']) cdef bool not_refractory _var_t = _namespace["_var_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double t _var_v = _namespace["_var_v"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_v = _namespace['_array_CA3_pyCAN_v'] cdef double * _array_CA3_pyCAN_v = _buf__array_CA3_pyCAN_v.data cdef size_t _num_array_CA3_pyCAN_v = len(_namespace['_array_CA3_pyCAN_v']) cdef double v if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:15:28,063 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name CA3_pyCAN_thresholder_codeobject 2021-11-05 15:15:28,063 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "CA3_pyCAN_threshold" using Cython module "_cython_magic_eedab132d0a7d5899f867c663218dce7" 2021-11-05 15:15:28,063 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140606332147552 on /home/nikos/.cython/brian_extensions/_cython_magic_eedab132d0a7d5899f867c663218dce7.lock 2021-11-05 15:15:28,063 DEBUG brian2.utils.filelock: Lock 140606332147552 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_eedab132d0a7d5899f867c663218dce7.lock 2021-11-05 15:15:28,064 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140606332147552 on /home/nikos/.cython/brian_extensions/_cython_magic_eedab132d0a7d5899f867c663218dce7.lock 2021-11-05 15:15:28,064 DEBUG brian2.utils.filelock: Lock 140606332147552 released on /home/nikos/.cython/brian_extensions/_cython_magic_eedab132d0a7d5899f867c663218dce7.lock 2021-11-05 15:15:28,064 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=DG_inh, template name=threshold) for abstract code: _cond = (v>V_th) and not_refractory 2021-11-05 15:15:28,066 DIAGNOSTIC brian2.devices.device: DG_inh_thresholder_codeobject abstract code: _cond = (v>V_th) and not_refractory 2021-11-05 15:15:28,066 DIAGNOSTIC brian2.devices.device: DG_inh_thresholder_codeobject snippet (scalar): 2021-11-05 15:15:28,066 DIAGNOSTIC brian2.devices.device: DG_inh_thresholder_codeobject snippet (vector): v = _array_DG_inh_v[_idx] not_refractory = _array_DG_inh_not_refractory[_idx] _cond = (v > V_th) and not_refractory 2021-11-05 15:15:28,067 DIAGNOSTIC brian2.devices.device: DG_inh_thresholder_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var_N = _namespace["_var_N"] cdef int64_t N = _namespace["N"] _var_V_th = _namespace["_var_V_th"] cdef double V_th = _namespace["V_th"] cdef bool _cond _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_DG_inh__spikespace = _namespace['_array_DG_inh__spikespace'] cdef int32_t * _array_DG_inh__spikespace = _buf__array_DG_inh__spikespace.data cdef size_t _num_array_DG_inh__spikespace = len(_namespace['_array_DG_inh__spikespace']) cdef int32_t _spikespace _var_lastspike = _namespace["_var_lastspike"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_inh_lastspike = _namespace['_array_DG_inh_lastspike'] cdef double * _array_DG_inh_lastspike = _buf__array_DG_inh_lastspike.data cdef size_t _num_array_DG_inh_lastspike = len(_namespace['_array_DG_inh_lastspike']) cdef double lastspike _var_not_refractory = _namespace["_var_not_refractory"] cdef _numpy.ndarray[char, ndim=1, mode='c', cast=True] _buf__array_DG_inh_not_refractory = _namespace['_array_DG_inh_not_refractory'] cdef bool * _array_DG_inh_not_refractory = _buf__array_DG_inh_not_refractory.data cdef size_t _num_array_DG_inh_not_refractory = len(_namespace['_array_DG_inh_not_refractory']) cdef bool not_refractory _var_t = _namespace["_var_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double t _var_v = _namespace["_var_v"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_inh_v = _namespace['_array_DG_inh_v'] cdef double * _array_DG_inh_v = _buf__array_DG_inh_v.data cdef size_t _num_array_DG_inh_v = len(_namespace['_array_DG_inh_v']) cdef double v if '_owner' in _namespace: _owner = _namespace['_owner'] # scalar code _vectorisation_idx = 1 cdef size_t _cpp_numevents = 0 for _idx in range(N): # vector code _vectorisation_idx = _idx v = _array_DG_inh_v[_idx] not_refractory = _array_DG_inh_not_refractory[_idx] _cond = (v > V_th) and not_refractory if _cond: _array_DG_inh__spikespace[_cpp_numevents] = _idx _cpp_numevents += 1 _array_DG_inh_not_refractory[_idx] = False _array_DG_inh_lastspike[_idx] = _array_defaultclock_t[0] _array_DG_inh__spikespace[N] = _cpp_numevents before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef int64_t N = _namespace["N"] _var_V_th = _namespace["_var_V_th"] cdef double V_th = _namespace["V_th"] cdef bool _cond _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_DG_inh__spikespace = _namespace['_array_DG_inh__spikespace'] cdef int32_t * _array_DG_inh__spikespace = _buf__array_DG_inh__spikespace.data cdef size_t _num_array_DG_inh__spikespace = len(_namespace['_array_DG_inh__spikespace']) cdef int32_t _spikespace _var_lastspike = _namespace["_var_lastspike"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_inh_lastspike = _namespace['_array_DG_inh_lastspike'] cdef double * _array_DG_inh_lastspike = _buf__array_DG_inh_lastspike.data cdef size_t _num_array_DG_inh_lastspike = len(_namespace['_array_DG_inh_lastspike']) cdef double lastspike _var_not_refractory = _namespace["_var_not_refractory"] cdef _numpy.ndarray[char, ndim=1, mode='c', cast=True] _buf__array_DG_inh_not_refractory = _namespace['_array_DG_inh_not_refractory'] cdef bool * _array_DG_inh_not_refractory = _buf__array_DG_inh_not_refractory.data cdef size_t _num_array_DG_inh_not_refractory = len(_namespace['_array_DG_inh_not_refractory']) cdef bool not_refractory _var_t = _namespace["_var_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double t _var_v = _namespace["_var_v"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_inh_v = _namespace['_array_DG_inh_v'] cdef double * _array_DG_inh_v = _buf__array_DG_inh_v.data cdef size_t _num_array_DG_inh_v = len(_namespace['_array_DG_inh_v']) cdef double v if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef int64_t N = _namespace["N"] _var_V_th = _namespace["_var_V_th"] cdef double V_th = _namespace["V_th"] cdef bool _cond _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_DG_inh__spikespace = _namespace['_array_DG_inh__spikespace'] cdef int32_t * _array_DG_inh__spikespace = _buf__array_DG_inh__spikespace.data cdef size_t _num_array_DG_inh__spikespace = len(_namespace['_array_DG_inh__spikespace']) cdef int32_t _spikespace _var_lastspike = _namespace["_var_lastspike"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_inh_lastspike = _namespace['_array_DG_inh_lastspike'] cdef double * _array_DG_inh_lastspike = _buf__array_DG_inh_lastspike.data cdef size_t _num_array_DG_inh_lastspike = len(_namespace['_array_DG_inh_lastspike']) cdef double lastspike _var_not_refractory = _namespace["_var_not_refractory"] cdef _numpy.ndarray[char, ndim=1, mode='c', cast=True] _buf__array_DG_inh_not_refractory = _namespace['_array_DG_inh_not_refractory'] cdef bool * _array_DG_inh_not_refractory = _buf__array_DG_inh_not_refractory.data cdef size_t _num_array_DG_inh_not_refractory = len(_namespace['_array_DG_inh_not_refractory']) cdef bool not_refractory _var_t = _namespace["_var_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double t _var_v = _namespace["_var_v"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_inh_v = _namespace['_array_DG_inh_v'] cdef double * _array_DG_inh_v = _buf__array_DG_inh_v.data cdef size_t _num_array_DG_inh_v = len(_namespace['_array_DG_inh_v']) cdef double v if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:15:28,067 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name DG_inh_thresholder_codeobject 2021-11-05 15:15:28,067 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "DG_inh_threshold" using Cython module "_cython_magic_a346e4d356609a1b4dc886c930febdbc" 2021-11-05 15:15:28,067 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140606332149376 on /home/nikos/.cython/brian_extensions/_cython_magic_a346e4d356609a1b4dc886c930febdbc.lock 2021-11-05 15:15:28,067 DEBUG brian2.utils.filelock: Lock 140606332149376 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_a346e4d356609a1b4dc886c930febdbc.lock 2021-11-05 15:15:28,067 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140606332149376 on /home/nikos/.cython/brian_extensions/_cython_magic_a346e4d356609a1b4dc886c930febdbc.lock 2021-11-05 15:15:28,067 DEBUG brian2.utils.filelock: Lock 140606332149376 released on /home/nikos/.cython/brian_extensions/_cython_magic_a346e4d356609a1b4dc886c930febdbc.lock 2021-11-05 15:15:28,067 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=DG_py, template name=threshold) for abstract code: _cond = (v>V_th) and not_refractory 2021-11-05 15:15:28,070 DIAGNOSTIC brian2.devices.device: DG_py_thresholder_codeobject abstract code: _cond = (v>V_th) and not_refractory 2021-11-05 15:15:28,071 DIAGNOSTIC brian2.devices.device: DG_py_thresholder_codeobject snippet (scalar): 2021-11-05 15:15:28,071 DIAGNOSTIC brian2.devices.device: DG_py_thresholder_codeobject snippet (vector): v = _array_DG_py_v[_idx] not_refractory = _array_DG_py_not_refractory[_idx] _cond = (v > V_th) and not_refractory 2021-11-05 15:15:28,071 DIAGNOSTIC brian2.devices.device: DG_py_thresholder_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var_N = _namespace["_var_N"] cdef int64_t N = _namespace["N"] _var_V_th = _namespace["_var_V_th"] cdef double V_th = _namespace["V_th"] cdef bool _cond _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_DG_py__spikespace = _namespace['_array_DG_py__spikespace'] cdef int32_t * _array_DG_py__spikespace = _buf__array_DG_py__spikespace.data cdef size_t _num_array_DG_py__spikespace = len(_namespace['_array_DG_py__spikespace']) cdef int32_t _spikespace _var_lastspike = _namespace["_var_lastspike"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_lastspike = _namespace['_array_DG_py_lastspike'] cdef double * _array_DG_py_lastspike = _buf__array_DG_py_lastspike.data cdef size_t _num_array_DG_py_lastspike = len(_namespace['_array_DG_py_lastspike']) cdef double lastspike _var_not_refractory = _namespace["_var_not_refractory"] cdef _numpy.ndarray[char, ndim=1, mode='c', cast=True] _buf__array_DG_py_not_refractory = _namespace['_array_DG_py_not_refractory'] cdef bool * _array_DG_py_not_refractory = _buf__array_DG_py_not_refractory.data cdef size_t _num_array_DG_py_not_refractory = len(_namespace['_array_DG_py_not_refractory']) cdef bool not_refractory _var_t = _namespace["_var_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double t _var_v = _namespace["_var_v"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_v = _namespace['_array_DG_py_v'] cdef double * _array_DG_py_v = _buf__array_DG_py_v.data cdef size_t _num_array_DG_py_v = len(_namespace['_array_DG_py_v']) cdef double v if '_owner' in _namespace: _owner = _namespace['_owner'] # scalar code _vectorisation_idx = 1 cdef size_t _cpp_numevents = 0 for _idx in range(N): # vector code _vectorisation_idx = _idx v = _array_DG_py_v[_idx] not_refractory = _array_DG_py_not_refractory[_idx] _cond = (v > V_th) and not_refractory if _cond: _array_DG_py__spikespace[_cpp_numevents] = _idx _cpp_numevents += 1 _array_DG_py_not_refractory[_idx] = False _array_DG_py_lastspike[_idx] = _array_defaultclock_t[0] _array_DG_py__spikespace[N] = _cpp_numevents before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef int64_t N = _namespace["N"] _var_V_th = _namespace["_var_V_th"] cdef double V_th = _namespace["V_th"] cdef bool _cond _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_DG_py__spikespace = _namespace['_array_DG_py__spikespace'] cdef int32_t * _array_DG_py__spikespace = _buf__array_DG_py__spikespace.data cdef size_t _num_array_DG_py__spikespace = len(_namespace['_array_DG_py__spikespace']) cdef int32_t _spikespace _var_lastspike = _namespace["_var_lastspike"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_lastspike = _namespace['_array_DG_py_lastspike'] cdef double * _array_DG_py_lastspike = _buf__array_DG_py_lastspike.data cdef size_t _num_array_DG_py_lastspike = len(_namespace['_array_DG_py_lastspike']) cdef double lastspike _var_not_refractory = _namespace["_var_not_refractory"] cdef _numpy.ndarray[char, ndim=1, mode='c', cast=True] _buf__array_DG_py_not_refractory = _namespace['_array_DG_py_not_refractory'] cdef bool * _array_DG_py_not_refractory = _buf__array_DG_py_not_refractory.data cdef size_t _num_array_DG_py_not_refractory = len(_namespace['_array_DG_py_not_refractory']) cdef bool not_refractory _var_t = _namespace["_var_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double t _var_v = _namespace["_var_v"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_v = _namespace['_array_DG_py_v'] cdef double * _array_DG_py_v = _buf__array_DG_py_v.data cdef size_t _num_array_DG_py_v = len(_namespace['_array_DG_py_v']) cdef double v if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef int64_t N = _namespace["N"] _var_V_th = _namespace["_var_V_th"] cdef double V_th = _namespace["V_th"] cdef bool _cond _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_DG_py__spikespace = _namespace['_array_DG_py__spikespace'] cdef int32_t * _array_DG_py__spikespace = _buf__array_DG_py__spikespace.data cdef size_t _num_array_DG_py__spikespace = len(_namespace['_array_DG_py__spikespace']) cdef int32_t _spikespace _var_lastspike = _namespace["_var_lastspike"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_lastspike = _namespace['_array_DG_py_lastspike'] cdef double * _array_DG_py_lastspike = _buf__array_DG_py_lastspike.data cdef size_t _num_array_DG_py_lastspike = len(_namespace['_array_DG_py_lastspike']) cdef double lastspike _var_not_refractory = _namespace["_var_not_refractory"] cdef _numpy.ndarray[char, ndim=1, mode='c', cast=True] _buf__array_DG_py_not_refractory = _namespace['_array_DG_py_not_refractory'] cdef bool * _array_DG_py_not_refractory = _buf__array_DG_py_not_refractory.data cdef size_t _num_array_DG_py_not_refractory = len(_namespace['_array_DG_py_not_refractory']) cdef bool not_refractory _var_t = _namespace["_var_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double t _var_v = _namespace["_var_v"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_v = _namespace['_array_DG_py_v'] cdef double * _array_DG_py_v = _buf__array_DG_py_v.data cdef size_t _num_array_DG_py_v = len(_namespace['_array_DG_py_v']) cdef double v if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:15:28,071 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name DG_py_thresholder_codeobject 2021-11-05 15:15:28,072 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "DG_py_threshold" using Cython module "_cython_magic_bccf14f0e7233a39a13080aabb75e90a" 2021-11-05 15:15:28,072 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140606332147504 on /home/nikos/.cython/brian_extensions/_cython_magic_bccf14f0e7233a39a13080aabb75e90a.lock 2021-11-05 15:15:28,072 DEBUG brian2.utils.filelock: Lock 140606332147504 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_bccf14f0e7233a39a13080aabb75e90a.lock 2021-11-05 15:15:28,072 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140606332147504 on /home/nikos/.cython/brian_extensions/_cython_magic_bccf14f0e7233a39a13080aabb75e90a.lock 2021-11-05 15:15:28,072 DEBUG brian2.utils.filelock: Lock 140606332147504 released on /home/nikos/.cython/brian_extensions/_cython_magic_bccf14f0e7233a39a13080aabb75e90a.lock 2021-11-05 15:15:28,072 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=EC_inh, template name=threshold) for abstract code: _cond = (v>V_th) and not_refractory 2021-11-05 15:15:28,075 DIAGNOSTIC brian2.devices.device: EC_inh_thresholder_codeobject abstract code: _cond = (v>V_th) and not_refractory 2021-11-05 15:15:28,075 DIAGNOSTIC brian2.devices.device: EC_inh_thresholder_codeobject snippet (scalar): 2021-11-05 15:15:28,075 DIAGNOSTIC brian2.devices.device: EC_inh_thresholder_codeobject snippet (vector): v = _array_EC_inh_v[_idx] not_refractory = _array_EC_inh_not_refractory[_idx] _cond = (v > V_th) and not_refractory 2021-11-05 15:15:28,075 DIAGNOSTIC brian2.devices.device: EC_inh_thresholder_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var_N = _namespace["_var_N"] cdef int64_t N = _namespace["N"] _var_V_th = _namespace["_var_V_th"] cdef double V_th = _namespace["V_th"] cdef bool _cond _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_inh__spikespace = _namespace['_array_EC_inh__spikespace'] cdef int32_t * _array_EC_inh__spikespace = _buf__array_EC_inh__spikespace.data cdef size_t _num_array_EC_inh__spikespace = len(_namespace['_array_EC_inh__spikespace']) cdef int32_t _spikespace _var_lastspike = _namespace["_var_lastspike"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_inh_lastspike = _namespace['_array_EC_inh_lastspike'] cdef double * _array_EC_inh_lastspike = _buf__array_EC_inh_lastspike.data cdef size_t _num_array_EC_inh_lastspike = len(_namespace['_array_EC_inh_lastspike']) cdef double lastspike _var_not_refractory = _namespace["_var_not_refractory"] cdef _numpy.ndarray[char, ndim=1, mode='c', cast=True] _buf__array_EC_inh_not_refractory = _namespace['_array_EC_inh_not_refractory'] cdef bool * _array_EC_inh_not_refractory = _buf__array_EC_inh_not_refractory.data cdef size_t _num_array_EC_inh_not_refractory = len(_namespace['_array_EC_inh_not_refractory']) cdef bool not_refractory _var_t = _namespace["_var_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double t _var_v = _namespace["_var_v"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_inh_v = _namespace['_array_EC_inh_v'] cdef double * _array_EC_inh_v = _buf__array_EC_inh_v.data cdef size_t _num_array_EC_inh_v = len(_namespace['_array_EC_inh_v']) cdef double v if '_owner' in _namespace: _owner = _namespace['_owner'] # scalar code _vectorisation_idx = 1 cdef size_t _cpp_numevents = 0 for _idx in range(N): # vector code _vectorisation_idx = _idx v = _array_EC_inh_v[_idx] not_refractory = _array_EC_inh_not_refractory[_idx] _cond = (v > V_th) and not_refractory if _cond: _array_EC_inh__spikespace[_cpp_numevents] = _idx _cpp_numevents += 1 _array_EC_inh_not_refractory[_idx] = False _array_EC_inh_lastspike[_idx] = _array_defaultclock_t[0] _array_EC_inh__spikespace[N] = _cpp_numevents before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef int64_t N = _namespace["N"] _var_V_th = _namespace["_var_V_th"] cdef double V_th = _namespace["V_th"] cdef bool _cond _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_inh__spikespace = _namespace['_array_EC_inh__spikespace'] cdef int32_t * _array_EC_inh__spikespace = _buf__array_EC_inh__spikespace.data cdef size_t _num_array_EC_inh__spikespace = len(_namespace['_array_EC_inh__spikespace']) cdef int32_t _spikespace _var_lastspike = _namespace["_var_lastspike"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_inh_lastspike = _namespace['_array_EC_inh_lastspike'] cdef double * _array_EC_inh_lastspike = _buf__array_EC_inh_lastspike.data cdef size_t _num_array_EC_inh_lastspike = len(_namespace['_array_EC_inh_lastspike']) cdef double lastspike _var_not_refractory = _namespace["_var_not_refractory"] cdef _numpy.ndarray[char, ndim=1, mode='c', cast=True] _buf__array_EC_inh_not_refractory = _namespace['_array_EC_inh_not_refractory'] cdef bool * _array_EC_inh_not_refractory = _buf__array_EC_inh_not_refractory.data cdef size_t _num_array_EC_inh_not_refractory = len(_namespace['_array_EC_inh_not_refractory']) cdef bool not_refractory _var_t = _namespace["_var_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double t _var_v = _namespace["_var_v"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_inh_v = _namespace['_array_EC_inh_v'] cdef double * _array_EC_inh_v = _buf__array_EC_inh_v.data cdef size_t _num_array_EC_inh_v = len(_namespace['_array_EC_inh_v']) cdef double v if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef int64_t N = _namespace["N"] _var_V_th = _namespace["_var_V_th"] cdef double V_th = _namespace["V_th"] cdef bool _cond _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_inh__spikespace = _namespace['_array_EC_inh__spikespace'] cdef int32_t * _array_EC_inh__spikespace = _buf__array_EC_inh__spikespace.data cdef size_t _num_array_EC_inh__spikespace = len(_namespace['_array_EC_inh__spikespace']) cdef int32_t _spikespace _var_lastspike = _namespace["_var_lastspike"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_inh_lastspike = _namespace['_array_EC_inh_lastspike'] cdef double * _array_EC_inh_lastspike = _buf__array_EC_inh_lastspike.data cdef size_t _num_array_EC_inh_lastspike = len(_namespace['_array_EC_inh_lastspike']) cdef double lastspike _var_not_refractory = _namespace["_var_not_refractory"] cdef _numpy.ndarray[char, ndim=1, mode='c', cast=True] _buf__array_EC_inh_not_refractory = _namespace['_array_EC_inh_not_refractory'] cdef bool * _array_EC_inh_not_refractory = _buf__array_EC_inh_not_refractory.data cdef size_t _num_array_EC_inh_not_refractory = len(_namespace['_array_EC_inh_not_refractory']) cdef bool not_refractory _var_t = _namespace["_var_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double t _var_v = _namespace["_var_v"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_inh_v = _namespace['_array_EC_inh_v'] cdef double * _array_EC_inh_v = _buf__array_EC_inh_v.data cdef size_t _num_array_EC_inh_v = len(_namespace['_array_EC_inh_v']) cdef double v if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:15:28,075 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name EC_inh_thresholder_codeobject 2021-11-05 15:15:28,076 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "EC_inh_threshold" using Cython module "_cython_magic_04185e9aa149eaa9384f22ec6cf5bb05" 2021-11-05 15:15:28,076 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140606332149376 on /home/nikos/.cython/brian_extensions/_cython_magic_04185e9aa149eaa9384f22ec6cf5bb05.lock 2021-11-05 15:15:28,076 DEBUG brian2.utils.filelock: Lock 140606332149376 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_04185e9aa149eaa9384f22ec6cf5bb05.lock 2021-11-05 15:15:28,076 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140606332149376 on /home/nikos/.cython/brian_extensions/_cython_magic_04185e9aa149eaa9384f22ec6cf5bb05.lock 2021-11-05 15:15:28,076 DEBUG brian2.utils.filelock: Lock 140606332149376 released on /home/nikos/.cython/brian_extensions/_cython_magic_04185e9aa149eaa9384f22ec6cf5bb05.lock 2021-11-05 15:15:28,076 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=EC_pyCAN, template name=threshold) for abstract code: _cond = (v>V_th) and not_refractory 2021-11-05 15:15:28,079 DIAGNOSTIC brian2.devices.device: EC_pyCAN_thresholder_codeobject abstract code: _cond = (v>V_th) and not_refractory 2021-11-05 15:15:28,080 DIAGNOSTIC brian2.devices.device: EC_pyCAN_thresholder_codeobject snippet (scalar): 2021-11-05 15:15:28,080 DIAGNOSTIC brian2.devices.device: EC_pyCAN_thresholder_codeobject snippet (vector): v = _array_EC_pyCAN_v[_idx] not_refractory = _array_EC_pyCAN_not_refractory[_idx] _cond = (v > V_th) and not_refractory 2021-11-05 15:15:28,080 DIAGNOSTIC brian2.devices.device: EC_pyCAN_thresholder_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var_N = _namespace["_var_N"] cdef int64_t N = _namespace["N"] _var_V_th = _namespace["_var_V_th"] cdef double V_th = _namespace["V_th"] cdef bool _cond _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCAN__spikespace = _namespace['_array_EC_pyCAN__spikespace'] cdef int32_t * _array_EC_pyCAN__spikespace = _buf__array_EC_pyCAN__spikespace.data cdef size_t _num_array_EC_pyCAN__spikespace = len(_namespace['_array_EC_pyCAN__spikespace']) cdef int32_t _spikespace _var_lastspike = _namespace["_var_lastspike"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_lastspike = _namespace['_array_EC_pyCAN_lastspike'] cdef double * _array_EC_pyCAN_lastspike = _buf__array_EC_pyCAN_lastspike.data cdef size_t _num_array_EC_pyCAN_lastspike = len(_namespace['_array_EC_pyCAN_lastspike']) cdef double lastspike _var_not_refractory = _namespace["_var_not_refractory"] cdef _numpy.ndarray[char, ndim=1, mode='c', cast=True] _buf__array_EC_pyCAN_not_refractory = _namespace['_array_EC_pyCAN_not_refractory'] cdef bool * _array_EC_pyCAN_not_refractory = _buf__array_EC_pyCAN_not_refractory.data cdef size_t _num_array_EC_pyCAN_not_refractory = len(_namespace['_array_EC_pyCAN_not_refractory']) cdef bool not_refractory _var_t = _namespace["_var_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double t _var_v = _namespace["_var_v"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_v = _namespace['_array_EC_pyCAN_v'] cdef double * _array_EC_pyCAN_v = _buf__array_EC_pyCAN_v.data cdef size_t _num_array_EC_pyCAN_v = len(_namespace['_array_EC_pyCAN_v']) cdef double v if '_owner' in _namespace: _owner = _namespace['_owner'] # scalar code _vectorisation_idx = 1 cdef size_t _cpp_numevents = 0 for _idx in range(N): # vector code _vectorisation_idx = _idx v = _array_EC_pyCAN_v[_idx] not_refractory = _array_EC_pyCAN_not_refractory[_idx] _cond = (v > V_th) and not_refractory if _cond: _array_EC_pyCAN__spikespace[_cpp_numevents] = _idx _cpp_numevents += 1 _array_EC_pyCAN_not_refractory[_idx] = False _array_EC_pyCAN_lastspike[_idx] = _array_defaultclock_t[0] _array_EC_pyCAN__spikespace[N] = _cpp_numevents before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef int64_t N = _namespace["N"] _var_V_th = _namespace["_var_V_th"] cdef double V_th = _namespace["V_th"] cdef bool _cond _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCAN__spikespace = _namespace['_array_EC_pyCAN__spikespace'] cdef int32_t * _array_EC_pyCAN__spikespace = _buf__array_EC_pyCAN__spikespace.data cdef size_t _num_array_EC_pyCAN__spikespace = len(_namespace['_array_EC_pyCAN__spikespace']) cdef int32_t _spikespace _var_lastspike = _namespace["_var_lastspike"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_lastspike = _namespace['_array_EC_pyCAN_lastspike'] cdef double * _array_EC_pyCAN_lastspike = _buf__array_EC_pyCAN_lastspike.data cdef size_t _num_array_EC_pyCAN_lastspike = len(_namespace['_array_EC_pyCAN_lastspike']) cdef double lastspike _var_not_refractory = _namespace["_var_not_refractory"] cdef _numpy.ndarray[char, ndim=1, mode='c', cast=True] _buf__array_EC_pyCAN_not_refractory = _namespace['_array_EC_pyCAN_not_refractory'] cdef bool * _array_EC_pyCAN_not_refractory = _buf__array_EC_pyCAN_not_refractory.data cdef size_t _num_array_EC_pyCAN_not_refractory = len(_namespace['_array_EC_pyCAN_not_refractory']) cdef bool not_refractory _var_t = _namespace["_var_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double t _var_v = _namespace["_var_v"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_v = _namespace['_array_EC_pyCAN_v'] cdef double * _array_EC_pyCAN_v = _buf__array_EC_pyCAN_v.data cdef size_t _num_array_EC_pyCAN_v = len(_namespace['_array_EC_pyCAN_v']) cdef double v if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef int64_t N = _namespace["N"] _var_V_th = _namespace["_var_V_th"] cdef double V_th = _namespace["V_th"] cdef bool _cond _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCAN__spikespace = _namespace['_array_EC_pyCAN__spikespace'] cdef int32_t * _array_EC_pyCAN__spikespace = _buf__array_EC_pyCAN__spikespace.data cdef size_t _num_array_EC_pyCAN__spikespace = len(_namespace['_array_EC_pyCAN__spikespace']) cdef int32_t _spikespace _var_lastspike = _namespace["_var_lastspike"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_lastspike = _namespace['_array_EC_pyCAN_lastspike'] cdef double * _array_EC_pyCAN_lastspike = _buf__array_EC_pyCAN_lastspike.data cdef size_t _num_array_EC_pyCAN_lastspike = len(_namespace['_array_EC_pyCAN_lastspike']) cdef double lastspike _var_not_refractory = _namespace["_var_not_refractory"] cdef _numpy.ndarray[char, ndim=1, mode='c', cast=True] _buf__array_EC_pyCAN_not_refractory = _namespace['_array_EC_pyCAN_not_refractory'] cdef bool * _array_EC_pyCAN_not_refractory = _buf__array_EC_pyCAN_not_refractory.data cdef size_t _num_array_EC_pyCAN_not_refractory = len(_namespace['_array_EC_pyCAN_not_refractory']) cdef bool not_refractory _var_t = _namespace["_var_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double t _var_v = _namespace["_var_v"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_v = _namespace['_array_EC_pyCAN_v'] cdef double * _array_EC_pyCAN_v = _buf__array_EC_pyCAN_v.data cdef size_t _num_array_EC_pyCAN_v = len(_namespace['_array_EC_pyCAN_v']) cdef double v if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:15:28,080 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name EC_pyCAN_thresholder_codeobject 2021-11-05 15:15:28,081 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "EC_pyCAN_threshold" using Cython module "_cython_magic_570c675bddc8fafc93a661f914783e90" 2021-11-05 15:15:28,081 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140606217451216 on /home/nikos/.cython/brian_extensions/_cython_magic_570c675bddc8fafc93a661f914783e90.lock 2021-11-05 15:15:28,081 DEBUG brian2.utils.filelock: Lock 140606217451216 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_570c675bddc8fafc93a661f914783e90.lock 2021-11-05 15:15:28,081 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140606217451216 on /home/nikos/.cython/brian_extensions/_cython_magic_570c675bddc8fafc93a661f914783e90.lock 2021-11-05 15:15:28,081 DEBUG brian2.utils.filelock: Lock 140606217451216 released on /home/nikos/.cython/brian_extensions/_cython_magic_570c675bddc8fafc93a661f914783e90.lock 2021-11-05 15:15:28,081 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=Kuramoto_oscillators_N_50, template name=threshold) for abstract code: _cond = True 2021-11-05 15:15:28,082 DIAGNOSTIC brian2.devices.device: Kuramoto_oscillators_N_50_thresholder_codeobject abstract code: _cond = True 2021-11-05 15:15:28,082 DIAGNOSTIC brian2.devices.device: Kuramoto_oscillators_N_50_thresholder_codeobject snippet (scalar): 2021-11-05 15:15:28,082 DIAGNOSTIC brian2.devices.device: Kuramoto_oscillators_N_50_thresholder_codeobject snippet (vector): _cond = 1 2021-11-05 15:15:28,082 DIAGNOSTIC brian2.devices.device: Kuramoto_oscillators_N_50_thresholder_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var_N = _namespace["_var_N"] cdef int64_t N = _namespace["N"] cdef bool _cond _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_Kuramoto_oscillators_N_50__spikespace = _namespace['_array_Kuramoto_oscillators_N_50__spikespace'] cdef int32_t * _array_Kuramoto_oscillators_N_50__spikespace = _buf__array_Kuramoto_oscillators_N_50__spikespace.data cdef size_t _num_array_Kuramoto_oscillators_N_50__spikespace = len(_namespace['_array_Kuramoto_oscillators_N_50__spikespace']) cdef int32_t _spikespace if '_owner' in _namespace: _owner = _namespace['_owner'] # scalar code _vectorisation_idx = 1 cdef size_t _cpp_numevents = 0 for _idx in range(N): # vector code _vectorisation_idx = _idx _cond = 1 if _cond: _array_Kuramoto_oscillators_N_50__spikespace[_cpp_numevents] = _idx _cpp_numevents += 1 _array_Kuramoto_oscillators_N_50__spikespace[N] = _cpp_numevents before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef int64_t N = _namespace["N"] cdef bool _cond _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_Kuramoto_oscillators_N_50__spikespace = _namespace['_array_Kuramoto_oscillators_N_50__spikespace'] cdef int32_t * _array_Kuramoto_oscillators_N_50__spikespace = _buf__array_Kuramoto_oscillators_N_50__spikespace.data cdef size_t _num_array_Kuramoto_oscillators_N_50__spikespace = len(_namespace['_array_Kuramoto_oscillators_N_50__spikespace']) cdef int32_t _spikespace if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef int64_t N = _namespace["N"] cdef bool _cond _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_Kuramoto_oscillators_N_50__spikespace = _namespace['_array_Kuramoto_oscillators_N_50__spikespace'] cdef int32_t * _array_Kuramoto_oscillators_N_50__spikespace = _buf__array_Kuramoto_oscillators_N_50__spikespace.data cdef size_t _num_array_Kuramoto_oscillators_N_50__spikespace = len(_namespace['_array_Kuramoto_oscillators_N_50__spikespace']) cdef int32_t _spikespace if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:15:28,083 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name Kuramoto_oscillators_N_50_thresholder_codeobject 2021-11-05 15:15:28,083 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "Kuramoto_oscillators_N_50_threshold" using Cython module "_cython_magic_c16e3040660b4cdf16610dcb9ceb78da" 2021-11-05 15:15:28,083 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140606217451024 on /home/nikos/.cython/brian_extensions/_cython_magic_c16e3040660b4cdf16610dcb9ceb78da.lock 2021-11-05 15:15:28,083 DEBUG brian2.utils.filelock: Lock 140606217451024 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_c16e3040660b4cdf16610dcb9ceb78da.lock 2021-11-05 15:15:28,083 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140606217451024 on /home/nikos/.cython/brian_extensions/_cython_magic_c16e3040660b4cdf16610dcb9ceb78da.lock 2021-11-05 15:15:28,083 DEBUG brian2.utils.filelock: Lock 140606217451024 released on /home/nikos/.cython/brian_extensions/_cython_magic_c16e3040660b4cdf16610dcb9ceb78da.lock 2021-11-05 15:15:28,083 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=spikemonitor, template name=spikemonitor) for abstract code: _to_record_t = _source_t _to_record_i = _source_i 2021-11-05 15:15:28,088 DIAGNOSTIC brian2.devices.device: spikemonitor_codeobject abstract code: _to_record_t = _source_t _to_record_i = _source_i 2021-11-05 15:15:28,088 DIAGNOSTIC brian2.devices.device: spikemonitor_codeobject snippet (scalar): _source_t = _array_defaultclock_t[0] 2021-11-05 15:15:28,088 DIAGNOSTIC brian2.devices.device: spikemonitor_codeobject snippet (vector): _source_i = _array_EC_pyCAN_i[_idx] _to_record_t = _source_t _to_record_i = _source_i 2021-11-05 15:15:28,089 DIAGNOSTIC brian2.devices.device: spikemonitor_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_spikemonitor_N = _namespace['_array_spikemonitor_N'] cdef int32_t * _array_spikemonitor_N = _buf__array_spikemonitor_N.data cdef int32_t N _var__clock_t = _namespace["_var__clock_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double _clock_t _var__source_i = _namespace["_var__source_i"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCAN_i = _namespace['_array_EC_pyCAN_i'] cdef int32_t * _array_EC_pyCAN_i = _buf__array_EC_pyCAN_i.data cdef size_t _num_array_EC_pyCAN_i = len(_namespace['_array_EC_pyCAN_i']) cdef int32_t _source_i _var__source_idx = _namespace["_var__source_idx"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_spikemonitor__source_idx = _namespace['_array_spikemonitor__source_idx'] cdef int32_t * _array_spikemonitor__source_idx = _buf__array_spikemonitor__source_idx.data cdef size_t _num_array_spikemonitor__source_idx = len(_namespace['_array_spikemonitor__source_idx']) cdef int32_t _source_idx _var__source_start = _namespace["_var__source_start"] cdef int64_t _source_start = _namespace["_source_start"] _var__source_stop = _namespace["_var__source_stop"] cdef int64_t _source_stop = _namespace["_source_stop"] _var__source_t = _namespace["_var__source_t"] _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCAN__spikespace = _namespace['_array_EC_pyCAN__spikespace'] cdef int32_t * _array_EC_pyCAN__spikespace = _buf__array_EC_pyCAN__spikespace.data cdef size_t _num_array_EC_pyCAN__spikespace = len(_namespace['_array_EC_pyCAN__spikespace']) cdef int32_t _spikespace cdef int32_t _to_record_i cdef double _to_record_t _var_count = _namespace["_var_count"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_spikemonitor_count = _namespace['_array_spikemonitor_count'] cdef int32_t * _array_spikemonitor_count = _buf__array_spikemonitor_count.data cdef size_t _num_array_spikemonitor_count = len(_namespace['_array_spikemonitor_count']) cdef int32_t count _var_i = _namespace["_var_i"] _dynamic_array_spikemonitor_i = _namespace["_dynamic_array_spikemonitor_i"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_spikemonitor_i = _namespace['_array_spikemonitor_i'] cdef int32_t * _array_spikemonitor_i = _buf__array_spikemonitor_i.data cdef size_t _num_array_spikemonitor_i = len(_namespace['_array_spikemonitor_i']) cdef int32_t i _var_t = _namespace["_var_t"] _dynamic_array_spikemonitor_t = _namespace["_dynamic_array_spikemonitor_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_spikemonitor_t = _namespace['_array_spikemonitor_t'] cdef double * _array_spikemonitor_t = _buf__array_spikemonitor_t.data cdef size_t _num_array_spikemonitor_t = len(_namespace['_array_spikemonitor_t']) cdef double t if '_owner' in _namespace: _owner = _namespace['_owner'] cdef size_t _num_events = _array_EC_pyCAN__spikespace[_num_array_EC_pyCAN__spikespace-1] cdef size_t _start_idx, _end_idx, _curlen, _newlen, _j cdef int32_t[:] _i_view cdef double[:] _t_view if _num_events > 0: # For subgroups, we do not want to record all spikes # We assume that spikes are ordered _start_idx = _num_events _end_idx = _num_events for _j in range(_num_events): _idx = _array_EC_pyCAN__spikespace[_j] if _idx >= _source_start: _start_idx = _j break for _j in range(_num_events-1, _start_idx-1, -1): _idx = _array_EC_pyCAN__spikespace[_j] if _idx < _source_stop: break _end_idx = _j _num_events = _end_idx - _start_idx if _num_events > 0: # scalar code _vectorisation_idx = 1 _source_t = _array_defaultclock_t[0] _curlen = _array_spikemonitor_N[0] _newlen = _curlen + _num_events # Resize the arrays _owner.resize(_newlen) _array_spikemonitor_N[0] = _newlen _i_view = _dynamic_array_spikemonitor_i.data _t_view = _dynamic_array_spikemonitor_t.data # Copy the values across for _j in range(_start_idx, _end_idx): _idx = _array_EC_pyCAN__spikespace[_j] _vectorisation_idx = _idx _source_i = _array_EC_pyCAN_i[_idx] _to_record_t = _source_t _to_record_i = _source_i _i_view [_curlen + _j - _start_idx] = _to_record_i _t_view [_curlen + _j - _start_idx] = _to_record_t _array_spikemonitor_count[_idx - _source_start] += 1 before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_spikemonitor_N = _namespace['_array_spikemonitor_N'] cdef int32_t * _array_spikemonitor_N = _buf__array_spikemonitor_N.data cdef int32_t N _var__clock_t = _namespace["_var__clock_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double _clock_t _var__source_i = _namespace["_var__source_i"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCAN_i = _namespace['_array_EC_pyCAN_i'] cdef int32_t * _array_EC_pyCAN_i = _buf__array_EC_pyCAN_i.data cdef size_t _num_array_EC_pyCAN_i = len(_namespace['_array_EC_pyCAN_i']) cdef int32_t _source_i _var__source_idx = _namespace["_var__source_idx"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_spikemonitor__source_idx = _namespace['_array_spikemonitor__source_idx'] cdef int32_t * _array_spikemonitor__source_idx = _buf__array_spikemonitor__source_idx.data cdef size_t _num_array_spikemonitor__source_idx = len(_namespace['_array_spikemonitor__source_idx']) cdef int32_t _source_idx _var__source_start = _namespace["_var__source_start"] cdef int64_t _source_start = _namespace["_source_start"] _var__source_stop = _namespace["_var__source_stop"] cdef int64_t _source_stop = _namespace["_source_stop"] _var__source_t = _namespace["_var__source_t"] _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCAN__spikespace = _namespace['_array_EC_pyCAN__spikespace'] cdef int32_t * _array_EC_pyCAN__spikespace = _buf__array_EC_pyCAN__spikespace.data cdef size_t _num_array_EC_pyCAN__spikespace = len(_namespace['_array_EC_pyCAN__spikespace']) cdef int32_t _spikespace cdef int32_t _to_record_i cdef double _to_record_t _var_count = _namespace["_var_count"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_spikemonitor_count = _namespace['_array_spikemonitor_count'] cdef int32_t * _array_spikemonitor_count = _buf__array_spikemonitor_count.data cdef size_t _num_array_spikemonitor_count = len(_namespace['_array_spikemonitor_count']) cdef int32_t count _var_i = _namespace["_var_i"] _dynamic_array_spikemonitor_i = _namespace["_dynamic_array_spikemonitor_i"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_spikemonitor_i = _namespace['_array_spikemonitor_i'] cdef int32_t * _array_spikemonitor_i = _buf__array_spikemonitor_i.data cdef size_t _num_array_spikemonitor_i = len(_namespace['_array_spikemonitor_i']) cdef int32_t i _var_t = _namespace["_var_t"] _dynamic_array_spikemonitor_t = _namespace["_dynamic_array_spikemonitor_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_spikemonitor_t = _namespace['_array_spikemonitor_t'] cdef double * _array_spikemonitor_t = _buf__array_spikemonitor_t.data cdef size_t _num_array_spikemonitor_t = len(_namespace['_array_spikemonitor_t']) cdef double t if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_spikemonitor_N = _namespace['_array_spikemonitor_N'] cdef int32_t * _array_spikemonitor_N = _buf__array_spikemonitor_N.data cdef int32_t N _var__clock_t = _namespace["_var__clock_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double _clock_t _var__source_i = _namespace["_var__source_i"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCAN_i = _namespace['_array_EC_pyCAN_i'] cdef int32_t * _array_EC_pyCAN_i = _buf__array_EC_pyCAN_i.data cdef size_t _num_array_EC_pyCAN_i = len(_namespace['_array_EC_pyCAN_i']) cdef int32_t _source_i _var__source_idx = _namespace["_var__source_idx"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_spikemonitor__source_idx = _namespace['_array_spikemonitor__source_idx'] cdef int32_t * _array_spikemonitor__source_idx = _buf__array_spikemonitor__source_idx.data cdef size_t _num_array_spikemonitor__source_idx = len(_namespace['_array_spikemonitor__source_idx']) cdef int32_t _source_idx _var__source_start = _namespace["_var__source_start"] cdef int64_t _source_start = _namespace["_source_start"] _var__source_stop = _namespace["_var__source_stop"] cdef int64_t _source_stop = _namespace["_source_stop"] _var__source_t = _namespace["_var__source_t"] _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCAN__spikespace = _namespace['_array_EC_pyCAN__spikespace'] cdef int32_t * _array_EC_pyCAN__spikespace = _buf__array_EC_pyCAN__spikespace.data cdef size_t _num_array_EC_pyCAN__spikespace = len(_namespace['_array_EC_pyCAN__spikespace']) cdef int32_t _spikespace cdef int32_t _to_record_i cdef double _to_record_t _var_count = _namespace["_var_count"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_spikemonitor_count = _namespace['_array_spikemonitor_count'] cdef int32_t * _array_spikemonitor_count = _buf__array_spikemonitor_count.data cdef size_t _num_array_spikemonitor_count = len(_namespace['_array_spikemonitor_count']) cdef int32_t count _var_i = _namespace["_var_i"] _dynamic_array_spikemonitor_i = _namespace["_dynamic_array_spikemonitor_i"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_spikemonitor_i = _namespace['_array_spikemonitor_i'] cdef int32_t * _array_spikemonitor_i = _buf__array_spikemonitor_i.data cdef size_t _num_array_spikemonitor_i = len(_namespace['_array_spikemonitor_i']) cdef int32_t i _var_t = _namespace["_var_t"] _dynamic_array_spikemonitor_t = _namespace["_dynamic_array_spikemonitor_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_spikemonitor_t = _namespace['_array_spikemonitor_t'] cdef double * _array_spikemonitor_t = _buf__array_spikemonitor_t.data cdef size_t _num_array_spikemonitor_t = len(_namespace['_array_spikemonitor_t']) cdef double t if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:15:28,089 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name spikemonitor_codeobject 2021-11-05 15:15:28,089 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "spikemonitor_spikemonitor" using Cython module "_cython_magic_c36cc56f91f4c49ad1c3938d8acb7bc8" 2021-11-05 15:15:28,089 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140606214743664 on /home/nikos/.cython/brian_extensions/_cython_magic_c36cc56f91f4c49ad1c3938d8acb7bc8.lock 2021-11-05 15:15:28,089 DEBUG brian2.utils.filelock: Lock 140606214743664 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_c36cc56f91f4c49ad1c3938d8acb7bc8.lock 2021-11-05 15:15:28,090 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140606214743664 on /home/nikos/.cython/brian_extensions/_cython_magic_c36cc56f91f4c49ad1c3938d8acb7bc8.lock 2021-11-05 15:15:28,090 DEBUG brian2.utils.filelock: Lock 140606214743664 released on /home/nikos/.cython/brian_extensions/_cython_magic_c36cc56f91f4c49ad1c3938d8acb7bc8.lock 2021-11-05 15:15:28,090 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=spikemonitor_1, template name=spikemonitor) for abstract code: _to_record_t = _source_t _to_record_i = _source_i 2021-11-05 15:15:28,091 DIAGNOSTIC brian2.devices.device: spikemonitor_1_codeobject abstract code: _to_record_t = _source_t _to_record_i = _source_i 2021-11-05 15:15:28,092 DIAGNOSTIC brian2.devices.device: spikemonitor_1_codeobject snippet (scalar): _source_t = _array_defaultclock_t[0] 2021-11-05 15:15:28,092 DIAGNOSTIC brian2.devices.device: spikemonitor_1_codeobject snippet (vector): _source_i = _array_DG_py_i[_idx] _to_record_t = _source_t _to_record_i = _source_i 2021-11-05 15:15:28,092 DIAGNOSTIC brian2.devices.device: spikemonitor_1_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_spikemonitor_1_N = _namespace['_array_spikemonitor_1_N'] cdef int32_t * _array_spikemonitor_1_N = _buf__array_spikemonitor_1_N.data cdef int32_t N _var__clock_t = _namespace["_var__clock_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double _clock_t _var__source_i = _namespace["_var__source_i"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_DG_py_i = _namespace['_array_DG_py_i'] cdef int32_t * _array_DG_py_i = _buf__array_DG_py_i.data cdef size_t _num_array_DG_py_i = len(_namespace['_array_DG_py_i']) cdef int32_t _source_i _var__source_idx = _namespace["_var__source_idx"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_spikemonitor_1__source_idx = _namespace['_array_spikemonitor_1__source_idx'] cdef int32_t * _array_spikemonitor_1__source_idx = _buf__array_spikemonitor_1__source_idx.data cdef size_t _num_array_spikemonitor_1__source_idx = len(_namespace['_array_spikemonitor_1__source_idx']) cdef int32_t _source_idx _var__source_start = _namespace["_var__source_start"] cdef int64_t _source_start = _namespace["_source_start"] _var__source_stop = _namespace["_var__source_stop"] cdef int64_t _source_stop = _namespace["_source_stop"] _var__source_t = _namespace["_var__source_t"] _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_DG_py__spikespace = _namespace['_array_DG_py__spikespace'] cdef int32_t * _array_DG_py__spikespace = _buf__array_DG_py__spikespace.data cdef size_t _num_array_DG_py__spikespace = len(_namespace['_array_DG_py__spikespace']) cdef int32_t _spikespace cdef int32_t _to_record_i cdef double _to_record_t _var_count = _namespace["_var_count"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_spikemonitor_1_count = _namespace['_array_spikemonitor_1_count'] cdef int32_t * _array_spikemonitor_1_count = _buf__array_spikemonitor_1_count.data cdef size_t _num_array_spikemonitor_1_count = len(_namespace['_array_spikemonitor_1_count']) cdef int32_t count _var_i = _namespace["_var_i"] _dynamic_array_spikemonitor_1_i = _namespace["_dynamic_array_spikemonitor_1_i"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_spikemonitor_1_i = _namespace['_array_spikemonitor_1_i'] cdef int32_t * _array_spikemonitor_1_i = _buf__array_spikemonitor_1_i.data cdef size_t _num_array_spikemonitor_1_i = len(_namespace['_array_spikemonitor_1_i']) cdef int32_t i _var_t = _namespace["_var_t"] _dynamic_array_spikemonitor_1_t = _namespace["_dynamic_array_spikemonitor_1_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_spikemonitor_1_t = _namespace['_array_spikemonitor_1_t'] cdef double * _array_spikemonitor_1_t = _buf__array_spikemonitor_1_t.data cdef size_t _num_array_spikemonitor_1_t = len(_namespace['_array_spikemonitor_1_t']) cdef double t if '_owner' in _namespace: _owner = _namespace['_owner'] cdef size_t _num_events = _array_DG_py__spikespace[_num_array_DG_py__spikespace-1] cdef size_t _start_idx, _end_idx, _curlen, _newlen, _j cdef int32_t[:] _i_view cdef double[:] _t_view if _num_events > 0: # For subgroups, we do not want to record all spikes # We assume that spikes are ordered _start_idx = _num_events _end_idx = _num_events for _j in range(_num_events): _idx = _array_DG_py__spikespace[_j] if _idx >= _source_start: _start_idx = _j break for _j in range(_num_events-1, _start_idx-1, -1): _idx = _array_DG_py__spikespace[_j] if _idx < _source_stop: break _end_idx = _j _num_events = _end_idx - _start_idx if _num_events > 0: # scalar code _vectorisation_idx = 1 _source_t = _array_defaultclock_t[0] _curlen = _array_spikemonitor_1_N[0] _newlen = _curlen + _num_events # Resize the arrays _owner.resize(_newlen) _array_spikemonitor_1_N[0] = _newlen _i_view = _dynamic_array_spikemonitor_1_i.data _t_view = _dynamic_array_spikemonitor_1_t.data # Copy the values across for _j in range(_start_idx, _end_idx): _idx = _array_DG_py__spikespace[_j] _vectorisation_idx = _idx _source_i = _array_DG_py_i[_idx] _to_record_t = _source_t _to_record_i = _source_i _i_view [_curlen + _j - _start_idx] = _to_record_i _t_view [_curlen + _j - _start_idx] = _to_record_t _array_spikemonitor_1_count[_idx - _source_start] += 1 before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_spikemonitor_1_N = _namespace['_array_spikemonitor_1_N'] cdef int32_t * _array_spikemonitor_1_N = _buf__array_spikemonitor_1_N.data cdef int32_t N _var__clock_t = _namespace["_var__clock_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double _clock_t _var__source_i = _namespace["_var__source_i"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_DG_py_i = _namespace['_array_DG_py_i'] cdef int32_t * _array_DG_py_i = _buf__array_DG_py_i.data cdef size_t _num_array_DG_py_i = len(_namespace['_array_DG_py_i']) cdef int32_t _source_i _var__source_idx = _namespace["_var__source_idx"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_spikemonitor_1__source_idx = _namespace['_array_spikemonitor_1__source_idx'] cdef int32_t * _array_spikemonitor_1__source_idx = _buf__array_spikemonitor_1__source_idx.data cdef size_t _num_array_spikemonitor_1__source_idx = len(_namespace['_array_spikemonitor_1__source_idx']) cdef int32_t _source_idx _var__source_start = _namespace["_var__source_start"] cdef int64_t _source_start = _namespace["_source_start"] _var__source_stop = _namespace["_var__source_stop"] cdef int64_t _source_stop = _namespace["_source_stop"] _var__source_t = _namespace["_var__source_t"] _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_DG_py__spikespace = _namespace['_array_DG_py__spikespace'] cdef int32_t * _array_DG_py__spikespace = _buf__array_DG_py__spikespace.data cdef size_t _num_array_DG_py__spikespace = len(_namespace['_array_DG_py__spikespace']) cdef int32_t _spikespace cdef int32_t _to_record_i cdef double _to_record_t _var_count = _namespace["_var_count"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_spikemonitor_1_count = _namespace['_array_spikemonitor_1_count'] cdef int32_t * _array_spikemonitor_1_count = _buf__array_spikemonitor_1_count.data cdef size_t _num_array_spikemonitor_1_count = len(_namespace['_array_spikemonitor_1_count']) cdef int32_t count _var_i = _namespace["_var_i"] _dynamic_array_spikemonitor_1_i = _namespace["_dynamic_array_spikemonitor_1_i"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_spikemonitor_1_i = _namespace['_array_spikemonitor_1_i'] cdef int32_t * _array_spikemonitor_1_i = _buf__array_spikemonitor_1_i.data cdef size_t _num_array_spikemonitor_1_i = len(_namespace['_array_spikemonitor_1_i']) cdef int32_t i _var_t = _namespace["_var_t"] _dynamic_array_spikemonitor_1_t = _namespace["_dynamic_array_spikemonitor_1_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_spikemonitor_1_t = _namespace['_array_spikemonitor_1_t'] cdef double * _array_spikemonitor_1_t = _buf__array_spikemonitor_1_t.data cdef size_t _num_array_spikemonitor_1_t = len(_namespace['_array_spikemonitor_1_t']) cdef double t if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_spikemonitor_1_N = _namespace['_array_spikemonitor_1_N'] cdef int32_t * _array_spikemonitor_1_N = _buf__array_spikemonitor_1_N.data cdef int32_t N _var__clock_t = _namespace["_var__clock_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double _clock_t _var__source_i = _namespace["_var__source_i"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_DG_py_i = _namespace['_array_DG_py_i'] cdef int32_t * _array_DG_py_i = _buf__array_DG_py_i.data cdef size_t _num_array_DG_py_i = len(_namespace['_array_DG_py_i']) cdef int32_t _source_i _var__source_idx = _namespace["_var__source_idx"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_spikemonitor_1__source_idx = _namespace['_array_spikemonitor_1__source_idx'] cdef int32_t * _array_spikemonitor_1__source_idx = _buf__array_spikemonitor_1__source_idx.data cdef size_t _num_array_spikemonitor_1__source_idx = len(_namespace['_array_spikemonitor_1__source_idx']) cdef int32_t _source_idx _var__source_start = _namespace["_var__source_start"] cdef int64_t _source_start = _namespace["_source_start"] _var__source_stop = _namespace["_var__source_stop"] cdef int64_t _source_stop = _namespace["_source_stop"] _var__source_t = _namespace["_var__source_t"] _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_DG_py__spikespace = _namespace['_array_DG_py__spikespace'] cdef int32_t * _array_DG_py__spikespace = _buf__array_DG_py__spikespace.data cdef size_t _num_array_DG_py__spikespace = len(_namespace['_array_DG_py__spikespace']) cdef int32_t _spikespace cdef int32_t _to_record_i cdef double _to_record_t _var_count = _namespace["_var_count"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_spikemonitor_1_count = _namespace['_array_spikemonitor_1_count'] cdef int32_t * _array_spikemonitor_1_count = _buf__array_spikemonitor_1_count.data cdef size_t _num_array_spikemonitor_1_count = len(_namespace['_array_spikemonitor_1_count']) cdef int32_t count _var_i = _namespace["_var_i"] _dynamic_array_spikemonitor_1_i = _namespace["_dynamic_array_spikemonitor_1_i"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_spikemonitor_1_i = _namespace['_array_spikemonitor_1_i'] cdef int32_t * _array_spikemonitor_1_i = _buf__array_spikemonitor_1_i.data cdef size_t _num_array_spikemonitor_1_i = len(_namespace['_array_spikemonitor_1_i']) cdef int32_t i _var_t = _namespace["_var_t"] _dynamic_array_spikemonitor_1_t = _namespace["_dynamic_array_spikemonitor_1_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_spikemonitor_1_t = _namespace['_array_spikemonitor_1_t'] cdef double * _array_spikemonitor_1_t = _buf__array_spikemonitor_1_t.data cdef size_t _num_array_spikemonitor_1_t = len(_namespace['_array_spikemonitor_1_t']) cdef double t if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:15:28,092 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name spikemonitor_1_codeobject 2021-11-05 15:15:28,093 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "spikemonitor_1_spikemonitor" using Cython module "_cython_magic_979f33585aba20e5114ca2974cb61d97" 2021-11-05 15:15:28,093 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140606328744112 on /home/nikos/.cython/brian_extensions/_cython_magic_979f33585aba20e5114ca2974cb61d97.lock 2021-11-05 15:15:28,093 DEBUG brian2.utils.filelock: Lock 140606328744112 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_979f33585aba20e5114ca2974cb61d97.lock 2021-11-05 15:15:28,093 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140606328744112 on /home/nikos/.cython/brian_extensions/_cython_magic_979f33585aba20e5114ca2974cb61d97.lock 2021-11-05 15:15:28,093 DEBUG brian2.utils.filelock: Lock 140606328744112 released on /home/nikos/.cython/brian_extensions/_cython_magic_979f33585aba20e5114ca2974cb61d97.lock 2021-11-05 15:15:28,093 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=spikemonitor_2, template name=spikemonitor) for abstract code: _to_record_t = _source_t _to_record_i = _source_i 2021-11-05 15:15:28,094 DIAGNOSTIC brian2.devices.device: spikemonitor_2_codeobject abstract code: _to_record_t = _source_t _to_record_i = _source_i 2021-11-05 15:15:28,095 DIAGNOSTIC brian2.devices.device: spikemonitor_2_codeobject snippet (scalar): _source_t = _array_defaultclock_t[0] 2021-11-05 15:15:28,095 DIAGNOSTIC brian2.devices.device: spikemonitor_2_codeobject snippet (vector): _source_i = _array_CA3_pyCAN_i[_idx] _to_record_t = _source_t _to_record_i = _source_i 2021-11-05 15:15:28,095 DIAGNOSTIC brian2.devices.device: spikemonitor_2_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_spikemonitor_2_N = _namespace['_array_spikemonitor_2_N'] cdef int32_t * _array_spikemonitor_2_N = _buf__array_spikemonitor_2_N.data cdef int32_t N _var__clock_t = _namespace["_var__clock_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double _clock_t _var__source_i = _namespace["_var__source_i"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_pyCAN_i = _namespace['_array_CA3_pyCAN_i'] cdef int32_t * _array_CA3_pyCAN_i = _buf__array_CA3_pyCAN_i.data cdef size_t _num_array_CA3_pyCAN_i = len(_namespace['_array_CA3_pyCAN_i']) cdef int32_t _source_i _var__source_idx = _namespace["_var__source_idx"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_spikemonitor_2__source_idx = _namespace['_array_spikemonitor_2__source_idx'] cdef int32_t * _array_spikemonitor_2__source_idx = _buf__array_spikemonitor_2__source_idx.data cdef size_t _num_array_spikemonitor_2__source_idx = len(_namespace['_array_spikemonitor_2__source_idx']) cdef int32_t _source_idx _var__source_start = _namespace["_var__source_start"] cdef int64_t _source_start = _namespace["_source_start"] _var__source_stop = _namespace["_var__source_stop"] cdef int64_t _source_stop = _namespace["_source_stop"] _var__source_t = _namespace["_var__source_t"] _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_pyCAN__spikespace = _namespace['_array_CA3_pyCAN__spikespace'] cdef int32_t * _array_CA3_pyCAN__spikespace = _buf__array_CA3_pyCAN__spikespace.data cdef size_t _num_array_CA3_pyCAN__spikespace = len(_namespace['_array_CA3_pyCAN__spikespace']) cdef int32_t _spikespace cdef int32_t _to_record_i cdef double _to_record_t _var_count = _namespace["_var_count"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_spikemonitor_2_count = _namespace['_array_spikemonitor_2_count'] cdef int32_t * _array_spikemonitor_2_count = _buf__array_spikemonitor_2_count.data cdef size_t _num_array_spikemonitor_2_count = len(_namespace['_array_spikemonitor_2_count']) cdef int32_t count _var_i = _namespace["_var_i"] _dynamic_array_spikemonitor_2_i = _namespace["_dynamic_array_spikemonitor_2_i"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_spikemonitor_2_i = _namespace['_array_spikemonitor_2_i'] cdef int32_t * _array_spikemonitor_2_i = _buf__array_spikemonitor_2_i.data cdef size_t _num_array_spikemonitor_2_i = len(_namespace['_array_spikemonitor_2_i']) cdef int32_t i _var_t = _namespace["_var_t"] _dynamic_array_spikemonitor_2_t = _namespace["_dynamic_array_spikemonitor_2_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_spikemonitor_2_t = _namespace['_array_spikemonitor_2_t'] cdef double * _array_spikemonitor_2_t = _buf__array_spikemonitor_2_t.data cdef size_t _num_array_spikemonitor_2_t = len(_namespace['_array_spikemonitor_2_t']) cdef double t if '_owner' in _namespace: _owner = _namespace['_owner'] cdef size_t _num_events = _array_CA3_pyCAN__spikespace[_num_array_CA3_pyCAN__spikespace-1] cdef size_t _start_idx, _end_idx, _curlen, _newlen, _j cdef int32_t[:] _i_view cdef double[:] _t_view if _num_events > 0: # For subgroups, we do not want to record all spikes # We assume that spikes are ordered _start_idx = _num_events _end_idx = _num_events for _j in range(_num_events): _idx = _array_CA3_pyCAN__spikespace[_j] if _idx >= _source_start: _start_idx = _j break for _j in range(_num_events-1, _start_idx-1, -1): _idx = _array_CA3_pyCAN__spikespace[_j] if _idx < _source_stop: break _end_idx = _j _num_events = _end_idx - _start_idx if _num_events > 0: # scalar code _vectorisation_idx = 1 _source_t = _array_defaultclock_t[0] _curlen = _array_spikemonitor_2_N[0] _newlen = _curlen + _num_events # Resize the arrays _owner.resize(_newlen) _array_spikemonitor_2_N[0] = _newlen _i_view = _dynamic_array_spikemonitor_2_i.data _t_view = _dynamic_array_spikemonitor_2_t.data # Copy the values across for _j in range(_start_idx, _end_idx): _idx = _array_CA3_pyCAN__spikespace[_j] _vectorisation_idx = _idx _source_i = _array_CA3_pyCAN_i[_idx] _to_record_t = _source_t _to_record_i = _source_i _i_view [_curlen + _j - _start_idx] = _to_record_i _t_view [_curlen + _j - _start_idx] = _to_record_t _array_spikemonitor_2_count[_idx - _source_start] += 1 before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_spikemonitor_2_N = _namespace['_array_spikemonitor_2_N'] cdef int32_t * _array_spikemonitor_2_N = _buf__array_spikemonitor_2_N.data cdef int32_t N _var__clock_t = _namespace["_var__clock_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double _clock_t _var__source_i = _namespace["_var__source_i"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_pyCAN_i = _namespace['_array_CA3_pyCAN_i'] cdef int32_t * _array_CA3_pyCAN_i = _buf__array_CA3_pyCAN_i.data cdef size_t _num_array_CA3_pyCAN_i = len(_namespace['_array_CA3_pyCAN_i']) cdef int32_t _source_i _var__source_idx = _namespace["_var__source_idx"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_spikemonitor_2__source_idx = _namespace['_array_spikemonitor_2__source_idx'] cdef int32_t * _array_spikemonitor_2__source_idx = _buf__array_spikemonitor_2__source_idx.data cdef size_t _num_array_spikemonitor_2__source_idx = len(_namespace['_array_spikemonitor_2__source_idx']) cdef int32_t _source_idx _var__source_start = _namespace["_var__source_start"] cdef int64_t _source_start = _namespace["_source_start"] _var__source_stop = _namespace["_var__source_stop"] cdef int64_t _source_stop = _namespace["_source_stop"] _var__source_t = _namespace["_var__source_t"] _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_pyCAN__spikespace = _namespace['_array_CA3_pyCAN__spikespace'] cdef int32_t * _array_CA3_pyCAN__spikespace = _buf__array_CA3_pyCAN__spikespace.data cdef size_t _num_array_CA3_pyCAN__spikespace = len(_namespace['_array_CA3_pyCAN__spikespace']) cdef int32_t _spikespace cdef int32_t _to_record_i cdef double _to_record_t _var_count = _namespace["_var_count"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_spikemonitor_2_count = _namespace['_array_spikemonitor_2_count'] cdef int32_t * _array_spikemonitor_2_count = _buf__array_spikemonitor_2_count.data cdef size_t _num_array_spikemonitor_2_count = len(_namespace['_array_spikemonitor_2_count']) cdef int32_t count _var_i = _namespace["_var_i"] _dynamic_array_spikemonitor_2_i = _namespace["_dynamic_array_spikemonitor_2_i"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_spikemonitor_2_i = _namespace['_array_spikemonitor_2_i'] cdef int32_t * _array_spikemonitor_2_i = _buf__array_spikemonitor_2_i.data cdef size_t _num_array_spikemonitor_2_i = len(_namespace['_array_spikemonitor_2_i']) cdef int32_t i _var_t = _namespace["_var_t"] _dynamic_array_spikemonitor_2_t = _namespace["_dynamic_array_spikemonitor_2_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_spikemonitor_2_t = _namespace['_array_spikemonitor_2_t'] cdef double * _array_spikemonitor_2_t = _buf__array_spikemonitor_2_t.data cdef size_t _num_array_spikemonitor_2_t = len(_namespace['_array_spikemonitor_2_t']) cdef double t if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_spikemonitor_2_N = _namespace['_array_spikemonitor_2_N'] cdef int32_t * _array_spikemonitor_2_N = _buf__array_spikemonitor_2_N.data cdef int32_t N _var__clock_t = _namespace["_var__clock_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double _clock_t _var__source_i = _namespace["_var__source_i"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_pyCAN_i = _namespace['_array_CA3_pyCAN_i'] cdef int32_t * _array_CA3_pyCAN_i = _buf__array_CA3_pyCAN_i.data cdef size_t _num_array_CA3_pyCAN_i = len(_namespace['_array_CA3_pyCAN_i']) cdef int32_t _source_i _var__source_idx = _namespace["_var__source_idx"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_spikemonitor_2__source_idx = _namespace['_array_spikemonitor_2__source_idx'] cdef int32_t * _array_spikemonitor_2__source_idx = _buf__array_spikemonitor_2__source_idx.data cdef size_t _num_array_spikemonitor_2__source_idx = len(_namespace['_array_spikemonitor_2__source_idx']) cdef int32_t _source_idx _var__source_start = _namespace["_var__source_start"] cdef int64_t _source_start = _namespace["_source_start"] _var__source_stop = _namespace["_var__source_stop"] cdef int64_t _source_stop = _namespace["_source_stop"] _var__source_t = _namespace["_var__source_t"] _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_pyCAN__spikespace = _namespace['_array_CA3_pyCAN__spikespace'] cdef int32_t * _array_CA3_pyCAN__spikespace = _buf__array_CA3_pyCAN__spikespace.data cdef size_t _num_array_CA3_pyCAN__spikespace = len(_namespace['_array_CA3_pyCAN__spikespace']) cdef int32_t _spikespace cdef int32_t _to_record_i cdef double _to_record_t _var_count = _namespace["_var_count"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_spikemonitor_2_count = _namespace['_array_spikemonitor_2_count'] cdef int32_t * _array_spikemonitor_2_count = _buf__array_spikemonitor_2_count.data cdef size_t _num_array_spikemonitor_2_count = len(_namespace['_array_spikemonitor_2_count']) cdef int32_t count _var_i = _namespace["_var_i"] _dynamic_array_spikemonitor_2_i = _namespace["_dynamic_array_spikemonitor_2_i"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_spikemonitor_2_i = _namespace['_array_spikemonitor_2_i'] cdef int32_t * _array_spikemonitor_2_i = _buf__array_spikemonitor_2_i.data cdef size_t _num_array_spikemonitor_2_i = len(_namespace['_array_spikemonitor_2_i']) cdef int32_t i _var_t = _namespace["_var_t"] _dynamic_array_spikemonitor_2_t = _namespace["_dynamic_array_spikemonitor_2_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_spikemonitor_2_t = _namespace['_array_spikemonitor_2_t'] cdef double * _array_spikemonitor_2_t = _buf__array_spikemonitor_2_t.data cdef size_t _num_array_spikemonitor_2_t = len(_namespace['_array_spikemonitor_2_t']) cdef double t if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:15:28,096 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name spikemonitor_2_codeobject 2021-11-05 15:15:28,096 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "spikemonitor_2_spikemonitor" using Cython module "_cython_magic_be3179a853fd1fcb585e6bc811f648f6" 2021-11-05 15:15:28,096 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140606333344064 on /home/nikos/.cython/brian_extensions/_cython_magic_be3179a853fd1fcb585e6bc811f648f6.lock 2021-11-05 15:15:28,096 DEBUG brian2.utils.filelock: Lock 140606333344064 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_be3179a853fd1fcb585e6bc811f648f6.lock 2021-11-05 15:15:28,096 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140606333344064 on /home/nikos/.cython/brian_extensions/_cython_magic_be3179a853fd1fcb585e6bc811f648f6.lock 2021-11-05 15:15:28,096 DEBUG brian2.utils.filelock: Lock 140606333344064 released on /home/nikos/.cython/brian_extensions/_cython_magic_be3179a853fd1fcb585e6bc811f648f6.lock 2021-11-05 15:15:28,096 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=spikemonitor_3, template name=spikemonitor) for abstract code: _to_record_t = _source_t _to_record_i = _source_i 2021-11-05 15:15:28,097 DIAGNOSTIC brian2.devices.device: spikemonitor_3_codeobject abstract code: _to_record_t = _source_t _to_record_i = _source_i 2021-11-05 15:15:28,098 DIAGNOSTIC brian2.devices.device: spikemonitor_3_codeobject snippet (scalar): _source_t = _array_defaultclock_t[0] 2021-11-05 15:15:28,098 DIAGNOSTIC brian2.devices.device: spikemonitor_3_codeobject snippet (vector): _source_i = _array_CA1_pyCAN_i[_idx] _to_record_t = _source_t _to_record_i = _source_i 2021-11-05 15:15:28,098 DIAGNOSTIC brian2.devices.device: spikemonitor_3_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_spikemonitor_3_N = _namespace['_array_spikemonitor_3_N'] cdef int32_t * _array_spikemonitor_3_N = _buf__array_spikemonitor_3_N.data cdef int32_t N _var__clock_t = _namespace["_var__clock_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double _clock_t _var__source_i = _namespace["_var__source_i"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_pyCAN_i = _namespace['_array_CA1_pyCAN_i'] cdef int32_t * _array_CA1_pyCAN_i = _buf__array_CA1_pyCAN_i.data cdef size_t _num_array_CA1_pyCAN_i = len(_namespace['_array_CA1_pyCAN_i']) cdef int32_t _source_i _var__source_idx = _namespace["_var__source_idx"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_spikemonitor_3__source_idx = _namespace['_array_spikemonitor_3__source_idx'] cdef int32_t * _array_spikemonitor_3__source_idx = _buf__array_spikemonitor_3__source_idx.data cdef size_t _num_array_spikemonitor_3__source_idx = len(_namespace['_array_spikemonitor_3__source_idx']) cdef int32_t _source_idx _var__source_start = _namespace["_var__source_start"] cdef int64_t _source_start = _namespace["_source_start"] _var__source_stop = _namespace["_var__source_stop"] cdef int64_t _source_stop = _namespace["_source_stop"] _var__source_t = _namespace["_var__source_t"] _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_pyCAN__spikespace = _namespace['_array_CA1_pyCAN__spikespace'] cdef int32_t * _array_CA1_pyCAN__spikespace = _buf__array_CA1_pyCAN__spikespace.data cdef size_t _num_array_CA1_pyCAN__spikespace = len(_namespace['_array_CA1_pyCAN__spikespace']) cdef int32_t _spikespace cdef int32_t _to_record_i cdef double _to_record_t _var_count = _namespace["_var_count"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_spikemonitor_3_count = _namespace['_array_spikemonitor_3_count'] cdef int32_t * _array_spikemonitor_3_count = _buf__array_spikemonitor_3_count.data cdef size_t _num_array_spikemonitor_3_count = len(_namespace['_array_spikemonitor_3_count']) cdef int32_t count _var_i = _namespace["_var_i"] _dynamic_array_spikemonitor_3_i = _namespace["_dynamic_array_spikemonitor_3_i"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_spikemonitor_3_i = _namespace['_array_spikemonitor_3_i'] cdef int32_t * _array_spikemonitor_3_i = _buf__array_spikemonitor_3_i.data cdef size_t _num_array_spikemonitor_3_i = len(_namespace['_array_spikemonitor_3_i']) cdef int32_t i _var_t = _namespace["_var_t"] _dynamic_array_spikemonitor_3_t = _namespace["_dynamic_array_spikemonitor_3_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_spikemonitor_3_t = _namespace['_array_spikemonitor_3_t'] cdef double * _array_spikemonitor_3_t = _buf__array_spikemonitor_3_t.data cdef size_t _num_array_spikemonitor_3_t = len(_namespace['_array_spikemonitor_3_t']) cdef double t if '_owner' in _namespace: _owner = _namespace['_owner'] cdef size_t _num_events = _array_CA1_pyCAN__spikespace[_num_array_CA1_pyCAN__spikespace-1] cdef size_t _start_idx, _end_idx, _curlen, _newlen, _j cdef int32_t[:] _i_view cdef double[:] _t_view if _num_events > 0: # For subgroups, we do not want to record all spikes # We assume that spikes are ordered _start_idx = _num_events _end_idx = _num_events for _j in range(_num_events): _idx = _array_CA1_pyCAN__spikespace[_j] if _idx >= _source_start: _start_idx = _j break for _j in range(_num_events-1, _start_idx-1, -1): _idx = _array_CA1_pyCAN__spikespace[_j] if _idx < _source_stop: break _end_idx = _j _num_events = _end_idx - _start_idx if _num_events > 0: # scalar code _vectorisation_idx = 1 _source_t = _array_defaultclock_t[0] _curlen = _array_spikemonitor_3_N[0] _newlen = _curlen + _num_events # Resize the arrays _owner.resize(_newlen) _array_spikemonitor_3_N[0] = _newlen _i_view = _dynamic_array_spikemonitor_3_i.data _t_view = _dynamic_array_spikemonitor_3_t.data # Copy the values across for _j in range(_start_idx, _end_idx): _idx = _array_CA1_pyCAN__spikespace[_j] _vectorisation_idx = _idx _source_i = _array_CA1_pyCAN_i[_idx] _to_record_t = _source_t _to_record_i = _source_i _i_view [_curlen + _j - _start_idx] = _to_record_i _t_view [_curlen + _j - _start_idx] = _to_record_t _array_spikemonitor_3_count[_idx - _source_start] += 1 before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_spikemonitor_3_N = _namespace['_array_spikemonitor_3_N'] cdef int32_t * _array_spikemonitor_3_N = _buf__array_spikemonitor_3_N.data cdef int32_t N _var__clock_t = _namespace["_var__clock_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double _clock_t _var__source_i = _namespace["_var__source_i"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_pyCAN_i = _namespace['_array_CA1_pyCAN_i'] cdef int32_t * _array_CA1_pyCAN_i = _buf__array_CA1_pyCAN_i.data cdef size_t _num_array_CA1_pyCAN_i = len(_namespace['_array_CA1_pyCAN_i']) cdef int32_t _source_i _var__source_idx = _namespace["_var__source_idx"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_spikemonitor_3__source_idx = _namespace['_array_spikemonitor_3__source_idx'] cdef int32_t * _array_spikemonitor_3__source_idx = _buf__array_spikemonitor_3__source_idx.data cdef size_t _num_array_spikemonitor_3__source_idx = len(_namespace['_array_spikemonitor_3__source_idx']) cdef int32_t _source_idx _var__source_start = _namespace["_var__source_start"] cdef int64_t _source_start = _namespace["_source_start"] _var__source_stop = _namespace["_var__source_stop"] cdef int64_t _source_stop = _namespace["_source_stop"] _var__source_t = _namespace["_var__source_t"] _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_pyCAN__spikespace = _namespace['_array_CA1_pyCAN__spikespace'] cdef int32_t * _array_CA1_pyCAN__spikespace = _buf__array_CA1_pyCAN__spikespace.data cdef size_t _num_array_CA1_pyCAN__spikespace = len(_namespace['_array_CA1_pyCAN__spikespace']) cdef int32_t _spikespace cdef int32_t _to_record_i cdef double _to_record_t _var_count = _namespace["_var_count"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_spikemonitor_3_count = _namespace['_array_spikemonitor_3_count'] cdef int32_t * _array_spikemonitor_3_count = _buf__array_spikemonitor_3_count.data cdef size_t _num_array_spikemonitor_3_count = len(_namespace['_array_spikemonitor_3_count']) cdef int32_t count _var_i = _namespace["_var_i"] _dynamic_array_spikemonitor_3_i = _namespace["_dynamic_array_spikemonitor_3_i"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_spikemonitor_3_i = _namespace['_array_spikemonitor_3_i'] cdef int32_t * _array_spikemonitor_3_i = _buf__array_spikemonitor_3_i.data cdef size_t _num_array_spikemonitor_3_i = len(_namespace['_array_spikemonitor_3_i']) cdef int32_t i _var_t = _namespace["_var_t"] _dynamic_array_spikemonitor_3_t = _namespace["_dynamic_array_spikemonitor_3_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_spikemonitor_3_t = _namespace['_array_spikemonitor_3_t'] cdef double * _array_spikemonitor_3_t = _buf__array_spikemonitor_3_t.data cdef size_t _num_array_spikemonitor_3_t = len(_namespace['_array_spikemonitor_3_t']) cdef double t if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_spikemonitor_3_N = _namespace['_array_spikemonitor_3_N'] cdef int32_t * _array_spikemonitor_3_N = _buf__array_spikemonitor_3_N.data cdef int32_t N _var__clock_t = _namespace["_var__clock_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double _clock_t _var__source_i = _namespace["_var__source_i"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_pyCAN_i = _namespace['_array_CA1_pyCAN_i'] cdef int32_t * _array_CA1_pyCAN_i = _buf__array_CA1_pyCAN_i.data cdef size_t _num_array_CA1_pyCAN_i = len(_namespace['_array_CA1_pyCAN_i']) cdef int32_t _source_i _var__source_idx = _namespace["_var__source_idx"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_spikemonitor_3__source_idx = _namespace['_array_spikemonitor_3__source_idx'] cdef int32_t * _array_spikemonitor_3__source_idx = _buf__array_spikemonitor_3__source_idx.data cdef size_t _num_array_spikemonitor_3__source_idx = len(_namespace['_array_spikemonitor_3__source_idx']) cdef int32_t _source_idx _var__source_start = _namespace["_var__source_start"] cdef int64_t _source_start = _namespace["_source_start"] _var__source_stop = _namespace["_var__source_stop"] cdef int64_t _source_stop = _namespace["_source_stop"] _var__source_t = _namespace["_var__source_t"] _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_pyCAN__spikespace = _namespace['_array_CA1_pyCAN__spikespace'] cdef int32_t * _array_CA1_pyCAN__spikespace = _buf__array_CA1_pyCAN__spikespace.data cdef size_t _num_array_CA1_pyCAN__spikespace = len(_namespace['_array_CA1_pyCAN__spikespace']) cdef int32_t _spikespace cdef int32_t _to_record_i cdef double _to_record_t _var_count = _namespace["_var_count"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_spikemonitor_3_count = _namespace['_array_spikemonitor_3_count'] cdef int32_t * _array_spikemonitor_3_count = _buf__array_spikemonitor_3_count.data cdef size_t _num_array_spikemonitor_3_count = len(_namespace['_array_spikemonitor_3_count']) cdef int32_t count _var_i = _namespace["_var_i"] _dynamic_array_spikemonitor_3_i = _namespace["_dynamic_array_spikemonitor_3_i"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_spikemonitor_3_i = _namespace['_array_spikemonitor_3_i'] cdef int32_t * _array_spikemonitor_3_i = _buf__array_spikemonitor_3_i.data cdef size_t _num_array_spikemonitor_3_i = len(_namespace['_array_spikemonitor_3_i']) cdef int32_t i _var_t = _namespace["_var_t"] _dynamic_array_spikemonitor_3_t = _namespace["_dynamic_array_spikemonitor_3_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_spikemonitor_3_t = _namespace['_array_spikemonitor_3_t'] cdef double * _array_spikemonitor_3_t = _buf__array_spikemonitor_3_t.data cdef size_t _num_array_spikemonitor_3_t = len(_namespace['_array_spikemonitor_3_t']) cdef double t if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:15:28,098 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name spikemonitor_3_codeobject 2021-11-05 15:15:28,099 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "spikemonitor_3_spikemonitor" using Cython module "_cython_magic_60009024dcc89374f5055df352b48ae0" 2021-11-05 15:15:28,099 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140605134432528 on /home/nikos/.cython/brian_extensions/_cython_magic_60009024dcc89374f5055df352b48ae0.lock 2021-11-05 15:15:28,099 DEBUG brian2.utils.filelock: Lock 140605134432528 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_60009024dcc89374f5055df352b48ae0.lock 2021-11-05 15:15:28,099 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140605134432528 on /home/nikos/.cython/brian_extensions/_cython_magic_60009024dcc89374f5055df352b48ae0.lock 2021-11-05 15:15:28,099 DEBUG brian2.utils.filelock: Lock 140605134432528 released on /home/nikos/.cython/brian_extensions/_cython_magic_60009024dcc89374f5055df352b48ae0.lock 2021-11-05 15:15:28,099 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=spikemonitor_4, template name=spikemonitor) for abstract code: _to_record_t = _source_t _to_record_i = _source_i 2021-11-05 15:15:28,100 DIAGNOSTIC brian2.devices.device: spikemonitor_4_codeobject abstract code: _to_record_t = _source_t _to_record_i = _source_i 2021-11-05 15:15:28,101 DIAGNOSTIC brian2.devices.device: spikemonitor_4_codeobject snippet (scalar): _source_t = _array_defaultclock_t[0] 2021-11-05 15:15:28,101 DIAGNOSTIC brian2.devices.device: spikemonitor_4_codeobject snippet (vector): _source_i = _array_EC_inh_i[_idx] _to_record_t = _source_t _to_record_i = _source_i 2021-11-05 15:15:28,101 DIAGNOSTIC brian2.devices.device: spikemonitor_4_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_spikemonitor_4_N = _namespace['_array_spikemonitor_4_N'] cdef int32_t * _array_spikemonitor_4_N = _buf__array_spikemonitor_4_N.data cdef int32_t N _var__clock_t = _namespace["_var__clock_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double _clock_t _var__source_i = _namespace["_var__source_i"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_inh_i = _namespace['_array_EC_inh_i'] cdef int32_t * _array_EC_inh_i = _buf__array_EC_inh_i.data cdef size_t _num_array_EC_inh_i = len(_namespace['_array_EC_inh_i']) cdef int32_t _source_i _var__source_idx = _namespace["_var__source_idx"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_spikemonitor_4__source_idx = _namespace['_array_spikemonitor_4__source_idx'] cdef int32_t * _array_spikemonitor_4__source_idx = _buf__array_spikemonitor_4__source_idx.data cdef size_t _num_array_spikemonitor_4__source_idx = len(_namespace['_array_spikemonitor_4__source_idx']) cdef int32_t _source_idx _var__source_start = _namespace["_var__source_start"] cdef int64_t _source_start = _namespace["_source_start"] _var__source_stop = _namespace["_var__source_stop"] cdef int64_t _source_stop = _namespace["_source_stop"] _var__source_t = _namespace["_var__source_t"] _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_inh__spikespace = _namespace['_array_EC_inh__spikespace'] cdef int32_t * _array_EC_inh__spikespace = _buf__array_EC_inh__spikespace.data cdef size_t _num_array_EC_inh__spikespace = len(_namespace['_array_EC_inh__spikespace']) cdef int32_t _spikespace cdef int32_t _to_record_i cdef double _to_record_t _var_count = _namespace["_var_count"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_spikemonitor_4_count = _namespace['_array_spikemonitor_4_count'] cdef int32_t * _array_spikemonitor_4_count = _buf__array_spikemonitor_4_count.data cdef size_t _num_array_spikemonitor_4_count = len(_namespace['_array_spikemonitor_4_count']) cdef int32_t count _var_i = _namespace["_var_i"] _dynamic_array_spikemonitor_4_i = _namespace["_dynamic_array_spikemonitor_4_i"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_spikemonitor_4_i = _namespace['_array_spikemonitor_4_i'] cdef int32_t * _array_spikemonitor_4_i = _buf__array_spikemonitor_4_i.data cdef size_t _num_array_spikemonitor_4_i = len(_namespace['_array_spikemonitor_4_i']) cdef int32_t i _var_t = _namespace["_var_t"] _dynamic_array_spikemonitor_4_t = _namespace["_dynamic_array_spikemonitor_4_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_spikemonitor_4_t = _namespace['_array_spikemonitor_4_t'] cdef double * _array_spikemonitor_4_t = _buf__array_spikemonitor_4_t.data cdef size_t _num_array_spikemonitor_4_t = len(_namespace['_array_spikemonitor_4_t']) cdef double t if '_owner' in _namespace: _owner = _namespace['_owner'] cdef size_t _num_events = _array_EC_inh__spikespace[_num_array_EC_inh__spikespace-1] cdef size_t _start_idx, _end_idx, _curlen, _newlen, _j cdef int32_t[:] _i_view cdef double[:] _t_view if _num_events > 0: # For subgroups, we do not want to record all spikes # We assume that spikes are ordered _start_idx = _num_events _end_idx = _num_events for _j in range(_num_events): _idx = _array_EC_inh__spikespace[_j] if _idx >= _source_start: _start_idx = _j break for _j in range(_num_events-1, _start_idx-1, -1): _idx = _array_EC_inh__spikespace[_j] if _idx < _source_stop: break _end_idx = _j _num_events = _end_idx - _start_idx if _num_events > 0: # scalar code _vectorisation_idx = 1 _source_t = _array_defaultclock_t[0] _curlen = _array_spikemonitor_4_N[0] _newlen = _curlen + _num_events # Resize the arrays _owner.resize(_newlen) _array_spikemonitor_4_N[0] = _newlen _i_view = _dynamic_array_spikemonitor_4_i.data _t_view = _dynamic_array_spikemonitor_4_t.data # Copy the values across for _j in range(_start_idx, _end_idx): _idx = _array_EC_inh__spikespace[_j] _vectorisation_idx = _idx _source_i = _array_EC_inh_i[_idx] _to_record_t = _source_t _to_record_i = _source_i _i_view [_curlen + _j - _start_idx] = _to_record_i _t_view [_curlen + _j - _start_idx] = _to_record_t _array_spikemonitor_4_count[_idx - _source_start] += 1 before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_spikemonitor_4_N = _namespace['_array_spikemonitor_4_N'] cdef int32_t * _array_spikemonitor_4_N = _buf__array_spikemonitor_4_N.data cdef int32_t N _var__clock_t = _namespace["_var__clock_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double _clock_t _var__source_i = _namespace["_var__source_i"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_inh_i = _namespace['_array_EC_inh_i'] cdef int32_t * _array_EC_inh_i = _buf__array_EC_inh_i.data cdef size_t _num_array_EC_inh_i = len(_namespace['_array_EC_inh_i']) cdef int32_t _source_i _var__source_idx = _namespace["_var__source_idx"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_spikemonitor_4__source_idx = _namespace['_array_spikemonitor_4__source_idx'] cdef int32_t * _array_spikemonitor_4__source_idx = _buf__array_spikemonitor_4__source_idx.data cdef size_t _num_array_spikemonitor_4__source_idx = len(_namespace['_array_spikemonitor_4__source_idx']) cdef int32_t _source_idx _var__source_start = _namespace["_var__source_start"] cdef int64_t _source_start = _namespace["_source_start"] _var__source_stop = _namespace["_var__source_stop"] cdef int64_t _source_stop = _namespace["_source_stop"] _var__source_t = _namespace["_var__source_t"] _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_inh__spikespace = _namespace['_array_EC_inh__spikespace'] cdef int32_t * _array_EC_inh__spikespace = _buf__array_EC_inh__spikespace.data cdef size_t _num_array_EC_inh__spikespace = len(_namespace['_array_EC_inh__spikespace']) cdef int32_t _spikespace cdef int32_t _to_record_i cdef double _to_record_t _var_count = _namespace["_var_count"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_spikemonitor_4_count = _namespace['_array_spikemonitor_4_count'] cdef int32_t * _array_spikemonitor_4_count = _buf__array_spikemonitor_4_count.data cdef size_t _num_array_spikemonitor_4_count = len(_namespace['_array_spikemonitor_4_count']) cdef int32_t count _var_i = _namespace["_var_i"] _dynamic_array_spikemonitor_4_i = _namespace["_dynamic_array_spikemonitor_4_i"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_spikemonitor_4_i = _namespace['_array_spikemonitor_4_i'] cdef int32_t * _array_spikemonitor_4_i = _buf__array_spikemonitor_4_i.data cdef size_t _num_array_spikemonitor_4_i = len(_namespace['_array_spikemonitor_4_i']) cdef int32_t i _var_t = _namespace["_var_t"] _dynamic_array_spikemonitor_4_t = _namespace["_dynamic_array_spikemonitor_4_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_spikemonitor_4_t = _namespace['_array_spikemonitor_4_t'] cdef double * _array_spikemonitor_4_t = _buf__array_spikemonitor_4_t.data cdef size_t _num_array_spikemonitor_4_t = len(_namespace['_array_spikemonitor_4_t']) cdef double t if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_spikemonitor_4_N = _namespace['_array_spikemonitor_4_N'] cdef int32_t * _array_spikemonitor_4_N = _buf__array_spikemonitor_4_N.data cdef int32_t N _var__clock_t = _namespace["_var__clock_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double _clock_t _var__source_i = _namespace["_var__source_i"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_inh_i = _namespace['_array_EC_inh_i'] cdef int32_t * _array_EC_inh_i = _buf__array_EC_inh_i.data cdef size_t _num_array_EC_inh_i = len(_namespace['_array_EC_inh_i']) cdef int32_t _source_i _var__source_idx = _namespace["_var__source_idx"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_spikemonitor_4__source_idx = _namespace['_array_spikemonitor_4__source_idx'] cdef int32_t * _array_spikemonitor_4__source_idx = _buf__array_spikemonitor_4__source_idx.data cdef size_t _num_array_spikemonitor_4__source_idx = len(_namespace['_array_spikemonitor_4__source_idx']) cdef int32_t _source_idx _var__source_start = _namespace["_var__source_start"] cdef int64_t _source_start = _namespace["_source_start"] _var__source_stop = _namespace["_var__source_stop"] cdef int64_t _source_stop = _namespace["_source_stop"] _var__source_t = _namespace["_var__source_t"] _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_inh__spikespace = _namespace['_array_EC_inh__spikespace'] cdef int32_t * _array_EC_inh__spikespace = _buf__array_EC_inh__spikespace.data cdef size_t _num_array_EC_inh__spikespace = len(_namespace['_array_EC_inh__spikespace']) cdef int32_t _spikespace cdef int32_t _to_record_i cdef double _to_record_t _var_count = _namespace["_var_count"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_spikemonitor_4_count = _namespace['_array_spikemonitor_4_count'] cdef int32_t * _array_spikemonitor_4_count = _buf__array_spikemonitor_4_count.data cdef size_t _num_array_spikemonitor_4_count = len(_namespace['_array_spikemonitor_4_count']) cdef int32_t count _var_i = _namespace["_var_i"] _dynamic_array_spikemonitor_4_i = _namespace["_dynamic_array_spikemonitor_4_i"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_spikemonitor_4_i = _namespace['_array_spikemonitor_4_i'] cdef int32_t * _array_spikemonitor_4_i = _buf__array_spikemonitor_4_i.data cdef size_t _num_array_spikemonitor_4_i = len(_namespace['_array_spikemonitor_4_i']) cdef int32_t i _var_t = _namespace["_var_t"] _dynamic_array_spikemonitor_4_t = _namespace["_dynamic_array_spikemonitor_4_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_spikemonitor_4_t = _namespace['_array_spikemonitor_4_t'] cdef double * _array_spikemonitor_4_t = _buf__array_spikemonitor_4_t.data cdef size_t _num_array_spikemonitor_4_t = len(_namespace['_array_spikemonitor_4_t']) cdef double t if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:15:28,101 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name spikemonitor_4_codeobject 2021-11-05 15:15:28,102 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "spikemonitor_4_spikemonitor" using Cython module "_cython_magic_38ba90072efaad6c27eaf26eb063de24" 2021-11-05 15:15:28,102 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140606331280208 on /home/nikos/.cython/brian_extensions/_cython_magic_38ba90072efaad6c27eaf26eb063de24.lock 2021-11-05 15:15:28,102 DEBUG brian2.utils.filelock: Lock 140606331280208 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_38ba90072efaad6c27eaf26eb063de24.lock 2021-11-05 15:15:28,102 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140606331280208 on /home/nikos/.cython/brian_extensions/_cython_magic_38ba90072efaad6c27eaf26eb063de24.lock 2021-11-05 15:15:28,102 DEBUG brian2.utils.filelock: Lock 140606331280208 released on /home/nikos/.cython/brian_extensions/_cython_magic_38ba90072efaad6c27eaf26eb063de24.lock 2021-11-05 15:15:28,102 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=spikemonitor_5, template name=spikemonitor) for abstract code: _to_record_t = _source_t _to_record_i = _source_i 2021-11-05 15:15:28,103 DIAGNOSTIC brian2.devices.device: spikemonitor_5_codeobject abstract code: _to_record_t = _source_t _to_record_i = _source_i 2021-11-05 15:15:28,104 DIAGNOSTIC brian2.devices.device: spikemonitor_5_codeobject snippet (scalar): _source_t = _array_defaultclock_t[0] 2021-11-05 15:15:28,104 DIAGNOSTIC brian2.devices.device: spikemonitor_5_codeobject snippet (vector): _source_i = _array_DG_inh_i[_idx] _to_record_t = _source_t _to_record_i = _source_i 2021-11-05 15:15:28,104 DIAGNOSTIC brian2.devices.device: spikemonitor_5_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_spikemonitor_5_N = _namespace['_array_spikemonitor_5_N'] cdef int32_t * _array_spikemonitor_5_N = _buf__array_spikemonitor_5_N.data cdef int32_t N _var__clock_t = _namespace["_var__clock_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double _clock_t _var__source_i = _namespace["_var__source_i"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_DG_inh_i = _namespace['_array_DG_inh_i'] cdef int32_t * _array_DG_inh_i = _buf__array_DG_inh_i.data cdef size_t _num_array_DG_inh_i = len(_namespace['_array_DG_inh_i']) cdef int32_t _source_i _var__source_idx = _namespace["_var__source_idx"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_spikemonitor_5__source_idx = _namespace['_array_spikemonitor_5__source_idx'] cdef int32_t * _array_spikemonitor_5__source_idx = _buf__array_spikemonitor_5__source_idx.data cdef size_t _num_array_spikemonitor_5__source_idx = len(_namespace['_array_spikemonitor_5__source_idx']) cdef int32_t _source_idx _var__source_start = _namespace["_var__source_start"] cdef int64_t _source_start = _namespace["_source_start"] _var__source_stop = _namespace["_var__source_stop"] cdef int64_t _source_stop = _namespace["_source_stop"] _var__source_t = _namespace["_var__source_t"] _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_DG_inh__spikespace = _namespace['_array_DG_inh__spikespace'] cdef int32_t * _array_DG_inh__spikespace = _buf__array_DG_inh__spikespace.data cdef size_t _num_array_DG_inh__spikespace = len(_namespace['_array_DG_inh__spikespace']) cdef int32_t _spikespace cdef int32_t _to_record_i cdef double _to_record_t _var_count = _namespace["_var_count"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_spikemonitor_5_count = _namespace['_array_spikemonitor_5_count'] cdef int32_t * _array_spikemonitor_5_count = _buf__array_spikemonitor_5_count.data cdef size_t _num_array_spikemonitor_5_count = len(_namespace['_array_spikemonitor_5_count']) cdef int32_t count _var_i = _namespace["_var_i"] _dynamic_array_spikemonitor_5_i = _namespace["_dynamic_array_spikemonitor_5_i"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_spikemonitor_5_i = _namespace['_array_spikemonitor_5_i'] cdef int32_t * _array_spikemonitor_5_i = _buf__array_spikemonitor_5_i.data cdef size_t _num_array_spikemonitor_5_i = len(_namespace['_array_spikemonitor_5_i']) cdef int32_t i _var_t = _namespace["_var_t"] _dynamic_array_spikemonitor_5_t = _namespace["_dynamic_array_spikemonitor_5_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_spikemonitor_5_t = _namespace['_array_spikemonitor_5_t'] cdef double * _array_spikemonitor_5_t = _buf__array_spikemonitor_5_t.data cdef size_t _num_array_spikemonitor_5_t = len(_namespace['_array_spikemonitor_5_t']) cdef double t if '_owner' in _namespace: _owner = _namespace['_owner'] cdef size_t _num_events = _array_DG_inh__spikespace[_num_array_DG_inh__spikespace-1] cdef size_t _start_idx, _end_idx, _curlen, _newlen, _j cdef int32_t[:] _i_view cdef double[:] _t_view if _num_events > 0: # For subgroups, we do not want to record all spikes # We assume that spikes are ordered _start_idx = _num_events _end_idx = _num_events for _j in range(_num_events): _idx = _array_DG_inh__spikespace[_j] if _idx >= _source_start: _start_idx = _j break for _j in range(_num_events-1, _start_idx-1, -1): _idx = _array_DG_inh__spikespace[_j] if _idx < _source_stop: break _end_idx = _j _num_events = _end_idx - _start_idx if _num_events > 0: # scalar code _vectorisation_idx = 1 _source_t = _array_defaultclock_t[0] _curlen = _array_spikemonitor_5_N[0] _newlen = _curlen + _num_events # Resize the arrays _owner.resize(_newlen) _array_spikemonitor_5_N[0] = _newlen _i_view = _dynamic_array_spikemonitor_5_i.data _t_view = _dynamic_array_spikemonitor_5_t.data # Copy the values across for _j in range(_start_idx, _end_idx): _idx = _array_DG_inh__spikespace[_j] _vectorisation_idx = _idx _source_i = _array_DG_inh_i[_idx] _to_record_t = _source_t _to_record_i = _source_i _i_view [_curlen + _j - _start_idx] = _to_record_i _t_view [_curlen + _j - _start_idx] = _to_record_t _array_spikemonitor_5_count[_idx - _source_start] += 1 before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_spikemonitor_5_N = _namespace['_array_spikemonitor_5_N'] cdef int32_t * _array_spikemonitor_5_N = _buf__array_spikemonitor_5_N.data cdef int32_t N _var__clock_t = _namespace["_var__clock_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double _clock_t _var__source_i = _namespace["_var__source_i"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_DG_inh_i = _namespace['_array_DG_inh_i'] cdef int32_t * _array_DG_inh_i = _buf__array_DG_inh_i.data cdef size_t _num_array_DG_inh_i = len(_namespace['_array_DG_inh_i']) cdef int32_t _source_i _var__source_idx = _namespace["_var__source_idx"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_spikemonitor_5__source_idx = _namespace['_array_spikemonitor_5__source_idx'] cdef int32_t * _array_spikemonitor_5__source_idx = _buf__array_spikemonitor_5__source_idx.data cdef size_t _num_array_spikemonitor_5__source_idx = len(_namespace['_array_spikemonitor_5__source_idx']) cdef int32_t _source_idx _var__source_start = _namespace["_var__source_start"] cdef int64_t _source_start = _namespace["_source_start"] _var__source_stop = _namespace["_var__source_stop"] cdef int64_t _source_stop = _namespace["_source_stop"] _var__source_t = _namespace["_var__source_t"] _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_DG_inh__spikespace = _namespace['_array_DG_inh__spikespace'] cdef int32_t * _array_DG_inh__spikespace = _buf__array_DG_inh__spikespace.data cdef size_t _num_array_DG_inh__spikespace = len(_namespace['_array_DG_inh__spikespace']) cdef int32_t _spikespace cdef int32_t _to_record_i cdef double _to_record_t _var_count = _namespace["_var_count"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_spikemonitor_5_count = _namespace['_array_spikemonitor_5_count'] cdef int32_t * _array_spikemonitor_5_count = _buf__array_spikemonitor_5_count.data cdef size_t _num_array_spikemonitor_5_count = len(_namespace['_array_spikemonitor_5_count']) cdef int32_t count _var_i = _namespace["_var_i"] _dynamic_array_spikemonitor_5_i = _namespace["_dynamic_array_spikemonitor_5_i"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_spikemonitor_5_i = _namespace['_array_spikemonitor_5_i'] cdef int32_t * _array_spikemonitor_5_i = _buf__array_spikemonitor_5_i.data cdef size_t _num_array_spikemonitor_5_i = len(_namespace['_array_spikemonitor_5_i']) cdef int32_t i _var_t = _namespace["_var_t"] _dynamic_array_spikemonitor_5_t = _namespace["_dynamic_array_spikemonitor_5_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_spikemonitor_5_t = _namespace['_array_spikemonitor_5_t'] cdef double * _array_spikemonitor_5_t = _buf__array_spikemonitor_5_t.data cdef size_t _num_array_spikemonitor_5_t = len(_namespace['_array_spikemonitor_5_t']) cdef double t if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_spikemonitor_5_N = _namespace['_array_spikemonitor_5_N'] cdef int32_t * _array_spikemonitor_5_N = _buf__array_spikemonitor_5_N.data cdef int32_t N _var__clock_t = _namespace["_var__clock_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double _clock_t _var__source_i = _namespace["_var__source_i"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_DG_inh_i = _namespace['_array_DG_inh_i'] cdef int32_t * _array_DG_inh_i = _buf__array_DG_inh_i.data cdef size_t _num_array_DG_inh_i = len(_namespace['_array_DG_inh_i']) cdef int32_t _source_i _var__source_idx = _namespace["_var__source_idx"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_spikemonitor_5__source_idx = _namespace['_array_spikemonitor_5__source_idx'] cdef int32_t * _array_spikemonitor_5__source_idx = _buf__array_spikemonitor_5__source_idx.data cdef size_t _num_array_spikemonitor_5__source_idx = len(_namespace['_array_spikemonitor_5__source_idx']) cdef int32_t _source_idx _var__source_start = _namespace["_var__source_start"] cdef int64_t _source_start = _namespace["_source_start"] _var__source_stop = _namespace["_var__source_stop"] cdef int64_t _source_stop = _namespace["_source_stop"] _var__source_t = _namespace["_var__source_t"] _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_DG_inh__spikespace = _namespace['_array_DG_inh__spikespace'] cdef int32_t * _array_DG_inh__spikespace = _buf__array_DG_inh__spikespace.data cdef size_t _num_array_DG_inh__spikespace = len(_namespace['_array_DG_inh__spikespace']) cdef int32_t _spikespace cdef int32_t _to_record_i cdef double _to_record_t _var_count = _namespace["_var_count"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_spikemonitor_5_count = _namespace['_array_spikemonitor_5_count'] cdef int32_t * _array_spikemonitor_5_count = _buf__array_spikemonitor_5_count.data cdef size_t _num_array_spikemonitor_5_count = len(_namespace['_array_spikemonitor_5_count']) cdef int32_t count _var_i = _namespace["_var_i"] _dynamic_array_spikemonitor_5_i = _namespace["_dynamic_array_spikemonitor_5_i"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_spikemonitor_5_i = _namespace['_array_spikemonitor_5_i'] cdef int32_t * _array_spikemonitor_5_i = _buf__array_spikemonitor_5_i.data cdef size_t _num_array_spikemonitor_5_i = len(_namespace['_array_spikemonitor_5_i']) cdef int32_t i _var_t = _namespace["_var_t"] _dynamic_array_spikemonitor_5_t = _namespace["_dynamic_array_spikemonitor_5_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_spikemonitor_5_t = _namespace['_array_spikemonitor_5_t'] cdef double * _array_spikemonitor_5_t = _buf__array_spikemonitor_5_t.data cdef size_t _num_array_spikemonitor_5_t = len(_namespace['_array_spikemonitor_5_t']) cdef double t if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:15:28,104 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name spikemonitor_5_codeobject 2021-11-05 15:15:28,105 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "spikemonitor_5_spikemonitor" using Cython module "_cython_magic_86dd2b7a553011ea926e33a8ec8c2a10" 2021-11-05 15:15:28,105 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140606214371648 on /home/nikos/.cython/brian_extensions/_cython_magic_86dd2b7a553011ea926e33a8ec8c2a10.lock 2021-11-05 15:15:28,105 DEBUG brian2.utils.filelock: Lock 140606214371648 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_86dd2b7a553011ea926e33a8ec8c2a10.lock 2021-11-05 15:15:28,105 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140606214371648 on /home/nikos/.cython/brian_extensions/_cython_magic_86dd2b7a553011ea926e33a8ec8c2a10.lock 2021-11-05 15:15:28,105 DEBUG brian2.utils.filelock: Lock 140606214371648 released on /home/nikos/.cython/brian_extensions/_cython_magic_86dd2b7a553011ea926e33a8ec8c2a10.lock 2021-11-05 15:15:28,105 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=spikemonitor_6, template name=spikemonitor) for abstract code: _to_record_t = _source_t _to_record_i = _source_i 2021-11-05 15:15:28,106 DIAGNOSTIC brian2.devices.device: spikemonitor_6_codeobject abstract code: _to_record_t = _source_t _to_record_i = _source_i 2021-11-05 15:15:28,107 DIAGNOSTIC brian2.devices.device: spikemonitor_6_codeobject snippet (scalar): _source_t = _array_defaultclock_t[0] 2021-11-05 15:15:28,107 DIAGNOSTIC brian2.devices.device: spikemonitor_6_codeobject snippet (vector): _source_i = _array_CA3_inh_i[_idx] _to_record_t = _source_t _to_record_i = _source_i 2021-11-05 15:15:28,107 DIAGNOSTIC brian2.devices.device: spikemonitor_6_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_spikemonitor_6_N = _namespace['_array_spikemonitor_6_N'] cdef int32_t * _array_spikemonitor_6_N = _buf__array_spikemonitor_6_N.data cdef int32_t N _var__clock_t = _namespace["_var__clock_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double _clock_t _var__source_i = _namespace["_var__source_i"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_inh_i = _namespace['_array_CA3_inh_i'] cdef int32_t * _array_CA3_inh_i = _buf__array_CA3_inh_i.data cdef size_t _num_array_CA3_inh_i = len(_namespace['_array_CA3_inh_i']) cdef int32_t _source_i _var__source_idx = _namespace["_var__source_idx"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_spikemonitor_6__source_idx = _namespace['_array_spikemonitor_6__source_idx'] cdef int32_t * _array_spikemonitor_6__source_idx = _buf__array_spikemonitor_6__source_idx.data cdef size_t _num_array_spikemonitor_6__source_idx = len(_namespace['_array_spikemonitor_6__source_idx']) cdef int32_t _source_idx _var__source_start = _namespace["_var__source_start"] cdef int64_t _source_start = _namespace["_source_start"] _var__source_stop = _namespace["_var__source_stop"] cdef int64_t _source_stop = _namespace["_source_stop"] _var__source_t = _namespace["_var__source_t"] _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_inh__spikespace = _namespace['_array_CA3_inh__spikespace'] cdef int32_t * _array_CA3_inh__spikespace = _buf__array_CA3_inh__spikespace.data cdef size_t _num_array_CA3_inh__spikespace = len(_namespace['_array_CA3_inh__spikespace']) cdef int32_t _spikespace cdef int32_t _to_record_i cdef double _to_record_t _var_count = _namespace["_var_count"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_spikemonitor_6_count = _namespace['_array_spikemonitor_6_count'] cdef int32_t * _array_spikemonitor_6_count = _buf__array_spikemonitor_6_count.data cdef size_t _num_array_spikemonitor_6_count = len(_namespace['_array_spikemonitor_6_count']) cdef int32_t count _var_i = _namespace["_var_i"] _dynamic_array_spikemonitor_6_i = _namespace["_dynamic_array_spikemonitor_6_i"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_spikemonitor_6_i = _namespace['_array_spikemonitor_6_i'] cdef int32_t * _array_spikemonitor_6_i = _buf__array_spikemonitor_6_i.data cdef size_t _num_array_spikemonitor_6_i = len(_namespace['_array_spikemonitor_6_i']) cdef int32_t i _var_t = _namespace["_var_t"] _dynamic_array_spikemonitor_6_t = _namespace["_dynamic_array_spikemonitor_6_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_spikemonitor_6_t = _namespace['_array_spikemonitor_6_t'] cdef double * _array_spikemonitor_6_t = _buf__array_spikemonitor_6_t.data cdef size_t _num_array_spikemonitor_6_t = len(_namespace['_array_spikemonitor_6_t']) cdef double t if '_owner' in _namespace: _owner = _namespace['_owner'] cdef size_t _num_events = _array_CA3_inh__spikespace[_num_array_CA3_inh__spikespace-1] cdef size_t _start_idx, _end_idx, _curlen, _newlen, _j cdef int32_t[:] _i_view cdef double[:] _t_view if _num_events > 0: # For subgroups, we do not want to record all spikes # We assume that spikes are ordered _start_idx = _num_events _end_idx = _num_events for _j in range(_num_events): _idx = _array_CA3_inh__spikespace[_j] if _idx >= _source_start: _start_idx = _j break for _j in range(_num_events-1, _start_idx-1, -1): _idx = _array_CA3_inh__spikespace[_j] if _idx < _source_stop: break _end_idx = _j _num_events = _end_idx - _start_idx if _num_events > 0: # scalar code _vectorisation_idx = 1 _source_t = _array_defaultclock_t[0] _curlen = _array_spikemonitor_6_N[0] _newlen = _curlen + _num_events # Resize the arrays _owner.resize(_newlen) _array_spikemonitor_6_N[0] = _newlen _i_view = _dynamic_array_spikemonitor_6_i.data _t_view = _dynamic_array_spikemonitor_6_t.data # Copy the values across for _j in range(_start_idx, _end_idx): _idx = _array_CA3_inh__spikespace[_j] _vectorisation_idx = _idx _source_i = _array_CA3_inh_i[_idx] _to_record_t = _source_t _to_record_i = _source_i _i_view [_curlen + _j - _start_idx] = _to_record_i _t_view [_curlen + _j - _start_idx] = _to_record_t _array_spikemonitor_6_count[_idx - _source_start] += 1 before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_spikemonitor_6_N = _namespace['_array_spikemonitor_6_N'] cdef int32_t * _array_spikemonitor_6_N = _buf__array_spikemonitor_6_N.data cdef int32_t N _var__clock_t = _namespace["_var__clock_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double _clock_t _var__source_i = _namespace["_var__source_i"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_inh_i = _namespace['_array_CA3_inh_i'] cdef int32_t * _array_CA3_inh_i = _buf__array_CA3_inh_i.data cdef size_t _num_array_CA3_inh_i = len(_namespace['_array_CA3_inh_i']) cdef int32_t _source_i _var__source_idx = _namespace["_var__source_idx"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_spikemonitor_6__source_idx = _namespace['_array_spikemonitor_6__source_idx'] cdef int32_t * _array_spikemonitor_6__source_idx = _buf__array_spikemonitor_6__source_idx.data cdef size_t _num_array_spikemonitor_6__source_idx = len(_namespace['_array_spikemonitor_6__source_idx']) cdef int32_t _source_idx _var__source_start = _namespace["_var__source_start"] cdef int64_t _source_start = _namespace["_source_start"] _var__source_stop = _namespace["_var__source_stop"] cdef int64_t _source_stop = _namespace["_source_stop"] _var__source_t = _namespace["_var__source_t"] _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_inh__spikespace = _namespace['_array_CA3_inh__spikespace'] cdef int32_t * _array_CA3_inh__spikespace = _buf__array_CA3_inh__spikespace.data cdef size_t _num_array_CA3_inh__spikespace = len(_namespace['_array_CA3_inh__spikespace']) cdef int32_t _spikespace cdef int32_t _to_record_i cdef double _to_record_t _var_count = _namespace["_var_count"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_spikemonitor_6_count = _namespace['_array_spikemonitor_6_count'] cdef int32_t * _array_spikemonitor_6_count = _buf__array_spikemonitor_6_count.data cdef size_t _num_array_spikemonitor_6_count = len(_namespace['_array_spikemonitor_6_count']) cdef int32_t count _var_i = _namespace["_var_i"] _dynamic_array_spikemonitor_6_i = _namespace["_dynamic_array_spikemonitor_6_i"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_spikemonitor_6_i = _namespace['_array_spikemonitor_6_i'] cdef int32_t * _array_spikemonitor_6_i = _buf__array_spikemonitor_6_i.data cdef size_t _num_array_spikemonitor_6_i = len(_namespace['_array_spikemonitor_6_i']) cdef int32_t i _var_t = _namespace["_var_t"] _dynamic_array_spikemonitor_6_t = _namespace["_dynamic_array_spikemonitor_6_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_spikemonitor_6_t = _namespace['_array_spikemonitor_6_t'] cdef double * _array_spikemonitor_6_t = _buf__array_spikemonitor_6_t.data cdef size_t _num_array_spikemonitor_6_t = len(_namespace['_array_spikemonitor_6_t']) cdef double t if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_spikemonitor_6_N = _namespace['_array_spikemonitor_6_N'] cdef int32_t * _array_spikemonitor_6_N = _buf__array_spikemonitor_6_N.data cdef int32_t N _var__clock_t = _namespace["_var__clock_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double _clock_t _var__source_i = _namespace["_var__source_i"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_inh_i = _namespace['_array_CA3_inh_i'] cdef int32_t * _array_CA3_inh_i = _buf__array_CA3_inh_i.data cdef size_t _num_array_CA3_inh_i = len(_namespace['_array_CA3_inh_i']) cdef int32_t _source_i _var__source_idx = _namespace["_var__source_idx"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_spikemonitor_6__source_idx = _namespace['_array_spikemonitor_6__source_idx'] cdef int32_t * _array_spikemonitor_6__source_idx = _buf__array_spikemonitor_6__source_idx.data cdef size_t _num_array_spikemonitor_6__source_idx = len(_namespace['_array_spikemonitor_6__source_idx']) cdef int32_t _source_idx _var__source_start = _namespace["_var__source_start"] cdef int64_t _source_start = _namespace["_source_start"] _var__source_stop = _namespace["_var__source_stop"] cdef int64_t _source_stop = _namespace["_source_stop"] _var__source_t = _namespace["_var__source_t"] _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_inh__spikespace = _namespace['_array_CA3_inh__spikespace'] cdef int32_t * _array_CA3_inh__spikespace = _buf__array_CA3_inh__spikespace.data cdef size_t _num_array_CA3_inh__spikespace = len(_namespace['_array_CA3_inh__spikespace']) cdef int32_t _spikespace cdef int32_t _to_record_i cdef double _to_record_t _var_count = _namespace["_var_count"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_spikemonitor_6_count = _namespace['_array_spikemonitor_6_count'] cdef int32_t * _array_spikemonitor_6_count = _buf__array_spikemonitor_6_count.data cdef size_t _num_array_spikemonitor_6_count = len(_namespace['_array_spikemonitor_6_count']) cdef int32_t count _var_i = _namespace["_var_i"] _dynamic_array_spikemonitor_6_i = _namespace["_dynamic_array_spikemonitor_6_i"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_spikemonitor_6_i = _namespace['_array_spikemonitor_6_i'] cdef int32_t * _array_spikemonitor_6_i = _buf__array_spikemonitor_6_i.data cdef size_t _num_array_spikemonitor_6_i = len(_namespace['_array_spikemonitor_6_i']) cdef int32_t i _var_t = _namespace["_var_t"] _dynamic_array_spikemonitor_6_t = _namespace["_dynamic_array_spikemonitor_6_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_spikemonitor_6_t = _namespace['_array_spikemonitor_6_t'] cdef double * _array_spikemonitor_6_t = _buf__array_spikemonitor_6_t.data cdef size_t _num_array_spikemonitor_6_t = len(_namespace['_array_spikemonitor_6_t']) cdef double t if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:15:28,107 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name spikemonitor_6_codeobject 2021-11-05 15:15:28,108 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "spikemonitor_6_spikemonitor" using Cython module "_cython_magic_2a4d0902a0c42f2b2b3223175492d465" 2021-11-05 15:15:28,108 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140605134432240 on /home/nikos/.cython/brian_extensions/_cython_magic_2a4d0902a0c42f2b2b3223175492d465.lock 2021-11-05 15:15:28,108 DEBUG brian2.utils.filelock: Lock 140605134432240 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_2a4d0902a0c42f2b2b3223175492d465.lock 2021-11-05 15:15:28,108 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140605134432240 on /home/nikos/.cython/brian_extensions/_cython_magic_2a4d0902a0c42f2b2b3223175492d465.lock 2021-11-05 15:15:28,108 DEBUG brian2.utils.filelock: Lock 140605134432240 released on /home/nikos/.cython/brian_extensions/_cython_magic_2a4d0902a0c42f2b2b3223175492d465.lock 2021-11-05 15:15:28,108 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=spikemonitor_7, template name=spikemonitor) for abstract code: _to_record_t = _source_t _to_record_i = _source_i 2021-11-05 15:15:28,109 DIAGNOSTIC brian2.devices.device: spikemonitor_7_codeobject abstract code: _to_record_t = _source_t _to_record_i = _source_i 2021-11-05 15:15:28,110 DIAGNOSTIC brian2.devices.device: spikemonitor_7_codeobject snippet (scalar): _source_t = _array_defaultclock_t[0] 2021-11-05 15:15:28,110 DIAGNOSTIC brian2.devices.device: spikemonitor_7_codeobject snippet (vector): _source_i = _array_CA1_inh_i[_idx] _to_record_t = _source_t _to_record_i = _source_i 2021-11-05 15:15:28,110 DIAGNOSTIC brian2.devices.device: spikemonitor_7_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_spikemonitor_7_N = _namespace['_array_spikemonitor_7_N'] cdef int32_t * _array_spikemonitor_7_N = _buf__array_spikemonitor_7_N.data cdef int32_t N _var__clock_t = _namespace["_var__clock_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double _clock_t _var__source_i = _namespace["_var__source_i"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_inh_i = _namespace['_array_CA1_inh_i'] cdef int32_t * _array_CA1_inh_i = _buf__array_CA1_inh_i.data cdef size_t _num_array_CA1_inh_i = len(_namespace['_array_CA1_inh_i']) cdef int32_t _source_i _var__source_idx = _namespace["_var__source_idx"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_spikemonitor_7__source_idx = _namespace['_array_spikemonitor_7__source_idx'] cdef int32_t * _array_spikemonitor_7__source_idx = _buf__array_spikemonitor_7__source_idx.data cdef size_t _num_array_spikemonitor_7__source_idx = len(_namespace['_array_spikemonitor_7__source_idx']) cdef int32_t _source_idx _var__source_start = _namespace["_var__source_start"] cdef int64_t _source_start = _namespace["_source_start"] _var__source_stop = _namespace["_var__source_stop"] cdef int64_t _source_stop = _namespace["_source_stop"] _var__source_t = _namespace["_var__source_t"] _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_inh__spikespace = _namespace['_array_CA1_inh__spikespace'] cdef int32_t * _array_CA1_inh__spikespace = _buf__array_CA1_inh__spikespace.data cdef size_t _num_array_CA1_inh__spikespace = len(_namespace['_array_CA1_inh__spikespace']) cdef int32_t _spikespace cdef int32_t _to_record_i cdef double _to_record_t _var_count = _namespace["_var_count"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_spikemonitor_7_count = _namespace['_array_spikemonitor_7_count'] cdef int32_t * _array_spikemonitor_7_count = _buf__array_spikemonitor_7_count.data cdef size_t _num_array_spikemonitor_7_count = len(_namespace['_array_spikemonitor_7_count']) cdef int32_t count _var_i = _namespace["_var_i"] _dynamic_array_spikemonitor_7_i = _namespace["_dynamic_array_spikemonitor_7_i"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_spikemonitor_7_i = _namespace['_array_spikemonitor_7_i'] cdef int32_t * _array_spikemonitor_7_i = _buf__array_spikemonitor_7_i.data cdef size_t _num_array_spikemonitor_7_i = len(_namespace['_array_spikemonitor_7_i']) cdef int32_t i _var_t = _namespace["_var_t"] _dynamic_array_spikemonitor_7_t = _namespace["_dynamic_array_spikemonitor_7_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_spikemonitor_7_t = _namespace['_array_spikemonitor_7_t'] cdef double * _array_spikemonitor_7_t = _buf__array_spikemonitor_7_t.data cdef size_t _num_array_spikemonitor_7_t = len(_namespace['_array_spikemonitor_7_t']) cdef double t if '_owner' in _namespace: _owner = _namespace['_owner'] cdef size_t _num_events = _array_CA1_inh__spikespace[_num_array_CA1_inh__spikespace-1] cdef size_t _start_idx, _end_idx, _curlen, _newlen, _j cdef int32_t[:] _i_view cdef double[:] _t_view if _num_events > 0: # For subgroups, we do not want to record all spikes # We assume that spikes are ordered _start_idx = _num_events _end_idx = _num_events for _j in range(_num_events): _idx = _array_CA1_inh__spikespace[_j] if _idx >= _source_start: _start_idx = _j break for _j in range(_num_events-1, _start_idx-1, -1): _idx = _array_CA1_inh__spikespace[_j] if _idx < _source_stop: break _end_idx = _j _num_events = _end_idx - _start_idx if _num_events > 0: # scalar code _vectorisation_idx = 1 _source_t = _array_defaultclock_t[0] _curlen = _array_spikemonitor_7_N[0] _newlen = _curlen + _num_events # Resize the arrays _owner.resize(_newlen) _array_spikemonitor_7_N[0] = _newlen _i_view = _dynamic_array_spikemonitor_7_i.data _t_view = _dynamic_array_spikemonitor_7_t.data # Copy the values across for _j in range(_start_idx, _end_idx): _idx = _array_CA1_inh__spikespace[_j] _vectorisation_idx = _idx _source_i = _array_CA1_inh_i[_idx] _to_record_t = _source_t _to_record_i = _source_i _i_view [_curlen + _j - _start_idx] = _to_record_i _t_view [_curlen + _j - _start_idx] = _to_record_t _array_spikemonitor_7_count[_idx - _source_start] += 1 before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_spikemonitor_7_N = _namespace['_array_spikemonitor_7_N'] cdef int32_t * _array_spikemonitor_7_N = _buf__array_spikemonitor_7_N.data cdef int32_t N _var__clock_t = _namespace["_var__clock_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double _clock_t _var__source_i = _namespace["_var__source_i"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_inh_i = _namespace['_array_CA1_inh_i'] cdef int32_t * _array_CA1_inh_i = _buf__array_CA1_inh_i.data cdef size_t _num_array_CA1_inh_i = len(_namespace['_array_CA1_inh_i']) cdef int32_t _source_i _var__source_idx = _namespace["_var__source_idx"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_spikemonitor_7__source_idx = _namespace['_array_spikemonitor_7__source_idx'] cdef int32_t * _array_spikemonitor_7__source_idx = _buf__array_spikemonitor_7__source_idx.data cdef size_t _num_array_spikemonitor_7__source_idx = len(_namespace['_array_spikemonitor_7__source_idx']) cdef int32_t _source_idx _var__source_start = _namespace["_var__source_start"] cdef int64_t _source_start = _namespace["_source_start"] _var__source_stop = _namespace["_var__source_stop"] cdef int64_t _source_stop = _namespace["_source_stop"] _var__source_t = _namespace["_var__source_t"] _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_inh__spikespace = _namespace['_array_CA1_inh__spikespace'] cdef int32_t * _array_CA1_inh__spikespace = _buf__array_CA1_inh__spikespace.data cdef size_t _num_array_CA1_inh__spikespace = len(_namespace['_array_CA1_inh__spikespace']) cdef int32_t _spikespace cdef int32_t _to_record_i cdef double _to_record_t _var_count = _namespace["_var_count"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_spikemonitor_7_count = _namespace['_array_spikemonitor_7_count'] cdef int32_t * _array_spikemonitor_7_count = _buf__array_spikemonitor_7_count.data cdef size_t _num_array_spikemonitor_7_count = len(_namespace['_array_spikemonitor_7_count']) cdef int32_t count _var_i = _namespace["_var_i"] _dynamic_array_spikemonitor_7_i = _namespace["_dynamic_array_spikemonitor_7_i"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_spikemonitor_7_i = _namespace['_array_spikemonitor_7_i'] cdef int32_t * _array_spikemonitor_7_i = _buf__array_spikemonitor_7_i.data cdef size_t _num_array_spikemonitor_7_i = len(_namespace['_array_spikemonitor_7_i']) cdef int32_t i _var_t = _namespace["_var_t"] _dynamic_array_spikemonitor_7_t = _namespace["_dynamic_array_spikemonitor_7_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_spikemonitor_7_t = _namespace['_array_spikemonitor_7_t'] cdef double * _array_spikemonitor_7_t = _buf__array_spikemonitor_7_t.data cdef size_t _num_array_spikemonitor_7_t = len(_namespace['_array_spikemonitor_7_t']) cdef double t if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_spikemonitor_7_N = _namespace['_array_spikemonitor_7_N'] cdef int32_t * _array_spikemonitor_7_N = _buf__array_spikemonitor_7_N.data cdef int32_t N _var__clock_t = _namespace["_var__clock_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double _clock_t _var__source_i = _namespace["_var__source_i"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_inh_i = _namespace['_array_CA1_inh_i'] cdef int32_t * _array_CA1_inh_i = _buf__array_CA1_inh_i.data cdef size_t _num_array_CA1_inh_i = len(_namespace['_array_CA1_inh_i']) cdef int32_t _source_i _var__source_idx = _namespace["_var__source_idx"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_spikemonitor_7__source_idx = _namespace['_array_spikemonitor_7__source_idx'] cdef int32_t * _array_spikemonitor_7__source_idx = _buf__array_spikemonitor_7__source_idx.data cdef size_t _num_array_spikemonitor_7__source_idx = len(_namespace['_array_spikemonitor_7__source_idx']) cdef int32_t _source_idx _var__source_start = _namespace["_var__source_start"] cdef int64_t _source_start = _namespace["_source_start"] _var__source_stop = _namespace["_var__source_stop"] cdef int64_t _source_stop = _namespace["_source_stop"] _var__source_t = _namespace["_var__source_t"] _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_inh__spikespace = _namespace['_array_CA1_inh__spikespace'] cdef int32_t * _array_CA1_inh__spikespace = _buf__array_CA1_inh__spikespace.data cdef size_t _num_array_CA1_inh__spikespace = len(_namespace['_array_CA1_inh__spikespace']) cdef int32_t _spikespace cdef int32_t _to_record_i cdef double _to_record_t _var_count = _namespace["_var_count"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_spikemonitor_7_count = _namespace['_array_spikemonitor_7_count'] cdef int32_t * _array_spikemonitor_7_count = _buf__array_spikemonitor_7_count.data cdef size_t _num_array_spikemonitor_7_count = len(_namespace['_array_spikemonitor_7_count']) cdef int32_t count _var_i = _namespace["_var_i"] _dynamic_array_spikemonitor_7_i = _namespace["_dynamic_array_spikemonitor_7_i"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_spikemonitor_7_i = _namespace['_array_spikemonitor_7_i'] cdef int32_t * _array_spikemonitor_7_i = _buf__array_spikemonitor_7_i.data cdef size_t _num_array_spikemonitor_7_i = len(_namespace['_array_spikemonitor_7_i']) cdef int32_t i _var_t = _namespace["_var_t"] _dynamic_array_spikemonitor_7_t = _namespace["_dynamic_array_spikemonitor_7_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_spikemonitor_7_t = _namespace['_array_spikemonitor_7_t'] cdef double * _array_spikemonitor_7_t = _buf__array_spikemonitor_7_t.data cdef size_t _num_array_spikemonitor_7_t = len(_namespace['_array_spikemonitor_7_t']) cdef double t if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:15:28,111 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name spikemonitor_7_codeobject 2021-11-05 15:15:28,111 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "spikemonitor_7_spikemonitor" using Cython module "_cython_magic_70cae34fb1783d446bf6192897c142a3" 2021-11-05 15:15:28,111 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140606219301600 on /home/nikos/.cython/brian_extensions/_cython_magic_70cae34fb1783d446bf6192897c142a3.lock 2021-11-05 15:15:28,111 DEBUG brian2.utils.filelock: Lock 140606219301600 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_70cae34fb1783d446bf6192897c142a3.lock 2021-11-05 15:15:28,111 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140606219301600 on /home/nikos/.cython/brian_extensions/_cython_magic_70cae34fb1783d446bf6192897c142a3.lock 2021-11-05 15:15:28,112 DEBUG brian2.utils.filelock: Lock 140606219301600 released on /home/nikos/.cython/brian_extensions/_cython_magic_70cae34fb1783d446bf6192897c142a3.lock 2021-11-05 15:15:28,112 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=CA1_inhtoCA1_inh_pre, template name=synapses_push_spikes) for abstract code: 2021-11-05 15:15:28,125 DIAGNOSTIC brian2.devices.device: CA1_inhtoCA1_inh_pre_push_spikes abstract code: 2021-11-05 15:15:28,125 DIAGNOSTIC brian2.devices.device: CA1_inhtoCA1_inh_pre_push_spikes snippet (scalar): 2021-11-05 15:15:28,125 DIAGNOSTIC brian2.devices.device: CA1_inhtoCA1_inh_pre_push_spikes snippet (vector): 2021-11-05 15:15:28,125 DIAGNOSTIC brian2.devices.device: CA1_inhtoCA1_inh_pre_push_spikes code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_inh__spikespace = _namespace['_array_CA1_inh__spikespace'] cdef int32_t * _array_CA1_inh__spikespace = _buf__array_CA1_inh__spikespace.data cdef size_t _num_array_CA1_inh__spikespace = len(_namespace['_array_CA1_inh__spikespace']) cdef int32_t _spikespace if '_owner' in _namespace: _owner = _namespace['_owner'] _owner.push_spikes() before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_inh__spikespace = _namespace['_array_CA1_inh__spikespace'] cdef int32_t * _array_CA1_inh__spikespace = _buf__array_CA1_inh__spikespace.data cdef size_t _num_array_CA1_inh__spikespace = len(_namespace['_array_CA1_inh__spikespace']) cdef int32_t _spikespace if '_owner' in _namespace: _owner = _namespace['_owner'] _owner.initialise_queue() after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_inh__spikespace = _namespace['_array_CA1_inh__spikespace'] cdef int32_t * _array_CA1_inh__spikespace = _buf__array_CA1_inh__spikespace.data cdef size_t _num_array_CA1_inh__spikespace = len(_namespace['_array_CA1_inh__spikespace']) cdef int32_t _spikespace if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:15:28,125 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name CA1_inhtoCA1_inh_pre_push_spikes 2021-11-05 15:15:28,126 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "CA1_inhtoCA1_inh_pre_synapses_push_spikes" using Cython module "_cython_magic_b186913aa58b16f1326dc3c034e063b5" 2021-11-05 15:15:28,126 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140606222221568 on /home/nikos/.cython/brian_extensions/_cython_magic_b186913aa58b16f1326dc3c034e063b5.lock 2021-11-05 15:15:28,126 DEBUG brian2.utils.filelock: Lock 140606222221568 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_b186913aa58b16f1326dc3c034e063b5.lock 2021-11-05 15:15:28,126 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140606222221568 on /home/nikos/.cython/brian_extensions/_cython_magic_b186913aa58b16f1326dc3c034e063b5.lock 2021-11-05 15:15:28,126 DEBUG brian2.utils.filelock: Lock 140606222221568 released on /home/nikos/.cython/brian_extensions/_cython_magic_b186913aa58b16f1326dc3c034e063b5.lock 2021-11-05 15:15:28,126 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "CA1_inhtoCA1_inh_pre_synapses_push_spikes" using Cython module "_cython_magic_c569fec0794958789b9292ff6655af54" 2021-11-05 15:15:28,126 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140606222221952 on /home/nikos/.cython/brian_extensions/_cython_magic_c569fec0794958789b9292ff6655af54.lock 2021-11-05 15:15:28,126 DEBUG brian2.utils.filelock: Lock 140606222221952 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_c569fec0794958789b9292ff6655af54.lock 2021-11-05 15:15:28,126 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140606222221952 on /home/nikos/.cython/brian_extensions/_cython_magic_c569fec0794958789b9292ff6655af54.lock 2021-11-05 15:15:28,126 DEBUG brian2.utils.filelock: Lock 140606222221952 released on /home/nikos/.cython/brian_extensions/_cython_magic_c569fec0794958789b9292ff6655af54.lock 2021-11-05 15:15:28,126 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=CA1_inhtoCA1_inh, template name=synapses) for abstract code: hi_post+=3.0*6e-10*siemens 2021-11-05 15:15:28,147 DIAGNOSTIC brian2.devices.device: CA1_inhtoCA1_inh_pre_codeobject abstract code: hi_post+=3.0*6e-10*siemens 2021-11-05 15:15:28,148 DIAGNOSTIC brian2.devices.device: CA1_inhtoCA1_inh_pre_codeobject snippet (scalar): _lio_1 = 1.8e-09 * siemens 2021-11-05 15:15:28,148 DIAGNOSTIC brian2.devices.device: CA1_inhtoCA1_inh_pre_codeobject snippet (vector): _postsynaptic_idx = _array_CA1_inhtoCA1_inh__synaptic_post[_idx] hi_post = _array_CA1_inh_hi[_postsynaptic_idx] hi_post += _lio_1 _array_CA1_inh_hi[_postsynaptic_idx] = hi_post 2021-11-05 15:15:28,148 DIAGNOSTIC brian2.devices.device: CA1_inhtoCA1_inh_pre_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var__postsynaptic_idx = _namespace["_var__postsynaptic_idx"] _dynamic_array_CA1_inhtoCA1_inh__synaptic_post = _namespace["_dynamic_array_CA1_inhtoCA1_inh__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_inhtoCA1_inh__synaptic_post = _namespace['_array_CA1_inhtoCA1_inh__synaptic_post'] cdef int32_t * _array_CA1_inhtoCA1_inh__synaptic_post = _buf__array_CA1_inhtoCA1_inh__synaptic_post.data cdef size_t _num_array_CA1_inhtoCA1_inh__synaptic_post = len(_namespace['_array_CA1_inhtoCA1_inh__synaptic_post']) cdef int32_t _postsynaptic_idx _queue = _namespace["_queue"] _var_hi_post = _namespace["_var_hi_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_hi = _namespace['_array_CA1_inh_hi'] cdef double * _array_CA1_inh_hi = _buf__array_CA1_inh_hi.data cdef size_t _num_array_CA1_inh_hi = len(_namespace['_array_CA1_inh_hi']) cdef double hi_post _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] cdef double _lio_1 if '_owner' in _namespace: _owner = _namespace['_owner'] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _spiking_synapses = _queue.peek() # scalar code _vectorisation_idx = 1 _lio_1 = 1.8e-09 * siemens cdef size_t _spiking_synapse_idx for _spiking_synapse_idx in range(len(_spiking_synapses)): # vector code _idx = _spiking_synapses[_spiking_synapse_idx] _vectorisation_idx = _idx _postsynaptic_idx = _array_CA1_inhtoCA1_inh__synaptic_post[_idx] hi_post = _array_CA1_inh_hi[_postsynaptic_idx] hi_post += _lio_1 _array_CA1_inh_hi[_postsynaptic_idx] = hi_post # Advance the spike queue _queue.advance() before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var__postsynaptic_idx = _namespace["_var__postsynaptic_idx"] _dynamic_array_CA1_inhtoCA1_inh__synaptic_post = _namespace["_dynamic_array_CA1_inhtoCA1_inh__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_inhtoCA1_inh__synaptic_post = _namespace['_array_CA1_inhtoCA1_inh__synaptic_post'] cdef int32_t * _array_CA1_inhtoCA1_inh__synaptic_post = _buf__array_CA1_inhtoCA1_inh__synaptic_post.data cdef size_t _num_array_CA1_inhtoCA1_inh__synaptic_post = len(_namespace['_array_CA1_inhtoCA1_inh__synaptic_post']) cdef int32_t _postsynaptic_idx _queue = _namespace["_queue"] _var_hi_post = _namespace["_var_hi_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_hi = _namespace['_array_CA1_inh_hi'] cdef double * _array_CA1_inh_hi = _buf__array_CA1_inh_hi.data cdef size_t _num_array_CA1_inh_hi = len(_namespace['_array_CA1_inh_hi']) cdef double hi_post _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] cdef double _lio_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var__postsynaptic_idx = _namespace["_var__postsynaptic_idx"] _dynamic_array_CA1_inhtoCA1_inh__synaptic_post = _namespace["_dynamic_array_CA1_inhtoCA1_inh__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_inhtoCA1_inh__synaptic_post = _namespace['_array_CA1_inhtoCA1_inh__synaptic_post'] cdef int32_t * _array_CA1_inhtoCA1_inh__synaptic_post = _buf__array_CA1_inhtoCA1_inh__synaptic_post.data cdef size_t _num_array_CA1_inhtoCA1_inh__synaptic_post = len(_namespace['_array_CA1_inhtoCA1_inh__synaptic_post']) cdef int32_t _postsynaptic_idx _queue = _namespace["_queue"] _var_hi_post = _namespace["_var_hi_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_hi = _namespace['_array_CA1_inh_hi'] cdef double * _array_CA1_inh_hi = _buf__array_CA1_inh_hi.data cdef size_t _num_array_CA1_inh_hi = len(_namespace['_array_CA1_inh_hi']) cdef double hi_post _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] cdef double _lio_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:15:28,148 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name CA1_inhtoCA1_inh_pre_codeobject 2021-11-05 15:15:28,148 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "CA1_inhtoCA1_inh_synapses" using Cython module "_cython_magic_97a713fd570894dfef230e2a2470fc2d" 2021-11-05 15:15:28,148 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140606145661248 on /home/nikos/.cython/brian_extensions/_cython_magic_97a713fd570894dfef230e2a2470fc2d.lock 2021-11-05 15:15:28,148 DEBUG brian2.utils.filelock: Lock 140606145661248 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_97a713fd570894dfef230e2a2470fc2d.lock 2021-11-05 15:15:28,149 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140606145661248 on /home/nikos/.cython/brian_extensions/_cython_magic_97a713fd570894dfef230e2a2470fc2d.lock 2021-11-05 15:15:28,149 DEBUG brian2.utils.filelock: Lock 140606145661248 released on /home/nikos/.cython/brian_extensions/_cython_magic_97a713fd570894dfef230e2a2470fc2d.lock 2021-11-05 15:15:28,149 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=CA1_inhtoCA1_pyCAN_pre, template name=synapses_push_spikes) for abstract code: 2021-11-05 15:15:28,164 DIAGNOSTIC brian2.devices.device: CA1_inhtoCA1_pyCAN_pre_push_spikes abstract code: 2021-11-05 15:15:28,164 DIAGNOSTIC brian2.devices.device: CA1_inhtoCA1_pyCAN_pre_push_spikes snippet (scalar): 2021-11-05 15:15:28,164 DIAGNOSTIC brian2.devices.device: CA1_inhtoCA1_pyCAN_pre_push_spikes snippet (vector): 2021-11-05 15:15:28,164 DIAGNOSTIC brian2.devices.device: CA1_inhtoCA1_pyCAN_pre_push_spikes code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_inh__spikespace = _namespace['_array_CA1_inh__spikespace'] cdef int32_t * _array_CA1_inh__spikespace = _buf__array_CA1_inh__spikespace.data cdef size_t _num_array_CA1_inh__spikespace = len(_namespace['_array_CA1_inh__spikespace']) cdef int32_t _spikespace if '_owner' in _namespace: _owner = _namespace['_owner'] _owner.push_spikes() before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_inh__spikespace = _namespace['_array_CA1_inh__spikespace'] cdef int32_t * _array_CA1_inh__spikespace = _buf__array_CA1_inh__spikespace.data cdef size_t _num_array_CA1_inh__spikespace = len(_namespace['_array_CA1_inh__spikespace']) cdef int32_t _spikespace if '_owner' in _namespace: _owner = _namespace['_owner'] _owner.initialise_queue() after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_inh__spikespace = _namespace['_array_CA1_inh__spikespace'] cdef int32_t * _array_CA1_inh__spikespace = _buf__array_CA1_inh__spikespace.data cdef size_t _num_array_CA1_inh__spikespace = len(_namespace['_array_CA1_inh__spikespace']) cdef int32_t _spikespace if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:15:28,164 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name CA1_inhtoCA1_pyCAN_pre_push_spikes 2021-11-05 15:15:28,165 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=CA1_inhtoCA1_pyCAN, template name=synapses) for abstract code: hi_post+=3.0*6e-10*siemens 2021-11-05 15:15:28,188 DIAGNOSTIC brian2.devices.device: CA1_inhtoCA1_pyCAN_pre_codeobject abstract code: hi_post+=3.0*6e-10*siemens 2021-11-05 15:15:28,189 DIAGNOSTIC brian2.devices.device: CA1_inhtoCA1_pyCAN_pre_codeobject snippet (scalar): _lio_1 = 1.8e-09 * siemens 2021-11-05 15:15:28,189 DIAGNOSTIC brian2.devices.device: CA1_inhtoCA1_pyCAN_pre_codeobject snippet (vector): _postsynaptic_idx = _array_CA1_inhtoCA1_pyCAN__synaptic_post[_idx] hi_post = _array_CA1_pyCAN_hi[_postsynaptic_idx] hi_post += _lio_1 _array_CA1_pyCAN_hi[_postsynaptic_idx] = hi_post 2021-11-05 15:15:28,189 DIAGNOSTIC brian2.devices.device: CA1_inhtoCA1_pyCAN_pre_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var__postsynaptic_idx = _namespace["_var__postsynaptic_idx"] _dynamic_array_CA1_inhtoCA1_pyCAN__synaptic_post = _namespace["_dynamic_array_CA1_inhtoCA1_pyCAN__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_inhtoCA1_pyCAN__synaptic_post = _namespace['_array_CA1_inhtoCA1_pyCAN__synaptic_post'] cdef int32_t * _array_CA1_inhtoCA1_pyCAN__synaptic_post = _buf__array_CA1_inhtoCA1_pyCAN__synaptic_post.data cdef size_t _num_array_CA1_inhtoCA1_pyCAN__synaptic_post = len(_namespace['_array_CA1_inhtoCA1_pyCAN__synaptic_post']) cdef int32_t _postsynaptic_idx _queue = _namespace["_queue"] _var_hi_post = _namespace["_var_hi_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_hi = _namespace['_array_CA1_pyCAN_hi'] cdef double * _array_CA1_pyCAN_hi = _buf__array_CA1_pyCAN_hi.data cdef size_t _num_array_CA1_pyCAN_hi = len(_namespace['_array_CA1_pyCAN_hi']) cdef double hi_post _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] cdef double _lio_1 if '_owner' in _namespace: _owner = _namespace['_owner'] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _spiking_synapses = _queue.peek() # scalar code _vectorisation_idx = 1 _lio_1 = 1.8e-09 * siemens cdef size_t _spiking_synapse_idx for _spiking_synapse_idx in range(len(_spiking_synapses)): # vector code _idx = _spiking_synapses[_spiking_synapse_idx] _vectorisation_idx = _idx _postsynaptic_idx = _array_CA1_inhtoCA1_pyCAN__synaptic_post[_idx] hi_post = _array_CA1_pyCAN_hi[_postsynaptic_idx] hi_post += _lio_1 _array_CA1_pyCAN_hi[_postsynaptic_idx] = hi_post # Advance the spike queue _queue.advance() before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var__postsynaptic_idx = _namespace["_var__postsynaptic_idx"] _dynamic_array_CA1_inhtoCA1_pyCAN__synaptic_post = _namespace["_dynamic_array_CA1_inhtoCA1_pyCAN__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_inhtoCA1_pyCAN__synaptic_post = _namespace['_array_CA1_inhtoCA1_pyCAN__synaptic_post'] cdef int32_t * _array_CA1_inhtoCA1_pyCAN__synaptic_post = _buf__array_CA1_inhtoCA1_pyCAN__synaptic_post.data cdef size_t _num_array_CA1_inhtoCA1_pyCAN__synaptic_post = len(_namespace['_array_CA1_inhtoCA1_pyCAN__synaptic_post']) cdef int32_t _postsynaptic_idx _queue = _namespace["_queue"] _var_hi_post = _namespace["_var_hi_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_hi = _namespace['_array_CA1_pyCAN_hi'] cdef double * _array_CA1_pyCAN_hi = _buf__array_CA1_pyCAN_hi.data cdef size_t _num_array_CA1_pyCAN_hi = len(_namespace['_array_CA1_pyCAN_hi']) cdef double hi_post _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] cdef double _lio_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var__postsynaptic_idx = _namespace["_var__postsynaptic_idx"] _dynamic_array_CA1_inhtoCA1_pyCAN__synaptic_post = _namespace["_dynamic_array_CA1_inhtoCA1_pyCAN__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_inhtoCA1_pyCAN__synaptic_post = _namespace['_array_CA1_inhtoCA1_pyCAN__synaptic_post'] cdef int32_t * _array_CA1_inhtoCA1_pyCAN__synaptic_post = _buf__array_CA1_inhtoCA1_pyCAN__synaptic_post.data cdef size_t _num_array_CA1_inhtoCA1_pyCAN__synaptic_post = len(_namespace['_array_CA1_inhtoCA1_pyCAN__synaptic_post']) cdef int32_t _postsynaptic_idx _queue = _namespace["_queue"] _var_hi_post = _namespace["_var_hi_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_hi = _namespace['_array_CA1_pyCAN_hi'] cdef double * _array_CA1_pyCAN_hi = _buf__array_CA1_pyCAN_hi.data cdef size_t _num_array_CA1_pyCAN_hi = len(_namespace['_array_CA1_pyCAN_hi']) cdef double hi_post _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] cdef double _lio_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:15:28,189 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name CA1_inhtoCA1_pyCAN_pre_codeobject 2021-11-05 15:15:28,190 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "CA1_inhtoCA1_pyCAN_synapses" using Cython module "_cython_magic_83f21c3a7eaeb020ea0e5cb63e115926" 2021-11-05 15:15:28,190 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140606145659664 on /home/nikos/.cython/brian_extensions/_cython_magic_83f21c3a7eaeb020ea0e5cb63e115926.lock 2021-11-05 15:15:28,190 DEBUG brian2.utils.filelock: Lock 140606145659664 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_83f21c3a7eaeb020ea0e5cb63e115926.lock 2021-11-05 15:15:28,190 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140606145659664 on /home/nikos/.cython/brian_extensions/_cython_magic_83f21c3a7eaeb020ea0e5cb63e115926.lock 2021-11-05 15:15:28,190 DEBUG brian2.utils.filelock: Lock 140606145659664 released on /home/nikos/.cython/brian_extensions/_cython_magic_83f21c3a7eaeb020ea0e5cb63e115926.lock 2021-11-05 15:15:28,190 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=CA1_pyCANtoCA1_inh_pre, template name=synapses_push_spikes) for abstract code: 2021-11-05 15:15:28,204 DIAGNOSTIC brian2.devices.device: CA1_pyCANtoCA1_inh_pre_push_spikes abstract code: 2021-11-05 15:15:28,204 DIAGNOSTIC brian2.devices.device: CA1_pyCANtoCA1_inh_pre_push_spikes snippet (scalar): 2021-11-05 15:15:28,204 DIAGNOSTIC brian2.devices.device: CA1_pyCANtoCA1_inh_pre_push_spikes snippet (vector): 2021-11-05 15:15:28,204 DIAGNOSTIC brian2.devices.device: CA1_pyCANtoCA1_inh_pre_push_spikes code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_pyCAN__spikespace = _namespace['_array_CA1_pyCAN__spikespace'] cdef int32_t * _array_CA1_pyCAN__spikespace = _buf__array_CA1_pyCAN__spikespace.data cdef size_t _num_array_CA1_pyCAN__spikespace = len(_namespace['_array_CA1_pyCAN__spikespace']) cdef int32_t _spikespace if '_owner' in _namespace: _owner = _namespace['_owner'] _owner.push_spikes() before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_pyCAN__spikespace = _namespace['_array_CA1_pyCAN__spikespace'] cdef int32_t * _array_CA1_pyCAN__spikespace = _buf__array_CA1_pyCAN__spikespace.data cdef size_t _num_array_CA1_pyCAN__spikespace = len(_namespace['_array_CA1_pyCAN__spikespace']) cdef int32_t _spikespace if '_owner' in _namespace: _owner = _namespace['_owner'] _owner.initialise_queue() after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_pyCAN__spikespace = _namespace['_array_CA1_pyCAN__spikespace'] cdef int32_t * _array_CA1_pyCAN__spikespace = _buf__array_CA1_pyCAN__spikespace.data cdef size_t _num_array_CA1_pyCAN__spikespace = len(_namespace['_array_CA1_pyCAN__spikespace']) cdef int32_t _spikespace if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:15:28,204 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name CA1_pyCANtoCA1_inh_pre_push_spikes 2021-11-05 15:15:28,205 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "CA1_pyCANtoCA1_inh_pre_synapses_push_spikes" using Cython module "_cython_magic_7eb0f3e9d112f6cb168b2e61f0d688c9" 2021-11-05 15:15:28,205 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140606145660240 on /home/nikos/.cython/brian_extensions/_cython_magic_7eb0f3e9d112f6cb168b2e61f0d688c9.lock 2021-11-05 15:15:28,205 DEBUG brian2.utils.filelock: Lock 140606145660240 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_7eb0f3e9d112f6cb168b2e61f0d688c9.lock 2021-11-05 15:15:28,205 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140606145660240 on /home/nikos/.cython/brian_extensions/_cython_magic_7eb0f3e9d112f6cb168b2e61f0d688c9.lock 2021-11-05 15:15:28,205 DEBUG brian2.utils.filelock: Lock 140606145660240 released on /home/nikos/.cython/brian_extensions/_cython_magic_7eb0f3e9d112f6cb168b2e61f0d688c9.lock 2021-11-05 15:15:28,205 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "CA1_pyCANtoCA1_inh_pre_synapses_push_spikes" using Cython module "_cython_magic_4e34f48f1031da98bc3c1be68560a1b8" 2021-11-05 15:15:28,205 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140606145660480 on /home/nikos/.cython/brian_extensions/_cython_magic_4e34f48f1031da98bc3c1be68560a1b8.lock 2021-11-05 15:15:28,205 DEBUG brian2.utils.filelock: Lock 140606145660480 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_4e34f48f1031da98bc3c1be68560a1b8.lock 2021-11-05 15:15:28,205 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140606145660480 on /home/nikos/.cython/brian_extensions/_cython_magic_4e34f48f1031da98bc3c1be68560a1b8.lock 2021-11-05 15:15:28,206 DEBUG brian2.utils.filelock: Lock 140606145660480 released on /home/nikos/.cython/brian_extensions/_cython_magic_4e34f48f1031da98bc3c1be68560a1b8.lock 2021-11-05 15:15:28,206 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=CA1_pyCANtoCA1_inh, template name=synapses) for abstract code: he_post+=1.0*6e-11*siemens*glu_pre 2021-11-05 15:15:28,227 DIAGNOSTIC brian2.devices.device: CA1_pyCANtoCA1_inh_pre_codeobject abstract code: he_post+=1.0*6e-11*siemens*glu_pre 2021-11-05 15:15:28,228 DIAGNOSTIC brian2.devices.device: CA1_pyCANtoCA1_inh_pre_codeobject snippet (scalar): _lio_1 = 6e-11 * siemens 2021-11-05 15:15:28,228 DIAGNOSTIC brian2.devices.device: CA1_pyCANtoCA1_inh_pre_codeobject snippet (vector): _postsynaptic_idx = _array_CA1_pyCANtoCA1_inh__synaptic_post[_idx] _presynaptic_idx = _array_CA1_pyCANtoCA1_inh__synaptic_pre[_idx] he_post = _array_CA1_inh_he[_postsynaptic_idx] glu_pre = _array_CA1_pyCAN_glu[_presynaptic_idx] he_post += _lio_1 * glu_pre _array_CA1_inh_he[_postsynaptic_idx] = he_post 2021-11-05 15:15:28,228 DIAGNOSTIC brian2.devices.device: CA1_pyCANtoCA1_inh_pre_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var__postsynaptic_idx = _namespace["_var__postsynaptic_idx"] _dynamic_array_CA1_pyCANtoCA1_inh__synaptic_post = _namespace["_dynamic_array_CA1_pyCANtoCA1_inh__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_pyCANtoCA1_inh__synaptic_post = _namespace['_array_CA1_pyCANtoCA1_inh__synaptic_post'] cdef int32_t * _array_CA1_pyCANtoCA1_inh__synaptic_post = _buf__array_CA1_pyCANtoCA1_inh__synaptic_post.data cdef size_t _num_array_CA1_pyCANtoCA1_inh__synaptic_post = len(_namespace['_array_CA1_pyCANtoCA1_inh__synaptic_post']) cdef int32_t _postsynaptic_idx _var__presynaptic_idx = _namespace["_var__presynaptic_idx"] _dynamic_array_CA1_pyCANtoCA1_inh__synaptic_pre = _namespace["_dynamic_array_CA1_pyCANtoCA1_inh__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_pyCANtoCA1_inh__synaptic_pre = _namespace['_array_CA1_pyCANtoCA1_inh__synaptic_pre'] cdef int32_t * _array_CA1_pyCANtoCA1_inh__synaptic_pre = _buf__array_CA1_pyCANtoCA1_inh__synaptic_pre.data cdef size_t _num_array_CA1_pyCANtoCA1_inh__synaptic_pre = len(_namespace['_array_CA1_pyCANtoCA1_inh__synaptic_pre']) cdef int32_t _presynaptic_idx _queue = _namespace["_queue"] _var_glu_pre = _namespace["_var_glu_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_glu = _namespace['_array_CA1_pyCAN_glu'] cdef double * _array_CA1_pyCAN_glu = _buf__array_CA1_pyCAN_glu.data cdef size_t _num_array_CA1_pyCAN_glu = len(_namespace['_array_CA1_pyCAN_glu']) cdef double glu_pre _var_he_post = _namespace["_var_he_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_he = _namespace['_array_CA1_inh_he'] cdef double * _array_CA1_inh_he = _buf__array_CA1_inh_he.data cdef size_t _num_array_CA1_inh_he = len(_namespace['_array_CA1_inh_he']) cdef double he_post _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] cdef double _lio_1 if '_owner' in _namespace: _owner = _namespace['_owner'] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _spiking_synapses = _queue.peek() # scalar code _vectorisation_idx = 1 _lio_1 = 6e-11 * siemens cdef size_t _spiking_synapse_idx for _spiking_synapse_idx in range(len(_spiking_synapses)): # vector code _idx = _spiking_synapses[_spiking_synapse_idx] _vectorisation_idx = _idx _postsynaptic_idx = _array_CA1_pyCANtoCA1_inh__synaptic_post[_idx] _presynaptic_idx = _array_CA1_pyCANtoCA1_inh__synaptic_pre[_idx] he_post = _array_CA1_inh_he[_postsynaptic_idx] glu_pre = _array_CA1_pyCAN_glu[_presynaptic_idx] he_post += _lio_1 * glu_pre _array_CA1_inh_he[_postsynaptic_idx] = he_post # Advance the spike queue _queue.advance() before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var__postsynaptic_idx = _namespace["_var__postsynaptic_idx"] _dynamic_array_CA1_pyCANtoCA1_inh__synaptic_post = _namespace["_dynamic_array_CA1_pyCANtoCA1_inh__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_pyCANtoCA1_inh__synaptic_post = _namespace['_array_CA1_pyCANtoCA1_inh__synaptic_post'] cdef int32_t * _array_CA1_pyCANtoCA1_inh__synaptic_post = _buf__array_CA1_pyCANtoCA1_inh__synaptic_post.data cdef size_t _num_array_CA1_pyCANtoCA1_inh__synaptic_post = len(_namespace['_array_CA1_pyCANtoCA1_inh__synaptic_post']) cdef int32_t _postsynaptic_idx _var__presynaptic_idx = _namespace["_var__presynaptic_idx"] _dynamic_array_CA1_pyCANtoCA1_inh__synaptic_pre = _namespace["_dynamic_array_CA1_pyCANtoCA1_inh__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_pyCANtoCA1_inh__synaptic_pre = _namespace['_array_CA1_pyCANtoCA1_inh__synaptic_pre'] cdef int32_t * _array_CA1_pyCANtoCA1_inh__synaptic_pre = _buf__array_CA1_pyCANtoCA1_inh__synaptic_pre.data cdef size_t _num_array_CA1_pyCANtoCA1_inh__synaptic_pre = len(_namespace['_array_CA1_pyCANtoCA1_inh__synaptic_pre']) cdef int32_t _presynaptic_idx _queue = _namespace["_queue"] _var_glu_pre = _namespace["_var_glu_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_glu = _namespace['_array_CA1_pyCAN_glu'] cdef double * _array_CA1_pyCAN_glu = _buf__array_CA1_pyCAN_glu.data cdef size_t _num_array_CA1_pyCAN_glu = len(_namespace['_array_CA1_pyCAN_glu']) cdef double glu_pre _var_he_post = _namespace["_var_he_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_he = _namespace['_array_CA1_inh_he'] cdef double * _array_CA1_inh_he = _buf__array_CA1_inh_he.data cdef size_t _num_array_CA1_inh_he = len(_namespace['_array_CA1_inh_he']) cdef double he_post _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] cdef double _lio_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var__postsynaptic_idx = _namespace["_var__postsynaptic_idx"] _dynamic_array_CA1_pyCANtoCA1_inh__synaptic_post = _namespace["_dynamic_array_CA1_pyCANtoCA1_inh__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_pyCANtoCA1_inh__synaptic_post = _namespace['_array_CA1_pyCANtoCA1_inh__synaptic_post'] cdef int32_t * _array_CA1_pyCANtoCA1_inh__synaptic_post = _buf__array_CA1_pyCANtoCA1_inh__synaptic_post.data cdef size_t _num_array_CA1_pyCANtoCA1_inh__synaptic_post = len(_namespace['_array_CA1_pyCANtoCA1_inh__synaptic_post']) cdef int32_t _postsynaptic_idx _var__presynaptic_idx = _namespace["_var__presynaptic_idx"] _dynamic_array_CA1_pyCANtoCA1_inh__synaptic_pre = _namespace["_dynamic_array_CA1_pyCANtoCA1_inh__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_pyCANtoCA1_inh__synaptic_pre = _namespace['_array_CA1_pyCANtoCA1_inh__synaptic_pre'] cdef int32_t * _array_CA1_pyCANtoCA1_inh__synaptic_pre = _buf__array_CA1_pyCANtoCA1_inh__synaptic_pre.data cdef size_t _num_array_CA1_pyCANtoCA1_inh__synaptic_pre = len(_namespace['_array_CA1_pyCANtoCA1_inh__synaptic_pre']) cdef int32_t _presynaptic_idx _queue = _namespace["_queue"] _var_glu_pre = _namespace["_var_glu_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_glu = _namespace['_array_CA1_pyCAN_glu'] cdef double * _array_CA1_pyCAN_glu = _buf__array_CA1_pyCAN_glu.data cdef size_t _num_array_CA1_pyCAN_glu = len(_namespace['_array_CA1_pyCAN_glu']) cdef double glu_pre _var_he_post = _namespace["_var_he_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_he = _namespace['_array_CA1_inh_he'] cdef double * _array_CA1_inh_he = _buf__array_CA1_inh_he.data cdef size_t _num_array_CA1_inh_he = len(_namespace['_array_CA1_inh_he']) cdef double he_post _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] cdef double _lio_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:15:28,228 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name CA1_pyCANtoCA1_inh_pre_codeobject 2021-11-05 15:15:28,229 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "CA1_pyCANtoCA1_inh_synapses" using Cython module "_cython_magic_a080f740ba18783c752a274e686c8f5f" 2021-11-05 15:15:28,229 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140606145659664 on /home/nikos/.cython/brian_extensions/_cython_magic_a080f740ba18783c752a274e686c8f5f.lock 2021-11-05 15:15:28,229 DEBUG brian2.utils.filelock: Lock 140606145659664 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_a080f740ba18783c752a274e686c8f5f.lock 2021-11-05 15:15:28,232 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140606145659664 on /home/nikos/.cython/brian_extensions/_cython_magic_a080f740ba18783c752a274e686c8f5f.lock 2021-11-05 15:15:28,232 DEBUG brian2.utils.filelock: Lock 140606145659664 released on /home/nikos/.cython/brian_extensions/_cython_magic_a080f740ba18783c752a274e686c8f5f.lock 2021-11-05 15:15:28,237 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=CA1_pyCANtoEC_inh_pre, template name=synapses_push_spikes) for abstract code: 2021-11-05 15:15:28,251 DIAGNOSTIC brian2.devices.device: CA1_pyCANtoEC_inh_pre_push_spikes abstract code: 2021-11-05 15:15:28,251 DIAGNOSTIC brian2.devices.device: CA1_pyCANtoEC_inh_pre_push_spikes snippet (scalar): 2021-11-05 15:15:28,251 DIAGNOSTIC brian2.devices.device: CA1_pyCANtoEC_inh_pre_push_spikes snippet (vector): 2021-11-05 15:15:28,251 DIAGNOSTIC brian2.devices.device: CA1_pyCANtoEC_inh_pre_push_spikes code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_pyCAN__spikespace = _namespace['_array_CA1_pyCAN__spikespace'] cdef int32_t * _array_CA1_pyCAN__spikespace = _buf__array_CA1_pyCAN__spikespace.data cdef size_t _num_array_CA1_pyCAN__spikespace = len(_namespace['_array_CA1_pyCAN__spikespace']) cdef int32_t _spikespace if '_owner' in _namespace: _owner = _namespace['_owner'] _owner.push_spikes() before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_pyCAN__spikespace = _namespace['_array_CA1_pyCAN__spikespace'] cdef int32_t * _array_CA1_pyCAN__spikespace = _buf__array_CA1_pyCAN__spikespace.data cdef size_t _num_array_CA1_pyCAN__spikespace = len(_namespace['_array_CA1_pyCAN__spikespace']) cdef int32_t _spikespace if '_owner' in _namespace: _owner = _namespace['_owner'] _owner.initialise_queue() after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_pyCAN__spikespace = _namespace['_array_CA1_pyCAN__spikespace'] cdef int32_t * _array_CA1_pyCAN__spikespace = _buf__array_CA1_pyCAN__spikespace.data cdef size_t _num_array_CA1_pyCAN__spikespace = len(_namespace['_array_CA1_pyCAN__spikespace']) cdef int32_t _spikespace if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:15:28,251 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name CA1_pyCANtoEC_inh_pre_push_spikes 2021-11-05 15:15:28,252 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=CA1_pyCANtoEC_inh, template name=synapses) for abstract code: he_ext_post+=1.0*6e-11*siemens*glu_pre 2021-11-05 15:15:28,273 DIAGNOSTIC brian2.devices.device: CA1_pyCANtoEC_inh_pre_codeobject abstract code: he_ext_post+=1.0*6e-11*siemens*glu_pre 2021-11-05 15:15:28,274 DIAGNOSTIC brian2.devices.device: CA1_pyCANtoEC_inh_pre_codeobject snippet (scalar): _lio_1 = 6e-11 * siemens 2021-11-05 15:15:28,274 DIAGNOSTIC brian2.devices.device: CA1_pyCANtoEC_inh_pre_codeobject snippet (vector): _postsynaptic_idx = _array_CA1_pyCANtoEC_inh__synaptic_post[_idx] _presynaptic_idx = _array_CA1_pyCANtoEC_inh__synaptic_pre[_idx] he_ext_post = _array_EC_inh_he_ext[_postsynaptic_idx] glu_pre = _array_CA1_pyCAN_glu[_presynaptic_idx] he_ext_post += _lio_1 * glu_pre _array_EC_inh_he_ext[_postsynaptic_idx] = he_ext_post 2021-11-05 15:15:28,275 DIAGNOSTIC brian2.devices.device: CA1_pyCANtoEC_inh_pre_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var__postsynaptic_idx = _namespace["_var__postsynaptic_idx"] _dynamic_array_CA1_pyCANtoEC_inh__synaptic_post = _namespace["_dynamic_array_CA1_pyCANtoEC_inh__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_pyCANtoEC_inh__synaptic_post = _namespace['_array_CA1_pyCANtoEC_inh__synaptic_post'] cdef int32_t * _array_CA1_pyCANtoEC_inh__synaptic_post = _buf__array_CA1_pyCANtoEC_inh__synaptic_post.data cdef size_t _num_array_CA1_pyCANtoEC_inh__synaptic_post = len(_namespace['_array_CA1_pyCANtoEC_inh__synaptic_post']) cdef int32_t _postsynaptic_idx _var__presynaptic_idx = _namespace["_var__presynaptic_idx"] _dynamic_array_CA1_pyCANtoEC_inh__synaptic_pre = _namespace["_dynamic_array_CA1_pyCANtoEC_inh__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_pyCANtoEC_inh__synaptic_pre = _namespace['_array_CA1_pyCANtoEC_inh__synaptic_pre'] cdef int32_t * _array_CA1_pyCANtoEC_inh__synaptic_pre = _buf__array_CA1_pyCANtoEC_inh__synaptic_pre.data cdef size_t _num_array_CA1_pyCANtoEC_inh__synaptic_pre = len(_namespace['_array_CA1_pyCANtoEC_inh__synaptic_pre']) cdef int32_t _presynaptic_idx _queue = _namespace["_queue"] _var_glu_pre = _namespace["_var_glu_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_glu = _namespace['_array_CA1_pyCAN_glu'] cdef double * _array_CA1_pyCAN_glu = _buf__array_CA1_pyCAN_glu.data cdef size_t _num_array_CA1_pyCAN_glu = len(_namespace['_array_CA1_pyCAN_glu']) cdef double glu_pre _var_he_ext_post = _namespace["_var_he_ext_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_inh_he_ext = _namespace['_array_EC_inh_he_ext'] cdef double * _array_EC_inh_he_ext = _buf__array_EC_inh_he_ext.data cdef size_t _num_array_EC_inh_he_ext = len(_namespace['_array_EC_inh_he_ext']) cdef double he_ext_post _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] cdef double _lio_1 if '_owner' in _namespace: _owner = _namespace['_owner'] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _spiking_synapses = _queue.peek() # scalar code _vectorisation_idx = 1 _lio_1 = 6e-11 * siemens cdef size_t _spiking_synapse_idx for _spiking_synapse_idx in range(len(_spiking_synapses)): # vector code _idx = _spiking_synapses[_spiking_synapse_idx] _vectorisation_idx = _idx _postsynaptic_idx = _array_CA1_pyCANtoEC_inh__synaptic_post[_idx] _presynaptic_idx = _array_CA1_pyCANtoEC_inh__synaptic_pre[_idx] he_ext_post = _array_EC_inh_he_ext[_postsynaptic_idx] glu_pre = _array_CA1_pyCAN_glu[_presynaptic_idx] he_ext_post += _lio_1 * glu_pre _array_EC_inh_he_ext[_postsynaptic_idx] = he_ext_post # Advance the spike queue _queue.advance() before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var__postsynaptic_idx = _namespace["_var__postsynaptic_idx"] _dynamic_array_CA1_pyCANtoEC_inh__synaptic_post = _namespace["_dynamic_array_CA1_pyCANtoEC_inh__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_pyCANtoEC_inh__synaptic_post = _namespace['_array_CA1_pyCANtoEC_inh__synaptic_post'] cdef int32_t * _array_CA1_pyCANtoEC_inh__synaptic_post = _buf__array_CA1_pyCANtoEC_inh__synaptic_post.data cdef size_t _num_array_CA1_pyCANtoEC_inh__synaptic_post = len(_namespace['_array_CA1_pyCANtoEC_inh__synaptic_post']) cdef int32_t _postsynaptic_idx _var__presynaptic_idx = _namespace["_var__presynaptic_idx"] _dynamic_array_CA1_pyCANtoEC_inh__synaptic_pre = _namespace["_dynamic_array_CA1_pyCANtoEC_inh__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_pyCANtoEC_inh__synaptic_pre = _namespace['_array_CA1_pyCANtoEC_inh__synaptic_pre'] cdef int32_t * _array_CA1_pyCANtoEC_inh__synaptic_pre = _buf__array_CA1_pyCANtoEC_inh__synaptic_pre.data cdef size_t _num_array_CA1_pyCANtoEC_inh__synaptic_pre = len(_namespace['_array_CA1_pyCANtoEC_inh__synaptic_pre']) cdef int32_t _presynaptic_idx _queue = _namespace["_queue"] _var_glu_pre = _namespace["_var_glu_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_glu = _namespace['_array_CA1_pyCAN_glu'] cdef double * _array_CA1_pyCAN_glu = _buf__array_CA1_pyCAN_glu.data cdef size_t _num_array_CA1_pyCAN_glu = len(_namespace['_array_CA1_pyCAN_glu']) cdef double glu_pre _var_he_ext_post = _namespace["_var_he_ext_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_inh_he_ext = _namespace['_array_EC_inh_he_ext'] cdef double * _array_EC_inh_he_ext = _buf__array_EC_inh_he_ext.data cdef size_t _num_array_EC_inh_he_ext = len(_namespace['_array_EC_inh_he_ext']) cdef double he_ext_post _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] cdef double _lio_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var__postsynaptic_idx = _namespace["_var__postsynaptic_idx"] _dynamic_array_CA1_pyCANtoEC_inh__synaptic_post = _namespace["_dynamic_array_CA1_pyCANtoEC_inh__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_pyCANtoEC_inh__synaptic_post = _namespace['_array_CA1_pyCANtoEC_inh__synaptic_post'] cdef int32_t * _array_CA1_pyCANtoEC_inh__synaptic_post = _buf__array_CA1_pyCANtoEC_inh__synaptic_post.data cdef size_t _num_array_CA1_pyCANtoEC_inh__synaptic_post = len(_namespace['_array_CA1_pyCANtoEC_inh__synaptic_post']) cdef int32_t _postsynaptic_idx _var__presynaptic_idx = _namespace["_var__presynaptic_idx"] _dynamic_array_CA1_pyCANtoEC_inh__synaptic_pre = _namespace["_dynamic_array_CA1_pyCANtoEC_inh__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_pyCANtoEC_inh__synaptic_pre = _namespace['_array_CA1_pyCANtoEC_inh__synaptic_pre'] cdef int32_t * _array_CA1_pyCANtoEC_inh__synaptic_pre = _buf__array_CA1_pyCANtoEC_inh__synaptic_pre.data cdef size_t _num_array_CA1_pyCANtoEC_inh__synaptic_pre = len(_namespace['_array_CA1_pyCANtoEC_inh__synaptic_pre']) cdef int32_t _presynaptic_idx _queue = _namespace["_queue"] _var_glu_pre = _namespace["_var_glu_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_glu = _namespace['_array_CA1_pyCAN_glu'] cdef double * _array_CA1_pyCAN_glu = _buf__array_CA1_pyCAN_glu.data cdef size_t _num_array_CA1_pyCAN_glu = len(_namespace['_array_CA1_pyCAN_glu']) cdef double glu_pre _var_he_ext_post = _namespace["_var_he_ext_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_inh_he_ext = _namespace['_array_EC_inh_he_ext'] cdef double * _array_EC_inh_he_ext = _buf__array_EC_inh_he_ext.data cdef size_t _num_array_EC_inh_he_ext = len(_namespace['_array_EC_inh_he_ext']) cdef double he_ext_post _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] cdef double _lio_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:15:28,275 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name CA1_pyCANtoEC_inh_pre_codeobject 2021-11-05 15:15:28,275 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "CA1_pyCANtoEC_inh_synapses" using Cython module "_cython_magic_c660e10c1ad46b544bf26134ec10efa7" 2021-11-05 15:15:28,275 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140606145659280 on /home/nikos/.cython/brian_extensions/_cython_magic_c660e10c1ad46b544bf26134ec10efa7.lock 2021-11-05 15:15:28,275 DEBUG brian2.utils.filelock: Lock 140606145659280 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_c660e10c1ad46b544bf26134ec10efa7.lock 2021-11-05 15:15:28,275 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140606145659280 on /home/nikos/.cython/brian_extensions/_cython_magic_c660e10c1ad46b544bf26134ec10efa7.lock 2021-11-05 15:15:28,275 DEBUG brian2.utils.filelock: Lock 140606145659280 released on /home/nikos/.cython/brian_extensions/_cython_magic_c660e10c1ad46b544bf26134ec10efa7.lock 2021-11-05 15:15:28,280 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=CA1_pyCANtoEC_pyCAN_pre, template name=synapses_push_spikes) for abstract code: 2021-11-05 15:15:28,297 DIAGNOSTIC brian2.devices.device: CA1_pyCANtoEC_pyCAN_pre_push_spikes abstract code: 2021-11-05 15:15:28,297 DIAGNOSTIC brian2.devices.device: CA1_pyCANtoEC_pyCAN_pre_push_spikes snippet (scalar): 2021-11-05 15:15:28,297 DIAGNOSTIC brian2.devices.device: CA1_pyCANtoEC_pyCAN_pre_push_spikes snippet (vector): 2021-11-05 15:15:28,297 DIAGNOSTIC brian2.devices.device: CA1_pyCANtoEC_pyCAN_pre_push_spikes code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_pyCAN__spikespace = _namespace['_array_CA1_pyCAN__spikespace'] cdef int32_t * _array_CA1_pyCAN__spikespace = _buf__array_CA1_pyCAN__spikespace.data cdef size_t _num_array_CA1_pyCAN__spikespace = len(_namespace['_array_CA1_pyCAN__spikespace']) cdef int32_t _spikespace if '_owner' in _namespace: _owner = _namespace['_owner'] _owner.push_spikes() before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_pyCAN__spikespace = _namespace['_array_CA1_pyCAN__spikespace'] cdef int32_t * _array_CA1_pyCAN__spikespace = _buf__array_CA1_pyCAN__spikespace.data cdef size_t _num_array_CA1_pyCAN__spikespace = len(_namespace['_array_CA1_pyCAN__spikespace']) cdef int32_t _spikespace if '_owner' in _namespace: _owner = _namespace['_owner'] _owner.initialise_queue() after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_pyCAN__spikespace = _namespace['_array_CA1_pyCAN__spikespace'] cdef int32_t * _array_CA1_pyCAN__spikespace = _buf__array_CA1_pyCAN__spikespace.data cdef size_t _num_array_CA1_pyCAN__spikespace = len(_namespace['_array_CA1_pyCAN__spikespace']) cdef int32_t _spikespace if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:15:28,297 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name CA1_pyCANtoEC_pyCAN_pre_push_spikes 2021-11-05 15:15:28,298 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=CA1_pyCANtoEC_pyCAN, template name=synapses) for abstract code: he_ext_post+=1.0*6e-11*siemens*glu_pre 2021-11-05 15:15:28,322 DIAGNOSTIC brian2.devices.device: CA1_pyCANtoEC_pyCAN_pre_codeobject abstract code: he_ext_post+=1.0*6e-11*siemens*glu_pre 2021-11-05 15:15:28,323 DIAGNOSTIC brian2.devices.device: CA1_pyCANtoEC_pyCAN_pre_codeobject snippet (scalar): _lio_1 = 6e-11 * siemens 2021-11-05 15:15:28,323 DIAGNOSTIC brian2.devices.device: CA1_pyCANtoEC_pyCAN_pre_codeobject snippet (vector): _postsynaptic_idx = _array_CA1_pyCANtoEC_pyCAN__synaptic_post[_idx] _presynaptic_idx = _array_CA1_pyCANtoEC_pyCAN__synaptic_pre[_idx] he_ext_post = _array_EC_pyCAN_he_ext[_postsynaptic_idx] glu_pre = _array_CA1_pyCAN_glu[_presynaptic_idx] he_ext_post += _lio_1 * glu_pre _array_EC_pyCAN_he_ext[_postsynaptic_idx] = he_ext_post 2021-11-05 15:15:28,324 DIAGNOSTIC brian2.devices.device: CA1_pyCANtoEC_pyCAN_pre_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var__postsynaptic_idx = _namespace["_var__postsynaptic_idx"] _dynamic_array_CA1_pyCANtoEC_pyCAN__synaptic_post = _namespace["_dynamic_array_CA1_pyCANtoEC_pyCAN__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_pyCANtoEC_pyCAN__synaptic_post = _namespace['_array_CA1_pyCANtoEC_pyCAN__synaptic_post'] cdef int32_t * _array_CA1_pyCANtoEC_pyCAN__synaptic_post = _buf__array_CA1_pyCANtoEC_pyCAN__synaptic_post.data cdef size_t _num_array_CA1_pyCANtoEC_pyCAN__synaptic_post = len(_namespace['_array_CA1_pyCANtoEC_pyCAN__synaptic_post']) cdef int32_t _postsynaptic_idx _var__presynaptic_idx = _namespace["_var__presynaptic_idx"] _dynamic_array_CA1_pyCANtoEC_pyCAN__synaptic_pre = _namespace["_dynamic_array_CA1_pyCANtoEC_pyCAN__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_pyCANtoEC_pyCAN__synaptic_pre = _namespace['_array_CA1_pyCANtoEC_pyCAN__synaptic_pre'] cdef int32_t * _array_CA1_pyCANtoEC_pyCAN__synaptic_pre = _buf__array_CA1_pyCANtoEC_pyCAN__synaptic_pre.data cdef size_t _num_array_CA1_pyCANtoEC_pyCAN__synaptic_pre = len(_namespace['_array_CA1_pyCANtoEC_pyCAN__synaptic_pre']) cdef int32_t _presynaptic_idx _queue = _namespace["_queue"] _var_glu_pre = _namespace["_var_glu_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_glu = _namespace['_array_CA1_pyCAN_glu'] cdef double * _array_CA1_pyCAN_glu = _buf__array_CA1_pyCAN_glu.data cdef size_t _num_array_CA1_pyCAN_glu = len(_namespace['_array_CA1_pyCAN_glu']) cdef double glu_pre _var_he_ext_post = _namespace["_var_he_ext_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_he_ext = _namespace['_array_EC_pyCAN_he_ext'] cdef double * _array_EC_pyCAN_he_ext = _buf__array_EC_pyCAN_he_ext.data cdef size_t _num_array_EC_pyCAN_he_ext = len(_namespace['_array_EC_pyCAN_he_ext']) cdef double he_ext_post _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] cdef double _lio_1 if '_owner' in _namespace: _owner = _namespace['_owner'] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _spiking_synapses = _queue.peek() # scalar code _vectorisation_idx = 1 _lio_1 = 6e-11 * siemens cdef size_t _spiking_synapse_idx for _spiking_synapse_idx in range(len(_spiking_synapses)): # vector code _idx = _spiking_synapses[_spiking_synapse_idx] _vectorisation_idx = _idx _postsynaptic_idx = _array_CA1_pyCANtoEC_pyCAN__synaptic_post[_idx] _presynaptic_idx = _array_CA1_pyCANtoEC_pyCAN__synaptic_pre[_idx] he_ext_post = _array_EC_pyCAN_he_ext[_postsynaptic_idx] glu_pre = _array_CA1_pyCAN_glu[_presynaptic_idx] he_ext_post += _lio_1 * glu_pre _array_EC_pyCAN_he_ext[_postsynaptic_idx] = he_ext_post # Advance the spike queue _queue.advance() before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var__postsynaptic_idx = _namespace["_var__postsynaptic_idx"] _dynamic_array_CA1_pyCANtoEC_pyCAN__synaptic_post = _namespace["_dynamic_array_CA1_pyCANtoEC_pyCAN__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_pyCANtoEC_pyCAN__synaptic_post = _namespace['_array_CA1_pyCANtoEC_pyCAN__synaptic_post'] cdef int32_t * _array_CA1_pyCANtoEC_pyCAN__synaptic_post = _buf__array_CA1_pyCANtoEC_pyCAN__synaptic_post.data cdef size_t _num_array_CA1_pyCANtoEC_pyCAN__synaptic_post = len(_namespace['_array_CA1_pyCANtoEC_pyCAN__synaptic_post']) cdef int32_t _postsynaptic_idx _var__presynaptic_idx = _namespace["_var__presynaptic_idx"] _dynamic_array_CA1_pyCANtoEC_pyCAN__synaptic_pre = _namespace["_dynamic_array_CA1_pyCANtoEC_pyCAN__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_pyCANtoEC_pyCAN__synaptic_pre = _namespace['_array_CA1_pyCANtoEC_pyCAN__synaptic_pre'] cdef int32_t * _array_CA1_pyCANtoEC_pyCAN__synaptic_pre = _buf__array_CA1_pyCANtoEC_pyCAN__synaptic_pre.data cdef size_t _num_array_CA1_pyCANtoEC_pyCAN__synaptic_pre = len(_namespace['_array_CA1_pyCANtoEC_pyCAN__synaptic_pre']) cdef int32_t _presynaptic_idx _queue = _namespace["_queue"] _var_glu_pre = _namespace["_var_glu_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_glu = _namespace['_array_CA1_pyCAN_glu'] cdef double * _array_CA1_pyCAN_glu = _buf__array_CA1_pyCAN_glu.data cdef size_t _num_array_CA1_pyCAN_glu = len(_namespace['_array_CA1_pyCAN_glu']) cdef double glu_pre _var_he_ext_post = _namespace["_var_he_ext_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_he_ext = _namespace['_array_EC_pyCAN_he_ext'] cdef double * _array_EC_pyCAN_he_ext = _buf__array_EC_pyCAN_he_ext.data cdef size_t _num_array_EC_pyCAN_he_ext = len(_namespace['_array_EC_pyCAN_he_ext']) cdef double he_ext_post _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] cdef double _lio_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var__postsynaptic_idx = _namespace["_var__postsynaptic_idx"] _dynamic_array_CA1_pyCANtoEC_pyCAN__synaptic_post = _namespace["_dynamic_array_CA1_pyCANtoEC_pyCAN__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_pyCANtoEC_pyCAN__synaptic_post = _namespace['_array_CA1_pyCANtoEC_pyCAN__synaptic_post'] cdef int32_t * _array_CA1_pyCANtoEC_pyCAN__synaptic_post = _buf__array_CA1_pyCANtoEC_pyCAN__synaptic_post.data cdef size_t _num_array_CA1_pyCANtoEC_pyCAN__synaptic_post = len(_namespace['_array_CA1_pyCANtoEC_pyCAN__synaptic_post']) cdef int32_t _postsynaptic_idx _var__presynaptic_idx = _namespace["_var__presynaptic_idx"] _dynamic_array_CA1_pyCANtoEC_pyCAN__synaptic_pre = _namespace["_dynamic_array_CA1_pyCANtoEC_pyCAN__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_pyCANtoEC_pyCAN__synaptic_pre = _namespace['_array_CA1_pyCANtoEC_pyCAN__synaptic_pre'] cdef int32_t * _array_CA1_pyCANtoEC_pyCAN__synaptic_pre = _buf__array_CA1_pyCANtoEC_pyCAN__synaptic_pre.data cdef size_t _num_array_CA1_pyCANtoEC_pyCAN__synaptic_pre = len(_namespace['_array_CA1_pyCANtoEC_pyCAN__synaptic_pre']) cdef int32_t _presynaptic_idx _queue = _namespace["_queue"] _var_glu_pre = _namespace["_var_glu_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_glu = _namespace['_array_CA1_pyCAN_glu'] cdef double * _array_CA1_pyCAN_glu = _buf__array_CA1_pyCAN_glu.data cdef size_t _num_array_CA1_pyCAN_glu = len(_namespace['_array_CA1_pyCAN_glu']) cdef double glu_pre _var_he_ext_post = _namespace["_var_he_ext_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_he_ext = _namespace['_array_EC_pyCAN_he_ext'] cdef double * _array_EC_pyCAN_he_ext = _buf__array_EC_pyCAN_he_ext.data cdef size_t _num_array_EC_pyCAN_he_ext = len(_namespace['_array_EC_pyCAN_he_ext']) cdef double he_ext_post _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] cdef double _lio_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:15:28,324 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name CA1_pyCANtoEC_pyCAN_pre_codeobject 2021-11-05 15:15:28,324 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "CA1_pyCANtoEC_pyCAN_synapses" using Cython module "_cython_magic_55faadec5d3890cd3ded751e999caef1" 2021-11-05 15:15:28,324 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140606145660864 on /home/nikos/.cython/brian_extensions/_cython_magic_55faadec5d3890cd3ded751e999caef1.lock 2021-11-05 15:15:28,324 DEBUG brian2.utils.filelock: Lock 140606145660864 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_55faadec5d3890cd3ded751e999caef1.lock 2021-11-05 15:15:28,324 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140606145660864 on /home/nikos/.cython/brian_extensions/_cython_magic_55faadec5d3890cd3ded751e999caef1.lock 2021-11-05 15:15:28,324 DEBUG brian2.utils.filelock: Lock 140606145660864 released on /home/nikos/.cython/brian_extensions/_cython_magic_55faadec5d3890cd3ded751e999caef1.lock 2021-11-05 15:15:28,362 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=CA3_inhtoCA3_pyCAN_pre, template name=synapses_push_spikes) for abstract code: 2021-11-05 15:15:28,377 DIAGNOSTIC brian2.devices.device: CA3_inhtoCA3_pyCAN_pre_push_spikes abstract code: 2021-11-05 15:15:28,377 DIAGNOSTIC brian2.devices.device: CA3_inhtoCA3_pyCAN_pre_push_spikes snippet (scalar): 2021-11-05 15:15:28,377 DIAGNOSTIC brian2.devices.device: CA3_inhtoCA3_pyCAN_pre_push_spikes snippet (vector): 2021-11-05 15:15:28,378 DIAGNOSTIC brian2.devices.device: CA3_inhtoCA3_pyCAN_pre_push_spikes code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_inh__spikespace = _namespace['_array_CA3_inh__spikespace'] cdef int32_t * _array_CA3_inh__spikespace = _buf__array_CA3_inh__spikespace.data cdef size_t _num_array_CA3_inh__spikespace = len(_namespace['_array_CA3_inh__spikespace']) cdef int32_t _spikespace if '_owner' in _namespace: _owner = _namespace['_owner'] _owner.push_spikes() before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_inh__spikespace = _namespace['_array_CA3_inh__spikespace'] cdef int32_t * _array_CA3_inh__spikespace = _buf__array_CA3_inh__spikespace.data cdef size_t _num_array_CA3_inh__spikespace = len(_namespace['_array_CA3_inh__spikespace']) cdef int32_t _spikespace if '_owner' in _namespace: _owner = _namespace['_owner'] _owner.initialise_queue() after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_inh__spikespace = _namespace['_array_CA3_inh__spikespace'] cdef int32_t * _array_CA3_inh__spikespace = _buf__array_CA3_inh__spikespace.data cdef size_t _num_array_CA3_inh__spikespace = len(_namespace['_array_CA3_inh__spikespace']) cdef int32_t _spikespace if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:15:28,378 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name CA3_inhtoCA3_pyCAN_pre_push_spikes 2021-11-05 15:15:28,378 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "CA3_inhtoCA3_pyCAN_pre_synapses_push_spikes" using Cython module "_cython_magic_925860ccc3ecac3529bb25e320e0cdb7" 2021-11-05 15:15:28,378 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140606331214096 on /home/nikos/.cython/brian_extensions/_cython_magic_925860ccc3ecac3529bb25e320e0cdb7.lock 2021-11-05 15:15:28,378 DEBUG brian2.utils.filelock: Lock 140606331214096 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_925860ccc3ecac3529bb25e320e0cdb7.lock 2021-11-05 15:15:28,378 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140606331214096 on /home/nikos/.cython/brian_extensions/_cython_magic_925860ccc3ecac3529bb25e320e0cdb7.lock 2021-11-05 15:15:28,378 DEBUG brian2.utils.filelock: Lock 140606331214096 released on /home/nikos/.cython/brian_extensions/_cython_magic_925860ccc3ecac3529bb25e320e0cdb7.lock 2021-11-05 15:15:28,379 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "CA3_inhtoCA3_pyCAN_pre_synapses_push_spikes" using Cython module "_cython_magic_67f56cb2c0a2233c2eaeb2af1e6a36af" 2021-11-05 15:15:28,379 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140606331213760 on /home/nikos/.cython/brian_extensions/_cython_magic_67f56cb2c0a2233c2eaeb2af1e6a36af.lock 2021-11-05 15:15:28,379 DEBUG brian2.utils.filelock: Lock 140606331213760 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_67f56cb2c0a2233c2eaeb2af1e6a36af.lock 2021-11-05 15:15:28,379 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140606331213760 on /home/nikos/.cython/brian_extensions/_cython_magic_67f56cb2c0a2233c2eaeb2af1e6a36af.lock 2021-11-05 15:15:28,379 DEBUG brian2.utils.filelock: Lock 140606331213760 released on /home/nikos/.cython/brian_extensions/_cython_magic_67f56cb2c0a2233c2eaeb2af1e6a36af.lock 2021-11-05 15:15:28,379 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=CA3_inhtoCA3_pyCAN, template name=synapses) for abstract code: hi_post+=1.0*6e-10*siemens 2021-11-05 15:15:28,402 DIAGNOSTIC brian2.devices.device: CA3_inhtoCA3_pyCAN_pre_codeobject abstract code: hi_post+=1.0*6e-10*siemens 2021-11-05 15:15:28,402 DIAGNOSTIC brian2.devices.device: CA3_inhtoCA3_pyCAN_pre_codeobject snippet (scalar): _lio_1 = 6e-10 * siemens 2021-11-05 15:15:28,402 DIAGNOSTIC brian2.devices.device: CA3_inhtoCA3_pyCAN_pre_codeobject snippet (vector): _postsynaptic_idx = _array_CA3_inhtoCA3_pyCAN__synaptic_post[_idx] hi_post = _array_CA3_pyCAN_hi[_postsynaptic_idx] hi_post += _lio_1 _array_CA3_pyCAN_hi[_postsynaptic_idx] = hi_post 2021-11-05 15:15:28,403 DIAGNOSTIC brian2.devices.device: CA3_inhtoCA3_pyCAN_pre_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var__postsynaptic_idx = _namespace["_var__postsynaptic_idx"] _dynamic_array_CA3_inhtoCA3_pyCAN__synaptic_post = _namespace["_dynamic_array_CA3_inhtoCA3_pyCAN__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_inhtoCA3_pyCAN__synaptic_post = _namespace['_array_CA3_inhtoCA3_pyCAN__synaptic_post'] cdef int32_t * _array_CA3_inhtoCA3_pyCAN__synaptic_post = _buf__array_CA3_inhtoCA3_pyCAN__synaptic_post.data cdef size_t _num_array_CA3_inhtoCA3_pyCAN__synaptic_post = len(_namespace['_array_CA3_inhtoCA3_pyCAN__synaptic_post']) cdef int32_t _postsynaptic_idx _queue = _namespace["_queue"] _var_hi_post = _namespace["_var_hi_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_hi = _namespace['_array_CA3_pyCAN_hi'] cdef double * _array_CA3_pyCAN_hi = _buf__array_CA3_pyCAN_hi.data cdef size_t _num_array_CA3_pyCAN_hi = len(_namespace['_array_CA3_pyCAN_hi']) cdef double hi_post _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] cdef double _lio_1 if '_owner' in _namespace: _owner = _namespace['_owner'] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _spiking_synapses = _queue.peek() # scalar code _vectorisation_idx = 1 _lio_1 = 6e-10 * siemens cdef size_t _spiking_synapse_idx for _spiking_synapse_idx in range(len(_spiking_synapses)): # vector code _idx = _spiking_synapses[_spiking_synapse_idx] _vectorisation_idx = _idx _postsynaptic_idx = _array_CA3_inhtoCA3_pyCAN__synaptic_post[_idx] hi_post = _array_CA3_pyCAN_hi[_postsynaptic_idx] hi_post += _lio_1 _array_CA3_pyCAN_hi[_postsynaptic_idx] = hi_post # Advance the spike queue _queue.advance() before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var__postsynaptic_idx = _namespace["_var__postsynaptic_idx"] _dynamic_array_CA3_inhtoCA3_pyCAN__synaptic_post = _namespace["_dynamic_array_CA3_inhtoCA3_pyCAN__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_inhtoCA3_pyCAN__synaptic_post = _namespace['_array_CA3_inhtoCA3_pyCAN__synaptic_post'] cdef int32_t * _array_CA3_inhtoCA3_pyCAN__synaptic_post = _buf__array_CA3_inhtoCA3_pyCAN__synaptic_post.data cdef size_t _num_array_CA3_inhtoCA3_pyCAN__synaptic_post = len(_namespace['_array_CA3_inhtoCA3_pyCAN__synaptic_post']) cdef int32_t _postsynaptic_idx _queue = _namespace["_queue"] _var_hi_post = _namespace["_var_hi_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_hi = _namespace['_array_CA3_pyCAN_hi'] cdef double * _array_CA3_pyCAN_hi = _buf__array_CA3_pyCAN_hi.data cdef size_t _num_array_CA3_pyCAN_hi = len(_namespace['_array_CA3_pyCAN_hi']) cdef double hi_post _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] cdef double _lio_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var__postsynaptic_idx = _namespace["_var__postsynaptic_idx"] _dynamic_array_CA3_inhtoCA3_pyCAN__synaptic_post = _namespace["_dynamic_array_CA3_inhtoCA3_pyCAN__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_inhtoCA3_pyCAN__synaptic_post = _namespace['_array_CA3_inhtoCA3_pyCAN__synaptic_post'] cdef int32_t * _array_CA3_inhtoCA3_pyCAN__synaptic_post = _buf__array_CA3_inhtoCA3_pyCAN__synaptic_post.data cdef size_t _num_array_CA3_inhtoCA3_pyCAN__synaptic_post = len(_namespace['_array_CA3_inhtoCA3_pyCAN__synaptic_post']) cdef int32_t _postsynaptic_idx _queue = _namespace["_queue"] _var_hi_post = _namespace["_var_hi_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_hi = _namespace['_array_CA3_pyCAN_hi'] cdef double * _array_CA3_pyCAN_hi = _buf__array_CA3_pyCAN_hi.data cdef size_t _num_array_CA3_pyCAN_hi = len(_namespace['_array_CA3_pyCAN_hi']) cdef double hi_post _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] cdef double _lio_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:15:28,403 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name CA3_inhtoCA3_pyCAN_pre_codeobject 2021-11-05 15:15:28,403 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "CA3_inhtoCA3_pyCAN_synapses" using Cython module "_cython_magic_aa93c7c721fa8a26d49902291511e0e2" 2021-11-05 15:15:28,403 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140606331212656 on /home/nikos/.cython/brian_extensions/_cython_magic_aa93c7c721fa8a26d49902291511e0e2.lock 2021-11-05 15:15:28,403 DEBUG brian2.utils.filelock: Lock 140606331212656 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_aa93c7c721fa8a26d49902291511e0e2.lock 2021-11-05 15:15:28,403 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140606331212656 on /home/nikos/.cython/brian_extensions/_cython_magic_aa93c7c721fa8a26d49902291511e0e2.lock 2021-11-05 15:15:28,403 DEBUG brian2.utils.filelock: Lock 140606331212656 released on /home/nikos/.cython/brian_extensions/_cython_magic_aa93c7c721fa8a26d49902291511e0e2.lock 2021-11-05 15:15:28,404 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=CA3_pyCANtoCA1_inh_pre, template name=synapses_push_spikes) for abstract code: 2021-11-05 15:15:28,417 DIAGNOSTIC brian2.devices.device: CA3_pyCANtoCA1_inh_pre_push_spikes abstract code: 2021-11-05 15:15:28,417 DIAGNOSTIC brian2.devices.device: CA3_pyCANtoCA1_inh_pre_push_spikes snippet (scalar): 2021-11-05 15:15:28,418 DIAGNOSTIC brian2.devices.device: CA3_pyCANtoCA1_inh_pre_push_spikes snippet (vector): 2021-11-05 15:15:28,418 DIAGNOSTIC brian2.devices.device: CA3_pyCANtoCA1_inh_pre_push_spikes code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_pyCAN__spikespace = _namespace['_array_CA3_pyCAN__spikespace'] cdef int32_t * _array_CA3_pyCAN__spikespace = _buf__array_CA3_pyCAN__spikespace.data cdef size_t _num_array_CA3_pyCAN__spikespace = len(_namespace['_array_CA3_pyCAN__spikespace']) cdef int32_t _spikespace if '_owner' in _namespace: _owner = _namespace['_owner'] _owner.push_spikes() before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_pyCAN__spikespace = _namespace['_array_CA3_pyCAN__spikespace'] cdef int32_t * _array_CA3_pyCAN__spikespace = _buf__array_CA3_pyCAN__spikespace.data cdef size_t _num_array_CA3_pyCAN__spikespace = len(_namespace['_array_CA3_pyCAN__spikespace']) cdef int32_t _spikespace if '_owner' in _namespace: _owner = _namespace['_owner'] _owner.initialise_queue() after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_pyCAN__spikespace = _namespace['_array_CA3_pyCAN__spikespace'] cdef int32_t * _array_CA3_pyCAN__spikespace = _buf__array_CA3_pyCAN__spikespace.data cdef size_t _num_array_CA3_pyCAN__spikespace = len(_namespace['_array_CA3_pyCAN__spikespace']) cdef int32_t _spikespace if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:15:28,418 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name CA3_pyCANtoCA1_inh_pre_push_spikes 2021-11-05 15:15:28,418 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "CA3_pyCANtoCA1_inh_pre_synapses_push_spikes" using Cython module "_cython_magic_3b38d0ab70e5184a8c626359214e3bc8" 2021-11-05 15:15:28,418 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140606331213328 on /home/nikos/.cython/brian_extensions/_cython_magic_3b38d0ab70e5184a8c626359214e3bc8.lock 2021-11-05 15:15:28,418 DEBUG brian2.utils.filelock: Lock 140606331213328 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_3b38d0ab70e5184a8c626359214e3bc8.lock 2021-11-05 15:15:28,418 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140606331213328 on /home/nikos/.cython/brian_extensions/_cython_magic_3b38d0ab70e5184a8c626359214e3bc8.lock 2021-11-05 15:15:28,418 DEBUG brian2.utils.filelock: Lock 140606331213328 released on /home/nikos/.cython/brian_extensions/_cython_magic_3b38d0ab70e5184a8c626359214e3bc8.lock 2021-11-05 15:15:28,419 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "CA3_pyCANtoCA1_inh_pre_synapses_push_spikes" using Cython module "_cython_magic_fdc06238adc0587c4939119ce990b752" 2021-11-05 15:15:28,419 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140606331211984 on /home/nikos/.cython/brian_extensions/_cython_magic_fdc06238adc0587c4939119ce990b752.lock 2021-11-05 15:15:28,419 DEBUG brian2.utils.filelock: Lock 140606331211984 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_fdc06238adc0587c4939119ce990b752.lock 2021-11-05 15:15:28,419 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140606331211984 on /home/nikos/.cython/brian_extensions/_cython_magic_fdc06238adc0587c4939119ce990b752.lock 2021-11-05 15:15:28,419 DEBUG brian2.utils.filelock: Lock 140606331211984 released on /home/nikos/.cython/brian_extensions/_cython_magic_fdc06238adc0587c4939119ce990b752.lock 2021-11-05 15:15:28,419 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=CA3_pyCANtoCA1_inh, template name=synapses) for abstract code: he_ext_post+=0.3333333333333333*6e-11*siemens*glu_pre 2021-11-05 15:15:28,440 DIAGNOSTIC brian2.devices.device: CA3_pyCANtoCA1_inh_pre_codeobject abstract code: he_ext_post+=0.3333333333333333*6e-11*siemens*glu_pre 2021-11-05 15:15:28,441 DIAGNOSTIC brian2.devices.device: CA3_pyCANtoCA1_inh_pre_codeobject snippet (scalar): _lio_1 = 2e-11 * siemens 2021-11-05 15:15:28,441 DIAGNOSTIC brian2.devices.device: CA3_pyCANtoCA1_inh_pre_codeobject snippet (vector): _postsynaptic_idx = _array_CA3_pyCANtoCA1_inh__synaptic_post[_idx] _presynaptic_idx = _array_CA3_pyCANtoCA1_inh__synaptic_pre[_idx] he_ext_post = _array_CA1_inh_he_ext[_postsynaptic_idx] glu_pre = _array_CA3_pyCAN_glu[_presynaptic_idx] he_ext_post += _lio_1 * glu_pre _array_CA1_inh_he_ext[_postsynaptic_idx] = he_ext_post 2021-11-05 15:15:28,441 DIAGNOSTIC brian2.devices.device: CA3_pyCANtoCA1_inh_pre_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var__postsynaptic_idx = _namespace["_var__postsynaptic_idx"] _dynamic_array_CA3_pyCANtoCA1_inh__synaptic_post = _namespace["_dynamic_array_CA3_pyCANtoCA1_inh__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_pyCANtoCA1_inh__synaptic_post = _namespace['_array_CA3_pyCANtoCA1_inh__synaptic_post'] cdef int32_t * _array_CA3_pyCANtoCA1_inh__synaptic_post = _buf__array_CA3_pyCANtoCA1_inh__synaptic_post.data cdef size_t _num_array_CA3_pyCANtoCA1_inh__synaptic_post = len(_namespace['_array_CA3_pyCANtoCA1_inh__synaptic_post']) cdef int32_t _postsynaptic_idx _var__presynaptic_idx = _namespace["_var__presynaptic_idx"] _dynamic_array_CA3_pyCANtoCA1_inh__synaptic_pre = _namespace["_dynamic_array_CA3_pyCANtoCA1_inh__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_pyCANtoCA1_inh__synaptic_pre = _namespace['_array_CA3_pyCANtoCA1_inh__synaptic_pre'] cdef int32_t * _array_CA3_pyCANtoCA1_inh__synaptic_pre = _buf__array_CA3_pyCANtoCA1_inh__synaptic_pre.data cdef size_t _num_array_CA3_pyCANtoCA1_inh__synaptic_pre = len(_namespace['_array_CA3_pyCANtoCA1_inh__synaptic_pre']) cdef int32_t _presynaptic_idx _queue = _namespace["_queue"] _var_glu_pre = _namespace["_var_glu_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_glu = _namespace['_array_CA3_pyCAN_glu'] cdef double * _array_CA3_pyCAN_glu = _buf__array_CA3_pyCAN_glu.data cdef size_t _num_array_CA3_pyCAN_glu = len(_namespace['_array_CA3_pyCAN_glu']) cdef double glu_pre _var_he_ext_post = _namespace["_var_he_ext_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_he_ext = _namespace['_array_CA1_inh_he_ext'] cdef double * _array_CA1_inh_he_ext = _buf__array_CA1_inh_he_ext.data cdef size_t _num_array_CA1_inh_he_ext = len(_namespace['_array_CA1_inh_he_ext']) cdef double he_ext_post _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] cdef double _lio_1 if '_owner' in _namespace: _owner = _namespace['_owner'] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _spiking_synapses = _queue.peek() # scalar code _vectorisation_idx = 1 _lio_1 = 2e-11 * siemens cdef size_t _spiking_synapse_idx for _spiking_synapse_idx in range(len(_spiking_synapses)): # vector code _idx = _spiking_synapses[_spiking_synapse_idx] _vectorisation_idx = _idx _postsynaptic_idx = _array_CA3_pyCANtoCA1_inh__synaptic_post[_idx] _presynaptic_idx = _array_CA3_pyCANtoCA1_inh__synaptic_pre[_idx] he_ext_post = _array_CA1_inh_he_ext[_postsynaptic_idx] glu_pre = _array_CA3_pyCAN_glu[_presynaptic_idx] he_ext_post += _lio_1 * glu_pre _array_CA1_inh_he_ext[_postsynaptic_idx] = he_ext_post # Advance the spike queue _queue.advance() before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var__postsynaptic_idx = _namespace["_var__postsynaptic_idx"] _dynamic_array_CA3_pyCANtoCA1_inh__synaptic_post = _namespace["_dynamic_array_CA3_pyCANtoCA1_inh__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_pyCANtoCA1_inh__synaptic_post = _namespace['_array_CA3_pyCANtoCA1_inh__synaptic_post'] cdef int32_t * _array_CA3_pyCANtoCA1_inh__synaptic_post = _buf__array_CA3_pyCANtoCA1_inh__synaptic_post.data cdef size_t _num_array_CA3_pyCANtoCA1_inh__synaptic_post = len(_namespace['_array_CA3_pyCANtoCA1_inh__synaptic_post']) cdef int32_t _postsynaptic_idx _var__presynaptic_idx = _namespace["_var__presynaptic_idx"] _dynamic_array_CA3_pyCANtoCA1_inh__synaptic_pre = _namespace["_dynamic_array_CA3_pyCANtoCA1_inh__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_pyCANtoCA1_inh__synaptic_pre = _namespace['_array_CA3_pyCANtoCA1_inh__synaptic_pre'] cdef int32_t * _array_CA3_pyCANtoCA1_inh__synaptic_pre = _buf__array_CA3_pyCANtoCA1_inh__synaptic_pre.data cdef size_t _num_array_CA3_pyCANtoCA1_inh__synaptic_pre = len(_namespace['_array_CA3_pyCANtoCA1_inh__synaptic_pre']) cdef int32_t _presynaptic_idx _queue = _namespace["_queue"] _var_glu_pre = _namespace["_var_glu_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_glu = _namespace['_array_CA3_pyCAN_glu'] cdef double * _array_CA3_pyCAN_glu = _buf__array_CA3_pyCAN_glu.data cdef size_t _num_array_CA3_pyCAN_glu = len(_namespace['_array_CA3_pyCAN_glu']) cdef double glu_pre _var_he_ext_post = _namespace["_var_he_ext_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_he_ext = _namespace['_array_CA1_inh_he_ext'] cdef double * _array_CA1_inh_he_ext = _buf__array_CA1_inh_he_ext.data cdef size_t _num_array_CA1_inh_he_ext = len(_namespace['_array_CA1_inh_he_ext']) cdef double he_ext_post _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] cdef double _lio_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var__postsynaptic_idx = _namespace["_var__postsynaptic_idx"] _dynamic_array_CA3_pyCANtoCA1_inh__synaptic_post = _namespace["_dynamic_array_CA3_pyCANtoCA1_inh__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_pyCANtoCA1_inh__synaptic_post = _namespace['_array_CA3_pyCANtoCA1_inh__synaptic_post'] cdef int32_t * _array_CA3_pyCANtoCA1_inh__synaptic_post = _buf__array_CA3_pyCANtoCA1_inh__synaptic_post.data cdef size_t _num_array_CA3_pyCANtoCA1_inh__synaptic_post = len(_namespace['_array_CA3_pyCANtoCA1_inh__synaptic_post']) cdef int32_t _postsynaptic_idx _var__presynaptic_idx = _namespace["_var__presynaptic_idx"] _dynamic_array_CA3_pyCANtoCA1_inh__synaptic_pre = _namespace["_dynamic_array_CA3_pyCANtoCA1_inh__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_pyCANtoCA1_inh__synaptic_pre = _namespace['_array_CA3_pyCANtoCA1_inh__synaptic_pre'] cdef int32_t * _array_CA3_pyCANtoCA1_inh__synaptic_pre = _buf__array_CA3_pyCANtoCA1_inh__synaptic_pre.data cdef size_t _num_array_CA3_pyCANtoCA1_inh__synaptic_pre = len(_namespace['_array_CA3_pyCANtoCA1_inh__synaptic_pre']) cdef int32_t _presynaptic_idx _queue = _namespace["_queue"] _var_glu_pre = _namespace["_var_glu_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_glu = _namespace['_array_CA3_pyCAN_glu'] cdef double * _array_CA3_pyCAN_glu = _buf__array_CA3_pyCAN_glu.data cdef size_t _num_array_CA3_pyCAN_glu = len(_namespace['_array_CA3_pyCAN_glu']) cdef double glu_pre _var_he_ext_post = _namespace["_var_he_ext_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_he_ext = _namespace['_array_CA1_inh_he_ext'] cdef double * _array_CA1_inh_he_ext = _buf__array_CA1_inh_he_ext.data cdef size_t _num_array_CA1_inh_he_ext = len(_namespace['_array_CA1_inh_he_ext']) cdef double he_ext_post _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] cdef double _lio_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:15:28,442 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name CA3_pyCANtoCA1_inh_pre_codeobject 2021-11-05 15:15:28,442 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "CA3_pyCANtoCA1_inh_synapses" using Cython module "_cython_magic_5d3d905143c6da9e1d5a44fe8543050c" 2021-11-05 15:15:28,442 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140606331214672 on /home/nikos/.cython/brian_extensions/_cython_magic_5d3d905143c6da9e1d5a44fe8543050c.lock 2021-11-05 15:15:28,442 DEBUG brian2.utils.filelock: Lock 140606331214672 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_5d3d905143c6da9e1d5a44fe8543050c.lock 2021-11-05 15:15:28,442 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140606331214672 on /home/nikos/.cython/brian_extensions/_cython_magic_5d3d905143c6da9e1d5a44fe8543050c.lock 2021-11-05 15:15:28,442 DEBUG brian2.utils.filelock: Lock 140606331214672 released on /home/nikos/.cython/brian_extensions/_cython_magic_5d3d905143c6da9e1d5a44fe8543050c.lock 2021-11-05 15:15:28,443 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=CA3_pyCANtoCA1_pyCAN_pre, template name=synapses_push_spikes) for abstract code: 2021-11-05 15:15:28,459 DIAGNOSTIC brian2.devices.device: CA3_pyCANtoCA1_pyCAN_pre_push_spikes abstract code: 2021-11-05 15:15:28,459 DIAGNOSTIC brian2.devices.device: CA3_pyCANtoCA1_pyCAN_pre_push_spikes snippet (scalar): 2021-11-05 15:15:28,459 DIAGNOSTIC brian2.devices.device: CA3_pyCANtoCA1_pyCAN_pre_push_spikes snippet (vector): 2021-11-05 15:15:28,459 DIAGNOSTIC brian2.devices.device: CA3_pyCANtoCA1_pyCAN_pre_push_spikes code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_pyCAN__spikespace = _namespace['_array_CA3_pyCAN__spikespace'] cdef int32_t * _array_CA3_pyCAN__spikespace = _buf__array_CA3_pyCAN__spikespace.data cdef size_t _num_array_CA3_pyCAN__spikespace = len(_namespace['_array_CA3_pyCAN__spikespace']) cdef int32_t _spikespace if '_owner' in _namespace: _owner = _namespace['_owner'] _owner.push_spikes() before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_pyCAN__spikespace = _namespace['_array_CA3_pyCAN__spikespace'] cdef int32_t * _array_CA3_pyCAN__spikespace = _buf__array_CA3_pyCAN__spikespace.data cdef size_t _num_array_CA3_pyCAN__spikespace = len(_namespace['_array_CA3_pyCAN__spikespace']) cdef int32_t _spikespace if '_owner' in _namespace: _owner = _namespace['_owner'] _owner.initialise_queue() after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_pyCAN__spikespace = _namespace['_array_CA3_pyCAN__spikespace'] cdef int32_t * _array_CA3_pyCAN__spikespace = _buf__array_CA3_pyCAN__spikespace.data cdef size_t _num_array_CA3_pyCAN__spikespace = len(_namespace['_array_CA3_pyCAN__spikespace']) cdef int32_t _spikespace if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:15:28,459 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name CA3_pyCANtoCA1_pyCAN_pre_push_spikes 2021-11-05 15:15:28,459 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=CA3_pyCANtoCA1_pyCAN, template name=synapses) for abstract code: he_ext_post+=0.3333333333333333*6e-11*siemens*glu_pre 2021-11-05 15:15:28,484 DIAGNOSTIC brian2.devices.device: CA3_pyCANtoCA1_pyCAN_pre_codeobject abstract code: he_ext_post+=0.3333333333333333*6e-11*siemens*glu_pre 2021-11-05 15:15:28,485 DIAGNOSTIC brian2.devices.device: CA3_pyCANtoCA1_pyCAN_pre_codeobject snippet (scalar): _lio_1 = 2e-11 * siemens 2021-11-05 15:15:28,485 DIAGNOSTIC brian2.devices.device: CA3_pyCANtoCA1_pyCAN_pre_codeobject snippet (vector): _postsynaptic_idx = _array_CA3_pyCANtoCA1_pyCAN__synaptic_post[_idx] _presynaptic_idx = _array_CA3_pyCANtoCA1_pyCAN__synaptic_pre[_idx] he_ext_post = _array_CA1_pyCAN_he_ext[_postsynaptic_idx] glu_pre = _array_CA3_pyCAN_glu[_presynaptic_idx] he_ext_post += _lio_1 * glu_pre _array_CA1_pyCAN_he_ext[_postsynaptic_idx] = he_ext_post 2021-11-05 15:15:28,485 DIAGNOSTIC brian2.devices.device: CA3_pyCANtoCA1_pyCAN_pre_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var__postsynaptic_idx = _namespace["_var__postsynaptic_idx"] _dynamic_array_CA3_pyCANtoCA1_pyCAN__synaptic_post = _namespace["_dynamic_array_CA3_pyCANtoCA1_pyCAN__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_pyCANtoCA1_pyCAN__synaptic_post = _namespace['_array_CA3_pyCANtoCA1_pyCAN__synaptic_post'] cdef int32_t * _array_CA3_pyCANtoCA1_pyCAN__synaptic_post = _buf__array_CA3_pyCANtoCA1_pyCAN__synaptic_post.data cdef size_t _num_array_CA3_pyCANtoCA1_pyCAN__synaptic_post = len(_namespace['_array_CA3_pyCANtoCA1_pyCAN__synaptic_post']) cdef int32_t _postsynaptic_idx _var__presynaptic_idx = _namespace["_var__presynaptic_idx"] _dynamic_array_CA3_pyCANtoCA1_pyCAN__synaptic_pre = _namespace["_dynamic_array_CA3_pyCANtoCA1_pyCAN__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_pyCANtoCA1_pyCAN__synaptic_pre = _namespace['_array_CA3_pyCANtoCA1_pyCAN__synaptic_pre'] cdef int32_t * _array_CA3_pyCANtoCA1_pyCAN__synaptic_pre = _buf__array_CA3_pyCANtoCA1_pyCAN__synaptic_pre.data cdef size_t _num_array_CA3_pyCANtoCA1_pyCAN__synaptic_pre = len(_namespace['_array_CA3_pyCANtoCA1_pyCAN__synaptic_pre']) cdef int32_t _presynaptic_idx _queue = _namespace["_queue"] _var_glu_pre = _namespace["_var_glu_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_glu = _namespace['_array_CA3_pyCAN_glu'] cdef double * _array_CA3_pyCAN_glu = _buf__array_CA3_pyCAN_glu.data cdef size_t _num_array_CA3_pyCAN_glu = len(_namespace['_array_CA3_pyCAN_glu']) cdef double glu_pre _var_he_ext_post = _namespace["_var_he_ext_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_he_ext = _namespace['_array_CA1_pyCAN_he_ext'] cdef double * _array_CA1_pyCAN_he_ext = _buf__array_CA1_pyCAN_he_ext.data cdef size_t _num_array_CA1_pyCAN_he_ext = len(_namespace['_array_CA1_pyCAN_he_ext']) cdef double he_ext_post _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] cdef double _lio_1 if '_owner' in _namespace: _owner = _namespace['_owner'] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _spiking_synapses = _queue.peek() # scalar code _vectorisation_idx = 1 _lio_1 = 2e-11 * siemens cdef size_t _spiking_synapse_idx for _spiking_synapse_idx in range(len(_spiking_synapses)): # vector code _idx = _spiking_synapses[_spiking_synapse_idx] _vectorisation_idx = _idx _postsynaptic_idx = _array_CA3_pyCANtoCA1_pyCAN__synaptic_post[_idx] _presynaptic_idx = _array_CA3_pyCANtoCA1_pyCAN__synaptic_pre[_idx] he_ext_post = _array_CA1_pyCAN_he_ext[_postsynaptic_idx] glu_pre = _array_CA3_pyCAN_glu[_presynaptic_idx] he_ext_post += _lio_1 * glu_pre _array_CA1_pyCAN_he_ext[_postsynaptic_idx] = he_ext_post # Advance the spike queue _queue.advance() before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var__postsynaptic_idx = _namespace["_var__postsynaptic_idx"] _dynamic_array_CA3_pyCANtoCA1_pyCAN__synaptic_post = _namespace["_dynamic_array_CA3_pyCANtoCA1_pyCAN__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_pyCANtoCA1_pyCAN__synaptic_post = _namespace['_array_CA3_pyCANtoCA1_pyCAN__synaptic_post'] cdef int32_t * _array_CA3_pyCANtoCA1_pyCAN__synaptic_post = _buf__array_CA3_pyCANtoCA1_pyCAN__synaptic_post.data cdef size_t _num_array_CA3_pyCANtoCA1_pyCAN__synaptic_post = len(_namespace['_array_CA3_pyCANtoCA1_pyCAN__synaptic_post']) cdef int32_t _postsynaptic_idx _var__presynaptic_idx = _namespace["_var__presynaptic_idx"] _dynamic_array_CA3_pyCANtoCA1_pyCAN__synaptic_pre = _namespace["_dynamic_array_CA3_pyCANtoCA1_pyCAN__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_pyCANtoCA1_pyCAN__synaptic_pre = _namespace['_array_CA3_pyCANtoCA1_pyCAN__synaptic_pre'] cdef int32_t * _array_CA3_pyCANtoCA1_pyCAN__synaptic_pre = _buf__array_CA3_pyCANtoCA1_pyCAN__synaptic_pre.data cdef size_t _num_array_CA3_pyCANtoCA1_pyCAN__synaptic_pre = len(_namespace['_array_CA3_pyCANtoCA1_pyCAN__synaptic_pre']) cdef int32_t _presynaptic_idx _queue = _namespace["_queue"] _var_glu_pre = _namespace["_var_glu_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_glu = _namespace['_array_CA3_pyCAN_glu'] cdef double * _array_CA3_pyCAN_glu = _buf__array_CA3_pyCAN_glu.data cdef size_t _num_array_CA3_pyCAN_glu = len(_namespace['_array_CA3_pyCAN_glu']) cdef double glu_pre _var_he_ext_post = _namespace["_var_he_ext_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_he_ext = _namespace['_array_CA1_pyCAN_he_ext'] cdef double * _array_CA1_pyCAN_he_ext = _buf__array_CA1_pyCAN_he_ext.data cdef size_t _num_array_CA1_pyCAN_he_ext = len(_namespace['_array_CA1_pyCAN_he_ext']) cdef double he_ext_post _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] cdef double _lio_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var__postsynaptic_idx = _namespace["_var__postsynaptic_idx"] _dynamic_array_CA3_pyCANtoCA1_pyCAN__synaptic_post = _namespace["_dynamic_array_CA3_pyCANtoCA1_pyCAN__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_pyCANtoCA1_pyCAN__synaptic_post = _namespace['_array_CA3_pyCANtoCA1_pyCAN__synaptic_post'] cdef int32_t * _array_CA3_pyCANtoCA1_pyCAN__synaptic_post = _buf__array_CA3_pyCANtoCA1_pyCAN__synaptic_post.data cdef size_t _num_array_CA3_pyCANtoCA1_pyCAN__synaptic_post = len(_namespace['_array_CA3_pyCANtoCA1_pyCAN__synaptic_post']) cdef int32_t _postsynaptic_idx _var__presynaptic_idx = _namespace["_var__presynaptic_idx"] _dynamic_array_CA3_pyCANtoCA1_pyCAN__synaptic_pre = _namespace["_dynamic_array_CA3_pyCANtoCA1_pyCAN__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_pyCANtoCA1_pyCAN__synaptic_pre = _namespace['_array_CA3_pyCANtoCA1_pyCAN__synaptic_pre'] cdef int32_t * _array_CA3_pyCANtoCA1_pyCAN__synaptic_pre = _buf__array_CA3_pyCANtoCA1_pyCAN__synaptic_pre.data cdef size_t _num_array_CA3_pyCANtoCA1_pyCAN__synaptic_pre = len(_namespace['_array_CA3_pyCANtoCA1_pyCAN__synaptic_pre']) cdef int32_t _presynaptic_idx _queue = _namespace["_queue"] _var_glu_pre = _namespace["_var_glu_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_glu = _namespace['_array_CA3_pyCAN_glu'] cdef double * _array_CA3_pyCAN_glu = _buf__array_CA3_pyCAN_glu.data cdef size_t _num_array_CA3_pyCAN_glu = len(_namespace['_array_CA3_pyCAN_glu']) cdef double glu_pre _var_he_ext_post = _namespace["_var_he_ext_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_he_ext = _namespace['_array_CA1_pyCAN_he_ext'] cdef double * _array_CA1_pyCAN_he_ext = _buf__array_CA1_pyCAN_he_ext.data cdef size_t _num_array_CA1_pyCAN_he_ext = len(_namespace['_array_CA1_pyCAN_he_ext']) cdef double he_ext_post _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] cdef double _lio_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:15:28,485 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name CA3_pyCANtoCA1_pyCAN_pre_codeobject 2021-11-05 15:15:28,486 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "CA3_pyCANtoCA1_pyCAN_synapses" using Cython module "_cython_magic_d938a36004bfcc2bc757a9e8f7e24052" 2021-11-05 15:15:28,486 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140606331213856 on /home/nikos/.cython/brian_extensions/_cython_magic_d938a36004bfcc2bc757a9e8f7e24052.lock 2021-11-05 15:15:28,486 DEBUG brian2.utils.filelock: Lock 140606331213856 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_d938a36004bfcc2bc757a9e8f7e24052.lock 2021-11-05 15:15:28,486 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140606331213856 on /home/nikos/.cython/brian_extensions/_cython_magic_d938a36004bfcc2bc757a9e8f7e24052.lock 2021-11-05 15:15:28,486 DEBUG brian2.utils.filelock: Lock 140606331213856 released on /home/nikos/.cython/brian_extensions/_cython_magic_d938a36004bfcc2bc757a9e8f7e24052.lock 2021-11-05 15:15:28,490 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=CA3_pyCANtoCA3_inh_pre, template name=synapses_push_spikes) for abstract code: 2021-11-05 15:15:28,504 DIAGNOSTIC brian2.devices.device: CA3_pyCANtoCA3_inh_pre_push_spikes abstract code: 2021-11-05 15:15:28,504 DIAGNOSTIC brian2.devices.device: CA3_pyCANtoCA3_inh_pre_push_spikes snippet (scalar): 2021-11-05 15:15:28,504 DIAGNOSTIC brian2.devices.device: CA3_pyCANtoCA3_inh_pre_push_spikes snippet (vector): 2021-11-05 15:15:28,504 DIAGNOSTIC brian2.devices.device: CA3_pyCANtoCA3_inh_pre_push_spikes code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_pyCAN__spikespace = _namespace['_array_CA3_pyCAN__spikespace'] cdef int32_t * _array_CA3_pyCAN__spikespace = _buf__array_CA3_pyCAN__spikespace.data cdef size_t _num_array_CA3_pyCAN__spikespace = len(_namespace['_array_CA3_pyCAN__spikespace']) cdef int32_t _spikespace if '_owner' in _namespace: _owner = _namespace['_owner'] _owner.push_spikes() before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_pyCAN__spikespace = _namespace['_array_CA3_pyCAN__spikespace'] cdef int32_t * _array_CA3_pyCAN__spikespace = _buf__array_CA3_pyCAN__spikespace.data cdef size_t _num_array_CA3_pyCAN__spikespace = len(_namespace['_array_CA3_pyCAN__spikespace']) cdef int32_t _spikespace if '_owner' in _namespace: _owner = _namespace['_owner'] _owner.initialise_queue() after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_pyCAN__spikespace = _namespace['_array_CA3_pyCAN__spikespace'] cdef int32_t * _array_CA3_pyCAN__spikespace = _buf__array_CA3_pyCAN__spikespace.data cdef size_t _num_array_CA3_pyCAN__spikespace = len(_namespace['_array_CA3_pyCAN__spikespace']) cdef int32_t _spikespace if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:15:28,504 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name CA3_pyCANtoCA3_inh_pre_push_spikes 2021-11-05 15:15:28,504 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=CA3_pyCANtoCA3_inh, template name=synapses) for abstract code: he_post+=0.3333333333333333*6e-11*siemens*glu_pre 2021-11-05 15:15:28,526 DIAGNOSTIC brian2.devices.device: CA3_pyCANtoCA3_inh_pre_codeobject abstract code: he_post+=0.3333333333333333*6e-11*siemens*glu_pre 2021-11-05 15:15:28,527 DIAGNOSTIC brian2.devices.device: CA3_pyCANtoCA3_inh_pre_codeobject snippet (scalar): _lio_1 = 2e-11 * siemens 2021-11-05 15:15:28,527 DIAGNOSTIC brian2.devices.device: CA3_pyCANtoCA3_inh_pre_codeobject snippet (vector): _postsynaptic_idx = _array_CA3_pyCANtoCA3_inh__synaptic_post[_idx] _presynaptic_idx = _array_CA3_pyCANtoCA3_inh__synaptic_pre[_idx] he_post = _array_CA3_inh_he[_postsynaptic_idx] glu_pre = _array_CA3_pyCAN_glu[_presynaptic_idx] he_post += _lio_1 * glu_pre _array_CA3_inh_he[_postsynaptic_idx] = he_post 2021-11-05 15:15:28,527 DIAGNOSTIC brian2.devices.device: CA3_pyCANtoCA3_inh_pre_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var__postsynaptic_idx = _namespace["_var__postsynaptic_idx"] _dynamic_array_CA3_pyCANtoCA3_inh__synaptic_post = _namespace["_dynamic_array_CA3_pyCANtoCA3_inh__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_pyCANtoCA3_inh__synaptic_post = _namespace['_array_CA3_pyCANtoCA3_inh__synaptic_post'] cdef int32_t * _array_CA3_pyCANtoCA3_inh__synaptic_post = _buf__array_CA3_pyCANtoCA3_inh__synaptic_post.data cdef size_t _num_array_CA3_pyCANtoCA3_inh__synaptic_post = len(_namespace['_array_CA3_pyCANtoCA3_inh__synaptic_post']) cdef int32_t _postsynaptic_idx _var__presynaptic_idx = _namespace["_var__presynaptic_idx"] _dynamic_array_CA3_pyCANtoCA3_inh__synaptic_pre = _namespace["_dynamic_array_CA3_pyCANtoCA3_inh__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_pyCANtoCA3_inh__synaptic_pre = _namespace['_array_CA3_pyCANtoCA3_inh__synaptic_pre'] cdef int32_t * _array_CA3_pyCANtoCA3_inh__synaptic_pre = _buf__array_CA3_pyCANtoCA3_inh__synaptic_pre.data cdef size_t _num_array_CA3_pyCANtoCA3_inh__synaptic_pre = len(_namespace['_array_CA3_pyCANtoCA3_inh__synaptic_pre']) cdef int32_t _presynaptic_idx _queue = _namespace["_queue"] _var_glu_pre = _namespace["_var_glu_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_glu = _namespace['_array_CA3_pyCAN_glu'] cdef double * _array_CA3_pyCAN_glu = _buf__array_CA3_pyCAN_glu.data cdef size_t _num_array_CA3_pyCAN_glu = len(_namespace['_array_CA3_pyCAN_glu']) cdef double glu_pre _var_he_post = _namespace["_var_he_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_inh_he = _namespace['_array_CA3_inh_he'] cdef double * _array_CA3_inh_he = _buf__array_CA3_inh_he.data cdef size_t _num_array_CA3_inh_he = len(_namespace['_array_CA3_inh_he']) cdef double he_post _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] cdef double _lio_1 if '_owner' in _namespace: _owner = _namespace['_owner'] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _spiking_synapses = _queue.peek() # scalar code _vectorisation_idx = 1 _lio_1 = 2e-11 * siemens cdef size_t _spiking_synapse_idx for _spiking_synapse_idx in range(len(_spiking_synapses)): # vector code _idx = _spiking_synapses[_spiking_synapse_idx] _vectorisation_idx = _idx _postsynaptic_idx = _array_CA3_pyCANtoCA3_inh__synaptic_post[_idx] _presynaptic_idx = _array_CA3_pyCANtoCA3_inh__synaptic_pre[_idx] he_post = _array_CA3_inh_he[_postsynaptic_idx] glu_pre = _array_CA3_pyCAN_glu[_presynaptic_idx] he_post += _lio_1 * glu_pre _array_CA3_inh_he[_postsynaptic_idx] = he_post # Advance the spike queue _queue.advance() before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var__postsynaptic_idx = _namespace["_var__postsynaptic_idx"] _dynamic_array_CA3_pyCANtoCA3_inh__synaptic_post = _namespace["_dynamic_array_CA3_pyCANtoCA3_inh__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_pyCANtoCA3_inh__synaptic_post = _namespace['_array_CA3_pyCANtoCA3_inh__synaptic_post'] cdef int32_t * _array_CA3_pyCANtoCA3_inh__synaptic_post = _buf__array_CA3_pyCANtoCA3_inh__synaptic_post.data cdef size_t _num_array_CA3_pyCANtoCA3_inh__synaptic_post = len(_namespace['_array_CA3_pyCANtoCA3_inh__synaptic_post']) cdef int32_t _postsynaptic_idx _var__presynaptic_idx = _namespace["_var__presynaptic_idx"] _dynamic_array_CA3_pyCANtoCA3_inh__synaptic_pre = _namespace["_dynamic_array_CA3_pyCANtoCA3_inh__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_pyCANtoCA3_inh__synaptic_pre = _namespace['_array_CA3_pyCANtoCA3_inh__synaptic_pre'] cdef int32_t * _array_CA3_pyCANtoCA3_inh__synaptic_pre = _buf__array_CA3_pyCANtoCA3_inh__synaptic_pre.data cdef size_t _num_array_CA3_pyCANtoCA3_inh__synaptic_pre = len(_namespace['_array_CA3_pyCANtoCA3_inh__synaptic_pre']) cdef int32_t _presynaptic_idx _queue = _namespace["_queue"] _var_glu_pre = _namespace["_var_glu_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_glu = _namespace['_array_CA3_pyCAN_glu'] cdef double * _array_CA3_pyCAN_glu = _buf__array_CA3_pyCAN_glu.data cdef size_t _num_array_CA3_pyCAN_glu = len(_namespace['_array_CA3_pyCAN_glu']) cdef double glu_pre _var_he_post = _namespace["_var_he_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_inh_he = _namespace['_array_CA3_inh_he'] cdef double * _array_CA3_inh_he = _buf__array_CA3_inh_he.data cdef size_t _num_array_CA3_inh_he = len(_namespace['_array_CA3_inh_he']) cdef double he_post _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] cdef double _lio_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var__postsynaptic_idx = _namespace["_var__postsynaptic_idx"] _dynamic_array_CA3_pyCANtoCA3_inh__synaptic_post = _namespace["_dynamic_array_CA3_pyCANtoCA3_inh__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_pyCANtoCA3_inh__synaptic_post = _namespace['_array_CA3_pyCANtoCA3_inh__synaptic_post'] cdef int32_t * _array_CA3_pyCANtoCA3_inh__synaptic_post = _buf__array_CA3_pyCANtoCA3_inh__synaptic_post.data cdef size_t _num_array_CA3_pyCANtoCA3_inh__synaptic_post = len(_namespace['_array_CA3_pyCANtoCA3_inh__synaptic_post']) cdef int32_t _postsynaptic_idx _var__presynaptic_idx = _namespace["_var__presynaptic_idx"] _dynamic_array_CA3_pyCANtoCA3_inh__synaptic_pre = _namespace["_dynamic_array_CA3_pyCANtoCA3_inh__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_pyCANtoCA3_inh__synaptic_pre = _namespace['_array_CA3_pyCANtoCA3_inh__synaptic_pre'] cdef int32_t * _array_CA3_pyCANtoCA3_inh__synaptic_pre = _buf__array_CA3_pyCANtoCA3_inh__synaptic_pre.data cdef size_t _num_array_CA3_pyCANtoCA3_inh__synaptic_pre = len(_namespace['_array_CA3_pyCANtoCA3_inh__synaptic_pre']) cdef int32_t _presynaptic_idx _queue = _namespace["_queue"] _var_glu_pre = _namespace["_var_glu_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_glu = _namespace['_array_CA3_pyCAN_glu'] cdef double * _array_CA3_pyCAN_glu = _buf__array_CA3_pyCAN_glu.data cdef size_t _num_array_CA3_pyCAN_glu = len(_namespace['_array_CA3_pyCAN_glu']) cdef double glu_pre _var_he_post = _namespace["_var_he_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_inh_he = _namespace['_array_CA3_inh_he'] cdef double * _array_CA3_inh_he = _buf__array_CA3_inh_he.data cdef size_t _num_array_CA3_inh_he = len(_namespace['_array_CA3_inh_he']) cdef double he_post _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] cdef double _lio_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:15:28,527 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name CA3_pyCANtoCA3_inh_pre_codeobject 2021-11-05 15:15:28,528 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "CA3_pyCANtoCA3_inh_synapses" using Cython module "_cython_magic_b1f3f92e8e71a8c3ee99a74511884962" 2021-11-05 15:15:28,528 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140606331203056 on /home/nikos/.cython/brian_extensions/_cython_magic_b1f3f92e8e71a8c3ee99a74511884962.lock 2021-11-05 15:15:28,528 DEBUG brian2.utils.filelock: Lock 140606331203056 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_b1f3f92e8e71a8c3ee99a74511884962.lock 2021-11-05 15:15:28,531 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140606331203056 on /home/nikos/.cython/brian_extensions/_cython_magic_b1f3f92e8e71a8c3ee99a74511884962.lock 2021-11-05 15:15:28,531 DEBUG brian2.utils.filelock: Lock 140606331203056 released on /home/nikos/.cython/brian_extensions/_cython_magic_b1f3f92e8e71a8c3ee99a74511884962.lock 2021-11-05 15:15:28,531 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=CA3_pyCANtoCA3_pyCAN_pre, template name=synapses_push_spikes) for abstract code: 2021-11-05 15:15:28,547 DIAGNOSTIC brian2.devices.device: CA3_pyCANtoCA3_pyCAN_pre_push_spikes abstract code: 2021-11-05 15:15:28,547 DIAGNOSTIC brian2.devices.device: CA3_pyCANtoCA3_pyCAN_pre_push_spikes snippet (scalar): 2021-11-05 15:15:28,547 DIAGNOSTIC brian2.devices.device: CA3_pyCANtoCA3_pyCAN_pre_push_spikes snippet (vector): 2021-11-05 15:15:28,547 DIAGNOSTIC brian2.devices.device: CA3_pyCANtoCA3_pyCAN_pre_push_spikes code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_pyCAN__spikespace = _namespace['_array_CA3_pyCAN__spikespace'] cdef int32_t * _array_CA3_pyCAN__spikespace = _buf__array_CA3_pyCAN__spikespace.data cdef size_t _num_array_CA3_pyCAN__spikespace = len(_namespace['_array_CA3_pyCAN__spikespace']) cdef int32_t _spikespace if '_owner' in _namespace: _owner = _namespace['_owner'] _owner.push_spikes() before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_pyCAN__spikespace = _namespace['_array_CA3_pyCAN__spikespace'] cdef int32_t * _array_CA3_pyCAN__spikespace = _buf__array_CA3_pyCAN__spikespace.data cdef size_t _num_array_CA3_pyCAN__spikespace = len(_namespace['_array_CA3_pyCAN__spikespace']) cdef int32_t _spikespace if '_owner' in _namespace: _owner = _namespace['_owner'] _owner.initialise_queue() after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_pyCAN__spikespace = _namespace['_array_CA3_pyCAN__spikespace'] cdef int32_t * _array_CA3_pyCAN__spikespace = _buf__array_CA3_pyCAN__spikespace.data cdef size_t _num_array_CA3_pyCAN__spikespace = len(_namespace['_array_CA3_pyCAN__spikespace']) cdef int32_t _spikespace if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:15:28,547 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name CA3_pyCANtoCA3_pyCAN_pre_push_spikes 2021-11-05 15:15:28,547 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=CA3_pyCANtoCA3_pyCAN, template name=synapses) for abstract code: he_post+=0.3333333333333333*6e-11*siemens*glu_pre 2021-11-05 15:15:28,572 DIAGNOSTIC brian2.devices.device: CA3_pyCANtoCA3_pyCAN_pre_codeobject abstract code: he_post+=0.3333333333333333*6e-11*siemens*glu_pre 2021-11-05 15:15:28,573 DIAGNOSTIC brian2.devices.device: CA3_pyCANtoCA3_pyCAN_pre_codeobject snippet (scalar): _lio_1 = 2e-11 * siemens 2021-11-05 15:15:28,573 DIAGNOSTIC brian2.devices.device: CA3_pyCANtoCA3_pyCAN_pre_codeobject snippet (vector): _postsynaptic_idx = _array_CA3_pyCANtoCA3_pyCAN__synaptic_post[_idx] _presynaptic_idx = _array_CA3_pyCANtoCA3_pyCAN__synaptic_pre[_idx] he_post = _array_CA3_pyCAN_he[_postsynaptic_idx] glu_pre = _array_CA3_pyCAN_glu[_presynaptic_idx] he_post += _lio_1 * glu_pre _array_CA3_pyCAN_he[_postsynaptic_idx] = he_post 2021-11-05 15:15:28,573 DIAGNOSTIC brian2.devices.device: CA3_pyCANtoCA3_pyCAN_pre_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var__postsynaptic_idx = _namespace["_var__postsynaptic_idx"] _dynamic_array_CA3_pyCANtoCA3_pyCAN__synaptic_post = _namespace["_dynamic_array_CA3_pyCANtoCA3_pyCAN__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_pyCANtoCA3_pyCAN__synaptic_post = _namespace['_array_CA3_pyCANtoCA3_pyCAN__synaptic_post'] cdef int32_t * _array_CA3_pyCANtoCA3_pyCAN__synaptic_post = _buf__array_CA3_pyCANtoCA3_pyCAN__synaptic_post.data cdef size_t _num_array_CA3_pyCANtoCA3_pyCAN__synaptic_post = len(_namespace['_array_CA3_pyCANtoCA3_pyCAN__synaptic_post']) cdef int32_t _postsynaptic_idx _var__presynaptic_idx = _namespace["_var__presynaptic_idx"] _dynamic_array_CA3_pyCANtoCA3_pyCAN__synaptic_pre = _namespace["_dynamic_array_CA3_pyCANtoCA3_pyCAN__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_pyCANtoCA3_pyCAN__synaptic_pre = _namespace['_array_CA3_pyCANtoCA3_pyCAN__synaptic_pre'] cdef int32_t * _array_CA3_pyCANtoCA3_pyCAN__synaptic_pre = _buf__array_CA3_pyCANtoCA3_pyCAN__synaptic_pre.data cdef size_t _num_array_CA3_pyCANtoCA3_pyCAN__synaptic_pre = len(_namespace['_array_CA3_pyCANtoCA3_pyCAN__synaptic_pre']) cdef int32_t _presynaptic_idx _queue = _namespace["_queue"] _var_glu_pre = _namespace["_var_glu_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_glu = _namespace['_array_CA3_pyCAN_glu'] cdef double * _array_CA3_pyCAN_glu = _buf__array_CA3_pyCAN_glu.data cdef size_t _num_array_CA3_pyCAN_glu = len(_namespace['_array_CA3_pyCAN_glu']) cdef double glu_pre _var_he_post = _namespace["_var_he_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_he = _namespace['_array_CA3_pyCAN_he'] cdef double * _array_CA3_pyCAN_he = _buf__array_CA3_pyCAN_he.data cdef size_t _num_array_CA3_pyCAN_he = len(_namespace['_array_CA3_pyCAN_he']) cdef double he_post _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] cdef double _lio_1 if '_owner' in _namespace: _owner = _namespace['_owner'] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _spiking_synapses = _queue.peek() # scalar code _vectorisation_idx = 1 _lio_1 = 2e-11 * siemens cdef size_t _spiking_synapse_idx for _spiking_synapse_idx in range(len(_spiking_synapses)): # vector code _idx = _spiking_synapses[_spiking_synapse_idx] _vectorisation_idx = _idx _postsynaptic_idx = _array_CA3_pyCANtoCA3_pyCAN__synaptic_post[_idx] _presynaptic_idx = _array_CA3_pyCANtoCA3_pyCAN__synaptic_pre[_idx] he_post = _array_CA3_pyCAN_he[_postsynaptic_idx] glu_pre = _array_CA3_pyCAN_glu[_presynaptic_idx] he_post += _lio_1 * glu_pre _array_CA3_pyCAN_he[_postsynaptic_idx] = he_post # Advance the spike queue _queue.advance() before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var__postsynaptic_idx = _namespace["_var__postsynaptic_idx"] _dynamic_array_CA3_pyCANtoCA3_pyCAN__synaptic_post = _namespace["_dynamic_array_CA3_pyCANtoCA3_pyCAN__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_pyCANtoCA3_pyCAN__synaptic_post = _namespace['_array_CA3_pyCANtoCA3_pyCAN__synaptic_post'] cdef int32_t * _array_CA3_pyCANtoCA3_pyCAN__synaptic_post = _buf__array_CA3_pyCANtoCA3_pyCAN__synaptic_post.data cdef size_t _num_array_CA3_pyCANtoCA3_pyCAN__synaptic_post = len(_namespace['_array_CA3_pyCANtoCA3_pyCAN__synaptic_post']) cdef int32_t _postsynaptic_idx _var__presynaptic_idx = _namespace["_var__presynaptic_idx"] _dynamic_array_CA3_pyCANtoCA3_pyCAN__synaptic_pre = _namespace["_dynamic_array_CA3_pyCANtoCA3_pyCAN__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_pyCANtoCA3_pyCAN__synaptic_pre = _namespace['_array_CA3_pyCANtoCA3_pyCAN__synaptic_pre'] cdef int32_t * _array_CA3_pyCANtoCA3_pyCAN__synaptic_pre = _buf__array_CA3_pyCANtoCA3_pyCAN__synaptic_pre.data cdef size_t _num_array_CA3_pyCANtoCA3_pyCAN__synaptic_pre = len(_namespace['_array_CA3_pyCANtoCA3_pyCAN__synaptic_pre']) cdef int32_t _presynaptic_idx _queue = _namespace["_queue"] _var_glu_pre = _namespace["_var_glu_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_glu = _namespace['_array_CA3_pyCAN_glu'] cdef double * _array_CA3_pyCAN_glu = _buf__array_CA3_pyCAN_glu.data cdef size_t _num_array_CA3_pyCAN_glu = len(_namespace['_array_CA3_pyCAN_glu']) cdef double glu_pre _var_he_post = _namespace["_var_he_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_he = _namespace['_array_CA3_pyCAN_he'] cdef double * _array_CA3_pyCAN_he = _buf__array_CA3_pyCAN_he.data cdef size_t _num_array_CA3_pyCAN_he = len(_namespace['_array_CA3_pyCAN_he']) cdef double he_post _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] cdef double _lio_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var__postsynaptic_idx = _namespace["_var__postsynaptic_idx"] _dynamic_array_CA3_pyCANtoCA3_pyCAN__synaptic_post = _namespace["_dynamic_array_CA3_pyCANtoCA3_pyCAN__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_pyCANtoCA3_pyCAN__synaptic_post = _namespace['_array_CA3_pyCANtoCA3_pyCAN__synaptic_post'] cdef int32_t * _array_CA3_pyCANtoCA3_pyCAN__synaptic_post = _buf__array_CA3_pyCANtoCA3_pyCAN__synaptic_post.data cdef size_t _num_array_CA3_pyCANtoCA3_pyCAN__synaptic_post = len(_namespace['_array_CA3_pyCANtoCA3_pyCAN__synaptic_post']) cdef int32_t _postsynaptic_idx _var__presynaptic_idx = _namespace["_var__presynaptic_idx"] _dynamic_array_CA3_pyCANtoCA3_pyCAN__synaptic_pre = _namespace["_dynamic_array_CA3_pyCANtoCA3_pyCAN__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_pyCANtoCA3_pyCAN__synaptic_pre = _namespace['_array_CA3_pyCANtoCA3_pyCAN__synaptic_pre'] cdef int32_t * _array_CA3_pyCANtoCA3_pyCAN__synaptic_pre = _buf__array_CA3_pyCANtoCA3_pyCAN__synaptic_pre.data cdef size_t _num_array_CA3_pyCANtoCA3_pyCAN__synaptic_pre = len(_namespace['_array_CA3_pyCANtoCA3_pyCAN__synaptic_pre']) cdef int32_t _presynaptic_idx _queue = _namespace["_queue"] _var_glu_pre = _namespace["_var_glu_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_glu = _namespace['_array_CA3_pyCAN_glu'] cdef double * _array_CA3_pyCAN_glu = _buf__array_CA3_pyCAN_glu.data cdef size_t _num_array_CA3_pyCAN_glu = len(_namespace['_array_CA3_pyCAN_glu']) cdef double glu_pre _var_he_post = _namespace["_var_he_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_he = _namespace['_array_CA3_pyCAN_he'] cdef double * _array_CA3_pyCAN_he = _buf__array_CA3_pyCAN_he.data cdef size_t _num_array_CA3_pyCAN_he = len(_namespace['_array_CA3_pyCAN_he']) cdef double he_post _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] cdef double _lio_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:15:28,573 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name CA3_pyCANtoCA3_pyCAN_pre_codeobject 2021-11-05 15:15:28,574 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "CA3_pyCANtoCA3_pyCAN_synapses" using Cython module "_cython_magic_e46de514c15bc34c7dc4799e2993ef20" 2021-11-05 15:15:28,574 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140606331200272 on /home/nikos/.cython/brian_extensions/_cython_magic_e46de514c15bc34c7dc4799e2993ef20.lock 2021-11-05 15:15:28,574 DEBUG brian2.utils.filelock: Lock 140606331200272 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_e46de514c15bc34c7dc4799e2993ef20.lock 2021-11-05 15:15:28,574 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140606331200272 on /home/nikos/.cython/brian_extensions/_cython_magic_e46de514c15bc34c7dc4799e2993ef20.lock 2021-11-05 15:15:28,574 DEBUG brian2.utils.filelock: Lock 140606331200272 released on /home/nikos/.cython/brian_extensions/_cython_magic_e46de514c15bc34c7dc4799e2993ef20.lock 2021-11-05 15:15:28,576 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=DG_inhtoDG_py_pre, template name=synapses_push_spikes) for abstract code: 2021-11-05 15:15:28,680 DIAGNOSTIC brian2.devices.device: DG_inhtoDG_py_pre_push_spikes abstract code: 2021-11-05 15:15:28,680 DIAGNOSTIC brian2.devices.device: DG_inhtoDG_py_pre_push_spikes snippet (scalar): 2021-11-05 15:15:28,680 DIAGNOSTIC brian2.devices.device: DG_inhtoDG_py_pre_push_spikes snippet (vector): 2021-11-05 15:15:28,680 DIAGNOSTIC brian2.devices.device: DG_inhtoDG_py_pre_push_spikes code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_DG_inh__spikespace = _namespace['_array_DG_inh__spikespace'] cdef int32_t * _array_DG_inh__spikespace = _buf__array_DG_inh__spikespace.data cdef size_t _num_array_DG_inh__spikespace = len(_namespace['_array_DG_inh__spikespace']) cdef int32_t _spikespace if '_owner' in _namespace: _owner = _namespace['_owner'] _owner.push_spikes() before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_DG_inh__spikespace = _namespace['_array_DG_inh__spikespace'] cdef int32_t * _array_DG_inh__spikespace = _buf__array_DG_inh__spikespace.data cdef size_t _num_array_DG_inh__spikespace = len(_namespace['_array_DG_inh__spikespace']) cdef int32_t _spikespace if '_owner' in _namespace: _owner = _namespace['_owner'] _owner.initialise_queue() after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_DG_inh__spikespace = _namespace['_array_DG_inh__spikespace'] cdef int32_t * _array_DG_inh__spikespace = _buf__array_DG_inh__spikespace.data cdef size_t _num_array_DG_inh__spikespace = len(_namespace['_array_DG_inh__spikespace']) cdef int32_t _spikespace if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:15:28,680 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name DG_inhtoDG_py_pre_push_spikes 2021-11-05 15:15:28,681 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "DG_inhtoDG_py_pre_synapses_push_spikes" using Cython module "_cython_magic_8098780e374c91682bf668125ffb31ac" 2021-11-05 15:15:28,681 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140606329738144 on /home/nikos/.cython/brian_extensions/_cython_magic_8098780e374c91682bf668125ffb31ac.lock 2021-11-05 15:15:28,681 DEBUG brian2.utils.filelock: Lock 140606329738144 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_8098780e374c91682bf668125ffb31ac.lock 2021-11-05 15:15:28,681 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140606329738144 on /home/nikos/.cython/brian_extensions/_cython_magic_8098780e374c91682bf668125ffb31ac.lock 2021-11-05 15:15:28,681 DEBUG brian2.utils.filelock: Lock 140606329738144 released on /home/nikos/.cython/brian_extensions/_cython_magic_8098780e374c91682bf668125ffb31ac.lock 2021-11-05 15:15:28,681 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "DG_inhtoDG_py_pre_synapses_push_spikes" using Cython module "_cython_magic_a438d5658dca528b52175e91475a8ad9" 2021-11-05 15:15:28,681 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140606329739680 on /home/nikos/.cython/brian_extensions/_cython_magic_a438d5658dca528b52175e91475a8ad9.lock 2021-11-05 15:15:28,681 DEBUG brian2.utils.filelock: Lock 140606329739680 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_a438d5658dca528b52175e91475a8ad9.lock 2021-11-05 15:15:28,682 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140606329739680 on /home/nikos/.cython/brian_extensions/_cython_magic_a438d5658dca528b52175e91475a8ad9.lock 2021-11-05 15:15:28,682 DEBUG brian2.utils.filelock: Lock 140606329739680 released on /home/nikos/.cython/brian_extensions/_cython_magic_a438d5658dca528b52175e91475a8ad9.lock 2021-11-05 15:15:28,682 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=DG_inhtoDG_py, template name=synapses) for abstract code: hi_post+=3.0*6e-10*siemens 2021-11-05 15:15:28,702 DIAGNOSTIC brian2.devices.device: DG_inhtoDG_py_pre_codeobject abstract code: hi_post+=3.0*6e-10*siemens 2021-11-05 15:15:28,702 DIAGNOSTIC brian2.devices.device: DG_inhtoDG_py_pre_codeobject snippet (scalar): _lio_1 = 1.8e-09 * siemens 2021-11-05 15:15:28,702 DIAGNOSTIC brian2.devices.device: DG_inhtoDG_py_pre_codeobject snippet (vector): _postsynaptic_idx = _array_DG_inhtoDG_py__synaptic_post[_idx] hi_post = _array_DG_py_hi[_postsynaptic_idx] hi_post += _lio_1 _array_DG_py_hi[_postsynaptic_idx] = hi_post 2021-11-05 15:15:28,703 DIAGNOSTIC brian2.devices.device: DG_inhtoDG_py_pre_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var__postsynaptic_idx = _namespace["_var__postsynaptic_idx"] _dynamic_array_DG_inhtoDG_py__synaptic_post = _namespace["_dynamic_array_DG_inhtoDG_py__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_DG_inhtoDG_py__synaptic_post = _namespace['_array_DG_inhtoDG_py__synaptic_post'] cdef int32_t * _array_DG_inhtoDG_py__synaptic_post = _buf__array_DG_inhtoDG_py__synaptic_post.data cdef size_t _num_array_DG_inhtoDG_py__synaptic_post = len(_namespace['_array_DG_inhtoDG_py__synaptic_post']) cdef int32_t _postsynaptic_idx _queue = _namespace["_queue"] _var_hi_post = _namespace["_var_hi_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_hi = _namespace['_array_DG_py_hi'] cdef double * _array_DG_py_hi = _buf__array_DG_py_hi.data cdef size_t _num_array_DG_py_hi = len(_namespace['_array_DG_py_hi']) cdef double hi_post _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] cdef double _lio_1 if '_owner' in _namespace: _owner = _namespace['_owner'] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _spiking_synapses = _queue.peek() # scalar code _vectorisation_idx = 1 _lio_1 = 1.8e-09 * siemens cdef size_t _spiking_synapse_idx for _spiking_synapse_idx in range(len(_spiking_synapses)): # vector code _idx = _spiking_synapses[_spiking_synapse_idx] _vectorisation_idx = _idx _postsynaptic_idx = _array_DG_inhtoDG_py__synaptic_post[_idx] hi_post = _array_DG_py_hi[_postsynaptic_idx] hi_post += _lio_1 _array_DG_py_hi[_postsynaptic_idx] = hi_post # Advance the spike queue _queue.advance() before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var__postsynaptic_idx = _namespace["_var__postsynaptic_idx"] _dynamic_array_DG_inhtoDG_py__synaptic_post = _namespace["_dynamic_array_DG_inhtoDG_py__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_DG_inhtoDG_py__synaptic_post = _namespace['_array_DG_inhtoDG_py__synaptic_post'] cdef int32_t * _array_DG_inhtoDG_py__synaptic_post = _buf__array_DG_inhtoDG_py__synaptic_post.data cdef size_t _num_array_DG_inhtoDG_py__synaptic_post = len(_namespace['_array_DG_inhtoDG_py__synaptic_post']) cdef int32_t _postsynaptic_idx _queue = _namespace["_queue"] _var_hi_post = _namespace["_var_hi_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_hi = _namespace['_array_DG_py_hi'] cdef double * _array_DG_py_hi = _buf__array_DG_py_hi.data cdef size_t _num_array_DG_py_hi = len(_namespace['_array_DG_py_hi']) cdef double hi_post _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] cdef double _lio_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var__postsynaptic_idx = _namespace["_var__postsynaptic_idx"] _dynamic_array_DG_inhtoDG_py__synaptic_post = _namespace["_dynamic_array_DG_inhtoDG_py__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_DG_inhtoDG_py__synaptic_post = _namespace['_array_DG_inhtoDG_py__synaptic_post'] cdef int32_t * _array_DG_inhtoDG_py__synaptic_post = _buf__array_DG_inhtoDG_py__synaptic_post.data cdef size_t _num_array_DG_inhtoDG_py__synaptic_post = len(_namespace['_array_DG_inhtoDG_py__synaptic_post']) cdef int32_t _postsynaptic_idx _queue = _namespace["_queue"] _var_hi_post = _namespace["_var_hi_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_hi = _namespace['_array_DG_py_hi'] cdef double * _array_DG_py_hi = _buf__array_DG_py_hi.data cdef size_t _num_array_DG_py_hi = len(_namespace['_array_DG_py_hi']) cdef double hi_post _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] cdef double _lio_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:15:28,703 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name DG_inhtoDG_py_pre_codeobject 2021-11-05 15:15:28,703 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "DG_inhtoDG_py_synapses" using Cython module "_cython_magic_2ef86a096cb65ae26fa01cd5b21c278c" 2021-11-05 15:15:28,703 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140606333770336 on /home/nikos/.cython/brian_extensions/_cython_magic_2ef86a096cb65ae26fa01cd5b21c278c.lock 2021-11-05 15:15:28,703 DEBUG brian2.utils.filelock: Lock 140606333770336 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_2ef86a096cb65ae26fa01cd5b21c278c.lock 2021-11-05 15:15:28,703 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140606333770336 on /home/nikos/.cython/brian_extensions/_cython_magic_2ef86a096cb65ae26fa01cd5b21c278c.lock 2021-11-05 15:15:28,703 DEBUG brian2.utils.filelock: Lock 140606333770336 released on /home/nikos/.cython/brian_extensions/_cython_magic_2ef86a096cb65ae26fa01cd5b21c278c.lock 2021-11-05 15:15:28,704 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=DG_pytoCA3_inh_pre, template name=synapses_push_spikes) for abstract code: 2021-11-05 15:15:28,716 DIAGNOSTIC brian2.devices.device: DG_pytoCA3_inh_pre_push_spikes abstract code: 2021-11-05 15:15:28,716 DIAGNOSTIC brian2.devices.device: DG_pytoCA3_inh_pre_push_spikes snippet (scalar): 2021-11-05 15:15:28,716 DIAGNOSTIC brian2.devices.device: DG_pytoCA3_inh_pre_push_spikes snippet (vector): 2021-11-05 15:15:28,717 DIAGNOSTIC brian2.devices.device: DG_pytoCA3_inh_pre_push_spikes code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_DG_py__spikespace = _namespace['_array_DG_py__spikespace'] cdef int32_t * _array_DG_py__spikespace = _buf__array_DG_py__spikespace.data cdef size_t _num_array_DG_py__spikespace = len(_namespace['_array_DG_py__spikespace']) cdef int32_t _spikespace if '_owner' in _namespace: _owner = _namespace['_owner'] _owner.push_spikes() before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_DG_py__spikespace = _namespace['_array_DG_py__spikespace'] cdef int32_t * _array_DG_py__spikespace = _buf__array_DG_py__spikespace.data cdef size_t _num_array_DG_py__spikespace = len(_namespace['_array_DG_py__spikespace']) cdef int32_t _spikespace if '_owner' in _namespace: _owner = _namespace['_owner'] _owner.initialise_queue() after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_DG_py__spikespace = _namespace['_array_DG_py__spikespace'] cdef int32_t * _array_DG_py__spikespace = _buf__array_DG_py__spikespace.data cdef size_t _num_array_DG_py__spikespace = len(_namespace['_array_DG_py__spikespace']) cdef int32_t _spikespace if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:15:28,717 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name DG_pytoCA3_inh_pre_push_spikes 2021-11-05 15:15:28,717 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "DG_pytoCA3_inh_pre_synapses_push_spikes" using Cython module "_cython_magic_0f337bbc16c40ee9c62e69ad057a5e3d" 2021-11-05 15:15:28,717 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140606333769952 on /home/nikos/.cython/brian_extensions/_cython_magic_0f337bbc16c40ee9c62e69ad057a5e3d.lock 2021-11-05 15:15:28,717 DEBUG brian2.utils.filelock: Lock 140606333769952 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_0f337bbc16c40ee9c62e69ad057a5e3d.lock 2021-11-05 15:15:28,717 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140606333769952 on /home/nikos/.cython/brian_extensions/_cython_magic_0f337bbc16c40ee9c62e69ad057a5e3d.lock 2021-11-05 15:15:28,717 DEBUG brian2.utils.filelock: Lock 140606333769952 released on /home/nikos/.cython/brian_extensions/_cython_magic_0f337bbc16c40ee9c62e69ad057a5e3d.lock 2021-11-05 15:15:28,717 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "DG_pytoCA3_inh_pre_synapses_push_spikes" using Cython module "_cython_magic_2e4dd7a00b673be0849b1d8ecfd90da8" 2021-11-05 15:15:28,717 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140606333771248 on /home/nikos/.cython/brian_extensions/_cython_magic_2e4dd7a00b673be0849b1d8ecfd90da8.lock 2021-11-05 15:15:28,717 DEBUG brian2.utils.filelock: Lock 140606333771248 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_2e4dd7a00b673be0849b1d8ecfd90da8.lock 2021-11-05 15:15:28,718 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140606333771248 on /home/nikos/.cython/brian_extensions/_cython_magic_2e4dd7a00b673be0849b1d8ecfd90da8.lock 2021-11-05 15:15:28,718 DEBUG brian2.utils.filelock: Lock 140606333771248 released on /home/nikos/.cython/brian_extensions/_cython_magic_2e4dd7a00b673be0849b1d8ecfd90da8.lock 2021-11-05 15:15:28,718 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=DG_pytoCA3_inh, template name=synapses) for abstract code: he_ext_post+=3.0*6e-11*siemens*glu_pre 2021-11-05 15:15:28,738 DIAGNOSTIC brian2.devices.device: DG_pytoCA3_inh_pre_codeobject abstract code: he_ext_post+=3.0*6e-11*siemens*glu_pre 2021-11-05 15:15:28,739 DIAGNOSTIC brian2.devices.device: DG_pytoCA3_inh_pre_codeobject snippet (scalar): _lio_1 = 1.8e-10 * siemens 2021-11-05 15:15:28,739 DIAGNOSTIC brian2.devices.device: DG_pytoCA3_inh_pre_codeobject snippet (vector): _postsynaptic_idx = _array_DG_pytoCA3_inh__synaptic_post[_idx] _presynaptic_idx = _array_DG_pytoCA3_inh__synaptic_pre[_idx] he_ext_post = _array_CA3_inh_he_ext[_postsynaptic_idx] glu_pre = _array_DG_py_glu[_presynaptic_idx] he_ext_post += _lio_1 * glu_pre _array_CA3_inh_he_ext[_postsynaptic_idx] = he_ext_post 2021-11-05 15:15:28,740 DIAGNOSTIC brian2.devices.device: DG_pytoCA3_inh_pre_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var__postsynaptic_idx = _namespace["_var__postsynaptic_idx"] _dynamic_array_DG_pytoCA3_inh__synaptic_post = _namespace["_dynamic_array_DG_pytoCA3_inh__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_DG_pytoCA3_inh__synaptic_post = _namespace['_array_DG_pytoCA3_inh__synaptic_post'] cdef int32_t * _array_DG_pytoCA3_inh__synaptic_post = _buf__array_DG_pytoCA3_inh__synaptic_post.data cdef size_t _num_array_DG_pytoCA3_inh__synaptic_post = len(_namespace['_array_DG_pytoCA3_inh__synaptic_post']) cdef int32_t _postsynaptic_idx _var__presynaptic_idx = _namespace["_var__presynaptic_idx"] _dynamic_array_DG_pytoCA3_inh__synaptic_pre = _namespace["_dynamic_array_DG_pytoCA3_inh__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_DG_pytoCA3_inh__synaptic_pre = _namespace['_array_DG_pytoCA3_inh__synaptic_pre'] cdef int32_t * _array_DG_pytoCA3_inh__synaptic_pre = _buf__array_DG_pytoCA3_inh__synaptic_pre.data cdef size_t _num_array_DG_pytoCA3_inh__synaptic_pre = len(_namespace['_array_DG_pytoCA3_inh__synaptic_pre']) cdef int32_t _presynaptic_idx _queue = _namespace["_queue"] _var_glu_pre = _namespace["_var_glu_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_glu = _namespace['_array_DG_py_glu'] cdef double * _array_DG_py_glu = _buf__array_DG_py_glu.data cdef size_t _num_array_DG_py_glu = len(_namespace['_array_DG_py_glu']) cdef double glu_pre _var_he_ext_post = _namespace["_var_he_ext_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_inh_he_ext = _namespace['_array_CA3_inh_he_ext'] cdef double * _array_CA3_inh_he_ext = _buf__array_CA3_inh_he_ext.data cdef size_t _num_array_CA3_inh_he_ext = len(_namespace['_array_CA3_inh_he_ext']) cdef double he_ext_post _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] cdef double _lio_1 if '_owner' in _namespace: _owner = _namespace['_owner'] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _spiking_synapses = _queue.peek() # scalar code _vectorisation_idx = 1 _lio_1 = 1.8e-10 * siemens cdef size_t _spiking_synapse_idx for _spiking_synapse_idx in range(len(_spiking_synapses)): # vector code _idx = _spiking_synapses[_spiking_synapse_idx] _vectorisation_idx = _idx _postsynaptic_idx = _array_DG_pytoCA3_inh__synaptic_post[_idx] _presynaptic_idx = _array_DG_pytoCA3_inh__synaptic_pre[_idx] he_ext_post = _array_CA3_inh_he_ext[_postsynaptic_idx] glu_pre = _array_DG_py_glu[_presynaptic_idx] he_ext_post += _lio_1 * glu_pre _array_CA3_inh_he_ext[_postsynaptic_idx] = he_ext_post # Advance the spike queue _queue.advance() before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var__postsynaptic_idx = _namespace["_var__postsynaptic_idx"] _dynamic_array_DG_pytoCA3_inh__synaptic_post = _namespace["_dynamic_array_DG_pytoCA3_inh__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_DG_pytoCA3_inh__synaptic_post = _namespace['_array_DG_pytoCA3_inh__synaptic_post'] cdef int32_t * _array_DG_pytoCA3_inh__synaptic_post = _buf__array_DG_pytoCA3_inh__synaptic_post.data cdef size_t _num_array_DG_pytoCA3_inh__synaptic_post = len(_namespace['_array_DG_pytoCA3_inh__synaptic_post']) cdef int32_t _postsynaptic_idx _var__presynaptic_idx = _namespace["_var__presynaptic_idx"] _dynamic_array_DG_pytoCA3_inh__synaptic_pre = _namespace["_dynamic_array_DG_pytoCA3_inh__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_DG_pytoCA3_inh__synaptic_pre = _namespace['_array_DG_pytoCA3_inh__synaptic_pre'] cdef int32_t * _array_DG_pytoCA3_inh__synaptic_pre = _buf__array_DG_pytoCA3_inh__synaptic_pre.data cdef size_t _num_array_DG_pytoCA3_inh__synaptic_pre = len(_namespace['_array_DG_pytoCA3_inh__synaptic_pre']) cdef int32_t _presynaptic_idx _queue = _namespace["_queue"] _var_glu_pre = _namespace["_var_glu_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_glu = _namespace['_array_DG_py_glu'] cdef double * _array_DG_py_glu = _buf__array_DG_py_glu.data cdef size_t _num_array_DG_py_glu = len(_namespace['_array_DG_py_glu']) cdef double glu_pre _var_he_ext_post = _namespace["_var_he_ext_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_inh_he_ext = _namespace['_array_CA3_inh_he_ext'] cdef double * _array_CA3_inh_he_ext = _buf__array_CA3_inh_he_ext.data cdef size_t _num_array_CA3_inh_he_ext = len(_namespace['_array_CA3_inh_he_ext']) cdef double he_ext_post _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] cdef double _lio_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var__postsynaptic_idx = _namespace["_var__postsynaptic_idx"] _dynamic_array_DG_pytoCA3_inh__synaptic_post = _namespace["_dynamic_array_DG_pytoCA3_inh__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_DG_pytoCA3_inh__synaptic_post = _namespace['_array_DG_pytoCA3_inh__synaptic_post'] cdef int32_t * _array_DG_pytoCA3_inh__synaptic_post = _buf__array_DG_pytoCA3_inh__synaptic_post.data cdef size_t _num_array_DG_pytoCA3_inh__synaptic_post = len(_namespace['_array_DG_pytoCA3_inh__synaptic_post']) cdef int32_t _postsynaptic_idx _var__presynaptic_idx = _namespace["_var__presynaptic_idx"] _dynamic_array_DG_pytoCA3_inh__synaptic_pre = _namespace["_dynamic_array_DG_pytoCA3_inh__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_DG_pytoCA3_inh__synaptic_pre = _namespace['_array_DG_pytoCA3_inh__synaptic_pre'] cdef int32_t * _array_DG_pytoCA3_inh__synaptic_pre = _buf__array_DG_pytoCA3_inh__synaptic_pre.data cdef size_t _num_array_DG_pytoCA3_inh__synaptic_pre = len(_namespace['_array_DG_pytoCA3_inh__synaptic_pre']) cdef int32_t _presynaptic_idx _queue = _namespace["_queue"] _var_glu_pre = _namespace["_var_glu_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_glu = _namespace['_array_DG_py_glu'] cdef double * _array_DG_py_glu = _buf__array_DG_py_glu.data cdef size_t _num_array_DG_py_glu = len(_namespace['_array_DG_py_glu']) cdef double glu_pre _var_he_ext_post = _namespace["_var_he_ext_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_inh_he_ext = _namespace['_array_CA3_inh_he_ext'] cdef double * _array_CA3_inh_he_ext = _buf__array_CA3_inh_he_ext.data cdef size_t _num_array_CA3_inh_he_ext = len(_namespace['_array_CA3_inh_he_ext']) cdef double he_ext_post _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] cdef double _lio_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:15:28,740 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name DG_pytoCA3_inh_pre_codeobject 2021-11-05 15:15:28,740 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "DG_pytoCA3_inh_synapses" using Cython module "_cython_magic_9ace75e361e6d4975124be6309b04fa1" 2021-11-05 15:15:28,740 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140606333769232 on /home/nikos/.cython/brian_extensions/_cython_magic_9ace75e361e6d4975124be6309b04fa1.lock 2021-11-05 15:15:28,740 DEBUG brian2.utils.filelock: Lock 140606333769232 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_9ace75e361e6d4975124be6309b04fa1.lock 2021-11-05 15:15:28,740 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140606333769232 on /home/nikos/.cython/brian_extensions/_cython_magic_9ace75e361e6d4975124be6309b04fa1.lock 2021-11-05 15:15:28,740 DEBUG brian2.utils.filelock: Lock 140606333769232 released on /home/nikos/.cython/brian_extensions/_cython_magic_9ace75e361e6d4975124be6309b04fa1.lock 2021-11-05 15:15:28,741 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=DG_pytoCA3_pyCAN_pre, template name=synapses_push_spikes) for abstract code: 2021-11-05 15:15:28,757 DIAGNOSTIC brian2.devices.device: DG_pytoCA3_pyCAN_pre_push_spikes abstract code: 2021-11-05 15:15:28,757 DIAGNOSTIC brian2.devices.device: DG_pytoCA3_pyCAN_pre_push_spikes snippet (scalar): 2021-11-05 15:15:28,757 DIAGNOSTIC brian2.devices.device: DG_pytoCA3_pyCAN_pre_push_spikes snippet (vector): 2021-11-05 15:15:28,757 DIAGNOSTIC brian2.devices.device: DG_pytoCA3_pyCAN_pre_push_spikes code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_DG_py__spikespace = _namespace['_array_DG_py__spikespace'] cdef int32_t * _array_DG_py__spikespace = _buf__array_DG_py__spikespace.data cdef size_t _num_array_DG_py__spikespace = len(_namespace['_array_DG_py__spikespace']) cdef int32_t _spikespace if '_owner' in _namespace: _owner = _namespace['_owner'] _owner.push_spikes() before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_DG_py__spikespace = _namespace['_array_DG_py__spikespace'] cdef int32_t * _array_DG_py__spikespace = _buf__array_DG_py__spikespace.data cdef size_t _num_array_DG_py__spikespace = len(_namespace['_array_DG_py__spikespace']) cdef int32_t _spikespace if '_owner' in _namespace: _owner = _namespace['_owner'] _owner.initialise_queue() after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_DG_py__spikespace = _namespace['_array_DG_py__spikespace'] cdef int32_t * _array_DG_py__spikespace = _buf__array_DG_py__spikespace.data cdef size_t _num_array_DG_py__spikespace = len(_namespace['_array_DG_py__spikespace']) cdef int32_t _spikespace if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:15:28,758 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name DG_pytoCA3_pyCAN_pre_push_spikes 2021-11-05 15:15:28,758 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=DG_pytoCA3_pyCAN, template name=synapses) for abstract code: he_ext_post+=3.0*6e-11*siemens*glu_pre 2021-11-05 15:15:28,782 DIAGNOSTIC brian2.devices.device: DG_pytoCA3_pyCAN_pre_codeobject abstract code: he_ext_post+=3.0*6e-11*siemens*glu_pre 2021-11-05 15:15:28,783 DIAGNOSTIC brian2.devices.device: DG_pytoCA3_pyCAN_pre_codeobject snippet (scalar): _lio_1 = 1.8e-10 * siemens 2021-11-05 15:15:28,783 DIAGNOSTIC brian2.devices.device: DG_pytoCA3_pyCAN_pre_codeobject snippet (vector): _postsynaptic_idx = _array_DG_pytoCA3_pyCAN__synaptic_post[_idx] _presynaptic_idx = _array_DG_pytoCA3_pyCAN__synaptic_pre[_idx] he_ext_post = _array_CA3_pyCAN_he_ext[_postsynaptic_idx] glu_pre = _array_DG_py_glu[_presynaptic_idx] he_ext_post += _lio_1 * glu_pre _array_CA3_pyCAN_he_ext[_postsynaptic_idx] = he_ext_post 2021-11-05 15:15:28,784 DIAGNOSTIC brian2.devices.device: DG_pytoCA3_pyCAN_pre_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var__postsynaptic_idx = _namespace["_var__postsynaptic_idx"] _dynamic_array_DG_pytoCA3_pyCAN__synaptic_post = _namespace["_dynamic_array_DG_pytoCA3_pyCAN__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_DG_pytoCA3_pyCAN__synaptic_post = _namespace['_array_DG_pytoCA3_pyCAN__synaptic_post'] cdef int32_t * _array_DG_pytoCA3_pyCAN__synaptic_post = _buf__array_DG_pytoCA3_pyCAN__synaptic_post.data cdef size_t _num_array_DG_pytoCA3_pyCAN__synaptic_post = len(_namespace['_array_DG_pytoCA3_pyCAN__synaptic_post']) cdef int32_t _postsynaptic_idx _var__presynaptic_idx = _namespace["_var__presynaptic_idx"] _dynamic_array_DG_pytoCA3_pyCAN__synaptic_pre = _namespace["_dynamic_array_DG_pytoCA3_pyCAN__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_DG_pytoCA3_pyCAN__synaptic_pre = _namespace['_array_DG_pytoCA3_pyCAN__synaptic_pre'] cdef int32_t * _array_DG_pytoCA3_pyCAN__synaptic_pre = _buf__array_DG_pytoCA3_pyCAN__synaptic_pre.data cdef size_t _num_array_DG_pytoCA3_pyCAN__synaptic_pre = len(_namespace['_array_DG_pytoCA3_pyCAN__synaptic_pre']) cdef int32_t _presynaptic_idx _queue = _namespace["_queue"] _var_glu_pre = _namespace["_var_glu_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_glu = _namespace['_array_DG_py_glu'] cdef double * _array_DG_py_glu = _buf__array_DG_py_glu.data cdef size_t _num_array_DG_py_glu = len(_namespace['_array_DG_py_glu']) cdef double glu_pre _var_he_ext_post = _namespace["_var_he_ext_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_he_ext = _namespace['_array_CA3_pyCAN_he_ext'] cdef double * _array_CA3_pyCAN_he_ext = _buf__array_CA3_pyCAN_he_ext.data cdef size_t _num_array_CA3_pyCAN_he_ext = len(_namespace['_array_CA3_pyCAN_he_ext']) cdef double he_ext_post _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] cdef double _lio_1 if '_owner' in _namespace: _owner = _namespace['_owner'] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _spiking_synapses = _queue.peek() # scalar code _vectorisation_idx = 1 _lio_1 = 1.8e-10 * siemens cdef size_t _spiking_synapse_idx for _spiking_synapse_idx in range(len(_spiking_synapses)): # vector code _idx = _spiking_synapses[_spiking_synapse_idx] _vectorisation_idx = _idx _postsynaptic_idx = _array_DG_pytoCA3_pyCAN__synaptic_post[_idx] _presynaptic_idx = _array_DG_pytoCA3_pyCAN__synaptic_pre[_idx] he_ext_post = _array_CA3_pyCAN_he_ext[_postsynaptic_idx] glu_pre = _array_DG_py_glu[_presynaptic_idx] he_ext_post += _lio_1 * glu_pre _array_CA3_pyCAN_he_ext[_postsynaptic_idx] = he_ext_post # Advance the spike queue _queue.advance() before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var__postsynaptic_idx = _namespace["_var__postsynaptic_idx"] _dynamic_array_DG_pytoCA3_pyCAN__synaptic_post = _namespace["_dynamic_array_DG_pytoCA3_pyCAN__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_DG_pytoCA3_pyCAN__synaptic_post = _namespace['_array_DG_pytoCA3_pyCAN__synaptic_post'] cdef int32_t * _array_DG_pytoCA3_pyCAN__synaptic_post = _buf__array_DG_pytoCA3_pyCAN__synaptic_post.data cdef size_t _num_array_DG_pytoCA3_pyCAN__synaptic_post = len(_namespace['_array_DG_pytoCA3_pyCAN__synaptic_post']) cdef int32_t _postsynaptic_idx _var__presynaptic_idx = _namespace["_var__presynaptic_idx"] _dynamic_array_DG_pytoCA3_pyCAN__synaptic_pre = _namespace["_dynamic_array_DG_pytoCA3_pyCAN__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_DG_pytoCA3_pyCAN__synaptic_pre = _namespace['_array_DG_pytoCA3_pyCAN__synaptic_pre'] cdef int32_t * _array_DG_pytoCA3_pyCAN__synaptic_pre = _buf__array_DG_pytoCA3_pyCAN__synaptic_pre.data cdef size_t _num_array_DG_pytoCA3_pyCAN__synaptic_pre = len(_namespace['_array_DG_pytoCA3_pyCAN__synaptic_pre']) cdef int32_t _presynaptic_idx _queue = _namespace["_queue"] _var_glu_pre = _namespace["_var_glu_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_glu = _namespace['_array_DG_py_glu'] cdef double * _array_DG_py_glu = _buf__array_DG_py_glu.data cdef size_t _num_array_DG_py_glu = len(_namespace['_array_DG_py_glu']) cdef double glu_pre _var_he_ext_post = _namespace["_var_he_ext_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_he_ext = _namespace['_array_CA3_pyCAN_he_ext'] cdef double * _array_CA3_pyCAN_he_ext = _buf__array_CA3_pyCAN_he_ext.data cdef size_t _num_array_CA3_pyCAN_he_ext = len(_namespace['_array_CA3_pyCAN_he_ext']) cdef double he_ext_post _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] cdef double _lio_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var__postsynaptic_idx = _namespace["_var__postsynaptic_idx"] _dynamic_array_DG_pytoCA3_pyCAN__synaptic_post = _namespace["_dynamic_array_DG_pytoCA3_pyCAN__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_DG_pytoCA3_pyCAN__synaptic_post = _namespace['_array_DG_pytoCA3_pyCAN__synaptic_post'] cdef int32_t * _array_DG_pytoCA3_pyCAN__synaptic_post = _buf__array_DG_pytoCA3_pyCAN__synaptic_post.data cdef size_t _num_array_DG_pytoCA3_pyCAN__synaptic_post = len(_namespace['_array_DG_pytoCA3_pyCAN__synaptic_post']) cdef int32_t _postsynaptic_idx _var__presynaptic_idx = _namespace["_var__presynaptic_idx"] _dynamic_array_DG_pytoCA3_pyCAN__synaptic_pre = _namespace["_dynamic_array_DG_pytoCA3_pyCAN__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_DG_pytoCA3_pyCAN__synaptic_pre = _namespace['_array_DG_pytoCA3_pyCAN__synaptic_pre'] cdef int32_t * _array_DG_pytoCA3_pyCAN__synaptic_pre = _buf__array_DG_pytoCA3_pyCAN__synaptic_pre.data cdef size_t _num_array_DG_pytoCA3_pyCAN__synaptic_pre = len(_namespace['_array_DG_pytoCA3_pyCAN__synaptic_pre']) cdef int32_t _presynaptic_idx _queue = _namespace["_queue"] _var_glu_pre = _namespace["_var_glu_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_glu = _namespace['_array_DG_py_glu'] cdef double * _array_DG_py_glu = _buf__array_DG_py_glu.data cdef size_t _num_array_DG_py_glu = len(_namespace['_array_DG_py_glu']) cdef double glu_pre _var_he_ext_post = _namespace["_var_he_ext_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_he_ext = _namespace['_array_CA3_pyCAN_he_ext'] cdef double * _array_CA3_pyCAN_he_ext = _buf__array_CA3_pyCAN_he_ext.data cdef size_t _num_array_CA3_pyCAN_he_ext = len(_namespace['_array_CA3_pyCAN_he_ext']) cdef double he_ext_post _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] cdef double _lio_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:15:28,784 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name DG_pytoCA3_pyCAN_pre_codeobject 2021-11-05 15:15:28,785 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "DG_pytoCA3_pyCAN_synapses" using Cython module "_cython_magic_27c73abffd755533769b62268222027c" 2021-11-05 15:15:28,785 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140606333769328 on /home/nikos/.cython/brian_extensions/_cython_magic_27c73abffd755533769b62268222027c.lock 2021-11-05 15:15:28,785 DEBUG brian2.utils.filelock: Lock 140606333769328 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_27c73abffd755533769b62268222027c.lock 2021-11-05 15:15:28,785 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140606333769328 on /home/nikos/.cython/brian_extensions/_cython_magic_27c73abffd755533769b62268222027c.lock 2021-11-05 15:15:28,785 DEBUG brian2.utils.filelock: Lock 140606333769328 released on /home/nikos/.cython/brian_extensions/_cython_magic_27c73abffd755533769b62268222027c.lock 2021-11-05 15:15:28,790 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=DG_pytoDG_inh_pre, template name=synapses_push_spikes) for abstract code: 2021-11-05 15:15:28,803 DIAGNOSTIC brian2.devices.device: DG_pytoDG_inh_pre_push_spikes abstract code: 2021-11-05 15:15:28,803 DIAGNOSTIC brian2.devices.device: DG_pytoDG_inh_pre_push_spikes snippet (scalar): 2021-11-05 15:15:28,803 DIAGNOSTIC brian2.devices.device: DG_pytoDG_inh_pre_push_spikes snippet (vector): 2021-11-05 15:15:28,803 DIAGNOSTIC brian2.devices.device: DG_pytoDG_inh_pre_push_spikes code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_DG_py__spikespace = _namespace['_array_DG_py__spikespace'] cdef int32_t * _array_DG_py__spikespace = _buf__array_DG_py__spikespace.data cdef size_t _num_array_DG_py__spikespace = len(_namespace['_array_DG_py__spikespace']) cdef int32_t _spikespace if '_owner' in _namespace: _owner = _namespace['_owner'] _owner.push_spikes() before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_DG_py__spikespace = _namespace['_array_DG_py__spikespace'] cdef int32_t * _array_DG_py__spikespace = _buf__array_DG_py__spikespace.data cdef size_t _num_array_DG_py__spikespace = len(_namespace['_array_DG_py__spikespace']) cdef int32_t _spikespace if '_owner' in _namespace: _owner = _namespace['_owner'] _owner.initialise_queue() after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_DG_py__spikespace = _namespace['_array_DG_py__spikespace'] cdef int32_t * _array_DG_py__spikespace = _buf__array_DG_py__spikespace.data cdef size_t _num_array_DG_py__spikespace = len(_namespace['_array_DG_py__spikespace']) cdef int32_t _spikespace if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:15:28,803 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name DG_pytoDG_inh_pre_push_spikes 2021-11-05 15:15:28,804 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=DG_pytoDG_inh, template name=synapses) for abstract code: he_post+=3.0*6e-11*siemens*glu_pre 2021-11-05 15:15:28,825 DIAGNOSTIC brian2.devices.device: DG_pytoDG_inh_pre_codeobject abstract code: he_post+=3.0*6e-11*siemens*glu_pre 2021-11-05 15:15:28,826 DIAGNOSTIC brian2.devices.device: DG_pytoDG_inh_pre_codeobject snippet (scalar): _lio_1 = 1.8e-10 * siemens 2021-11-05 15:15:28,826 DIAGNOSTIC brian2.devices.device: DG_pytoDG_inh_pre_codeobject snippet (vector): _postsynaptic_idx = _array_DG_pytoDG_inh__synaptic_post[_idx] _presynaptic_idx = _array_DG_pytoDG_inh__synaptic_pre[_idx] he_post = _array_DG_inh_he[_postsynaptic_idx] glu_pre = _array_DG_py_glu[_presynaptic_idx] he_post += _lio_1 * glu_pre _array_DG_inh_he[_postsynaptic_idx] = he_post 2021-11-05 15:15:28,826 DIAGNOSTIC brian2.devices.device: DG_pytoDG_inh_pre_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var__postsynaptic_idx = _namespace["_var__postsynaptic_idx"] _dynamic_array_DG_pytoDG_inh__synaptic_post = _namespace["_dynamic_array_DG_pytoDG_inh__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_DG_pytoDG_inh__synaptic_post = _namespace['_array_DG_pytoDG_inh__synaptic_post'] cdef int32_t * _array_DG_pytoDG_inh__synaptic_post = _buf__array_DG_pytoDG_inh__synaptic_post.data cdef size_t _num_array_DG_pytoDG_inh__synaptic_post = len(_namespace['_array_DG_pytoDG_inh__synaptic_post']) cdef int32_t _postsynaptic_idx _var__presynaptic_idx = _namespace["_var__presynaptic_idx"] _dynamic_array_DG_pytoDG_inh__synaptic_pre = _namespace["_dynamic_array_DG_pytoDG_inh__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_DG_pytoDG_inh__synaptic_pre = _namespace['_array_DG_pytoDG_inh__synaptic_pre'] cdef int32_t * _array_DG_pytoDG_inh__synaptic_pre = _buf__array_DG_pytoDG_inh__synaptic_pre.data cdef size_t _num_array_DG_pytoDG_inh__synaptic_pre = len(_namespace['_array_DG_pytoDG_inh__synaptic_pre']) cdef int32_t _presynaptic_idx _queue = _namespace["_queue"] _var_glu_pre = _namespace["_var_glu_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_glu = _namespace['_array_DG_py_glu'] cdef double * _array_DG_py_glu = _buf__array_DG_py_glu.data cdef size_t _num_array_DG_py_glu = len(_namespace['_array_DG_py_glu']) cdef double glu_pre _var_he_post = _namespace["_var_he_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_inh_he = _namespace['_array_DG_inh_he'] cdef double * _array_DG_inh_he = _buf__array_DG_inh_he.data cdef size_t _num_array_DG_inh_he = len(_namespace['_array_DG_inh_he']) cdef double he_post _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] cdef double _lio_1 if '_owner' in _namespace: _owner = _namespace['_owner'] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _spiking_synapses = _queue.peek() # scalar code _vectorisation_idx = 1 _lio_1 = 1.8e-10 * siemens cdef size_t _spiking_synapse_idx for _spiking_synapse_idx in range(len(_spiking_synapses)): # vector code _idx = _spiking_synapses[_spiking_synapse_idx] _vectorisation_idx = _idx _postsynaptic_idx = _array_DG_pytoDG_inh__synaptic_post[_idx] _presynaptic_idx = _array_DG_pytoDG_inh__synaptic_pre[_idx] he_post = _array_DG_inh_he[_postsynaptic_idx] glu_pre = _array_DG_py_glu[_presynaptic_idx] he_post += _lio_1 * glu_pre _array_DG_inh_he[_postsynaptic_idx] = he_post # Advance the spike queue _queue.advance() before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var__postsynaptic_idx = _namespace["_var__postsynaptic_idx"] _dynamic_array_DG_pytoDG_inh__synaptic_post = _namespace["_dynamic_array_DG_pytoDG_inh__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_DG_pytoDG_inh__synaptic_post = _namespace['_array_DG_pytoDG_inh__synaptic_post'] cdef int32_t * _array_DG_pytoDG_inh__synaptic_post = _buf__array_DG_pytoDG_inh__synaptic_post.data cdef size_t _num_array_DG_pytoDG_inh__synaptic_post = len(_namespace['_array_DG_pytoDG_inh__synaptic_post']) cdef int32_t _postsynaptic_idx _var__presynaptic_idx = _namespace["_var__presynaptic_idx"] _dynamic_array_DG_pytoDG_inh__synaptic_pre = _namespace["_dynamic_array_DG_pytoDG_inh__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_DG_pytoDG_inh__synaptic_pre = _namespace['_array_DG_pytoDG_inh__synaptic_pre'] cdef int32_t * _array_DG_pytoDG_inh__synaptic_pre = _buf__array_DG_pytoDG_inh__synaptic_pre.data cdef size_t _num_array_DG_pytoDG_inh__synaptic_pre = len(_namespace['_array_DG_pytoDG_inh__synaptic_pre']) cdef int32_t _presynaptic_idx _queue = _namespace["_queue"] _var_glu_pre = _namespace["_var_glu_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_glu = _namespace['_array_DG_py_glu'] cdef double * _array_DG_py_glu = _buf__array_DG_py_glu.data cdef size_t _num_array_DG_py_glu = len(_namespace['_array_DG_py_glu']) cdef double glu_pre _var_he_post = _namespace["_var_he_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_inh_he = _namespace['_array_DG_inh_he'] cdef double * _array_DG_inh_he = _buf__array_DG_inh_he.data cdef size_t _num_array_DG_inh_he = len(_namespace['_array_DG_inh_he']) cdef double he_post _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] cdef double _lio_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var__postsynaptic_idx = _namespace["_var__postsynaptic_idx"] _dynamic_array_DG_pytoDG_inh__synaptic_post = _namespace["_dynamic_array_DG_pytoDG_inh__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_DG_pytoDG_inh__synaptic_post = _namespace['_array_DG_pytoDG_inh__synaptic_post'] cdef int32_t * _array_DG_pytoDG_inh__synaptic_post = _buf__array_DG_pytoDG_inh__synaptic_post.data cdef size_t _num_array_DG_pytoDG_inh__synaptic_post = len(_namespace['_array_DG_pytoDG_inh__synaptic_post']) cdef int32_t _postsynaptic_idx _var__presynaptic_idx = _namespace["_var__presynaptic_idx"] _dynamic_array_DG_pytoDG_inh__synaptic_pre = _namespace["_dynamic_array_DG_pytoDG_inh__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_DG_pytoDG_inh__synaptic_pre = _namespace['_array_DG_pytoDG_inh__synaptic_pre'] cdef int32_t * _array_DG_pytoDG_inh__synaptic_pre = _buf__array_DG_pytoDG_inh__synaptic_pre.data cdef size_t _num_array_DG_pytoDG_inh__synaptic_pre = len(_namespace['_array_DG_pytoDG_inh__synaptic_pre']) cdef int32_t _presynaptic_idx _queue = _namespace["_queue"] _var_glu_pre = _namespace["_var_glu_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_glu = _namespace['_array_DG_py_glu'] cdef double * _array_DG_py_glu = _buf__array_DG_py_glu.data cdef size_t _num_array_DG_py_glu = len(_namespace['_array_DG_py_glu']) cdef double glu_pre _var_he_post = _namespace["_var_he_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_inh_he = _namespace['_array_DG_inh_he'] cdef double * _array_DG_inh_he = _buf__array_DG_inh_he.data cdef size_t _num_array_DG_inh_he = len(_namespace['_array_DG_inh_he']) cdef double he_post _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] cdef double _lio_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:15:28,826 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name DG_pytoDG_inh_pre_codeobject 2021-11-05 15:15:28,826 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "DG_pytoDG_inh_synapses" using Cython module "_cython_magic_f6ac94f6179d209e999100ddca619280" 2021-11-05 15:15:28,826 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140606222028080 on /home/nikos/.cython/brian_extensions/_cython_magic_f6ac94f6179d209e999100ddca619280.lock 2021-11-05 15:15:28,827 DEBUG brian2.utils.filelock: Lock 140606222028080 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_f6ac94f6179d209e999100ddca619280.lock 2021-11-05 15:15:28,830 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140606222028080 on /home/nikos/.cython/brian_extensions/_cython_magic_f6ac94f6179d209e999100ddca619280.lock 2021-11-05 15:15:28,830 DEBUG brian2.utils.filelock: Lock 140606222028080 released on /home/nikos/.cython/brian_extensions/_cython_magic_f6ac94f6179d209e999100ddca619280.lock 2021-11-05 15:15:28,831 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=EC_inhtoEC_pyCAN_pre, template name=synapses_push_spikes) for abstract code: 2021-11-05 15:15:28,845 DIAGNOSTIC brian2.devices.device: EC_inhtoEC_pyCAN_pre_push_spikes abstract code: 2021-11-05 15:15:28,845 DIAGNOSTIC brian2.devices.device: EC_inhtoEC_pyCAN_pre_push_spikes snippet (scalar): 2021-11-05 15:15:28,845 DIAGNOSTIC brian2.devices.device: EC_inhtoEC_pyCAN_pre_push_spikes snippet (vector): 2021-11-05 15:15:28,846 DIAGNOSTIC brian2.devices.device: EC_inhtoEC_pyCAN_pre_push_spikes code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_inh__spikespace = _namespace['_array_EC_inh__spikespace'] cdef int32_t * _array_EC_inh__spikespace = _buf__array_EC_inh__spikespace.data cdef size_t _num_array_EC_inh__spikespace = len(_namespace['_array_EC_inh__spikespace']) cdef int32_t _spikespace if '_owner' in _namespace: _owner = _namespace['_owner'] _owner.push_spikes() before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_inh__spikespace = _namespace['_array_EC_inh__spikespace'] cdef int32_t * _array_EC_inh__spikespace = _buf__array_EC_inh__spikespace.data cdef size_t _num_array_EC_inh__spikespace = len(_namespace['_array_EC_inh__spikespace']) cdef int32_t _spikespace if '_owner' in _namespace: _owner = _namespace['_owner'] _owner.initialise_queue() after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_inh__spikespace = _namespace['_array_EC_inh__spikespace'] cdef int32_t * _array_EC_inh__spikespace = _buf__array_EC_inh__spikespace.data cdef size_t _num_array_EC_inh__spikespace = len(_namespace['_array_EC_inh__spikespace']) cdef int32_t _spikespace if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:15:28,846 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name EC_inhtoEC_pyCAN_pre_push_spikes 2021-11-05 15:15:28,846 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "EC_inhtoEC_pyCAN_pre_synapses_push_spikes" using Cython module "_cython_magic_daf4ad5f20d6998c3566dd48132d4d28" 2021-11-05 15:15:28,846 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140606222025104 on /home/nikos/.cython/brian_extensions/_cython_magic_daf4ad5f20d6998c3566dd48132d4d28.lock 2021-11-05 15:15:28,846 DEBUG brian2.utils.filelock: Lock 140606222025104 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_daf4ad5f20d6998c3566dd48132d4d28.lock 2021-11-05 15:15:28,846 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140606222025104 on /home/nikos/.cython/brian_extensions/_cython_magic_daf4ad5f20d6998c3566dd48132d4d28.lock 2021-11-05 15:15:28,846 DEBUG brian2.utils.filelock: Lock 140606222025104 released on /home/nikos/.cython/brian_extensions/_cython_magic_daf4ad5f20d6998c3566dd48132d4d28.lock 2021-11-05 15:15:28,847 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "EC_inhtoEC_pyCAN_pre_synapses_push_spikes" using Cython module "_cython_magic_80b32aa687a48a9f8228ed5263c9c5b4" 2021-11-05 15:15:28,847 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140606222025104 on /home/nikos/.cython/brian_extensions/_cython_magic_80b32aa687a48a9f8228ed5263c9c5b4.lock 2021-11-05 15:15:28,847 DEBUG brian2.utils.filelock: Lock 140606222025104 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_80b32aa687a48a9f8228ed5263c9c5b4.lock 2021-11-05 15:15:28,847 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140606222025104 on /home/nikos/.cython/brian_extensions/_cython_magic_80b32aa687a48a9f8228ed5263c9c5b4.lock 2021-11-05 15:15:28,847 DEBUG brian2.utils.filelock: Lock 140606222025104 released on /home/nikos/.cython/brian_extensions/_cython_magic_80b32aa687a48a9f8228ed5263c9c5b4.lock 2021-11-05 15:15:28,847 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=EC_inhtoEC_pyCAN, template name=synapses) for abstract code: hi_post+=1.0*6e-10*siemens 2021-11-05 15:15:28,870 DIAGNOSTIC brian2.devices.device: EC_inhtoEC_pyCAN_pre_codeobject abstract code: hi_post+=1.0*6e-10*siemens 2021-11-05 15:15:28,871 DIAGNOSTIC brian2.devices.device: EC_inhtoEC_pyCAN_pre_codeobject snippet (scalar): _lio_1 = 6e-10 * siemens 2021-11-05 15:15:28,871 DIAGNOSTIC brian2.devices.device: EC_inhtoEC_pyCAN_pre_codeobject snippet (vector): _postsynaptic_idx = _array_EC_inhtoEC_pyCAN__synaptic_post[_idx] hi_post = _array_EC_pyCAN_hi[_postsynaptic_idx] hi_post += _lio_1 _array_EC_pyCAN_hi[_postsynaptic_idx] = hi_post 2021-11-05 15:15:28,871 DIAGNOSTIC brian2.devices.device: EC_inhtoEC_pyCAN_pre_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var__postsynaptic_idx = _namespace["_var__postsynaptic_idx"] _dynamic_array_EC_inhtoEC_pyCAN__synaptic_post = _namespace["_dynamic_array_EC_inhtoEC_pyCAN__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_inhtoEC_pyCAN__synaptic_post = _namespace['_array_EC_inhtoEC_pyCAN__synaptic_post'] cdef int32_t * _array_EC_inhtoEC_pyCAN__synaptic_post = _buf__array_EC_inhtoEC_pyCAN__synaptic_post.data cdef size_t _num_array_EC_inhtoEC_pyCAN__synaptic_post = len(_namespace['_array_EC_inhtoEC_pyCAN__synaptic_post']) cdef int32_t _postsynaptic_idx _queue = _namespace["_queue"] _var_hi_post = _namespace["_var_hi_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_hi = _namespace['_array_EC_pyCAN_hi'] cdef double * _array_EC_pyCAN_hi = _buf__array_EC_pyCAN_hi.data cdef size_t _num_array_EC_pyCAN_hi = len(_namespace['_array_EC_pyCAN_hi']) cdef double hi_post _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] cdef double _lio_1 if '_owner' in _namespace: _owner = _namespace['_owner'] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _spiking_synapses = _queue.peek() # scalar code _vectorisation_idx = 1 _lio_1 = 6e-10 * siemens cdef size_t _spiking_synapse_idx for _spiking_synapse_idx in range(len(_spiking_synapses)): # vector code _idx = _spiking_synapses[_spiking_synapse_idx] _vectorisation_idx = _idx _postsynaptic_idx = _array_EC_inhtoEC_pyCAN__synaptic_post[_idx] hi_post = _array_EC_pyCAN_hi[_postsynaptic_idx] hi_post += _lio_1 _array_EC_pyCAN_hi[_postsynaptic_idx] = hi_post # Advance the spike queue _queue.advance() before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var__postsynaptic_idx = _namespace["_var__postsynaptic_idx"] _dynamic_array_EC_inhtoEC_pyCAN__synaptic_post = _namespace["_dynamic_array_EC_inhtoEC_pyCAN__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_inhtoEC_pyCAN__synaptic_post = _namespace['_array_EC_inhtoEC_pyCAN__synaptic_post'] cdef int32_t * _array_EC_inhtoEC_pyCAN__synaptic_post = _buf__array_EC_inhtoEC_pyCAN__synaptic_post.data cdef size_t _num_array_EC_inhtoEC_pyCAN__synaptic_post = len(_namespace['_array_EC_inhtoEC_pyCAN__synaptic_post']) cdef int32_t _postsynaptic_idx _queue = _namespace["_queue"] _var_hi_post = _namespace["_var_hi_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_hi = _namespace['_array_EC_pyCAN_hi'] cdef double * _array_EC_pyCAN_hi = _buf__array_EC_pyCAN_hi.data cdef size_t _num_array_EC_pyCAN_hi = len(_namespace['_array_EC_pyCAN_hi']) cdef double hi_post _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] cdef double _lio_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var__postsynaptic_idx = _namespace["_var__postsynaptic_idx"] _dynamic_array_EC_inhtoEC_pyCAN__synaptic_post = _namespace["_dynamic_array_EC_inhtoEC_pyCAN__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_inhtoEC_pyCAN__synaptic_post = _namespace['_array_EC_inhtoEC_pyCAN__synaptic_post'] cdef int32_t * _array_EC_inhtoEC_pyCAN__synaptic_post = _buf__array_EC_inhtoEC_pyCAN__synaptic_post.data cdef size_t _num_array_EC_inhtoEC_pyCAN__synaptic_post = len(_namespace['_array_EC_inhtoEC_pyCAN__synaptic_post']) cdef int32_t _postsynaptic_idx _queue = _namespace["_queue"] _var_hi_post = _namespace["_var_hi_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_hi = _namespace['_array_EC_pyCAN_hi'] cdef double * _array_EC_pyCAN_hi = _buf__array_EC_pyCAN_hi.data cdef size_t _num_array_EC_pyCAN_hi = len(_namespace['_array_EC_pyCAN_hi']) cdef double hi_post _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] cdef double _lio_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:15:28,871 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name EC_inhtoEC_pyCAN_pre_codeobject 2021-11-05 15:15:28,871 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "EC_inhtoEC_pyCAN_synapses" using Cython module "_cython_magic_3a81c3dad5a0a3c268073b95bf3c6932" 2021-11-05 15:15:28,871 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140606332007904 on /home/nikos/.cython/brian_extensions/_cython_magic_3a81c3dad5a0a3c268073b95bf3c6932.lock 2021-11-05 15:15:28,871 DEBUG brian2.utils.filelock: Lock 140606332007904 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_3a81c3dad5a0a3c268073b95bf3c6932.lock 2021-11-05 15:15:28,871 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140606332007904 on /home/nikos/.cython/brian_extensions/_cython_magic_3a81c3dad5a0a3c268073b95bf3c6932.lock 2021-11-05 15:15:28,872 DEBUG brian2.utils.filelock: Lock 140606332007904 released on /home/nikos/.cython/brian_extensions/_cython_magic_3a81c3dad5a0a3c268073b95bf3c6932.lock 2021-11-05 15:15:28,872 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=EC_pyCANtoCA1_inh_pre, template name=synapses_push_spikes) for abstract code: 2021-11-05 15:15:28,885 DIAGNOSTIC brian2.devices.device: EC_pyCANtoCA1_inh_pre_push_spikes abstract code: 2021-11-05 15:15:28,885 DIAGNOSTIC brian2.devices.device: EC_pyCANtoCA1_inh_pre_push_spikes snippet (scalar): 2021-11-05 15:15:28,885 DIAGNOSTIC brian2.devices.device: EC_pyCANtoCA1_inh_pre_push_spikes snippet (vector): 2021-11-05 15:15:28,886 DIAGNOSTIC brian2.devices.device: EC_pyCANtoCA1_inh_pre_push_spikes code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCAN__spikespace = _namespace['_array_EC_pyCAN__spikespace'] cdef int32_t * _array_EC_pyCAN__spikespace = _buf__array_EC_pyCAN__spikespace.data cdef size_t _num_array_EC_pyCAN__spikespace = len(_namespace['_array_EC_pyCAN__spikespace']) cdef int32_t _spikespace if '_owner' in _namespace: _owner = _namespace['_owner'] _owner.push_spikes() before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCAN__spikespace = _namespace['_array_EC_pyCAN__spikespace'] cdef int32_t * _array_EC_pyCAN__spikespace = _buf__array_EC_pyCAN__spikespace.data cdef size_t _num_array_EC_pyCAN__spikespace = len(_namespace['_array_EC_pyCAN__spikespace']) cdef int32_t _spikespace if '_owner' in _namespace: _owner = _namespace['_owner'] _owner.initialise_queue() after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCAN__spikespace = _namespace['_array_EC_pyCAN__spikespace'] cdef int32_t * _array_EC_pyCAN__spikespace = _buf__array_EC_pyCAN__spikespace.data cdef size_t _num_array_EC_pyCAN__spikespace = len(_namespace['_array_EC_pyCAN__spikespace']) cdef int32_t _spikespace if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:15:28,886 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name EC_pyCANtoCA1_inh_pre_push_spikes 2021-11-05 15:15:28,886 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "EC_pyCANtoCA1_inh_pre_synapses_push_spikes" using Cython module "_cython_magic_63378cb313ee40e50a49de260b2bc562" 2021-11-05 15:15:28,886 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140606332009584 on /home/nikos/.cython/brian_extensions/_cython_magic_63378cb313ee40e50a49de260b2bc562.lock 2021-11-05 15:15:28,886 DEBUG brian2.utils.filelock: Lock 140606332009584 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_63378cb313ee40e50a49de260b2bc562.lock 2021-11-05 15:15:28,886 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140606332009584 on /home/nikos/.cython/brian_extensions/_cython_magic_63378cb313ee40e50a49de260b2bc562.lock 2021-11-05 15:15:28,886 DEBUG brian2.utils.filelock: Lock 140606332009584 released on /home/nikos/.cython/brian_extensions/_cython_magic_63378cb313ee40e50a49de260b2bc562.lock 2021-11-05 15:15:28,887 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "EC_pyCANtoCA1_inh_pre_synapses_push_spikes" using Cython module "_cython_magic_8f749e54edae70c6ea29a35b8a9759c4" 2021-11-05 15:15:28,887 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140606332008048 on /home/nikos/.cython/brian_extensions/_cython_magic_8f749e54edae70c6ea29a35b8a9759c4.lock 2021-11-05 15:15:28,887 DEBUG brian2.utils.filelock: Lock 140606332008048 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_8f749e54edae70c6ea29a35b8a9759c4.lock 2021-11-05 15:15:28,887 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140606332008048 on /home/nikos/.cython/brian_extensions/_cython_magic_8f749e54edae70c6ea29a35b8a9759c4.lock 2021-11-05 15:15:28,887 DEBUG brian2.utils.filelock: Lock 140606332008048 released on /home/nikos/.cython/brian_extensions/_cython_magic_8f749e54edae70c6ea29a35b8a9759c4.lock 2021-11-05 15:15:28,887 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=EC_pyCANtoCA1_inh, template name=synapses) for abstract code: he_ext_post+=0.3333333333333333*6e-11*siemens*glu_pre 2021-11-05 15:15:28,908 DIAGNOSTIC brian2.devices.device: EC_pyCANtoCA1_inh_pre_codeobject abstract code: he_ext_post+=0.3333333333333333*6e-11*siemens*glu_pre 2021-11-05 15:15:28,909 DIAGNOSTIC brian2.devices.device: EC_pyCANtoCA1_inh_pre_codeobject snippet (scalar): _lio_1 = 2e-11 * siemens 2021-11-05 15:15:28,909 DIAGNOSTIC brian2.devices.device: EC_pyCANtoCA1_inh_pre_codeobject snippet (vector): _postsynaptic_idx = _array_EC_pyCANtoCA1_inh__synaptic_post[_idx] _presynaptic_idx = _array_EC_pyCANtoCA1_inh__synaptic_pre[_idx] he_ext_post = _array_CA1_inh_he_ext[_postsynaptic_idx] glu_pre = _array_EC_pyCAN_glu[_presynaptic_idx] he_ext_post += _lio_1 * glu_pre _array_CA1_inh_he_ext[_postsynaptic_idx] = he_ext_post 2021-11-05 15:15:28,910 DIAGNOSTIC brian2.devices.device: EC_pyCANtoCA1_inh_pre_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var__postsynaptic_idx = _namespace["_var__postsynaptic_idx"] _dynamic_array_EC_pyCANtoCA1_inh__synaptic_post = _namespace["_dynamic_array_EC_pyCANtoCA1_inh__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoCA1_inh__synaptic_post = _namespace['_array_EC_pyCANtoCA1_inh__synaptic_post'] cdef int32_t * _array_EC_pyCANtoCA1_inh__synaptic_post = _buf__array_EC_pyCANtoCA1_inh__synaptic_post.data cdef size_t _num_array_EC_pyCANtoCA1_inh__synaptic_post = len(_namespace['_array_EC_pyCANtoCA1_inh__synaptic_post']) cdef int32_t _postsynaptic_idx _var__presynaptic_idx = _namespace["_var__presynaptic_idx"] _dynamic_array_EC_pyCANtoCA1_inh__synaptic_pre = _namespace["_dynamic_array_EC_pyCANtoCA1_inh__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoCA1_inh__synaptic_pre = _namespace['_array_EC_pyCANtoCA1_inh__synaptic_pre'] cdef int32_t * _array_EC_pyCANtoCA1_inh__synaptic_pre = _buf__array_EC_pyCANtoCA1_inh__synaptic_pre.data cdef size_t _num_array_EC_pyCANtoCA1_inh__synaptic_pre = len(_namespace['_array_EC_pyCANtoCA1_inh__synaptic_pre']) cdef int32_t _presynaptic_idx _queue = _namespace["_queue"] _var_glu_pre = _namespace["_var_glu_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_glu = _namespace['_array_EC_pyCAN_glu'] cdef double * _array_EC_pyCAN_glu = _buf__array_EC_pyCAN_glu.data cdef size_t _num_array_EC_pyCAN_glu = len(_namespace['_array_EC_pyCAN_glu']) cdef double glu_pre _var_he_ext_post = _namespace["_var_he_ext_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_he_ext = _namespace['_array_CA1_inh_he_ext'] cdef double * _array_CA1_inh_he_ext = _buf__array_CA1_inh_he_ext.data cdef size_t _num_array_CA1_inh_he_ext = len(_namespace['_array_CA1_inh_he_ext']) cdef double he_ext_post _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] cdef double _lio_1 if '_owner' in _namespace: _owner = _namespace['_owner'] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _spiking_synapses = _queue.peek() # scalar code _vectorisation_idx = 1 _lio_1 = 2e-11 * siemens cdef size_t _spiking_synapse_idx for _spiking_synapse_idx in range(len(_spiking_synapses)): # vector code _idx = _spiking_synapses[_spiking_synapse_idx] _vectorisation_idx = _idx _postsynaptic_idx = _array_EC_pyCANtoCA1_inh__synaptic_post[_idx] _presynaptic_idx = _array_EC_pyCANtoCA1_inh__synaptic_pre[_idx] he_ext_post = _array_CA1_inh_he_ext[_postsynaptic_idx] glu_pre = _array_EC_pyCAN_glu[_presynaptic_idx] he_ext_post += _lio_1 * glu_pre _array_CA1_inh_he_ext[_postsynaptic_idx] = he_ext_post # Advance the spike queue _queue.advance() before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var__postsynaptic_idx = _namespace["_var__postsynaptic_idx"] _dynamic_array_EC_pyCANtoCA1_inh__synaptic_post = _namespace["_dynamic_array_EC_pyCANtoCA1_inh__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoCA1_inh__synaptic_post = _namespace['_array_EC_pyCANtoCA1_inh__synaptic_post'] cdef int32_t * _array_EC_pyCANtoCA1_inh__synaptic_post = _buf__array_EC_pyCANtoCA1_inh__synaptic_post.data cdef size_t _num_array_EC_pyCANtoCA1_inh__synaptic_post = len(_namespace['_array_EC_pyCANtoCA1_inh__synaptic_post']) cdef int32_t _postsynaptic_idx _var__presynaptic_idx = _namespace["_var__presynaptic_idx"] _dynamic_array_EC_pyCANtoCA1_inh__synaptic_pre = _namespace["_dynamic_array_EC_pyCANtoCA1_inh__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoCA1_inh__synaptic_pre = _namespace['_array_EC_pyCANtoCA1_inh__synaptic_pre'] cdef int32_t * _array_EC_pyCANtoCA1_inh__synaptic_pre = _buf__array_EC_pyCANtoCA1_inh__synaptic_pre.data cdef size_t _num_array_EC_pyCANtoCA1_inh__synaptic_pre = len(_namespace['_array_EC_pyCANtoCA1_inh__synaptic_pre']) cdef int32_t _presynaptic_idx _queue = _namespace["_queue"] _var_glu_pre = _namespace["_var_glu_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_glu = _namespace['_array_EC_pyCAN_glu'] cdef double * _array_EC_pyCAN_glu = _buf__array_EC_pyCAN_glu.data cdef size_t _num_array_EC_pyCAN_glu = len(_namespace['_array_EC_pyCAN_glu']) cdef double glu_pre _var_he_ext_post = _namespace["_var_he_ext_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_he_ext = _namespace['_array_CA1_inh_he_ext'] cdef double * _array_CA1_inh_he_ext = _buf__array_CA1_inh_he_ext.data cdef size_t _num_array_CA1_inh_he_ext = len(_namespace['_array_CA1_inh_he_ext']) cdef double he_ext_post _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] cdef double _lio_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var__postsynaptic_idx = _namespace["_var__postsynaptic_idx"] _dynamic_array_EC_pyCANtoCA1_inh__synaptic_post = _namespace["_dynamic_array_EC_pyCANtoCA1_inh__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoCA1_inh__synaptic_post = _namespace['_array_EC_pyCANtoCA1_inh__synaptic_post'] cdef int32_t * _array_EC_pyCANtoCA1_inh__synaptic_post = _buf__array_EC_pyCANtoCA1_inh__synaptic_post.data cdef size_t _num_array_EC_pyCANtoCA1_inh__synaptic_post = len(_namespace['_array_EC_pyCANtoCA1_inh__synaptic_post']) cdef int32_t _postsynaptic_idx _var__presynaptic_idx = _namespace["_var__presynaptic_idx"] _dynamic_array_EC_pyCANtoCA1_inh__synaptic_pre = _namespace["_dynamic_array_EC_pyCANtoCA1_inh__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoCA1_inh__synaptic_pre = _namespace['_array_EC_pyCANtoCA1_inh__synaptic_pre'] cdef int32_t * _array_EC_pyCANtoCA1_inh__synaptic_pre = _buf__array_EC_pyCANtoCA1_inh__synaptic_pre.data cdef size_t _num_array_EC_pyCANtoCA1_inh__synaptic_pre = len(_namespace['_array_EC_pyCANtoCA1_inh__synaptic_pre']) cdef int32_t _presynaptic_idx _queue = _namespace["_queue"] _var_glu_pre = _namespace["_var_glu_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_glu = _namespace['_array_EC_pyCAN_glu'] cdef double * _array_EC_pyCAN_glu = _buf__array_EC_pyCAN_glu.data cdef size_t _num_array_EC_pyCAN_glu = len(_namespace['_array_EC_pyCAN_glu']) cdef double glu_pre _var_he_ext_post = _namespace["_var_he_ext_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_inh_he_ext = _namespace['_array_CA1_inh_he_ext'] cdef double * _array_CA1_inh_he_ext = _buf__array_CA1_inh_he_ext.data cdef size_t _num_array_CA1_inh_he_ext = len(_namespace['_array_CA1_inh_he_ext']) cdef double he_ext_post _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] cdef double _lio_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:15:28,910 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name EC_pyCANtoCA1_inh_pre_codeobject 2021-11-05 15:15:28,910 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "EC_pyCANtoCA1_inh_synapses" using Cython module "_cython_magic_b01d2dd2e72abf71119938cc3a499da1" 2021-11-05 15:15:28,910 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140606332009008 on /home/nikos/.cython/brian_extensions/_cython_magic_b01d2dd2e72abf71119938cc3a499da1.lock 2021-11-05 15:15:28,910 DEBUG brian2.utils.filelock: Lock 140606332009008 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_b01d2dd2e72abf71119938cc3a499da1.lock 2021-11-05 15:15:28,910 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140606332009008 on /home/nikos/.cython/brian_extensions/_cython_magic_b01d2dd2e72abf71119938cc3a499da1.lock 2021-11-05 15:15:28,911 DEBUG brian2.utils.filelock: Lock 140606332009008 released on /home/nikos/.cython/brian_extensions/_cython_magic_b01d2dd2e72abf71119938cc3a499da1.lock 2021-11-05 15:15:28,914 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=EC_pyCANtoCA1_pyCAN_pre, template name=synapses_push_spikes) for abstract code: 2021-11-05 15:15:28,929 DIAGNOSTIC brian2.devices.device: EC_pyCANtoCA1_pyCAN_pre_push_spikes abstract code: 2021-11-05 15:15:28,930 DIAGNOSTIC brian2.devices.device: EC_pyCANtoCA1_pyCAN_pre_push_spikes snippet (scalar): 2021-11-05 15:15:28,930 DIAGNOSTIC brian2.devices.device: EC_pyCANtoCA1_pyCAN_pre_push_spikes snippet (vector): 2021-11-05 15:15:28,930 DIAGNOSTIC brian2.devices.device: EC_pyCANtoCA1_pyCAN_pre_push_spikes code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCAN__spikespace = _namespace['_array_EC_pyCAN__spikespace'] cdef int32_t * _array_EC_pyCAN__spikespace = _buf__array_EC_pyCAN__spikespace.data cdef size_t _num_array_EC_pyCAN__spikespace = len(_namespace['_array_EC_pyCAN__spikespace']) cdef int32_t _spikespace if '_owner' in _namespace: _owner = _namespace['_owner'] _owner.push_spikes() before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCAN__spikespace = _namespace['_array_EC_pyCAN__spikespace'] cdef int32_t * _array_EC_pyCAN__spikespace = _buf__array_EC_pyCAN__spikespace.data cdef size_t _num_array_EC_pyCAN__spikespace = len(_namespace['_array_EC_pyCAN__spikespace']) cdef int32_t _spikespace if '_owner' in _namespace: _owner = _namespace['_owner'] _owner.initialise_queue() after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCAN__spikespace = _namespace['_array_EC_pyCAN__spikespace'] cdef int32_t * _array_EC_pyCAN__spikespace = _buf__array_EC_pyCAN__spikespace.data cdef size_t _num_array_EC_pyCAN__spikespace = len(_namespace['_array_EC_pyCAN__spikespace']) cdef int32_t _spikespace if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:15:28,930 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name EC_pyCANtoCA1_pyCAN_pre_push_spikes 2021-11-05 15:15:28,930 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=EC_pyCANtoCA1_pyCAN, template name=synapses) for abstract code: he_ext_post+=0.3333333333333333*6e-11*siemens*glu_pre 2021-11-05 15:15:28,955 DIAGNOSTIC brian2.devices.device: EC_pyCANtoCA1_pyCAN_pre_codeobject abstract code: he_ext_post+=0.3333333333333333*6e-11*siemens*glu_pre 2021-11-05 15:15:28,956 DIAGNOSTIC brian2.devices.device: EC_pyCANtoCA1_pyCAN_pre_codeobject snippet (scalar): _lio_1 = 2e-11 * siemens 2021-11-05 15:15:28,956 DIAGNOSTIC brian2.devices.device: EC_pyCANtoCA1_pyCAN_pre_codeobject snippet (vector): _postsynaptic_idx = _array_EC_pyCANtoCA1_pyCAN__synaptic_post[_idx] _presynaptic_idx = _array_EC_pyCANtoCA1_pyCAN__synaptic_pre[_idx] he_ext_post = _array_CA1_pyCAN_he_ext[_postsynaptic_idx] glu_pre = _array_EC_pyCAN_glu[_presynaptic_idx] he_ext_post += _lio_1 * glu_pre _array_CA1_pyCAN_he_ext[_postsynaptic_idx] = he_ext_post 2021-11-05 15:15:28,956 DIAGNOSTIC brian2.devices.device: EC_pyCANtoCA1_pyCAN_pre_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var__postsynaptic_idx = _namespace["_var__postsynaptic_idx"] _dynamic_array_EC_pyCANtoCA1_pyCAN__synaptic_post = _namespace["_dynamic_array_EC_pyCANtoCA1_pyCAN__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoCA1_pyCAN__synaptic_post = _namespace['_array_EC_pyCANtoCA1_pyCAN__synaptic_post'] cdef int32_t * _array_EC_pyCANtoCA1_pyCAN__synaptic_post = _buf__array_EC_pyCANtoCA1_pyCAN__synaptic_post.data cdef size_t _num_array_EC_pyCANtoCA1_pyCAN__synaptic_post = len(_namespace['_array_EC_pyCANtoCA1_pyCAN__synaptic_post']) cdef int32_t _postsynaptic_idx _var__presynaptic_idx = _namespace["_var__presynaptic_idx"] _dynamic_array_EC_pyCANtoCA1_pyCAN__synaptic_pre = _namespace["_dynamic_array_EC_pyCANtoCA1_pyCAN__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoCA1_pyCAN__synaptic_pre = _namespace['_array_EC_pyCANtoCA1_pyCAN__synaptic_pre'] cdef int32_t * _array_EC_pyCANtoCA1_pyCAN__synaptic_pre = _buf__array_EC_pyCANtoCA1_pyCAN__synaptic_pre.data cdef size_t _num_array_EC_pyCANtoCA1_pyCAN__synaptic_pre = len(_namespace['_array_EC_pyCANtoCA1_pyCAN__synaptic_pre']) cdef int32_t _presynaptic_idx _queue = _namespace["_queue"] _var_glu_pre = _namespace["_var_glu_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_glu = _namespace['_array_EC_pyCAN_glu'] cdef double * _array_EC_pyCAN_glu = _buf__array_EC_pyCAN_glu.data cdef size_t _num_array_EC_pyCAN_glu = len(_namespace['_array_EC_pyCAN_glu']) cdef double glu_pre _var_he_ext_post = _namespace["_var_he_ext_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_he_ext = _namespace['_array_CA1_pyCAN_he_ext'] cdef double * _array_CA1_pyCAN_he_ext = _buf__array_CA1_pyCAN_he_ext.data cdef size_t _num_array_CA1_pyCAN_he_ext = len(_namespace['_array_CA1_pyCAN_he_ext']) cdef double he_ext_post _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] cdef double _lio_1 if '_owner' in _namespace: _owner = _namespace['_owner'] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _spiking_synapses = _queue.peek() # scalar code _vectorisation_idx = 1 _lio_1 = 2e-11 * siemens cdef size_t _spiking_synapse_idx for _spiking_synapse_idx in range(len(_spiking_synapses)): # vector code _idx = _spiking_synapses[_spiking_synapse_idx] _vectorisation_idx = _idx _postsynaptic_idx = _array_EC_pyCANtoCA1_pyCAN__synaptic_post[_idx] _presynaptic_idx = _array_EC_pyCANtoCA1_pyCAN__synaptic_pre[_idx] he_ext_post = _array_CA1_pyCAN_he_ext[_postsynaptic_idx] glu_pre = _array_EC_pyCAN_glu[_presynaptic_idx] he_ext_post += _lio_1 * glu_pre _array_CA1_pyCAN_he_ext[_postsynaptic_idx] = he_ext_post # Advance the spike queue _queue.advance() before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var__postsynaptic_idx = _namespace["_var__postsynaptic_idx"] _dynamic_array_EC_pyCANtoCA1_pyCAN__synaptic_post = _namespace["_dynamic_array_EC_pyCANtoCA1_pyCAN__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoCA1_pyCAN__synaptic_post = _namespace['_array_EC_pyCANtoCA1_pyCAN__synaptic_post'] cdef int32_t * _array_EC_pyCANtoCA1_pyCAN__synaptic_post = _buf__array_EC_pyCANtoCA1_pyCAN__synaptic_post.data cdef size_t _num_array_EC_pyCANtoCA1_pyCAN__synaptic_post = len(_namespace['_array_EC_pyCANtoCA1_pyCAN__synaptic_post']) cdef int32_t _postsynaptic_idx _var__presynaptic_idx = _namespace["_var__presynaptic_idx"] _dynamic_array_EC_pyCANtoCA1_pyCAN__synaptic_pre = _namespace["_dynamic_array_EC_pyCANtoCA1_pyCAN__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoCA1_pyCAN__synaptic_pre = _namespace['_array_EC_pyCANtoCA1_pyCAN__synaptic_pre'] cdef int32_t * _array_EC_pyCANtoCA1_pyCAN__synaptic_pre = _buf__array_EC_pyCANtoCA1_pyCAN__synaptic_pre.data cdef size_t _num_array_EC_pyCANtoCA1_pyCAN__synaptic_pre = len(_namespace['_array_EC_pyCANtoCA1_pyCAN__synaptic_pre']) cdef int32_t _presynaptic_idx _queue = _namespace["_queue"] _var_glu_pre = _namespace["_var_glu_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_glu = _namespace['_array_EC_pyCAN_glu'] cdef double * _array_EC_pyCAN_glu = _buf__array_EC_pyCAN_glu.data cdef size_t _num_array_EC_pyCAN_glu = len(_namespace['_array_EC_pyCAN_glu']) cdef double glu_pre _var_he_ext_post = _namespace["_var_he_ext_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_he_ext = _namespace['_array_CA1_pyCAN_he_ext'] cdef double * _array_CA1_pyCAN_he_ext = _buf__array_CA1_pyCAN_he_ext.data cdef size_t _num_array_CA1_pyCAN_he_ext = len(_namespace['_array_CA1_pyCAN_he_ext']) cdef double he_ext_post _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] cdef double _lio_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var__postsynaptic_idx = _namespace["_var__postsynaptic_idx"] _dynamic_array_EC_pyCANtoCA1_pyCAN__synaptic_post = _namespace["_dynamic_array_EC_pyCANtoCA1_pyCAN__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoCA1_pyCAN__synaptic_post = _namespace['_array_EC_pyCANtoCA1_pyCAN__synaptic_post'] cdef int32_t * _array_EC_pyCANtoCA1_pyCAN__synaptic_post = _buf__array_EC_pyCANtoCA1_pyCAN__synaptic_post.data cdef size_t _num_array_EC_pyCANtoCA1_pyCAN__synaptic_post = len(_namespace['_array_EC_pyCANtoCA1_pyCAN__synaptic_post']) cdef int32_t _postsynaptic_idx _var__presynaptic_idx = _namespace["_var__presynaptic_idx"] _dynamic_array_EC_pyCANtoCA1_pyCAN__synaptic_pre = _namespace["_dynamic_array_EC_pyCANtoCA1_pyCAN__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoCA1_pyCAN__synaptic_pre = _namespace['_array_EC_pyCANtoCA1_pyCAN__synaptic_pre'] cdef int32_t * _array_EC_pyCANtoCA1_pyCAN__synaptic_pre = _buf__array_EC_pyCANtoCA1_pyCAN__synaptic_pre.data cdef size_t _num_array_EC_pyCANtoCA1_pyCAN__synaptic_pre = len(_namespace['_array_EC_pyCANtoCA1_pyCAN__synaptic_pre']) cdef int32_t _presynaptic_idx _queue = _namespace["_queue"] _var_glu_pre = _namespace["_var_glu_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_glu = _namespace['_array_EC_pyCAN_glu'] cdef double * _array_EC_pyCAN_glu = _buf__array_EC_pyCAN_glu.data cdef size_t _num_array_EC_pyCAN_glu = len(_namespace['_array_EC_pyCAN_glu']) cdef double glu_pre _var_he_ext_post = _namespace["_var_he_ext_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_he_ext = _namespace['_array_CA1_pyCAN_he_ext'] cdef double * _array_CA1_pyCAN_he_ext = _buf__array_CA1_pyCAN_he_ext.data cdef size_t _num_array_CA1_pyCAN_he_ext = len(_namespace['_array_CA1_pyCAN_he_ext']) cdef double he_ext_post _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] cdef double _lio_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:15:28,956 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name EC_pyCANtoCA1_pyCAN_pre_codeobject 2021-11-05 15:15:28,957 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "EC_pyCANtoCA1_pyCAN_synapses" using Cython module "_cython_magic_cabec2cd7b5df9790c4e679da11fa25b" 2021-11-05 15:15:28,957 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140606332008528 on /home/nikos/.cython/brian_extensions/_cython_magic_cabec2cd7b5df9790c4e679da11fa25b.lock 2021-11-05 15:15:28,957 DEBUG brian2.utils.filelock: Lock 140606332008528 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_cabec2cd7b5df9790c4e679da11fa25b.lock 2021-11-05 15:15:28,957 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140606332008528 on /home/nikos/.cython/brian_extensions/_cython_magic_cabec2cd7b5df9790c4e679da11fa25b.lock 2021-11-05 15:15:28,957 DEBUG brian2.utils.filelock: Lock 140606332008528 released on /home/nikos/.cython/brian_extensions/_cython_magic_cabec2cd7b5df9790c4e679da11fa25b.lock 2021-11-05 15:15:28,975 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=EC_pyCANtoCA3_inh_pre, template name=synapses_push_spikes) for abstract code: 2021-11-05 15:15:28,989 DIAGNOSTIC brian2.devices.device: EC_pyCANtoCA3_inh_pre_push_spikes abstract code: 2021-11-05 15:15:28,989 DIAGNOSTIC brian2.devices.device: EC_pyCANtoCA3_inh_pre_push_spikes snippet (scalar): 2021-11-05 15:15:28,989 DIAGNOSTIC brian2.devices.device: EC_pyCANtoCA3_inh_pre_push_spikes snippet (vector): 2021-11-05 15:15:28,989 DIAGNOSTIC brian2.devices.device: EC_pyCANtoCA3_inh_pre_push_spikes code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCAN__spikespace = _namespace['_array_EC_pyCAN__spikespace'] cdef int32_t * _array_EC_pyCAN__spikespace = _buf__array_EC_pyCAN__spikespace.data cdef size_t _num_array_EC_pyCAN__spikespace = len(_namespace['_array_EC_pyCAN__spikespace']) cdef int32_t _spikespace if '_owner' in _namespace: _owner = _namespace['_owner'] _owner.push_spikes() before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCAN__spikespace = _namespace['_array_EC_pyCAN__spikespace'] cdef int32_t * _array_EC_pyCAN__spikespace = _buf__array_EC_pyCAN__spikespace.data cdef size_t _num_array_EC_pyCAN__spikespace = len(_namespace['_array_EC_pyCAN__spikespace']) cdef int32_t _spikespace if '_owner' in _namespace: _owner = _namespace['_owner'] _owner.initialise_queue() after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCAN__spikespace = _namespace['_array_EC_pyCAN__spikespace'] cdef int32_t * _array_EC_pyCAN__spikespace = _buf__array_EC_pyCAN__spikespace.data cdef size_t _num_array_EC_pyCAN__spikespace = len(_namespace['_array_EC_pyCAN__spikespace']) cdef int32_t _spikespace if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:15:28,989 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name EC_pyCANtoCA3_inh_pre_push_spikes 2021-11-05 15:15:28,990 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=EC_pyCANtoCA3_inh, template name=synapses) for abstract code: he_ext_post+=0.3333333333333333*6e-11*siemens*glu_pre 2021-11-05 15:15:29,011 DIAGNOSTIC brian2.devices.device: EC_pyCANtoCA3_inh_pre_codeobject abstract code: he_ext_post+=0.3333333333333333*6e-11*siemens*glu_pre 2021-11-05 15:15:29,012 DIAGNOSTIC brian2.devices.device: EC_pyCANtoCA3_inh_pre_codeobject snippet (scalar): _lio_1 = 2e-11 * siemens 2021-11-05 15:15:29,012 DIAGNOSTIC brian2.devices.device: EC_pyCANtoCA3_inh_pre_codeobject snippet (vector): _postsynaptic_idx = _array_EC_pyCANtoCA3_inh__synaptic_post[_idx] _presynaptic_idx = _array_EC_pyCANtoCA3_inh__synaptic_pre[_idx] he_ext_post = _array_CA3_inh_he_ext[_postsynaptic_idx] glu_pre = _array_EC_pyCAN_glu[_presynaptic_idx] he_ext_post += _lio_1 * glu_pre _array_CA3_inh_he_ext[_postsynaptic_idx] = he_ext_post 2021-11-05 15:15:29,013 DIAGNOSTIC brian2.devices.device: EC_pyCANtoCA3_inh_pre_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var__postsynaptic_idx = _namespace["_var__postsynaptic_idx"] _dynamic_array_EC_pyCANtoCA3_inh__synaptic_post = _namespace["_dynamic_array_EC_pyCANtoCA3_inh__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoCA3_inh__synaptic_post = _namespace['_array_EC_pyCANtoCA3_inh__synaptic_post'] cdef int32_t * _array_EC_pyCANtoCA3_inh__synaptic_post = _buf__array_EC_pyCANtoCA3_inh__synaptic_post.data cdef size_t _num_array_EC_pyCANtoCA3_inh__synaptic_post = len(_namespace['_array_EC_pyCANtoCA3_inh__synaptic_post']) cdef int32_t _postsynaptic_idx _var__presynaptic_idx = _namespace["_var__presynaptic_idx"] _dynamic_array_EC_pyCANtoCA3_inh__synaptic_pre = _namespace["_dynamic_array_EC_pyCANtoCA3_inh__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoCA3_inh__synaptic_pre = _namespace['_array_EC_pyCANtoCA3_inh__synaptic_pre'] cdef int32_t * _array_EC_pyCANtoCA3_inh__synaptic_pre = _buf__array_EC_pyCANtoCA3_inh__synaptic_pre.data cdef size_t _num_array_EC_pyCANtoCA3_inh__synaptic_pre = len(_namespace['_array_EC_pyCANtoCA3_inh__synaptic_pre']) cdef int32_t _presynaptic_idx _queue = _namespace["_queue"] _var_glu_pre = _namespace["_var_glu_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_glu = _namespace['_array_EC_pyCAN_glu'] cdef double * _array_EC_pyCAN_glu = _buf__array_EC_pyCAN_glu.data cdef size_t _num_array_EC_pyCAN_glu = len(_namespace['_array_EC_pyCAN_glu']) cdef double glu_pre _var_he_ext_post = _namespace["_var_he_ext_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_inh_he_ext = _namespace['_array_CA3_inh_he_ext'] cdef double * _array_CA3_inh_he_ext = _buf__array_CA3_inh_he_ext.data cdef size_t _num_array_CA3_inh_he_ext = len(_namespace['_array_CA3_inh_he_ext']) cdef double he_ext_post _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] cdef double _lio_1 if '_owner' in _namespace: _owner = _namespace['_owner'] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _spiking_synapses = _queue.peek() # scalar code _vectorisation_idx = 1 _lio_1 = 2e-11 * siemens cdef size_t _spiking_synapse_idx for _spiking_synapse_idx in range(len(_spiking_synapses)): # vector code _idx = _spiking_synapses[_spiking_synapse_idx] _vectorisation_idx = _idx _postsynaptic_idx = _array_EC_pyCANtoCA3_inh__synaptic_post[_idx] _presynaptic_idx = _array_EC_pyCANtoCA3_inh__synaptic_pre[_idx] he_ext_post = _array_CA3_inh_he_ext[_postsynaptic_idx] glu_pre = _array_EC_pyCAN_glu[_presynaptic_idx] he_ext_post += _lio_1 * glu_pre _array_CA3_inh_he_ext[_postsynaptic_idx] = he_ext_post # Advance the spike queue _queue.advance() before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var__postsynaptic_idx = _namespace["_var__postsynaptic_idx"] _dynamic_array_EC_pyCANtoCA3_inh__synaptic_post = _namespace["_dynamic_array_EC_pyCANtoCA3_inh__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoCA3_inh__synaptic_post = _namespace['_array_EC_pyCANtoCA3_inh__synaptic_post'] cdef int32_t * _array_EC_pyCANtoCA3_inh__synaptic_post = _buf__array_EC_pyCANtoCA3_inh__synaptic_post.data cdef size_t _num_array_EC_pyCANtoCA3_inh__synaptic_post = len(_namespace['_array_EC_pyCANtoCA3_inh__synaptic_post']) cdef int32_t _postsynaptic_idx _var__presynaptic_idx = _namespace["_var__presynaptic_idx"] _dynamic_array_EC_pyCANtoCA3_inh__synaptic_pre = _namespace["_dynamic_array_EC_pyCANtoCA3_inh__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoCA3_inh__synaptic_pre = _namespace['_array_EC_pyCANtoCA3_inh__synaptic_pre'] cdef int32_t * _array_EC_pyCANtoCA3_inh__synaptic_pre = _buf__array_EC_pyCANtoCA3_inh__synaptic_pre.data cdef size_t _num_array_EC_pyCANtoCA3_inh__synaptic_pre = len(_namespace['_array_EC_pyCANtoCA3_inh__synaptic_pre']) cdef int32_t _presynaptic_idx _queue = _namespace["_queue"] _var_glu_pre = _namespace["_var_glu_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_glu = _namespace['_array_EC_pyCAN_glu'] cdef double * _array_EC_pyCAN_glu = _buf__array_EC_pyCAN_glu.data cdef size_t _num_array_EC_pyCAN_glu = len(_namespace['_array_EC_pyCAN_glu']) cdef double glu_pre _var_he_ext_post = _namespace["_var_he_ext_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_inh_he_ext = _namespace['_array_CA3_inh_he_ext'] cdef double * _array_CA3_inh_he_ext = _buf__array_CA3_inh_he_ext.data cdef size_t _num_array_CA3_inh_he_ext = len(_namespace['_array_CA3_inh_he_ext']) cdef double he_ext_post _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] cdef double _lio_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var__postsynaptic_idx = _namespace["_var__postsynaptic_idx"] _dynamic_array_EC_pyCANtoCA3_inh__synaptic_post = _namespace["_dynamic_array_EC_pyCANtoCA3_inh__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoCA3_inh__synaptic_post = _namespace['_array_EC_pyCANtoCA3_inh__synaptic_post'] cdef int32_t * _array_EC_pyCANtoCA3_inh__synaptic_post = _buf__array_EC_pyCANtoCA3_inh__synaptic_post.data cdef size_t _num_array_EC_pyCANtoCA3_inh__synaptic_post = len(_namespace['_array_EC_pyCANtoCA3_inh__synaptic_post']) cdef int32_t _postsynaptic_idx _var__presynaptic_idx = _namespace["_var__presynaptic_idx"] _dynamic_array_EC_pyCANtoCA3_inh__synaptic_pre = _namespace["_dynamic_array_EC_pyCANtoCA3_inh__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoCA3_inh__synaptic_pre = _namespace['_array_EC_pyCANtoCA3_inh__synaptic_pre'] cdef int32_t * _array_EC_pyCANtoCA3_inh__synaptic_pre = _buf__array_EC_pyCANtoCA3_inh__synaptic_pre.data cdef size_t _num_array_EC_pyCANtoCA3_inh__synaptic_pre = len(_namespace['_array_EC_pyCANtoCA3_inh__synaptic_pre']) cdef int32_t _presynaptic_idx _queue = _namespace["_queue"] _var_glu_pre = _namespace["_var_glu_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_glu = _namespace['_array_EC_pyCAN_glu'] cdef double * _array_EC_pyCAN_glu = _buf__array_EC_pyCAN_glu.data cdef size_t _num_array_EC_pyCAN_glu = len(_namespace['_array_EC_pyCAN_glu']) cdef double glu_pre _var_he_ext_post = _namespace["_var_he_ext_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_inh_he_ext = _namespace['_array_CA3_inh_he_ext'] cdef double * _array_CA3_inh_he_ext = _buf__array_CA3_inh_he_ext.data cdef size_t _num_array_CA3_inh_he_ext = len(_namespace['_array_CA3_inh_he_ext']) cdef double he_ext_post _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] cdef double _lio_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:15:29,013 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name EC_pyCANtoCA3_inh_pre_codeobject 2021-11-05 15:15:29,013 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "EC_pyCANtoCA3_inh_synapses" using Cython module "_cython_magic_2b3a5c933d9c5afc85c7645750ab4a64" 2021-11-05 15:15:29,013 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140606332008768 on /home/nikos/.cython/brian_extensions/_cython_magic_2b3a5c933d9c5afc85c7645750ab4a64.lock 2021-11-05 15:15:29,013 DEBUG brian2.utils.filelock: Lock 140606332008768 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_2b3a5c933d9c5afc85c7645750ab4a64.lock 2021-11-05 15:15:29,013 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140606332008768 on /home/nikos/.cython/brian_extensions/_cython_magic_2b3a5c933d9c5afc85c7645750ab4a64.lock 2021-11-05 15:15:29,014 DEBUG brian2.utils.filelock: Lock 140606332008768 released on /home/nikos/.cython/brian_extensions/_cython_magic_2b3a5c933d9c5afc85c7645750ab4a64.lock 2021-11-05 15:15:29,014 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=EC_pyCANtoCA3_pyCAN_pre, template name=synapses_push_spikes) for abstract code: 2021-11-05 15:15:29,030 DIAGNOSTIC brian2.devices.device: EC_pyCANtoCA3_pyCAN_pre_push_spikes abstract code: 2021-11-05 15:15:29,030 DIAGNOSTIC brian2.devices.device: EC_pyCANtoCA3_pyCAN_pre_push_spikes snippet (scalar): 2021-11-05 15:15:29,030 DIAGNOSTIC brian2.devices.device: EC_pyCANtoCA3_pyCAN_pre_push_spikes snippet (vector): 2021-11-05 15:15:29,031 DIAGNOSTIC brian2.devices.device: EC_pyCANtoCA3_pyCAN_pre_push_spikes code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCAN__spikespace = _namespace['_array_EC_pyCAN__spikespace'] cdef int32_t * _array_EC_pyCAN__spikespace = _buf__array_EC_pyCAN__spikespace.data cdef size_t _num_array_EC_pyCAN__spikespace = len(_namespace['_array_EC_pyCAN__spikespace']) cdef int32_t _spikespace if '_owner' in _namespace: _owner = _namespace['_owner'] _owner.push_spikes() before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCAN__spikespace = _namespace['_array_EC_pyCAN__spikespace'] cdef int32_t * _array_EC_pyCAN__spikespace = _buf__array_EC_pyCAN__spikespace.data cdef size_t _num_array_EC_pyCAN__spikespace = len(_namespace['_array_EC_pyCAN__spikespace']) cdef int32_t _spikespace if '_owner' in _namespace: _owner = _namespace['_owner'] _owner.initialise_queue() after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCAN__spikespace = _namespace['_array_EC_pyCAN__spikespace'] cdef int32_t * _array_EC_pyCAN__spikespace = _buf__array_EC_pyCAN__spikespace.data cdef size_t _num_array_EC_pyCAN__spikespace = len(_namespace['_array_EC_pyCAN__spikespace']) cdef int32_t _spikespace if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:15:29,031 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name EC_pyCANtoCA3_pyCAN_pre_push_spikes 2021-11-05 15:15:29,031 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=EC_pyCANtoCA3_pyCAN, template name=synapses) for abstract code: he_ext_post+=0.3333333333333333*6e-11*siemens*glu_pre 2021-11-05 15:15:29,056 DIAGNOSTIC brian2.devices.device: EC_pyCANtoCA3_pyCAN_pre_codeobject abstract code: he_ext_post+=0.3333333333333333*6e-11*siemens*glu_pre 2021-11-05 15:15:29,056 DIAGNOSTIC brian2.devices.device: EC_pyCANtoCA3_pyCAN_pre_codeobject snippet (scalar): _lio_1 = 2e-11 * siemens 2021-11-05 15:15:29,056 DIAGNOSTIC brian2.devices.device: EC_pyCANtoCA3_pyCAN_pre_codeobject snippet (vector): _postsynaptic_idx = _array_EC_pyCANtoCA3_pyCAN__synaptic_post[_idx] _presynaptic_idx = _array_EC_pyCANtoCA3_pyCAN__synaptic_pre[_idx] he_ext_post = _array_CA3_pyCAN_he_ext[_postsynaptic_idx] glu_pre = _array_EC_pyCAN_glu[_presynaptic_idx] he_ext_post += _lio_1 * glu_pre _array_CA3_pyCAN_he_ext[_postsynaptic_idx] = he_ext_post 2021-11-05 15:15:29,056 DIAGNOSTIC brian2.devices.device: EC_pyCANtoCA3_pyCAN_pre_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var__postsynaptic_idx = _namespace["_var__postsynaptic_idx"] _dynamic_array_EC_pyCANtoCA3_pyCAN__synaptic_post = _namespace["_dynamic_array_EC_pyCANtoCA3_pyCAN__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoCA3_pyCAN__synaptic_post = _namespace['_array_EC_pyCANtoCA3_pyCAN__synaptic_post'] cdef int32_t * _array_EC_pyCANtoCA3_pyCAN__synaptic_post = _buf__array_EC_pyCANtoCA3_pyCAN__synaptic_post.data cdef size_t _num_array_EC_pyCANtoCA3_pyCAN__synaptic_post = len(_namespace['_array_EC_pyCANtoCA3_pyCAN__synaptic_post']) cdef int32_t _postsynaptic_idx _var__presynaptic_idx = _namespace["_var__presynaptic_idx"] _dynamic_array_EC_pyCANtoCA3_pyCAN__synaptic_pre = _namespace["_dynamic_array_EC_pyCANtoCA3_pyCAN__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoCA3_pyCAN__synaptic_pre = _namespace['_array_EC_pyCANtoCA3_pyCAN__synaptic_pre'] cdef int32_t * _array_EC_pyCANtoCA3_pyCAN__synaptic_pre = _buf__array_EC_pyCANtoCA3_pyCAN__synaptic_pre.data cdef size_t _num_array_EC_pyCANtoCA3_pyCAN__synaptic_pre = len(_namespace['_array_EC_pyCANtoCA3_pyCAN__synaptic_pre']) cdef int32_t _presynaptic_idx _queue = _namespace["_queue"] _var_glu_pre = _namespace["_var_glu_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_glu = _namespace['_array_EC_pyCAN_glu'] cdef double * _array_EC_pyCAN_glu = _buf__array_EC_pyCAN_glu.data cdef size_t _num_array_EC_pyCAN_glu = len(_namespace['_array_EC_pyCAN_glu']) cdef double glu_pre _var_he_ext_post = _namespace["_var_he_ext_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_he_ext = _namespace['_array_CA3_pyCAN_he_ext'] cdef double * _array_CA3_pyCAN_he_ext = _buf__array_CA3_pyCAN_he_ext.data cdef size_t _num_array_CA3_pyCAN_he_ext = len(_namespace['_array_CA3_pyCAN_he_ext']) cdef double he_ext_post _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] cdef double _lio_1 if '_owner' in _namespace: _owner = _namespace['_owner'] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _spiking_synapses = _queue.peek() # scalar code _vectorisation_idx = 1 _lio_1 = 2e-11 * siemens cdef size_t _spiking_synapse_idx for _spiking_synapse_idx in range(len(_spiking_synapses)): # vector code _idx = _spiking_synapses[_spiking_synapse_idx] _vectorisation_idx = _idx _postsynaptic_idx = _array_EC_pyCANtoCA3_pyCAN__synaptic_post[_idx] _presynaptic_idx = _array_EC_pyCANtoCA3_pyCAN__synaptic_pre[_idx] he_ext_post = _array_CA3_pyCAN_he_ext[_postsynaptic_idx] glu_pre = _array_EC_pyCAN_glu[_presynaptic_idx] he_ext_post += _lio_1 * glu_pre _array_CA3_pyCAN_he_ext[_postsynaptic_idx] = he_ext_post # Advance the spike queue _queue.advance() before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var__postsynaptic_idx = _namespace["_var__postsynaptic_idx"] _dynamic_array_EC_pyCANtoCA3_pyCAN__synaptic_post = _namespace["_dynamic_array_EC_pyCANtoCA3_pyCAN__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoCA3_pyCAN__synaptic_post = _namespace['_array_EC_pyCANtoCA3_pyCAN__synaptic_post'] cdef int32_t * _array_EC_pyCANtoCA3_pyCAN__synaptic_post = _buf__array_EC_pyCANtoCA3_pyCAN__synaptic_post.data cdef size_t _num_array_EC_pyCANtoCA3_pyCAN__synaptic_post = len(_namespace['_array_EC_pyCANtoCA3_pyCAN__synaptic_post']) cdef int32_t _postsynaptic_idx _var__presynaptic_idx = _namespace["_var__presynaptic_idx"] _dynamic_array_EC_pyCANtoCA3_pyCAN__synaptic_pre = _namespace["_dynamic_array_EC_pyCANtoCA3_pyCAN__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoCA3_pyCAN__synaptic_pre = _namespace['_array_EC_pyCANtoCA3_pyCAN__synaptic_pre'] cdef int32_t * _array_EC_pyCANtoCA3_pyCAN__synaptic_pre = _buf__array_EC_pyCANtoCA3_pyCAN__synaptic_pre.data cdef size_t _num_array_EC_pyCANtoCA3_pyCAN__synaptic_pre = len(_namespace['_array_EC_pyCANtoCA3_pyCAN__synaptic_pre']) cdef int32_t _presynaptic_idx _queue = _namespace["_queue"] _var_glu_pre = _namespace["_var_glu_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_glu = _namespace['_array_EC_pyCAN_glu'] cdef double * _array_EC_pyCAN_glu = _buf__array_EC_pyCAN_glu.data cdef size_t _num_array_EC_pyCAN_glu = len(_namespace['_array_EC_pyCAN_glu']) cdef double glu_pre _var_he_ext_post = _namespace["_var_he_ext_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_he_ext = _namespace['_array_CA3_pyCAN_he_ext'] cdef double * _array_CA3_pyCAN_he_ext = _buf__array_CA3_pyCAN_he_ext.data cdef size_t _num_array_CA3_pyCAN_he_ext = len(_namespace['_array_CA3_pyCAN_he_ext']) cdef double he_ext_post _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] cdef double _lio_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var__postsynaptic_idx = _namespace["_var__postsynaptic_idx"] _dynamic_array_EC_pyCANtoCA3_pyCAN__synaptic_post = _namespace["_dynamic_array_EC_pyCANtoCA3_pyCAN__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoCA3_pyCAN__synaptic_post = _namespace['_array_EC_pyCANtoCA3_pyCAN__synaptic_post'] cdef int32_t * _array_EC_pyCANtoCA3_pyCAN__synaptic_post = _buf__array_EC_pyCANtoCA3_pyCAN__synaptic_post.data cdef size_t _num_array_EC_pyCANtoCA3_pyCAN__synaptic_post = len(_namespace['_array_EC_pyCANtoCA3_pyCAN__synaptic_post']) cdef int32_t _postsynaptic_idx _var__presynaptic_idx = _namespace["_var__presynaptic_idx"] _dynamic_array_EC_pyCANtoCA3_pyCAN__synaptic_pre = _namespace["_dynamic_array_EC_pyCANtoCA3_pyCAN__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoCA3_pyCAN__synaptic_pre = _namespace['_array_EC_pyCANtoCA3_pyCAN__synaptic_pre'] cdef int32_t * _array_EC_pyCANtoCA3_pyCAN__synaptic_pre = _buf__array_EC_pyCANtoCA3_pyCAN__synaptic_pre.data cdef size_t _num_array_EC_pyCANtoCA3_pyCAN__synaptic_pre = len(_namespace['_array_EC_pyCANtoCA3_pyCAN__synaptic_pre']) cdef int32_t _presynaptic_idx _queue = _namespace["_queue"] _var_glu_pre = _namespace["_var_glu_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_glu = _namespace['_array_EC_pyCAN_glu'] cdef double * _array_EC_pyCAN_glu = _buf__array_EC_pyCAN_glu.data cdef size_t _num_array_EC_pyCAN_glu = len(_namespace['_array_EC_pyCAN_glu']) cdef double glu_pre _var_he_ext_post = _namespace["_var_he_ext_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_he_ext = _namespace['_array_CA3_pyCAN_he_ext'] cdef double * _array_CA3_pyCAN_he_ext = _buf__array_CA3_pyCAN_he_ext.data cdef size_t _num_array_CA3_pyCAN_he_ext = len(_namespace['_array_CA3_pyCAN_he_ext']) cdef double he_ext_post _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] cdef double _lio_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:15:29,056 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name EC_pyCANtoCA3_pyCAN_pre_codeobject 2021-11-05 15:15:29,057 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "EC_pyCANtoCA3_pyCAN_synapses" using Cython module "_cython_magic_2c7879524df64524cecc378e5319798c" 2021-11-05 15:15:29,057 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140606333372448 on /home/nikos/.cython/brian_extensions/_cython_magic_2c7879524df64524cecc378e5319798c.lock 2021-11-05 15:15:29,057 DEBUG brian2.utils.filelock: Lock 140606333372448 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_2c7879524df64524cecc378e5319798c.lock 2021-11-05 15:15:29,057 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140606333372448 on /home/nikos/.cython/brian_extensions/_cython_magic_2c7879524df64524cecc378e5319798c.lock 2021-11-05 15:15:29,057 DEBUG brian2.utils.filelock: Lock 140606333372448 released on /home/nikos/.cython/brian_extensions/_cython_magic_2c7879524df64524cecc378e5319798c.lock 2021-11-05 15:15:29,060 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=EC_pyCANtoDG_inh_pre, template name=synapses_push_spikes) for abstract code: 2021-11-05 15:15:29,074 DIAGNOSTIC brian2.devices.device: EC_pyCANtoDG_inh_pre_push_spikes abstract code: 2021-11-05 15:15:29,074 DIAGNOSTIC brian2.devices.device: EC_pyCANtoDG_inh_pre_push_spikes snippet (scalar): 2021-11-05 15:15:29,074 DIAGNOSTIC brian2.devices.device: EC_pyCANtoDG_inh_pre_push_spikes snippet (vector): 2021-11-05 15:15:29,074 DIAGNOSTIC brian2.devices.device: EC_pyCANtoDG_inh_pre_push_spikes code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCAN__spikespace = _namespace['_array_EC_pyCAN__spikespace'] cdef int32_t * _array_EC_pyCAN__spikespace = _buf__array_EC_pyCAN__spikespace.data cdef size_t _num_array_EC_pyCAN__spikespace = len(_namespace['_array_EC_pyCAN__spikespace']) cdef int32_t _spikespace if '_owner' in _namespace: _owner = _namespace['_owner'] _owner.push_spikes() before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCAN__spikespace = _namespace['_array_EC_pyCAN__spikespace'] cdef int32_t * _array_EC_pyCAN__spikespace = _buf__array_EC_pyCAN__spikespace.data cdef size_t _num_array_EC_pyCAN__spikespace = len(_namespace['_array_EC_pyCAN__spikespace']) cdef int32_t _spikespace if '_owner' in _namespace: _owner = _namespace['_owner'] _owner.initialise_queue() after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCAN__spikespace = _namespace['_array_EC_pyCAN__spikespace'] cdef int32_t * _array_EC_pyCAN__spikespace = _buf__array_EC_pyCAN__spikespace.data cdef size_t _num_array_EC_pyCAN__spikespace = len(_namespace['_array_EC_pyCAN__spikespace']) cdef int32_t _spikespace if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:15:29,074 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name EC_pyCANtoDG_inh_pre_push_spikes 2021-11-05 15:15:29,074 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=EC_pyCANtoDG_inh, template name=synapses) for abstract code: he_ext_post+=0.3333333333333333*6e-11*siemens*glu_pre 2021-11-05 15:15:29,096 DIAGNOSTIC brian2.devices.device: EC_pyCANtoDG_inh_pre_codeobject abstract code: he_ext_post+=0.3333333333333333*6e-11*siemens*glu_pre 2021-11-05 15:15:29,097 DIAGNOSTIC brian2.devices.device: EC_pyCANtoDG_inh_pre_codeobject snippet (scalar): _lio_1 = 2e-11 * siemens 2021-11-05 15:15:29,097 DIAGNOSTIC brian2.devices.device: EC_pyCANtoDG_inh_pre_codeobject snippet (vector): _postsynaptic_idx = _array_EC_pyCANtoDG_inh__synaptic_post[_idx] _presynaptic_idx = _array_EC_pyCANtoDG_inh__synaptic_pre[_idx] he_ext_post = _array_DG_inh_he_ext[_postsynaptic_idx] glu_pre = _array_EC_pyCAN_glu[_presynaptic_idx] he_ext_post += _lio_1 * glu_pre _array_DG_inh_he_ext[_postsynaptic_idx] = he_ext_post 2021-11-05 15:15:29,097 DIAGNOSTIC brian2.devices.device: EC_pyCANtoDG_inh_pre_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var__postsynaptic_idx = _namespace["_var__postsynaptic_idx"] _dynamic_array_EC_pyCANtoDG_inh__synaptic_post = _namespace["_dynamic_array_EC_pyCANtoDG_inh__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoDG_inh__synaptic_post = _namespace['_array_EC_pyCANtoDG_inh__synaptic_post'] cdef int32_t * _array_EC_pyCANtoDG_inh__synaptic_post = _buf__array_EC_pyCANtoDG_inh__synaptic_post.data cdef size_t _num_array_EC_pyCANtoDG_inh__synaptic_post = len(_namespace['_array_EC_pyCANtoDG_inh__synaptic_post']) cdef int32_t _postsynaptic_idx _var__presynaptic_idx = _namespace["_var__presynaptic_idx"] _dynamic_array_EC_pyCANtoDG_inh__synaptic_pre = _namespace["_dynamic_array_EC_pyCANtoDG_inh__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoDG_inh__synaptic_pre = _namespace['_array_EC_pyCANtoDG_inh__synaptic_pre'] cdef int32_t * _array_EC_pyCANtoDG_inh__synaptic_pre = _buf__array_EC_pyCANtoDG_inh__synaptic_pre.data cdef size_t _num_array_EC_pyCANtoDG_inh__synaptic_pre = len(_namespace['_array_EC_pyCANtoDG_inh__synaptic_pre']) cdef int32_t _presynaptic_idx _queue = _namespace["_queue"] _var_glu_pre = _namespace["_var_glu_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_glu = _namespace['_array_EC_pyCAN_glu'] cdef double * _array_EC_pyCAN_glu = _buf__array_EC_pyCAN_glu.data cdef size_t _num_array_EC_pyCAN_glu = len(_namespace['_array_EC_pyCAN_glu']) cdef double glu_pre _var_he_ext_post = _namespace["_var_he_ext_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_inh_he_ext = _namespace['_array_DG_inh_he_ext'] cdef double * _array_DG_inh_he_ext = _buf__array_DG_inh_he_ext.data cdef size_t _num_array_DG_inh_he_ext = len(_namespace['_array_DG_inh_he_ext']) cdef double he_ext_post _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] cdef double _lio_1 if '_owner' in _namespace: _owner = _namespace['_owner'] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _spiking_synapses = _queue.peek() # scalar code _vectorisation_idx = 1 _lio_1 = 2e-11 * siemens cdef size_t _spiking_synapse_idx for _spiking_synapse_idx in range(len(_spiking_synapses)): # vector code _idx = _spiking_synapses[_spiking_synapse_idx] _vectorisation_idx = _idx _postsynaptic_idx = _array_EC_pyCANtoDG_inh__synaptic_post[_idx] _presynaptic_idx = _array_EC_pyCANtoDG_inh__synaptic_pre[_idx] he_ext_post = _array_DG_inh_he_ext[_postsynaptic_idx] glu_pre = _array_EC_pyCAN_glu[_presynaptic_idx] he_ext_post += _lio_1 * glu_pre _array_DG_inh_he_ext[_postsynaptic_idx] = he_ext_post # Advance the spike queue _queue.advance() before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var__postsynaptic_idx = _namespace["_var__postsynaptic_idx"] _dynamic_array_EC_pyCANtoDG_inh__synaptic_post = _namespace["_dynamic_array_EC_pyCANtoDG_inh__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoDG_inh__synaptic_post = _namespace['_array_EC_pyCANtoDG_inh__synaptic_post'] cdef int32_t * _array_EC_pyCANtoDG_inh__synaptic_post = _buf__array_EC_pyCANtoDG_inh__synaptic_post.data cdef size_t _num_array_EC_pyCANtoDG_inh__synaptic_post = len(_namespace['_array_EC_pyCANtoDG_inh__synaptic_post']) cdef int32_t _postsynaptic_idx _var__presynaptic_idx = _namespace["_var__presynaptic_idx"] _dynamic_array_EC_pyCANtoDG_inh__synaptic_pre = _namespace["_dynamic_array_EC_pyCANtoDG_inh__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoDG_inh__synaptic_pre = _namespace['_array_EC_pyCANtoDG_inh__synaptic_pre'] cdef int32_t * _array_EC_pyCANtoDG_inh__synaptic_pre = _buf__array_EC_pyCANtoDG_inh__synaptic_pre.data cdef size_t _num_array_EC_pyCANtoDG_inh__synaptic_pre = len(_namespace['_array_EC_pyCANtoDG_inh__synaptic_pre']) cdef int32_t _presynaptic_idx _queue = _namespace["_queue"] _var_glu_pre = _namespace["_var_glu_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_glu = _namespace['_array_EC_pyCAN_glu'] cdef double * _array_EC_pyCAN_glu = _buf__array_EC_pyCAN_glu.data cdef size_t _num_array_EC_pyCAN_glu = len(_namespace['_array_EC_pyCAN_glu']) cdef double glu_pre _var_he_ext_post = _namespace["_var_he_ext_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_inh_he_ext = _namespace['_array_DG_inh_he_ext'] cdef double * _array_DG_inh_he_ext = _buf__array_DG_inh_he_ext.data cdef size_t _num_array_DG_inh_he_ext = len(_namespace['_array_DG_inh_he_ext']) cdef double he_ext_post _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] cdef double _lio_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var__postsynaptic_idx = _namespace["_var__postsynaptic_idx"] _dynamic_array_EC_pyCANtoDG_inh__synaptic_post = _namespace["_dynamic_array_EC_pyCANtoDG_inh__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoDG_inh__synaptic_post = _namespace['_array_EC_pyCANtoDG_inh__synaptic_post'] cdef int32_t * _array_EC_pyCANtoDG_inh__synaptic_post = _buf__array_EC_pyCANtoDG_inh__synaptic_post.data cdef size_t _num_array_EC_pyCANtoDG_inh__synaptic_post = len(_namespace['_array_EC_pyCANtoDG_inh__synaptic_post']) cdef int32_t _postsynaptic_idx _var__presynaptic_idx = _namespace["_var__presynaptic_idx"] _dynamic_array_EC_pyCANtoDG_inh__synaptic_pre = _namespace["_dynamic_array_EC_pyCANtoDG_inh__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoDG_inh__synaptic_pre = _namespace['_array_EC_pyCANtoDG_inh__synaptic_pre'] cdef int32_t * _array_EC_pyCANtoDG_inh__synaptic_pre = _buf__array_EC_pyCANtoDG_inh__synaptic_pre.data cdef size_t _num_array_EC_pyCANtoDG_inh__synaptic_pre = len(_namespace['_array_EC_pyCANtoDG_inh__synaptic_pre']) cdef int32_t _presynaptic_idx _queue = _namespace["_queue"] _var_glu_pre = _namespace["_var_glu_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_glu = _namespace['_array_EC_pyCAN_glu'] cdef double * _array_EC_pyCAN_glu = _buf__array_EC_pyCAN_glu.data cdef size_t _num_array_EC_pyCAN_glu = len(_namespace['_array_EC_pyCAN_glu']) cdef double glu_pre _var_he_ext_post = _namespace["_var_he_ext_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_inh_he_ext = _namespace['_array_DG_inh_he_ext'] cdef double * _array_DG_inh_he_ext = _buf__array_DG_inh_he_ext.data cdef size_t _num_array_DG_inh_he_ext = len(_namespace['_array_DG_inh_he_ext']) cdef double he_ext_post _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] cdef double _lio_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:15:29,097 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name EC_pyCANtoDG_inh_pre_codeobject 2021-11-05 15:15:29,097 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "EC_pyCANtoDG_inh_synapses" using Cython module "_cython_magic_8d41913f9b4e36213bb014fc49b634da" 2021-11-05 15:15:29,098 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140606333371488 on /home/nikos/.cython/brian_extensions/_cython_magic_8d41913f9b4e36213bb014fc49b634da.lock 2021-11-05 15:15:29,098 DEBUG brian2.utils.filelock: Lock 140606333371488 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_8d41913f9b4e36213bb014fc49b634da.lock 2021-11-05 15:15:29,098 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140606333371488 on /home/nikos/.cython/brian_extensions/_cython_magic_8d41913f9b4e36213bb014fc49b634da.lock 2021-11-05 15:15:29,098 DEBUG brian2.utils.filelock: Lock 140606333371488 released on /home/nikos/.cython/brian_extensions/_cython_magic_8d41913f9b4e36213bb014fc49b634da.lock 2021-11-05 15:15:29,099 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=EC_pyCANtoDG_py_pre, template name=synapses_push_spikes) for abstract code: 2021-11-05 15:15:29,114 DIAGNOSTIC brian2.devices.device: EC_pyCANtoDG_py_pre_push_spikes abstract code: 2021-11-05 15:15:29,114 DIAGNOSTIC brian2.devices.device: EC_pyCANtoDG_py_pre_push_spikes snippet (scalar): 2021-11-05 15:15:29,114 DIAGNOSTIC brian2.devices.device: EC_pyCANtoDG_py_pre_push_spikes snippet (vector): 2021-11-05 15:15:29,114 DIAGNOSTIC brian2.devices.device: EC_pyCANtoDG_py_pre_push_spikes code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCAN__spikespace = _namespace['_array_EC_pyCAN__spikespace'] cdef int32_t * _array_EC_pyCAN__spikespace = _buf__array_EC_pyCAN__spikespace.data cdef size_t _num_array_EC_pyCAN__spikespace = len(_namespace['_array_EC_pyCAN__spikespace']) cdef int32_t _spikespace if '_owner' in _namespace: _owner = _namespace['_owner'] _owner.push_spikes() before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCAN__spikespace = _namespace['_array_EC_pyCAN__spikespace'] cdef int32_t * _array_EC_pyCAN__spikespace = _buf__array_EC_pyCAN__spikespace.data cdef size_t _num_array_EC_pyCAN__spikespace = len(_namespace['_array_EC_pyCAN__spikespace']) cdef int32_t _spikespace if '_owner' in _namespace: _owner = _namespace['_owner'] _owner.initialise_queue() after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCAN__spikespace = _namespace['_array_EC_pyCAN__spikespace'] cdef int32_t * _array_EC_pyCAN__spikespace = _buf__array_EC_pyCAN__spikespace.data cdef size_t _num_array_EC_pyCAN__spikespace = len(_namespace['_array_EC_pyCAN__spikespace']) cdef int32_t _spikespace if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:15:29,114 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name EC_pyCANtoDG_py_pre_push_spikes 2021-11-05 15:15:29,115 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=EC_pyCANtoDG_py, template name=synapses) for abstract code: he_ext_post+=0.3333333333333333*6e-11*siemens*glu_pre 2021-11-05 15:15:29,137 DIAGNOSTIC brian2.devices.device: EC_pyCANtoDG_py_pre_codeobject abstract code: he_ext_post+=0.3333333333333333*6e-11*siemens*glu_pre 2021-11-05 15:15:29,137 DIAGNOSTIC brian2.devices.device: EC_pyCANtoDG_py_pre_codeobject snippet (scalar): _lio_1 = 2e-11 * siemens 2021-11-05 15:15:29,138 DIAGNOSTIC brian2.devices.device: EC_pyCANtoDG_py_pre_codeobject snippet (vector): _postsynaptic_idx = _array_EC_pyCANtoDG_py__synaptic_post[_idx] _presynaptic_idx = _array_EC_pyCANtoDG_py__synaptic_pre[_idx] he_ext_post = _array_DG_py_he_ext[_postsynaptic_idx] glu_pre = _array_EC_pyCAN_glu[_presynaptic_idx] he_ext_post += _lio_1 * glu_pre _array_DG_py_he_ext[_postsynaptic_idx] = he_ext_post 2021-11-05 15:15:29,138 DIAGNOSTIC brian2.devices.device: EC_pyCANtoDG_py_pre_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var__postsynaptic_idx = _namespace["_var__postsynaptic_idx"] _dynamic_array_EC_pyCANtoDG_py__synaptic_post = _namespace["_dynamic_array_EC_pyCANtoDG_py__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoDG_py__synaptic_post = _namespace['_array_EC_pyCANtoDG_py__synaptic_post'] cdef int32_t * _array_EC_pyCANtoDG_py__synaptic_post = _buf__array_EC_pyCANtoDG_py__synaptic_post.data cdef size_t _num_array_EC_pyCANtoDG_py__synaptic_post = len(_namespace['_array_EC_pyCANtoDG_py__synaptic_post']) cdef int32_t _postsynaptic_idx _var__presynaptic_idx = _namespace["_var__presynaptic_idx"] _dynamic_array_EC_pyCANtoDG_py__synaptic_pre = _namespace["_dynamic_array_EC_pyCANtoDG_py__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoDG_py__synaptic_pre = _namespace['_array_EC_pyCANtoDG_py__synaptic_pre'] cdef int32_t * _array_EC_pyCANtoDG_py__synaptic_pre = _buf__array_EC_pyCANtoDG_py__synaptic_pre.data cdef size_t _num_array_EC_pyCANtoDG_py__synaptic_pre = len(_namespace['_array_EC_pyCANtoDG_py__synaptic_pre']) cdef int32_t _presynaptic_idx _queue = _namespace["_queue"] _var_glu_pre = _namespace["_var_glu_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_glu = _namespace['_array_EC_pyCAN_glu'] cdef double * _array_EC_pyCAN_glu = _buf__array_EC_pyCAN_glu.data cdef size_t _num_array_EC_pyCAN_glu = len(_namespace['_array_EC_pyCAN_glu']) cdef double glu_pre _var_he_ext_post = _namespace["_var_he_ext_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_he_ext = _namespace['_array_DG_py_he_ext'] cdef double * _array_DG_py_he_ext = _buf__array_DG_py_he_ext.data cdef size_t _num_array_DG_py_he_ext = len(_namespace['_array_DG_py_he_ext']) cdef double he_ext_post _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] cdef double _lio_1 if '_owner' in _namespace: _owner = _namespace['_owner'] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _spiking_synapses = _queue.peek() # scalar code _vectorisation_idx = 1 _lio_1 = 2e-11 * siemens cdef size_t _spiking_synapse_idx for _spiking_synapse_idx in range(len(_spiking_synapses)): # vector code _idx = _spiking_synapses[_spiking_synapse_idx] _vectorisation_idx = _idx _postsynaptic_idx = _array_EC_pyCANtoDG_py__synaptic_post[_idx] _presynaptic_idx = _array_EC_pyCANtoDG_py__synaptic_pre[_idx] he_ext_post = _array_DG_py_he_ext[_postsynaptic_idx] glu_pre = _array_EC_pyCAN_glu[_presynaptic_idx] he_ext_post += _lio_1 * glu_pre _array_DG_py_he_ext[_postsynaptic_idx] = he_ext_post # Advance the spike queue _queue.advance() before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var__postsynaptic_idx = _namespace["_var__postsynaptic_idx"] _dynamic_array_EC_pyCANtoDG_py__synaptic_post = _namespace["_dynamic_array_EC_pyCANtoDG_py__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoDG_py__synaptic_post = _namespace['_array_EC_pyCANtoDG_py__synaptic_post'] cdef int32_t * _array_EC_pyCANtoDG_py__synaptic_post = _buf__array_EC_pyCANtoDG_py__synaptic_post.data cdef size_t _num_array_EC_pyCANtoDG_py__synaptic_post = len(_namespace['_array_EC_pyCANtoDG_py__synaptic_post']) cdef int32_t _postsynaptic_idx _var__presynaptic_idx = _namespace["_var__presynaptic_idx"] _dynamic_array_EC_pyCANtoDG_py__synaptic_pre = _namespace["_dynamic_array_EC_pyCANtoDG_py__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoDG_py__synaptic_pre = _namespace['_array_EC_pyCANtoDG_py__synaptic_pre'] cdef int32_t * _array_EC_pyCANtoDG_py__synaptic_pre = _buf__array_EC_pyCANtoDG_py__synaptic_pre.data cdef size_t _num_array_EC_pyCANtoDG_py__synaptic_pre = len(_namespace['_array_EC_pyCANtoDG_py__synaptic_pre']) cdef int32_t _presynaptic_idx _queue = _namespace["_queue"] _var_glu_pre = _namespace["_var_glu_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_glu = _namespace['_array_EC_pyCAN_glu'] cdef double * _array_EC_pyCAN_glu = _buf__array_EC_pyCAN_glu.data cdef size_t _num_array_EC_pyCAN_glu = len(_namespace['_array_EC_pyCAN_glu']) cdef double glu_pre _var_he_ext_post = _namespace["_var_he_ext_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_he_ext = _namespace['_array_DG_py_he_ext'] cdef double * _array_DG_py_he_ext = _buf__array_DG_py_he_ext.data cdef size_t _num_array_DG_py_he_ext = len(_namespace['_array_DG_py_he_ext']) cdef double he_ext_post _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] cdef double _lio_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var__postsynaptic_idx = _namespace["_var__postsynaptic_idx"] _dynamic_array_EC_pyCANtoDG_py__synaptic_post = _namespace["_dynamic_array_EC_pyCANtoDG_py__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoDG_py__synaptic_post = _namespace['_array_EC_pyCANtoDG_py__synaptic_post'] cdef int32_t * _array_EC_pyCANtoDG_py__synaptic_post = _buf__array_EC_pyCANtoDG_py__synaptic_post.data cdef size_t _num_array_EC_pyCANtoDG_py__synaptic_post = len(_namespace['_array_EC_pyCANtoDG_py__synaptic_post']) cdef int32_t _postsynaptic_idx _var__presynaptic_idx = _namespace["_var__presynaptic_idx"] _dynamic_array_EC_pyCANtoDG_py__synaptic_pre = _namespace["_dynamic_array_EC_pyCANtoDG_py__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoDG_py__synaptic_pre = _namespace['_array_EC_pyCANtoDG_py__synaptic_pre'] cdef int32_t * _array_EC_pyCANtoDG_py__synaptic_pre = _buf__array_EC_pyCANtoDG_py__synaptic_pre.data cdef size_t _num_array_EC_pyCANtoDG_py__synaptic_pre = len(_namespace['_array_EC_pyCANtoDG_py__synaptic_pre']) cdef int32_t _presynaptic_idx _queue = _namespace["_queue"] _var_glu_pre = _namespace["_var_glu_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_glu = _namespace['_array_EC_pyCAN_glu'] cdef double * _array_EC_pyCAN_glu = _buf__array_EC_pyCAN_glu.data cdef size_t _num_array_EC_pyCAN_glu = len(_namespace['_array_EC_pyCAN_glu']) cdef double glu_pre _var_he_ext_post = _namespace["_var_he_ext_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_he_ext = _namespace['_array_DG_py_he_ext'] cdef double * _array_DG_py_he_ext = _buf__array_DG_py_he_ext.data cdef size_t _num_array_DG_py_he_ext = len(_namespace['_array_DG_py_he_ext']) cdef double he_ext_post _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] cdef double _lio_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:15:29,138 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name EC_pyCANtoDG_py_pre_codeobject 2021-11-05 15:15:29,138 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "EC_pyCANtoDG_py_synapses" using Cython module "_cython_magic_c6cf3aa72ae6c4bb4afc8bc2eaa78a58" 2021-11-05 15:15:29,138 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140606332009392 on /home/nikos/.cython/brian_extensions/_cython_magic_c6cf3aa72ae6c4bb4afc8bc2eaa78a58.lock 2021-11-05 15:15:29,138 DEBUG brian2.utils.filelock: Lock 140606332009392 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_c6cf3aa72ae6c4bb4afc8bc2eaa78a58.lock 2021-11-05 15:15:29,139 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140606332009392 on /home/nikos/.cython/brian_extensions/_cython_magic_c6cf3aa72ae6c4bb4afc8bc2eaa78a58.lock 2021-11-05 15:15:29,139 DEBUG brian2.utils.filelock: Lock 140606332009392 released on /home/nikos/.cython/brian_extensions/_cython_magic_c6cf3aa72ae6c4bb4afc8bc2eaa78a58.lock 2021-11-05 15:15:29,176 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=EC_pyCANtoEC_inh_pre, template name=synapses_push_spikes) for abstract code: 2021-11-05 15:15:29,191 DIAGNOSTIC brian2.devices.device: EC_pyCANtoEC_inh_pre_push_spikes abstract code: 2021-11-05 15:15:29,192 DIAGNOSTIC brian2.devices.device: EC_pyCANtoEC_inh_pre_push_spikes snippet (scalar): 2021-11-05 15:15:29,192 DIAGNOSTIC brian2.devices.device: EC_pyCANtoEC_inh_pre_push_spikes snippet (vector): 2021-11-05 15:15:29,192 DIAGNOSTIC brian2.devices.device: EC_pyCANtoEC_inh_pre_push_spikes code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCAN__spikespace = _namespace['_array_EC_pyCAN__spikespace'] cdef int32_t * _array_EC_pyCAN__spikespace = _buf__array_EC_pyCAN__spikespace.data cdef size_t _num_array_EC_pyCAN__spikespace = len(_namespace['_array_EC_pyCAN__spikespace']) cdef int32_t _spikespace if '_owner' in _namespace: _owner = _namespace['_owner'] _owner.push_spikes() before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCAN__spikespace = _namespace['_array_EC_pyCAN__spikespace'] cdef int32_t * _array_EC_pyCAN__spikespace = _buf__array_EC_pyCAN__spikespace.data cdef size_t _num_array_EC_pyCAN__spikespace = len(_namespace['_array_EC_pyCAN__spikespace']) cdef int32_t _spikespace if '_owner' in _namespace: _owner = _namespace['_owner'] _owner.initialise_queue() after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCAN__spikespace = _namespace['_array_EC_pyCAN__spikespace'] cdef int32_t * _array_EC_pyCAN__spikespace = _buf__array_EC_pyCAN__spikespace.data cdef size_t _num_array_EC_pyCAN__spikespace = len(_namespace['_array_EC_pyCAN__spikespace']) cdef int32_t _spikespace if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:15:29,192 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name EC_pyCANtoEC_inh_pre_push_spikes 2021-11-05 15:15:29,192 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=EC_pyCANtoEC_inh, template name=synapses) for abstract code: he_post+=0.3333333333333333*6e-11*siemens*glu_pre 2021-11-05 15:15:29,214 DIAGNOSTIC brian2.devices.device: EC_pyCANtoEC_inh_pre_codeobject abstract code: he_post+=0.3333333333333333*6e-11*siemens*glu_pre 2021-11-05 15:15:29,215 DIAGNOSTIC brian2.devices.device: EC_pyCANtoEC_inh_pre_codeobject snippet (scalar): _lio_1 = 2e-11 * siemens 2021-11-05 15:15:29,215 DIAGNOSTIC brian2.devices.device: EC_pyCANtoEC_inh_pre_codeobject snippet (vector): _postsynaptic_idx = _array_EC_pyCANtoEC_inh__synaptic_post[_idx] _presynaptic_idx = _array_EC_pyCANtoEC_inh__synaptic_pre[_idx] he_post = _array_EC_inh_he[_postsynaptic_idx] glu_pre = _array_EC_pyCAN_glu[_presynaptic_idx] he_post += _lio_1 * glu_pre _array_EC_inh_he[_postsynaptic_idx] = he_post 2021-11-05 15:15:29,215 DIAGNOSTIC brian2.devices.device: EC_pyCANtoEC_inh_pre_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var__postsynaptic_idx = _namespace["_var__postsynaptic_idx"] _dynamic_array_EC_pyCANtoEC_inh__synaptic_post = _namespace["_dynamic_array_EC_pyCANtoEC_inh__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoEC_inh__synaptic_post = _namespace['_array_EC_pyCANtoEC_inh__synaptic_post'] cdef int32_t * _array_EC_pyCANtoEC_inh__synaptic_post = _buf__array_EC_pyCANtoEC_inh__synaptic_post.data cdef size_t _num_array_EC_pyCANtoEC_inh__synaptic_post = len(_namespace['_array_EC_pyCANtoEC_inh__synaptic_post']) cdef int32_t _postsynaptic_idx _var__presynaptic_idx = _namespace["_var__presynaptic_idx"] _dynamic_array_EC_pyCANtoEC_inh__synaptic_pre = _namespace["_dynamic_array_EC_pyCANtoEC_inh__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoEC_inh__synaptic_pre = _namespace['_array_EC_pyCANtoEC_inh__synaptic_pre'] cdef int32_t * _array_EC_pyCANtoEC_inh__synaptic_pre = _buf__array_EC_pyCANtoEC_inh__synaptic_pre.data cdef size_t _num_array_EC_pyCANtoEC_inh__synaptic_pre = len(_namespace['_array_EC_pyCANtoEC_inh__synaptic_pre']) cdef int32_t _presynaptic_idx _queue = _namespace["_queue"] _var_glu_pre = _namespace["_var_glu_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_glu = _namespace['_array_EC_pyCAN_glu'] cdef double * _array_EC_pyCAN_glu = _buf__array_EC_pyCAN_glu.data cdef size_t _num_array_EC_pyCAN_glu = len(_namespace['_array_EC_pyCAN_glu']) cdef double glu_pre _var_he_post = _namespace["_var_he_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_inh_he = _namespace['_array_EC_inh_he'] cdef double * _array_EC_inh_he = _buf__array_EC_inh_he.data cdef size_t _num_array_EC_inh_he = len(_namespace['_array_EC_inh_he']) cdef double he_post _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] cdef double _lio_1 if '_owner' in _namespace: _owner = _namespace['_owner'] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _spiking_synapses = _queue.peek() # scalar code _vectorisation_idx = 1 _lio_1 = 2e-11 * siemens cdef size_t _spiking_synapse_idx for _spiking_synapse_idx in range(len(_spiking_synapses)): # vector code _idx = _spiking_synapses[_spiking_synapse_idx] _vectorisation_idx = _idx _postsynaptic_idx = _array_EC_pyCANtoEC_inh__synaptic_post[_idx] _presynaptic_idx = _array_EC_pyCANtoEC_inh__synaptic_pre[_idx] he_post = _array_EC_inh_he[_postsynaptic_idx] glu_pre = _array_EC_pyCAN_glu[_presynaptic_idx] he_post += _lio_1 * glu_pre _array_EC_inh_he[_postsynaptic_idx] = he_post # Advance the spike queue _queue.advance() before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var__postsynaptic_idx = _namespace["_var__postsynaptic_idx"] _dynamic_array_EC_pyCANtoEC_inh__synaptic_post = _namespace["_dynamic_array_EC_pyCANtoEC_inh__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoEC_inh__synaptic_post = _namespace['_array_EC_pyCANtoEC_inh__synaptic_post'] cdef int32_t * _array_EC_pyCANtoEC_inh__synaptic_post = _buf__array_EC_pyCANtoEC_inh__synaptic_post.data cdef size_t _num_array_EC_pyCANtoEC_inh__synaptic_post = len(_namespace['_array_EC_pyCANtoEC_inh__synaptic_post']) cdef int32_t _postsynaptic_idx _var__presynaptic_idx = _namespace["_var__presynaptic_idx"] _dynamic_array_EC_pyCANtoEC_inh__synaptic_pre = _namespace["_dynamic_array_EC_pyCANtoEC_inh__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoEC_inh__synaptic_pre = _namespace['_array_EC_pyCANtoEC_inh__synaptic_pre'] cdef int32_t * _array_EC_pyCANtoEC_inh__synaptic_pre = _buf__array_EC_pyCANtoEC_inh__synaptic_pre.data cdef size_t _num_array_EC_pyCANtoEC_inh__synaptic_pre = len(_namespace['_array_EC_pyCANtoEC_inh__synaptic_pre']) cdef int32_t _presynaptic_idx _queue = _namespace["_queue"] _var_glu_pre = _namespace["_var_glu_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_glu = _namespace['_array_EC_pyCAN_glu'] cdef double * _array_EC_pyCAN_glu = _buf__array_EC_pyCAN_glu.data cdef size_t _num_array_EC_pyCAN_glu = len(_namespace['_array_EC_pyCAN_glu']) cdef double glu_pre _var_he_post = _namespace["_var_he_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_inh_he = _namespace['_array_EC_inh_he'] cdef double * _array_EC_inh_he = _buf__array_EC_inh_he.data cdef size_t _num_array_EC_inh_he = len(_namespace['_array_EC_inh_he']) cdef double he_post _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] cdef double _lio_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var__postsynaptic_idx = _namespace["_var__postsynaptic_idx"] _dynamic_array_EC_pyCANtoEC_inh__synaptic_post = _namespace["_dynamic_array_EC_pyCANtoEC_inh__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoEC_inh__synaptic_post = _namespace['_array_EC_pyCANtoEC_inh__synaptic_post'] cdef int32_t * _array_EC_pyCANtoEC_inh__synaptic_post = _buf__array_EC_pyCANtoEC_inh__synaptic_post.data cdef size_t _num_array_EC_pyCANtoEC_inh__synaptic_post = len(_namespace['_array_EC_pyCANtoEC_inh__synaptic_post']) cdef int32_t _postsynaptic_idx _var__presynaptic_idx = _namespace["_var__presynaptic_idx"] _dynamic_array_EC_pyCANtoEC_inh__synaptic_pre = _namespace["_dynamic_array_EC_pyCANtoEC_inh__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCANtoEC_inh__synaptic_pre = _namespace['_array_EC_pyCANtoEC_inh__synaptic_pre'] cdef int32_t * _array_EC_pyCANtoEC_inh__synaptic_pre = _buf__array_EC_pyCANtoEC_inh__synaptic_pre.data cdef size_t _num_array_EC_pyCANtoEC_inh__synaptic_pre = len(_namespace['_array_EC_pyCANtoEC_inh__synaptic_pre']) cdef int32_t _presynaptic_idx _queue = _namespace["_queue"] _var_glu_pre = _namespace["_var_glu_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_glu = _namespace['_array_EC_pyCAN_glu'] cdef double * _array_EC_pyCAN_glu = _buf__array_EC_pyCAN_glu.data cdef size_t _num_array_EC_pyCAN_glu = len(_namespace['_array_EC_pyCAN_glu']) cdef double glu_pre _var_he_post = _namespace["_var_he_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_inh_he = _namespace['_array_EC_inh_he'] cdef double * _array_EC_inh_he = _buf__array_EC_inh_he.data cdef size_t _num_array_EC_inh_he = len(_namespace['_array_EC_inh_he']) cdef double he_post _var_siemens = _namespace["_var_siemens"] cdef double siemens = _namespace["siemens"] cdef double _lio_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:15:29,216 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name EC_pyCANtoEC_inh_pre_codeobject 2021-11-05 15:15:29,216 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "EC_pyCANtoEC_inh_synapses" using Cython module "_cython_magic_a42fab2ad87900520fcdb91b58cc2f7a" 2021-11-05 15:15:29,216 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140606220697952 on /home/nikos/.cython/brian_extensions/_cython_magic_a42fab2ad87900520fcdb91b58cc2f7a.lock 2021-11-05 15:15:29,216 DEBUG brian2.utils.filelock: Lock 140606220697952 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_a42fab2ad87900520fcdb91b58cc2f7a.lock 2021-11-05 15:15:29,219 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140606220697952 on /home/nikos/.cython/brian_extensions/_cython_magic_a42fab2ad87900520fcdb91b58cc2f7a.lock 2021-11-05 15:15:29,220 DEBUG brian2.utils.filelock: Lock 140606220697952 released on /home/nikos/.cython/brian_extensions/_cython_magic_a42fab2ad87900520fcdb91b58cc2f7a.lock 2021-11-05 15:15:29,230 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=Kuramoto_intra_pre, template name=synapses_push_spikes) for abstract code: 2021-11-05 15:15:29,234 DIAGNOSTIC brian2.devices.device: Kuramoto_intra_pre_push_spikes abstract code: 2021-11-05 15:15:29,234 DIAGNOSTIC brian2.devices.device: Kuramoto_intra_pre_push_spikes snippet (scalar): 2021-11-05 15:15:29,234 DIAGNOSTIC brian2.devices.device: Kuramoto_intra_pre_push_spikes snippet (vector): 2021-11-05 15:15:29,234 DIAGNOSTIC brian2.devices.device: Kuramoto_intra_pre_push_spikes code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_Kuramoto_oscillators_N_50__spikespace = _namespace['_array_Kuramoto_oscillators_N_50__spikespace'] cdef int32_t * _array_Kuramoto_oscillators_N_50__spikespace = _buf__array_Kuramoto_oscillators_N_50__spikespace.data cdef size_t _num_array_Kuramoto_oscillators_N_50__spikespace = len(_namespace['_array_Kuramoto_oscillators_N_50__spikespace']) cdef int32_t _spikespace if '_owner' in _namespace: _owner = _namespace['_owner'] _owner.push_spikes() before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_Kuramoto_oscillators_N_50__spikespace = _namespace['_array_Kuramoto_oscillators_N_50__spikespace'] cdef int32_t * _array_Kuramoto_oscillators_N_50__spikespace = _buf__array_Kuramoto_oscillators_N_50__spikespace.data cdef size_t _num_array_Kuramoto_oscillators_N_50__spikespace = len(_namespace['_array_Kuramoto_oscillators_N_50__spikespace']) cdef int32_t _spikespace if '_owner' in _namespace: _owner = _namespace['_owner'] _owner.initialise_queue() after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_Kuramoto_oscillators_N_50__spikespace = _namespace['_array_Kuramoto_oscillators_N_50__spikespace'] cdef int32_t * _array_Kuramoto_oscillators_N_50__spikespace = _buf__array_Kuramoto_oscillators_N_50__spikespace.data cdef size_t _num_array_Kuramoto_oscillators_N_50__spikespace = len(_namespace['_array_Kuramoto_oscillators_N_50__spikespace']) cdef int32_t _spikespace if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:15:29,234 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name Kuramoto_intra_pre_push_spikes 2021-11-05 15:15:29,235 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "Kuramoto_intra_pre_synapses_push_spikes" using Cython module "_cython_magic_2d4dad951bfb42944701f2962c0932f6" 2021-11-05 15:15:29,235 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140606220699344 on /home/nikos/.cython/brian_extensions/_cython_magic_2d4dad951bfb42944701f2962c0932f6.lock 2021-11-05 15:15:29,235 DEBUG brian2.utils.filelock: Lock 140606220699344 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_2d4dad951bfb42944701f2962c0932f6.lock 2021-11-05 15:15:29,235 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140606220699344 on /home/nikos/.cython/brian_extensions/_cython_magic_2d4dad951bfb42944701f2962c0932f6.lock 2021-11-05 15:15:29,235 DEBUG brian2.utils.filelock: Lock 140606220699344 released on /home/nikos/.cython/brian_extensions/_cython_magic_2d4dad951bfb42944701f2962c0932f6.lock 2021-11-05 15:15:29,236 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "Kuramoto_intra_pre_synapses_push_spikes" using Cython module "_cython_magic_66c94b09375e823e8e5521efc841494d" 2021-11-05 15:15:29,236 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140606220698528 on /home/nikos/.cython/brian_extensions/_cython_magic_66c94b09375e823e8e5521efc841494d.lock 2021-11-05 15:15:29,236 DEBUG brian2.utils.filelock: Lock 140606220698528 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_66c94b09375e823e8e5521efc841494d.lock 2021-11-05 15:15:29,236 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140606220698528 on /home/nikos/.cython/brian_extensions/_cython_magic_66c94b09375e823e8e5521efc841494d.lock 2021-11-05 15:15:29,236 DEBUG brian2.utils.filelock: Lock 140606220698528 released on /home/nikos/.cython/brian_extensions/_cython_magic_66c94b09375e823e8e5521efc841494d.lock 2021-11-05 15:15:29,236 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=Kuramoto_intra, template name=synapses) for abstract code: ThetaPreInput_post = Theta_pre 2021-11-05 15:15:29,240 DIAGNOSTIC brian2.devices.device: Kuramoto_intra_pre_codeobject abstract code: ThetaPreInput_post = Theta_pre 2021-11-05 15:15:29,241 WARNING brian2.codegen.generators.base: Came across an abstract code block that may not be well-defined: the outcome may depend on the order of execution. You can ignore this warning if you are sure that the order of operations does not matter. Abstract code: "ThetaPreInput_post = Theta_pre" 2021-11-05 15:15:29,241 DIAGNOSTIC brian2.devices.device: Kuramoto_intra_pre_codeobject snippet (scalar): 2021-11-05 15:15:29,241 DIAGNOSTIC brian2.devices.device: Kuramoto_intra_pre_codeobject snippet (vector): _postsynaptic_idx = _array_Kuramoto_intra__synaptic_post[_idx] _presynaptic_idx = _array_Kuramoto_intra__synaptic_pre[_idx] Theta_pre = _array_Kuramoto_oscillators_N_50_Theta[_presynaptic_idx] ThetaPreInput_post = Theta_pre _array_Kuramoto_oscillators_N_50_ThetaPreInput[_postsynaptic_idx] = ThetaPreInput_post 2021-11-05 15:15:29,242 DIAGNOSTIC brian2.devices.device: Kuramoto_intra_pre_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var_ThetaPreInput_post = _namespace["_var_ThetaPreInput_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_Kuramoto_oscillators_N_50_ThetaPreInput = _namespace['_array_Kuramoto_oscillators_N_50_ThetaPreInput'] cdef double * _array_Kuramoto_oscillators_N_50_ThetaPreInput = _buf__array_Kuramoto_oscillators_N_50_ThetaPreInput.data cdef size_t _num_array_Kuramoto_oscillators_N_50_ThetaPreInput = len(_namespace['_array_Kuramoto_oscillators_N_50_ThetaPreInput']) cdef double ThetaPreInput_post _var_Theta_pre = _namespace["_var_Theta_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_Kuramoto_oscillators_N_50_Theta = _namespace['_array_Kuramoto_oscillators_N_50_Theta'] cdef double * _array_Kuramoto_oscillators_N_50_Theta = _buf__array_Kuramoto_oscillators_N_50_Theta.data cdef size_t _num_array_Kuramoto_oscillators_N_50_Theta = len(_namespace['_array_Kuramoto_oscillators_N_50_Theta']) cdef double Theta_pre _var__postsynaptic_idx = _namespace["_var__postsynaptic_idx"] _dynamic_array_Kuramoto_intra__synaptic_post = _namespace["_dynamic_array_Kuramoto_intra__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_Kuramoto_intra__synaptic_post = _namespace['_array_Kuramoto_intra__synaptic_post'] cdef int32_t * _array_Kuramoto_intra__synaptic_post = _buf__array_Kuramoto_intra__synaptic_post.data cdef size_t _num_array_Kuramoto_intra__synaptic_post = len(_namespace['_array_Kuramoto_intra__synaptic_post']) cdef int32_t _postsynaptic_idx _var__presynaptic_idx = _namespace["_var__presynaptic_idx"] _dynamic_array_Kuramoto_intra__synaptic_pre = _namespace["_dynamic_array_Kuramoto_intra__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_Kuramoto_intra__synaptic_pre = _namespace['_array_Kuramoto_intra__synaptic_pre'] cdef int32_t * _array_Kuramoto_intra__synaptic_pre = _buf__array_Kuramoto_intra__synaptic_pre.data cdef size_t _num_array_Kuramoto_intra__synaptic_pre = len(_namespace['_array_Kuramoto_intra__synaptic_pre']) cdef int32_t _presynaptic_idx _queue = _namespace["_queue"] if '_owner' in _namespace: _owner = _namespace['_owner'] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _spiking_synapses = _queue.peek() # scalar code _vectorisation_idx = 1 cdef size_t _spiking_synapse_idx for _spiking_synapse_idx in range(len(_spiking_synapses)): # vector code _idx = _spiking_synapses[_spiking_synapse_idx] _vectorisation_idx = _idx _postsynaptic_idx = _array_Kuramoto_intra__synaptic_post[_idx] _presynaptic_idx = _array_Kuramoto_intra__synaptic_pre[_idx] Theta_pre = _array_Kuramoto_oscillators_N_50_Theta[_presynaptic_idx] ThetaPreInput_post = Theta_pre _array_Kuramoto_oscillators_N_50_ThetaPreInput[_postsynaptic_idx] = ThetaPreInput_post # Advance the spike queue _queue.advance() before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_ThetaPreInput_post = _namespace["_var_ThetaPreInput_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_Kuramoto_oscillators_N_50_ThetaPreInput = _namespace['_array_Kuramoto_oscillators_N_50_ThetaPreInput'] cdef double * _array_Kuramoto_oscillators_N_50_ThetaPreInput = _buf__array_Kuramoto_oscillators_N_50_ThetaPreInput.data cdef size_t _num_array_Kuramoto_oscillators_N_50_ThetaPreInput = len(_namespace['_array_Kuramoto_oscillators_N_50_ThetaPreInput']) cdef double ThetaPreInput_post _var_Theta_pre = _namespace["_var_Theta_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_Kuramoto_oscillators_N_50_Theta = _namespace['_array_Kuramoto_oscillators_N_50_Theta'] cdef double * _array_Kuramoto_oscillators_N_50_Theta = _buf__array_Kuramoto_oscillators_N_50_Theta.data cdef size_t _num_array_Kuramoto_oscillators_N_50_Theta = len(_namespace['_array_Kuramoto_oscillators_N_50_Theta']) cdef double Theta_pre _var__postsynaptic_idx = _namespace["_var__postsynaptic_idx"] _dynamic_array_Kuramoto_intra__synaptic_post = _namespace["_dynamic_array_Kuramoto_intra__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_Kuramoto_intra__synaptic_post = _namespace['_array_Kuramoto_intra__synaptic_post'] cdef int32_t * _array_Kuramoto_intra__synaptic_post = _buf__array_Kuramoto_intra__synaptic_post.data cdef size_t _num_array_Kuramoto_intra__synaptic_post = len(_namespace['_array_Kuramoto_intra__synaptic_post']) cdef int32_t _postsynaptic_idx _var__presynaptic_idx = _namespace["_var__presynaptic_idx"] _dynamic_array_Kuramoto_intra__synaptic_pre = _namespace["_dynamic_array_Kuramoto_intra__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_Kuramoto_intra__synaptic_pre = _namespace['_array_Kuramoto_intra__synaptic_pre'] cdef int32_t * _array_Kuramoto_intra__synaptic_pre = _buf__array_Kuramoto_intra__synaptic_pre.data cdef size_t _num_array_Kuramoto_intra__synaptic_pre = len(_namespace['_array_Kuramoto_intra__synaptic_pre']) cdef int32_t _presynaptic_idx _queue = _namespace["_queue"] if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_ThetaPreInput_post = _namespace["_var_ThetaPreInput_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_Kuramoto_oscillators_N_50_ThetaPreInput = _namespace['_array_Kuramoto_oscillators_N_50_ThetaPreInput'] cdef double * _array_Kuramoto_oscillators_N_50_ThetaPreInput = _buf__array_Kuramoto_oscillators_N_50_ThetaPreInput.data cdef size_t _num_array_Kuramoto_oscillators_N_50_ThetaPreInput = len(_namespace['_array_Kuramoto_oscillators_N_50_ThetaPreInput']) cdef double ThetaPreInput_post _var_Theta_pre = _namespace["_var_Theta_pre"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_Kuramoto_oscillators_N_50_Theta = _namespace['_array_Kuramoto_oscillators_N_50_Theta'] cdef double * _array_Kuramoto_oscillators_N_50_Theta = _buf__array_Kuramoto_oscillators_N_50_Theta.data cdef size_t _num_array_Kuramoto_oscillators_N_50_Theta = len(_namespace['_array_Kuramoto_oscillators_N_50_Theta']) cdef double Theta_pre _var__postsynaptic_idx = _namespace["_var__postsynaptic_idx"] _dynamic_array_Kuramoto_intra__synaptic_post = _namespace["_dynamic_array_Kuramoto_intra__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_Kuramoto_intra__synaptic_post = _namespace['_array_Kuramoto_intra__synaptic_post'] cdef int32_t * _array_Kuramoto_intra__synaptic_post = _buf__array_Kuramoto_intra__synaptic_post.data cdef size_t _num_array_Kuramoto_intra__synaptic_post = len(_namespace['_array_Kuramoto_intra__synaptic_post']) cdef int32_t _postsynaptic_idx _var__presynaptic_idx = _namespace["_var__presynaptic_idx"] _dynamic_array_Kuramoto_intra__synaptic_pre = _namespace["_dynamic_array_Kuramoto_intra__synaptic_pre"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_Kuramoto_intra__synaptic_pre = _namespace['_array_Kuramoto_intra__synaptic_pre'] cdef int32_t * _array_Kuramoto_intra__synaptic_pre = _buf__array_Kuramoto_intra__synaptic_pre.data cdef size_t _num_array_Kuramoto_intra__synaptic_pre = len(_namespace['_array_Kuramoto_intra__synaptic_pre']) cdef int32_t _presynaptic_idx _queue = _namespace["_queue"] if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:15:29,242 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name Kuramoto_intra_pre_codeobject 2021-11-05 15:15:29,242 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "Kuramoto_intra_synapses" using Cython module "_cython_magic_30272103aed01b546a2304ee53a05379" 2021-11-05 15:15:29,242 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140606220700880 on /home/nikos/.cython/brian_extensions/_cython_magic_30272103aed01b546a2304ee53a05379.lock 2021-11-05 15:15:29,242 DEBUG brian2.utils.filelock: Lock 140606220700880 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_30272103aed01b546a2304ee53a05379.lock 2021-11-05 15:15:29,243 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140606220700880 on /home/nikos/.cython/brian_extensions/_cython_magic_30272103aed01b546a2304ee53a05379.lock 2021-11-05 15:15:29,243 DEBUG brian2.utils.filelock: Lock 140606220700880 released on /home/nikos/.cython/brian_extensions/_cython_magic_30272103aed01b546a2304ee53a05379.lock 2021-11-05 15:15:29,243 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=synapses_pre, template name=synapses_push_spikes) for abstract code: 2021-11-05 15:15:29,250 DIAGNOSTIC brian2.devices.device: synapses_pre_push_spikes abstract code: 2021-11-05 15:15:29,250 DIAGNOSTIC brian2.devices.device: synapses_pre_push_spikes snippet (scalar): 2021-11-05 15:15:29,250 DIAGNOSTIC brian2.devices.device: synapses_pre_push_spikes snippet (vector): 2021-11-05 15:15:29,250 DIAGNOSTIC brian2.devices.device: synapses_pre_push_spikes code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_pyCAN__spikespace = _namespace['_array_CA1_pyCAN__spikespace'] cdef int32_t * _array_CA1_pyCAN__spikespace = _buf__array_CA1_pyCAN__spikespace.data cdef size_t _num_array_CA1_pyCAN__spikespace = len(_namespace['_array_CA1_pyCAN__spikespace']) cdef int32_t _spikespace if '_owner' in _namespace: _owner = _namespace['_owner'] _owner.push_spikes() before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_pyCAN__spikespace = _namespace['_array_CA1_pyCAN__spikespace'] cdef int32_t * _array_CA1_pyCAN__spikespace = _buf__array_CA1_pyCAN__spikespace.data cdef size_t _num_array_CA1_pyCAN__spikespace = len(_namespace['_array_CA1_pyCAN__spikespace']) cdef int32_t _spikespace if '_owner' in _namespace: _owner = _namespace['_owner'] _owner.initialise_queue() after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_pyCAN__spikespace = _namespace['_array_CA1_pyCAN__spikespace'] cdef int32_t * _array_CA1_pyCAN__spikespace = _buf__array_CA1_pyCAN__spikespace.data cdef size_t _num_array_CA1_pyCAN__spikespace = len(_namespace['_array_CA1_pyCAN__spikespace']) cdef int32_t _spikespace if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:15:29,250 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name synapses_pre_push_spikes 2021-11-05 15:15:29,250 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=synapses, template name=synapses) for abstract code: Y_post += (1/tauFR) 2021-11-05 15:15:29,260 DIAGNOSTIC brian2.devices.device: synapses_pre_codeobject abstract code: Y_post += (1/tauFR) 2021-11-05 15:15:29,260 DIAGNOSTIC brian2.devices.device: synapses_pre_codeobject snippet (scalar): _lio_1 = 1.0 / tauFR 2021-11-05 15:15:29,260 DIAGNOSTIC brian2.devices.device: synapses_pre_codeobject snippet (vector): _postsynaptic_idx = _array_synapses__synaptic_post[_idx] Y_post = _array_neurongroup_1_Y[_postsynaptic_idx] Y_post += _lio_1 _array_neurongroup_1_Y[_postsynaptic_idx] = Y_post 2021-11-05 15:15:29,261 DIAGNOSTIC brian2.devices.device: synapses_pre_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var_Y_post = _namespace["_var_Y_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_neurongroup_1_Y = _namespace['_array_neurongroup_1_Y'] cdef double * _array_neurongroup_1_Y = _buf__array_neurongroup_1_Y.data cdef size_t _num_array_neurongroup_1_Y = len(_namespace['_array_neurongroup_1_Y']) cdef double Y_post _var__postsynaptic_idx = _namespace["_var__postsynaptic_idx"] _dynamic_array_synapses__synaptic_post = _namespace["_dynamic_array_synapses__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_synapses__synaptic_post = _namespace['_array_synapses__synaptic_post'] cdef int32_t * _array_synapses__synaptic_post = _buf__array_synapses__synaptic_post.data cdef size_t _num_array_synapses__synaptic_post = len(_namespace['_array_synapses__synaptic_post']) cdef int32_t _postsynaptic_idx _queue = _namespace["_queue"] _var_tauFR = _namespace["_var_tauFR"] cdef double tauFR = _namespace["tauFR"] cdef double _lio_1 if '_owner' in _namespace: _owner = _namespace['_owner'] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _spiking_synapses = _queue.peek() # scalar code _vectorisation_idx = 1 _lio_1 = 1.0 / tauFR cdef size_t _spiking_synapse_idx for _spiking_synapse_idx in range(len(_spiking_synapses)): # vector code _idx = _spiking_synapses[_spiking_synapse_idx] _vectorisation_idx = _idx _postsynaptic_idx = _array_synapses__synaptic_post[_idx] Y_post = _array_neurongroup_1_Y[_postsynaptic_idx] Y_post += _lio_1 _array_neurongroup_1_Y[_postsynaptic_idx] = Y_post # Advance the spike queue _queue.advance() before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_Y_post = _namespace["_var_Y_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_neurongroup_1_Y = _namespace['_array_neurongroup_1_Y'] cdef double * _array_neurongroup_1_Y = _buf__array_neurongroup_1_Y.data cdef size_t _num_array_neurongroup_1_Y = len(_namespace['_array_neurongroup_1_Y']) cdef double Y_post _var__postsynaptic_idx = _namespace["_var__postsynaptic_idx"] _dynamic_array_synapses__synaptic_post = _namespace["_dynamic_array_synapses__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_synapses__synaptic_post = _namespace['_array_synapses__synaptic_post'] cdef int32_t * _array_synapses__synaptic_post = _buf__array_synapses__synaptic_post.data cdef size_t _num_array_synapses__synaptic_post = len(_namespace['_array_synapses__synaptic_post']) cdef int32_t _postsynaptic_idx _queue = _namespace["_queue"] _var_tauFR = _namespace["_var_tauFR"] cdef double tauFR = _namespace["tauFR"] cdef double _lio_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_Y_post = _namespace["_var_Y_post"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_neurongroup_1_Y = _namespace['_array_neurongroup_1_Y'] cdef double * _array_neurongroup_1_Y = _buf__array_neurongroup_1_Y.data cdef size_t _num_array_neurongroup_1_Y = len(_namespace['_array_neurongroup_1_Y']) cdef double Y_post _var__postsynaptic_idx = _namespace["_var__postsynaptic_idx"] _dynamic_array_synapses__synaptic_post = _namespace["_dynamic_array_synapses__synaptic_post"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_synapses__synaptic_post = _namespace['_array_synapses__synaptic_post'] cdef int32_t * _array_synapses__synaptic_post = _buf__array_synapses__synaptic_post.data cdef size_t _num_array_synapses__synaptic_post = len(_namespace['_array_synapses__synaptic_post']) cdef int32_t _postsynaptic_idx _queue = _namespace["_queue"] _var_tauFR = _namespace["_var_tauFR"] cdef double tauFR = _namespace["tauFR"] cdef double _lio_1 if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:15:29,261 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name synapses_pre_codeobject 2021-11-05 15:15:29,261 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "synapses_synapses" using Cython module "_cython_magic_79270696876d996e5ee589e6211be4b4" 2021-11-05 15:15:29,261 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140606220700112 on /home/nikos/.cython/brian_extensions/_cython_magic_79270696876d996e5ee589e6211be4b4.lock 2021-11-05 15:15:29,261 DEBUG brian2.utils.filelock: Lock 140606220700112 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_79270696876d996e5ee589e6211be4b4.lock 2021-11-05 15:15:29,261 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140606220700112 on /home/nikos/.cython/brian_extensions/_cython_magic_79270696876d996e5ee589e6211be4b4.lock 2021-11-05 15:15:29,261 DEBUG brian2.utils.filelock: Lock 140606220700112 released on /home/nikos/.cython/brian_extensions/_cython_magic_79270696876d996e5ee589e6211be4b4.lock 2021-11-05 15:15:29,262 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=CA1_pyCAN, template name=reset) for abstract code: glu = glu-0 Cl = Cl+0.2 2021-11-05 15:15:29,267 DIAGNOSTIC brian2.devices.device: CA1_pyCAN_resetter_codeobject abstract code: glu = glu-0 Cl = Cl+0.2 2021-11-05 15:15:29,268 DIAGNOSTIC brian2.devices.device: CA1_pyCAN_resetter_codeobject snippet (scalar): 2021-11-05 15:15:29,268 DIAGNOSTIC brian2.devices.device: CA1_pyCAN_resetter_codeobject snippet (vector): glu = _array_CA1_pyCAN_glu[_idx] Cl = _array_CA1_pyCAN_Cl[_idx] glu *= 1 Cl += 0.2 _array_CA1_pyCAN_glu[_idx] = glu _array_CA1_pyCAN_Cl[_idx] = Cl 2021-11-05 15:15:29,268 DIAGNOSTIC brian2.devices.device: CA1_pyCAN_resetter_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var_Cl = _namespace["_var_Cl"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_Cl = _namespace['_array_CA1_pyCAN_Cl'] cdef double * _array_CA1_pyCAN_Cl = _buf__array_CA1_pyCAN_Cl.data cdef size_t _num_array_CA1_pyCAN_Cl = len(_namespace['_array_CA1_pyCAN_Cl']) cdef double Cl _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_pyCAN__spikespace = _namespace['_array_CA1_pyCAN__spikespace'] cdef int32_t * _array_CA1_pyCAN__spikespace = _buf__array_CA1_pyCAN__spikespace.data cdef size_t _num_array_CA1_pyCAN__spikespace = len(_namespace['_array_CA1_pyCAN__spikespace']) cdef int32_t _spikespace _var_glu = _namespace["_var_glu"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_glu = _namespace['_array_CA1_pyCAN_glu'] cdef double * _array_CA1_pyCAN_glu = _buf__array_CA1_pyCAN_glu.data cdef size_t _num_array_CA1_pyCAN_glu = len(_namespace['_array_CA1_pyCAN_glu']) cdef double glu if '_owner' in _namespace: _owner = _namespace['_owner'] # scalar code _vectorisation_idx = 1 cdef size_t _num_events = _array_CA1_pyCAN__spikespace[_num_array_CA1_pyCAN__spikespace-1] for _index_events in range(_num_events): # vector code _idx = _array_CA1_pyCAN__spikespace[_index_events] _vectorisation_idx = _idx glu = _array_CA1_pyCAN_glu[_idx] Cl = _array_CA1_pyCAN_Cl[_idx] glu *= 1 Cl += 0.2 _array_CA1_pyCAN_glu[_idx] = glu _array_CA1_pyCAN_Cl[_idx] = Cl before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_Cl = _namespace["_var_Cl"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_Cl = _namespace['_array_CA1_pyCAN_Cl'] cdef double * _array_CA1_pyCAN_Cl = _buf__array_CA1_pyCAN_Cl.data cdef size_t _num_array_CA1_pyCAN_Cl = len(_namespace['_array_CA1_pyCAN_Cl']) cdef double Cl _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_pyCAN__spikespace = _namespace['_array_CA1_pyCAN__spikespace'] cdef int32_t * _array_CA1_pyCAN__spikespace = _buf__array_CA1_pyCAN__spikespace.data cdef size_t _num_array_CA1_pyCAN__spikespace = len(_namespace['_array_CA1_pyCAN__spikespace']) cdef int32_t _spikespace _var_glu = _namespace["_var_glu"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_glu = _namespace['_array_CA1_pyCAN_glu'] cdef double * _array_CA1_pyCAN_glu = _buf__array_CA1_pyCAN_glu.data cdef size_t _num_array_CA1_pyCAN_glu = len(_namespace['_array_CA1_pyCAN_glu']) cdef double glu if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_Cl = _namespace["_var_Cl"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_Cl = _namespace['_array_CA1_pyCAN_Cl'] cdef double * _array_CA1_pyCAN_Cl = _buf__array_CA1_pyCAN_Cl.data cdef size_t _num_array_CA1_pyCAN_Cl = len(_namespace['_array_CA1_pyCAN_Cl']) cdef double Cl _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_pyCAN__spikespace = _namespace['_array_CA1_pyCAN__spikespace'] cdef int32_t * _array_CA1_pyCAN__spikespace = _buf__array_CA1_pyCAN__spikespace.data cdef size_t _num_array_CA1_pyCAN__spikespace = len(_namespace['_array_CA1_pyCAN__spikespace']) cdef int32_t _spikespace _var_glu = _namespace["_var_glu"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA1_pyCAN_glu = _namespace['_array_CA1_pyCAN_glu'] cdef double * _array_CA1_pyCAN_glu = _buf__array_CA1_pyCAN_glu.data cdef size_t _num_array_CA1_pyCAN_glu = len(_namespace['_array_CA1_pyCAN_glu']) cdef double glu if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:15:29,268 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name CA1_pyCAN_resetter_codeobject 2021-11-05 15:15:29,268 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "CA1_pyCAN_reset" using Cython module "_cython_magic_76e9052affdd3f20a6d2a7cd80dd65aa" 2021-11-05 15:15:29,268 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140606332450368 on /home/nikos/.cython/brian_extensions/_cython_magic_76e9052affdd3f20a6d2a7cd80dd65aa.lock 2021-11-05 15:15:29,268 DEBUG brian2.utils.filelock: Lock 140606332450368 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_76e9052affdd3f20a6d2a7cd80dd65aa.lock 2021-11-05 15:15:29,269 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140606332450368 on /home/nikos/.cython/brian_extensions/_cython_magic_76e9052affdd3f20a6d2a7cd80dd65aa.lock 2021-11-05 15:15:29,269 DEBUG brian2.utils.filelock: Lock 140606332450368 released on /home/nikos/.cython/brian_extensions/_cython_magic_76e9052affdd3f20a6d2a7cd80dd65aa.lock 2021-11-05 15:15:29,269 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=CA3_pyCAN, template name=reset) for abstract code: glu = glu-0 Cl = Cl+0.2 2021-11-05 15:15:29,273 DIAGNOSTIC brian2.devices.device: CA3_pyCAN_resetter_codeobject abstract code: glu = glu-0 Cl = Cl+0.2 2021-11-05 15:15:29,273 DIAGNOSTIC brian2.devices.device: CA3_pyCAN_resetter_codeobject snippet (scalar): 2021-11-05 15:15:29,273 DIAGNOSTIC brian2.devices.device: CA3_pyCAN_resetter_codeobject snippet (vector): glu = _array_CA3_pyCAN_glu[_idx] Cl = _array_CA3_pyCAN_Cl[_idx] glu *= 1 Cl += 0.2 _array_CA3_pyCAN_glu[_idx] = glu _array_CA3_pyCAN_Cl[_idx] = Cl 2021-11-05 15:15:29,274 DIAGNOSTIC brian2.devices.device: CA3_pyCAN_resetter_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var_Cl = _namespace["_var_Cl"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_Cl = _namespace['_array_CA3_pyCAN_Cl'] cdef double * _array_CA3_pyCAN_Cl = _buf__array_CA3_pyCAN_Cl.data cdef size_t _num_array_CA3_pyCAN_Cl = len(_namespace['_array_CA3_pyCAN_Cl']) cdef double Cl _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_pyCAN__spikespace = _namespace['_array_CA3_pyCAN__spikespace'] cdef int32_t * _array_CA3_pyCAN__spikespace = _buf__array_CA3_pyCAN__spikespace.data cdef size_t _num_array_CA3_pyCAN__spikespace = len(_namespace['_array_CA3_pyCAN__spikespace']) cdef int32_t _spikespace _var_glu = _namespace["_var_glu"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_glu = _namespace['_array_CA3_pyCAN_glu'] cdef double * _array_CA3_pyCAN_glu = _buf__array_CA3_pyCAN_glu.data cdef size_t _num_array_CA3_pyCAN_glu = len(_namespace['_array_CA3_pyCAN_glu']) cdef double glu if '_owner' in _namespace: _owner = _namespace['_owner'] # scalar code _vectorisation_idx = 1 cdef size_t _num_events = _array_CA3_pyCAN__spikespace[_num_array_CA3_pyCAN__spikespace-1] for _index_events in range(_num_events): # vector code _idx = _array_CA3_pyCAN__spikespace[_index_events] _vectorisation_idx = _idx glu = _array_CA3_pyCAN_glu[_idx] Cl = _array_CA3_pyCAN_Cl[_idx] glu *= 1 Cl += 0.2 _array_CA3_pyCAN_glu[_idx] = glu _array_CA3_pyCAN_Cl[_idx] = Cl before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_Cl = _namespace["_var_Cl"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_Cl = _namespace['_array_CA3_pyCAN_Cl'] cdef double * _array_CA3_pyCAN_Cl = _buf__array_CA3_pyCAN_Cl.data cdef size_t _num_array_CA3_pyCAN_Cl = len(_namespace['_array_CA3_pyCAN_Cl']) cdef double Cl _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_pyCAN__spikespace = _namespace['_array_CA3_pyCAN__spikespace'] cdef int32_t * _array_CA3_pyCAN__spikespace = _buf__array_CA3_pyCAN__spikespace.data cdef size_t _num_array_CA3_pyCAN__spikespace = len(_namespace['_array_CA3_pyCAN__spikespace']) cdef int32_t _spikespace _var_glu = _namespace["_var_glu"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_glu = _namespace['_array_CA3_pyCAN_glu'] cdef double * _array_CA3_pyCAN_glu = _buf__array_CA3_pyCAN_glu.data cdef size_t _num_array_CA3_pyCAN_glu = len(_namespace['_array_CA3_pyCAN_glu']) cdef double glu if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_Cl = _namespace["_var_Cl"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_Cl = _namespace['_array_CA3_pyCAN_Cl'] cdef double * _array_CA3_pyCAN_Cl = _buf__array_CA3_pyCAN_Cl.data cdef size_t _num_array_CA3_pyCAN_Cl = len(_namespace['_array_CA3_pyCAN_Cl']) cdef double Cl _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_pyCAN__spikespace = _namespace['_array_CA3_pyCAN__spikespace'] cdef int32_t * _array_CA3_pyCAN__spikespace = _buf__array_CA3_pyCAN__spikespace.data cdef size_t _num_array_CA3_pyCAN__spikespace = len(_namespace['_array_CA3_pyCAN__spikespace']) cdef int32_t _spikespace _var_glu = _namespace["_var_glu"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_CA3_pyCAN_glu = _namespace['_array_CA3_pyCAN_glu'] cdef double * _array_CA3_pyCAN_glu = _buf__array_CA3_pyCAN_glu.data cdef size_t _num_array_CA3_pyCAN_glu = len(_namespace['_array_CA3_pyCAN_glu']) cdef double glu if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:15:29,274 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name CA3_pyCAN_resetter_codeobject 2021-11-05 15:15:29,274 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "CA3_pyCAN_reset" using Cython module "_cython_magic_b9c7ede412097fd3dd04fc2c141e71e5" 2021-11-05 15:15:29,274 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140606219307472 on /home/nikos/.cython/brian_extensions/_cython_magic_b9c7ede412097fd3dd04fc2c141e71e5.lock 2021-11-05 15:15:29,274 DEBUG brian2.utils.filelock: Lock 140606219307472 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_b9c7ede412097fd3dd04fc2c141e71e5.lock 2021-11-05 15:15:29,275 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140606219307472 on /home/nikos/.cython/brian_extensions/_cython_magic_b9c7ede412097fd3dd04fc2c141e71e5.lock 2021-11-05 15:15:29,275 DEBUG brian2.utils.filelock: Lock 140606219307472 released on /home/nikos/.cython/brian_extensions/_cython_magic_b9c7ede412097fd3dd04fc2c141e71e5.lock 2021-11-05 15:15:29,275 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=DG_py, template name=reset) for abstract code: glu = glu-0 Cl = Cl+0.2 2021-11-05 15:15:29,277 DIAGNOSTIC brian2.devices.device: DG_py_resetter_codeobject abstract code: glu = glu-0 Cl = Cl+0.2 2021-11-05 15:15:29,278 DIAGNOSTIC brian2.devices.device: DG_py_resetter_codeobject snippet (scalar): 2021-11-05 15:15:29,278 DIAGNOSTIC brian2.devices.device: DG_py_resetter_codeobject snippet (vector): glu = _array_DG_py_glu[_idx] Cl = _array_DG_py_Cl[_idx] glu *= 1 Cl += 0.2 _array_DG_py_glu[_idx] = glu _array_DG_py_Cl[_idx] = Cl 2021-11-05 15:15:29,278 DIAGNOSTIC brian2.devices.device: DG_py_resetter_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var_Cl = _namespace["_var_Cl"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_Cl = _namespace['_array_DG_py_Cl'] cdef double * _array_DG_py_Cl = _buf__array_DG_py_Cl.data cdef size_t _num_array_DG_py_Cl = len(_namespace['_array_DG_py_Cl']) cdef double Cl _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_DG_py__spikespace = _namespace['_array_DG_py__spikespace'] cdef int32_t * _array_DG_py__spikespace = _buf__array_DG_py__spikespace.data cdef size_t _num_array_DG_py__spikespace = len(_namespace['_array_DG_py__spikespace']) cdef int32_t _spikespace _var_glu = _namespace["_var_glu"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_glu = _namespace['_array_DG_py_glu'] cdef double * _array_DG_py_glu = _buf__array_DG_py_glu.data cdef size_t _num_array_DG_py_glu = len(_namespace['_array_DG_py_glu']) cdef double glu if '_owner' in _namespace: _owner = _namespace['_owner'] # scalar code _vectorisation_idx = 1 cdef size_t _num_events = _array_DG_py__spikespace[_num_array_DG_py__spikespace-1] for _index_events in range(_num_events): # vector code _idx = _array_DG_py__spikespace[_index_events] _vectorisation_idx = _idx glu = _array_DG_py_glu[_idx] Cl = _array_DG_py_Cl[_idx] glu *= 1 Cl += 0.2 _array_DG_py_glu[_idx] = glu _array_DG_py_Cl[_idx] = Cl before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_Cl = _namespace["_var_Cl"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_Cl = _namespace['_array_DG_py_Cl'] cdef double * _array_DG_py_Cl = _buf__array_DG_py_Cl.data cdef size_t _num_array_DG_py_Cl = len(_namespace['_array_DG_py_Cl']) cdef double Cl _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_DG_py__spikespace = _namespace['_array_DG_py__spikespace'] cdef int32_t * _array_DG_py__spikespace = _buf__array_DG_py__spikespace.data cdef size_t _num_array_DG_py__spikespace = len(_namespace['_array_DG_py__spikespace']) cdef int32_t _spikespace _var_glu = _namespace["_var_glu"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_glu = _namespace['_array_DG_py_glu'] cdef double * _array_DG_py_glu = _buf__array_DG_py_glu.data cdef size_t _num_array_DG_py_glu = len(_namespace['_array_DG_py_glu']) cdef double glu if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_Cl = _namespace["_var_Cl"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_Cl = _namespace['_array_DG_py_Cl'] cdef double * _array_DG_py_Cl = _buf__array_DG_py_Cl.data cdef size_t _num_array_DG_py_Cl = len(_namespace['_array_DG_py_Cl']) cdef double Cl _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_DG_py__spikespace = _namespace['_array_DG_py__spikespace'] cdef int32_t * _array_DG_py__spikespace = _buf__array_DG_py__spikespace.data cdef size_t _num_array_DG_py__spikespace = len(_namespace['_array_DG_py__spikespace']) cdef int32_t _spikespace _var_glu = _namespace["_var_glu"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_DG_py_glu = _namespace['_array_DG_py_glu'] cdef double * _array_DG_py_glu = _buf__array_DG_py_glu.data cdef size_t _num_array_DG_py_glu = len(_namespace['_array_DG_py_glu']) cdef double glu if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:15:29,278 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name DG_py_resetter_codeobject 2021-11-05 15:15:29,278 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "DG_py_reset" using Cython module "_cython_magic_f421267ea43932a17d2dfd7b401ac618" 2021-11-05 15:15:29,278 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140606219305360 on /home/nikos/.cython/brian_extensions/_cython_magic_f421267ea43932a17d2dfd7b401ac618.lock 2021-11-05 15:15:29,279 DEBUG brian2.utils.filelock: Lock 140606219305360 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_f421267ea43932a17d2dfd7b401ac618.lock 2021-11-05 15:15:29,279 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140606219305360 on /home/nikos/.cython/brian_extensions/_cython_magic_f421267ea43932a17d2dfd7b401ac618.lock 2021-11-05 15:15:29,279 DEBUG brian2.utils.filelock: Lock 140606219305360 released on /home/nikos/.cython/brian_extensions/_cython_magic_f421267ea43932a17d2dfd7b401ac618.lock 2021-11-05 15:15:29,279 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=EC_pyCAN, template name=reset) for abstract code: glu = glu-0 Cl = Cl+0.2 2021-11-05 15:15:29,282 DIAGNOSTIC brian2.devices.device: EC_pyCAN_resetter_codeobject abstract code: glu = glu-0 Cl = Cl+0.2 2021-11-05 15:15:29,282 DIAGNOSTIC brian2.devices.device: EC_pyCAN_resetter_codeobject snippet (scalar): 2021-11-05 15:15:29,282 DIAGNOSTIC brian2.devices.device: EC_pyCAN_resetter_codeobject snippet (vector): glu = _array_EC_pyCAN_glu[_idx] Cl = _array_EC_pyCAN_Cl[_idx] glu *= 1 Cl += 0.2 _array_EC_pyCAN_glu[_idx] = glu _array_EC_pyCAN_Cl[_idx] = Cl 2021-11-05 15:15:29,283 DIAGNOSTIC brian2.devices.device: EC_pyCAN_resetter_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var_Cl = _namespace["_var_Cl"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_Cl = _namespace['_array_EC_pyCAN_Cl'] cdef double * _array_EC_pyCAN_Cl = _buf__array_EC_pyCAN_Cl.data cdef size_t _num_array_EC_pyCAN_Cl = len(_namespace['_array_EC_pyCAN_Cl']) cdef double Cl _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCAN__spikespace = _namespace['_array_EC_pyCAN__spikespace'] cdef int32_t * _array_EC_pyCAN__spikespace = _buf__array_EC_pyCAN__spikespace.data cdef size_t _num_array_EC_pyCAN__spikespace = len(_namespace['_array_EC_pyCAN__spikespace']) cdef int32_t _spikespace _var_glu = _namespace["_var_glu"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_glu = _namespace['_array_EC_pyCAN_glu'] cdef double * _array_EC_pyCAN_glu = _buf__array_EC_pyCAN_glu.data cdef size_t _num_array_EC_pyCAN_glu = len(_namespace['_array_EC_pyCAN_glu']) cdef double glu if '_owner' in _namespace: _owner = _namespace['_owner'] # scalar code _vectorisation_idx = 1 cdef size_t _num_events = _array_EC_pyCAN__spikespace[_num_array_EC_pyCAN__spikespace-1] for _index_events in range(_num_events): # vector code _idx = _array_EC_pyCAN__spikespace[_index_events] _vectorisation_idx = _idx glu = _array_EC_pyCAN_glu[_idx] Cl = _array_EC_pyCAN_Cl[_idx] glu *= 1 Cl += 0.2 _array_EC_pyCAN_glu[_idx] = glu _array_EC_pyCAN_Cl[_idx] = Cl before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_Cl = _namespace["_var_Cl"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_Cl = _namespace['_array_EC_pyCAN_Cl'] cdef double * _array_EC_pyCAN_Cl = _buf__array_EC_pyCAN_Cl.data cdef size_t _num_array_EC_pyCAN_Cl = len(_namespace['_array_EC_pyCAN_Cl']) cdef double Cl _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCAN__spikespace = _namespace['_array_EC_pyCAN__spikespace'] cdef int32_t * _array_EC_pyCAN__spikespace = _buf__array_EC_pyCAN__spikespace.data cdef size_t _num_array_EC_pyCAN__spikespace = len(_namespace['_array_EC_pyCAN__spikespace']) cdef int32_t _spikespace _var_glu = _namespace["_var_glu"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_glu = _namespace['_array_EC_pyCAN_glu'] cdef double * _array_EC_pyCAN_glu = _buf__array_EC_pyCAN_glu.data cdef size_t _num_array_EC_pyCAN_glu = len(_namespace['_array_EC_pyCAN_glu']) cdef double glu if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_Cl = _namespace["_var_Cl"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_Cl = _namespace['_array_EC_pyCAN_Cl'] cdef double * _array_EC_pyCAN_Cl = _buf__array_EC_pyCAN_Cl.data cdef size_t _num_array_EC_pyCAN_Cl = len(_namespace['_array_EC_pyCAN_Cl']) cdef double Cl _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCAN__spikespace = _namespace['_array_EC_pyCAN__spikespace'] cdef int32_t * _array_EC_pyCAN__spikespace = _buf__array_EC_pyCAN__spikespace.data cdef size_t _num_array_EC_pyCAN__spikespace = len(_namespace['_array_EC_pyCAN__spikespace']) cdef int32_t _spikespace _var_glu = _namespace["_var_glu"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_EC_pyCAN_glu = _namespace['_array_EC_pyCAN_glu'] cdef double * _array_EC_pyCAN_glu = _buf__array_EC_pyCAN_glu.data cdef size_t _num_array_EC_pyCAN_glu = len(_namespace['_array_EC_pyCAN_glu']) cdef double glu if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:15:29,283 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name EC_pyCAN_resetter_codeobject 2021-11-05 15:15:29,283 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "EC_pyCAN_reset" using Cython module "_cython_magic_dcdfb95dcdde91c98dbdacc546a13c2c" 2021-11-05 15:15:29,283 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140606219306224 on /home/nikos/.cython/brian_extensions/_cython_magic_dcdfb95dcdde91c98dbdacc546a13c2c.lock 2021-11-05 15:15:29,283 DEBUG brian2.utils.filelock: Lock 140606219306224 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_dcdfb95dcdde91c98dbdacc546a13c2c.lock 2021-11-05 15:15:29,283 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140606219306224 on /home/nikos/.cython/brian_extensions/_cython_magic_dcdfb95dcdde91c98dbdacc546a13c2c.lock 2021-11-05 15:15:29,284 DEBUG brian2.utils.filelock: Lock 140606219306224 released on /home/nikos/.cython/brian_extensions/_cython_magic_dcdfb95dcdde91c98dbdacc546a13c2c.lock 2021-11-05 15:15:29,284 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=ratemonitor, template name=ratemonitor) for abstract code: 2021-11-05 15:15:29,286 DIAGNOSTIC brian2.devices.device: ratemonitor_codeobject abstract code: 2021-11-05 15:15:29,286 DIAGNOSTIC brian2.devices.device: ratemonitor_codeobject snippet (scalar): 2021-11-05 15:15:29,286 DIAGNOSTIC brian2.devices.device: ratemonitor_codeobject snippet (vector): 2021-11-05 15:15:29,286 DIAGNOSTIC brian2.devices.device: ratemonitor_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_ratemonitor_N = _namespace['_array_ratemonitor_N'] cdef int32_t * _array_ratemonitor_N = _buf__array_ratemonitor_N.data cdef int32_t N _var__clock_dt = _namespace["_var__clock_dt"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_dt = _namespace['_array_defaultclock_dt'] cdef double * _array_defaultclock_dt = _buf__array_defaultclock_dt.data cdef double _clock_dt = _namespace["_clock_dt"] _var__clock_t = _namespace["_var__clock_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double _clock_t _var__num_source_neurons = _namespace["_var__num_source_neurons"] cdef int64_t _num_source_neurons = _namespace["_num_source_neurons"] _var__source_start = _namespace["_var__source_start"] cdef int64_t _source_start = _namespace["_source_start"] _var__source_stop = _namespace["_var__source_stop"] cdef int64_t _source_stop = _namespace["_source_stop"] _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCAN__spikespace = _namespace['_array_EC_pyCAN__spikespace'] cdef int32_t * _array_EC_pyCAN__spikespace = _buf__array_EC_pyCAN__spikespace.data cdef size_t _num_array_EC_pyCAN__spikespace = len(_namespace['_array_EC_pyCAN__spikespace']) cdef int32_t _spikespace _var_rate = _namespace["_var_rate"] _dynamic_array_ratemonitor_rate = _namespace["_dynamic_array_ratemonitor_rate"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_ratemonitor_rate = _namespace['_array_ratemonitor_rate'] cdef double * _array_ratemonitor_rate = _buf__array_ratemonitor_rate.data cdef size_t _num_array_ratemonitor_rate = len(_namespace['_array_ratemonitor_rate']) cdef double rate _var_t = _namespace["_var_t"] _dynamic_array_ratemonitor_t = _namespace["_dynamic_array_ratemonitor_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_ratemonitor_t = _namespace['_array_ratemonitor_t'] cdef double * _array_ratemonitor_t = _buf__array_ratemonitor_t.data cdef size_t _num_array_ratemonitor_t = len(_namespace['_array_ratemonitor_t']) cdef double t if '_owner' in _namespace: _owner = _namespace['_owner'] cdef size_t _num_spikes = _array_EC_pyCAN__spikespace[_num_array_EC_pyCAN__spikespace-1] # For subgroups, we do not want to record all spikes # We assume that spikes are ordered cdef int _start_idx = -1 cdef int _end_idx = -1 cdef size_t _j for _j in range(_num_spikes): _idx = _array_EC_pyCAN__spikespace[_j] if _idx >= _source_start: _start_idx = _j break if _start_idx == -1: _start_idx = _num_spikes for _j in range(_start_idx, _num_spikes): _idx = _array_EC_pyCAN__spikespace[_j] if _idx >= _source_stop: _end_idx = _j break if _end_idx == -1: _end_idx =_num_spikes _num_spikes = _end_idx - _start_idx # Calculate the new length for the arrays cdef size_t _new_len = _dynamic_array_ratemonitor_t.shape[0] + 1 # Resize the arrays _owner.resize(_new_len) _array_ratemonitor_N[0] = _new_len # Set the new values _dynamic_array_ratemonitor_t.data[_new_len-1] = _array_defaultclock_t[0] _dynamic_array_ratemonitor_rate.data[_new_len-1] = _num_spikes/_array_defaultclock_dt[0]/_num_source_neurons before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_ratemonitor_N = _namespace['_array_ratemonitor_N'] cdef int32_t * _array_ratemonitor_N = _buf__array_ratemonitor_N.data cdef int32_t N _var__clock_dt = _namespace["_var__clock_dt"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_dt = _namespace['_array_defaultclock_dt'] cdef double * _array_defaultclock_dt = _buf__array_defaultclock_dt.data cdef double _clock_dt = _namespace["_clock_dt"] _var__clock_t = _namespace["_var__clock_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double _clock_t _var__num_source_neurons = _namespace["_var__num_source_neurons"] cdef int64_t _num_source_neurons = _namespace["_num_source_neurons"] _var__source_start = _namespace["_var__source_start"] cdef int64_t _source_start = _namespace["_source_start"] _var__source_stop = _namespace["_var__source_stop"] cdef int64_t _source_stop = _namespace["_source_stop"] _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCAN__spikespace = _namespace['_array_EC_pyCAN__spikespace'] cdef int32_t * _array_EC_pyCAN__spikespace = _buf__array_EC_pyCAN__spikespace.data cdef size_t _num_array_EC_pyCAN__spikespace = len(_namespace['_array_EC_pyCAN__spikespace']) cdef int32_t _spikespace _var_rate = _namespace["_var_rate"] _dynamic_array_ratemonitor_rate = _namespace["_dynamic_array_ratemonitor_rate"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_ratemonitor_rate = _namespace['_array_ratemonitor_rate'] cdef double * _array_ratemonitor_rate = _buf__array_ratemonitor_rate.data cdef size_t _num_array_ratemonitor_rate = len(_namespace['_array_ratemonitor_rate']) cdef double rate _var_t = _namespace["_var_t"] _dynamic_array_ratemonitor_t = _namespace["_dynamic_array_ratemonitor_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_ratemonitor_t = _namespace['_array_ratemonitor_t'] cdef double * _array_ratemonitor_t = _buf__array_ratemonitor_t.data cdef size_t _num_array_ratemonitor_t = len(_namespace['_array_ratemonitor_t']) cdef double t if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_ratemonitor_N = _namespace['_array_ratemonitor_N'] cdef int32_t * _array_ratemonitor_N = _buf__array_ratemonitor_N.data cdef int32_t N _var__clock_dt = _namespace["_var__clock_dt"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_dt = _namespace['_array_defaultclock_dt'] cdef double * _array_defaultclock_dt = _buf__array_defaultclock_dt.data cdef double _clock_dt = _namespace["_clock_dt"] _var__clock_t = _namespace["_var__clock_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double _clock_t _var__num_source_neurons = _namespace["_var__num_source_neurons"] cdef int64_t _num_source_neurons = _namespace["_num_source_neurons"] _var__source_start = _namespace["_var__source_start"] cdef int64_t _source_start = _namespace["_source_start"] _var__source_stop = _namespace["_var__source_stop"] cdef int64_t _source_stop = _namespace["_source_stop"] _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_pyCAN__spikespace = _namespace['_array_EC_pyCAN__spikespace'] cdef int32_t * _array_EC_pyCAN__spikespace = _buf__array_EC_pyCAN__spikespace.data cdef size_t _num_array_EC_pyCAN__spikespace = len(_namespace['_array_EC_pyCAN__spikespace']) cdef int32_t _spikespace _var_rate = _namespace["_var_rate"] _dynamic_array_ratemonitor_rate = _namespace["_dynamic_array_ratemonitor_rate"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_ratemonitor_rate = _namespace['_array_ratemonitor_rate'] cdef double * _array_ratemonitor_rate = _buf__array_ratemonitor_rate.data cdef size_t _num_array_ratemonitor_rate = len(_namespace['_array_ratemonitor_rate']) cdef double rate _var_t = _namespace["_var_t"] _dynamic_array_ratemonitor_t = _namespace["_dynamic_array_ratemonitor_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_ratemonitor_t = _namespace['_array_ratemonitor_t'] cdef double * _array_ratemonitor_t = _buf__array_ratemonitor_t.data cdef size_t _num_array_ratemonitor_t = len(_namespace['_array_ratemonitor_t']) cdef double t if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:15:29,286 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name ratemonitor_codeobject 2021-11-05 15:15:29,287 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "ratemonitor_ratemonitor" using Cython module "_cython_magic_1f2a7a0a41722b41db2db5a9f34ed8c8" 2021-11-05 15:15:29,287 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140606218966016 on /home/nikos/.cython/brian_extensions/_cython_magic_1f2a7a0a41722b41db2db5a9f34ed8c8.lock 2021-11-05 15:15:29,287 DEBUG brian2.utils.filelock: Lock 140606218966016 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_1f2a7a0a41722b41db2db5a9f34ed8c8.lock 2021-11-05 15:15:29,287 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140606218966016 on /home/nikos/.cython/brian_extensions/_cython_magic_1f2a7a0a41722b41db2db5a9f34ed8c8.lock 2021-11-05 15:15:29,287 DEBUG brian2.utils.filelock: Lock 140606218966016 released on /home/nikos/.cython/brian_extensions/_cython_magic_1f2a7a0a41722b41db2db5a9f34ed8c8.lock 2021-11-05 15:15:29,287 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=ratemonitor_1, template name=ratemonitor) for abstract code: 2021-11-05 15:15:29,288 DIAGNOSTIC brian2.devices.device: ratemonitor_1_codeobject abstract code: 2021-11-05 15:15:29,288 DIAGNOSTIC brian2.devices.device: ratemonitor_1_codeobject snippet (scalar): 2021-11-05 15:15:29,288 DIAGNOSTIC brian2.devices.device: ratemonitor_1_codeobject snippet (vector): 2021-11-05 15:15:29,289 DIAGNOSTIC brian2.devices.device: ratemonitor_1_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_ratemonitor_1_N = _namespace['_array_ratemonitor_1_N'] cdef int32_t * _array_ratemonitor_1_N = _buf__array_ratemonitor_1_N.data cdef int32_t N _var__clock_dt = _namespace["_var__clock_dt"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_dt = _namespace['_array_defaultclock_dt'] cdef double * _array_defaultclock_dt = _buf__array_defaultclock_dt.data cdef double _clock_dt = _namespace["_clock_dt"] _var__clock_t = _namespace["_var__clock_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double _clock_t _var__num_source_neurons = _namespace["_var__num_source_neurons"] cdef int64_t _num_source_neurons = _namespace["_num_source_neurons"] _var__source_start = _namespace["_var__source_start"] cdef int64_t _source_start = _namespace["_source_start"] _var__source_stop = _namespace["_var__source_stop"] cdef int64_t _source_stop = _namespace["_source_stop"] _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_DG_py__spikespace = _namespace['_array_DG_py__spikespace'] cdef int32_t * _array_DG_py__spikespace = _buf__array_DG_py__spikespace.data cdef size_t _num_array_DG_py__spikespace = len(_namespace['_array_DG_py__spikespace']) cdef int32_t _spikespace _var_rate = _namespace["_var_rate"] _dynamic_array_ratemonitor_1_rate = _namespace["_dynamic_array_ratemonitor_1_rate"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_ratemonitor_1_rate = _namespace['_array_ratemonitor_1_rate'] cdef double * _array_ratemonitor_1_rate = _buf__array_ratemonitor_1_rate.data cdef size_t _num_array_ratemonitor_1_rate = len(_namespace['_array_ratemonitor_1_rate']) cdef double rate _var_t = _namespace["_var_t"] _dynamic_array_ratemonitor_1_t = _namespace["_dynamic_array_ratemonitor_1_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_ratemonitor_1_t = _namespace['_array_ratemonitor_1_t'] cdef double * _array_ratemonitor_1_t = _buf__array_ratemonitor_1_t.data cdef size_t _num_array_ratemonitor_1_t = len(_namespace['_array_ratemonitor_1_t']) cdef double t if '_owner' in _namespace: _owner = _namespace['_owner'] cdef size_t _num_spikes = _array_DG_py__spikespace[_num_array_DG_py__spikespace-1] # For subgroups, we do not want to record all spikes # We assume that spikes are ordered cdef int _start_idx = -1 cdef int _end_idx = -1 cdef size_t _j for _j in range(_num_spikes): _idx = _array_DG_py__spikespace[_j] if _idx >= _source_start: _start_idx = _j break if _start_idx == -1: _start_idx = _num_spikes for _j in range(_start_idx, _num_spikes): _idx = _array_DG_py__spikespace[_j] if _idx >= _source_stop: _end_idx = _j break if _end_idx == -1: _end_idx =_num_spikes _num_spikes = _end_idx - _start_idx # Calculate the new length for the arrays cdef size_t _new_len = _dynamic_array_ratemonitor_1_t.shape[0] + 1 # Resize the arrays _owner.resize(_new_len) _array_ratemonitor_1_N[0] = _new_len # Set the new values _dynamic_array_ratemonitor_1_t.data[_new_len-1] = _array_defaultclock_t[0] _dynamic_array_ratemonitor_1_rate.data[_new_len-1] = _num_spikes/_array_defaultclock_dt[0]/_num_source_neurons before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_ratemonitor_1_N = _namespace['_array_ratemonitor_1_N'] cdef int32_t * _array_ratemonitor_1_N = _buf__array_ratemonitor_1_N.data cdef int32_t N _var__clock_dt = _namespace["_var__clock_dt"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_dt = _namespace['_array_defaultclock_dt'] cdef double * _array_defaultclock_dt = _buf__array_defaultclock_dt.data cdef double _clock_dt = _namespace["_clock_dt"] _var__clock_t = _namespace["_var__clock_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double _clock_t _var__num_source_neurons = _namespace["_var__num_source_neurons"] cdef int64_t _num_source_neurons = _namespace["_num_source_neurons"] _var__source_start = _namespace["_var__source_start"] cdef int64_t _source_start = _namespace["_source_start"] _var__source_stop = _namespace["_var__source_stop"] cdef int64_t _source_stop = _namespace["_source_stop"] _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_DG_py__spikespace = _namespace['_array_DG_py__spikespace'] cdef int32_t * _array_DG_py__spikespace = _buf__array_DG_py__spikespace.data cdef size_t _num_array_DG_py__spikespace = len(_namespace['_array_DG_py__spikespace']) cdef int32_t _spikespace _var_rate = _namespace["_var_rate"] _dynamic_array_ratemonitor_1_rate = _namespace["_dynamic_array_ratemonitor_1_rate"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_ratemonitor_1_rate = _namespace['_array_ratemonitor_1_rate'] cdef double * _array_ratemonitor_1_rate = _buf__array_ratemonitor_1_rate.data cdef size_t _num_array_ratemonitor_1_rate = len(_namespace['_array_ratemonitor_1_rate']) cdef double rate _var_t = _namespace["_var_t"] _dynamic_array_ratemonitor_1_t = _namespace["_dynamic_array_ratemonitor_1_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_ratemonitor_1_t = _namespace['_array_ratemonitor_1_t'] cdef double * _array_ratemonitor_1_t = _buf__array_ratemonitor_1_t.data cdef size_t _num_array_ratemonitor_1_t = len(_namespace['_array_ratemonitor_1_t']) cdef double t if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_ratemonitor_1_N = _namespace['_array_ratemonitor_1_N'] cdef int32_t * _array_ratemonitor_1_N = _buf__array_ratemonitor_1_N.data cdef int32_t N _var__clock_dt = _namespace["_var__clock_dt"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_dt = _namespace['_array_defaultclock_dt'] cdef double * _array_defaultclock_dt = _buf__array_defaultclock_dt.data cdef double _clock_dt = _namespace["_clock_dt"] _var__clock_t = _namespace["_var__clock_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double _clock_t _var__num_source_neurons = _namespace["_var__num_source_neurons"] cdef int64_t _num_source_neurons = _namespace["_num_source_neurons"] _var__source_start = _namespace["_var__source_start"] cdef int64_t _source_start = _namespace["_source_start"] _var__source_stop = _namespace["_var__source_stop"] cdef int64_t _source_stop = _namespace["_source_stop"] _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_DG_py__spikespace = _namespace['_array_DG_py__spikespace'] cdef int32_t * _array_DG_py__spikespace = _buf__array_DG_py__spikespace.data cdef size_t _num_array_DG_py__spikespace = len(_namespace['_array_DG_py__spikespace']) cdef int32_t _spikespace _var_rate = _namespace["_var_rate"] _dynamic_array_ratemonitor_1_rate = _namespace["_dynamic_array_ratemonitor_1_rate"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_ratemonitor_1_rate = _namespace['_array_ratemonitor_1_rate'] cdef double * _array_ratemonitor_1_rate = _buf__array_ratemonitor_1_rate.data cdef size_t _num_array_ratemonitor_1_rate = len(_namespace['_array_ratemonitor_1_rate']) cdef double rate _var_t = _namespace["_var_t"] _dynamic_array_ratemonitor_1_t = _namespace["_dynamic_array_ratemonitor_1_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_ratemonitor_1_t = _namespace['_array_ratemonitor_1_t'] cdef double * _array_ratemonitor_1_t = _buf__array_ratemonitor_1_t.data cdef size_t _num_array_ratemonitor_1_t = len(_namespace['_array_ratemonitor_1_t']) cdef double t if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:15:29,289 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name ratemonitor_1_codeobject 2021-11-05 15:15:29,289 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "ratemonitor_1_ratemonitor" using Cython module "_cython_magic_28ac7792c3a3a65d05c0119c87fa6f88" 2021-11-05 15:15:29,289 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140606218967072 on /home/nikos/.cython/brian_extensions/_cython_magic_28ac7792c3a3a65d05c0119c87fa6f88.lock 2021-11-05 15:15:29,289 DEBUG brian2.utils.filelock: Lock 140606218967072 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_28ac7792c3a3a65d05c0119c87fa6f88.lock 2021-11-05 15:15:29,289 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140606218967072 on /home/nikos/.cython/brian_extensions/_cython_magic_28ac7792c3a3a65d05c0119c87fa6f88.lock 2021-11-05 15:15:29,289 DEBUG brian2.utils.filelock: Lock 140606218967072 released on /home/nikos/.cython/brian_extensions/_cython_magic_28ac7792c3a3a65d05c0119c87fa6f88.lock 2021-11-05 15:15:29,289 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=ratemonitor_2, template name=ratemonitor) for abstract code: 2021-11-05 15:15:29,290 DIAGNOSTIC brian2.devices.device: ratemonitor_2_codeobject abstract code: 2021-11-05 15:15:29,291 DIAGNOSTIC brian2.devices.device: ratemonitor_2_codeobject snippet (scalar): 2021-11-05 15:15:29,291 DIAGNOSTIC brian2.devices.device: ratemonitor_2_codeobject snippet (vector): 2021-11-05 15:15:29,291 DIAGNOSTIC brian2.devices.device: ratemonitor_2_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_ratemonitor_2_N = _namespace['_array_ratemonitor_2_N'] cdef int32_t * _array_ratemonitor_2_N = _buf__array_ratemonitor_2_N.data cdef int32_t N _var__clock_dt = _namespace["_var__clock_dt"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_dt = _namespace['_array_defaultclock_dt'] cdef double * _array_defaultclock_dt = _buf__array_defaultclock_dt.data cdef double _clock_dt = _namespace["_clock_dt"] _var__clock_t = _namespace["_var__clock_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double _clock_t _var__num_source_neurons = _namespace["_var__num_source_neurons"] cdef int64_t _num_source_neurons = _namespace["_num_source_neurons"] _var__source_start = _namespace["_var__source_start"] cdef int64_t _source_start = _namespace["_source_start"] _var__source_stop = _namespace["_var__source_stop"] cdef int64_t _source_stop = _namespace["_source_stop"] _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_pyCAN__spikespace = _namespace['_array_CA3_pyCAN__spikespace'] cdef int32_t * _array_CA3_pyCAN__spikespace = _buf__array_CA3_pyCAN__spikespace.data cdef size_t _num_array_CA3_pyCAN__spikespace = len(_namespace['_array_CA3_pyCAN__spikespace']) cdef int32_t _spikespace _var_rate = _namespace["_var_rate"] _dynamic_array_ratemonitor_2_rate = _namespace["_dynamic_array_ratemonitor_2_rate"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_ratemonitor_2_rate = _namespace['_array_ratemonitor_2_rate'] cdef double * _array_ratemonitor_2_rate = _buf__array_ratemonitor_2_rate.data cdef size_t _num_array_ratemonitor_2_rate = len(_namespace['_array_ratemonitor_2_rate']) cdef double rate _var_t = _namespace["_var_t"] _dynamic_array_ratemonitor_2_t = _namespace["_dynamic_array_ratemonitor_2_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_ratemonitor_2_t = _namespace['_array_ratemonitor_2_t'] cdef double * _array_ratemonitor_2_t = _buf__array_ratemonitor_2_t.data cdef size_t _num_array_ratemonitor_2_t = len(_namespace['_array_ratemonitor_2_t']) cdef double t if '_owner' in _namespace: _owner = _namespace['_owner'] cdef size_t _num_spikes = _array_CA3_pyCAN__spikespace[_num_array_CA3_pyCAN__spikespace-1] # For subgroups, we do not want to record all spikes # We assume that spikes are ordered cdef int _start_idx = -1 cdef int _end_idx = -1 cdef size_t _j for _j in range(_num_spikes): _idx = _array_CA3_pyCAN__spikespace[_j] if _idx >= _source_start: _start_idx = _j break if _start_idx == -1: _start_idx = _num_spikes for _j in range(_start_idx, _num_spikes): _idx = _array_CA3_pyCAN__spikespace[_j] if _idx >= _source_stop: _end_idx = _j break if _end_idx == -1: _end_idx =_num_spikes _num_spikes = _end_idx - _start_idx # Calculate the new length for the arrays cdef size_t _new_len = _dynamic_array_ratemonitor_2_t.shape[0] + 1 # Resize the arrays _owner.resize(_new_len) _array_ratemonitor_2_N[0] = _new_len # Set the new values _dynamic_array_ratemonitor_2_t.data[_new_len-1] = _array_defaultclock_t[0] _dynamic_array_ratemonitor_2_rate.data[_new_len-1] = _num_spikes/_array_defaultclock_dt[0]/_num_source_neurons before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_ratemonitor_2_N = _namespace['_array_ratemonitor_2_N'] cdef int32_t * _array_ratemonitor_2_N = _buf__array_ratemonitor_2_N.data cdef int32_t N _var__clock_dt = _namespace["_var__clock_dt"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_dt = _namespace['_array_defaultclock_dt'] cdef double * _array_defaultclock_dt = _buf__array_defaultclock_dt.data cdef double _clock_dt = _namespace["_clock_dt"] _var__clock_t = _namespace["_var__clock_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double _clock_t _var__num_source_neurons = _namespace["_var__num_source_neurons"] cdef int64_t _num_source_neurons = _namespace["_num_source_neurons"] _var__source_start = _namespace["_var__source_start"] cdef int64_t _source_start = _namespace["_source_start"] _var__source_stop = _namespace["_var__source_stop"] cdef int64_t _source_stop = _namespace["_source_stop"] _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_pyCAN__spikespace = _namespace['_array_CA3_pyCAN__spikespace'] cdef int32_t * _array_CA3_pyCAN__spikespace = _buf__array_CA3_pyCAN__spikespace.data cdef size_t _num_array_CA3_pyCAN__spikespace = len(_namespace['_array_CA3_pyCAN__spikespace']) cdef int32_t _spikespace _var_rate = _namespace["_var_rate"] _dynamic_array_ratemonitor_2_rate = _namespace["_dynamic_array_ratemonitor_2_rate"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_ratemonitor_2_rate = _namespace['_array_ratemonitor_2_rate'] cdef double * _array_ratemonitor_2_rate = _buf__array_ratemonitor_2_rate.data cdef size_t _num_array_ratemonitor_2_rate = len(_namespace['_array_ratemonitor_2_rate']) cdef double rate _var_t = _namespace["_var_t"] _dynamic_array_ratemonitor_2_t = _namespace["_dynamic_array_ratemonitor_2_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_ratemonitor_2_t = _namespace['_array_ratemonitor_2_t'] cdef double * _array_ratemonitor_2_t = _buf__array_ratemonitor_2_t.data cdef size_t _num_array_ratemonitor_2_t = len(_namespace['_array_ratemonitor_2_t']) cdef double t if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_ratemonitor_2_N = _namespace['_array_ratemonitor_2_N'] cdef int32_t * _array_ratemonitor_2_N = _buf__array_ratemonitor_2_N.data cdef int32_t N _var__clock_dt = _namespace["_var__clock_dt"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_dt = _namespace['_array_defaultclock_dt'] cdef double * _array_defaultclock_dt = _buf__array_defaultclock_dt.data cdef double _clock_dt = _namespace["_clock_dt"] _var__clock_t = _namespace["_var__clock_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double _clock_t _var__num_source_neurons = _namespace["_var__num_source_neurons"] cdef int64_t _num_source_neurons = _namespace["_num_source_neurons"] _var__source_start = _namespace["_var__source_start"] cdef int64_t _source_start = _namespace["_source_start"] _var__source_stop = _namespace["_var__source_stop"] cdef int64_t _source_stop = _namespace["_source_stop"] _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_pyCAN__spikespace = _namespace['_array_CA3_pyCAN__spikespace'] cdef int32_t * _array_CA3_pyCAN__spikespace = _buf__array_CA3_pyCAN__spikespace.data cdef size_t _num_array_CA3_pyCAN__spikespace = len(_namespace['_array_CA3_pyCAN__spikespace']) cdef int32_t _spikespace _var_rate = _namespace["_var_rate"] _dynamic_array_ratemonitor_2_rate = _namespace["_dynamic_array_ratemonitor_2_rate"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_ratemonitor_2_rate = _namespace['_array_ratemonitor_2_rate'] cdef double * _array_ratemonitor_2_rate = _buf__array_ratemonitor_2_rate.data cdef size_t _num_array_ratemonitor_2_rate = len(_namespace['_array_ratemonitor_2_rate']) cdef double rate _var_t = _namespace["_var_t"] _dynamic_array_ratemonitor_2_t = _namespace["_dynamic_array_ratemonitor_2_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_ratemonitor_2_t = _namespace['_array_ratemonitor_2_t'] cdef double * _array_ratemonitor_2_t = _buf__array_ratemonitor_2_t.data cdef size_t _num_array_ratemonitor_2_t = len(_namespace['_array_ratemonitor_2_t']) cdef double t if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:15:29,291 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name ratemonitor_2_codeobject 2021-11-05 15:15:29,291 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "ratemonitor_2_ratemonitor" using Cython module "_cython_magic_ab1dd47dccce69de305ac21e688327be" 2021-11-05 15:15:29,292 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140606328620896 on /home/nikos/.cython/brian_extensions/_cython_magic_ab1dd47dccce69de305ac21e688327be.lock 2021-11-05 15:15:29,292 DEBUG brian2.utils.filelock: Lock 140606328620896 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_ab1dd47dccce69de305ac21e688327be.lock 2021-11-05 15:15:29,292 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140606328620896 on /home/nikos/.cython/brian_extensions/_cython_magic_ab1dd47dccce69de305ac21e688327be.lock 2021-11-05 15:15:29,292 DEBUG brian2.utils.filelock: Lock 140606328620896 released on /home/nikos/.cython/brian_extensions/_cython_magic_ab1dd47dccce69de305ac21e688327be.lock 2021-11-05 15:15:29,292 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=ratemonitor_3, template name=ratemonitor) for abstract code: 2021-11-05 15:15:29,292 DIAGNOSTIC brian2.devices.device: ratemonitor_3_codeobject abstract code: 2021-11-05 15:15:29,293 DIAGNOSTIC brian2.devices.device: ratemonitor_3_codeobject snippet (scalar): 2021-11-05 15:15:29,293 DIAGNOSTIC brian2.devices.device: ratemonitor_3_codeobject snippet (vector): 2021-11-05 15:15:29,293 DIAGNOSTIC brian2.devices.device: ratemonitor_3_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_ratemonitor_3_N = _namespace['_array_ratemonitor_3_N'] cdef int32_t * _array_ratemonitor_3_N = _buf__array_ratemonitor_3_N.data cdef int32_t N _var__clock_dt = _namespace["_var__clock_dt"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_dt = _namespace['_array_defaultclock_dt'] cdef double * _array_defaultclock_dt = _buf__array_defaultclock_dt.data cdef double _clock_dt = _namespace["_clock_dt"] _var__clock_t = _namespace["_var__clock_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double _clock_t _var__num_source_neurons = _namespace["_var__num_source_neurons"] cdef int64_t _num_source_neurons = _namespace["_num_source_neurons"] _var__source_start = _namespace["_var__source_start"] cdef int64_t _source_start = _namespace["_source_start"] _var__source_stop = _namespace["_var__source_stop"] cdef int64_t _source_stop = _namespace["_source_stop"] _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_pyCAN__spikespace = _namespace['_array_CA1_pyCAN__spikespace'] cdef int32_t * _array_CA1_pyCAN__spikespace = _buf__array_CA1_pyCAN__spikespace.data cdef size_t _num_array_CA1_pyCAN__spikespace = len(_namespace['_array_CA1_pyCAN__spikespace']) cdef int32_t _spikespace _var_rate = _namespace["_var_rate"] _dynamic_array_ratemonitor_3_rate = _namespace["_dynamic_array_ratemonitor_3_rate"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_ratemonitor_3_rate = _namespace['_array_ratemonitor_3_rate'] cdef double * _array_ratemonitor_3_rate = _buf__array_ratemonitor_3_rate.data cdef size_t _num_array_ratemonitor_3_rate = len(_namespace['_array_ratemonitor_3_rate']) cdef double rate _var_t = _namespace["_var_t"] _dynamic_array_ratemonitor_3_t = _namespace["_dynamic_array_ratemonitor_3_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_ratemonitor_3_t = _namespace['_array_ratemonitor_3_t'] cdef double * _array_ratemonitor_3_t = _buf__array_ratemonitor_3_t.data cdef size_t _num_array_ratemonitor_3_t = len(_namespace['_array_ratemonitor_3_t']) cdef double t if '_owner' in _namespace: _owner = _namespace['_owner'] cdef size_t _num_spikes = _array_CA1_pyCAN__spikespace[_num_array_CA1_pyCAN__spikespace-1] # For subgroups, we do not want to record all spikes # We assume that spikes are ordered cdef int _start_idx = -1 cdef int _end_idx = -1 cdef size_t _j for _j in range(_num_spikes): _idx = _array_CA1_pyCAN__spikespace[_j] if _idx >= _source_start: _start_idx = _j break if _start_idx == -1: _start_idx = _num_spikes for _j in range(_start_idx, _num_spikes): _idx = _array_CA1_pyCAN__spikespace[_j] if _idx >= _source_stop: _end_idx = _j break if _end_idx == -1: _end_idx =_num_spikes _num_spikes = _end_idx - _start_idx # Calculate the new length for the arrays cdef size_t _new_len = _dynamic_array_ratemonitor_3_t.shape[0] + 1 # Resize the arrays _owner.resize(_new_len) _array_ratemonitor_3_N[0] = _new_len # Set the new values _dynamic_array_ratemonitor_3_t.data[_new_len-1] = _array_defaultclock_t[0] _dynamic_array_ratemonitor_3_rate.data[_new_len-1] = _num_spikes/_array_defaultclock_dt[0]/_num_source_neurons before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_ratemonitor_3_N = _namespace['_array_ratemonitor_3_N'] cdef int32_t * _array_ratemonitor_3_N = _buf__array_ratemonitor_3_N.data cdef int32_t N _var__clock_dt = _namespace["_var__clock_dt"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_dt = _namespace['_array_defaultclock_dt'] cdef double * _array_defaultclock_dt = _buf__array_defaultclock_dt.data cdef double _clock_dt = _namespace["_clock_dt"] _var__clock_t = _namespace["_var__clock_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double _clock_t _var__num_source_neurons = _namespace["_var__num_source_neurons"] cdef int64_t _num_source_neurons = _namespace["_num_source_neurons"] _var__source_start = _namespace["_var__source_start"] cdef int64_t _source_start = _namespace["_source_start"] _var__source_stop = _namespace["_var__source_stop"] cdef int64_t _source_stop = _namespace["_source_stop"] _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_pyCAN__spikespace = _namespace['_array_CA1_pyCAN__spikespace'] cdef int32_t * _array_CA1_pyCAN__spikespace = _buf__array_CA1_pyCAN__spikespace.data cdef size_t _num_array_CA1_pyCAN__spikespace = len(_namespace['_array_CA1_pyCAN__spikespace']) cdef int32_t _spikespace _var_rate = _namespace["_var_rate"] _dynamic_array_ratemonitor_3_rate = _namespace["_dynamic_array_ratemonitor_3_rate"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_ratemonitor_3_rate = _namespace['_array_ratemonitor_3_rate'] cdef double * _array_ratemonitor_3_rate = _buf__array_ratemonitor_3_rate.data cdef size_t _num_array_ratemonitor_3_rate = len(_namespace['_array_ratemonitor_3_rate']) cdef double rate _var_t = _namespace["_var_t"] _dynamic_array_ratemonitor_3_t = _namespace["_dynamic_array_ratemonitor_3_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_ratemonitor_3_t = _namespace['_array_ratemonitor_3_t'] cdef double * _array_ratemonitor_3_t = _buf__array_ratemonitor_3_t.data cdef size_t _num_array_ratemonitor_3_t = len(_namespace['_array_ratemonitor_3_t']) cdef double t if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_ratemonitor_3_N = _namespace['_array_ratemonitor_3_N'] cdef int32_t * _array_ratemonitor_3_N = _buf__array_ratemonitor_3_N.data cdef int32_t N _var__clock_dt = _namespace["_var__clock_dt"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_dt = _namespace['_array_defaultclock_dt'] cdef double * _array_defaultclock_dt = _buf__array_defaultclock_dt.data cdef double _clock_dt = _namespace["_clock_dt"] _var__clock_t = _namespace["_var__clock_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double _clock_t _var__num_source_neurons = _namespace["_var__num_source_neurons"] cdef int64_t _num_source_neurons = _namespace["_num_source_neurons"] _var__source_start = _namespace["_var__source_start"] cdef int64_t _source_start = _namespace["_source_start"] _var__source_stop = _namespace["_var__source_stop"] cdef int64_t _source_stop = _namespace["_source_stop"] _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_pyCAN__spikespace = _namespace['_array_CA1_pyCAN__spikespace'] cdef int32_t * _array_CA1_pyCAN__spikespace = _buf__array_CA1_pyCAN__spikespace.data cdef size_t _num_array_CA1_pyCAN__spikespace = len(_namespace['_array_CA1_pyCAN__spikespace']) cdef int32_t _spikespace _var_rate = _namespace["_var_rate"] _dynamic_array_ratemonitor_3_rate = _namespace["_dynamic_array_ratemonitor_3_rate"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_ratemonitor_3_rate = _namespace['_array_ratemonitor_3_rate'] cdef double * _array_ratemonitor_3_rate = _buf__array_ratemonitor_3_rate.data cdef size_t _num_array_ratemonitor_3_rate = len(_namespace['_array_ratemonitor_3_rate']) cdef double rate _var_t = _namespace["_var_t"] _dynamic_array_ratemonitor_3_t = _namespace["_dynamic_array_ratemonitor_3_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_ratemonitor_3_t = _namespace['_array_ratemonitor_3_t'] cdef double * _array_ratemonitor_3_t = _buf__array_ratemonitor_3_t.data cdef size_t _num_array_ratemonitor_3_t = len(_namespace['_array_ratemonitor_3_t']) cdef double t if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:15:29,293 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name ratemonitor_3_codeobject 2021-11-05 15:15:29,294 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "ratemonitor_3_ratemonitor" using Cython module "_cython_magic_3f12faca3b154c58f0c891071a7305f4" 2021-11-05 15:15:29,294 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140606328619168 on /home/nikos/.cython/brian_extensions/_cython_magic_3f12faca3b154c58f0c891071a7305f4.lock 2021-11-05 15:15:29,294 DEBUG brian2.utils.filelock: Lock 140606328619168 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_3f12faca3b154c58f0c891071a7305f4.lock 2021-11-05 15:15:29,294 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140606328619168 on /home/nikos/.cython/brian_extensions/_cython_magic_3f12faca3b154c58f0c891071a7305f4.lock 2021-11-05 15:15:29,294 DEBUG brian2.utils.filelock: Lock 140606328619168 released on /home/nikos/.cython/brian_extensions/_cython_magic_3f12faca3b154c58f0c891071a7305f4.lock 2021-11-05 15:15:29,294 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=ratemonitor_4, template name=ratemonitor) for abstract code: 2021-11-05 15:15:29,295 DIAGNOSTIC brian2.devices.device: ratemonitor_4_codeobject abstract code: 2021-11-05 15:15:29,295 DIAGNOSTIC brian2.devices.device: ratemonitor_4_codeobject snippet (scalar): 2021-11-05 15:15:29,295 DIAGNOSTIC brian2.devices.device: ratemonitor_4_codeobject snippet (vector): 2021-11-05 15:15:29,295 DIAGNOSTIC brian2.devices.device: ratemonitor_4_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_ratemonitor_4_N = _namespace['_array_ratemonitor_4_N'] cdef int32_t * _array_ratemonitor_4_N = _buf__array_ratemonitor_4_N.data cdef int32_t N _var__clock_dt = _namespace["_var__clock_dt"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_dt = _namespace['_array_defaultclock_dt'] cdef double * _array_defaultclock_dt = _buf__array_defaultclock_dt.data cdef double _clock_dt = _namespace["_clock_dt"] _var__clock_t = _namespace["_var__clock_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double _clock_t _var__num_source_neurons = _namespace["_var__num_source_neurons"] cdef int64_t _num_source_neurons = _namespace["_num_source_neurons"] _var__source_start = _namespace["_var__source_start"] cdef int64_t _source_start = _namespace["_source_start"] _var__source_stop = _namespace["_var__source_stop"] cdef int64_t _source_stop = _namespace["_source_stop"] _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_inh__spikespace = _namespace['_array_EC_inh__spikespace'] cdef int32_t * _array_EC_inh__spikespace = _buf__array_EC_inh__spikespace.data cdef size_t _num_array_EC_inh__spikespace = len(_namespace['_array_EC_inh__spikespace']) cdef int32_t _spikespace _var_rate = _namespace["_var_rate"] _dynamic_array_ratemonitor_4_rate = _namespace["_dynamic_array_ratemonitor_4_rate"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_ratemonitor_4_rate = _namespace['_array_ratemonitor_4_rate'] cdef double * _array_ratemonitor_4_rate = _buf__array_ratemonitor_4_rate.data cdef size_t _num_array_ratemonitor_4_rate = len(_namespace['_array_ratemonitor_4_rate']) cdef double rate _var_t = _namespace["_var_t"] _dynamic_array_ratemonitor_4_t = _namespace["_dynamic_array_ratemonitor_4_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_ratemonitor_4_t = _namespace['_array_ratemonitor_4_t'] cdef double * _array_ratemonitor_4_t = _buf__array_ratemonitor_4_t.data cdef size_t _num_array_ratemonitor_4_t = len(_namespace['_array_ratemonitor_4_t']) cdef double t if '_owner' in _namespace: _owner = _namespace['_owner'] cdef size_t _num_spikes = _array_EC_inh__spikespace[_num_array_EC_inh__spikespace-1] # For subgroups, we do not want to record all spikes # We assume that spikes are ordered cdef int _start_idx = -1 cdef int _end_idx = -1 cdef size_t _j for _j in range(_num_spikes): _idx = _array_EC_inh__spikespace[_j] if _idx >= _source_start: _start_idx = _j break if _start_idx == -1: _start_idx = _num_spikes for _j in range(_start_idx, _num_spikes): _idx = _array_EC_inh__spikespace[_j] if _idx >= _source_stop: _end_idx = _j break if _end_idx == -1: _end_idx =_num_spikes _num_spikes = _end_idx - _start_idx # Calculate the new length for the arrays cdef size_t _new_len = _dynamic_array_ratemonitor_4_t.shape[0] + 1 # Resize the arrays _owner.resize(_new_len) _array_ratemonitor_4_N[0] = _new_len # Set the new values _dynamic_array_ratemonitor_4_t.data[_new_len-1] = _array_defaultclock_t[0] _dynamic_array_ratemonitor_4_rate.data[_new_len-1] = _num_spikes/_array_defaultclock_dt[0]/_num_source_neurons before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_ratemonitor_4_N = _namespace['_array_ratemonitor_4_N'] cdef int32_t * _array_ratemonitor_4_N = _buf__array_ratemonitor_4_N.data cdef int32_t N _var__clock_dt = _namespace["_var__clock_dt"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_dt = _namespace['_array_defaultclock_dt'] cdef double * _array_defaultclock_dt = _buf__array_defaultclock_dt.data cdef double _clock_dt = _namespace["_clock_dt"] _var__clock_t = _namespace["_var__clock_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double _clock_t _var__num_source_neurons = _namespace["_var__num_source_neurons"] cdef int64_t _num_source_neurons = _namespace["_num_source_neurons"] _var__source_start = _namespace["_var__source_start"] cdef int64_t _source_start = _namespace["_source_start"] _var__source_stop = _namespace["_var__source_stop"] cdef int64_t _source_stop = _namespace["_source_stop"] _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_inh__spikespace = _namespace['_array_EC_inh__spikespace'] cdef int32_t * _array_EC_inh__spikespace = _buf__array_EC_inh__spikespace.data cdef size_t _num_array_EC_inh__spikespace = len(_namespace['_array_EC_inh__spikespace']) cdef int32_t _spikespace _var_rate = _namespace["_var_rate"] _dynamic_array_ratemonitor_4_rate = _namespace["_dynamic_array_ratemonitor_4_rate"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_ratemonitor_4_rate = _namespace['_array_ratemonitor_4_rate'] cdef double * _array_ratemonitor_4_rate = _buf__array_ratemonitor_4_rate.data cdef size_t _num_array_ratemonitor_4_rate = len(_namespace['_array_ratemonitor_4_rate']) cdef double rate _var_t = _namespace["_var_t"] _dynamic_array_ratemonitor_4_t = _namespace["_dynamic_array_ratemonitor_4_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_ratemonitor_4_t = _namespace['_array_ratemonitor_4_t'] cdef double * _array_ratemonitor_4_t = _buf__array_ratemonitor_4_t.data cdef size_t _num_array_ratemonitor_4_t = len(_namespace['_array_ratemonitor_4_t']) cdef double t if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_ratemonitor_4_N = _namespace['_array_ratemonitor_4_N'] cdef int32_t * _array_ratemonitor_4_N = _buf__array_ratemonitor_4_N.data cdef int32_t N _var__clock_dt = _namespace["_var__clock_dt"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_dt = _namespace['_array_defaultclock_dt'] cdef double * _array_defaultclock_dt = _buf__array_defaultclock_dt.data cdef double _clock_dt = _namespace["_clock_dt"] _var__clock_t = _namespace["_var__clock_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double _clock_t _var__num_source_neurons = _namespace["_var__num_source_neurons"] cdef int64_t _num_source_neurons = _namespace["_num_source_neurons"] _var__source_start = _namespace["_var__source_start"] cdef int64_t _source_start = _namespace["_source_start"] _var__source_stop = _namespace["_var__source_stop"] cdef int64_t _source_stop = _namespace["_source_stop"] _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_EC_inh__spikespace = _namespace['_array_EC_inh__spikespace'] cdef int32_t * _array_EC_inh__spikespace = _buf__array_EC_inh__spikespace.data cdef size_t _num_array_EC_inh__spikespace = len(_namespace['_array_EC_inh__spikespace']) cdef int32_t _spikespace _var_rate = _namespace["_var_rate"] _dynamic_array_ratemonitor_4_rate = _namespace["_dynamic_array_ratemonitor_4_rate"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_ratemonitor_4_rate = _namespace['_array_ratemonitor_4_rate'] cdef double * _array_ratemonitor_4_rate = _buf__array_ratemonitor_4_rate.data cdef size_t _num_array_ratemonitor_4_rate = len(_namespace['_array_ratemonitor_4_rate']) cdef double rate _var_t = _namespace["_var_t"] _dynamic_array_ratemonitor_4_t = _namespace["_dynamic_array_ratemonitor_4_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_ratemonitor_4_t = _namespace['_array_ratemonitor_4_t'] cdef double * _array_ratemonitor_4_t = _buf__array_ratemonitor_4_t.data cdef size_t _num_array_ratemonitor_4_t = len(_namespace['_array_ratemonitor_4_t']) cdef double t if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:15:29,296 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name ratemonitor_4_codeobject 2021-11-05 15:15:29,296 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "ratemonitor_4_ratemonitor" using Cython module "_cython_magic_cccecdf7c86812798f73dd38d0560f8b" 2021-11-05 15:15:29,296 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140606328620224 on /home/nikos/.cython/brian_extensions/_cython_magic_cccecdf7c86812798f73dd38d0560f8b.lock 2021-11-05 15:15:29,296 DEBUG brian2.utils.filelock: Lock 140606328620224 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_cccecdf7c86812798f73dd38d0560f8b.lock 2021-11-05 15:15:29,296 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140606328620224 on /home/nikos/.cython/brian_extensions/_cython_magic_cccecdf7c86812798f73dd38d0560f8b.lock 2021-11-05 15:15:29,296 DEBUG brian2.utils.filelock: Lock 140606328620224 released on /home/nikos/.cython/brian_extensions/_cython_magic_cccecdf7c86812798f73dd38d0560f8b.lock 2021-11-05 15:15:29,296 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=ratemonitor_5, template name=ratemonitor) for abstract code: 2021-11-05 15:15:29,297 DIAGNOSTIC brian2.devices.device: ratemonitor_5_codeobject abstract code: 2021-11-05 15:15:29,297 DIAGNOSTIC brian2.devices.device: ratemonitor_5_codeobject snippet (scalar): 2021-11-05 15:15:29,298 DIAGNOSTIC brian2.devices.device: ratemonitor_5_codeobject snippet (vector): 2021-11-05 15:15:29,298 DIAGNOSTIC brian2.devices.device: ratemonitor_5_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_ratemonitor_5_N = _namespace['_array_ratemonitor_5_N'] cdef int32_t * _array_ratemonitor_5_N = _buf__array_ratemonitor_5_N.data cdef int32_t N _var__clock_dt = _namespace["_var__clock_dt"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_dt = _namespace['_array_defaultclock_dt'] cdef double * _array_defaultclock_dt = _buf__array_defaultclock_dt.data cdef double _clock_dt = _namespace["_clock_dt"] _var__clock_t = _namespace["_var__clock_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double _clock_t _var__num_source_neurons = _namespace["_var__num_source_neurons"] cdef int64_t _num_source_neurons = _namespace["_num_source_neurons"] _var__source_start = _namespace["_var__source_start"] cdef int64_t _source_start = _namespace["_source_start"] _var__source_stop = _namespace["_var__source_stop"] cdef int64_t _source_stop = _namespace["_source_stop"] _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_DG_inh__spikespace = _namespace['_array_DG_inh__spikespace'] cdef int32_t * _array_DG_inh__spikespace = _buf__array_DG_inh__spikespace.data cdef size_t _num_array_DG_inh__spikespace = len(_namespace['_array_DG_inh__spikespace']) cdef int32_t _spikespace _var_rate = _namespace["_var_rate"] _dynamic_array_ratemonitor_5_rate = _namespace["_dynamic_array_ratemonitor_5_rate"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_ratemonitor_5_rate = _namespace['_array_ratemonitor_5_rate'] cdef double * _array_ratemonitor_5_rate = _buf__array_ratemonitor_5_rate.data cdef size_t _num_array_ratemonitor_5_rate = len(_namespace['_array_ratemonitor_5_rate']) cdef double rate _var_t = _namespace["_var_t"] _dynamic_array_ratemonitor_5_t = _namespace["_dynamic_array_ratemonitor_5_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_ratemonitor_5_t = _namespace['_array_ratemonitor_5_t'] cdef double * _array_ratemonitor_5_t = _buf__array_ratemonitor_5_t.data cdef size_t _num_array_ratemonitor_5_t = len(_namespace['_array_ratemonitor_5_t']) cdef double t if '_owner' in _namespace: _owner = _namespace['_owner'] cdef size_t _num_spikes = _array_DG_inh__spikespace[_num_array_DG_inh__spikespace-1] # For subgroups, we do not want to record all spikes # We assume that spikes are ordered cdef int _start_idx = -1 cdef int _end_idx = -1 cdef size_t _j for _j in range(_num_spikes): _idx = _array_DG_inh__spikespace[_j] if _idx >= _source_start: _start_idx = _j break if _start_idx == -1: _start_idx = _num_spikes for _j in range(_start_idx, _num_spikes): _idx = _array_DG_inh__spikespace[_j] if _idx >= _source_stop: _end_idx = _j break if _end_idx == -1: _end_idx =_num_spikes _num_spikes = _end_idx - _start_idx # Calculate the new length for the arrays cdef size_t _new_len = _dynamic_array_ratemonitor_5_t.shape[0] + 1 # Resize the arrays _owner.resize(_new_len) _array_ratemonitor_5_N[0] = _new_len # Set the new values _dynamic_array_ratemonitor_5_t.data[_new_len-1] = _array_defaultclock_t[0] _dynamic_array_ratemonitor_5_rate.data[_new_len-1] = _num_spikes/_array_defaultclock_dt[0]/_num_source_neurons before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_ratemonitor_5_N = _namespace['_array_ratemonitor_5_N'] cdef int32_t * _array_ratemonitor_5_N = _buf__array_ratemonitor_5_N.data cdef int32_t N _var__clock_dt = _namespace["_var__clock_dt"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_dt = _namespace['_array_defaultclock_dt'] cdef double * _array_defaultclock_dt = _buf__array_defaultclock_dt.data cdef double _clock_dt = _namespace["_clock_dt"] _var__clock_t = _namespace["_var__clock_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double _clock_t _var__num_source_neurons = _namespace["_var__num_source_neurons"] cdef int64_t _num_source_neurons = _namespace["_num_source_neurons"] _var__source_start = _namespace["_var__source_start"] cdef int64_t _source_start = _namespace["_source_start"] _var__source_stop = _namespace["_var__source_stop"] cdef int64_t _source_stop = _namespace["_source_stop"] _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_DG_inh__spikespace = _namespace['_array_DG_inh__spikespace'] cdef int32_t * _array_DG_inh__spikespace = _buf__array_DG_inh__spikespace.data cdef size_t _num_array_DG_inh__spikespace = len(_namespace['_array_DG_inh__spikespace']) cdef int32_t _spikespace _var_rate = _namespace["_var_rate"] _dynamic_array_ratemonitor_5_rate = _namespace["_dynamic_array_ratemonitor_5_rate"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_ratemonitor_5_rate = _namespace['_array_ratemonitor_5_rate'] cdef double * _array_ratemonitor_5_rate = _buf__array_ratemonitor_5_rate.data cdef size_t _num_array_ratemonitor_5_rate = len(_namespace['_array_ratemonitor_5_rate']) cdef double rate _var_t = _namespace["_var_t"] _dynamic_array_ratemonitor_5_t = _namespace["_dynamic_array_ratemonitor_5_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_ratemonitor_5_t = _namespace['_array_ratemonitor_5_t'] cdef double * _array_ratemonitor_5_t = _buf__array_ratemonitor_5_t.data cdef size_t _num_array_ratemonitor_5_t = len(_namespace['_array_ratemonitor_5_t']) cdef double t if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_ratemonitor_5_N = _namespace['_array_ratemonitor_5_N'] cdef int32_t * _array_ratemonitor_5_N = _buf__array_ratemonitor_5_N.data cdef int32_t N _var__clock_dt = _namespace["_var__clock_dt"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_dt = _namespace['_array_defaultclock_dt'] cdef double * _array_defaultclock_dt = _buf__array_defaultclock_dt.data cdef double _clock_dt = _namespace["_clock_dt"] _var__clock_t = _namespace["_var__clock_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double _clock_t _var__num_source_neurons = _namespace["_var__num_source_neurons"] cdef int64_t _num_source_neurons = _namespace["_num_source_neurons"] _var__source_start = _namespace["_var__source_start"] cdef int64_t _source_start = _namespace["_source_start"] _var__source_stop = _namespace["_var__source_stop"] cdef int64_t _source_stop = _namespace["_source_stop"] _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_DG_inh__spikespace = _namespace['_array_DG_inh__spikespace'] cdef int32_t * _array_DG_inh__spikespace = _buf__array_DG_inh__spikespace.data cdef size_t _num_array_DG_inh__spikespace = len(_namespace['_array_DG_inh__spikespace']) cdef int32_t _spikespace _var_rate = _namespace["_var_rate"] _dynamic_array_ratemonitor_5_rate = _namespace["_dynamic_array_ratemonitor_5_rate"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_ratemonitor_5_rate = _namespace['_array_ratemonitor_5_rate'] cdef double * _array_ratemonitor_5_rate = _buf__array_ratemonitor_5_rate.data cdef size_t _num_array_ratemonitor_5_rate = len(_namespace['_array_ratemonitor_5_rate']) cdef double rate _var_t = _namespace["_var_t"] _dynamic_array_ratemonitor_5_t = _namespace["_dynamic_array_ratemonitor_5_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_ratemonitor_5_t = _namespace['_array_ratemonitor_5_t'] cdef double * _array_ratemonitor_5_t = _buf__array_ratemonitor_5_t.data cdef size_t _num_array_ratemonitor_5_t = len(_namespace['_array_ratemonitor_5_t']) cdef double t if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:15:29,298 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name ratemonitor_5_codeobject 2021-11-05 15:15:29,298 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "ratemonitor_5_ratemonitor" using Cython module "_cython_magic_839a0e6cccb74cd9665eaea5a53d6815" 2021-11-05 15:15:29,298 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140606332254768 on /home/nikos/.cython/brian_extensions/_cython_magic_839a0e6cccb74cd9665eaea5a53d6815.lock 2021-11-05 15:15:29,298 DEBUG brian2.utils.filelock: Lock 140606332254768 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_839a0e6cccb74cd9665eaea5a53d6815.lock 2021-11-05 15:15:29,299 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140606332254768 on /home/nikos/.cython/brian_extensions/_cython_magic_839a0e6cccb74cd9665eaea5a53d6815.lock 2021-11-05 15:15:29,299 DEBUG brian2.utils.filelock: Lock 140606332254768 released on /home/nikos/.cython/brian_extensions/_cython_magic_839a0e6cccb74cd9665eaea5a53d6815.lock 2021-11-05 15:15:29,299 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=ratemonitor_6, template name=ratemonitor) for abstract code: 2021-11-05 15:15:29,299 DIAGNOSTIC brian2.devices.device: ratemonitor_6_codeobject abstract code: 2021-11-05 15:15:29,300 DIAGNOSTIC brian2.devices.device: ratemonitor_6_codeobject snippet (scalar): 2021-11-05 15:15:29,300 DIAGNOSTIC brian2.devices.device: ratemonitor_6_codeobject snippet (vector): 2021-11-05 15:15:29,300 DIAGNOSTIC brian2.devices.device: ratemonitor_6_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_ratemonitor_6_N = _namespace['_array_ratemonitor_6_N'] cdef int32_t * _array_ratemonitor_6_N = _buf__array_ratemonitor_6_N.data cdef int32_t N _var__clock_dt = _namespace["_var__clock_dt"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_dt = _namespace['_array_defaultclock_dt'] cdef double * _array_defaultclock_dt = _buf__array_defaultclock_dt.data cdef double _clock_dt = _namespace["_clock_dt"] _var__clock_t = _namespace["_var__clock_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double _clock_t _var__num_source_neurons = _namespace["_var__num_source_neurons"] cdef int64_t _num_source_neurons = _namespace["_num_source_neurons"] _var__source_start = _namespace["_var__source_start"] cdef int64_t _source_start = _namespace["_source_start"] _var__source_stop = _namespace["_var__source_stop"] cdef int64_t _source_stop = _namespace["_source_stop"] _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_inh__spikespace = _namespace['_array_CA3_inh__spikespace'] cdef int32_t * _array_CA3_inh__spikespace = _buf__array_CA3_inh__spikespace.data cdef size_t _num_array_CA3_inh__spikespace = len(_namespace['_array_CA3_inh__spikespace']) cdef int32_t _spikespace _var_rate = _namespace["_var_rate"] _dynamic_array_ratemonitor_6_rate = _namespace["_dynamic_array_ratemonitor_6_rate"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_ratemonitor_6_rate = _namespace['_array_ratemonitor_6_rate'] cdef double * _array_ratemonitor_6_rate = _buf__array_ratemonitor_6_rate.data cdef size_t _num_array_ratemonitor_6_rate = len(_namespace['_array_ratemonitor_6_rate']) cdef double rate _var_t = _namespace["_var_t"] _dynamic_array_ratemonitor_6_t = _namespace["_dynamic_array_ratemonitor_6_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_ratemonitor_6_t = _namespace['_array_ratemonitor_6_t'] cdef double * _array_ratemonitor_6_t = _buf__array_ratemonitor_6_t.data cdef size_t _num_array_ratemonitor_6_t = len(_namespace['_array_ratemonitor_6_t']) cdef double t if '_owner' in _namespace: _owner = _namespace['_owner'] cdef size_t _num_spikes = _array_CA3_inh__spikespace[_num_array_CA3_inh__spikespace-1] # For subgroups, we do not want to record all spikes # We assume that spikes are ordered cdef int _start_idx = -1 cdef int _end_idx = -1 cdef size_t _j for _j in range(_num_spikes): _idx = _array_CA3_inh__spikespace[_j] if _idx >= _source_start: _start_idx = _j break if _start_idx == -1: _start_idx = _num_spikes for _j in range(_start_idx, _num_spikes): _idx = _array_CA3_inh__spikespace[_j] if _idx >= _source_stop: _end_idx = _j break if _end_idx == -1: _end_idx =_num_spikes _num_spikes = _end_idx - _start_idx # Calculate the new length for the arrays cdef size_t _new_len = _dynamic_array_ratemonitor_6_t.shape[0] + 1 # Resize the arrays _owner.resize(_new_len) _array_ratemonitor_6_N[0] = _new_len # Set the new values _dynamic_array_ratemonitor_6_t.data[_new_len-1] = _array_defaultclock_t[0] _dynamic_array_ratemonitor_6_rate.data[_new_len-1] = _num_spikes/_array_defaultclock_dt[0]/_num_source_neurons before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_ratemonitor_6_N = _namespace['_array_ratemonitor_6_N'] cdef int32_t * _array_ratemonitor_6_N = _buf__array_ratemonitor_6_N.data cdef int32_t N _var__clock_dt = _namespace["_var__clock_dt"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_dt = _namespace['_array_defaultclock_dt'] cdef double * _array_defaultclock_dt = _buf__array_defaultclock_dt.data cdef double _clock_dt = _namespace["_clock_dt"] _var__clock_t = _namespace["_var__clock_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double _clock_t _var__num_source_neurons = _namespace["_var__num_source_neurons"] cdef int64_t _num_source_neurons = _namespace["_num_source_neurons"] _var__source_start = _namespace["_var__source_start"] cdef int64_t _source_start = _namespace["_source_start"] _var__source_stop = _namespace["_var__source_stop"] cdef int64_t _source_stop = _namespace["_source_stop"] _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_inh__spikespace = _namespace['_array_CA3_inh__spikespace'] cdef int32_t * _array_CA3_inh__spikespace = _buf__array_CA3_inh__spikespace.data cdef size_t _num_array_CA3_inh__spikespace = len(_namespace['_array_CA3_inh__spikespace']) cdef int32_t _spikespace _var_rate = _namespace["_var_rate"] _dynamic_array_ratemonitor_6_rate = _namespace["_dynamic_array_ratemonitor_6_rate"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_ratemonitor_6_rate = _namespace['_array_ratemonitor_6_rate'] cdef double * _array_ratemonitor_6_rate = _buf__array_ratemonitor_6_rate.data cdef size_t _num_array_ratemonitor_6_rate = len(_namespace['_array_ratemonitor_6_rate']) cdef double rate _var_t = _namespace["_var_t"] _dynamic_array_ratemonitor_6_t = _namespace["_dynamic_array_ratemonitor_6_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_ratemonitor_6_t = _namespace['_array_ratemonitor_6_t'] cdef double * _array_ratemonitor_6_t = _buf__array_ratemonitor_6_t.data cdef size_t _num_array_ratemonitor_6_t = len(_namespace['_array_ratemonitor_6_t']) cdef double t if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_ratemonitor_6_N = _namespace['_array_ratemonitor_6_N'] cdef int32_t * _array_ratemonitor_6_N = _buf__array_ratemonitor_6_N.data cdef int32_t N _var__clock_dt = _namespace["_var__clock_dt"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_dt = _namespace['_array_defaultclock_dt'] cdef double * _array_defaultclock_dt = _buf__array_defaultclock_dt.data cdef double _clock_dt = _namespace["_clock_dt"] _var__clock_t = _namespace["_var__clock_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double _clock_t _var__num_source_neurons = _namespace["_var__num_source_neurons"] cdef int64_t _num_source_neurons = _namespace["_num_source_neurons"] _var__source_start = _namespace["_var__source_start"] cdef int64_t _source_start = _namespace["_source_start"] _var__source_stop = _namespace["_var__source_stop"] cdef int64_t _source_stop = _namespace["_source_stop"] _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA3_inh__spikespace = _namespace['_array_CA3_inh__spikespace'] cdef int32_t * _array_CA3_inh__spikespace = _buf__array_CA3_inh__spikespace.data cdef size_t _num_array_CA3_inh__spikespace = len(_namespace['_array_CA3_inh__spikespace']) cdef int32_t _spikespace _var_rate = _namespace["_var_rate"] _dynamic_array_ratemonitor_6_rate = _namespace["_dynamic_array_ratemonitor_6_rate"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_ratemonitor_6_rate = _namespace['_array_ratemonitor_6_rate'] cdef double * _array_ratemonitor_6_rate = _buf__array_ratemonitor_6_rate.data cdef size_t _num_array_ratemonitor_6_rate = len(_namespace['_array_ratemonitor_6_rate']) cdef double rate _var_t = _namespace["_var_t"] _dynamic_array_ratemonitor_6_t = _namespace["_dynamic_array_ratemonitor_6_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_ratemonitor_6_t = _namespace['_array_ratemonitor_6_t'] cdef double * _array_ratemonitor_6_t = _buf__array_ratemonitor_6_t.data cdef size_t _num_array_ratemonitor_6_t = len(_namespace['_array_ratemonitor_6_t']) cdef double t if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:15:29,300 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name ratemonitor_6_codeobject 2021-11-05 15:15:29,300 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "ratemonitor_6_ratemonitor" using Cython module "_cython_magic_840a2f732ef08c676536c8bda2005bb6" 2021-11-05 15:15:29,301 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140606328620080 on /home/nikos/.cython/brian_extensions/_cython_magic_840a2f732ef08c676536c8bda2005bb6.lock 2021-11-05 15:15:29,301 DEBUG brian2.utils.filelock: Lock 140606328620080 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_840a2f732ef08c676536c8bda2005bb6.lock 2021-11-05 15:15:29,301 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140606328620080 on /home/nikos/.cython/brian_extensions/_cython_magic_840a2f732ef08c676536c8bda2005bb6.lock 2021-11-05 15:15:29,301 DEBUG brian2.utils.filelock: Lock 140606328620080 released on /home/nikos/.cython/brian_extensions/_cython_magic_840a2f732ef08c676536c8bda2005bb6.lock 2021-11-05 15:15:29,301 DIAGNOSTIC brian2.codegen.codeobject: Creating code object (group=ratemonitor_7, template name=ratemonitor) for abstract code: 2021-11-05 15:15:29,301 DIAGNOSTIC brian2.devices.device: ratemonitor_7_codeobject abstract code: 2021-11-05 15:15:29,302 DIAGNOSTIC brian2.devices.device: ratemonitor_7_codeobject snippet (scalar): 2021-11-05 15:15:29,302 DIAGNOSTIC brian2.devices.device: ratemonitor_7_codeobject snippet (vector): 2021-11-05 15:15:29,302 DIAGNOSTIC brian2.devices.device: ratemonitor_7_codeobject code: cython_directives: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) # support code # template-specific support code def main(_namespace): cdef size_t _idx cdef size_t _vectorisation_idx _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_ratemonitor_7_N = _namespace['_array_ratemonitor_7_N'] cdef int32_t * _array_ratemonitor_7_N = _buf__array_ratemonitor_7_N.data cdef int32_t N _var__clock_dt = _namespace["_var__clock_dt"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_dt = _namespace['_array_defaultclock_dt'] cdef double * _array_defaultclock_dt = _buf__array_defaultclock_dt.data cdef double _clock_dt = _namespace["_clock_dt"] _var__clock_t = _namespace["_var__clock_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double _clock_t _var__num_source_neurons = _namespace["_var__num_source_neurons"] cdef int64_t _num_source_neurons = _namespace["_num_source_neurons"] _var__source_start = _namespace["_var__source_start"] cdef int64_t _source_start = _namespace["_source_start"] _var__source_stop = _namespace["_var__source_stop"] cdef int64_t _source_stop = _namespace["_source_stop"] _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_inh__spikespace = _namespace['_array_CA1_inh__spikespace'] cdef int32_t * _array_CA1_inh__spikespace = _buf__array_CA1_inh__spikespace.data cdef size_t _num_array_CA1_inh__spikespace = len(_namespace['_array_CA1_inh__spikespace']) cdef int32_t _spikespace _var_rate = _namespace["_var_rate"] _dynamic_array_ratemonitor_7_rate = _namespace["_dynamic_array_ratemonitor_7_rate"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_ratemonitor_7_rate = _namespace['_array_ratemonitor_7_rate'] cdef double * _array_ratemonitor_7_rate = _buf__array_ratemonitor_7_rate.data cdef size_t _num_array_ratemonitor_7_rate = len(_namespace['_array_ratemonitor_7_rate']) cdef double rate _var_t = _namespace["_var_t"] _dynamic_array_ratemonitor_7_t = _namespace["_dynamic_array_ratemonitor_7_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_ratemonitor_7_t = _namespace['_array_ratemonitor_7_t'] cdef double * _array_ratemonitor_7_t = _buf__array_ratemonitor_7_t.data cdef size_t _num_array_ratemonitor_7_t = len(_namespace['_array_ratemonitor_7_t']) cdef double t if '_owner' in _namespace: _owner = _namespace['_owner'] cdef size_t _num_spikes = _array_CA1_inh__spikespace[_num_array_CA1_inh__spikespace-1] # For subgroups, we do not want to record all spikes # We assume that spikes are ordered cdef int _start_idx = -1 cdef int _end_idx = -1 cdef size_t _j for _j in range(_num_spikes): _idx = _array_CA1_inh__spikespace[_j] if _idx >= _source_start: _start_idx = _j break if _start_idx == -1: _start_idx = _num_spikes for _j in range(_start_idx, _num_spikes): _idx = _array_CA1_inh__spikespace[_j] if _idx >= _source_stop: _end_idx = _j break if _end_idx == -1: _end_idx =_num_spikes _num_spikes = _end_idx - _start_idx # Calculate the new length for the arrays cdef size_t _new_len = _dynamic_array_ratemonitor_7_t.shape[0] + 1 # Resize the arrays _owner.resize(_new_len) _array_ratemonitor_7_N[0] = _new_len # Set the new values _dynamic_array_ratemonitor_7_t.data[_new_len-1] = _array_defaultclock_t[0] _dynamic_array_ratemonitor_7_rate.data[_new_len-1] = _num_spikes/_array_defaultclock_dt[0]/_num_source_neurons before_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_ratemonitor_7_N = _namespace['_array_ratemonitor_7_N'] cdef int32_t * _array_ratemonitor_7_N = _buf__array_ratemonitor_7_N.data cdef int32_t N _var__clock_dt = _namespace["_var__clock_dt"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_dt = _namespace['_array_defaultclock_dt'] cdef double * _array_defaultclock_dt = _buf__array_defaultclock_dt.data cdef double _clock_dt = _namespace["_clock_dt"] _var__clock_t = _namespace["_var__clock_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double _clock_t _var__num_source_neurons = _namespace["_var__num_source_neurons"] cdef int64_t _num_source_neurons = _namespace["_num_source_neurons"] _var__source_start = _namespace["_var__source_start"] cdef int64_t _source_start = _namespace["_source_start"] _var__source_stop = _namespace["_var__source_stop"] cdef int64_t _source_stop = _namespace["_source_stop"] _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_inh__spikespace = _namespace['_array_CA1_inh__spikespace'] cdef int32_t * _array_CA1_inh__spikespace = _buf__array_CA1_inh__spikespace.data cdef size_t _num_array_CA1_inh__spikespace = len(_namespace['_array_CA1_inh__spikespace']) cdef int32_t _spikespace _var_rate = _namespace["_var_rate"] _dynamic_array_ratemonitor_7_rate = _namespace["_dynamic_array_ratemonitor_7_rate"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_ratemonitor_7_rate = _namespace['_array_ratemonitor_7_rate'] cdef double * _array_ratemonitor_7_rate = _buf__array_ratemonitor_7_rate.data cdef size_t _num_array_ratemonitor_7_rate = len(_namespace['_array_ratemonitor_7_rate']) cdef double rate _var_t = _namespace["_var_t"] _dynamic_array_ratemonitor_7_t = _namespace["_dynamic_array_ratemonitor_7_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_ratemonitor_7_t = _namespace['_array_ratemonitor_7_t'] cdef double * _array_ratemonitor_7_t = _buf__array_ratemonitor_7_t.data cdef size_t _num_array_ratemonitor_7_t = len(_namespace['_array_ratemonitor_7_t']) cdef double t if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template after_run: #cython: language_level=3 #cython: boundscheck=False #cython: wraparound=False #cython: cdivision=False #cython: infer_types=True import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) def main(_namespace): _var_N = _namespace["_var_N"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_ratemonitor_7_N = _namespace['_array_ratemonitor_7_N'] cdef int32_t * _array_ratemonitor_7_N = _buf__array_ratemonitor_7_N.data cdef int32_t N _var__clock_dt = _namespace["_var__clock_dt"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_dt = _namespace['_array_defaultclock_dt'] cdef double * _array_defaultclock_dt = _buf__array_defaultclock_dt.data cdef double _clock_dt = _namespace["_clock_dt"] _var__clock_t = _namespace["_var__clock_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_defaultclock_t = _namespace['_array_defaultclock_t'] cdef double * _array_defaultclock_t = _buf__array_defaultclock_t.data cdef double _clock_t _var__num_source_neurons = _namespace["_var__num_source_neurons"] cdef int64_t _num_source_neurons = _namespace["_num_source_neurons"] _var__source_start = _namespace["_var__source_start"] cdef int64_t _source_start = _namespace["_source_start"] _var__source_stop = _namespace["_var__source_stop"] cdef int64_t _source_stop = _namespace["_source_stop"] _var__spikespace = _namespace["_var__spikespace"] cdef _numpy.ndarray[int32_t, ndim=1, mode='c'] _buf__array_CA1_inh__spikespace = _namespace['_array_CA1_inh__spikespace'] cdef int32_t * _array_CA1_inh__spikespace = _buf__array_CA1_inh__spikespace.data cdef size_t _num_array_CA1_inh__spikespace = len(_namespace['_array_CA1_inh__spikespace']) cdef int32_t _spikespace _var_rate = _namespace["_var_rate"] _dynamic_array_ratemonitor_7_rate = _namespace["_dynamic_array_ratemonitor_7_rate"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_ratemonitor_7_rate = _namespace['_array_ratemonitor_7_rate'] cdef double * _array_ratemonitor_7_rate = _buf__array_ratemonitor_7_rate.data cdef size_t _num_array_ratemonitor_7_rate = len(_namespace['_array_ratemonitor_7_rate']) cdef double rate _var_t = _namespace["_var_t"] _dynamic_array_ratemonitor_7_t = _namespace["_dynamic_array_ratemonitor_7_t"] cdef _numpy.ndarray[double, ndim=1, mode='c'] _buf__array_ratemonitor_7_t = _namespace['_array_ratemonitor_7_t'] cdef double * _array_ratemonitor_7_t = _buf__array_ratemonitor_7_t.data cdef size_t _num_array_ratemonitor_7_t = len(_namespace['_array_ratemonitor_7_t']) cdef double t if '_owner' in _namespace: _owner = _namespace['_owner'] # EMPTY_CODE_BLOCK -- overwrite in child template imports: import numpy as _numpy cimport numpy as _numpy from libc.math cimport fabs, sin, cos, tan, sinh, cosh, tanh, exp, log, log10, expm1, log1p, sqrt, asin, acos, atan, fmod, floor, ceil, isinf cdef extern from "math.h": double M_PI # Import the two versions of std::abs from libc.stdlib cimport abs # For integers from libc.math cimport abs # For floating point values from libc.limits cimport INT_MIN, INT_MAX from libcpp cimport bool _numpy.import_array() cdef extern from "numpy/ndarraytypes.h": void PyArray_CLEARFLAGS(_numpy.PyArrayObject *arr, int flags) from libc.stdlib cimport free cdef extern from "numpy/npy_math.h": bint npy_isinf(double x) double NPY_INFINITY cdef extern from "stdint_compat.h": # Longness only used for type promotion # Actual compile time size used for conversion ctypedef signed int int32_t ctypedef signed long int64_t ctypedef unsigned long uint64_t # It seems we cannot used a fused type here cdef int int_(bool) cdef int int_(char) cdef int int_(short) cdef int int_(int) cdef int int_(long) cdef int int_(float) cdef int int_(double) cdef int int_(long double) 2021-11-05 15:15:29,302 DIAGNOSTIC brian2.core.names: Created object of class CythonCodeObject with name ratemonitor_7_codeobject 2021-11-05 15:15:29,303 DIAGNOSTIC brian2.codegen.runtime.cython_rt.extension_manager: "ratemonitor_7_ratemonitor" using Cython module "_cython_magic_8f30013b535fa45c2b7618fa25cc2b51" 2021-11-05 15:15:29,303 DIAGNOSTIC brian2.utils.filelock: Attempting to acquire lock 140606328619456 on /home/nikos/.cython/brian_extensions/_cython_magic_8f30013b535fa45c2b7618fa25cc2b51.lock 2021-11-05 15:15:29,303 DEBUG brian2.utils.filelock: Lock 140606328619456 acquired on /home/nikos/.cython/brian_extensions/_cython_magic_8f30013b535fa45c2b7618fa25cc2b51.lock 2021-11-05 15:15:29,303 DIAGNOSTIC brian2.utils.filelock: Attempting to release lock 140606328619456 on /home/nikos/.cython/brian_extensions/_cython_magic_8f30013b535fa45c2b7618fa25cc2b51.lock 2021-11-05 15:15:29,303 DEBUG brian2.utils.filelock: Lock 140606328619456 released on /home/nikos/.cython/brian_extensions/_cython_magic_8f30013b535fa45c2b7618fa25cc2b51.lock 2021-11-05 15:15:29,303 DEBUG brian2.core.network.before_run: Network network uses 1 clocks: defaultclock (dt=100. us) 2021-11-05 15:15:29,304 DEBUG brian2.core.network.run: Simulating network 'network' from time 0. s to 2. s. 2021-11-05 15:18:10,432 DIAGNOSTIC brian2.core.base: Error was encountered with object "EC_inh": Object was created here: File "/home/nikos/Documents/projects/Python/memstim-hh/run_sim_dumb.py", line 100, in G_I = NeuronGroup(N=settings.N_EC[1], 2021-11-05 15:18:10,432 ERROR brian2: Brian 2 encountered an unexpected error. If you think this is a bug in Brian 2, please report this issue either to the discourse forum at , or to the issue tracker at . Please include this file with debug information in your report: /tmp/brian_debug_q7mz5oe4.log Additionally, you can also include a copy of the script that was run, available at: /tmp/brian_script_tapnrtig.py You can also include a copy of the redirected std stream outputs, available at /tmp/brian_stdout_7mc1x2x6.log and /tmp/brian_stderr_xf7_ofvx.log Thanks! Traceback (most recent call last): File "/home/nikos/.local/lib/python3.9/site-packages/brian2/codegen/runtime/cython_rt/cython_rt.py", line 160, in run_block return compiled_code.main(self.namespace) File "_cython_magic_1ca079d7308871beb739c23d92d1d98a.pyx", line 437, in _cython_magic_1ca079d7308871beb739c23d92d1d98a.main ZeroDivisionError: float division The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/home/nikos/Documents/projects/Python/memstim-hh/run_sim_dumb.py", line 515, in net.run(settings.duration, report='text', report_period=10*second, profile=True) File "/home/nikos/.local/lib/python3.9/site-packages/brian2/core/base.py", line 278, in device_override_decorated_function return func(*args, **kwds) File "/home/nikos/.local/lib/python3.9/site-packages/brian2/units/fundamentalunits.py", line 2434, in new_f result = f(*args, **kwds) File "/home/nikos/.local/lib/python3.9/site-packages/brian2/core/network.py", line 1072, in run obj.run() File "/home/nikos/.local/lib/python3.9/site-packages/brian2/core/base.py", line 181, in run codeobj() File "/home/nikos/.local/lib/python3.9/site-packages/brian2/codegen/codeobject.py", line 107, in __call__ return self.run() File "/home/nikos/.local/lib/python3.9/site-packages/brian2/codegen/codeobject.py", line 135, in run return self.run_block('run') File "/home/nikos/.local/lib/python3.9/site-packages/brian2/codegen/runtime/cython_rt/cython_rt.py", line 164, in run_block raise BrianObjectException(message, self.owner) from exc brian2.core.base.BrianObjectException: Error encountered with object named "EC_inh". Object was created here (most recent call only, full details in debug log): File "/home/nikos/Documents/projects/Python/memstim-hh/run_sim_dumb.py", line 100, in G_I = NeuronGroup(N=settings.N_EC[1], An exception occured during the execution of the run block of code object EC_inh_stateupdater_codeobject. (See above for original error message and traceback.)