static void nrn_state(_NrnThread* _nt, _Memb_list* _ml, int _type) { double* _p; Datum* _ppvar; Datum* _thread; Node *_nd; double _v = 0.0; int* _ni; int _iml, _cntml; #if CACHEVEC _ni = _ml->_nodeindices; #endif _cntml = _ml->_nodecount; _thread = _ml->_thread; for (_iml = 0; _iml < _cntml; ++_iml) { _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; _nd = _ml->_nodelist[_iml]; #if CACHEVEC if (use_cachevec) { _v = VEC_V(_ni[_iml]); }else #endif { _nd = _ml->_nodelist[_iml]; _v = NODEV(_nd); } v=_v; { cai = _ion_cai; { _deriv1_advance = 1; derivimplicit_thread(2, _slist1, _dlist1, _p, states, _ppvar, _thread, _nt); _deriv1_advance = 0; } }} }
static void nrn_state(_NrnThread* _nt, _Memb_list* _ml, int _type) { double _break, _save; double* _p; Datum* _ppvar; Datum* _thread; Node *_nd; double _v; int* _ni; int _iml, _cntml; #if CACHEVEC _ni = _ml->_nodeindices; #endif _cntml = _ml->_nodecount; _thread = _ml->_thread; for (_iml = 0; _iml < _cntml; ++_iml) { _p = _ml->_data[_iml]; _ppvar = _ml->_pdata[_iml]; _nd = _ml->_nodelist[_iml]; #if CACHEVEC if (use_cachevec) { _v = VEC_V(_ni[_iml]); }else #endif { _nd = _ml->_nodelist[_iml]; _v = NODEV(_nd); } _break = t + .5*dt; _save = t; v=_v; { ik = _ion_ik; ko = _ion_ko; ina = _ion_ina; nai = _ion_nai; { { for (; t < _break; t += dt) { _deriv1_advance = 1; derivimplicit_thread(2, _slist1, _dlist1, _p, state, _ppvar, _thread, _nt); _deriv1_advance = 0; }} t = _save; } { } _ion_ko = ko; _ion_nai = nai; }} }