BlueBrain / nmodl

Code Generation Framework For NEURON MODeling Language
https://bluebrain.github.io/nmodl/
Apache License 2.0
48 stars 15 forks source link

Review `inst->{point_process,tq_item}`. #1236

Open 1uc opened 2 months ago

1uc commented 2 months ago

For CoreNEURON we generate:

    static inline void setup_instance(NrnThread* nt, Memb_list* ml) {
        // ...
        inst->tsave = ml->data+2*pnodecount;
        // ...
        inst->point_process = ml->pdata;
        inst->tqitem = ml->pdata;

and then later inst->tqitem[2*pnodecount+id] and inst->tsave[id].

Meaning often a pointer that's given a name, i.e. tsave or any other range variables, points to the start of it's values. Where as others, such as ml->tqitem don't they point to the beginning of the buffer holding all pdata.

We should review if this a inconsistency that can be unified.