From 89e5272b82dd8fbbb763973123d5843267bc3029 Mon Sep 17 00:00:00 2001 From: 1uc Date: Wed, 6 Nov 2024 08:38:40 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20BlueBrai?= =?UTF-8?q?n/nmodl@fc640975b8f3659b5f10b63fbac46a8ca6bf6dbb=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .doctrees/environment.pickle | Bin 159128 -> 159128 bytes .../notebooks/nmodl-kinetic-schemes.ipynb | 56 +- .../notebooks/nmodl-python-tutorial.ipynb | 160 +- .../notebooks/nmodl-sympy-conductance.ipynb | 72 +- .../notebooks/nmodl-sympy-solver-cnexp.ipynb | 64 +- .../nmodl-sympy-solver-derivimplicit.ipynb | 32 +- .../notebooks/nmodl-sympy-solver-sparse.ipynb | 32 +- .../after__cvode__to__cnexp_8cpp_source.html | 6 +- ...degen_1_1_codegen_acc_visitor-members.html | 4 +- ...dl_1_1codegen_1_1_codegen_acc_visitor.html | 6 - ...odegen_coreneuron_cpp_visitor-members.html | 4 +- ...en_1_1_codegen_coreneuron_cpp_visitor.html | 46 +- ...egen_1_1_codegen_coreneuron_cpp_visitor.js | 1 - ...degen_1_1_codegen_cpp_visitor-members.html | 547 ++-- ...dl_1_1codegen_1_1_codegen_cpp_visitor.html | 151 +- ...modl_1_1codegen_1_1_codegen_cpp_visitor.js | 1 - ..._1_codegen_neuron_cpp_visitor-members.html | 4 +- ...odegen_1_1_codegen_neuron_cpp_visitor.html | 46 +- ...1codegen_1_1_codegen_neuron_cpp_visitor.js | 1 - .../codegen__acc__visitor_8cpp_source.html | 12 +- ..._coreneuron__cpp__visitor_8hpp_source.html | 8 +- .../codegen__cpp__visitor_8cpp_source.html | 4 +- .../codegen__cpp__visitor_8hpp_source.html | 2637 ++++++++--------- ...gen__neuron__cpp__visitor_8hpp_source.html | 6 +- doxygen/constant__folder_8cpp_source.html | 14 +- doxygen/defuse__analyze_8cpp_source.html | 36 +- doxygen/functions_c.html | 18 +- doxygen/functions_func_c.html | 14 +- doxygen/group__codegen__backends.html | 4 +- doxygen/group__codegen__backends.js | 3 - doxygen/implicit__argument_8cpp_source.html | 4 +- doxygen/inline_8cpp_source.html | 62 +- doxygen/kinetic__block_8cpp_source.html | 54 +- doxygen/localize_8cpp_source.html | 18 +- doxygen/localrename_8cpp_source.html | 6 +- doxygen/lookup_8cpp_source.html | 6 +- doxygen/loop__unroll_8cpp_source.html | 8 +- doxygen/misc_8cpp_source.html | 8 +- doxygen/namespacemembers_func.html | 2 +- doxygen/namespacemembers_r.html | 2 +- doxygen/namespacenmodl_1_1test__utils.html | 22 +- doxygen/navtreedata.js | 40 +- doxygen/navtreeindex15.js | 238 +- doxygen/navtreeindex16.js | 382 +-- doxygen/navtreeindex17.js | 238 +- doxygen/navtreeindex18.js | 8 +- doxygen/navtreeindex19.js | 8 +- doxygen/navtreeindex20.js | 8 +- doxygen/navtreeindex21.js | 8 +- doxygen/navtreeindex22.js | 8 +- doxygen/navtreeindex23.js | 8 +- doxygen/navtreeindex24.js | 8 +- doxygen/navtreeindex25.js | 8 +- doxygen/navtreeindex26.js | 8 +- doxygen/navtreeindex27.js | 34 +- doxygen/navtreeindex28.js | 54 +- doxygen/navtreeindex29.js | 16 +- doxygen/navtreeindex30.js | 24 +- doxygen/navtreeindex31.js | 18 +- doxygen/navtreeindex32.js | 8 +- doxygen/navtreeindex33.js | 8 +- doxygen/navtreeindex34.js | 12 +- doxygen/navtreeindex35.js | 3 - doxygen/neuron__solve_8cpp_source.html | 18 +- doxygen/nmodl_8cpp_source.html | 6 +- doxygen/parser_2parser_8cpp_source.html | 4 +- doxygen/rename_8cpp_source.html | 20 +- doxygen/search/all_10.js | 2 +- doxygen/search/all_2.js | 2 +- doxygen/search/functions_10.js | 2 +- doxygen/search/functions_2.js | 2 +- doxygen/solve__block_8cpp_source.html | 6 +- ..._coreneuron__cpp__visitor_8cpp_source.html | 4 +- ...gen__neuron__cpp__visitor_8cpp_source.html | 4 +- doxygen/src_2main_8cpp.html | 2 +- doxygen/src_2main_8cpp_source.html | 124 +- doxygen/src_2visitors_2main_8cpp_source.html | 2 +- doxygen/steadystate_8cpp_source.html | 18 +- doxygen/sympy__conductance_8cpp_source.html | 6 +- doxygen/sympy__solver_8cpp_source.html | 66 +- ..._coreneuron__cpp__visitor_8cpp_source.html | 18 +- ...gen__neuron__cpp__visitor_8cpp_source.html | 4 +- ...test_2unit_2codegen_2main_8cpp_source.html | 2 +- ...test_2unit_2visitor_2main_8cpp_source.html | 2 +- ...est_2unit_2visitor_2units_8cpp_source.html | 14 +- doxygen/test__utils_8cpp.html | 6 +- doxygen/test__utils_8cpp.js | 2 +- doxygen/test__utils_8cpp_source.html | 59 +- doxygen/test__utils_8hpp.html | 6 +- doxygen/test__utils_8hpp.js | 2 +- doxygen/test__utils_8hpp_source.html | 4 +- doxygen/transform_8cpp_source.html | 6 +- doxygen/units_2parser_8cpp_source.html | 4 +- notebooks/nmodl-kinetic-schemes.ipynb | 56 +- notebooks/nmodl-python-tutorial.ipynb | 160 +- notebooks/nmodl-sympy-conductance.ipynb | 72 +- notebooks/nmodl-sympy-solver-cnexp.ipynb | 64 +- .../nmodl-sympy-solver-derivimplicit.ipynb | 32 +- notebooks/nmodl-sympy-solver-sparse.ipynb | 32 +- 99 files changed, 2984 insertions(+), 3177 deletions(-) diff --git a/.doctrees/environment.pickle b/.doctrees/environment.pickle index 39b14b00f9041a8a91c480266e033389ef14b87a..d42311b0a93cd68580c8a28dbf624994a68840f4 100644 GIT binary patch delta 10367 zcmZvicU%=m*T+4eD7FZ81uPITkzg0GfxTeY6k{wXJje=MrC38yV*$NMh(jDTcJoA| z5zz}SRf>4UXl&8MJjRyfNj0$~CO&G+d(ND@WB7dDf9^TI@667eojJ2RyL&fY@!WXD zGsi1f#DCP@&E8IWU4VApS@wprZ3)TI3CT&FXD_ftMQ4dSdpnG^dnVYDqi5M{bCa^{ zUQcVJBqmbTEPL%J+oHuW(Fy3qCL|?C#>HjX8|ZqmwgjpZZ;MKai%!ZC%l5XdZLbxZ z5EZ>h910GA_Okp7XfJvMw}a=&^_2&&Km+$IdkcAXJG5w@Wv@?dCC1K5Nsdj3`DX|V zVv}N%ZHXc$xQU!s3D4j`c=Ubng)DLA!}h)G9*NPBQSs4P_C`9Km^j<4$T*CsRsx2E zkv7t2*LmX5fkVa&b=bQ2x~Cm=uTf+8z%M`fB)@1{cjNF=^>DCpP^;p-#l~^1j&>hr zQUlTAb@ONK}S&6~!TSgy=N@{ZOUDdrcDK zLi&o4y!K2a&|Tqr_o=Eyz_u5;sb1S z|A08Lrk}s)6K06`q5fiAm5=x)ELvfX%-Jj!$ z%qZkxtpa4fK*XnnEA3Ikc&$ z8Z|;TX$t|49uX~oJTGzWS{+C9=nz(p17jY7Xy)v-er_lx)l%_?Gr*BIzAd2RC5A5z za(GV+Z6=3y0UPGotMW!Dc*(RlXzb`6+Y(56J7ybwT;9RC16l+~UEgm5oExtN{V zE9@?>!^*KPZ}qBJmj`R&UEZ?v2OuKm*l-Cg76~@j5UgC+5>R;x9{W@lbuUv`R%9rA#*;+RcY z#;4jR?0J#x93gJ6cAZeG6Ha+O5+`?DRg~;J#~Oq$s&e3nBmLxl5Q9h2SmcXF5dn^% z({BJeUXG$q^VwN>_7*$K&)-#!SaZqGvGcP_OxIkR<39((Lu=CEh^`90Oe`jYp<%gfydGRM47YZ-()*s3d z#Sa@uGZV9T^{xAv!6KpYH^~i=^B~8 z+Cg(b>1}rK2V4#0Z3%#RApYD%?MG}M+jJ&n!z zBdRf+qQ>UMk=5A!*2qF4T+GB{Cq8Y({AmnMs&3RAGma*5&`xzL^B5W^t0v%yG}skj z_LvAQ06i}gBmWnB7bgQ=Vv$J|{*sp{e3B~sZ(pYHNviPurcekZpN7Bu)oM(I|LxRj zOocyunv0p4(;+!LvFs`qph{*{ES%lee%2ZptiRVgq+mIhfV+hYMV1=8N; z)P*ozxlPPZ7vUr@9l8V;3%e(l!V0TyDlB!mKfD32x!jkQ>BG(}hxsl#;Y~<%xtCUg z9n@Aa0@OY+!d-0=Biz&uF`|Lm9!Atvdqae@F+@YV!UzwwC5&jO_JephZ3eN7c7h0L z8;Fn|Y|zmDFTzi4{;&$|{1DQ%4|}NS&60L}*gb9cB5J9c z(*6!jrEIYV21CAlZ4E4gBl7AR=#)lLWEw#Y)iZ;NDbon9rbbs&W2>q0)zrjlYH~I8 zQZ@C8rRV`L(|FaAN~Kg&3#+Nc)zs2zDz%zQtEQG$Q*UZDiMn59#O%IXZ2 z)EO$+3>9m-3N>9tnyvy(HwyePm~<6qx(YL0MVYRGOve~KH^4~T4@}wsUD2%C03m2f zHb74_ziq&)i&J)yFaV8>O}2y=P<@DlU(b!_aTrE+svTH76`$Cpf{sMvXb!=4{JI&RU*je22;i38+z{qv4bjw&JTK94Iz#vDvSTd2%aU z0XQoEy&XoN`E@&VhQrct2M)ktIhoDc9q=Nm8$0lJcTkSmiF>evGJhxZMf2-E=wk-& zf{$uKp1k}a29+n>_TZ%D$sT)f-16kIJutz8)`Pu?fcU2J)*hV8JQ=VT2BC@B3zN|l zv+?=}UO{Digm<|-S@IFQ3CHBXeK>N*u?W3kNZgO6Bx}*jB0B%jVuen1X6_4&I1L<^CL)jpms{@H!g%Az0#} z+G#F-IRq_az+oJrQaSUmYH!DIv(jBr> zE_A@lxbF>U->`0H^^P$(F)0}@7IH-{rg^^1$;AkAm@w6Yt~_>MajL{mUN$k9T2c6MXANuu~U{8s|Dv?qE>s~66k|)K?(G$ zr&^uvk4ZgUE-Qf-Jm?iFruLl@wYYqa;s7}1NHz0^2+! zjS85A=4b_ULvyzRW_i%1+TL7_ufRN*e+}^4mZCFD8C zbFV`05qTrY8+-}9cgR~u-lZx`fC}k#63?na&OHfZ;eaeWiHqrg^!)@g=76022}Ghf z{s~U8DZ8J7Xf&HnVXBz&t5cY8rtEtf*NiE*oW>zC<%84sELR}oK2_$%r#OiP@|O$v zFgM~1jP{_Lk-fcq(jEL|$r)9r>seThb@I>RKCD2tIfq-f0-1RZmUHDmS-&52lws#_ z^Hv~>&cnNqEyrBIkhA5U3m9ZJH9sBA3twQp~j$> zK-seEb!aA6u%CMo=RI3KW;5iHQl(W`Vb>*9`645q&vCO@C>MW@<6bDg{TyehkUEP- zBfh|aDWvXV(Wsu*T*f&s&zrx%q;a=u^g)5X{Zo<^no;06wU zrF?P&3_d1MhTX)W-*6M#s+2cws>*&}<3v=-8DGPzXbQhp$29o{()q1x0^W#LXBqR+ z7_@7evkg@eDf%E`By;gX3#j77mNJ%bajFJyFj!7Ny}@0Q->I<5WOERXbrRql$}9X>gjsSq;uH_)LR~48G9dGJ`7`e5F8|ab1%eT;&@LzGd*e z20t+PnSgo+eT%_u3#h>FTFSV`#rFxQH`RYI_@4#lq|tysvZV2t%l{@ocSfVevuc9e z(I}ugsAVa`gNr>isLP;%1`Qc_Y2eMEDFb@>-Hb^~B6OQHS~2jofaBGU%j15QEMdbYajvO_Lr>LNw^jpsxn~7=&pM&S04PIZSRbl=wW-cEue}$EoIc@;szQtWZF&RDT|7A^H zK@Y)H4PIj~LxY(NW)n~!S)&-lSU~j=YbnFv;&=@b7|eG8T>ptoQgoFC3>Is!gh8qX zZ!lP{!3qYeG+50bgMj)3yq3XR7Ep1%(}C8XD$nF{VU-(M45S7d8N9E-76#ij*uh}8 z1|KlkqrqMV`!z`Wn8`s+au_%?$Yo$^kk6oqfcmIi%%Ic)>fFjLWmItSaSfadPNGTU z7CvF}sjhN{!FdfXFu0__=M28o;6DtmYH*FgO%1+g@LvtSqw&Xt`;mzHD*qE#`Nab2 zRBl_!xWmQ2Y4AIPKQ(y3;E@K88T_q5jX>3>I~pTLt^b-#YAb>(Q+4WTDWfhIH_)IV z11}A{88p?P8H1J@v|`{(K>gFek3m{Hi>OZhEoB67d7uUz8FbPhh(Tu!x-jUjK@SEY z8uVt+SA%}ROu{q?XE0cUAq<8qAYZr(qkBHWF~a}Zs3(?8d*lD_UpqLdkE_*cD#rJ0 zCV##Q_3(w+xx3&O{I{!|o^&$p-m_hQH=B{Xc%JL8KiCM=89m?d(f^` z*N!-xA@tLSetOVPC;ACC7vBSScYHIDdLLhaRLFhz@qH&44*aPVgbAfgEMX|jj{cWuyDoRm%7yT!;#)#svuWEu!7r5VXQ}))8V&W0hPp&UmrgX)7aCf`XsC5GIp)GYA;1Hi=9a&}uU1pq zciHR5*&?H6L@$brpBEQR@4wHwxpj)gw=j?9y7{Qrp!PP>D-+t_iQv1`IJf43>bQEb z_st<>#jPkyXsir zW2$3hmfyex00K%t}g3i%CpN^_w*>DLTetcH;*gfg4y@OJA?1 zjT4fh)8k`OEoKkC7Itn|XFII(aV>Z>v6vf2 zCoRZ`jY(w3{9H^e6O+Yx2usZ!;e=V)b09b39uJCgN6mO5xQr7HW()bf<7y7ZBDK&k4#_G*Wesu>cl zRVnq$mMhw^7wWH_+EJzM{2Zs17^+9{>E>FYeU^Uqz7C&NYF4Ar&uzd~?SxXv30_)} zp?U^?Fh#30R4=E}WUbs#y?;zwtQ|I#|L(QNv>HS8nR)&d?YL6Wb=GuqvuNhnH?XCc zgO4oT%&u_>QL!uO}#QX+LV#kJ<*uFvW>~4^W^$*clHa0e<)|LGb z63PZ**@)1oY~?@`s}7B0b^}fPFGuLY<_`{K7l+E;IY=Qe^sTt_>SBkOQst6`n|YZHVwh%4=hUCk9=6TX-VXwK(C4G}q<{Po%i^ zzVJkPYq`QZBD~GQ6Ire86`sgw%_cmN&Dx2En0_*qwTl9ZdDQBJCsJ7ZMR+28wI{+8 zsjD?=gg=GCa~7V+Sj|ItB3m^d;fYMuf`lisR2v~Yk)hgn;fd_jW(ZGYrmL19T#=UA zLiEzj4bzflrCKsA-L!mbP?#t1p2NV2XT?J+mN}}L`JZ-UGhQoT$rlM)`-HaxRL<;r zU1MuZM4%Mb{Ly~`zugFuFrOCj8VB&Q7LCQm8ovb2ENoGCtMj-Z7q(zk5+>PXHee4o#%%o^c<)FEU_B%I;qslzTaLp8)@w&KZ`Kvu z*x1wKaUr*7i+6_c3LhgE?(8fBn|1G}D*#QeU5<8W2JAV3rf^?h!2dDlg;g6AJL`Q94`K9mI2%UJL6i-FyF#zwXr*y`_7-ZMSrwg3)Uvrp{<9_%3psF=6*#GLUt^BxG#$y$20SofBlzoUCg zF5V}Pt-S1R-Tu{Oov*w++fE);c;!pILS3Ds_0G4C^a>BI;_1m|gRkZ4UR_;7I*0{d zYiYH=xk~3-zQ3V+AKhy9uNp`HXV&?oAAixkH-3Jqdr^1(AdemWt2wvj;u);??Sx)9 z<=!>DaLT>r)`<^vWgYg=nL4n>{?T3cc0PGY_m2K$bW{B7uHI7d^S{X}s)mkK&-TC$ zFcHPs*-{!pIAaTkuI@H;h9$boTZx$DVeQ($ zbaHuKGPv44bAgw2eYYbx@OyKimF;?4==U#Z^J@>`|JG|d7}|yhMgF_!EjRctu%WL7 z@K8IvRnHjW$h5JMi!7y0Y)5b$*+fPGaq^>`Vfo?W!7!1_4 zoSRF-#oXZW?PywBj1UjkyeW$>e%WhJ0&EJto5*IaO!2+-WfGMJu+y zriSP`Nqz!0%r zQSc(VvN*u2mDv$wdg8V!na4K4v|AI8tqWIgzAiybn$&U}rYDI>6WWHo_~=D)5bRU% zM5yYEe%?vNepuU#B;2ia;_<{;_ON@g(+h7Tw|U`?a*r3@Om6VPo66lC_A9n_XpZxCD`6Z#0nDyyDaQcu0F)OgYTawUaYSx@b#r^@Q7ih3%=iN^4dZBhh{IWp!P8FG${I7bGYBeOb3CUuSsHb=&qEkn(gk!H(4 zv$Z033?^H~nJvT2mQiNQAhR(>$F(pDs`&V|&Ut0$r$p5CpURf{u znZ6$HNL76Mdb}l6@n6@&KsshQ9kXZyH07^vfL27a6?G@Dnt*kK4CVR;+*(xekc}`E z&E}0pW1MRJz7f3Xunh$IYyxkr`1U3kPJA2j(oJ|3tl}3p!7FHH?4|CZpIf`I8bChAhS;z+o{cP6(FB~wiUwA{I(VRaChat z4F{l_Pav~u8@z$)#x}gg9pt08F2f?wH%K~-?O-8g9# zyw7eNw+g;^H$*y!^FOFO>-@X?j&|rr%p@2v3!z*0@|70KDL<;!1eJ~bExyODCyOh7NA9JUaZ{3gA z@>1@T2MZdDrDtvt&&$t4TV9n1L0IrC4`!g5nh&!Zi8X2FTl1j{znc%iP{w;4z(gwJ z(+*%;Wqc2r2M1shs)z!-|CI541uzTE%Lj2+S;ox=VWER;r!D{WAnr=M3UP$W_>4l? z-j+fPv5em>gcPdPkzLsA%HOx*d6e-QE7m>2?GNFkAK~2(L07ztyWN1!Et>erSBt(W zscCqz;7bo-n%j86A&el8zgz@wqKPfSTWcP-6yY4^@oPme9F6HPE{{Au^DvG{9$$AD zJILdg4r5B^aTgm7ejcA>gDDQ;%42q8r_0>=6&nVV$6bqY$DGHri(xGqj}n~rJZ>(L zUEM0d9p3>y?g&oX0lxbP=Jp}})e)T1L%eAzcsJIQk!?HOnvX7pmY8_cN}&syWu#0{qc5 zJ0?x&F$hJqkEiNbMgzE+7sOWH0}#e@b#xLMNaVV zPGh2--~-O!S~ zos)HXore`zr}#W>zKXcV1>CC@@!SirgerUUW&@!c54ni@wIW`65k7`WKKe@xxsvbx z5`(N1%}+zq;~T7(_7zT4C5J1}hyU~y{!FgHSMmKXK`*|m1{e5J;oTA57sBgZi=Ojk z^cDzjvhd13DE_#eZBPU?x z6`byJnt%)B+kY#Mi6HX{8JqwY{_tB_+511ZmJV~ve{hF-n76%(mxRM~O1W3@I&+v# zsl|7gR)?vV+27$JI842ikpJ*I9Eln}{u+iZ&ACbWePB5w|H}Eu$^G|Q!_#fxbZ-7R}c=M2( zIQnaEVq3@gjhnKv`}a5($NBW{VKSN{-^*iK{{Y$at~C+wK`SiUTr`^4FwNeADpe@) z?LkYU;`s)U#Tkau7E*Dh0`C!6B7l5vyOh9k1IPwe3WYZ(*IV#3OWb<2Dynu;6bK-z z)fh^vrQ*{HoFQ;tfeQq_Qs5GSZxpyf;Hm=ONsy&oSL6m&`9XnO1a2$vBY|H8kZ+#v z5V&gq8TfreX%DFQkpS}j^dAKNG{EdEG2l-PsXe3ee*}=Pu^V)e6J(D@0@*<$Lun3F z?5IE!0?id@LBL4?X98^qh*#b&MA{1?-w6R3S3nIS~Od#;4 z0p!_F5=wqLm`ue}4IqoB8%mo&#j^yE9~hzu#2P@>k26%3rcrrCdGJ&Hy z$ZDWv5UEgAb`q#kU>AXt3cNv}MuE2ooKj#4fzt|z-4RB1R)Hu9vb6JxL{pWE3d9ol zN`V9dmla4Q@QniV2z;x+y9BN(kVW7c0kQs<61lFbEGKYNfouXlD6pEqe--$Uz-Q1DSs?wQ27X`W!ctwF%3G`6Fmq0HCdK2iYKmdUt0pvH!{^(`l$p#xlo@|Iv@=InY zdRRQv0J38i>+0vQS{B#^1Vdjys!u#~`Z1y&Hq z5kP+UT}9vn1IRc(>MGWsEYGEKW|V6d0$hQ01U4$LiNIC`wh`E=z^4RuE3k*aJ_WM& z6FHzr0RgK5hX~jdC?-%Ufc%twlt6_6qUlaINf&UP=ra&Emn+kkS;J*s|PmDh%+)skYZ}C4b?DO#hpxN$2^2rQ z#E-A|>2J$;0QUCyXrK8A-*Xi5y^rv@EH@=KT`A5jJ-d|1;}`N+hJYr}`sXD@5WYvH2B=*vp?gaKCH#+0*ke zxCe>5S0=r7Mk9JhBRWMRE|h3QUueXVMI%~AQ)8R|7`z;y%C_lmaBtK`?6S|IeG!Flz7n>55 z7SnqcmWZaBCPdANnVy=FFf%D$RL+dI6R&bN$J_O%hI+ArC%x^k#3{k9Euq%@`9^SQ lD30g%G`n_KKPth_v#kK>_;)+;&pKc6H^4MYdiqS?{{yH~2^atX diff --git a/.doctrees/nbsphinx/notebooks/nmodl-kinetic-schemes.ipynb b/.doctrees/nbsphinx/notebooks/nmodl-kinetic-schemes.ipynb index a2f51eafbe..2844a238a0 100644 --- a/.doctrees/nbsphinx/notebooks/nmodl-kinetic-schemes.ipynb +++ b/.doctrees/nbsphinx/notebooks/nmodl-kinetic-schemes.ipynb @@ -152,10 +152,10 @@ "execution_count": 1, "metadata": { "execution": { - "iopub.execute_input": "2024-11-04T13:31:32.886055Z", - "iopub.status.busy": "2024-11-04T13:31:32.885675Z", - "iopub.status.idle": "2024-11-04T13:31:33.704012Z", - "shell.execute_reply": "2024-11-04T13:31:33.703260Z" + "iopub.execute_input": "2024-11-06T08:37:56.787055Z", + "iopub.status.busy": "2024-11-06T08:37:56.786863Z", + "iopub.status.idle": "2024-11-06T08:37:57.587528Z", + "shell.execute_reply": "2024-11-06T08:37:57.586714Z" } }, "outputs": [], @@ -169,10 +169,10 @@ "execution_count": 2, "metadata": { "execution": { - "iopub.execute_input": "2024-11-04T13:31:33.706553Z", - "iopub.status.busy": "2024-11-04T13:31:33.706338Z", - "iopub.status.idle": "2024-11-04T13:31:33.737363Z", - "shell.execute_reply": "2024-11-04T13:31:33.736658Z" + "iopub.execute_input": "2024-11-06T08:37:57.590107Z", + "iopub.status.busy": "2024-11-06T08:37:57.589677Z", + "iopub.status.idle": "2024-11-06T08:37:57.620925Z", + "shell.execute_reply": "2024-11-06T08:37:57.620322Z" } }, "outputs": [], @@ -277,10 +277,10 @@ "execution_count": 3, "metadata": { "execution": { - "iopub.execute_input": "2024-11-04T13:31:33.740005Z", - "iopub.status.busy": "2024-11-04T13:31:33.739784Z", - "iopub.status.idle": "2024-11-04T13:31:33.744975Z", - "shell.execute_reply": "2024-11-04T13:31:33.744298Z" + "iopub.execute_input": "2024-11-06T08:37:57.623201Z", + "iopub.status.busy": "2024-11-06T08:37:57.622760Z", + "iopub.status.idle": "2024-11-06T08:37:57.627692Z", + "shell.execute_reply": "2024-11-06T08:37:57.627068Z" } }, "outputs": [ @@ -323,10 +323,10 @@ "execution_count": 4, "metadata": { "execution": { - "iopub.execute_input": "2024-11-04T13:31:33.775701Z", - "iopub.status.busy": "2024-11-04T13:31:33.775197Z", - "iopub.status.idle": "2024-11-04T13:31:33.779565Z", - "shell.execute_reply": "2024-11-04T13:31:33.778905Z" + "iopub.execute_input": "2024-11-06T08:37:57.657297Z", + "iopub.status.busy": "2024-11-06T08:37:57.656887Z", + "iopub.status.idle": "2024-11-06T08:37:57.661083Z", + "shell.execute_reply": "2024-11-06T08:37:57.660403Z" } }, "outputs": [ @@ -367,10 +367,10 @@ "execution_count": 5, "metadata": { "execution": { - "iopub.execute_input": "2024-11-04T13:31:33.781642Z", - "iopub.status.busy": "2024-11-04T13:31:33.781447Z", - "iopub.status.idle": "2024-11-04T13:31:33.785392Z", - "shell.execute_reply": "2024-11-04T13:31:33.784759Z" + "iopub.execute_input": "2024-11-06T08:37:57.663047Z", + "iopub.status.busy": "2024-11-06T08:37:57.662857Z", + "iopub.status.idle": "2024-11-06T08:37:57.666368Z", + "shell.execute_reply": "2024-11-06T08:37:57.665815Z" }, "scrolled": true }, @@ -412,10 +412,10 @@ "execution_count": 6, "metadata": { "execution": { - "iopub.execute_input": "2024-11-04T13:31:33.787301Z", - "iopub.status.busy": "2024-11-04T13:31:33.787107Z", - "iopub.status.idle": "2024-11-04T13:31:33.791039Z", - "shell.execute_reply": "2024-11-04T13:31:33.790485Z" + "iopub.execute_input": "2024-11-06T08:37:57.668282Z", + "iopub.status.busy": "2024-11-06T08:37:57.668086Z", + "iopub.status.idle": "2024-11-06T08:37:57.671941Z", + "shell.execute_reply": "2024-11-06T08:37:57.671301Z" }, "scrolled": true }, @@ -459,10 +459,10 @@ "execution_count": 7, "metadata": { "execution": { - "iopub.execute_input": "2024-11-04T13:31:33.792830Z", - "iopub.status.busy": "2024-11-04T13:31:33.792637Z", - "iopub.status.idle": "2024-11-04T13:31:33.797241Z", - "shell.execute_reply": "2024-11-04T13:31:33.796661Z" + "iopub.execute_input": "2024-11-06T08:37:57.674143Z", + "iopub.status.busy": "2024-11-06T08:37:57.673633Z", + "iopub.status.idle": "2024-11-06T08:37:57.678249Z", + "shell.execute_reply": "2024-11-06T08:37:57.677699Z" } }, "outputs": [ diff --git a/.doctrees/nbsphinx/notebooks/nmodl-python-tutorial.ipynb b/.doctrees/nbsphinx/notebooks/nmodl-python-tutorial.ipynb index 921b60eddf..e877f184f4 100644 --- a/.doctrees/nbsphinx/notebooks/nmodl-python-tutorial.ipynb +++ b/.doctrees/nbsphinx/notebooks/nmodl-python-tutorial.ipynb @@ -30,10 +30,10 @@ "execution_count": 1, "metadata": { "execution": { - "iopub.execute_input": "2024-11-04T13:31:42.427487Z", - "iopub.status.busy": "2024-11-04T13:31:42.427288Z", - "iopub.status.idle": "2024-11-04T13:31:43.225988Z", - "shell.execute_reply": "2024-11-04T13:31:43.225143Z" + "iopub.execute_input": "2024-11-06T08:38:03.170833Z", + "iopub.status.busy": "2024-11-06T08:38:03.170324Z", + "iopub.status.idle": "2024-11-06T08:38:03.967699Z", + "shell.execute_reply": "2024-11-06T08:38:03.966912Z" } }, "outputs": [], @@ -63,10 +63,10 @@ "execution_count": 2, "metadata": { "execution": { - "iopub.execute_input": "2024-11-04T13:31:43.228794Z", - "iopub.status.busy": "2024-11-04T13:31:43.228376Z", - "iopub.status.idle": "2024-11-04T13:31:43.257681Z", - "shell.execute_reply": "2024-11-04T13:31:43.256987Z" + "iopub.execute_input": "2024-11-06T08:38:03.970266Z", + "iopub.status.busy": "2024-11-06T08:38:03.970057Z", + "iopub.status.idle": "2024-11-06T08:38:03.998684Z", + "shell.execute_reply": "2024-11-06T08:38:03.998047Z" } }, "outputs": [], @@ -86,10 +86,10 @@ "execution_count": 3, "metadata": { "execution": { - "iopub.execute_input": "2024-11-04T13:31:43.260044Z", - "iopub.status.busy": "2024-11-04T13:31:43.259700Z", - "iopub.status.idle": "2024-11-04T13:31:43.263404Z", - "shell.execute_reply": "2024-11-04T13:31:43.262872Z" + "iopub.execute_input": "2024-11-06T08:38:04.000853Z", + "iopub.status.busy": "2024-11-06T08:38:04.000600Z", + "iopub.status.idle": "2024-11-06T08:38:04.004279Z", + "shell.execute_reply": "2024-11-06T08:38:04.003615Z" } }, "outputs": [], @@ -152,10 +152,10 @@ "execution_count": 4, "metadata": { "execution": { - "iopub.execute_input": "2024-11-04T13:31:43.265384Z", - "iopub.status.busy": "2024-11-04T13:31:43.264977Z", - "iopub.status.idle": "2024-11-04T13:31:43.268626Z", - "shell.execute_reply": "2024-11-04T13:31:43.268100Z" + "iopub.execute_input": "2024-11-06T08:38:04.006544Z", + "iopub.status.busy": "2024-11-06T08:38:04.006110Z", + "iopub.status.idle": "2024-11-06T08:38:04.009983Z", + "shell.execute_reply": "2024-11-06T08:38:04.009328Z" } }, "outputs": [], @@ -183,10 +183,10 @@ "execution_count": 5, "metadata": { "execution": { - "iopub.execute_input": "2024-11-04T13:31:43.270702Z", - "iopub.status.busy": "2024-11-04T13:31:43.270398Z", - "iopub.status.idle": "2024-11-04T13:31:43.273926Z", - "shell.execute_reply": "2024-11-04T13:31:43.273316Z" + "iopub.execute_input": "2024-11-06T08:38:04.012065Z", + "iopub.status.busy": "2024-11-06T08:38:04.011696Z", + "iopub.status.idle": "2024-11-06T08:38:04.015406Z", + "shell.execute_reply": "2024-11-06T08:38:04.014752Z" } }, "outputs": [ @@ -235,10 +235,10 @@ "execution_count": 6, "metadata": { "execution": { - "iopub.execute_input": "2024-11-04T13:31:43.275949Z", - "iopub.status.busy": "2024-11-04T13:31:43.275647Z", - "iopub.status.idle": "2024-11-04T13:31:43.279674Z", - "shell.execute_reply": "2024-11-04T13:31:43.279166Z" + "iopub.execute_input": "2024-11-06T08:38:04.017566Z", + "iopub.status.busy": "2024-11-06T08:38:04.017234Z", + "iopub.status.idle": "2024-11-06T08:38:04.021230Z", + "shell.execute_reply": "2024-11-06T08:38:04.020693Z" } }, "outputs": [], @@ -260,10 +260,10 @@ "execution_count": 7, "metadata": { "execution": { - "iopub.execute_input": "2024-11-04T13:31:43.281668Z", - "iopub.status.busy": "2024-11-04T13:31:43.281209Z", - "iopub.status.idle": "2024-11-04T13:31:43.284809Z", - "shell.execute_reply": "2024-11-04T13:31:43.284202Z" + "iopub.execute_input": "2024-11-06T08:38:04.023257Z", + "iopub.status.busy": "2024-11-06T08:38:04.022892Z", + "iopub.status.idle": "2024-11-06T08:38:04.026384Z", + "shell.execute_reply": "2024-11-06T08:38:04.025855Z" } }, "outputs": [ @@ -297,10 +297,10 @@ "execution_count": 8, "metadata": { "execution": { - "iopub.execute_input": "2024-11-04T13:31:43.286833Z", - "iopub.status.busy": "2024-11-04T13:31:43.286398Z", - "iopub.status.idle": "2024-11-04T13:31:43.293315Z", - "shell.execute_reply": "2024-11-04T13:31:43.292735Z" + "iopub.execute_input": "2024-11-06T08:38:04.028289Z", + "iopub.status.busy": "2024-11-06T08:38:04.027985Z", + "iopub.status.idle": "2024-11-06T08:38:04.035164Z", + "shell.execute_reply": "2024-11-06T08:38:04.034589Z" } }, "outputs": [ @@ -365,10 +365,10 @@ "execution_count": 9, "metadata": { "execution": { - "iopub.execute_input": "2024-11-04T13:31:43.295223Z", - "iopub.status.busy": "2024-11-04T13:31:43.295029Z", - "iopub.status.idle": "2024-11-04T13:31:43.299182Z", - "shell.execute_reply": "2024-11-04T13:31:43.298576Z" + "iopub.execute_input": "2024-11-06T08:38:04.037284Z", + "iopub.status.busy": "2024-11-06T08:38:04.036912Z", + "iopub.status.idle": "2024-11-06T08:38:04.041008Z", + "shell.execute_reply": "2024-11-06T08:38:04.040497Z" } }, "outputs": [ @@ -416,10 +416,10 @@ "execution_count": 10, "metadata": { "execution": { - "iopub.execute_input": "2024-11-04T13:31:43.301100Z", - "iopub.status.busy": "2024-11-04T13:31:43.300906Z", - "iopub.status.idle": "2024-11-04T13:31:43.304007Z", - "shell.execute_reply": "2024-11-04T13:31:43.303517Z" + "iopub.execute_input": "2024-11-06T08:38:04.043084Z", + "iopub.status.busy": "2024-11-06T08:38:04.042723Z", + "iopub.status.idle": "2024-11-06T08:38:04.045841Z", + "shell.execute_reply": "2024-11-06T08:38:04.045325Z" } }, "outputs": [], @@ -441,10 +441,10 @@ "execution_count": 11, "metadata": { "execution": { - "iopub.execute_input": "2024-11-04T13:31:43.305837Z", - "iopub.status.busy": "2024-11-04T13:31:43.305646Z", - "iopub.status.idle": "2024-11-04T13:31:43.309529Z", - "shell.execute_reply": "2024-11-04T13:31:43.308967Z" + "iopub.execute_input": "2024-11-06T08:38:04.047838Z", + "iopub.status.busy": "2024-11-06T08:38:04.047429Z", + "iopub.status.idle": "2024-11-06T08:38:04.050933Z", + "shell.execute_reply": "2024-11-06T08:38:04.050415Z" } }, "outputs": [ @@ -510,10 +510,10 @@ "execution_count": 12, "metadata": { "execution": { - "iopub.execute_input": "2024-11-04T13:31:43.311275Z", - "iopub.status.busy": "2024-11-04T13:31:43.311085Z", - "iopub.status.idle": "2024-11-04T13:31:43.314591Z", - "shell.execute_reply": "2024-11-04T13:31:43.314046Z" + "iopub.execute_input": "2024-11-06T08:38:04.053041Z", + "iopub.status.busy": "2024-11-06T08:38:04.052590Z", + "iopub.status.idle": "2024-11-06T08:38:04.056000Z", + "shell.execute_reply": "2024-11-06T08:38:04.055342Z" } }, "outputs": [ @@ -548,10 +548,10 @@ "execution_count": 13, "metadata": { "execution": { - "iopub.execute_input": "2024-11-04T13:31:43.316314Z", - "iopub.status.busy": "2024-11-04T13:31:43.316128Z", - "iopub.status.idle": "2024-11-04T13:31:43.319354Z", - "shell.execute_reply": "2024-11-04T13:31:43.318840Z" + "iopub.execute_input": "2024-11-06T08:38:04.058063Z", + "iopub.status.busy": "2024-11-06T08:38:04.057669Z", + "iopub.status.idle": "2024-11-06T08:38:04.061302Z", + "shell.execute_reply": "2024-11-06T08:38:04.060757Z" } }, "outputs": [ @@ -584,10 +584,10 @@ "execution_count": 14, "metadata": { "execution": { - "iopub.execute_input": "2024-11-04T13:31:43.321423Z", - "iopub.status.busy": "2024-11-04T13:31:43.321038Z", - "iopub.status.idle": "2024-11-04T13:31:43.324368Z", - "shell.execute_reply": "2024-11-04T13:31:43.323848Z" + "iopub.execute_input": "2024-11-06T08:38:04.063440Z", + "iopub.status.busy": "2024-11-06T08:38:04.062977Z", + "iopub.status.idle": "2024-11-06T08:38:04.066696Z", + "shell.execute_reply": "2024-11-06T08:38:04.066047Z" } }, "outputs": [ @@ -622,10 +622,10 @@ "execution_count": 15, "metadata": { "execution": { - "iopub.execute_input": "2024-11-04T13:31:43.326317Z", - "iopub.status.busy": "2024-11-04T13:31:43.326123Z", - "iopub.status.idle": "2024-11-04T13:31:43.329826Z", - "shell.execute_reply": "2024-11-04T13:31:43.329247Z" + "iopub.execute_input": "2024-11-06T08:38:04.068942Z", + "iopub.status.busy": "2024-11-06T08:38:04.068346Z", + "iopub.status.idle": "2024-11-06T08:38:04.072561Z", + "shell.execute_reply": "2024-11-06T08:38:04.071925Z" } }, "outputs": [ @@ -669,10 +669,10 @@ "execution_count": 16, "metadata": { "execution": { - "iopub.execute_input": "2024-11-04T13:31:43.331717Z", - "iopub.status.busy": "2024-11-04T13:31:43.331527Z", - "iopub.status.idle": "2024-11-04T13:31:43.336992Z", - "shell.execute_reply": "2024-11-04T13:31:43.336454Z" + "iopub.execute_input": "2024-11-06T08:38:04.074714Z", + "iopub.status.busy": "2024-11-06T08:38:04.074264Z", + "iopub.status.idle": "2024-11-06T08:38:04.079633Z", + "shell.execute_reply": "2024-11-06T08:38:04.078970Z" } }, "outputs": [ @@ -733,10 +733,10 @@ "execution_count": 17, "metadata": { "execution": { - "iopub.execute_input": "2024-11-04T13:31:43.338809Z", - "iopub.status.busy": "2024-11-04T13:31:43.338617Z", - "iopub.status.idle": "2024-11-04T13:31:43.342253Z", - "shell.execute_reply": "2024-11-04T13:31:43.341718Z" + "iopub.execute_input": "2024-11-06T08:38:04.081679Z", + "iopub.status.busy": "2024-11-06T08:38:04.081327Z", + "iopub.status.idle": "2024-11-06T08:38:04.084891Z", + "shell.execute_reply": "2024-11-06T08:38:04.084251Z" } }, "outputs": [], @@ -761,10 +761,10 @@ "execution_count": 18, "metadata": { "execution": { - "iopub.execute_input": "2024-11-04T13:31:43.344050Z", - "iopub.status.busy": "2024-11-04T13:31:43.343863Z", - "iopub.status.idle": "2024-11-04T13:31:43.353806Z", - "shell.execute_reply": "2024-11-04T13:31:43.353247Z" + "iopub.execute_input": "2024-11-06T08:38:04.086935Z", + "iopub.status.busy": "2024-11-06T08:38:04.086442Z", + "iopub.status.idle": "2024-11-06T08:38:04.096456Z", + "shell.execute_reply": "2024-11-06T08:38:04.095784Z" } }, "outputs": [], @@ -857,10 +857,10 @@ "execution_count": 19, "metadata": { "execution": { - "iopub.execute_input": "2024-11-04T13:31:43.355741Z", - "iopub.status.busy": "2024-11-04T13:31:43.355291Z", - "iopub.status.idle": "2024-11-04T13:31:43.358956Z", - "shell.execute_reply": "2024-11-04T13:31:43.358318Z" + "iopub.execute_input": "2024-11-06T08:38:04.098372Z", + "iopub.status.busy": "2024-11-06T08:38:04.098018Z", + "iopub.status.idle": "2024-11-06T08:38:04.101714Z", + "shell.execute_reply": "2024-11-06T08:38:04.101068Z" } }, "outputs": [ @@ -897,10 +897,10 @@ "execution_count": 20, "metadata": { "execution": { - "iopub.execute_input": "2024-11-04T13:31:43.361037Z", - "iopub.status.busy": "2024-11-04T13:31:43.360657Z", - "iopub.status.idle": "2024-11-04T13:31:43.366207Z", - "shell.execute_reply": "2024-11-04T13:31:43.365583Z" + "iopub.execute_input": "2024-11-06T08:38:04.103801Z", + "iopub.status.busy": "2024-11-06T08:38:04.103304Z", + "iopub.status.idle": "2024-11-06T08:38:04.109149Z", + "shell.execute_reply": "2024-11-06T08:38:04.108599Z" } }, "outputs": [ diff --git a/.doctrees/nbsphinx/notebooks/nmodl-sympy-conductance.ipynb b/.doctrees/nbsphinx/notebooks/nmodl-sympy-conductance.ipynb index 090c48725f..2586511b79 100644 --- a/.doctrees/nbsphinx/notebooks/nmodl-sympy-conductance.ipynb +++ b/.doctrees/nbsphinx/notebooks/nmodl-sympy-conductance.ipynb @@ -86,10 +86,10 @@ "execution_count": 1, "metadata": { "execution": { - "iopub.execute_input": "2024-11-04T13:31:45.588506Z", - "iopub.status.busy": "2024-11-04T13:31:45.588130Z", - "iopub.status.idle": "2024-11-04T13:31:46.389015Z", - "shell.execute_reply": "2024-11-04T13:31:46.388147Z" + "iopub.execute_input": "2024-11-06T08:38:06.527392Z", + "iopub.status.busy": "2024-11-06T08:38:06.526804Z", + "iopub.status.idle": "2024-11-06T08:38:07.323170Z", + "shell.execute_reply": "2024-11-06T08:38:07.322306Z" } }, "outputs": [], @@ -103,10 +103,10 @@ "execution_count": 2, "metadata": { "execution": { - "iopub.execute_input": "2024-11-04T13:31:46.391658Z", - "iopub.status.busy": "2024-11-04T13:31:46.391437Z", - "iopub.status.idle": "2024-11-04T13:31:46.423343Z", - "shell.execute_reply": "2024-11-04T13:31:46.422584Z" + "iopub.execute_input": "2024-11-06T08:38:07.325703Z", + "iopub.status.busy": "2024-11-06T08:38:07.325486Z", + "iopub.status.idle": "2024-11-06T08:38:07.356349Z", + "shell.execute_reply": "2024-11-06T08:38:07.355611Z" } }, "outputs": [], @@ -149,10 +149,10 @@ "execution_count": 3, "metadata": { "execution": { - "iopub.execute_input": "2024-11-04T13:31:46.425963Z", - "iopub.status.busy": "2024-11-04T13:31:46.425559Z", - "iopub.status.idle": "2024-11-04T13:31:46.703287Z", - "shell.execute_reply": "2024-11-04T13:31:46.702599Z" + "iopub.execute_input": "2024-11-06T08:38:07.358666Z", + "iopub.status.busy": "2024-11-06T08:38:07.358178Z", + "iopub.status.idle": "2024-11-06T08:38:07.625403Z", + "shell.execute_reply": "2024-11-06T08:38:07.624710Z" } }, "outputs": [ @@ -196,10 +196,10 @@ "execution_count": 4, "metadata": { "execution": { - "iopub.execute_input": "2024-11-04T13:31:46.705765Z", - "iopub.status.busy": "2024-11-04T13:31:46.705339Z", - "iopub.status.idle": "2024-11-04T13:31:46.837691Z", - "shell.execute_reply": "2024-11-04T13:31:46.836997Z" + "iopub.execute_input": "2024-11-06T08:38:07.627845Z", + "iopub.status.busy": "2024-11-06T08:38:07.627420Z", + "iopub.status.idle": "2024-11-06T08:38:07.759534Z", + "shell.execute_reply": "2024-11-06T08:38:07.758890Z" } }, "outputs": [ @@ -243,10 +243,10 @@ "execution_count": 5, "metadata": { "execution": { - "iopub.execute_input": "2024-11-04T13:31:46.839841Z", - "iopub.status.busy": "2024-11-04T13:31:46.839619Z", - "iopub.status.idle": "2024-11-04T13:31:46.847822Z", - "shell.execute_reply": "2024-11-04T13:31:46.847305Z" + "iopub.execute_input": "2024-11-06T08:38:07.761805Z", + "iopub.status.busy": "2024-11-06T08:38:07.761337Z", + "iopub.status.idle": "2024-11-06T08:38:07.769571Z", + "shell.execute_reply": "2024-11-06T08:38:07.768934Z" } }, "outputs": [ @@ -290,10 +290,10 @@ "execution_count": 6, "metadata": { "execution": { - "iopub.execute_input": "2024-11-04T13:31:46.849994Z", - "iopub.status.busy": "2024-11-04T13:31:46.849614Z", - "iopub.status.idle": "2024-11-04T13:31:46.867036Z", - "shell.execute_reply": "2024-11-04T13:31:46.866492Z" + "iopub.execute_input": "2024-11-06T08:38:07.771751Z", + "iopub.status.busy": "2024-11-06T08:38:07.771339Z", + "iopub.status.idle": "2024-11-06T08:38:07.788346Z", + "shell.execute_reply": "2024-11-06T08:38:07.787812Z" } }, "outputs": [ @@ -337,10 +337,10 @@ "execution_count": 7, "metadata": { "execution": { - "iopub.execute_input": "2024-11-04T13:31:46.869238Z", - "iopub.status.busy": "2024-11-04T13:31:46.868856Z", - "iopub.status.idle": "2024-11-04T13:31:46.987550Z", - "shell.execute_reply": "2024-11-04T13:31:46.986928Z" + "iopub.execute_input": "2024-11-06T08:38:07.790542Z", + "iopub.status.busy": "2024-11-06T08:38:07.790164Z", + "iopub.status.idle": "2024-11-06T08:38:07.908660Z", + "shell.execute_reply": "2024-11-06T08:38:07.908096Z" } }, "outputs": [ @@ -400,10 +400,10 @@ "execution_count": 8, "metadata": { "execution": { - "iopub.execute_input": "2024-11-04T13:31:46.989515Z", - "iopub.status.busy": "2024-11-04T13:31:46.989297Z", - "iopub.status.idle": "2024-11-04T13:31:47.085718Z", - "shell.execute_reply": "2024-11-04T13:31:47.085034Z" + "iopub.execute_input": "2024-11-06T08:38:07.910670Z", + "iopub.status.busy": "2024-11-06T08:38:07.910284Z", + "iopub.status.idle": "2024-11-06T08:38:08.004757Z", + "shell.execute_reply": "2024-11-06T08:38:08.004150Z" } }, "outputs": [ @@ -456,10 +456,10 @@ "execution_count": 9, "metadata": { "execution": { - "iopub.execute_input": "2024-11-04T13:31:47.088163Z", - "iopub.status.busy": "2024-11-04T13:31:47.087748Z", - "iopub.status.idle": "2024-11-04T13:31:47.162844Z", - "shell.execute_reply": "2024-11-04T13:31:47.162156Z" + "iopub.execute_input": "2024-11-06T08:38:08.006776Z", + "iopub.status.busy": "2024-11-06T08:38:08.006393Z", + "iopub.status.idle": "2024-11-06T08:38:08.080043Z", + "shell.execute_reply": "2024-11-06T08:38:08.079422Z" } }, "outputs": [ diff --git a/.doctrees/nbsphinx/notebooks/nmodl-sympy-solver-cnexp.ipynb b/.doctrees/nbsphinx/notebooks/nmodl-sympy-solver-cnexp.ipynb index 8232923552..8f83716fc1 100644 --- a/.doctrees/nbsphinx/notebooks/nmodl-sympy-solver-cnexp.ipynb +++ b/.doctrees/nbsphinx/notebooks/nmodl-sympy-solver-cnexp.ipynb @@ -62,10 +62,10 @@ "execution_count": 1, "metadata": { "execution": { - "iopub.execute_input": "2024-11-04T13:31:48.937554Z", - "iopub.status.busy": "2024-11-04T13:31:48.937348Z", - "iopub.status.idle": "2024-11-04T13:31:49.750790Z", - "shell.execute_reply": "2024-11-04T13:31:49.749911Z" + "iopub.execute_input": "2024-11-06T08:38:09.992080Z", + "iopub.status.busy": "2024-11-06T08:38:09.991883Z", + "iopub.status.idle": "2024-11-06T08:38:10.809708Z", + "shell.execute_reply": "2024-11-06T08:38:10.808842Z" } }, "outputs": [], @@ -79,10 +79,10 @@ "execution_count": 2, "metadata": { "execution": { - "iopub.execute_input": "2024-11-04T13:31:49.753409Z", - "iopub.status.busy": "2024-11-04T13:31:49.753168Z", - "iopub.status.idle": "2024-11-04T13:31:49.784449Z", - "shell.execute_reply": "2024-11-04T13:31:49.783696Z" + "iopub.execute_input": "2024-11-06T08:38:10.812351Z", + "iopub.status.busy": "2024-11-06T08:38:10.811951Z", + "iopub.status.idle": "2024-11-06T08:38:10.843653Z", + "shell.execute_reply": "2024-11-06T08:38:10.842973Z" } }, "outputs": [], @@ -123,10 +123,10 @@ "execution_count": 3, "metadata": { "execution": { - "iopub.execute_input": "2024-11-04T13:31:49.787090Z", - "iopub.status.busy": "2024-11-04T13:31:49.786615Z", - "iopub.status.idle": "2024-11-04T13:31:50.204613Z", - "shell.execute_reply": "2024-11-04T13:31:50.203889Z" + "iopub.execute_input": "2024-11-06T08:38:10.845887Z", + "iopub.status.busy": "2024-11-06T08:38:10.845519Z", + "iopub.status.idle": "2024-11-06T08:38:11.265633Z", + "shell.execute_reply": "2024-11-06T08:38:11.264907Z" } }, "outputs": [ @@ -165,10 +165,10 @@ "execution_count": 4, "metadata": { "execution": { - "iopub.execute_input": "2024-11-04T13:31:50.206870Z", - "iopub.status.busy": "2024-11-04T13:31:50.206427Z", - "iopub.status.idle": "2024-11-04T13:31:50.317543Z", - "shell.execute_reply": "2024-11-04T13:31:50.316966Z" + "iopub.execute_input": "2024-11-06T08:38:11.267860Z", + "iopub.status.busy": "2024-11-06T08:38:11.267616Z", + "iopub.status.idle": "2024-11-06T08:38:11.378384Z", + "shell.execute_reply": "2024-11-06T08:38:11.377762Z" } }, "outputs": [ @@ -207,10 +207,10 @@ "execution_count": 5, "metadata": { "execution": { - "iopub.execute_input": "2024-11-04T13:31:50.319870Z", - "iopub.status.busy": "2024-11-04T13:31:50.319472Z", - "iopub.status.idle": "2024-11-04T13:31:50.520475Z", - "shell.execute_reply": "2024-11-04T13:31:50.519786Z" + "iopub.execute_input": "2024-11-06T08:38:11.380443Z", + "iopub.status.busy": "2024-11-06T08:38:11.380236Z", + "iopub.status.idle": "2024-11-06T08:38:11.577851Z", + "shell.execute_reply": "2024-11-06T08:38:11.577261Z" } }, "outputs": [ @@ -255,10 +255,10 @@ "execution_count": 6, "metadata": { "execution": { - "iopub.execute_input": "2024-11-04T13:31:50.522840Z", - "iopub.status.busy": "2024-11-04T13:31:50.522436Z", - "iopub.status.idle": "2024-11-04T13:31:50.685425Z", - "shell.execute_reply": "2024-11-04T13:31:50.684778Z" + "iopub.execute_input": "2024-11-06T08:38:11.579939Z", + "iopub.status.busy": "2024-11-06T08:38:11.579731Z", + "iopub.status.idle": "2024-11-06T08:38:11.738896Z", + "shell.execute_reply": "2024-11-06T08:38:11.738292Z" } }, "outputs": [ @@ -303,10 +303,10 @@ "execution_count": 7, "metadata": { "execution": { - "iopub.execute_input": "2024-11-04T13:31:50.687629Z", - "iopub.status.busy": "2024-11-04T13:31:50.687225Z", - "iopub.status.idle": "2024-11-04T13:31:52.420096Z", - "shell.execute_reply": "2024-11-04T13:31:52.419380Z" + "iopub.execute_input": "2024-11-06T08:38:11.740789Z", + "iopub.status.busy": "2024-11-06T08:38:11.740584Z", + "iopub.status.idle": "2024-11-06T08:38:13.513421Z", + "shell.execute_reply": "2024-11-06T08:38:13.512799Z" } }, "outputs": [ @@ -351,10 +351,10 @@ "execution_count": 8, "metadata": { "execution": { - "iopub.execute_input": "2024-11-04T13:31:52.422516Z", - "iopub.status.busy": "2024-11-04T13:31:52.422120Z", - "iopub.status.idle": "2024-11-04T13:31:54.627422Z", - "shell.execute_reply": "2024-11-04T13:31:54.626723Z" + "iopub.execute_input": "2024-11-06T08:38:13.515561Z", + "iopub.status.busy": "2024-11-06T08:38:13.515319Z", + "iopub.status.idle": "2024-11-06T08:38:15.769848Z", + "shell.execute_reply": "2024-11-06T08:38:15.769126Z" } }, "outputs": [ diff --git a/.doctrees/nbsphinx/notebooks/nmodl-sympy-solver-derivimplicit.ipynb b/.doctrees/nbsphinx/notebooks/nmodl-sympy-solver-derivimplicit.ipynb index 511c09e5fe..85499bff2c 100644 --- a/.doctrees/nbsphinx/notebooks/nmodl-sympy-solver-derivimplicit.ipynb +++ b/.doctrees/nbsphinx/notebooks/nmodl-sympy-solver-derivimplicit.ipynb @@ -39,10 +39,10 @@ "execution_count": 1, "metadata": { "execution": { - "iopub.execute_input": "2024-11-04T13:31:56.328234Z", - "iopub.status.busy": "2024-11-04T13:31:56.328031Z", - "iopub.status.idle": "2024-11-04T13:31:57.131405Z", - "shell.execute_reply": "2024-11-04T13:31:57.130533Z" + "iopub.execute_input": "2024-11-06T08:38:17.395738Z", + "iopub.status.busy": "2024-11-06T08:38:17.395148Z", + "iopub.status.idle": "2024-11-06T08:38:18.200570Z", + "shell.execute_reply": "2024-11-06T08:38:18.199784Z" } }, "outputs": [], @@ -56,10 +56,10 @@ "execution_count": 2, "metadata": { "execution": { - "iopub.execute_input": "2024-11-04T13:31:57.134323Z", - "iopub.status.busy": "2024-11-04T13:31:57.133829Z", - "iopub.status.idle": "2024-11-04T13:31:57.164592Z", - "shell.execute_reply": "2024-11-04T13:31:57.163970Z" + "iopub.execute_input": "2024-11-06T08:38:18.203207Z", + "iopub.status.busy": "2024-11-06T08:38:18.202792Z", + "iopub.status.idle": "2024-11-06T08:38:18.234059Z", + "shell.execute_reply": "2024-11-06T08:38:18.233413Z" } }, "outputs": [], @@ -100,10 +100,10 @@ "execution_count": 3, "metadata": { "execution": { - "iopub.execute_input": "2024-11-04T13:31:57.167045Z", - "iopub.status.busy": "2024-11-04T13:31:57.166684Z", - "iopub.status.idle": "2024-11-04T13:31:57.655151Z", - "shell.execute_reply": "2024-11-04T13:31:57.654428Z" + "iopub.execute_input": "2024-11-06T08:38:18.236501Z", + "iopub.status.busy": "2024-11-06T08:38:18.236107Z", + "iopub.status.idle": "2024-11-06T08:38:18.724171Z", + "shell.execute_reply": "2024-11-06T08:38:18.723571Z" } }, "outputs": [ @@ -165,10 +165,10 @@ "execution_count": 4, "metadata": { "execution": { - "iopub.execute_input": "2024-11-04T13:31:57.657518Z", - "iopub.status.busy": "2024-11-04T13:31:57.657091Z", - "iopub.status.idle": "2024-11-04T13:31:57.954826Z", - "shell.execute_reply": "2024-11-04T13:31:57.954129Z" + "iopub.execute_input": "2024-11-06T08:38:18.726402Z", + "iopub.status.busy": "2024-11-06T08:38:18.725969Z", + "iopub.status.idle": "2024-11-06T08:38:19.021643Z", + "shell.execute_reply": "2024-11-06T08:38:19.020932Z" } }, "outputs": [ diff --git a/.doctrees/nbsphinx/notebooks/nmodl-sympy-solver-sparse.ipynb b/.doctrees/nbsphinx/notebooks/nmodl-sympy-solver-sparse.ipynb index 289c5054bd..f7977f4552 100644 --- a/.doctrees/nbsphinx/notebooks/nmodl-sympy-solver-sparse.ipynb +++ b/.doctrees/nbsphinx/notebooks/nmodl-sympy-solver-sparse.ipynb @@ -39,10 +39,10 @@ "execution_count": 1, "metadata": { "execution": { - "iopub.execute_input": "2024-11-04T13:31:59.232199Z", - "iopub.status.busy": "2024-11-04T13:31:59.231648Z", - "iopub.status.idle": "2024-11-04T13:32:00.053886Z", - "shell.execute_reply": "2024-11-04T13:32:00.053088Z" + "iopub.execute_input": "2024-11-06T08:38:20.513653Z", + "iopub.status.busy": "2024-11-06T08:38:20.513459Z", + "iopub.status.idle": "2024-11-06T08:38:21.302934Z", + "shell.execute_reply": "2024-11-06T08:38:21.302178Z" } }, "outputs": [], @@ -56,10 +56,10 @@ "execution_count": 2, "metadata": { "execution": { - "iopub.execute_input": "2024-11-04T13:32:00.056517Z", - "iopub.status.busy": "2024-11-04T13:32:00.056090Z", - "iopub.status.idle": "2024-11-04T13:32:00.087427Z", - "shell.execute_reply": "2024-11-04T13:32:00.086792Z" + "iopub.execute_input": "2024-11-06T08:38:21.305656Z", + "iopub.status.busy": "2024-11-06T08:38:21.305122Z", + "iopub.status.idle": "2024-11-06T08:38:21.335586Z", + "shell.execute_reply": "2024-11-06T08:38:21.334842Z" } }, "outputs": [], @@ -100,10 +100,10 @@ "execution_count": 3, "metadata": { "execution": { - "iopub.execute_input": "2024-11-04T13:32:00.089801Z", - "iopub.status.busy": "2024-11-04T13:32:00.089461Z", - "iopub.status.idle": "2024-11-04T13:32:00.580288Z", - "shell.execute_reply": "2024-11-04T13:32:00.579639Z" + "iopub.execute_input": "2024-11-06T08:38:21.337960Z", + "iopub.status.busy": "2024-11-06T08:38:21.337460Z", + "iopub.status.idle": "2024-11-06T08:38:21.820950Z", + "shell.execute_reply": "2024-11-06T08:38:21.820278Z" } }, "outputs": [ @@ -165,10 +165,10 @@ "execution_count": 4, "metadata": { "execution": { - "iopub.execute_input": "2024-11-04T13:32:00.582694Z", - "iopub.status.busy": "2024-11-04T13:32:00.582164Z", - "iopub.status.idle": "2024-11-04T13:32:00.874018Z", - "shell.execute_reply": "2024-11-04T13:32:00.873258Z" + "iopub.execute_input": "2024-11-06T08:38:21.823455Z", + "iopub.status.busy": "2024-11-06T08:38:21.823013Z", + "iopub.status.idle": "2024-11-06T08:38:22.127460Z", + "shell.execute_reply": "2024-11-06T08:38:22.126809Z" } }, "outputs": [ diff --git a/doxygen/after__cvode__to__cnexp_8cpp_source.html b/doxygen/after__cvode__to__cnexp_8cpp_source.html index 685fac2866..1edf4173c2 100644 --- a/doxygen/after__cvode__to__cnexp_8cpp_source.html +++ b/doxygen/after__cvode__to__cnexp_8cpp_source.html @@ -153,8 +153,8 @@
57  )";
58 
59  THEN("AfterCVodeToCnexp visitor replaces after_cvode solver with cnexp") {
-
60  std::string input = reindent_text(nmodl_text);
-
61  auto expected_result = reindent_text(output_nmodl);
+
60  std::string input = reindent_text(nmodl_text);
+
61  auto expected_result = reindent_text(output_nmodl);
62  auto result = run_after_cvode_to_cnexp_visitor(input);
63  REQUIRE(result == expected_result);
64  }
@@ -166,12 +166,12 @@
Class that binds all pieces together for parsing nmodl file.
std::string to_nmodl(const ast::Ast &node, const std::set< ast::AstNodeType > &exclude_types)
Given AST node, return the NMODL string representation.
SCENARIO("AfterCVodeToCnexpVisitor changes after_cvode solver method to cnexp")
+
std::string reindent_text(const std::string &text, int indent_level)
Reindent nmodl text for text-to-text comparison.
Definition: test_utils.cpp:53
encapsulates code generation backend implementations
Definition: ast_common.hpp:26
Utility functions for visitors implementation.
Auto generated AST classes declaration.
nmodl::parser::UnitDriver driver
Definition: parser.cpp:28
bool parse_string(const std::string &input)
parser Units provided as string (used for testing)
Definition: unit_driver.cpp:40
-
std::string reindent_text(const std::string &text)
Reindent nmodl text for text-to-text comparison.
Definition: test_utils.cpp:53
Visitor to change usage of after_cvode solver to cnexp.
Visitor for checking parents of ast nodes
diff --git a/doxygen/classnmodl_1_1codegen_1_1_codegen_acc_visitor-members.html b/doxygen/classnmodl_1_1codegen_1_1_codegen_acc_visitor-members.html index 00f34c4de6..7b7cac3289 100644 --- a/doxygen/classnmodl_1_1codegen_1_1_codegen_acc_visitor-members.html +++ b/doxygen/classnmodl_1_1codegen_1_1_codegen_acc_visitor-members.html @@ -108,9 +108,7 @@ codegen_float_variablesnmodl::codegen::CodegenCppVisitorprotected codegen_global_variablesnmodl::codegen::CodegenCppVisitorprotected codegen_int_variablesnmodl::codegen::CodegenCppVisitorprotected - CodegenCppVisitor(std::string mod_filename, const std::string &output_dir, std::string float_type, const bool optimize_ionvar_copies, std::unique_ptr< nmodl::utils::Blame > blame)nmodl::codegen::CodegenCoreneuronCppVisitorinline - CodegenCppVisitor(std::string mod_filename, std::ostream &stream, std::string float_type, const bool optimize_ionvar_copies, std::unique_ptr< nmodl::utils::Blame > blame=nullptr)nmodl::codegen::CodegenCoreneuronCppVisitorinline - nmodl::codegen::CodegenCppVisitor::CodegenCppVisitor(std::string mod_filename, const std::string &output_dir, std::string float_type, const bool optimize_ionvar_copies, std::unique_ptr< nmodl::utils::Blame > blame)nmodl::codegen::CodegenCppVisitorinline + CodegenCppVisitor(std::string mod_filename, std::ostream &stream, std::string float_type, const bool optimize_ionvar_copies, std::unique_ptr< nmodl::utils::Blame > blame=nullptr)nmodl::codegen::CodegenCoreneuronCppVisitorinline nmodl::codegen::CodegenCppVisitor::CodegenCppVisitor(std::string mod_filename, std::ostream &stream, std::string float_type, const bool optimize_ionvar_copies, std::unique_ptr< nmodl::utils::Blame > blame=nullptr)nmodl::codegen::CodegenCppVisitorinline compute_method_name(BlockType type) constnmodl::codegen::CodegenCppVisitorprotected current_watch_statementnmodl::codegen::CodegenCppVisitorprotected diff --git a/doxygen/classnmodl_1_1codegen_1_1_codegen_acc_visitor.html b/doxygen/classnmodl_1_1codegen_1_1_codegen_acc_visitor.html index 4ef8386943..8210104a74 100644 --- a/doxygen/classnmodl_1_1codegen_1_1_codegen_acc_visitor.html +++ b/doxygen/classnmodl_1_1codegen_1_1_codegen_acc_visitor.html @@ -804,16 +804,10 @@ void print_mechanism_range_var_structure (bool print_initializers) override  Print the structure that wraps all range and int variables required for the NMODL. More...
  - CodegenCppVisitor (std::string mod_filename, const std::string &output_dir, std::string float_type, const bool optimize_ionvar_copies, std::unique_ptr< nmodl::utils::Blame > blame) - Constructs the C++ code generator visitor. More...
-   CodegenCppVisitor (std::string mod_filename, std::ostream &stream, std::string float_type, const bool optimize_ionvar_copies, std::unique_ptr< nmodl::utils::Blame > blame=nullptr)  Constructs the C++ code generator visitor. More...
  - Public Member Functions inherited from nmodl::codegen::CodegenCppVisitorCodegenCppVisitor (std::string mod_filename, const std::string &output_dir, std::string float_type, const bool optimize_ionvar_copies, std::unique_ptr< nmodl::utils::Blame > blame) - Constructs the C++ code generator visitor. More...
-   CodegenCppVisitor (std::string mod_filename, std::ostream &stream, std::string float_type, const bool optimize_ionvar_copies, std::unique_ptr< nmodl::utils::Blame > blame=nullptr)  Constructs the C++ code generator visitor. More...
  diff --git a/doxygen/classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor-members.html b/doxygen/classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor-members.html index ca40748882..4766c64801 100644 --- a/doxygen/classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor-members.html +++ b/doxygen/classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor-members.html @@ -108,9 +108,7 @@ codegen_float_variablesnmodl::codegen::CodegenCppVisitorprotected codegen_global_variablesnmodl::codegen::CodegenCppVisitorprotected codegen_int_variablesnmodl::codegen::CodegenCppVisitorprotected - CodegenCppVisitor(std::string mod_filename, const std::string &output_dir, std::string float_type, const bool optimize_ionvar_copies, std::unique_ptr< nmodl::utils::Blame > blame)nmodl::codegen::CodegenCoreneuronCppVisitorinline - CodegenCppVisitor(std::string mod_filename, std::ostream &stream, std::string float_type, const bool optimize_ionvar_copies, std::unique_ptr< nmodl::utils::Blame > blame=nullptr)nmodl::codegen::CodegenCoreneuronCppVisitorinline - nmodl::codegen::CodegenCppVisitor::CodegenCppVisitor(std::string mod_filename, const std::string &output_dir, std::string float_type, const bool optimize_ionvar_copies, std::unique_ptr< nmodl::utils::Blame > blame)nmodl::codegen::CodegenCppVisitorinline + CodegenCppVisitor(std::string mod_filename, std::ostream &stream, std::string float_type, const bool optimize_ionvar_copies, std::unique_ptr< nmodl::utils::Blame > blame=nullptr)nmodl::codegen::CodegenCoreneuronCppVisitorinline nmodl::codegen::CodegenCppVisitor::CodegenCppVisitor(std::string mod_filename, std::ostream &stream, std::string float_type, const bool optimize_ionvar_copies, std::unique_ptr< nmodl::utils::Blame > blame=nullptr)nmodl::codegen::CodegenCppVisitorinline compute_method_name(BlockType type) constnmodl::codegen::CodegenCppVisitorprotected current_watch_statementnmodl::codegen::CodegenCppVisitorprotected diff --git a/doxygen/classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html b/doxygen/classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html index 55122e31d0..d3b6b29d5a 100644 --- a/doxygen/classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html +++ b/doxygen/classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html @@ -133,16 +133,10 @@ void print_mechanism_range_var_structure (bool print_initializers) override  Print the structure that wraps all range and int variables required for the NMODL. More...
  - CodegenCppVisitor (std::string mod_filename, const std::string &output_dir, std::string float_type, const bool optimize_ionvar_copies, std::unique_ptr< nmodl::utils::Blame > blame) - Constructs the C++ code generator visitor. More...
-   CodegenCppVisitor (std::string mod_filename, std::ostream &stream, std::string float_type, const bool optimize_ionvar_copies, std::unique_ptr< nmodl::utils::Blame > blame=nullptr)  Constructs the C++ code generator visitor. More...
  - Public Member Functions inherited from nmodl::codegen::CodegenCppVisitorCodegenCppVisitor (std::string mod_filename, const std::string &output_dir, std::string float_type, const bool optimize_ionvar_copies, std::unique_ptr< nmodl::utils::Blame > blame) - Constructs the C++ code generator visitor. More...
-   CodegenCppVisitor (std::string mod_filename, std::ostream &stream, std::string float_type, const bool optimize_ionvar_copies, std::unique_ptr< nmodl::utils::Blame > blame=nullptr)  Constructs the C++ code generator visitor. More...
  @@ -1440,46 +1434,10 @@

Definition at line 53 of file codegen_coreneuron_cpp_visitor.cpp.

- - - -

◆ CodegenCppVisitor() [1/2]

- -
-
- - - - - -
- - - - -
nmodl::codegen::CodegenCppVisitor::CodegenCppVisitor
-
-inline
-
- -

Constructs the C++ code generator visitor.

-

This constructor instantiates an NMODL C++ code generator and allows writing generated code directly to a file in [output_dir]/[mod_filename].cpp.

-
Note
No code generation is performed at this stage. Since the code generator classes are all based on AstVisitor the AST must be visited using e.g. visit_program in order to generate the C++ code corresponding to the AST.
-
Parameters
- - - - -
mod_filenameThe name of the model for which code should be generated. It is used for constructing an output filename.
output_dirThe directory where target C++ file should be generated.
float_typeThe float type to use in the generated code. The string will be used as-is in the target code. This defaults to double.
-
-
- -

Definition at line 259 of file codegen_cpp_visitor.hpp.

-
-

◆ CodegenCppVisitor() [2/2]

+

◆ CodegenCppVisitor()

@@ -1510,7 +1468,7 @@

Definition at line 287 of file codegen_cpp_visitor.hpp.

+

Definition at line 259 of file codegen_cpp_visitor.hpp.

diff --git a/doxygen/classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.js b/doxygen/classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.js index b3d0896d48..3c0a596bb9 100644 --- a/doxygen/classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.js +++ b/doxygen/classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.js @@ -4,7 +4,6 @@ var classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor = [ "add_variable_tqitem", "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#ad1c95ccd279e2585cc6ef6c114b6bc8e", null ], [ "append_conc_write_statements", "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a009be25d4dc1397524ed5364898d5997", null ], [ "backend_name", "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#acfddae56ef5e91b7394b6f4c91748698", null ], - [ "CodegenCppVisitor", "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a668abea41fecf3599122af773e93c385", null ], [ "CodegenCppVisitor", "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#ab58b5680bc2f8e2e0fb8f693c5c1d8e4", null ], [ "external_method_arguments", "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#a80d776bb5d856148ce5162af2dbabd44", null ], [ "external_method_parameters", "classnmodl_1_1codegen_1_1_codegen_coreneuron_cpp_visitor.html#ad486de410befa347f320ec5a54ffd6d7", null ], diff --git a/doxygen/classnmodl_1_1codegen_1_1_codegen_cpp_visitor-members.html b/doxygen/classnmodl_1_1codegen_1_1_codegen_cpp_visitor-members.html index 8a9ab23364..938f09d4be 100644 --- a/doxygen/classnmodl_1_1codegen_1_1_codegen_cpp_visitor-members.html +++ b/doxygen/classnmodl_1_1codegen_1_1_codegen_cpp_visitor-members.html @@ -108,280 +108,279 @@ codegen_float_variablesnmodl::codegen::CodegenCppVisitorprotected codegen_global_variablesnmodl::codegen::CodegenCppVisitorprotected codegen_int_variablesnmodl::codegen::CodegenCppVisitorprotected - CodegenCppVisitor(std::string mod_filename, const std::string &output_dir, std::string float_type, const bool optimize_ionvar_copies, std::unique_ptr< nmodl::utils::Blame > blame)nmodl::codegen::CodegenCppVisitorinline - CodegenCppVisitor(std::string mod_filename, std::ostream &stream, std::string float_type, const bool optimize_ionvar_copies, std::unique_ptr< nmodl::utils::Blame > blame=nullptr)nmodl::codegen::CodegenCppVisitorinline - compute_method_name(BlockType type) constnmodl::codegen::CodegenCppVisitorprotected - current_watch_statementnmodl::codegen::CodegenCppVisitorprotected - default_float_data_type() const noexceptnmodl::codegen::CodegenCppVisitorinlineprotected - default_int_data_type() const noexceptnmodl::codegen::CodegenCppVisitorinlineprotected - defined_method(const std::string &name) constnmodl::codegen::CodegenCppVisitorprotected - enable_variable_name_lookupnmodl::codegen::CodegenCppVisitorprotected - external_method_arguments() noexcept=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual - external_method_parameters(bool table=false) noexcept=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual - float_data_type() const noexceptnmodl::codegen::CodegenCppVisitorinlineprotected - float_typenmodl::codegen::CodegenCppVisitorprotected - float_variable_name(const SymbolType &symbol, bool use_instance) const =0nmodl::codegen::CodegenCppVisitorprotectedpure virtual - float_variables_size() constnmodl::codegen::CodegenCppVisitorprotected - format_double_string(const std::string &value)nmodl::codegen::CodegenCppVisitorprotected - format_float_string(const std::string &value)nmodl::codegen::CodegenCppVisitorprotected - function_table_parameters(const ast::FunctionTableBlock &node)=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual - functor_params()=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual - get_arg_str(const ParamVector &params)nmodl::codegen::CodegenCppVisitorprotectedstatic - get_channel_info_var_name() const noexceptnmodl::codegen::CodegenCppVisitorinlineprotected - get_float_variables() constnmodl::codegen::CodegenCppVisitorprotected - get_int_variable_index(const std::string &var_name)nmodl::codegen::CodegenCppVisitorprotected - get_int_variables()nmodl::codegen::CodegenCppVisitorprotected - get_object_specifiers(const std::unordered_set< CppObjectSpecifier > &)nmodl::codegen::CodegenCppVisitor - get_parameter_str(const ParamVector &params)nmodl::codegen::CodegenCppVisitorprotectedstatic - get_table_statement(const ast::Block &)nmodl::codegen::CodegenCppVisitor - get_variable_name(const std::string &name, bool use_instance=true) const =0nmodl::codegen::CodegenCppVisitorprotectedpure virtual - global_struct() constnmodl::codegen::CodegenCppVisitorinlineprotected - global_struct_instance() constnmodl::codegen::CodegenCppVisitorinlineprotected - global_variable_name(const SymbolType &symbol, bool use_instance=true) const =0nmodl::codegen::CodegenCppVisitorprotectedpure virtual - has_parameter_of_name(const T &node, const std::string &name)nmodl::codegen::CodegenCppVisitorprotected - infonmodl::codegen::CodegenCppVisitorprotected - instance_struct() constnmodl::codegen::CodegenCppVisitorinlineprotected - int_variable_name(const IndexVariableInfo &symbol, const std::string &name, bool use_instance) const =0nmodl::codegen::CodegenCppVisitorprotectedpure virtual - int_variables_size() constnmodl::codegen::CodegenCppVisitorprotected - internal_method_arguments()=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual - internal_method_call_encounterednmodl::codegen::CodegenCppVisitorprotected - internal_method_parameters()=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual - ion_read_statements(BlockType type) constnmodl::codegen::CodegenCppVisitorprotected - ion_read_statements_optimized(BlockType type) constnmodl::codegen::CodegenCppVisitorprotected - ion_variable_struct_required() constnmodl::codegen::CodegenCppVisitorprotected - ion_write_statements(BlockType type)nmodl::codegen::CodegenCppVisitorprotected - is_function_table_call(const std::string &name) constnmodl::codegen::CodegenCppVisitorprotected - is_functor_const(const ast::StatementBlock &variable_block, const ast::StatementBlock &functor_block)nmodl::codegen::CodegenCppVisitorprotected - is_net_event(const std::string &name) const noexceptnmodl::codegen::CodegenCppVisitorinlineprotected - is_net_move(const std::string &name) const noexceptnmodl::codegen::CodegenCppVisitorinlineprotected - is_net_send(const std::string &name) const noexceptnmodl::codegen::CodegenCppVisitorinlineprotected - is_nrn_pointing(const std::string &name) const noexceptnmodl::codegen::CodegenCppVisitorinlineprotected - local_var_type() const noexceptnmodl::codegen::CodegenCppVisitorinlineprotected - make_symbol(const std::string &name) constnmodl::codegen::CodegenCppVisitorinlineprotected - method_name(const std::string &name) constnmodl::codegen::CodegenCppVisitorinlineprotected - mod_filenamenmodl::codegen::CodegenCppVisitorprotected - namespace_name()=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual - need_semicolon(const ast::Statement &node)nmodl::codegen::CodegenCppVisitorprotectedstatic - needs_v_unused() const =0nmodl::codegen::CodegenCppVisitorprotectedpure virtual - net_receive_buffering_required() const noexceptnmodl::codegen::CodegenCppVisitorprotected - net_receive_exist() const noexceptnmodl::codegen::CodegenCppVisitorprotected - net_receive_required() const noexceptnmodl::codegen::CodegenCppVisitorprotected - net_send_buffer_required() const noexceptnmodl::codegen::CodegenCppVisitorprotected - nmodl_version() const noexceptnmodl::codegen::CodegenCppVisitorinlineprotected - node_data_struct() constnmodl::codegen::CodegenCppVisitorinlineprotected - nrn_cur_required() const noexceptnmodl::codegen::CodegenCppVisitorprotected - nrn_state_required() const noexceptnmodl::codegen::CodegenCppVisitorprotected - nrn_thread_arguments() const =0nmodl::codegen::CodegenCppVisitorprotectedpure virtual - nrn_thread_internal_arguments()=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual - object_specifier_mapnmodl::codegen::CodegenCppVisitorprotected - operator_for_d() const noexceptnmodl::codegen::CodegenCppVisitorinlineprotected - operator_for_rhs() const noexceptnmodl::codegen::CodegenCppVisitorinlineprotected - optimize_ion_variable_copies() const =0nmodl::codegen::CodegenCppVisitorprotectedpure virtual - optimize_ionvar_copiesnmodl::codegen::CodegenCppVisitorprotected - ParamVector typedefnmodl::codegen::CodegenCppVisitorprotected - position_of_float_var(const std::string &name) const =0nmodl::codegen::CodegenCppVisitorprotectedpure virtual - position_of_int_var(const std::string &name) const =0nmodl::codegen::CodegenCppVisitorprotectedpure virtual - print_atomic_reduction_pragma()=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual - print_backend_info()nmodl::codegen::CodegenCppVisitorprotected - print_codegen_routines()=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual - print_compute_functions()=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual - print_data_structures(bool print_initializers)=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual - print_eigen_linear_solver(const std::string &float_type, int N)nmodl::codegen::CodegenCppVisitorprotected - print_fast_imem_calculation()=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual - print_function(const ast::FunctionBlock &node)nmodl::codegen::CodegenCppVisitorprotected - print_function_call(const ast::FunctionCall &node)nmodl::codegen::CodegenCppVisitorprotectedvirtual - print_function_declaration(const T &node, const std::string &name, const std::unordered_set< CppObjectSpecifier > &={CppObjectSpecifier::Static, CppObjectSpecifier::Inline})nmodl::codegen::CodegenCppVisitor - print_function_or_procedure(const ast::Block &node, const std::string &name, const std::unordered_set< CppObjectSpecifier > &specifiers)=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual - print_function_procedure_helper(const ast::Block &node)=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual - print_function_prototypes()=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual - print_function_table_call(const ast::FunctionCall &node)=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual - print_function_tables(const ast::FunctionTableBlock &node)nmodl::codegen::CodegenCppVisitorprotected - print_functor_definition(const ast::EigenNewtonSolverBlock &node)nmodl::codegen::CodegenCppVisitorprotected - print_functors_definitions()nmodl::codegen::CodegenCppVisitorprotected - print_g_unused() const =0nmodl::codegen::CodegenCppVisitorprotectedpure virtual - print_global_function_common_code(BlockType type, const std::string &function_name="")=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual - print_global_struct_function_table_ptrs()nmodl::codegen::CodegenCppVisitorprotectedvirtual - print_global_var_struct_assertions() constnmodl::codegen::CodegenCppVisitorprotectedvirtual - print_global_var_struct_decl()nmodl::codegen::CodegenCppVisitorprotectedvirtual - print_global_variables_for_hoc()=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual - print_headers_include()=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual - print_ion_variable()=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual - print_mechanism_global_var_structure(bool print_initializers)=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual - print_mechanism_info()nmodl::codegen::CodegenCppVisitorprotected - print_mechanism_range_var_structure(bool print_initializers)=0nmodl::codegen::CodegenCppVisitorpure virtual - print_mechanism_register()=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual - print_namespace_start()nmodl::codegen::CodegenCppVisitorprotected - print_namespace_stop()nmodl::codegen::CodegenCppVisitorprotected - print_net_event_call(const ast::FunctionCall &node)=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual - print_net_move_call(const ast::FunctionCall &node)=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual - print_net_send_call(const ast::FunctionCall &node)=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual - print_nmodl_constants()nmodl::codegen::CodegenCppVisitorprotected - print_nrn_alloc()=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual - print_nrn_constructor()=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual - print_nrn_cur()=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual - print_nrn_cur_conductance_kernel(const ast::BreakpointBlock &node)=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual - print_nrn_cur_kernel(const ast::BreakpointBlock &node)=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual - print_nrn_cur_non_conductance_kernel()=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual - print_nrn_current(const ast::BreakpointBlock &node)=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual - print_nrn_destructor()=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual - print_nrn_pointing(const ast::FunctionCall &node)nmodl::codegen::CodegenCppVisitorprotectedvirtual - print_nrn_state()=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual - print_parallel_iteration_hint(BlockType type, const ast::Block *block)nmodl::codegen::CodegenCppVisitorprotectedvirtual - print_prcellstate_macros() constnmodl::codegen::CodegenCppVisitorprotected - print_procedure(const ast::ProcedureBlock &node)nmodl::codegen::CodegenCppVisitorprotected - print_rename_state_vars() constnmodl::codegen::CodegenCppVisitor - print_sdlists_init(bool print_initializers)=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual - print_standard_includes()=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual - print_statement_block(const ast::StatementBlock &node, bool open_brace=true, bool close_brace=true)nmodl::codegen::CodegenCppVisitorprotected - print_table_check_function(const ast::Block &)nmodl::codegen::CodegenCppVisitor - print_table_replacement_function(const ast::Block &)nmodl::codegen::CodegenCppVisitor - print_top_verbatim_blocks()nmodl::codegen::CodegenCppVisitorprotected - print_using_namespace()nmodl::codegen::CodegenCppVisitorprotected - print_v_unused() const =0nmodl::codegen::CodegenCppVisitorprotectedpure virtual - print_vector_elements(const std::vector< T > &elements, const std::string &separator, const std::string &prefix="")nmodl::codegen::CodegenCppVisitorprotected - printernmodl::codegen::CodegenCppVisitorprotected - printing_net_initnmodl::codegen::CodegenCppVisitorprotected - printing_net_receivenmodl::codegen::CodegenCppVisitorprotected - printing_top_verbatim_blocksnmodl::codegen::CodegenCppVisitorprotected - process_shadow_update_statement(const ShadowUseStatement &statement, BlockType type)nmodl::codegen::CodegenCppVisitorprotected - program_symtabnmodl::codegen::CodegenCppVisitorprotected - range_variable_setup_required() const noexceptnmodl::codegen::CodegenCppVisitorprotected - read_ion_variable_name(const std::string &name)nmodl::codegen::CodegenCppVisitorprotectedstatic - register_mechanism_arguments() const =0nmodl::codegen::CodegenCppVisitorprotectedpure virtual - setup(const ast::Program &node)nmodl::codegen::CodegenCppVisitor - simulator_name()=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual - statement_to_skip(const ast::Statement &node)nmodl::codegen::CodegenCppVisitorprotectedstatic - SymbolType typedefnmodl::codegen::CodegenCppVisitorprotected - table_update_function_name(const std::string &block_name) constnmodl::codegen::CodegenCppVisitorprotected - thread_variables_struct() constnmodl::codegen::CodegenCppVisitorinlineprotected - update_if_ion_variable_name(const std::string &name) constnmodl::codegen::CodegenCppVisitorprotected - update_index_semantics()nmodl::codegen::CodegenCppVisitorprotected - visit_after_block(const ast::AfterBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_argument(const ast::Argument &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_assigned_block(const ast::AssignedBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_assigned_definition(const ast::AssignedDefinition &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_ba_block(const ast::BABlock &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_ba_block_type(const ast::BABlockType &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_bbcore_pointer(const ast::BbcorePointer &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_bbcore_pointer_var(const ast::BbcorePointerVar &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_before_block(const ast::BeforeBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_binary_expression(const ast::BinaryExpression &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual - visit_binary_operator(const ast::BinaryOperator &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual - visit_block(const ast::Block &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_block_comment(const ast::BlockComment &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_boolean(const ast::Boolean &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual - visit_breakpoint_block(const ast::BreakpointBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_compartment(const ast::Compartment &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_conductance_hint(const ast::ConductanceHint &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_conserve(const ast::Conserve &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_constant_block(const ast::ConstantBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_constant_statement(const ast::ConstantStatement &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_constant_var(const ast::ConstantVar &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_constructor_block(const ast::ConstructorBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_cvode_block(const ast::CvodeBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_define(const ast::Define &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_derivative_block(const ast::DerivativeBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_derivimplicit_callback(const ast::DerivimplicitCallback &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_destructor_block(const ast::DestructorBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_diff_eq_expression(const ast::DiffEqExpression &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_discrete_block(const ast::DiscreteBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_double(const ast::Double &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual - visit_double_unit(const ast::DoubleUnit &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_eigen_linear_solver_block(const ast::EigenLinearSolverBlock &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual - visit_eigen_newton_solver_block(const ast::EigenNewtonSolverBlock &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual - visit_electrode_cur_var(const ast::ElectrodeCurVar &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_electrode_current(const ast::ElectrodeCurrent &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_else_if_statement(const ast::ElseIfStatement &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual - visit_else_statement(const ast::ElseStatement &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual - visit_expression(const ast::Expression &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_expression_statement(const ast::ExpressionStatement &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_extern_var(const ast::ExternVar &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_external(const ast::External &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_factor_def(const ast::FactorDef &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_float(const ast::Float &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual - visit_for_netcon(const ast::ForNetcon &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_from_statement(const ast::FromStatement &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual - visit_function_block(const ast::FunctionBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_function_call(const ast::FunctionCall &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual - visit_function_table_block(const ast::FunctionTableBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_global(const ast::Global &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_global_var(const ast::GlobalVar &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_identifier(const ast::Identifier &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_if_statement(const ast::IfStatement &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual - visit_include(const ast::Include &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_independent_block(const ast::IndependentBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_indexed_name(const ast::IndexedName &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual - visit_initial_block(const ast::InitialBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_integer(const ast::Integer &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual - visit_kinetic_block(const ast::KineticBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_lag_statement(const ast::LagStatement &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_limits(const ast::Limits &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_lin_equation(const ast::LinEquation &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_line_comment(const ast::LineComment &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_linear_block(const ast::LinearBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_local_list_statement(const ast::LocalListStatement &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual - visit_local_var(const ast::LocalVar &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_lon_diffuse(const ast::LonDiffuse &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_longitudinal_diffusion_block(const ast::LongitudinalDiffusionBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_model(const ast::Model &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_mutex_lock(const ast::MutexLock &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual - visit_mutex_unlock(const ast::MutexUnlock &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual - visit_name(const ast::Name &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual - visit_net_receive_block(const ast::NetReceiveBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_neuron_block(const ast::NeuronBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_node(const ast::Node &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_non_lin_equation(const ast::NonLinEquation &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_non_linear_block(const ast::NonLinearBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_nonspecific(const ast::Nonspecific &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_nonspecific_cur_var(const ast::NonspecificCurVar &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_nrn_state_block(const ast::NrnStateBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_number(const ast::Number &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_number_range(const ast::NumberRange &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_ontology_statement(const ast::OntologyStatement &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_param_assign(const ast::ParamAssign &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_param_block(const ast::ParamBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_paren_expression(const ast::ParenExpression &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual - visit_pointer(const ast::Pointer &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_pointer_var(const ast::PointerVar &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_prime_name(const ast::PrimeName &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual - visit_procedure_block(const ast::ProcedureBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_program(const ast::Program &program) overridenmodl::codegen::CodegenCppVisitorvirtual - visit_protect_statement(const ast::ProtectStatement &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual - visit_random_var(const ast::RandomVar &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_random_var_list(const ast::RandomVarList &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_range(const ast::Range &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_range_var(const ast::RangeVar &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_react_var_name(const ast::ReactVarName &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_reaction_operator(const ast::ReactionOperator &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_reaction_statement(const ast::ReactionStatement &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_read_ion_var(const ast::ReadIonVar &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_solution_expression(const ast::SolutionExpression &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual - visit_solve_block(const ast::SolveBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_state_block(const ast::StateBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_statement(const ast::Statement &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_statement_block(const ast::StatementBlock &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual - visit_string(const ast::String &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual - visit_suffix(const ast::Suffix &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_table_statement(const ast::TableStatement &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_thread_safe(const ast::ThreadSafe &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_unary_expression(const ast::UnaryExpression &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_unary_operator(const ast::UnaryOperator &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual - visit_unit(const ast::Unit &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual - visit_unit_block(const ast::UnitBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_unit_def(const ast::UnitDef &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_unit_state(const ast::UnitState &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_update_dt(const ast::UpdateDt &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual - visit_useion(const ast::Useion &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_valence(const ast::Valence &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_var_name(const ast::VarName &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual - visit_verbatim(const ast::Verbatim &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_watch(const ast::Watch &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_watch_statement(const ast::WatchStatement &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_while_statement(const ast::WhileStatement &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual - visit_wrapped_expression(const ast::WrappedExpression &node) overridenmodl::visitor::ConstAstVisitorvirtual - visit_write_ion_var(const ast::WriteIonVar &node) overridenmodl::visitor::ConstAstVisitorvirtual - write_ion_variable_name(const std::string &name)nmodl::codegen::CodegenCppVisitorprotectedstatic - ~ConstVisitor()=defaultnmodl::visitor::ConstVisitorvirtual + CodegenCppVisitor(std::string mod_filename, std::ostream &stream, std::string float_type, const bool optimize_ionvar_copies, std::unique_ptr< nmodl::utils::Blame > blame=nullptr)nmodl::codegen::CodegenCppVisitorinline + compute_method_name(BlockType type) constnmodl::codegen::CodegenCppVisitorprotected + current_watch_statementnmodl::codegen::CodegenCppVisitorprotected + default_float_data_type() const noexceptnmodl::codegen::CodegenCppVisitorinlineprotected + default_int_data_type() const noexceptnmodl::codegen::CodegenCppVisitorinlineprotected + defined_method(const std::string &name) constnmodl::codegen::CodegenCppVisitorprotected + enable_variable_name_lookupnmodl::codegen::CodegenCppVisitorprotected + external_method_arguments() noexcept=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual + external_method_parameters(bool table=false) noexcept=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual + float_data_type() const noexceptnmodl::codegen::CodegenCppVisitorinlineprotected + float_typenmodl::codegen::CodegenCppVisitorprotected + float_variable_name(const SymbolType &symbol, bool use_instance) const =0nmodl::codegen::CodegenCppVisitorprotectedpure virtual + float_variables_size() constnmodl::codegen::CodegenCppVisitorprotected + format_double_string(const std::string &value)nmodl::codegen::CodegenCppVisitorprotected + format_float_string(const std::string &value)nmodl::codegen::CodegenCppVisitorprotected + function_table_parameters(const ast::FunctionTableBlock &node)=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual + functor_params()=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual + get_arg_str(const ParamVector &params)nmodl::codegen::CodegenCppVisitorprotectedstatic + get_channel_info_var_name() const noexceptnmodl::codegen::CodegenCppVisitorinlineprotected + get_float_variables() constnmodl::codegen::CodegenCppVisitorprotected + get_int_variable_index(const std::string &var_name)nmodl::codegen::CodegenCppVisitorprotected + get_int_variables()nmodl::codegen::CodegenCppVisitorprotected + get_object_specifiers(const std::unordered_set< CppObjectSpecifier > &)nmodl::codegen::CodegenCppVisitor + get_parameter_str(const ParamVector &params)nmodl::codegen::CodegenCppVisitorprotectedstatic + get_table_statement(const ast::Block &)nmodl::codegen::CodegenCppVisitor + get_variable_name(const std::string &name, bool use_instance=true) const =0nmodl::codegen::CodegenCppVisitorprotectedpure virtual + global_struct() constnmodl::codegen::CodegenCppVisitorinlineprotected + global_struct_instance() constnmodl::codegen::CodegenCppVisitorinlineprotected + global_variable_name(const SymbolType &symbol, bool use_instance=true) const =0nmodl::codegen::CodegenCppVisitorprotectedpure virtual + has_parameter_of_name(const T &node, const std::string &name)nmodl::codegen::CodegenCppVisitorprotected + infonmodl::codegen::CodegenCppVisitorprotected + instance_struct() constnmodl::codegen::CodegenCppVisitorinlineprotected + int_variable_name(const IndexVariableInfo &symbol, const std::string &name, bool use_instance) const =0nmodl::codegen::CodegenCppVisitorprotectedpure virtual + int_variables_size() constnmodl::codegen::CodegenCppVisitorprotected + internal_method_arguments()=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual + internal_method_call_encounterednmodl::codegen::CodegenCppVisitorprotected + internal_method_parameters()=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual + ion_read_statements(BlockType type) constnmodl::codegen::CodegenCppVisitorprotected + ion_read_statements_optimized(BlockType type) constnmodl::codegen::CodegenCppVisitorprotected + ion_variable_struct_required() constnmodl::codegen::CodegenCppVisitorprotected + ion_write_statements(BlockType type)nmodl::codegen::CodegenCppVisitorprotected + is_function_table_call(const std::string &name) constnmodl::codegen::CodegenCppVisitorprotected + is_functor_const(const ast::StatementBlock &variable_block, const ast::StatementBlock &functor_block)nmodl::codegen::CodegenCppVisitorprotected + is_net_event(const std::string &name) const noexceptnmodl::codegen::CodegenCppVisitorinlineprotected + is_net_move(const std::string &name) const noexceptnmodl::codegen::CodegenCppVisitorinlineprotected + is_net_send(const std::string &name) const noexceptnmodl::codegen::CodegenCppVisitorinlineprotected + is_nrn_pointing(const std::string &name) const noexceptnmodl::codegen::CodegenCppVisitorinlineprotected + local_var_type() const noexceptnmodl::codegen::CodegenCppVisitorinlineprotected + make_symbol(const std::string &name) constnmodl::codegen::CodegenCppVisitorinlineprotected + method_name(const std::string &name) constnmodl::codegen::CodegenCppVisitorinlineprotected + mod_filenamenmodl::codegen::CodegenCppVisitorprotected + namespace_name()=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual + need_semicolon(const ast::Statement &node)nmodl::codegen::CodegenCppVisitorprotectedstatic + needs_v_unused() const =0nmodl::codegen::CodegenCppVisitorprotectedpure virtual + net_receive_buffering_required() const noexceptnmodl::codegen::CodegenCppVisitorprotected + net_receive_exist() const noexceptnmodl::codegen::CodegenCppVisitorprotected + net_receive_required() const noexceptnmodl::codegen::CodegenCppVisitorprotected + net_send_buffer_required() const noexceptnmodl::codegen::CodegenCppVisitorprotected + nmodl_version() const noexceptnmodl::codegen::CodegenCppVisitorinlineprotected + node_data_struct() constnmodl::codegen::CodegenCppVisitorinlineprotected + nrn_cur_required() const noexceptnmodl::codegen::CodegenCppVisitorprotected + nrn_state_required() const noexceptnmodl::codegen::CodegenCppVisitorprotected + nrn_thread_arguments() const =0nmodl::codegen::CodegenCppVisitorprotectedpure virtual + nrn_thread_internal_arguments()=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual + object_specifier_mapnmodl::codegen::CodegenCppVisitorprotected + operator_for_d() const noexceptnmodl::codegen::CodegenCppVisitorinlineprotected + operator_for_rhs() const noexceptnmodl::codegen::CodegenCppVisitorinlineprotected + optimize_ion_variable_copies() const =0nmodl::codegen::CodegenCppVisitorprotectedpure virtual + optimize_ionvar_copiesnmodl::codegen::CodegenCppVisitorprotected + ParamVector typedefnmodl::codegen::CodegenCppVisitorprotected + position_of_float_var(const std::string &name) const =0nmodl::codegen::CodegenCppVisitorprotectedpure virtual + position_of_int_var(const std::string &name) const =0nmodl::codegen::CodegenCppVisitorprotectedpure virtual + print_atomic_reduction_pragma()=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual + print_backend_info()nmodl::codegen::CodegenCppVisitorprotected + print_codegen_routines()=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual + print_compute_functions()=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual + print_data_structures(bool print_initializers)=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual + print_eigen_linear_solver(const std::string &float_type, int N)nmodl::codegen::CodegenCppVisitorprotected + print_fast_imem_calculation()=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual + print_function(const ast::FunctionBlock &node)nmodl::codegen::CodegenCppVisitorprotected + print_function_call(const ast::FunctionCall &node)nmodl::codegen::CodegenCppVisitorprotectedvirtual + print_function_declaration(const T &node, const std::string &name, const std::unordered_set< CppObjectSpecifier > &={CppObjectSpecifier::Static, CppObjectSpecifier::Inline})nmodl::codegen::CodegenCppVisitor + print_function_or_procedure(const ast::Block &node, const std::string &name, const std::unordered_set< CppObjectSpecifier > &specifiers)=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual + print_function_procedure_helper(const ast::Block &node)=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual + print_function_prototypes()=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual + print_function_table_call(const ast::FunctionCall &node)=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual + print_function_tables(const ast::FunctionTableBlock &node)nmodl::codegen::CodegenCppVisitorprotected + print_functor_definition(const ast::EigenNewtonSolverBlock &node)nmodl::codegen::CodegenCppVisitorprotected + print_functors_definitions()nmodl::codegen::CodegenCppVisitorprotected + print_g_unused() const =0nmodl::codegen::CodegenCppVisitorprotectedpure virtual + print_global_function_common_code(BlockType type, const std::string &function_name="")=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual + print_global_struct_function_table_ptrs()nmodl::codegen::CodegenCppVisitorprotectedvirtual + print_global_var_struct_assertions() constnmodl::codegen::CodegenCppVisitorprotectedvirtual + print_global_var_struct_decl()nmodl::codegen::CodegenCppVisitorprotectedvirtual + print_global_variables_for_hoc()=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual + print_headers_include()=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual + print_ion_variable()=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual + print_mechanism_global_var_structure(bool print_initializers)=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual + print_mechanism_info()nmodl::codegen::CodegenCppVisitorprotected + print_mechanism_range_var_structure(bool print_initializers)=0nmodl::codegen::CodegenCppVisitorpure virtual + print_mechanism_register()=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual + print_namespace_start()nmodl::codegen::CodegenCppVisitorprotected + print_namespace_stop()nmodl::codegen::CodegenCppVisitorprotected + print_net_event_call(const ast::FunctionCall &node)=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual + print_net_move_call(const ast::FunctionCall &node)=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual + print_net_send_call(const ast::FunctionCall &node)=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual + print_nmodl_constants()nmodl::codegen::CodegenCppVisitorprotected + print_nrn_alloc()=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual + print_nrn_constructor()=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual + print_nrn_cur()=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual + print_nrn_cur_conductance_kernel(const ast::BreakpointBlock &node)=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual + print_nrn_cur_kernel(const ast::BreakpointBlock &node)=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual + print_nrn_cur_non_conductance_kernel()=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual + print_nrn_current(const ast::BreakpointBlock &node)=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual + print_nrn_destructor()=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual + print_nrn_pointing(const ast::FunctionCall &node)nmodl::codegen::CodegenCppVisitorprotectedvirtual + print_nrn_state()=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual + print_parallel_iteration_hint(BlockType type, const ast::Block *block)nmodl::codegen::CodegenCppVisitorprotectedvirtual + print_prcellstate_macros() constnmodl::codegen::CodegenCppVisitorprotected + print_procedure(const ast::ProcedureBlock &node)nmodl::codegen::CodegenCppVisitorprotected + print_rename_state_vars() constnmodl::codegen::CodegenCppVisitor + print_sdlists_init(bool print_initializers)=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual + print_standard_includes()=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual + print_statement_block(const ast::StatementBlock &node, bool open_brace=true, bool close_brace=true)nmodl::codegen::CodegenCppVisitorprotected + print_table_check_function(const ast::Block &)nmodl::codegen::CodegenCppVisitor + print_table_replacement_function(const ast::Block &)nmodl::codegen::CodegenCppVisitor + print_top_verbatim_blocks()nmodl::codegen::CodegenCppVisitorprotected + print_using_namespace()nmodl::codegen::CodegenCppVisitorprotected + print_v_unused() const =0nmodl::codegen::CodegenCppVisitorprotectedpure virtual + print_vector_elements(const std::vector< T > &elements, const std::string &separator, const std::string &prefix="")nmodl::codegen::CodegenCppVisitorprotected + printernmodl::codegen::CodegenCppVisitorprotected + printing_net_initnmodl::codegen::CodegenCppVisitorprotected + printing_net_receivenmodl::codegen::CodegenCppVisitorprotected + printing_top_verbatim_blocksnmodl::codegen::CodegenCppVisitorprotected + process_shadow_update_statement(const ShadowUseStatement &statement, BlockType type)nmodl::codegen::CodegenCppVisitorprotected + program_symtabnmodl::codegen::CodegenCppVisitorprotected + range_variable_setup_required() const noexceptnmodl::codegen::CodegenCppVisitorprotected + read_ion_variable_name(const std::string &name)nmodl::codegen::CodegenCppVisitorprotectedstatic + register_mechanism_arguments() const =0nmodl::codegen::CodegenCppVisitorprotectedpure virtual + setup(const ast::Program &node)nmodl::codegen::CodegenCppVisitor + simulator_name()=0nmodl::codegen::CodegenCppVisitorprotectedpure virtual + statement_to_skip(const ast::Statement &node)nmodl::codegen::CodegenCppVisitorprotectedstatic + SymbolType typedefnmodl::codegen::CodegenCppVisitorprotected + table_update_function_name(const std::string &block_name) constnmodl::codegen::CodegenCppVisitorprotected + thread_variables_struct() constnmodl::codegen::CodegenCppVisitorinlineprotected + update_if_ion_variable_name(const std::string &name) constnmodl::codegen::CodegenCppVisitorprotected + update_index_semantics()nmodl::codegen::CodegenCppVisitorprotected + visit_after_block(const ast::AfterBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_argument(const ast::Argument &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_assigned_block(const ast::AssignedBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_assigned_definition(const ast::AssignedDefinition &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_ba_block(const ast::BABlock &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_ba_block_type(const ast::BABlockType &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_bbcore_pointer(const ast::BbcorePointer &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_bbcore_pointer_var(const ast::BbcorePointerVar &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_before_block(const ast::BeforeBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_binary_expression(const ast::BinaryExpression &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual + visit_binary_operator(const ast::BinaryOperator &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual + visit_block(const ast::Block &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_block_comment(const ast::BlockComment &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_boolean(const ast::Boolean &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual + visit_breakpoint_block(const ast::BreakpointBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_compartment(const ast::Compartment &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_conductance_hint(const ast::ConductanceHint &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_conserve(const ast::Conserve &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_constant_block(const ast::ConstantBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_constant_statement(const ast::ConstantStatement &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_constant_var(const ast::ConstantVar &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_constructor_block(const ast::ConstructorBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_cvode_block(const ast::CvodeBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_define(const ast::Define &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_derivative_block(const ast::DerivativeBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_derivimplicit_callback(const ast::DerivimplicitCallback &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_destructor_block(const ast::DestructorBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_diff_eq_expression(const ast::DiffEqExpression &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_discrete_block(const ast::DiscreteBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_double(const ast::Double &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual + visit_double_unit(const ast::DoubleUnit &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_eigen_linear_solver_block(const ast::EigenLinearSolverBlock &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual + visit_eigen_newton_solver_block(const ast::EigenNewtonSolverBlock &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual + visit_electrode_cur_var(const ast::ElectrodeCurVar &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_electrode_current(const ast::ElectrodeCurrent &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_else_if_statement(const ast::ElseIfStatement &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual + visit_else_statement(const ast::ElseStatement &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual + visit_expression(const ast::Expression &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_expression_statement(const ast::ExpressionStatement &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_extern_var(const ast::ExternVar &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_external(const ast::External &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_factor_def(const ast::FactorDef &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_float(const ast::Float &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual + visit_for_netcon(const ast::ForNetcon &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_from_statement(const ast::FromStatement &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual + visit_function_block(const ast::FunctionBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_function_call(const ast::FunctionCall &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual + visit_function_table_block(const ast::FunctionTableBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_global(const ast::Global &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_global_var(const ast::GlobalVar &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_identifier(const ast::Identifier &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_if_statement(const ast::IfStatement &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual + visit_include(const ast::Include &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_independent_block(const ast::IndependentBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_indexed_name(const ast::IndexedName &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual + visit_initial_block(const ast::InitialBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_integer(const ast::Integer &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual + visit_kinetic_block(const ast::KineticBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_lag_statement(const ast::LagStatement &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_limits(const ast::Limits &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_lin_equation(const ast::LinEquation &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_line_comment(const ast::LineComment &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_linear_block(const ast::LinearBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_local_list_statement(const ast::LocalListStatement &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual + visit_local_var(const ast::LocalVar &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_lon_diffuse(const ast::LonDiffuse &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_longitudinal_diffusion_block(const ast::LongitudinalDiffusionBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_model(const ast::Model &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_mutex_lock(const ast::MutexLock &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual + visit_mutex_unlock(const ast::MutexUnlock &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual + visit_name(const ast::Name &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual + visit_net_receive_block(const ast::NetReceiveBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_neuron_block(const ast::NeuronBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_node(const ast::Node &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_non_lin_equation(const ast::NonLinEquation &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_non_linear_block(const ast::NonLinearBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_nonspecific(const ast::Nonspecific &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_nonspecific_cur_var(const ast::NonspecificCurVar &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_nrn_state_block(const ast::NrnStateBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_number(const ast::Number &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_number_range(const ast::NumberRange &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_ontology_statement(const ast::OntologyStatement &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_param_assign(const ast::ParamAssign &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_param_block(const ast::ParamBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_paren_expression(const ast::ParenExpression &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual + visit_pointer(const ast::Pointer &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_pointer_var(const ast::PointerVar &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_prime_name(const ast::PrimeName &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual + visit_procedure_block(const ast::ProcedureBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_program(const ast::Program &program) overridenmodl::codegen::CodegenCppVisitorvirtual + visit_protect_statement(const ast::ProtectStatement &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual + visit_random_var(const ast::RandomVar &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_random_var_list(const ast::RandomVarList &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_range(const ast::Range &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_range_var(const ast::RangeVar &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_react_var_name(const ast::ReactVarName &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_reaction_operator(const ast::ReactionOperator &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_reaction_statement(const ast::ReactionStatement &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_read_ion_var(const ast::ReadIonVar &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_solution_expression(const ast::SolutionExpression &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual + visit_solve_block(const ast::SolveBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_state_block(const ast::StateBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_statement(const ast::Statement &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_statement_block(const ast::StatementBlock &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual + visit_string(const ast::String &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual + visit_suffix(const ast::Suffix &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_table_statement(const ast::TableStatement &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_thread_safe(const ast::ThreadSafe &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_unary_expression(const ast::UnaryExpression &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_unary_operator(const ast::UnaryOperator &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual + visit_unit(const ast::Unit &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual + visit_unit_block(const ast::UnitBlock &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_unit_def(const ast::UnitDef &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_unit_state(const ast::UnitState &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_update_dt(const ast::UpdateDt &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual + visit_useion(const ast::Useion &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_valence(const ast::Valence &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_var_name(const ast::VarName &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual + visit_verbatim(const ast::Verbatim &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_watch(const ast::Watch &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_watch_statement(const ast::WatchStatement &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_while_statement(const ast::WhileStatement &node) overridenmodl::codegen::CodegenCppVisitorprotectedvirtual + visit_wrapped_expression(const ast::WrappedExpression &node) overridenmodl::visitor::ConstAstVisitorvirtual + visit_write_ion_var(const ast::WriteIonVar &node) overridenmodl::visitor::ConstAstVisitorvirtual + write_ion_variable_name(const std::string &name)nmodl::codegen::CodegenCppVisitorprotectedstatic + ~ConstVisitor()=defaultnmodl::visitor::ConstVisitorvirtual diff --git a/doxygen/classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html b/doxygen/classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html index f5ea9be78c..6ce17514d9 100644 --- a/doxygen/classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html +++ b/doxygen/classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html @@ -131,9 +131,6 @@ - - - @@ -1107,7 +1104,7 @@

Definition at line 311 of file codegen_cpp_visitor.hpp.

+

Definition at line 283 of file codegen_cpp_visitor.hpp.

@@ -1131,81 +1128,13 @@

-

Definition at line 299 of file codegen_cpp_visitor.hpp.

+

Definition at line 271 of file codegen_cpp_visitor.hpp.

Constructor & Destructor Documentation

- -

◆ CodegenCppVisitor() [1/2]

- -
-
-

Public Member Functions

 CodegenCppVisitor (std::string mod_filename, const std::string &output_dir, std::string float_type, const bool optimize_ionvar_copies, std::unique_ptr< nmodl::utils::Blame > blame)
 Constructs the C++ code generator visitor. More...
 
 CodegenCppVisitor (std::string mod_filename, std::ostream &stream, std::string float_type, const bool optimize_ionvar_copies, std::unique_ptr< nmodl::utils::Blame > blame=nullptr)
 Constructs the C++ code generator visitor. More...
 
- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
nmodl::codegen::CodegenCppVisitor::CodegenCppVisitor (std::string mod_filename,
const std::string & output_dir,
std::string float_type,
const bool optimize_ionvar_copies,
std::unique_ptr< nmodl::utils::Blameblame 
)
-
-inline
-
- -

Constructs the C++ code generator visitor.

-

This constructor instantiates an NMODL C++ code generator and allows writing generated code directly to a file in [output_dir]/[mod_filename].cpp.

-
Note
No code generation is performed at this stage. Since the code generator classes are all based on AstVisitor the AST must be visited using e.g. visit_program in order to generate the C++ code corresponding to the AST.
-
Parameters
- - - - -
mod_filenameThe name of the model for which code should be generated. It is used for constructing an output filename.
output_dirThe directory where target C++ file should be generated.
float_typeThe float type to use in the generated code. The string will be used as-is in the target code. This defaults to double.
-
-
- -

Definition at line 259 of file codegen_cpp_visitor.hpp.

- -
- -

◆ CodegenCppVisitor() [2/2]

+

◆ CodegenCppVisitor()

@@ -1268,7 +1197,7 @@

Definition at line 287 of file codegen_cpp_visitor.hpp.

+

Definition at line 259 of file codegen_cpp_visitor.hpp.

@@ -1306,7 +1235,7 @@

Returns
The same string with double-quotes pre- and postfixed
-

Definition at line 1068 of file codegen_cpp_visitor.hpp.

+

Definition at line 1040 of file codegen_cpp_visitor.hpp.

@@ -1605,7 +1534,7 @@

Definition at line 488 of file codegen_cpp_visitor.hpp.

+

Definition at line 460 of file codegen_cpp_visitor.hpp.

@@ -1634,7 +1563,7 @@

Definition at line 504 of file codegen_cpp_visitor.hpp.

+

Definition at line 476 of file codegen_cpp_visitor.hpp.

@@ -1767,7 +1696,7 @@

Definition at line 496 of file codegen_cpp_visitor.hpp.

+

Definition at line 468 of file codegen_cpp_visitor.hpp.

@@ -2046,7 +1975,7 @@

Definition at line 528 of file codegen_cpp_visitor.hpp.

+

Definition at line 500 of file codegen_cpp_visitor.hpp.

@@ -2305,7 +2234,7 @@

Definition at line 450 of file codegen_cpp_visitor.hpp.

+

Definition at line 422 of file codegen_cpp_visitor.hpp.

@@ -2334,7 +2263,7 @@

Definition at line 458 of file codegen_cpp_visitor.hpp.

+

Definition at line 430 of file codegen_cpp_visitor.hpp.

@@ -2467,7 +2396,7 @@

Definition at line 431 of file codegen_cpp_visitor.hpp.

+

Definition at line 403 of file codegen_cpp_visitor.hpp.

@@ -2868,7 +2797,7 @@

Returns
true if the function is net_event
-

Definition at line 674 of file codegen_cpp_visitor.hpp.

+

Definition at line 646 of file codegen_cpp_visitor.hpp.

@@ -2905,7 +2834,7 @@

Returns
true if the function is net_move
-

Definition at line 664 of file codegen_cpp_visitor.hpp.

+

Definition at line 636 of file codegen_cpp_visitor.hpp.

@@ -2942,7 +2871,7 @@

Returns
true if the function is net_send
-

Definition at line 650 of file codegen_cpp_visitor.hpp.

+

Definition at line 622 of file codegen_cpp_visitor.hpp.

@@ -2970,7 +2899,7 @@

-

Definition at line 654 of file codegen_cpp_visitor.hpp.

+

Definition at line 626 of file codegen_cpp_visitor.hpp.

@@ -2999,7 +2928,7 @@

Definition at line 472 of file codegen_cpp_visitor.hpp.

+

Definition at line 444 of file codegen_cpp_visitor.hpp.

@@ -3036,7 +2965,7 @@

Returns
A symbol based on the given name
-

Definition at line 1095 of file codegen_cpp_visitor.hpp.

+

Definition at line 1067 of file codegen_cpp_visitor.hpp.

@@ -3073,7 +3002,7 @@

Returns
The name of the function or procedure postfixed with the model name
-

Definition at line 1078 of file codegen_cpp_visitor.hpp.

+

Definition at line 1050 of file codegen_cpp_visitor.hpp.

@@ -3313,7 +3242,7 @@

Returns
A version
-

Definition at line 417 of file codegen_cpp_visitor.hpp.

+

Definition at line 389 of file codegen_cpp_visitor.hpp.

@@ -3342,7 +3271,7 @@

Definition at line 438 of file codegen_cpp_visitor.hpp.

+

Definition at line 410 of file codegen_cpp_visitor.hpp.

@@ -3487,7 +3416,7 @@

Definition at line 520 of file codegen_cpp_visitor.hpp.

+

Definition at line 492 of file codegen_cpp_visitor.hpp.

@@ -3516,7 +3445,7 @@

Definition at line 512 of file codegen_cpp_visitor.hpp.

+

Definition at line 484 of file codegen_cpp_visitor.hpp.

@@ -5749,7 +5678,7 @@

-

Definition at line 442 of file codegen_cpp_visitor.hpp.

+

Definition at line 414 of file codegen_cpp_visitor.hpp.

@@ -6846,7 +6775,7 @@

Definition at line 357 of file codegen_cpp_visitor.hpp.

+

Definition at line 329 of file codegen_cpp_visitor.hpp.

@@ -6873,7 +6802,7 @@

Todo:
: this has become different than CodegenInfo
-

Definition at line 370 of file codegen_cpp_visitor.hpp.

+

Definition at line 342 of file codegen_cpp_visitor.hpp.

@@ -6899,7 +6828,7 @@

Definition at line 363 of file codegen_cpp_visitor.hpp.

+

Definition at line 335 of file codegen_cpp_visitor.hpp.

@@ -6925,7 +6854,7 @@

Definition at line 406 of file codegen_cpp_visitor.hpp.

+

Definition at line 378 of file codegen_cpp_visitor.hpp.

@@ -6951,7 +6880,7 @@

Definition at line 376 of file codegen_cpp_visitor.hpp.

+

Definition at line 348 of file codegen_cpp_visitor.hpp.

@@ -6977,7 +6906,7 @@

Definition at line 333 of file codegen_cpp_visitor.hpp.

+

Definition at line 305 of file codegen_cpp_visitor.hpp.

@@ -7003,7 +6932,7 @@

Definition at line 345 of file codegen_cpp_visitor.hpp.

+

Definition at line 317 of file codegen_cpp_visitor.hpp.

@@ -7029,7 +6958,7 @@

Definition at line 400 of file codegen_cpp_visitor.hpp.

+

Definition at line 372 of file codegen_cpp_visitor.hpp.

@@ -7055,7 +6984,7 @@

Definition at line 327 of file codegen_cpp_visitor.hpp.

+

Definition at line 299 of file codegen_cpp_visitor.hpp.

@@ -7091,7 +7020,7 @@

{CppObjectSpecifier::ThreadLocal, "thread_local"}, -

Definition at line 1442 of file codegen_cpp_visitor.hpp.

+

Definition at line 1414 of file codegen_cpp_visitor.hpp.

@@ -7117,7 +7046,7 @@

Definition at line 339 of file codegen_cpp_visitor.hpp.

+

Definition at line 311 of file codegen_cpp_visitor.hpp.

@@ -7143,7 +7072,7 @@

Definition at line 321 of file codegen_cpp_visitor.hpp.

+

Definition at line 293 of file codegen_cpp_visitor.hpp.

@@ -7169,7 +7098,7 @@

Definition at line 388 of file codegen_cpp_visitor.hpp.

+

Definition at line 360 of file codegen_cpp_visitor.hpp.

@@ -7195,7 +7124,7 @@

Definition at line 382 of file codegen_cpp_visitor.hpp.

+

Definition at line 354 of file codegen_cpp_visitor.hpp.

@@ -7221,7 +7150,7 @@

Definition at line 394 of file codegen_cpp_visitor.hpp.

+

Definition at line 366 of file codegen_cpp_visitor.hpp.

@@ -7247,7 +7176,7 @@

Definition at line 351 of file codegen_cpp_visitor.hpp.

+

Definition at line 323 of file codegen_cpp_visitor.hpp.

diff --git a/doxygen/classnmodl_1_1codegen_1_1_codegen_cpp_visitor.js b/doxygen/classnmodl_1_1codegen_1_1_codegen_cpp_visitor.js index 204092ea70..1726fb2e88 100644 --- a/doxygen/classnmodl_1_1codegen_1_1_codegen_cpp_visitor.js +++ b/doxygen/classnmodl_1_1codegen_1_1_codegen_cpp_visitor.js @@ -2,7 +2,6 @@ var classnmodl_1_1codegen_1_1_codegen_cpp_visitor = [ [ "ParamVector", "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a73d001ad3c271c56d89e09e2cebfceb3", null ], [ "SymbolType", "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a84d8220dfbff2afda5d207b6d29f61f8", null ], - [ "CodegenCppVisitor", "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a668abea41fecf3599122af773e93c385", null ], [ "CodegenCppVisitor", "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#ab58b5680bc2f8e2e0fb8f693c5c1d8e4", null ], [ "add_escape_quote", "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#aeeacd28215827d6b0cd23cf59e5fc0c2", null ], [ "add_variable_point_process", "classnmodl_1_1codegen_1_1_codegen_cpp_visitor.html#a264f87fb7bb6d8954640417ba8b26643", null ], diff --git a/doxygen/classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor-members.html b/doxygen/classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor-members.html index 7f2d3e7723..bcc3e868ac 100644 --- a/doxygen/classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor-members.html +++ b/doxygen/classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor-members.html @@ -109,9 +109,7 @@ codegen_global_variablesnmodl::codegen::CodegenCppVisitorprotected codegen_int_variablesnmodl::codegen::CodegenCppVisitorprotected codegen_thread_variablesnmodl::codegen::CodegenNeuronCppVisitorprotected - CodegenCppVisitor(std::string mod_filename, const std::string &output_dir, std::string float_type, const bool optimize_ionvar_copies, std::unique_ptr< nmodl::utils::Blame > blame)nmodl::codegen::CodegenNeuronCppVisitorinline - CodegenCppVisitor(std::string mod_filename, std::ostream &stream, std::string float_type, const bool optimize_ionvar_copies, std::unique_ptr< nmodl::utils::Blame > blame=nullptr)nmodl::codegen::CodegenNeuronCppVisitorinline - nmodl::codegen::CodegenCppVisitor::CodegenCppVisitor(std::string mod_filename, const std::string &output_dir, std::string float_type, const bool optimize_ionvar_copies, std::unique_ptr< nmodl::utils::Blame > blame)nmodl::codegen::CodegenCppVisitorinline + CodegenCppVisitor(std::string mod_filename, std::ostream &stream, std::string float_type, const bool optimize_ionvar_copies, std::unique_ptr< nmodl::utils::Blame > blame=nullptr)nmodl::codegen::CodegenNeuronCppVisitorinline nmodl::codegen::CodegenCppVisitor::CodegenCppVisitor(std::string mod_filename, std::ostream &stream, std::string float_type, const bool optimize_ionvar_copies, std::unique_ptr< nmodl::utils::Blame > blame=nullptr)nmodl::codegen::CodegenCppVisitorinline compute_method_name(BlockType type) constnmodl::codegen::CodegenCppVisitorprotected current_watch_statementnmodl::codegen::CodegenCppVisitorprotected diff --git a/doxygen/classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html b/doxygen/classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html index 8f668ecdfb..c214804d03 100644 --- a/doxygen/classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html +++ b/doxygen/classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html @@ -139,16 +139,10 @@ void print_thread_variables_structure (bool print_initializers)  Print the data structure used to access thread variables. More...
  - CodegenCppVisitor (std::string mod_filename, const std::string &output_dir, std::string float_type, const bool optimize_ionvar_copies, std::unique_ptr< nmodl::utils::Blame > blame) - Constructs the C++ code generator visitor. More...
-   CodegenCppVisitor (std::string mod_filename, std::ostream &stream, std::string float_type, const bool optimize_ionvar_copies, std::unique_ptr< nmodl::utils::Blame > blame=nullptr)  Constructs the C++ code generator visitor. More...
  - Public Member Functions inherited from nmodl::codegen::CodegenCppVisitorCodegenCppVisitor (std::string mod_filename, const std::string &output_dir, std::string float_type, const bool optimize_ionvar_copies, std::unique_ptr< nmodl::utils::Blame > blame) - Constructs the C++ code generator visitor. More...
-   CodegenCppVisitor (std::string mod_filename, std::ostream &stream, std::string float_type, const bool optimize_ionvar_copies, std::unique_ptr< nmodl::utils::Blame > blame=nullptr)  Constructs the C++ code generator visitor. More...
  @@ -1426,46 +1420,10 @@

Definition at line 51 of file codegen_neuron_cpp_visitor.cpp.

- - - -

◆ CodegenCppVisitor() [1/2]

- -
-
- - - - - -
- - - - -
nmodl::codegen::CodegenCppVisitor::CodegenCppVisitor
-
-inline
-
- -

Constructs the C++ code generator visitor.

-

This constructor instantiates an NMODL C++ code generator and allows writing generated code directly to a file in [output_dir]/[mod_filename].cpp.

-
Note
No code generation is performed at this stage. Since the code generator classes are all based on AstVisitor the AST must be visited using e.g. visit_program in order to generate the C++ code corresponding to the AST.
-
Parameters
- - - - -
mod_filenameThe name of the model for which code should be generated. It is used for constructing an output filename.
output_dirThe directory where target C++ file should be generated.
float_typeThe float type to use in the generated code. The string will be used as-is in the target code. This defaults to double.
-
-
- -

Definition at line 259 of file codegen_cpp_visitor.hpp.

-
-

◆ CodegenCppVisitor() [2/2]

+

◆ CodegenCppVisitor()

@@ -1496,7 +1454,7 @@

Definition at line 287 of file codegen_cpp_visitor.hpp.

+

Definition at line 259 of file codegen_cpp_visitor.hpp.

diff --git a/doxygen/classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.js b/doxygen/classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.js index 00dc37b64e..7fc13c09ba 100644 --- a/doxygen/classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.js +++ b/doxygen/classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.js @@ -4,7 +4,6 @@ var classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor = [ "add_variable_tqitem", "classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#ab88a7d20486baa43e3e217b6deacead7", null ], [ "append_conc_write_statements", "classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#aea611e83959c5e3f6faa50d47ee69c0f", null ], [ "backend_name", "classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a89c5a0f046f8752579636a3db97d669a", null ], - [ "CodegenCppVisitor", "classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a668abea41fecf3599122af773e93c385", null ], [ "CodegenCppVisitor", "classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#ab58b5680bc2f8e2e0fb8f693c5c1d8e4", null ], [ "cvode_setup_parameters", "classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a47ec475151d85f556126ab808d2896fe", null ], [ "cvode_update_parameters", "classnmodl_1_1codegen_1_1_codegen_neuron_cpp_visitor.html#a6dd3012e7064a1ec13ed321b28fb5d9f", null ], diff --git a/doxygen/codegen__acc__visitor_8cpp_source.html b/doxygen/codegen__acc__visitor_8cpp_source.html index cb857535fb..f738e27e9d 100644 --- a/doxygen/codegen__acc__visitor_8cpp_source.html +++ b/doxygen/codegen__acc__visitor_8cpp_source.html @@ -476,12 +476,12 @@
void print_nrn_cur_matrix_shadow_reduction() override
reduction to matrix elements from shadow vectors
void print_net_send_buffering_cnt_update() const override
print atomic update of NetSendBuffer_t cnt
void print_net_init_acc_serial_annotation_block_begin() override
start of annotation "acc kernels" for net_init kernel
-
codegen::CodegenInfo info
All ast information for code generation.
-
std::string global_struct_instance() const
Name of the (host-only) global instance of global_struct
+
codegen::CodegenInfo info
All ast information for code generation.
+
std::string global_struct_instance() const
Name of the (host-only) global instance of global_struct
void print_deriv_advance_flag_transfer_to_device() const override
update derivimplicit advance flag on the gpu device
int derivimplicit_list_num
slist/dlist id for derivimplicit block
int thread_data_index
thread_data_index indicates number of threads being allocated.
-
const char * operator_for_d() const noexcept
Operator for diagonal vector update (matrix update)
+
const char * operator_for_d() const noexcept
Operator for diagonal vector update (matrix update)
bool nrn_cur_reduction_loop_required() override
if reduction block in nrn_cur required
encapsulates code generation backend implementations
Definition: ast_common.hpp:26
Auto generated AST classes declaration.
@@ -507,11 +507,11 @@
BlockType
Helper to represent various block types.
void print_abort_routine() const override
abort routine
Auto generated AST classes declaration.
-
std::string instance_struct() const
Name of structure that wraps range variables.
+
std::string instance_struct() const
Name of structure that wraps range variables.
void print_backend_includes() override
common includes : standard c++, coreneuron and backend specific
-
const char * operator_for_rhs() const noexcept
Operator for rhs vector update (matrix update)
+
const char * operator_for_rhs() const noexcept
Operator for rhs vector update (matrix update)
void print_instance_struct_delete_from_device() override
call helper function that deletes the instance struct from the device
-
std::unique_ptr< CodePrinter > printer
Code printer object for target (C++)
+
std::unique_ptr< CodePrinter > printer
Code printer object for target (C++)
void print_net_send_buf_update_to_host() const override
update NetSendBuffer_t from device to host
void print_net_send_buf_count_update_to_device() const override
update NetSendBuffer_t count from host to device
void print_instance_struct_transfer_routines(const std::vector< std::string > &ptr_members) override
define helper functions for copying the instance struct to the device
diff --git a/doxygen/codegen__coreneuron__cpp__visitor_8hpp_source.html b/doxygen/codegen__coreneuron__cpp__visitor_8hpp_source.html index 67b553a69c..03c4a6eeb6 100644 --- a/doxygen/codegen__coreneuron__cpp__visitor_8hpp_source.html +++ b/doxygen/codegen__coreneuron__cpp__visitor_8hpp_source.html @@ -157,7 +157,7 @@
61  */
63  public:
- +
65 
66  protected:
67  /****************************************************************************************/
@@ -1085,10 +1085,9 @@
virtual void print_device_stream_wait() const
Print the code to synchronise/wait on stream specific to NrnThread.
virtual void print_instance_struct_delete_from_device()
Delete the instance struct from the device.
virtual void print_net_send_buf_count_update_to_device() const
Print the code to update NetSendBuffer_t count from host to device.
-
codegen::CodegenInfo info
All ast information for code generation.
+
codegen::CodegenInfo info
All ast information for code generation.
std::string global_variable_name(const SymbolType &symbol, bool use_instance=true) const override
Determine the variable name for a global variable given its symbol.
virtual void print_newtonspace_transfer_to_device() const
Print code block to transfer newtonspace structure to device.
-
CodegenCppVisitor(std::string mod_filename, const std::string &output_dir, std::string float_type, const bool optimize_ionvar_copies, std::unique_ptr< nmodl::utils::Blame > blame)
Constructs the C++ code generator visitor.
int thread_data_index
thread_data_index indicates number of threads being allocated.
void print_net_send_call(const ast::FunctionCall &node) override
Print call to net_send.
virtual void print_net_receive_loop_begin()
Print the code for the main net_receive loop.
@@ -1195,6 +1194,7 @@
virtual void print_device_atomic_capture_annotation() const
Print pragma annotation for increase and capture of variable in automatic way.
void visit_derivimplicit_callback(const ast::DerivimplicitCallback &node) override
visit node of type ast::DerivimplicitCallback
Visitor for printing C++ code compatible with legacy api of CoreNEURON
+
CodegenCppVisitor(std::string mod_filename, std::ostream &stream, std::string float_type, const bool optimize_ionvar_copies, std::unique_ptr< nmodl::utils::Blame > blame=nullptr)
Constructs the C++ code generator visitor.
virtual void print_get_memb_list()
Print the target backend code for defining and checking a local Memb_list variable.
void print_num_variable_getter()
Print the getter methods for float and integer variables count.
void print_standard_includes() override
Print standard C/C++ includes.
@@ -1218,7 +1218,7 @@
std::string replace_if_verbatim_variable(std::string name)
Replace commonly used verbatim variables.
virtual void print_ion_var_constructor(const std::vector< std::string > &members)
Print constructor of ion variables.
int position_of_float_var(const std::string &name) const override
Determine the position in the data array for a given float variable.
-
std::vector< std::tuple< std::string, std::string, std::string, std::string > > ParamVector
A vector of parameters represented by a 4-tuple of strings:
+
std::vector< std::tuple< std::string, std::string, std::string, std::string > > ParamVector
A vector of parameters represented by a 4-tuple of strings:
Concrete visitor for all AST classes.
diff --git a/doxygen/codegen__cpp__visitor_8cpp_source.html b/doxygen/codegen__cpp__visitor_8cpp_source.html index 3bd05c00bc..d42b019788 100644 --- a/doxygen/codegen__cpp__visitor_8cpp_source.html +++ b/doxygen/codegen__cpp__visitor_8cpp_source.html @@ -1912,7 +1912,7 @@
static std::pair< std::string, std::string > write_ion_variable_name(const std::string &name)
Return ion variable name and corresponding ion write variable name.
const ArgumentVector & get_parameters() const noexcept override
Getter for member variable FunctionTableBlock::parameters.
bool net_receive_exist() const noexcept
Check if net_receive node exist.
-
std::shared_ptr< symtab::Symbol > SymbolType
+
std::shared_ptr< symtab::Symbol > SymbolType
int get_int_variable_index(const std::string &var_name)
static constexpr char VOLTAGE_UNUSED_VARIABLE[]
range variable for voltage when unused (for vectorized model)
@@ -2159,7 +2159,7 @@
std::string get_node_name() const override
Return name of the node.
Definition: ast.cpp:9200
void visit_while_statement(const ast::WhileStatement &node) override
visit node of type ast::WhileStatement
-
std::vector< std::tuple< std::string, std::string, std::string, std::string > > ParamVector
A vector of parameters represented by a 4-tuple of strings:
+
std::vector< std::tuple< std::string, std::string, std::string, std::string > > ParamVector
A vector of parameters represented by a 4-tuple of strings:
static constexpr char ION_VARNAME_PREFIX[]
prefix for ion variable
std::shared_ptr< Expression > get_condition() const noexcept
Getter for member variable WhileStatement::condition.
void visit_statement_block(const ast::StatementBlock &node) override
diff --git a/doxygen/codegen__cpp__visitor_8hpp_source.html b/doxygen/codegen__cpp__visitor_8hpp_source.html index 02470d495d..7b2cd341be 100644 --- a/doxygen/codegen__cpp__visitor_8hpp_source.html +++ b/doxygen/codegen__cpp__visitor_8hpp_source.html @@ -340,7 +340,7 @@
244  * \brief Constructs the C++ code generator visitor
245  *
246  * This constructor instantiates an NMODL C++ code generator and allows writing generated code
-
247  * directly to a file in \c [output_dir]/[mod_filename].cpp.
+
247  * into an output stream.
248  *
249  * \note No code generation is performed at this stage. Since the code
250  * generator classes are all based on \c AstVisitor the AST must be visited using e.g. \c
@@ -348,1380 +348,1352 @@
252  *
253  * \param mod_filename The name of the model for which code should be generated.
254  * It is used for constructing an output filename.
-
255  * \param output_dir The directory where target C++ file should be generated.
+
255  * \param stream The output stream onto which to write the generated code
256  * \param float_type The float type to use in the generated code. The string will be used
257  * as-is in the target code. This defaults to \c double.
258  */
- -
260  const std::string& output_dir,
+ +
260  std::ostream& stream,
261  std::string float_type,
262  const bool optimize_ionvar_copies,
-
263  std::unique_ptr<nmodl::utils::Blame> blame)
-
264  : printer(std::make_unique<CodePrinter>(output_dir + "/" + mod_filename + ".cpp",
-
265  std::move(blame)))
-
266  , mod_filename(std::move(mod_filename))
-
267  , float_type(std::move(float_type))
- +
263  std::unique_ptr<nmodl::utils::Blame> blame = nullptr)
+
264  : printer(std::make_unique<CodePrinter>(stream, std::move(blame)))
+
265  , mod_filename(std::move(mod_filename))
+
266  , float_type(std::move(float_type))
+ +
268 
269 
-
270 
-
271  /**
-
272  * \brief Constructs the C++ code generator visitor
-
273  *
-
274  * This constructor instantiates an NMODL C++ code generator and allows writing generated code
-
275  * into an output stream.
+
270  protected:
+
271  using SymbolType = std::shared_ptr<symtab::Symbol>;
+
272 
+
273 
+
274  /**
+
275  * A vector of parameters represented by a 4-tuple of strings:
276  *
-
277  * \note No code generation is performed at this stage. Since the code
-
278  * generator classes are all based on \c AstVisitor the AST must be visited using e.g. \c
-
279  * visit_program in order to generate the C++ code corresponding to the AST.
-
280  *
-
281  * \param mod_filename The name of the model for which code should be generated.
-
282  * It is used for constructing an output filename.
-
283  * \param stream The output stream onto which to write the generated code
-
284  * \param float_type The float type to use in the generated code. The string will be used
-
285  * as-is in the target code. This defaults to \c double.
-
286  */
- -
288  std::ostream& stream,
-
289  std::string float_type,
-
290  const bool optimize_ionvar_copies,
-
291  std::unique_ptr<nmodl::utils::Blame> blame = nullptr)
-
292  : printer(std::make_unique<CodePrinter>(stream, std::move(blame)))
-
293  , mod_filename(std::move(mod_filename))
-
294  , float_type(std::move(float_type))
- -
296 
-
297 
-
298  protected:
-
299  using SymbolType = std::shared_ptr<symtab::Symbol>;
+
277  * - type qualifier (e.g. \c const)
+
278  * - type (e.g. \c double)
+
279  * - pointer qualifier (e.g. \c \_\_restrict\_\_)
+
280  * - parameter name (e.g. \c data)
+
281  *
+
282  */
+
283  using ParamVector = std::vector<std::tuple<std::string, std::string, std::string, std::string>>;
+
284 
+
285 
+
286  /****************************************************************************************/
+
287  /* Member variables */
+
288  /****************************************************************************************/
+
289 
+
290  /**
+
291  * Code printer object for target (C++)
+
292  */
+
293  std::unique_ptr<CodePrinter> printer;
+
294 
+
295 
+
296  /**
+
297  * Name of mod file (without .mod suffix)
+
298  */
+
299  std::string mod_filename;
300 
301 
302  /**
-
303  * A vector of parameters represented by a 4-tuple of strings:
-
304  *
-
305  * - type qualifier (e.g. \c const)
-
306  * - type (e.g. \c double)
-
307  * - pointer qualifier (e.g. \c \_\_restrict\_\_)
-
308  * - parameter name (e.g. \c data)
-
309  *
+
303  * Data type of floating point variables
+
304  */
+ +
306 
+
307 
+
308  /**
+
309  * Flag to indicate if visitor should avoid ion variable copies
310  */
-
311  using ParamVector = std::vector<std::tuple<std::string, std::string, std::string, std::string>>;
+
312 
-
313 
-
314  /****************************************************************************************/
-
315  /* Member variables */
-
316  /****************************************************************************************/
-
317 
-
318  /**
-
319  * Code printer object for target (C++)
-
320  */
-
321  std::unique_ptr<CodePrinter> printer;
-
322 
-
323 
-
324  /**
-
325  * Name of mod file (without .mod suffix)
-
326  */
-
327  std::string mod_filename;
-
328 
-
329 
-
330  /**
-
331  * Data type of floating point variables
-
332  */
- -
334 
-
335 
-
336  /**
-
337  * Flag to indicate if visitor should avoid ion variable copies
-
338  */
- -
340 
-
341 
-
342  /**
-
343  * All ast information for code generation
-
344  */
- -
346 
-
347 
-
348  /**
-
349  * Symbol table for the program
-
350  */
- -
352 
-
353 
-
354  /**
-
355  * All float variables for the model
-
356  */
-
357  std::vector<SymbolType> codegen_float_variables;
-
358 
-
359 
-
360  /**
-
361  * All int variables for the model
-
362  */
-
363  std::vector<IndexVariableInfo> codegen_int_variables;
-
364 
-
365 
-
366  /**
-
367  * All global variables for the model
-
368  * \todo: this has become different than CodegenInfo
-
369  */
-
370  std::vector<SymbolType> codegen_global_variables;
-
371 
-
372 
-
373  /**
-
374  * Variable name should be converted to instance name (but not for function arguments)
-
375  */
- -
377 
-
378 
-
379  /**
-
380  * \c true if currently net_receive block being printed
-
381  */
-
382  bool printing_net_receive = false;
-
383 
+
313 
+
314  /**
+
315  * All ast information for code generation
+
316  */
+ +
318 
+
319 
+
320  /**
+
321  * Symbol table for the program
+
322  */
+ +
324 
+
325 
+
326  /**
+
327  * All float variables for the model
+
328  */
+
329  std::vector<SymbolType> codegen_float_variables;
+
330 
+
331 
+
332  /**
+
333  * All int variables for the model
+
334  */
+
335  std::vector<IndexVariableInfo> codegen_int_variables;
+
336 
+
337 
+
338  /**
+
339  * All global variables for the model
+
340  * \todo: this has become different than CodegenInfo
+
341  */
+
342  std::vector<SymbolType> codegen_global_variables;
+
343 
+
344 
+
345  /**
+
346  * Variable name should be converted to instance name (but not for function arguments)
+
347  */
+ +
349 
+
350 
+
351  /**
+
352  * \c true if currently net_receive block being printed
+
353  */
+
354  bool printing_net_receive = false;
+
355 
+
356 
+
357  /**
+
358  * \c true if currently initial block of net_receive being printed
+
359  */
+
360  bool printing_net_init = false;
+
361 
+
362 
+
363  /**
+
364  * \c true if currently printing top level verbatim blocks
+
365  */
+ +
367 
+
368 
+
369  /**
+
370  * \c true if internal method call was encountered while processing verbatim block
+
371  */
+ +
373 
+
374 
+
375  /**
+
376  * Index of watch statement being printed
+
377  */
+ +
379 
+
380 
+
381  /****************************************************************************************/
+
382  /* Generic information getters */
+
383  /****************************************************************************************/
384 
385  /**
-
386  * \c true if currently initial block of net_receive being printed
-
387  */
-
388  bool printing_net_init = false;
-
389 
-
390 
-
391  /**
-
392  * \c true if currently printing top level verbatim blocks
-
393  */
- -
395 
-
396 
-
397  /**
-
398  * \c true if internal method call was encountered while processing verbatim block
-
399  */
- -
401 
-
402 
-
403  /**
-
404  * Index of watch statement being printed
-
405  */
- -
407 
-
408 
-
409  /****************************************************************************************/
-
410  /* Generic information getters */
-
411  /****************************************************************************************/
-
412 
-
413  /**
-
414  * Return Nmodl language version
-
415  * \return A version
-
416  */
-
417  std::string nmodl_version() const noexcept {
- -
419  }
-
420 
-
421 
-
422  /**
-
423  * Name of the simulator the code was generated for
-
424  */
-
425  virtual std::string simulator_name() = 0;
-
426 
-
427 
-
428  /**
-
429  * Name of structure that wraps range variables
-
430  */
-
431  std::string instance_struct() const {
-
432  return fmt::format("{}_Instance", info.mod_suffix);
-
433  }
+
386  * Return Nmodl language version
+
387  * \return A version
+
388  */
+
389  std::string nmodl_version() const noexcept {
+ +
391  }
+
392 
+
393 
+
394  /**
+
395  * Name of the simulator the code was generated for
+
396  */
+
397  virtual std::string simulator_name() = 0;
+
398 
+
399 
+
400  /**
+
401  * Name of structure that wraps range variables
+
402  */
+
403  std::string instance_struct() const {
+
404  return fmt::format("{}_Instance", info.mod_suffix);
+
405  }
+
406 
+
407  /**
+
408  * Name of structure that wraps node variables
+
409  */
+
410  std::string node_data_struct() const {
+
411  return fmt::format("{}_NodeData", info.mod_suffix);
+
412  }
+
413 
+
414  std::string thread_variables_struct() const {
+
415  return fmt::format("{}_ThreadVariables", info.mod_suffix);
+
416  }
+
417 
+
418 
+
419  /**
+
420  * Name of structure that wraps global variables
+
421  */
+
422  std::string global_struct() const {
+
423  return fmt::format("{}_Store", info.mod_suffix);
+
424  }
+
425 
+
426 
+
427  /**
+
428  * Name of the (host-only) global instance of `global_struct`
+
429  */
+
430  std::string global_struct_instance() const {
+
431  return info.mod_suffix + "_global";
+
432  }
+
433 
434 
435  /**
-
436  * Name of structure that wraps node variables
+
436  * Name of the code generation backend
437  */
-
438  std::string node_data_struct() const {
-
439  return fmt::format("{}_NodeData", info.mod_suffix);
-
440  }
-
441 
-
442  std::string thread_variables_struct() const {
-
443  return fmt::format("{}_ThreadVariables", info.mod_suffix);
-
444  }
-
445 
-
446 
-
447  /**
-
448  * Name of structure that wraps global variables
-
449  */
-
450  std::string global_struct() const {
-
451  return fmt::format("{}_Store", info.mod_suffix);
-
452  }
-
453 
-
454 
-
455  /**
-
456  * Name of the (host-only) global instance of `global_struct`
-
457  */
-
458  std::string global_struct_instance() const {
-
459  return info.mod_suffix + "_global";
-
460  }
-
461 
-
462 
-
463  /**
-
464  * Name of the code generation backend
-
465  */
-
466  virtual std::string backend_name() const = 0;
-
467 
-
468 
-
469  /**
-
470  * Data type for the local variables
-
471  */
-
472  const char* local_var_type() const noexcept {
- -
474  }
-
475 
-
476 
-
477  /**
-
478  * Check if a semicolon is required at the end of given statement
-
479  * \param node The AST Statement node to check
-
480  * \return \c true if this Statement requires a semicolon
-
481  */
-
482  static bool need_semicolon(const ast::Statement& node);
-
483 
-
484 
-
485  /**
-
486  * Default data type for floating point elements
-
487  */
-
488  const char* default_float_data_type() const noexcept {
- -
490  }
-
491 
-
492 
-
493  /**
-
494  * Data type for floating point elements specified on command line
-
495  */
-
496  const std::string& float_data_type() const noexcept {
-
497  return float_type;
-
498  }
-
499 
-
500 
-
501  /**
-
502  * Default data type for integer (offset) elements
-
503  */
-
504  const char* default_int_data_type() const noexcept {
- -
506  }
-
507 
+
438  virtual std::string backend_name() const = 0;
+
439 
+
440 
+
441  /**
+
442  * Data type for the local variables
+
443  */
+
444  const char* local_var_type() const noexcept {
+ +
446  }
+
447 
+
448 
+
449  /**
+
450  * Check if a semicolon is required at the end of given statement
+
451  * \param node The AST Statement node to check
+
452  * \return \c true if this Statement requires a semicolon
+
453  */
+
454  static bool need_semicolon(const ast::Statement& node);
+
455 
+
456 
+
457  /**
+
458  * Default data type for floating point elements
+
459  */
+
460  const char* default_float_data_type() const noexcept {
+ +
462  }
+
463 
+
464 
+
465  /**
+
466  * Data type for floating point elements specified on command line
+
467  */
+
468  const std::string& float_data_type() const noexcept {
+
469  return float_type;
+
470  }
+
471 
+
472 
+
473  /**
+
474  * Default data type for integer (offset) elements
+
475  */
+
476  const char* default_int_data_type() const noexcept {
+ +
478  }
+
479 
+
480 
+
481  /**
+
482  * Operator for rhs vector update (matrix update)
+
483  */
+
484  const char* operator_for_rhs() const noexcept {
+
485  return info.electrode_current ? "+=" : "-=";
+
486  }
+
487 
+
488 
+
489  /**
+
490  * Operator for diagonal vector update (matrix update)
+
491  */
+
492  const char* operator_for_d() const noexcept {
+
493  return info.electrode_current ? "-=" : "+=";
+
494  }
+
495 
+
496  /**
+
497  * Name of channel info variable
+
498  *
+
499  */
+
500  std::string get_channel_info_var_name() const noexcept {
+
501  return std::string("mechanism_info");
+
502  }
+
503 
+
504 
+
505  /****************************************************************************************/
+
506  /* Common helper routines accross codegen functions */
+
507  /****************************************************************************************/
508 
509  /**
-
510  * Operator for rhs vector update (matrix update)
-
511  */
-
512  const char* operator_for_rhs() const noexcept {
-
513  return info.electrode_current ? "+=" : "-=";
-
514  }
-
515 
-
516 
-
517  /**
-
518  * Operator for diagonal vector update (matrix update)
-
519  */
-
520  const char* operator_for_d() const noexcept {
-
521  return info.electrode_current ? "-=" : "+=";
-
522  }
-
523 
-
524  /**
-
525  * Name of channel info variable
-
526  *
-
527  */
-
528  std::string get_channel_info_var_name() const noexcept {
-
529  return std::string("mechanism_info");
-
530  }
-
531 
-
532 
-
533  /****************************************************************************************/
-
534  /* Common helper routines accross codegen functions */
-
535  /****************************************************************************************/
-
536 
-
537  /**
-
538  * Check if a structure for ion variables is required
-
539  * \return \c true if a structure fot ion variables must be generated
-
540  */
-
541  bool ion_variable_struct_required() const;
-
542 
-
543 
-
544  /**
-
545  * Generate the string representing the procedure parameter declaration
-
546  *
-
547  * The procedure parameters are stored in a vector of 4-tuples each representing a parameter.
-
548  *
-
549  * \param params The parameters that should be concatenated into the function parameter
-
550  * declaration
-
551  * \return The string representing the declaration of function parameters
-
552  */
-
553  static std::string get_parameter_str(const ParamVector& params);
-
554 
-
555 
-
556  /**
-
557  * Generate the string representing the parameters in a function call
-
558  *
-
559  * The procedure parameters are stored in a vector of 4-tuples each representing a parameter.
-
560  *
-
561  * \param params The parameters that should be concatenated into the function parameter
-
562  * declaration
-
563  * \return The string representing the function call parameters
-
564  */
-
565  static std::string get_arg_str(const ParamVector& params);
-
566 
-
567 
-
568  /**
-
569  * Check if function or procedure node has parameter with given name
-
570  *
-
571  * \tparam T Node type (either procedure or function)
-
572  * \param node AST node (either procedure or function)
-
573  * \param name Name of parameter
-
574  * \return True if argument with name exist
-
575  */
-
576  template <typename T>
-
577  bool has_parameter_of_name(const T& node, const std::string& name);
-
578 
-
579 
-
580  /**
-
581  * Check if given statement should be skipped during code generation
-
582  * \param node The AST Statement node to check
-
583  * \return \c true if this Statement is to be skipped
-
584  */
-
585  static bool statement_to_skip(const ast::Statement& node);
-
586 
-
587 
-
588  /**
-
589  * Check if net_send_buffer is required
-
590  */
-
591  bool net_send_buffer_required() const noexcept;
-
592 
-
593 
-
594  /**
-
595  * Check if net receive/send buffering kernels required
-
596  */
-
597  bool net_receive_buffering_required() const noexcept;
-
598 
-
599 
-
600  /**
-
601  * Check if nrn_state function is required
-
602  */
-
603  bool nrn_state_required() const noexcept;
-
604 
-
605 
-
606  /**
-
607  * Check if nrn_cur function is required
-
608  */
-
609  bool nrn_cur_required() const noexcept;
-
610 
-
611 
-
612  /**
-
613  * Check if net_receive function is required
-
614  */
-
615  bool net_receive_required() const noexcept;
-
616 
-
617 
-
618  /**
-
619  * Check if setup_range_variable function is required
-
620  * \return
+
510  * Check if a structure for ion variables is required
+
511  * \return \c true if a structure fot ion variables must be generated
+
512  */
+
513  bool ion_variable_struct_required() const;
+
514 
+
515 
+
516  /**
+
517  * Generate the string representing the procedure parameter declaration
+
518  *
+
519  * The procedure parameters are stored in a vector of 4-tuples each representing a parameter.
+
520  *
+
521  * \param params The parameters that should be concatenated into the function parameter
+
522  * declaration
+
523  * \return The string representing the declaration of function parameters
+
524  */
+
525  static std::string get_parameter_str(const ParamVector& params);
+
526 
+
527 
+
528  /**
+
529  * Generate the string representing the parameters in a function call
+
530  *
+
531  * The procedure parameters are stored in a vector of 4-tuples each representing a parameter.
+
532  *
+
533  * \param params The parameters that should be concatenated into the function parameter
+
534  * declaration
+
535  * \return The string representing the function call parameters
+
536  */
+
537  static std::string get_arg_str(const ParamVector& params);
+
538 
+
539 
+
540  /**
+
541  * Check if function or procedure node has parameter with given name
+
542  *
+
543  * \tparam T Node type (either procedure or function)
+
544  * \param node AST node (either procedure or function)
+
545  * \param name Name of parameter
+
546  * \return True if argument with name exist
+
547  */
+
548  template <typename T>
+
549  bool has_parameter_of_name(const T& node, const std::string& name);
+
550 
+
551 
+
552  /**
+
553  * Check if given statement should be skipped during code generation
+
554  * \param node The AST Statement node to check
+
555  * \return \c true if this Statement is to be skipped
+
556  */
+
557  static bool statement_to_skip(const ast::Statement& node);
+
558 
+
559 
+
560  /**
+
561  * Check if net_send_buffer is required
+
562  */
+
563  bool net_send_buffer_required() const noexcept;
+
564 
+
565 
+
566  /**
+
567  * Check if net receive/send buffering kernels required
+
568  */
+
569  bool net_receive_buffering_required() const noexcept;
+
570 
+
571 
+
572  /**
+
573  * Check if nrn_state function is required
+
574  */
+
575  bool nrn_state_required() const noexcept;
+
576 
+
577 
+
578  /**
+
579  * Check if nrn_cur function is required
+
580  */
+
581  bool nrn_cur_required() const noexcept;
+
582 
+
583 
+
584  /**
+
585  * Check if net_receive function is required
+
586  */
+
587  bool net_receive_required() const noexcept;
+
588 
+
589 
+
590  /**
+
591  * Check if setup_range_variable function is required
+
592  * \return
+
593  */
+
594  bool range_variable_setup_required() const noexcept;
+
595 
+
596 
+
597  /**
+
598  * Check if net_receive node exist
+
599  */
+
600  bool net_receive_exist() const noexcept;
+
601 
+
602 
+
603  /**
+
604  * Check if breakpoint node exist
+
605  */
+
606  bool breakpoint_exist() const noexcept;
+
607 
+
608 
+
609  /**
+
610  * Check if given method is defined in this model
+
611  * \param name The name of the method to check
+
612  * \return \c true if the method is defined
+
613  */
+
614  bool defined_method(const std::string& name) const;
+
615 
+
616 
+
617  /**
+
618  * Checks if given function name is \c net_send
+
619  * \param name The function name to check
+
620  * \return \c true if the function is net_send
621  */
-
622  bool range_variable_setup_required() const noexcept;
-
623 
-
624 
-
625  /**
-
626  * Check if net_receive node exist
-
627  */
-
628  bool net_receive_exist() const noexcept;
+
622  bool is_net_send(const std::string& name) const noexcept {
+
623  return name == codegen::naming::NET_SEND_METHOD;
+
624  }
+
625 
+
626  bool is_nrn_pointing(const std::string& name) const noexcept {
+ +
628  }
629 
630 
631  /**
-
632  * Check if breakpoint node exist
-
633  */
-
634  bool breakpoint_exist() const noexcept;
-
635 
-
636 
-
637  /**
-
638  * Check if given method is defined in this model
-
639  * \param name The name of the method to check
-
640  * \return \c true if the method is defined
-
641  */
-
642  bool defined_method(const std::string& name) const;
-
643 
-
644 
-
645  /**
-
646  * Checks if given function name is \c net_send
-
647  * \param name The function name to check
-
648  * \return \c true if the function is net_send
-
649  */
-
650  bool is_net_send(const std::string& name) const noexcept {
-
651  return name == codegen::naming::NET_SEND_METHOD;
-
652  }
-
653 
-
654  bool is_nrn_pointing(const std::string& name) const noexcept {
- -
656  }
-
657 
-
658 
-
659  /**
-
660  * Checks if given function name is \c net_move
-
661  * \param name The function name to check
-
662  * \return \c true if the function is net_move
-
663  */
-
664  bool is_net_move(const std::string& name) const noexcept {
-
665  return name == codegen::naming::NET_MOVE_METHOD;
-
666  }
-
667 
-
668 
-
669  /**
-
670  * Checks if given function name is \c net_event
-
671  * \param name The function name to check
-
672  * \return \c true if the function is net_event
-
673  */
-
674  bool is_net_event(const std::string& name) const noexcept {
-
675  return name == codegen::naming::NET_EVENT_METHOD;
-
676  }
-
677 
-
678 
-
679  bool is_function_table_call(const std::string& name) const;
+
632  * Checks if given function name is \c net_move
+
633  * \param name The function name to check
+
634  * \return \c true if the function is net_move
+
635  */
+
636  bool is_net_move(const std::string& name) const noexcept {
+
637  return name == codegen::naming::NET_MOVE_METHOD;
+
638  }
+
639 
+
640 
+
641  /**
+
642  * Checks if given function name is \c net_event
+
643  * \param name The function name to check
+
644  * \return \c true if the function is net_event
+
645  */
+
646  bool is_net_event(const std::string& name) const noexcept {
+
647  return name == codegen::naming::NET_EVENT_METHOD;
+
648  }
+
649 
+
650 
+
651  bool is_function_table_call(const std::string& name) const;
+
652 
+
653 
+
654  /**
+
655  * Determine the position in the data array for a given float variable
+
656  * \param name The name of a float variable
+
657  * \return The position index in the data array
+
658  */
+
659  virtual int position_of_float_var(const std::string& name) const = 0;
+
660 
+
661 
+
662  /**
+
663  * Determine the position in the data array for a given int variable
+
664  * \param name The name of an int variable
+
665  * \return The position index in the data array
+
666  */
+
667  virtual int position_of_int_var(const std::string& name) const = 0;
+
668 
+
669 
+
670  /**
+
671  * Number of float variables in the model
+
672  */
+
673  int float_variables_size() const;
+
674 
+
675 
+
676  /**
+
677  * Number of integer variables in the model
+
678  */
+
679  int int_variables_size() const;
680 
681 
682  /**
-
683  * Determine the position in the data array for a given float variable
-
684  * \param name The name of a float variable
-
685  * \return The position index in the data array
+
683  * Convert a given \c double value to its string representation
+
684  * \param value The number to convert given as string as it is parsed by the modfile
+
685  * \return Its string representation
686  */
-
687  virtual int position_of_float_var(const std::string& name) const = 0;
+
687  std::string format_double_string(const std::string& value);
688 
689 
690  /**
-
691  * Determine the position in the data array for a given int variable
-
692  * \param name The name of an int variable
-
693  * \return The position index in the data array
+
691  * Convert a given \c float value to its string representation
+
692  * \param value The number to convert given as string as it is parsed by the modfile
+
693  * \return Its string representation
694  */
-
695  virtual int position_of_int_var(const std::string& name) const = 0;
+
695  std::string format_float_string(const std::string& value);
696 
697 
698  /**
-
699  * Number of float variables in the model
+
699  * populate all index semantics needed for registration with coreneuron
700  */
-
701  int float_variables_size() const;
+
701  void update_index_semantics();
702 
703 
704  /**
-
705  * Number of integer variables in the model
-
706  */
-
707  int int_variables_size() const;
-
708 
-
709 
-
710  /**
-
711  * Convert a given \c double value to its string representation
-
712  * \param value The number to convert given as string as it is parsed by the modfile
-
713  * \return Its string representation
-
714  */
-
715  std::string format_double_string(const std::string& value);
-
716 
-
717 
-
718  /**
-
719  * Convert a given \c float value to its string representation
-
720  * \param value The number to convert given as string as it is parsed by the modfile
-
721  * \return Its string representation
-
722  */
-
723  std::string format_float_string(const std::string& value);
-
724 
-
725 
-
726  /**
-
727  * populate all index semantics needed for registration with coreneuron
-
728  */
-
729  void update_index_semantics();
-
730 
-
731 
-
732  /**
-
733  * Determine all \c float variables required during code generation
-
734  * \return A \c vector of \c float variables
-
735  */
-
736  std::vector<SymbolType> get_float_variables() const;
-
737 
-
738  virtual bool needs_v_unused() const = 0;
-
739 
-
740 
-
741  /**
-
742  * Determine all \c int variables required during code generation
-
743  * \return A \c vector of \c int variables
-
744  */
-
745  std::vector<IndexVariableInfo> get_int_variables();
-
746 
-
747 
-
748  /**
-
749  * For a given output block type, return statements for all read ion variables
-
750  *
-
751  * \param type The type of code block being generated
-
752  * \return A \c vector of strings representing the reading of ion variables
-
753  */
-
754  std::vector<std::string> ion_read_statements(BlockType type) const;
-
755 
-
756 
-
757  /**
-
758  * For a given output block type, return minimal statements for all read ion variables
-
759  *
-
760  * \param type The type of code block being generated
-
761  * \return A \c vector of strings representing the reading of ion variables
-
762  */
-
763  std::vector<std::string> ion_read_statements_optimized(BlockType type) const;
-
764 
-
765 
-
766  /**
-
767  * For a given output block type, return statements for writing back ion variables
-
768  *
-
769  * \param type The type of code block being generated
-
770  * \return A \c vector of strings representing the write-back of ion variables
-
771  */
-
772  std::vector<ShadowUseStatement> ion_write_statements(BlockType type);
-
773 
-
774 
-
775  /**
-
776  * Process shadow update statement
-
777  *
-
778  * If the statement requires reduction then add it to vector of reduction statement and return
-
779  * statement using shadow update
+
705  * Determine all \c float variables required during code generation
+
706  * \return A \c vector of \c float variables
+
707  */
+
708  std::vector<SymbolType> get_float_variables() const;
+
709 
+
710  virtual bool needs_v_unused() const = 0;
+
711 
+
712 
+
713  /**
+
714  * Determine all \c int variables required during code generation
+
715  * \return A \c vector of \c int variables
+
716  */
+
717  std::vector<IndexVariableInfo> get_int_variables();
+
718 
+
719 
+
720  /**
+
721  * For a given output block type, return statements for all read ion variables
+
722  *
+
723  * \param type The type of code block being generated
+
724  * \return A \c vector of strings representing the reading of ion variables
+
725  */
+
726  std::vector<std::string> ion_read_statements(BlockType type) const;
+
727 
+
728 
+
729  /**
+
730  * For a given output block type, return minimal statements for all read ion variables
+
731  *
+
732  * \param type The type of code block being generated
+
733  * \return A \c vector of strings representing the reading of ion variables
+
734  */
+
735  std::vector<std::string> ion_read_statements_optimized(BlockType type) const;
+
736 
+
737 
+
738  /**
+
739  * For a given output block type, return statements for writing back ion variables
+
740  *
+
741  * \param type The type of code block being generated
+
742  * \return A \c vector of strings representing the write-back of ion variables
+
743  */
+
744  std::vector<ShadowUseStatement> ion_write_statements(BlockType type);
+
745 
+
746 
+
747  /**
+
748  * Process shadow update statement
+
749  *
+
750  * If the statement requires reduction then add it to vector of reduction statement and return
+
751  * statement using shadow update
+
752  *
+
753  * \param statement The statement that might require shadow updates
+
754  * \param type The target backend code block type
+
755  * \return The generated target backend code
+
756  */
+
757  std::string process_shadow_update_statement(const ShadowUseStatement& statement,
+
758  BlockType type);
+
759 
+
760 
+
761  /**
+
762  * Determine the variable name for the "current" used in breakpoint block taking into account
+
763  * intermediate code transformations.
+
764  * \param current The variable name for the current used in the model
+
765  * \return The name for the current to be printed in C++
+
766  */
+
767  std::string breakpoint_current(std::string current) const;
+
768 
+
769 
+
770  /**
+
771  * Print pragma annotations for channel iterations
+
772  *
+
773  * This can be overriden by backends to provide additonal annotations or pragmas to enable
+
774  * for example SIMD code generation (e.g. through \c ivdep)
+
775  * The default implementation prints
+
776  *
+
777  * \code
+
778  * #pragma ivdep
+
779  * \endcode
780  *
-
781  * \param statement The statement that might require shadow updates
-
782  * \param type The target backend code block type
-
783  * \return The generated target backend code
-
784  */
-
785  std::string process_shadow_update_statement(const ShadowUseStatement& statement,
-
786  BlockType type);
-
787 
-
788 
-
789  /**
-
790  * Determine the variable name for the "current" used in breakpoint block taking into account
-
791  * intermediate code transformations.
-
792  * \param current The variable name for the current used in the model
-
793  * \return The name for the current to be printed in C++
-
794  */
-
795  std::string breakpoint_current(std::string current) const;
-
796 
-
797 
-
798  /**
-
799  * Print pragma annotations for channel iterations
-
800  *
-
801  * This can be overriden by backends to provide additonal annotations or pragmas to enable
-
802  * for example SIMD code generation (e.g. through \c ivdep)
-
803  * The default implementation prints
-
804  *
-
805  * \code
-
806  * #pragma ivdep
-
807  * \endcode
-
808  *
-
809  * \param type The block type
-
810  */
-
811  virtual void print_parallel_iteration_hint(BlockType type, const ast::Block* block);
-
812 
+
781  * \param type The block type
+
782  */
+
783  virtual void print_parallel_iteration_hint(BlockType type, const ast::Block* block);
+
784 
+
785 
+
786  /****************************************************************************************/
+
787  /* Backend specific routines */
+
788  /****************************************************************************************/
+
789 
+
790 
+
791  /**
+
792  * Print atomic update pragma for reduction statements
+
793  */
+
794  virtual void print_atomic_reduction_pragma() = 0;
+
795 
+
796 
+
797  /**
+
798  * Instantiate global var instance
+
799  *
+
800  * For C++ code generation this is empty
+
801  * \return ""
+
802  */
+
803  virtual void print_global_var_struct_decl();
+
804 
+
805  /**
+
806  * Check if ion variable copies should be avoided
+
807  */
+
808  virtual bool optimize_ion_variable_copies() const = 0;
+
809 
+
810  /****************************************************************************************/
+
811  /* Printing routines for code generation */
+
812  /****************************************************************************************/
813 
-
814  /****************************************************************************************/
-
815  /* Backend specific routines */
-
816  /****************************************************************************************/
-
817 
-
818 
-
819  /**
-
820  * Print atomic update pragma for reduction statements
-
821  */
-
822  virtual void print_atomic_reduction_pragma() = 0;
-
823 
-
824 
-
825  /**
-
826  * Instantiate global var instance
-
827  *
-
828  * For C++ code generation this is empty
-
829  * \return ""
-
830  */
-
831  virtual void print_global_var_struct_decl();
-
832 
-
833  /**
-
834  * Check if ion variable copies should be avoided
-
835  */
-
836  virtual bool optimize_ion_variable_copies() const = 0;
-
837 
-
838  /****************************************************************************************/
-
839  /* Printing routines for code generation */
-
840  /****************************************************************************************/
-
841 
-
842 
-
843  /**
-
844  * Print any statement block in nmodl with option to (not) print braces
-
845  *
-
846  * The individual statements (of type nmodl::ast::Statement) in the StatementBlock are printed
-
847  * by accepting \c this visistor.
-
848  *
-
849  * \param node A (possibly empty) statement block AST node
-
850  * \param open_brace Print an opening brace if \c false
-
851  * \param close_brace Print a closing brace if \c true
-
852  */
- -
854  bool open_brace = true,
-
855  bool close_brace = true);
-
856 
-
857 
-
858  /**
-
859  * Print call to internal or external function
-
860  * \param node The AST node representing a function call
-
861  */
-
862  virtual void print_function_call(const ast::FunctionCall& node);
-
863 
-
864  /**
-
865  * Print call to \c net\_send
-
866  * \param node The AST node representing the function call
+
814 
+
815  /**
+
816  * Print any statement block in nmodl with option to (not) print braces
+
817  *
+
818  * The individual statements (of type nmodl::ast::Statement) in the StatementBlock are printed
+
819  * by accepting \c this visistor.
+
820  *
+
821  * \param node A (possibly empty) statement block AST node
+
822  * \param open_brace Print an opening brace if \c false
+
823  * \param close_brace Print a closing brace if \c true
+
824  */
+ +
826  bool open_brace = true,
+
827  bool close_brace = true);
+
828 
+
829 
+
830  /**
+
831  * Print call to internal or external function
+
832  * \param node The AST node representing a function call
+
833  */
+
834  virtual void print_function_call(const ast::FunctionCall& node);
+
835 
+
836  /**
+
837  * Print call to \c net\_send
+
838  * \param node The AST node representing the function call
+
839  */
+
840  virtual void print_net_send_call(const ast::FunctionCall& node) = 0;
+
841 
+
842  /**
+
843  * Print \c nrn\_pointing.
+
844  */
+
845  virtual void print_nrn_pointing(const ast::FunctionCall& node);
+
846 
+
847 
+
848  /**
+
849  * Print call to net\_move
+
850  * \param node The AST node representing the function call
+
851  */
+
852  virtual void print_net_move_call(const ast::FunctionCall& node) = 0;
+
853 
+
854 
+
855  /**
+
856  * Print call to net\_event
+
857  * \param node The AST node representing the function call
+
858  */
+
859  virtual void print_net_event_call(const ast::FunctionCall& node) = 0;
+
860 
+
861  /** Print special code when calling FUNCTION_TABLEs.
+
862  */
+
863  virtual void print_function_table_call(const ast::FunctionCall& node) = 0;
+
864 
+
865  /**
+
866  * Print function and procedures prototype declaration
867  */
-
868  virtual void print_net_send_call(const ast::FunctionCall& node) = 0;
-
869 
-
870  /**
-
871  * Print \c nrn\_pointing.
-
872  */
-
873  virtual void print_nrn_pointing(const ast::FunctionCall& node);
-
874 
-
875 
-
876  /**
-
877  * Print call to net\_move
-
878  * \param node The AST node representing the function call
-
879  */
-
880  virtual void print_net_move_call(const ast::FunctionCall& node) = 0;
+
868  virtual void print_function_prototypes() = 0;
+
869 
+
870 
+
871  /**
+
872  * Print nmodl function or procedure (common code)
+
873  * \param node the AST node representing the function or procedure in NMODL
+
874  * \param name the name of the function or procedure
+
875  * \param specifiers the set of C++ specifiers to apply to the function signature
+
876  */
+
877  virtual void print_function_or_procedure(
+
878  const ast::Block& node,
+
879  const std::string& name,
+
880  const std::unordered_set<CppObjectSpecifier>& specifiers) = 0;
881 
882 
883  /**
-
884  * Print call to net\_event
-
885  * \param node The AST node representing the function call
+
884  * Common helper function to help printing function or procedure blocks
+
885  * \param node the AST node representing the function or procedure in NMODL
886  */
-
887  virtual void print_net_event_call(const ast::FunctionCall& node) = 0;
-
888 
-
889  /** Print special code when calling FUNCTION_TABLEs.
-
890  */
-
891  virtual void print_function_table_call(const ast::FunctionCall& node) = 0;
-
892 
-
893  /**
-
894  * Print function and procedures prototype declaration
-
895  */
-
896  virtual void print_function_prototypes() = 0;
-
897 
-
898 
-
899  /**
-
900  * Print nmodl function or procedure (common code)
-
901  * \param node the AST node representing the function or procedure in NMODL
-
902  * \param name the name of the function or procedure
-
903  * \param specifiers the set of C++ specifiers to apply to the function signature
-
904  */
-
905  virtual void print_function_or_procedure(
-
906  const ast::Block& node,
-
907  const std::string& name,
-
908  const std::unordered_set<CppObjectSpecifier>& specifiers) = 0;
-
909 
-
910 
-
911  /**
-
912  * Common helper function to help printing function or procedure blocks
-
913  * \param node the AST node representing the function or procedure in NMODL
+
887  virtual void print_function_procedure_helper(const ast::Block& node) = 0;
+
888 
+
889 
+
890  /**
+
891  * Print NMODL procedure in target backend code
+
892  * \param node
+
893  */
+
894  void print_procedure(const ast::ProcedureBlock& node);
+
895 
+
896 
+
897  /**
+
898  * Print NMODL function in target backend code
+
899  * \param node
+
900  */
+
901  void print_function(const ast::FunctionBlock& node);
+
902 
+
903  /**
+
904  * Print the internal function for FUNCTION_TABLES.
+
905  *
+
906  * Here internal refers to the function called from BREAKPOINT, INITIAL and
+
907  * other FUNCTIONs. Therefore this function doesn't print the functions required
+
908  * to call function tables from HOC/Python.
+
909  */
+ +
911 
+
912  /**
+
913  * Parameters of the function itself `"{}"` and `"table_{}"`.
914  */
-
915  virtual void print_function_procedure_helper(const ast::Block& node) = 0;
-
916 
+
915  virtual std::pair<ParamVector, ParamVector> function_table_parameters(
+
916  const ast::FunctionTableBlock& node) = 0;
917 
918  /**
-
919  * Print NMODL procedure in target backend code
-
920  * \param node
-
921  */
-
922  void print_procedure(const ast::ProcedureBlock& node);
-
923 
-
924 
-
925  /**
-
926  * Print NMODL function in target backend code
-
927  * \param node
+
919  * @brief Checks whether the functor_block generated by sympy solver modifies any variable
+
920  * outside its scope. If it does then return false, so that the operator() of the struct functor
+
921  * of the Eigen Newton solver doesn't have const qualifier.
+
922  *
+
923  * @param variable_block Statement Block of the variables declarations used in the functor
+
924  * struct of the solver
+
925  * @param functor_block Actual code being printed in the operator() of the functor struct of the
+
926  * solver
+
927  * @return True if operator() is const else False
928  */
-
929  void print_function(const ast::FunctionBlock& node);
-
930 
-
931  /**
-
932  * Print the internal function for FUNCTION_TABLES.
-
933  *
-
934  * Here internal refers to the function called from BREAKPOINT, INITIAL and
-
935  * other FUNCTIONs. Therefore this function doesn't print the functions required
-
936  * to call function tables from HOC/Python.
-
937  */
- -
939 
-
940  /**
-
941  * Parameters of the function itself `"{}"` and `"table_{}"`.
-
942  */
-
943  virtual std::pair<ParamVector, ParamVector> function_table_parameters(
-
944  const ast::FunctionTableBlock& node) = 0;
-
945 
-
946  /**
-
947  * @brief Checks whether the functor_block generated by sympy solver modifies any variable
-
948  * outside its scope. If it does then return false, so that the operator() of the struct functor
-
949  * of the Eigen Newton solver doesn't have const qualifier.
-
950  *
-
951  * @param variable_block Statement Block of the variables declarations used in the functor
-
952  * struct of the solver
-
953  * @param functor_block Actual code being printed in the operator() of the functor struct of the
-
954  * solver
-
955  * @return True if operator() is const else False
-
956  */
-
957  bool is_functor_const(const ast::StatementBlock& variable_block,
-
958  const ast::StatementBlock& functor_block);
-
959 
-
960 
-
961  /** The parameters of the Newton solver "functor". */
-
962  virtual ParamVector functor_params() = 0;
-
963 
-
964  /**
-
965  * \brief Based on the \c EigenNewtonSolverBlock passed print the definition needed for its
-
966  * functor
-
967  *
-
968  * \param node \c EigenNewtonSolverBlock for which to print the functor
-
969  */
- -
971 
-
972  /** \brief Print all Newton functor structs. */
- -
974 
-
975  /** Print linear solver using Eigen.
+
929  bool is_functor_const(const ast::StatementBlock& variable_block,
+
930  const ast::StatementBlock& functor_block);
+
931 
+
932 
+
933  /** The parameters of the Newton solver "functor". */
+
934  virtual ParamVector functor_params() = 0;
+
935 
+
936  /**
+
937  * \brief Based on the \c EigenNewtonSolverBlock passed print the definition needed for its
+
938  * functor
+
939  *
+
940  * \param node \c EigenNewtonSolverBlock for which to print the functor
+
941  */
+ +
943 
+
944  /** \brief Print all Newton functor structs. */
+ +
946 
+
947  /** Print linear solver using Eigen.
+
948  */
+
949  void print_eigen_linear_solver(const std::string& float_type, int N);
+
950 
+
951  /**
+
952  * Print the items in a vector as a list
+
953  *
+
954  * This function prints a given vector of elements as a list with given separator onto the
+
955  * current printer. Elements are expected to be of type nmodl::ast::Ast and are printed by being
+
956  * visited. Care is taken to omit the separator after the the last element.
+
957  *
+
958  * \tparam T The element type in the vector, which must be of type nmodl::ast::Ast
+
959  * \param elements The vector of elements to be printed
+
960  * \param separator The separator string to print between all elements
+
961  * \param prefix A prefix string to print before each element
+
962  */
+
963  template <typename T>
+
964  void print_vector_elements(const std::vector<T>& elements,
+
965  const std::string& separator,
+
966  const std::string& prefix = "");
+
967 
+
968  virtual void print_ion_variable() = 0;
+
969 
+
970  /****************************************************************************************/
+
971  /* Code-specific helper routines */
+
972  /****************************************************************************************/
+
973 
+
974  /**
+
975  * Add the variable tqitem during `get_int_variables`.
976  */
-
977  void print_eigen_linear_solver(const std::string& float_type, int N);
+
977  virtual void add_variable_tqitem(std::vector<IndexVariableInfo>& variables) = 0;
978 
979  /**
-
980  * Print the items in a vector as a list
-
981  *
-
982  * This function prints a given vector of elements as a list with given separator onto the
-
983  * current printer. Elements are expected to be of type nmodl::ast::Ast and are printed by being
-
984  * visited. Care is taken to omit the separator after the the last element.
-
985  *
-
986  * \tparam T The element type in the vector, which must be of type nmodl::ast::Ast
-
987  * \param elements The vector of elements to be printed
-
988  * \param separator The separator string to print between all elements
-
989  * \param prefix A prefix string to print before each element
-
990  */
-
991  template <typename T>
-
992  void print_vector_elements(const std::vector<T>& elements,
-
993  const std::string& separator,
-
994  const std::string& prefix = "");
-
995 
-
996  virtual void print_ion_variable() = 0;
-
997 
-
998  /****************************************************************************************/
-
999  /* Code-specific helper routines */
-
1000  /****************************************************************************************/
-
1001 
-
1002  /**
-
1003  * Add the variable tqitem during `get_int_variables`.
-
1004  */
-
1005  virtual void add_variable_tqitem(std::vector<IndexVariableInfo>& variables) = 0;
-
1006 
-
1007  /**
-
1008  * Add the variable point_process during `get_int_variables`.
-
1009  */
-
1010  virtual void add_variable_point_process(std::vector<IndexVariableInfo>& variables) = 0;
-
1011 
-
1012  /**
-
1013  * Arguments for functions that are defined and used internally.
-
1014  * \return the method arguments
-
1015  */
-
1016  virtual std::string internal_method_arguments() = 0;
-
1017 
-
1018 
-
1019  /**
-
1020  * Parameters for internally defined functions
-
1021  * \return the method parameters
-
1022  */
- -
1024 
-
1025 
-
1026  /**
-
1027  * Arguments for external functions called from generated code
-
1028  * \return A string representing the arguments passed to an external function
-
1029  */
-
1030  virtual const std::string external_method_arguments() noexcept = 0;
-
1031 
-
1032 
-
1033  /**
-
1034  * Parameters for functions in generated code that are called back from external code
-
1035  *
-
1036  * Functions registered in NEURON during initialization for callback must adhere to a prescribed
-
1037  * calling convention. This method generates the string representing the function parameters for
-
1038  * these externally called functions.
-
1039  * \param table
-
1040  * \return A string representing the parameters of the function
-
1041  */
-
1042  virtual const ParamVector external_method_parameters(bool table = false) noexcept = 0;
+
980  * Add the variable point_process during `get_int_variables`.
+
981  */
+
982  virtual void add_variable_point_process(std::vector<IndexVariableInfo>& variables) = 0;
+
983 
+
984  /**
+
985  * Arguments for functions that are defined and used internally.
+
986  * \return the method arguments
+
987  */
+
988  virtual std::string internal_method_arguments() = 0;
+
989 
+
990 
+
991  /**
+
992  * Parameters for internally defined functions
+
993  * \return the method parameters
+
994  */
+ +
996 
+
997 
+
998  /**
+
999  * Arguments for external functions called from generated code
+
1000  * \return A string representing the arguments passed to an external function
+
1001  */
+
1002  virtual const std::string external_method_arguments() noexcept = 0;
+
1003 
+
1004 
+
1005  /**
+
1006  * Parameters for functions in generated code that are called back from external code
+
1007  *
+
1008  * Functions registered in NEURON during initialization for callback must adhere to a prescribed
+
1009  * calling convention. This method generates the string representing the function parameters for
+
1010  * these externally called functions.
+
1011  * \param table
+
1012  * \return A string representing the parameters of the function
+
1013  */
+
1014  virtual const ParamVector external_method_parameters(bool table = false) noexcept = 0;
+
1015 
+
1016 
+
1017  /**
+
1018  * Arguments for "_threadargs_" macro in neuron implementation
+
1019  */
+
1020  virtual std::string nrn_thread_arguments() const = 0;
+
1021 
+
1022 
+
1023  /**
+
1024  * Arguments for "_threadargs_" macro in neuron implementation
+
1025  */
+
1026  virtual std::string nrn_thread_internal_arguments() = 0;
+
1027 
+
1028  /**
+
1029  * Arguments for register_mech or point_register_mech function
+
1030  */
+
1031  virtual std::string register_mechanism_arguments() const = 0;
+
1032 
+
1033 
+
1034  /**
+
1035  * Add quotes to string to be output
+
1036  *
+
1037  * \param text The string to be quoted
+
1038  * \return The same string with double-quotes pre- and postfixed
+
1039  */
+
1040  std::string add_escape_quote(const std::string& text) const {
+
1041  return "\"" + text + "\"";
+
1042  }
1043 
1044 
1045  /**
-
1046  * Arguments for "_threadargs_" macro in neuron implementation
-
1047  */
-
1048  virtual std::string nrn_thread_arguments() const = 0;
-
1049 
-
1050 
-
1051  /**
-
1052  * Arguments for "_threadargs_" macro in neuron implementation
-
1053  */
-
1054  virtual std::string nrn_thread_internal_arguments() = 0;
-
1055 
-
1056  /**
-
1057  * Arguments for register_mech or point_register_mech function
+
1046  * Constructs the name of a function or procedure
+
1047  * \param name The name of the function or procedure
+
1048  * \return The name of the function or procedure postfixed with the model name
+
1049  */
+
1050  std::string method_name(const std::string& name) const {
+
1051  return name + "_" + info.mod_suffix;
+
1052  }
+
1053 
+
1054  /**
+
1055  * Check if the given name exist in the symbol
+
1056  * \return \c return a tuple <true, array_length> if variable
+
1057  * is an array otherwise <false, 0>
1058  */
-
1059  virtual std::string register_mechanism_arguments() const = 0;
+
1059  std::tuple<bool, int> check_if_var_is_array(const std::string& name);
1060 
1061 
1062  /**
-
1063  * Add quotes to string to be output
-
1064  *
-
1065  * \param text The string to be quoted
-
1066  * \return The same string with double-quotes pre- and postfixed
-
1067  */
-
1068  std::string add_escape_quote(const std::string& text) const {
-
1069  return "\"" + text + "\"";
-
1070  }
-
1071 
-
1072 
-
1073  /**
-
1074  * Constructs the name of a function or procedure
-
1075  * \param name The name of the function or procedure
-
1076  * \return The name of the function or procedure postfixed with the model name
+
1063  * Creates a temporary symbol
+
1064  * \param name The name of the symbol
+
1065  * \return A symbol based on the given name
+
1066  */
+
1067  SymbolType make_symbol(const std::string& name) const {
+
1068  return std::make_shared<symtab::Symbol>(name, ModToken());
+
1069  }
+
1070 
+
1071  /**
+
1072  * Generate Function call statement for nrn_wrote_conc
+
1073  * \param statements Statements are appended to this vector.
+
1074  * \param ion The ion variable.
+
1075  * \param concentration The name of the concentration variable
+
1076  * \return The string representing the function call
1077  */
-
1078  std::string method_name(const std::string& name) const {
-
1079  return name + "_" + info.mod_suffix;
-
1080  }
-
1081 
-
1082  /**
-
1083  * Check if the given name exist in the symbol
-
1084  * \return \c return a tuple <true, array_length> if variable
-
1085  * is an array otherwise <false, 0>
-
1086  */
-
1087  std::tuple<bool, int> check_if_var_is_array(const std::string& name);
-
1088 
+
1078  virtual void append_conc_write_statements(std::vector<ShadowUseStatement>& statements,
+
1079  const Ion& ion,
+
1080  const std::string& concentration) = 0;
+
1081 
+
1082  /****************************************************************************************/
+
1083  /* Code-specific printing routines for code generations */
+
1084  /****************************************************************************************/
+
1085 
+
1086  /** Name of "our" namespace.
+
1087  */
+
1088  virtual std::string namespace_name() = 0;
1089 
1090  /**
-
1091  * Creates a temporary symbol
-
1092  * \param name The name of the symbol
-
1093  * \return A symbol based on the given name
-
1094  */
-
1095  SymbolType make_symbol(const std::string& name) const {
-
1096  return std::make_shared<symtab::Symbol>(name, ModToken());
-
1097  }
-
1098 
-
1099  /**
-
1100  * Generate Function call statement for nrn_wrote_conc
-
1101  * \param statements Statements are appended to this vector.
-
1102  * \param ion The ion variable.
-
1103  * \param concentration The name of the concentration variable
-
1104  * \return The string representing the function call
-
1105  */
-
1106  virtual void append_conc_write_statements(std::vector<ShadowUseStatement>& statements,
-
1107  const Ion& ion,
-
1108  const std::string& concentration) = 0;
-
1109 
-
1110  /****************************************************************************************/
-
1111  /* Code-specific printing routines for code generations */
-
1112  /****************************************************************************************/
-
1113 
-
1114  /** Name of "our" namespace.
-
1115  */
-
1116  virtual std::string namespace_name() = 0;
+
1091  * Prints the start of the simulator namespace
+
1092  */
+
1093  void print_namespace_start();
+
1094 
+
1095 
+
1096  /**
+
1097  * Prints the end of the simulator namespace
+
1098  */
+
1099  void print_namespace_stop();
+
1100 
+
1101  /**
+
1102  * Prints f"using namespace {namespace_name()}".
+
1103  */
+
1104  void print_using_namespace();
+
1105 
+
1106  /****************************************************************************************/
+
1107  /* Routines for returning variable name */
+
1108  /****************************************************************************************/
+
1109 
+
1110  /**
+
1111  * Determine the updated name if the ion variable has been optimized
+
1112  * \param name The ion variable name
+
1113  * \return The updated name of the variable has been optimized (e.g. \c ena --> \c ion_ena)
+
1114  */
+
1115  std::string update_if_ion_variable_name(const std::string& name) const;
+
1116 
1117 
1118  /**
-
1119  * Prints the start of the simulator namespace
-
1120  */
-
1121  void print_namespace_start();
-
1122 
-
1123 
-
1124  /**
-
1125  * Prints the end of the simulator namespace
-
1126  */
-
1127  void print_namespace_stop();
-
1128 
-
1129  /**
-
1130  * Prints f"using namespace {namespace_name()}".
-
1131  */
-
1132  void print_using_namespace();
-
1133 
-
1134  /****************************************************************************************/
-
1135  /* Routines for returning variable name */
-
1136  /****************************************************************************************/
-
1137 
-
1138  /**
-
1139  * Determine the updated name if the ion variable has been optimized
-
1140  * \param name The ion variable name
-
1141  * \return The updated name of the variable has been optimized (e.g. \c ena --> \c ion_ena)
-
1142  */
-
1143  std::string update_if_ion_variable_name(const std::string& name) const;
-
1144 
-
1145 
-
1146  /**
-
1147  * Determine the name of a \c float variable given its symbol
-
1148  *
-
1149  * This function typically returns the accessor expression in backend code for the given symbol.
-
1150  * Since the model variables are stored in data arrays and accessed by offset, this function
-
1151  * will return the C++ string representing the array access at the correct offset
-
1152  *
-
1153  * \param symbol The symbol of a variable for which we want to obtain its name
-
1154  * \param use_instance Should the variable be accessed via instance or data array
-
1155  * \return The backend code string representing the access to the given variable
-
1156  * symbol
+
1119  * Determine the name of a \c float variable given its symbol
+
1120  *
+
1121  * This function typically returns the accessor expression in backend code for the given symbol.
+
1122  * Since the model variables are stored in data arrays and accessed by offset, this function
+
1123  * will return the C++ string representing the array access at the correct offset
+
1124  *
+
1125  * \param symbol The symbol of a variable for which we want to obtain its name
+
1126  * \param use_instance Should the variable be accessed via instance or data array
+
1127  * \return The backend code string representing the access to the given variable
+
1128  * symbol
+
1129  */
+
1130  virtual std::string float_variable_name(const SymbolType& symbol, bool use_instance) const = 0;
+
1131 
+
1132 
+
1133  /**
+
1134  * Determine the name of an \c int variable given its symbol
+
1135  *
+
1136  * This function typically returns the accessor expression in backend code for the given symbol.
+
1137  * Since the model variables are stored in data arrays and accessed by offset, this function
+
1138  * will return the C++ string representing the array access at the correct offset
+
1139  *
+
1140  * \param symbol The symbol of a variable for which we want to obtain its name
+
1141  * \param name The name of the index variable
+
1142  * \param use_instance Should the variable be accessed via instance or data array
+
1143  * \return The backend code string representing the access to the given variable
+
1144  * symbol
+
1145  */
+
1146  virtual std::string int_variable_name(const IndexVariableInfo& symbol,
+
1147  const std::string& name,
+
1148  bool use_instance) const = 0;
+
1149 
+
1150 
+
1151  /**
+
1152  * Determine the variable name for a global variable given its symbol
+
1153  * \param symbol The symbol of a variable for which we want to obtain its name
+
1154  * \param use_instance Should the variable be accessed via the (host-only)
+
1155  * global variable or the instance-specific copy (also available on GPU).
+
1156  * \return The C++ string representing the access to the global variable
1157  */
-
1158  virtual std::string float_variable_name(const SymbolType& symbol, bool use_instance) const = 0;
-
1159 
-
1160 
-
1161  /**
-
1162  * Determine the name of an \c int variable given its symbol
-
1163  *
-
1164  * This function typically returns the accessor expression in backend code for the given symbol.
-
1165  * Since the model variables are stored in data arrays and accessed by offset, this function
-
1166  * will return the C++ string representing the array access at the correct offset
-
1167  *
-
1168  * \param symbol The symbol of a variable for which we want to obtain its name
-
1169  * \param name The name of the index variable
-
1170  * \param use_instance Should the variable be accessed via instance or data array
-
1171  * \return The backend code string representing the access to the given variable
-
1172  * symbol
-
1173  */
-
1174  virtual std::string int_variable_name(const IndexVariableInfo& symbol,
-
1175  const std::string& name,
-
1176  bool use_instance) const = 0;
-
1177 
-
1178 
-
1179  /**
-
1180  * Determine the variable name for a global variable given its symbol
-
1181  * \param symbol The symbol of a variable for which we want to obtain its name
-
1182  * \param use_instance Should the variable be accessed via the (host-only)
-
1183  * global variable or the instance-specific copy (also available on GPU).
-
1184  * \return The C++ string representing the access to the global variable
-
1185  */
-
1186  virtual std::string global_variable_name(const SymbolType& symbol,
-
1187  bool use_instance = true) const = 0;
-
1188 
-
1189 
-
1190  /**
-
1191  * Determine variable name in the structure of mechanism properties
-
1192  *
-
1193  * \param name Variable name that is being printed
-
1194  * \param use_instance Should the variable be accessed via instance or data array
-
1195  * \return The C++ string representing the access to the variable in the neuron
-
1196  * thread structure
-
1197  */
-
1198  virtual std::string get_variable_name(const std::string& name,
-
1199  bool use_instance = true) const = 0;
-
1200 
-
1201  /**
-
1202  * The name of the function that updates the table value if the parameters
-
1203  * changed.
-
1204  *
-
1205  * \param block_name The name of the block that contains the TABLE.
-
1206  */
-
1207  std::string table_update_function_name(const std::string& block_name) const;
-
1208 
-
1209  /**
-
1210  * Return ion variable name and corresponding ion read variable name.
-
1211  *
-
1212  * Example:
-
1213  * {"ena", "ion_ena"} = read_ion_variable_name("ena");
-
1214  *
-
1215  * \param name The ion variable name
-
1216  * \return The ion read variable name
-
1217  */
-
1218  static std::pair<std::string, std::string> read_ion_variable_name(const std::string& name);
-
1219 
-
1220 
-
1221  /**
-
1222  * Return ion variable name and corresponding ion write variable name
-
1223  *
-
1224  * Example:
-
1225  * {"ion_ena", "ena"} = write_ion_variable_name("ena");
-
1226  *
-
1227  * \param name The ion variable name
-
1228  * \return The ion write variable name
-
1229  */
-
1230  static std::pair<std::string, std::string> write_ion_variable_name(const std::string& name);
-
1231 
-
1232 
-
1233  int get_int_variable_index(const std::string& var_name);
+
1158  virtual std::string global_variable_name(const SymbolType& symbol,
+
1159  bool use_instance = true) const = 0;
+
1160 
+
1161 
+
1162  /**
+
1163  * Determine variable name in the structure of mechanism properties
+
1164  *
+
1165  * \param name Variable name that is being printed
+
1166  * \param use_instance Should the variable be accessed via instance or data array
+
1167  * \return The C++ string representing the access to the variable in the neuron
+
1168  * thread structure
+
1169  */
+
1170  virtual std::string get_variable_name(const std::string& name,
+
1171  bool use_instance = true) const = 0;
+
1172 
+
1173  /**
+
1174  * The name of the function that updates the table value if the parameters
+
1175  * changed.
+
1176  *
+
1177  * \param block_name The name of the block that contains the TABLE.
+
1178  */
+
1179  std::string table_update_function_name(const std::string& block_name) const;
+
1180 
+
1181  /**
+
1182  * Return ion variable name and corresponding ion read variable name.
+
1183  *
+
1184  * Example:
+
1185  * {"ena", "ion_ena"} = read_ion_variable_name("ena");
+
1186  *
+
1187  * \param name The ion variable name
+
1188  * \return The ion read variable name
+
1189  */
+
1190  static std::pair<std::string, std::string> read_ion_variable_name(const std::string& name);
+
1191 
+
1192 
+
1193  /**
+
1194  * Return ion variable name and corresponding ion write variable name
+
1195  *
+
1196  * Example:
+
1197  * {"ion_ena", "ena"} = write_ion_variable_name("ena");
+
1198  *
+
1199  * \param name The ion variable name
+
1200  * \return The ion write variable name
+
1201  */
+
1202  static std::pair<std::string, std::string> write_ion_variable_name(const std::string& name);
+
1203 
+
1204 
+
1205  int get_int_variable_index(const std::string& var_name);
+
1206 
+
1207  /****************************************************************************************/
+
1208  /* Main printing routines for code generation */
+
1209  /****************************************************************************************/
+
1210 
+
1211 
+
1212  /**
+
1213  * Print top file header printed in generated code
+
1214  */
+
1215  void print_backend_info();
+
1216 
+
1217 
+
1218  /**
+
1219  * Print standard C/C++ includes
+
1220  */
+
1221  virtual void print_standard_includes() = 0;
+
1222 
+
1223 
+
1224  virtual void print_sdlists_init(bool print_initializers) = 0;
+
1225 
+
1226 
+
1227  /**
+
1228  * Print the structure that wraps all global variables used in the NMODL
+
1229  *
+
1230  * \param print_initializers Whether to include default values in the struct
+
1231  * definition (true: int foo{42}; false: int foo;)
+
1232  */
+
1233  virtual void print_mechanism_global_var_structure(bool print_initializers) = 0;
1234 
-
1235  /****************************************************************************************/
-
1236  /* Main printing routines for code generation */
-
1237  /****************************************************************************************/
-
1238 
-
1239 
-
1240  /**
-
1241  * Print top file header printed in generated code
-
1242  */
-
1243  void print_backend_info();
-
1244 
-
1245 
-
1246  /**
-
1247  * Print standard C/C++ includes
-
1248  */
-
1249  virtual void print_standard_includes() = 0;
-
1250 
-
1251 
-
1252  virtual void print_sdlists_init(bool print_initializers) = 0;
-
1253 
-
1254 
-
1255  /**
-
1256  * Print the structure that wraps all global variables used in the NMODL
-
1257  *
-
1258  * \param print_initializers Whether to include default values in the struct
-
1259  * definition (true: int foo{42}; false: int foo;)
-
1260  */
-
1261  virtual void print_mechanism_global_var_structure(bool print_initializers) = 0;
-
1262 
-
1263 
-
1264  /**
-
1265  * Print static assertions about the global variable struct.
+
1235 
+
1236  /**
+
1237  * Print static assertions about the global variable struct.
+
1238  */
+
1239  virtual void print_global_var_struct_assertions() const;
+
1240 
+
1241 
+
1242  /**
+
1243  * Print the entries of for FUNCTION_TABLEs in the global struct.
+
1244  *
+
1245  * And creates the required GLOBAL variables.
+
1246  */
+ +
1248 
+
1249 
+
1250  /**
+
1251  * Print declaration of macro NRN_PRCELLSTATE for debugging
+
1252  */
+
1253  void print_prcellstate_macros() const;
+
1254 
+
1255 
+
1256  /**
+
1257  * Print backend code for byte array that has mechanism information (to be registered
+
1258  * with NEURON/CoreNEURON)
+
1259  */
+
1260  void print_mechanism_info();
+
1261 
+
1262 
+
1263  /**
+
1264  * Print byte arrays that register scalar and vector variables for hoc interface
+
1265  *
1266  */
-
1267  virtual void print_global_var_struct_assertions() const;
+
1267  virtual void print_global_variables_for_hoc() = 0;
1268 
1269 
1270  /**
-
1271  * Print the entries of for FUNCTION_TABLEs in the global struct.
+
1271  * Print the mechanism registration function
1272  *
-
1273  * And creates the required GLOBAL variables.
-
1274  */
- -
1276 
-
1277 
-
1278  /**
-
1279  * Print declaration of macro NRN_PRCELLSTATE for debugging
+
1273  */
+
1274  virtual void print_mechanism_register() = 0;
+
1275 
+
1276 
+
1277  /**
+
1278  * Print common code for global functions like nrn_init, nrn_cur and nrn_state
+
1279  * \param type The target backend code block type
1280  */
-
1281  void print_prcellstate_macros() const;
-
1282 
-
1283 
-
1284  /**
-
1285  * Print backend code for byte array that has mechanism information (to be registered
-
1286  * with NEURON/CoreNEURON)
-
1287  */
-
1288  void print_mechanism_info();
-
1289 
-
1290 
-
1291  /**
-
1292  * Print byte arrays that register scalar and vector variables for hoc interface
-
1293  *
-
1294  */
-
1295  virtual void print_global_variables_for_hoc() = 0;
-
1296 
-
1297 
-
1298  /**
-
1299  * Print the mechanism registration function
-
1300  *
-
1301  */
-
1302  virtual void print_mechanism_register() = 0;
-
1303 
-
1304 
-
1305  /**
-
1306  * Print common code for global functions like nrn_init, nrn_cur and nrn_state
-
1307  * \param type The target backend code block type
-
1308  */
-
1309  virtual void print_global_function_common_code(BlockType type,
-
1310  const std::string& function_name = "") = 0;
-
1311 
-
1312 
-
1313  /**
-
1314  * Print nrn_constructor function definition
-
1315  *
-
1316  */
-
1317  virtual void print_nrn_constructor() = 0;
-
1318 
-
1319 
-
1320  /**
-
1321  * Print nrn_destructor function definition
-
1322  *
-
1323  */
-
1324  virtual void print_nrn_destructor() = 0;
-
1325 
-
1326 
-
1327  /**
-
1328  * Print nrn_alloc function definition
-
1329  *
-
1330  */
-
1331  virtual void print_nrn_alloc() = 0;
-
1332 
-
1333 
-
1334  /****************************************************************************************/
-
1335  /* Print nrn_state routine */
-
1336  /****************************************************************************************/
-
1337 
-
1338 
-
1339  /**
-
1340  * Print nrn_state / state update function definition
-
1341  */
-
1342  virtual void print_nrn_state() = 0;
-
1343 
-
1344 
-
1345  /****************************************************************************************/
-
1346  /* Print nrn_cur related routines */
-
1347  /****************************************************************************************/
-
1348 
-
1349 
-
1350  /**
-
1351  * Print the \c nrn_current kernel
-
1352  *
-
1353  * \note nrn_cur_kernel will have two calls to nrn_current if no conductance keywords specified
-
1354  * \param node the AST node representing the NMODL breakpoint block
-
1355  */
-
1356  virtual void print_nrn_current(const ast::BreakpointBlock& node) = 0;
-
1357 
-
1358 
-
1359  /**
-
1360  * Print the \c nrn\_cur kernel with NMODL \c conductance keyword provisions
-
1361  *
-
1362  * If the NMODL \c conductance keyword is used in the \c breakpoint block, then
-
1363  * CodegenCoreneuronCppVisitor::print_nrn_cur_kernel will use this printer
-
1364  *
-
1365  * \param node the AST node representing the NMODL breakpoint block
+
1281  virtual void print_global_function_common_code(BlockType type,
+
1282  const std::string& function_name = "") = 0;
+
1283 
+
1284 
+
1285  /**
+
1286  * Print nrn_constructor function definition
+
1287  *
+
1288  */
+
1289  virtual void print_nrn_constructor() = 0;
+
1290 
+
1291 
+
1292  /**
+
1293  * Print nrn_destructor function definition
+
1294  *
+
1295  */
+
1296  virtual void print_nrn_destructor() = 0;
+
1297 
+
1298 
+
1299  /**
+
1300  * Print nrn_alloc function definition
+
1301  *
+
1302  */
+
1303  virtual void print_nrn_alloc() = 0;
+
1304 
+
1305 
+
1306  /****************************************************************************************/
+
1307  /* Print nrn_state routine */
+
1308  /****************************************************************************************/
+
1309 
+
1310 
+
1311  /**
+
1312  * Print nrn_state / state update function definition
+
1313  */
+
1314  virtual void print_nrn_state() = 0;
+
1315 
+
1316 
+
1317  /****************************************************************************************/
+
1318  /* Print nrn_cur related routines */
+
1319  /****************************************************************************************/
+
1320 
+
1321 
+
1322  /**
+
1323  * Print the \c nrn_current kernel
+
1324  *
+
1325  * \note nrn_cur_kernel will have two calls to nrn_current if no conductance keywords specified
+
1326  * \param node the AST node representing the NMODL breakpoint block
+
1327  */
+
1328  virtual void print_nrn_current(const ast::BreakpointBlock& node) = 0;
+
1329 
+
1330 
+
1331  /**
+
1332  * Print the \c nrn\_cur kernel with NMODL \c conductance keyword provisions
+
1333  *
+
1334  * If the NMODL \c conductance keyword is used in the \c breakpoint block, then
+
1335  * CodegenCoreneuronCppVisitor::print_nrn_cur_kernel will use this printer
+
1336  *
+
1337  * \param node the AST node representing the NMODL breakpoint block
+
1338  */
+
1339  virtual void print_nrn_cur_conductance_kernel(const ast::BreakpointBlock& node) = 0;
+
1340 
+
1341 
+
1342  /**
+
1343  * Print the \c nrn\_cur kernel without NMODL \c conductance keyword provisions
+
1344  *
+
1345  * If the NMODL \c conductance keyword is \b not used in the \c breakpoint block, then
+
1346  * CodegenCoreneuronCppVisitor::print_nrn_cur_kernel will use this printer
+
1347  */
+
1348  virtual void print_nrn_cur_non_conductance_kernel() = 0;
+
1349 
+
1350 
+
1351  /**
+
1352  * Print main body of nrn_cur function
+
1353  * \param node the AST node representing the NMODL breakpoint block
+
1354  */
+
1355  virtual void print_nrn_cur_kernel(const ast::BreakpointBlock& node) = 0;
+
1356 
+
1357 
+
1358  /**
+
1359  * Print fast membrane current calculation code
+
1360  */
+
1361  virtual void print_fast_imem_calculation() = 0;
+
1362 
+
1363 
+
1364  /**
+
1365  * Print nrn_cur / current update function definition
1366  */
-
1367  virtual void print_nrn_cur_conductance_kernel(const ast::BreakpointBlock& node) = 0;
+
1367  virtual void print_nrn_cur() = 0;
1368 
-
1369 
-
1370  /**
-
1371  * Print the \c nrn\_cur kernel without NMODL \c conductance keyword provisions
-
1372  *
-
1373  * If the NMODL \c conductance keyword is \b not used in the \c breakpoint block, then
-
1374  * CodegenCoreneuronCppVisitor::print_nrn_cur_kernel will use this printer
-
1375  */
-
1376  virtual void print_nrn_cur_non_conductance_kernel() = 0;
-
1377 
-
1378 
-
1379  /**
-
1380  * Print main body of nrn_cur function
-
1381  * \param node the AST node representing the NMODL breakpoint block
-
1382  */
-
1383  virtual void print_nrn_cur_kernel(const ast::BreakpointBlock& node) = 0;
-
1384 
-
1385 
-
1386  /**
-
1387  * Print fast membrane current calculation code
-
1388  */
-
1389  virtual void print_fast_imem_calculation() = 0;
-
1390 
-
1391 
-
1392  /**
-
1393  * Print nrn_cur / current update function definition
-
1394  */
-
1395  virtual void print_nrn_cur() = 0;
-
1396 
-
1397 
-
1398  /****************************************************************************************/
-
1399  /* Main code printing entry points */
-
1400  /****************************************************************************************/
-
1401 
-
1402 
-
1403  /**
-
1404  * Print all includes
-
1405  *
-
1406  */
-
1407  virtual void print_headers_include() = 0;
-
1408 
-
1409 
-
1410  /**
-
1411  * Print all classes
-
1412  * \param print_initializers Whether to include default values.
-
1413  */
-
1414  virtual void print_data_structures(bool print_initializers) = 0;
-
1415 
-
1416 
-
1417  /**
-
1418  * Set v_unused (voltage) for NRN_PRCELLSTATE feature
-
1419  */
-
1420  virtual void print_v_unused() const = 0;
-
1421 
-
1422 
-
1423  /**
-
1424  * Set g_unused (conductance) for NRN_PRCELLSTATE feature
-
1425  */
-
1426  virtual void print_g_unused() const = 0;
-
1427 
-
1428 
-
1429  /**
-
1430  * Print all compute functions for every backend
-
1431  *
-
1432  */
-
1433  virtual void print_compute_functions() = 0;
-
1434 
-
1435 
-
1436  /**
-
1437  * Print entry point to code generation
-
1438  *
+
1369 
+
1370  /****************************************************************************************/
+
1371  /* Main code printing entry points */
+
1372  /****************************************************************************************/
+
1373 
+
1374 
+
1375  /**
+
1376  * Print all includes
+
1377  *
+
1378  */
+
1379  virtual void print_headers_include() = 0;
+
1380 
+
1381 
+
1382  /**
+
1383  * Print all classes
+
1384  * \param print_initializers Whether to include default values.
+
1385  */
+
1386  virtual void print_data_structures(bool print_initializers) = 0;
+
1387 
+
1388 
+
1389  /**
+
1390  * Set v_unused (voltage) for NRN_PRCELLSTATE feature
+
1391  */
+
1392  virtual void print_v_unused() const = 0;
+
1393 
+
1394 
+
1395  /**
+
1396  * Set g_unused (conductance) for NRN_PRCELLSTATE feature
+
1397  */
+
1398  virtual void print_g_unused() const = 0;
+
1399 
+
1400 
+
1401  /**
+
1402  * Print all compute functions for every backend
+
1403  *
+
1404  */
+
1405  virtual void print_compute_functions() = 0;
+
1406 
+
1407 
+
1408  /**
+
1409  * Print entry point to code generation
+
1410  *
+
1411  */
+
1412  virtual void print_codegen_routines() = 0;
+
1413 
+
1414  std::unordered_map<CppObjectSpecifier, std::string> object_specifier_map = {
+
1415  {CppObjectSpecifier::Inline, "inline"},
+
1416  {CppObjectSpecifier::Static, "static"},
+
1417  {CppObjectSpecifier::Constexpr, "constexpr"},
+
1418  {CppObjectSpecifier::Volatile, "volatile"},
+
1419  {CppObjectSpecifier::Virtual, "virtual"},
+
1420  {CppObjectSpecifier::Explicit, "explicit"},
+
1421  {CppObjectSpecifier::Friend, "friend"},
+
1422  {CppObjectSpecifier::Extern, "extern"},
+
1423  {CppObjectSpecifier::ExternC, "extern \"C\""},
+
1424  {CppObjectSpecifier::ThreadLocal, "thread_local"},
+
1425  {CppObjectSpecifier::Const, "const"}};
+
1426 
+
1427 
+
1428  /**
+
1429  * Print the nmodl constants used in backend code
+
1430  *
+
1431  * Currently we define three basic constants, which are assumed to be present in NMODL, directly
+
1432  * in the backend code:
+
1433  *
+
1434  * \code
+
1435  * static const double FARADAY = 96485.3;
+
1436  * static const double PI = 3.14159;
+
1437  * static const double R = 8.3145;
+
1438  * \endcode
1439  */
-
1440  virtual void print_codegen_routines() = 0;
-
1441 
-
1442  std::unordered_map<CppObjectSpecifier, std::string> object_specifier_map = {
-
1443  {CppObjectSpecifier::Inline, "inline"},
-
1444  {CppObjectSpecifier::Static, "static"},
-
1445  {CppObjectSpecifier::Constexpr, "constexpr"},
-
1446  {CppObjectSpecifier::Volatile, "volatile"},
-
1447  {CppObjectSpecifier::Virtual, "virtual"},
-
1448  {CppObjectSpecifier::Explicit, "explicit"},
-
1449  {CppObjectSpecifier::Friend, "friend"},
-
1450  {CppObjectSpecifier::Extern, "extern"},
-
1451  {CppObjectSpecifier::ExternC, "extern \"C\""},
-
1452  {CppObjectSpecifier::ThreadLocal, "thread_local"},
-
1453  {CppObjectSpecifier::Const, "const"}};
-
1454 
-
1455 
-
1456  /**
-
1457  * Print the nmodl constants used in backend code
-
1458  *
-
1459  * Currently we define three basic constants, which are assumed to be present in NMODL, directly
-
1460  * in the backend code:
-
1461  *
-
1462  * \code
-
1463  * static const double FARADAY = 96485.3;
-
1464  * static const double PI = 3.14159;
-
1465  * static const double R = 8.3145;
-
1466  * \endcode
-
1467  */
-
1468  void print_nmodl_constants();
-
1469 
-
1470  /**
-
1471  * Print top level (global scope) verbatim blocks
-
1472  */
- -
1474 
-
1475 
-
1476  /****************************************************************************************/
-
1477  /* Overloaded visitor routines */
-
1478  /****************************************************************************************/
-
1479  void visit_binary_expression(const ast::BinaryExpression& node) override;
-
1480  void visit_binary_operator(const ast::BinaryOperator& node) override;
-
1481  void visit_boolean(const ast::Boolean& node) override;
-
1482  void visit_double(const ast::Double& node) override;
-
1483  void visit_else_if_statement(const ast::ElseIfStatement& node) override;
-
1484  void visit_else_statement(const ast::ElseStatement& node) override;
-
1485  void visit_float(const ast::Float& node) override;
-
1486  void visit_from_statement(const ast::FromStatement& node) override;
-
1487  void visit_function_call(const ast::FunctionCall& node) override;
-
1488  void visit_if_statement(const ast::IfStatement& node) override;
-
1489  void visit_indexed_name(const ast::IndexedName& node) override;
-
1490  void visit_integer(const ast::Integer& node) override;
-
1491  void visit_local_list_statement(const ast::LocalListStatement& node) override;
-
1492  void visit_name(const ast::Name& node) override;
-
1493  void visit_paren_expression(const ast::ParenExpression& node) override;
-
1494  void visit_prime_name(const ast::PrimeName& node) override;
-
1495  void visit_statement_block(const ast::StatementBlock& node) override;
-
1496  void visit_string(const ast::String& node) override;
-
1497  void visit_unary_operator(const ast::UnaryOperator& node) override;
-
1498  void visit_unit(const ast::Unit& node) override;
-
1499  void visit_var_name(const ast::VarName& node) override;
-
1500  void visit_while_statement(const ast::WhileStatement& node) override;
-
1501  void visit_update_dt(const ast::UpdateDt& node) override;
-
1502  void visit_protect_statement(const ast::ProtectStatement& node) override;
-
1503  void visit_mutex_lock(const ast::MutexLock& node) override;
-
1504  void visit_mutex_unlock(const ast::MutexUnlock& node) override;
-
1505  void visit_solution_expression(const ast::SolutionExpression& node) override;
- - -
1508 
-
1509  std::string compute_method_name(BlockType type) const;
-
1510 
-
1511  public:
-
1512  /** Setup the target backend code generator
-
1513  *
-
1514  * Typically called from within \c visit\_program but may be called from
-
1515  * specialized targets to setup this Code generator as fallback.
+
1440  void print_nmodl_constants();
+
1441 
+
1442  /**
+
1443  * Print top level (global scope) verbatim blocks
+
1444  */
+ +
1446 
+
1447 
+
1448  /****************************************************************************************/
+
1449  /* Overloaded visitor routines */
+
1450  /****************************************************************************************/
+
1451  void visit_binary_expression(const ast::BinaryExpression& node) override;
+
1452  void visit_binary_operator(const ast::BinaryOperator& node) override;
+
1453  void visit_boolean(const ast::Boolean& node) override;
+
1454  void visit_double(const ast::Double& node) override;
+
1455  void visit_else_if_statement(const ast::ElseIfStatement& node) override;
+
1456  void visit_else_statement(const ast::ElseStatement& node) override;
+
1457  void visit_float(const ast::Float& node) override;
+
1458  void visit_from_statement(const ast::FromStatement& node) override;
+
1459  void visit_function_call(const ast::FunctionCall& node) override;
+
1460  void visit_if_statement(const ast::IfStatement& node) override;
+
1461  void visit_indexed_name(const ast::IndexedName& node) override;
+
1462  void visit_integer(const ast::Integer& node) override;
+
1463  void visit_local_list_statement(const ast::LocalListStatement& node) override;
+
1464  void visit_name(const ast::Name& node) override;
+
1465  void visit_paren_expression(const ast::ParenExpression& node) override;
+
1466  void visit_prime_name(const ast::PrimeName& node) override;
+
1467  void visit_statement_block(const ast::StatementBlock& node) override;
+
1468  void visit_string(const ast::String& node) override;
+
1469  void visit_unary_operator(const ast::UnaryOperator& node) override;
+
1470  void visit_unit(const ast::Unit& node) override;
+
1471  void visit_var_name(const ast::VarName& node) override;
+
1472  void visit_while_statement(const ast::WhileStatement& node) override;
+
1473  void visit_update_dt(const ast::UpdateDt& node) override;
+
1474  void visit_protect_statement(const ast::ProtectStatement& node) override;
+
1475  void visit_mutex_lock(const ast::MutexLock& node) override;
+
1476  void visit_mutex_unlock(const ast::MutexUnlock& node) override;
+
1477  void visit_solution_expression(const ast::SolutionExpression& node) override;
+ + +
1480 
+
1481  std::string compute_method_name(BlockType type) const;
+
1482 
+
1483  public:
+
1484  /** Setup the target backend code generator
+
1485  *
+
1486  * Typically called from within \c visit\_program but may be called from
+
1487  * specialized targets to setup this Code generator as fallback.
+
1488  */
+
1489  void setup(const ast::Program& node);
+
1490 
+
1491 
+
1492  /**
+
1493  * Main and only member function to call after creating an instance of this class.
+
1494  * \param program the AST to translate to C++ code
+
1495  */
+
1496  void visit_program(const ast::Program& program) override;
+
1497 
+
1498 
+
1499  /****************************************************************************************/
+
1500  /* Public printing routines for code generation for use in unit tests */
+
1501  /****************************************************************************************/
+
1502 
+
1503 
+
1504  /**
+
1505  * Print the structure that wraps all range and int variables required for the NMODL
+
1506  *
+
1507  * \param print_initializers Whether or not default values for variables
+
1508  * be included in the struct declaration.
+
1509  */
+
1510  virtual void print_mechanism_range_var_structure(bool print_initializers) = 0;
+
1511 
+
1512 
+
1513  /**
+
1514  * Print replacement function for function or procedure using table
+
1515  * \param node The AST node representing a function or procedure block
1516  */
-
1517  void setup(const ast::Program& node);
+
1518 
1519 
1520  /**
-
1521  * Main and only member function to call after creating an instance of this class.
-
1522  * \param program the AST to translate to C++ code
+
1521  * Print \c check\_function() for functions or procedure using table
+
1522  * \param node The AST node representing a function or procedure block
1523  */
-
1524  void visit_program(const ast::Program& program) override;
+
1525 
1526 
-
1527  /****************************************************************************************/
-
1528  /* Public printing routines for code generation for use in unit tests */
-
1529  /****************************************************************************************/
-
1530 
-
1531 
-
1532  /**
-
1533  * Print the structure that wraps all range and int variables required for the NMODL
-
1534  *
-
1535  * \param print_initializers Whether or not default values for variables
-
1536  * be included in the struct declaration.
-
1537  */
-
1538  virtual void print_mechanism_range_var_structure(bool print_initializers) = 0;
-
1539 
-
1540 
-
1541  /**
-
1542  * Print replacement function for function or procedure using table
-
1543  * \param node The AST node representing a function or procedure block
-
1544  */
- -
1546 
-
1547 
-
1548  /**
-
1549  * Print \c check\_function() for functions or procedure using table
-
1550  * \param node The AST node representing a function or procedure block
-
1551  */
- -
1553 
-
1554 
- -
1556 
-
1557  std::string get_object_specifiers(const std::unordered_set<CppObjectSpecifier>&);
-
1558 
-
1559  /**
-
1560  * Print prototype declarations of functions or procedures
-
1561  * \tparam T The AST node type of the node (must be of nmodl::ast::Ast or subclass)
-
1562  * \param node The AST node representing the function or procedure block
-
1563  * \param name A user defined name for the function
-
1564  */
-
1565  template <typename T>
-
1566  void print_function_declaration(const T& node,
-
1567  const std::string& name,
-
1568  const std::unordered_set<CppObjectSpecifier>& =
- -
1570 
-
1571  void print_rename_state_vars() const;
-
1572 };
+ +
1528 
+
1529  std::string get_object_specifiers(const std::unordered_set<CppObjectSpecifier>&);
+
1530 
+
1531  /**
+
1532  * Print prototype declarations of functions or procedures
+
1533  * \tparam T The AST node type of the node (must be of nmodl::ast::Ast or subclass)
+
1534  * \param node The AST node representing the function or procedure block
+
1535  * \param name A user defined name for the function
+
1536  */
+
1537  template <typename T>
+
1538  void print_function_declaration(const T& node,
+
1539  const std::string& name,
+
1540  const std::unordered_set<CppObjectSpecifier>& =
+ +
1542 
+
1543  void print_rename_state_vars() const;
+
1544 };
+
1545 
+
1546 template <typename T>
+
1547 void CodegenCppVisitor::print_vector_elements(const std::vector<T>& elements,
+
1548  const std::string& separator,
+
1549  const std::string& prefix) {
+
1550  for (auto iter = elements.begin(); iter != elements.end(); iter++) {
+
1551  printer->add_text(prefix);
+
1552  (*iter)->accept(*this);
+
1553  if (!separator.empty() && !nmodl::utils::is_last(iter, elements)) {
+
1554  printer->add_text(separator);
+
1555  }
+
1556  }
+
1557 }
+
1558 
+
1559 
+
1560 /**
+
1561  * \details If there is an argument with name (say alpha) same as range variable (say alpha),
+
1562  * we want to avoid it being printed as instance->alpha. And hence we disable variable
+
1563  * name lookup during prototype declaration. Note that the name of procedure can be
+
1564  * different in case of table statement.
+
1565  */
+
1566 template <typename T>
+ +
1568  const T& node,
+
1569  const std::string& name,
+
1570  const std::unordered_set<CppObjectSpecifier>& specifiers) {
+ +
1572  auto type = default_float_data_type();
1573 
-
1574 template <typename T>
-
1575 void CodegenCppVisitor::print_vector_elements(const std::vector<T>& elements,
-
1576  const std::string& separator,
-
1577  const std::string& prefix) {
-
1578  for (auto iter = elements.begin(); iter != elements.end(); iter++) {
-
1579  printer->add_text(prefix);
-
1580  (*iter)->accept(*this);
-
1581  if (!separator.empty() && !nmodl::utils::is_last(iter, elements)) {
-
1582  printer->add_text(separator);
-
1583  }
-
1584  }
-
1585 }
+
1574  // internal and user provided arguments
+
1575  auto internal_params = internal_method_parameters();
+
1576  const auto& params = node.get_parameters();
+
1577  for (const auto& param: params) {
+
1578  internal_params.emplace_back("", type, "", param.get()->get_node_name());
+
1579  }
+
1580 
+
1581  // procedures have "int" return type by default
+
1582  const char* return_type = "int";
+
1583  if (node.is_function_block()) {
+
1584  return_type = default_float_data_type();
+
1585  }
1586 
-
1587 
-
1588 /**
-
1589  * \details If there is an argument with name (say alpha) same as range variable (say alpha),
-
1590  * we want to avoid it being printed as instance->alpha. And hence we disable variable
-
1591  * name lookup during prototype declaration. Note that the name of procedure can be
-
1592  * different in case of table statement.
-
1593  */
-
1594 template <typename T>
- -
1596  const T& node,
-
1597  const std::string& name,
-
1598  const std::unordered_set<CppObjectSpecifier>& specifiers) {
- -
1600  auto type = default_float_data_type();
-
1601 
-
1602  // internal and user provided arguments
-
1603  auto internal_params = internal_method_parameters();
-
1604  const auto& params = node.get_parameters();
-
1605  for (const auto& param: params) {
-
1606  internal_params.emplace_back("", type, "", param.get()->get_node_name());
-
1607  }
-
1608 
-
1609  // procedures have "int" return type by default
-
1610  const char* return_type = "int";
-
1611  if (node.is_function_block()) {
-
1612  return_type = default_float_data_type();
-
1613  }
-
1614 
-
1615  printer->add_indent();
-
1616  printer->fmt_text("{} {} {}({})",
-
1617  get_object_specifiers(specifiers),
-
1618  return_type,
-
1619  method_name(name),
-
1620  get_parameter_str(internal_params));
-
1621 
- -
1623 }
-
1624 
-
1625 /** \} */ // end of codegen_backends
-
1626 
-
1627 } // namespace codegen
-
1628 } // namespace nmodl
+
1587  printer->add_indent();
+
1588  printer->fmt_text("{} {} {}({})",
+
1589  get_object_specifiers(specifiers),
+
1590  return_type,
+
1591  method_name(name),
+
1592  get_parameter_str(internal_params));
+
1593 
+ +
1595 }
+
1596 
+
1597 /** \} */ // end of codegen_backends
+
1598 
+
1599 } // namespace codegen
+
1600 } // namespace nmodl
virtual void print_nrn_constructor()=0
Print nrn_constructor function definition.
@@ -1758,34 +1730,33 @@
static constexpr char DEFAULT_LOCAL_VAR_TYPE[]
default local variable type
void print_eigen_linear_solver(const std::string &float_type, int N)
Print linear solver using Eigen.
const std::shared_ptr< symtab::Symbol > symbol
symbol for the variable
-
codegen::CodegenInfo info
All ast information for code generation.
+
codegen::CodegenInfo info
All ast information for code generation.
virtual void print_atomic_reduction_pragma()=0
Print atomic update pragma for reduction statements.
-
std::string global_struct_instance() const
Name of the (host-only) global instance of global_struct
+
std::string global_struct_instance() const
Name of the (host-only) global instance of global_struct
Represents a double variable.
Definition: double.hpp:53
-
CodegenCppVisitor(std::string mod_filename, const std::string &output_dir, std::string float_type, const bool optimize_ionvar_copies, std::unique_ptr< nmodl::utils::Blame > blame)
Constructs the C++ code generator visitor.
static std::pair< std::string, std::string > write_ion_variable_name(const std::string &name)
Return ion variable name and corresponding ion write variable name.
virtual int position_of_float_var(const std::string &name) const =0
Determine the position in the data array for a given float variable.
-
const char * operator_for_d() const noexcept
Operator for diagonal vector update (matrix update)
-
bool optimize_ionvar_copies
Flag to indicate if visitor should avoid ion variable copies.
+
const char * operator_for_d() const noexcept
Operator for diagonal vector update (matrix update)
+
bool optimize_ionvar_copies
Flag to indicate if visitor should avoid ion variable copies.
bool net_receive_exist() const noexcept
Check if net_receive node exist.
virtual void append_conc_write_statements(std::vector< ShadowUseStatement > &statements, const Ion &ion, const std::string &concentration)=0
Generate Function call statement for nrn_wrote_conc.
-
std::shared_ptr< symtab::Symbol > SymbolType
+
std::shared_ptr< symtab::Symbol > SymbolType
int get_int_variable_index(const std::string &var_name)
@ thread
thread variables
virtual bool optimize_ion_variable_copies() const =0
Check if ion variable copies should be avoided.
std::string get_name(ast::Ast const *sym)
void print_procedure(const ast::ProcedureBlock &node)
Print NMODL procedure in target backend code.
-
std::string nmodl_version() const noexcept
Return Nmodl language version.
-
bool printing_top_verbatim_blocks
true if currently printing top level verbatim blocks
+
std::string nmodl_version() const noexcept
Return Nmodl language version.
+
bool printing_top_verbatim_blocks
true if currently printing top level verbatim blocks
int float_variables_size() const
Number of float variables in the model.
bool is_constant
if the variable is qualified as constant (this is property of IndexVariable)
void print_backend_info()
Print top file header printed in generated code.
void visit_from_statement(const ast::FromStatement &node) override
visit node of type ast::FromStatement
void print_functor_definition(const ast::EigenNewtonSolverBlock &node)
Based on the EigenNewtonSolverBlock passed print the definition needed for its functor.
virtual void print_global_var_struct_assertions() const
Print static assertions about the global variable struct.
-
bool printing_net_init
true if currently initial block of net_receive being printed
+
bool printing_net_init
true if currently initial block of net_receive being printed
void print_mechanism_info()
Print backend code for byte array that has mechanism information (to be registered with NEURON/CoreNE...
void visit_eigen_newton_solver_block(const ast::EigenNewtonSolverBlock &node) override
visit node of type ast::EigenNewtonSolverBlock
virtual void print_global_function_common_code(BlockType type, const std::string &function_name="")=0
Print common code for global functions like nrn_init, nrn_cur and nrn_state.
@@ -1798,7 +1769,7 @@
encapsulates code generation backend implementations
Definition: ast_common.hpp:26
@ index
index / int variables
-
const std::string & float_data_type() const noexcept
Data type for floating point elements specified on command line.
+
const std::string & float_data_type() const noexcept
Data type for floating point elements specified on command line.
Represent ions used in mod file.
Implement classes for representing symbol table at block and file scope.
@@ -1807,7 +1778,7 @@
Represent MUTEXLOCK statement in NMODL.
Definition: mutex_lock.hpp:38
void print_statement_block(const ast::StatementBlock &node, bool open_brace=true, bool close_brace=true)
Print any statement block in nmodl with option to (not) print braces.
int get_prefixsum_from_name(const std::vector< T > &variables, const std::string &name)
-
void print_function_declaration(const T &node, const std::string &name, const std::unordered_set< CppObjectSpecifier > &={CppObjectSpecifier::Static, CppObjectSpecifier::Inline})
Print prototype declarations of functions or procedures.
+
void print_function_declaration(const T &node, const std::string &name, const std::unordered_set< CppObjectSpecifier > &={CppObjectSpecifier::Static, CppObjectSpecifier::Inline})
Print prototype declarations of functions or procedures.
virtual std::string global_variable_name(const SymbolType &symbol, bool use_instance=true) const =0
Determine the variable name for a global variable given its symbol.
Represents TABLE statement in NMODL.
@@ -1819,14 +1790,14 @@
std::vector< SymbolType > get_float_variables() const
Determine all float variables required during code generation.
virtual void print_net_move_call(const ast::FunctionCall &node)=0
Print call to net_move.
-
const char * default_int_data_type() const noexcept
Default data type for integer (offset) elements.
+
const char * default_int_data_type() const noexcept
Default data type for integer (offset) elements.
std::string mod_suffix
name of the suffix
void print_top_verbatim_blocks()
Print top level (global scope) verbatim blocks.
void print_function_tables(const ast::FunctionTableBlock &node)
Print the internal function for FUNCTION_TABLES.
Represent information collected from AST for code generation.
void visit_paren_expression(const ast::ParenExpression &node) override
visit node of type ast::ParenExpression
void print_namespace_start()
Prints the start of the simulator namespace.
-
const char * default_float_data_type() const noexcept
Default data type for floating point elements.
+
const char * default_float_data_type() const noexcept
Default data type for floating point elements.
bool net_receive_buffering_required() const noexcept
Check if net receive/send buffering kernels required.
std::string update_if_ion_variable_name(const std::string &name) const
Determine the updated name if the ion variable has been optimized.
void print_function(const ast::FunctionBlock &node)
Print NMODL function in target backend code.
@@ -1836,10 +1807,10 @@
bool is_integer
if this is an integer (e.g.
virtual std::string int_variable_name(const IndexVariableInfo &symbol, const std::string &name, bool use_instance) const =0
Determine the name of an int variable given its symbol.
void visit_unit(const ast::Unit &node) override
visit node of type ast::Unit
-
std::unordered_map< CppObjectSpecifier, std::string > object_specifier_map
+
std::unordered_map< CppObjectSpecifier, std::string > object_specifier_map
Represent newton solver solution block based on Eigen.
void visit_update_dt(const ast::UpdateDt &node) override
visit node of type ast::UpdateDt
-
void print_vector_elements(const std::vector< T > &elements, const std::string &separator, const std::string &prefix="")
Print the items in a vector as a list.
+
void print_vector_elements(const std::vector< T > &elements, const std::string &separator, const std::string &prefix="")
Print the items in a vector as a list.
bool is_function_table_call(const std::string &name) const
IndexVariableInfo(std::shared_ptr< symtab::Symbol > symbol, bool is_vdata=false, bool is_index=false, bool is_integer=false)
virtual void add_variable_point_process(std::vector< IndexVariableInfo > &variables)=0
Add the variable point_process during get_int_variables.
@@ -1853,16 +1824,16 @@
virtual int position_of_int_var(const std::string &name) const =0
Determine the position in the data array for a given int variable.
virtual void print_parallel_iteration_hint(BlockType type, const ast::Block *block)
Print pragma annotations for channel iterations.
-
symtab::SymbolTable * program_symtab
Symbol table for the program.
+
symtab::SymbolTable * program_symtab
Symbol table for the program.
@ Equation
breakpoint block
MemberType
Helper to represent various variables types.
virtual const std::string external_method_arguments() noexcept=0
Arguments for external functions called from generated code.
-
bool is_net_move(const std::string &name) const noexcept
Checks if given function name is net_move.
+
bool is_net_move(const std::string &name) const noexcept
Checks if given function name is net_move.
Represents a float variable.
Definition: float.hpp:44
virtual void print_mechanism_global_var_structure(bool print_initializers)=0
Print the structure that wraps all global variables used in the NMODL.
Represents a BREAKPOINT block in NMODL.
virtual void print_compute_functions()=0
Print all compute functions for every backend.
-
std::vector< SymbolType > codegen_global_variables
All global variables for the model.
+
std::vector< SymbolType > codegen_global_variables
All global variables for the model.
Represents specific element of an array variable.
virtual void add_variable_tqitem(std::vector< IndexVariableInfo > &variables)=0
Add the variable tqitem during get_int_variables.
@@ -1886,16 +1857,16 @@
void print_using_namespace()
Prints f"using namespace {namespace_name()}".
bool net_send_buffer_required() const noexcept
Check if net_send_buffer is required.
static constexpr char NMODL_VERSION[]
nmodl language version
-
std::vector< IndexVariableInfo > codegen_int_variables
All int variables for the model.
+
std::vector< IndexVariableInfo > codegen_int_variables
All int variables for the model.
void visit_float(const ast::Float &node) override
visit node of type ast::Float
void visit_string(const ast::String &node) override
visit node of type ast::String
@ NetReceive
net_receive block
void visit_solution_expression(const ast::SolutionExpression &node) override
visit node of type ast::SolutionExpression
virtual void print_nrn_pointing(const ast::FunctionCall &node)
Print nrn_pointing.
-
const char * local_var_type() const noexcept
Data type for the local variables.
+
const char * local_var_type() const noexcept
Data type for the local variables.
virtual void print_global_var_struct_decl()
Instantiate global var instance.
-
std::string get_channel_info_var_name() const noexcept
Name of channel info variable.
+
std::string get_channel_info_var_name() const noexcept
Name of channel info variable.
void visit_var_name(const ast::VarName &node) override
virtual void print_function_table_call(const ast::FunctionCall &node)=0
Print special code when calling FUNCTION_TABLEs.
@@ -1911,10 +1882,10 @@
static constexpr char DEFAULT_INTEGER_TYPE[]
default integer variable type
virtual void print_function_or_procedure(const ast::Block &node, const std::string &name, const std::unordered_set< CppObjectSpecifier > &specifiers)=0
Print nmodl function or procedure (common code)
Represent symbol table for a NMODL block.
-
bool is_nrn_pointing(const std::string &name) const noexcept
+
bool is_nrn_pointing(const std::string &name) const noexcept
void visit_integer(const ast::Integer &node) override
visit node of type ast::Integer
Represent linear solver solution block based on Eigen.
-
bool printing_net_receive
true if currently net_receive block being printed
+
bool printing_net_receive
true if currently net_receive block being printed
Statement to indicate a change in timestep in a given block.
Definition: update_dt.hpp:38
const ast::TableStatement * get_table_statement(const ast::Block &)
virtual void print_global_variables_for_hoc()=0
Print byte arrays that register scalar and vector variables for hoc interface.
@@ -1927,13 +1898,13 @@
static std::string get_parameter_str(const ParamVector &params)
Generate the string representing the procedure parameter declaration.
virtual bool needs_v_unused() const =0
virtual void print_nrn_cur()=0
Print nrn_cur / current update function definition.
-
bool is_net_send(const std::string &name) const noexcept
Checks if given function name is net_send.
+
bool is_net_send(const std::string &name) const noexcept
Checks if given function name is net_send.
Represents block encapsulating list of statements.
virtual void print_nrn_cur_kernel(const ast::BreakpointBlock &node)=0
Print main body of nrn_cur function.
bool net_receive_required() const noexcept
Check if net_receive function is required.
virtual std::string float_variable_name(const SymbolType &symbol, bool use_instance) const =0
Determine the name of a float variable given its symbol.
virtual std::string internal_method_arguments()=0
Arguments for functions that are defined and used internally.
-
std::string global_struct() const
Name of structure that wraps global variables.
+
std::string global_struct() const
Name of structure that wraps global variables.
bool electrode_current
if electrode current specified
virtual ParamVector internal_method_parameters()=0
Parameters for internally defined functions.
@@ -1943,21 +1914,21 @@
Represents ion write statement during code generation.
virtual void print_mechanism_range_var_structure(bool print_initializers)=0
Print the structure that wraps all range and int variables required for the NMODL.
-
SymbolType make_symbol(const std::string &name) const
Creates a temporary symbol.
-
std::string float_type
Data type of floating point variables.
+
SymbolType make_symbol(const std::string &name) const
Creates a temporary symbol.
+
std::string float_type
Data type of floating point variables.
Operator used in ast::BinaryExpression.
bool defined_method(const std::string &name) const
Check if given method is defined in this model.
static constexpr char NET_MOVE_METHOD[]
net_move function call in nmodl
Implement logger based on spdlog library.
-
std::string node_data_struct() const
Name of structure that wraps node variables.
+
std::string node_data_struct() const
Name of structure that wraps node variables.
bool is_vdata
if variable resides in vdata field of NrnThread typically true for bbcore pointer
virtual void print_function_call(const ast::FunctionCall &node)
Print call to internal or external function.
Represent solution of a block in the AST.
std::string process_shadow_update_statement(const ShadowUseStatement &statement, BlockType type)
Process shadow update statement.
parser::NmodlParser::symbol_type SymbolType
Definition: main_nmodl.cpp:33
-
bool enable_variable_name_lookup
Variable name should be converted to instance name (but not for function arguments)
+
bool enable_variable_name_lookup
Variable name should be converted to instance name (but not for function arguments)
BlockType
Helper to represent various block types.
-
int current_watch_statement
Index of watch statement being printed.
+
int current_watch_statement
Index of watch statement being printed.
static constexpr char NET_EVENT_METHOD[]
net_event function call in nmodl
virtual void print_fast_imem_calculation()=0
Print fast membrane current calculation code.
static constexpr char NRN_POINTING_METHOD[]
nrn_pointing function in nmodl
@@ -1968,33 +1939,33 @@
Visitor for printing C++ code compatible with legacy api of CoreNEURON
-
CodegenCppVisitor(std::string mod_filename, std::ostream &stream, std::string float_type, const bool optimize_ionvar_copies, std::unique_ptr< nmodl::utils::Blame > blame=nullptr)
Constructs the C++ code generator visitor.
-
std::string instance_struct() const
Name of structure that wraps range variables.
+
CodegenCppVisitor(std::string mod_filename, std::ostream &stream, std::string float_type, const bool optimize_ionvar_copies, std::unique_ptr< nmodl::utils::Blame > blame=nullptr)
Constructs the C++ code generator visitor.
+
std::string instance_struct() const
Name of structure that wraps range variables.
std::string compute_method_name(BlockType type) const
Represents a name.
Definition: name.hpp:44
void visit_program(const ast::Program &program) override
Main and only member function to call after creating an instance of this class.
-
std::string mod_filename
Name of mod file (without .mod suffix)
+
std::string mod_filename
Name of mod file (without .mod suffix)
virtual std::string get_variable_name(const std::string &name, bool use_instance=true) const =0
Determine variable name in the structure of mechanism properties.
Represents top level AST node for whole NMODL input.
Definition: program.hpp:39
void visit_indexed_name(const ast::IndexedName &node) override
visit node of type ast::IndexedName
-
const char * operator_for_rhs() const noexcept
Operator for rhs vector update (matrix update)
+
const char * operator_for_rhs() const noexcept
Operator for rhs vector update (matrix update)
void print_prcellstate_macros() const
Print declaration of macro NRN_PRCELLSTATE for debugging.
-
std::unique_ptr< CodePrinter > printer
Code printer object for target (C++)
+
std::unique_ptr< CodePrinter > printer
Code printer object for target (C++)
bool nrn_state_required() const noexcept
Check if nrn_state function is required.
@ State
derivative block
-
std::string add_escape_quote(const std::string &text) const
Add quotes to string to be output.
+
std::string add_escape_quote(const std::string &text) const
Add quotes to string to be output.
-
bool internal_method_call_encountered
true if internal method call was encountered while processing verbatim block
+
bool internal_method_call_encountered
true if internal method call was encountered while processing verbatim block
virtual void print_v_unused() const =0
Set v_unused (voltage) for NRN_PRCELLSTATE feature.
-
std::string method_name(const std::string &name) const
Constructs the name of a function or procedure.
-
bool is_net_event(const std::string &name) const noexcept
Checks if given function name is net_event.
+
std::string method_name(const std::string &name) const
Constructs the name of a function or procedure.
+
bool is_net_event(const std::string &name) const noexcept
Checks if given function name is net_event.
Represents binary expression in the NMODL.
- +
virtual void print_headers_include()=0
Print all includes.
-
std::vector< SymbolType > codegen_float_variables
All float variables for the model.
+
std::vector< SymbolType > codegen_float_variables
All float variables for the model.
Helper class for printing C/C++ code.
static bool statement_to_skip(const ast::Statement &node)
Check if given statement should be skipped during code generation.
@@ -2018,7 +1989,7 @@
virtual void print_nrn_alloc()=0
Print nrn_alloc function definition.
void visit_while_statement(const ast::WhileStatement &node) override
visit node of type ast::WhileStatement
@ range
range / double variables
-
std::vector< std::tuple< std::string, std::string, std::string, std::string > > ParamVector
A vector of parameters represented by a 4-tuple of strings:
+
std::vector< std::tuple< std::string, std::string, std::string, std::string > > ParamVector
A vector of parameters represented by a 4-tuple of strings:
void visit_statement_block(const ast::StatementBlock &node) override
Concrete visitor for all AST classes.
diff --git a/doxygen/codegen__neuron__cpp__visitor_8hpp_source.html b/doxygen/codegen__neuron__cpp__visitor_8hpp_source.html index 3b31b4e178..7e7117491e 100644 --- a/doxygen/codegen__neuron__cpp__visitor_8hpp_source.html +++ b/doxygen/codegen__neuron__cpp__visitor_8hpp_source.html @@ -187,7 +187,7 @@
91  */
93  public:
- +
95 
96  protected:
97  /****************************************************************************************/
@@ -988,7 +988,6 @@
void print_nrn_cur() override
Print nrn_cur / current update function definition.
void print_macro_definitions()
Print all NEURON macros.
void print_function_definitions()
Print function and procedures prototype definitions.
-
CodegenCppVisitor(std::string mod_filename, const std::string &output_dir, std::string float_type, const bool optimize_ionvar_copies, std::unique_ptr< nmodl::utils::Blame > blame)
Constructs the C++ code generator visitor.
void print_net_event_call(const ast::FunctionCall &node) override
Print call to net_event.
std::string hoc_py_wrapper_signature(const ast::Block *function_or_procedure_block, InterpreterWrapper wrapper_type)
Return the wrapper signature.
@@ -1114,6 +1113,7 @@
void print_hoc_py_wrapper_call_impl(const ast::Block *function_or_procedure_block, InterpreterWrapper wrapper_type)
Print the code that calls the impl from the HOC/Py wrapper.
void print_codegen_routines_nothing()
SUFFIX nothing is special.
Visitor for printing C++ code compatible with legacy api of CoreNEURON
+
CodegenCppVisitor(std::string mod_filename, std::ostream &stream, std::string float_type, const bool optimize_ionvar_copies, std::unique_ptr< nmodl::utils::Blame > blame=nullptr)
Constructs the C++ code generator visitor.
void print_make_node_data() const
Print make_*_node_data.
std::string simulator_name() override
Name of the simulator the code was generated for.
void print_function_procedure_helper(const ast::Block &node) override
Common helper function to help printing function or procedure blocks.
@@ -1137,7 +1137,7 @@
void print_hoc_py_wrapper_setup(const ast::Block *function_or_procedure_block, InterpreterWrapper wrapper_type)
Print the setup code for HOC/Py wrapper.
std::string namespace_name() override
Name of "our" namespace.
void print_global_macros()
Print NEURON global variable macros.
-
std::vector< std::tuple< std::string, std::string, std::string, std::string > > ParamVector
A vector of parameters represented by a 4-tuple of strings:
+
std::vector< std::tuple< std::string, std::string, std::string, std::string > > ParamVector
A vector of parameters represented by a 4-tuple of strings:
Concrete visitor for all AST classes.
diff --git a/doxygen/constant__folder_8cpp_source.html b/doxygen/constant__folder_8cpp_source.html index b3fc00aa02..460d61340d 100644 --- a/doxygen/constant__folder_8cpp_source.html +++ b/doxygen/constant__folder_8cpp_source.html @@ -152,7 +152,7 @@
56  )";
57  THEN("successfully folds") {
58  auto result = run_constant_folding_visitor(nmodl_text);
-
59  REQUIRE(reindent_text(result) == reindent_text(expected_text));
+
59  REQUIRE(reindent_text(result) == reindent_text(expected_text));
60  }
61  }
62 
@@ -169,7 +169,7 @@
73  )";
74  THEN("successfully folds") {
75  auto result = run_constant_folding_visitor(nmodl_text);
-
76  REQUIRE(reindent_text(result) == reindent_text(expected_text));
+
76  REQUIRE(reindent_text(result) == reindent_text(expected_text));
77  }
78  }
79 
@@ -186,7 +186,7 @@
90  )";
91  THEN("successfully folds") {
92  auto result = run_constant_folding_visitor(nmodl_text);
-
93  REQUIRE(reindent_text(result) == reindent_text(expected_text));
+
93  REQUIRE(reindent_text(result) == reindent_text(expected_text));
94  }
95  }
96 
@@ -211,7 +211,7 @@
115  )";
116  THEN("successfully folds") {
117  auto result = run_constant_folding_visitor(nmodl_text);
-
118  REQUIRE(reindent_text(result) == reindent_text(expected_text));
+
118  REQUIRE(reindent_text(result) == reindent_text(expected_text));
119  }
120  }
121 
@@ -238,7 +238,7 @@
142  )";
143  THEN("successfully folds and keep other statements untouched") {
144  auto result = run_constant_folding_visitor(nmodl_text);
-
145  REQUIRE(reindent_text(result) == reindent_text(expected_text));
+
145  REQUIRE(reindent_text(result) == reindent_text(expected_text));
146  }
147  }
148 
@@ -259,7 +259,7 @@
163  )";
164  THEN("successfully folds and keep other statements untouched") {
165  auto result = run_constant_folding_visitor(nmodl_text);
-
166  REQUIRE(reindent_text(result) == reindent_text(expected_text));
+
166  REQUIRE(reindent_text(result) == reindent_text(expected_text));
167  }
168  }
169 }
@@ -267,13 +267,13 @@
Class that binds all pieces together for parsing nmodl file.
+
std::string reindent_text(const std::string &text, int indent_level)
Reindent nmodl text for text-to-text comparison.
Definition: test_utils.cpp:53
encapsulates code generation backend implementations
Definition: ast_common.hpp:26
Perform constant folding of integer/float/double expressions.
Auto generated AST classes declaration.
nmodl::parser::UnitDriver driver
Definition: parser.cpp:28
SCENARIO("Perform constant folder on NMODL constructs")
bool parse_string(const std::string &input)
parser Units provided as string (used for testing)
Definition: unit_driver.cpp:40
-
std::string reindent_text(const std::string &text)
Reindent nmodl text for text-to-text comparison.
Definition: test_utils.cpp:53
std::string run_constant_folding_visitor(const std::string &text)
Visitor for checking parents of ast nodes
diff --git a/doxygen/defuse__analyze_8cpp_source.html b/doxygen/defuse__analyze_8cpp_source.html index 1f72010dbc..c775564b44 100644 --- a/doxygen/defuse__analyze_8cpp_source.html +++ b/doxygen/defuse__analyze_8cpp_source.html @@ -165,7 +165,7 @@
69  R"({"DerivativeBlock":[{"name":"D"},{"name":"U"},{"name":"D"}]})";
70 
71  THEN("Def-Use chains for individual usage is printed") {
-
72  std::string input = reindent_text(nmodl_text);
+
72  std::string input = reindent_text(nmodl_text);
73  auto chains = run_defuse_visitor(input, "tau");
74 
75  REQUIRE(chains[0].to_string(true) == expected_text);
@@ -194,7 +194,7 @@
98  R"({"DerivativeBlock":[{"name":"U"},{"name":"D"},{"name":"U"}]})";
99 
100  THEN("Verbatim block is considered as use of the variable") {
-
101  std::string input = reindent_text(nmodl_text);
+
101  std::string input = reindent_text(nmodl_text);
102  auto chains = run_defuse_visitor(input, "tau");
103  REQUIRE(chains[0].to_string(true) == expected_text);
104  REQUIRE(chains[0].eval() == DUState::U);
@@ -226,7 +226,7 @@
130  )";
131 
132  THEN("Def-Use analyser distinguishes variables by array index") {
-
133  std::string input = reindent_text(nmodl_text);
+
133  std::string input = reindent_text(nmodl_text);
134  {
135  auto m0 = run_defuse_visitor(input, "m[0]");
136  auto m1 = run_defuse_visitor(input, "m[1]");
@@ -284,7 +284,7 @@
188  R"({"DerivativeBlock":[{"CONDITIONAL_BLOCK":[{"IF":[{"name":"U"}]}]}]})";
189 
190  THEN("tau is used") {
-
191  std::string input = reindent_text(nmodl_text);
+
191  std::string input = reindent_text(nmodl_text);
192  auto chains = run_defuse_visitor(input, "tau");
193  REQUIRE(chains[0].to_string() == expected_text);
194  REQUIRE(chains[0].eval() == DUState::U);
@@ -311,7 +311,7 @@
215  R"({"DerivativeBlock":[{"CONDITIONAL_BLOCK":[{"IF":[{"name":"U"}]}]}]})";
216 
217  THEN("tau is used") {
-
218  std::string input = reindent_text(nmodl_text);
+
218  std::string input = reindent_text(nmodl_text);
219  auto chains = run_defuse_visitor(input, "tau");
220  REQUIRE(chains[0].to_string() == expected_text);
221  REQUIRE(chains[0].eval() == DUState::U);
@@ -342,7 +342,7 @@
246  R"({"DerivativeBlock":[{"CONDITIONAL_BLOCK":[{"IF":[{"name":"LD"}]},{"ELSE":[{"name":"D"}]}]}]})";
247 
248  THEN("Def-Use chains should return CD") {
-
249  std::string input = reindent_text(nmodl_text);
+
249  std::string input = reindent_text(nmodl_text);
250  auto chains = run_defuse_visitor(input, "tau");
251  REQUIRE(chains[0].to_string() == expected_text);
252  REQUIRE(chains[0].eval() == DUState::CD);
@@ -368,7 +368,7 @@
272  R"({"DerivativeBlock":[{"CONDITIONAL_BLOCK":[{"IF":[{"name":"U"},{"name":"U"},{"name":"D"}]},{"ELSE":[{"name":"U"},{"name":"D"}]}]}]})";
273 
274  THEN("tau is used and then used in its definitions") {
-
275  std::string input = reindent_text(nmodl_text);
+
275  std::string input = reindent_text(nmodl_text);
276  auto chains = run_defuse_visitor(input, "tau");
277  REQUIRE(chains[0].to_string() == expected_text);
278  REQUIRE(chains[0].chain[0].binary_expression == nullptr); // CONDITIONAL_BLOCK
@@ -405,7 +405,7 @@
309  R"({"DerivativeBlock":[{"CONDITIONAL_BLOCK":[{"name":"IF"},{"ELSE":[{"name":"U"},{"name":"D"}]}]}]})";
310 
311  THEN("Def-Use chains should return USE") {
-
312  std::string input = reindent_text(nmodl_text);
+
312  std::string input = reindent_text(nmodl_text);
313  auto chains = run_defuse_visitor(input, "tau");
314  REQUIRE(chains[0].to_string() == expected_text);
315  REQUIRE(chains[0].eval() == DUState::U);
@@ -431,7 +431,7 @@
335  R"({"DerivativeBlock":[{"CONDITIONAL_BLOCK":[{"IF":[{"name":"U"}]},{"ELSE":[{"name":"LU"},{"name":"LD"}]}]}]})";
336 
337  THEN("Def-Use chains should return USE because global variables have precedence in eval") {
-
338  std::string input = reindent_text(nmodl_text);
+
338  std::string input = reindent_text(nmodl_text);
339  auto chains = run_defuse_visitor(input, "tau");
340  REQUIRE(chains[0].to_string() == expected_text);
341  REQUIRE(chains[0].eval() == DUState::U);
@@ -456,7 +456,7 @@
360  R"({"DerivativeBlock":[{"CONDITIONAL_BLOCK":[{"IF":[{"name":"LD"}]}]}]})";
361 
362  THEN("Def-Use chains should return USE because global variables have precedence in eval") {
-
363  std::string input = reindent_text(nmodl_text);
+
363  std::string input = reindent_text(nmodl_text);
364  auto chains = run_defuse_visitor(input, "tau");
365  REQUIRE(chains[0].to_string() == expected_text);
366  REQUIRE(chains[0].eval() == DUState::CD);
@@ -485,7 +485,7 @@
389  THEN(
390  "Def-Use chains should return NONE because the variable we look for is not one of "
391  "them") {
-
392  std::string input = reindent_text(nmodl_text);
+
392  std::string input = reindent_text(nmodl_text);
393  auto chains = run_defuse_visitor(input, "alpha");
394  REQUIRE(chains[0].to_string() == expected_text);
395  REQUIRE(chains[0].eval() == DUState::NONE);
@@ -518,7 +518,7 @@
422  R"({"DerivativeBlock":[{"CONDITIONAL_BLOCK":[{"IF":[{"name":"LD"}]}]}]})";
423 
424  THEN("local and global variables are correctly analyzed") {
-
425  std::string input = reindent_text(nmodl_text);
+
425  std::string input = reindent_text(nmodl_text);
426  auto chains_x = run_defuse_visitor(input, "x");
427  // Global variable "x" should be U as it's only used in the IF-ELSE statement
428  REQUIRE(chains_x[0].to_string() == expected_text_x);
@@ -561,7 +561,7 @@
465  R"({"DerivativeBlock":[{"name":"D"},{"name":"U"},{"name":"D"}]})";
466 
467  THEN("assigned variables are correctly analyzed") {
-
468  const std::string input = reindent_text(nmodl_text);
+
468  const std::string input = reindent_text(nmodl_text);
469  // Assigned variable "y" should be DU as it's defined and used as well
470  const auto& chains_y = run_defuse_visitor(input, "y");
471  REQUIRE(chains_y[0].to_string() == expected_text_y);
@@ -590,7 +590,7 @@
494  R"({"DerivativeBlock":[{"CONDITIONAL_BLOCK":[{"IF":[{"name":"D"},{"name":"U"}]},{"ELSE":[{"name":"D"}]}]}]})";
495 
496  THEN("Def-Use chains should return DEF") {
-
497  std::string input = reindent_text(nmodl_text);
+
497  std::string input = reindent_text(nmodl_text);
498  auto chains = run_defuse_visitor(input, "tau");
499  REQUIRE(chains[0].to_string() == expected_text);
500  REQUIRE(chains[0].eval() == DUState::D);
@@ -619,7 +619,7 @@
523  R"({"DerivativeBlock":[{"CONDITIONAL_BLOCK":[{"IF":[{"CONDITIONAL_BLOCK":[{"IF":[{"name":"D"},{"name":"U"}]}]}]},{"ELSEIF":[{"name":"D"}]}]}]})";
524 
525  THEN("Def-Use chains should return DEF") {
-
526  std::string input = reindent_text(nmodl_text);
+
526  std::string input = reindent_text(nmodl_text);
527  auto chains = run_defuse_visitor(input, "tau");
528  REQUIRE(chains[0].to_string() == expected_text);
529  REQUIRE(chains[0].eval() == DUState::CD);
@@ -650,7 +650,7 @@
554  R"({"DerivativeBlock":[{"CONDITIONAL_BLOCK":[{"IF":[{"name":"D"}]}]},{"name":"U"},{"name":"D"},{"CONDITIONAL_BLOCK":[{"name":"IF"},{"ELSEIF":[{"name":"D"}]}]}]})";
555 
556  THEN("Def-Use chains for individual usage is printed") {
-
557  std::string input = reindent_text(nmodl_text);
+
557  std::string input = reindent_text(nmodl_text);
558  auto chains = run_defuse_visitor(input, "tau");
559  REQUIRE(chains[0].to_string() == expected_text);
560  REQUIRE(chains[0].eval() == DUState::U);
@@ -691,7 +691,7 @@
595  R"({"DerivativeBlock":[{"CONDITIONAL_BLOCK":[{"IF":[{"name":"LD"}]}]},{"CONDITIONAL_BLOCK":[{"IF":[{"CONDITIONAL_BLOCK":[{"name":"IF"},{"ELSE":[{"name":"D"}]}]}]},{"ELSEIF":[{"CONDITIONAL_BLOCK":[{"IF":[{"CONDITIONAL_BLOCK":[{"name":"IF"},{"ELSE":[{"name":"U"}]}]}]}]},{"name":"D"}]}]}]})";
596 
597  THEN("Def-Use chains for nested statements calculated") {
-
598  std::string input = reindent_text(nmodl_text);
+
598  std::string input = reindent_text(nmodl_text);
599  auto chains = run_defuse_visitor(input, "tau");
600  REQUIRE(chains[0].to_string() == expected_text);
601  REQUIRE(chains[0].eval() == DUState::U);
@@ -704,6 +704,7 @@
SCENARIO("Perform DefUse analysis on NMODL constructs")
Class that binds all pieces together for parsing nmodl file.
std::string to_nmodl(const ast::Ast &node, const std::set< ast::AstNodeType > &exclude_types)
Given AST node, return the NMODL string representation.
+
std::string reindent_text(const std::string &text, int indent_level)
Reindent nmodl text for text-to-text comparison.
Definition: test_utils.cpp:53
encapsulates code generation backend implementations
Definition: ast_common.hpp:26
@ LD
local variable is defined
@ D
global variable is defined
@@ -716,7 +717,6 @@
@ NONE
variable is not used
bool parse_string(const std::string &input)
parser Units provided as string (used for testing)
Definition: unit_driver.cpp:40
std::string to_string(DUState state)
DUState to string conversion for pretty-printing.
-
std::string reindent_text(const std::string &text)
Reindent nmodl text for text-to-text comparison.
Definition: test_utils.cpp:53
std::vector< std::shared_ptr< const ast::Ast > > collect_nodes(const ast::Ast &node, const std::vector< ast::AstNodeType > &types)
traverse node recursively and collect nodes of given types
Visitor to return Def-Use chain for a given variable in the block/node
Visitor for checking parents of ast nodes
diff --git a/doxygen/functions_c.html b/doxygen/functions_c.html index 17c5340088..5b1a739be5 100644 --- a/doxygen/functions_c.html +++ b/doxygen/functions_c.html @@ -321,7 +321,7 @@

- c -