nest / nest-gpu

NEST GPU
https://nest-gpu.readthedocs.io
GNU General Public License v2.0
17 stars 12 forks source link

SynapseUpdateFunction #36

Open never-to-never opened 2 years ago

never-to-never commented 2 years ago

I am reading your code and have a little doubt. The function SynapseUpdateFunction is defined in the rev_spike.cu file. If I want to get the source node in this function, what should I do? I hope you can reply in your busy schedule, thank you very much! __device__ void SynapseUpdateFunction(int i_spike, int i_target_rev_conn) { unsigned int target = RevSpikeTarget[i_spike]; unsigned int i_conn = TargetRevConnection[target][i_target_rev_conn]; unsigned char syn_group = ConnectionSynGroup[i_conn]; if (syn_group>0) { float *weight = &ConnectionWeight[i_conn]; unsigned short spike_time_idx = ConnectionSpikeTime[i_conn]; unsigned short time_idx = (unsigned short)(NESTGPUTimeIdx & 0xffff); unsigned short Dt_int = time_idx - spike_time_idx; if (Dt_int<MAX_SYN_DT) { SynapseUpdate(syn_group, weight, NESTGPUTimeResolution*Dt_int); } } }

never-to-never commented 2 years ago

@golosio thanks