check_pre_code function

(Shortest import: from brian2genn.insyn import check_pre_code)

brian2genn.insyn.check_pre_code(codegen, stmts, vars_pre, vars_syn, vars_post, conditional_write_vars)[source]

Given a set of statements stmts where the variables names in vars_pre are presynaptic, in vars_syn are synaptic and in vars_post are postsynaptic, check that the conditions for compatibility with GeNN are met, and return a new statement sequence translated for compatibility with GeNN, along with the name of the targeted variable.

Also adapts the synaptic statement to be multiplied by 0 for a refractory post-synaptic cell.