Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FUNCTION and PROCEDURE codegen for NEURON #1141

Merged
merged 110 commits into from
Feb 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
110 commits
Select commit Hold shift + click to select a range
af9c79d
Fix slist and dlist instantiation
iomaganaris Nov 29, 2023
bc0d148
Change channel info variable name in NEURON and CoreNEURON
iomaganaris Nov 30, 2023
959d32c
Fix mech_type in NEURON codegen
iomaganaris Nov 30, 2023
1a9cb7c
Make _initlists() same as NEURON
iomaganaris Nov 30, 2023
f20b18c
Working towards making reg func compilable
iomaganaris Nov 30, 2023
e23f378
Fix compilation for simple register_mech
iomaganaris Dec 1, 2023
6378884
Fix compilation for POINT_PROCESSes as well
iomaganaris Dec 1, 2023
19cc2d2
Fixed indentation and replace commented code with comment
iomaganaris Dec 1, 2023
4f5423f
Merge remote-tracking branch 'origin/master' into magkanar/nrn_reg
iomaganaris Dec 1, 2023
2d794c2
Fix indentations
iomaganaris Dec 1, 2023
c6dc453
Fix tests
iomaganaris Dec 4, 2023
364812c
Make format happy
iomaganaris Dec 4, 2023
fa40acb
Merge remote-tracking branch 'origin/master' into magkanar/nrn_reg
iomaganaris Dec 4, 2023
667335d
Extern C reg function
iomaganaris Dec 4, 2023
d1469bc
Fix test with extern
iomaganaris Dec 4, 2023
33ceb30
Refactor printing slist/dlist in new function similarly to NEURON
iomaganaris Dec 4, 2023
4c0c64c
Fix tests
iomaganaris Dec 4, 2023
d3beee2
Merge remote-tracking branch 'origin/master' into magkanar/refactor_s…
iomaganaris Dec 5, 2023
4dc457b
Added test for initlists
iomaganaris Dec 5, 2023
3871183
Make format happy
iomaganaris Dec 5, 2023
05ea2e0
Removed check for second set up of the slist/dlist
iomaganaris Dec 6, 2023
a6acc3d
Addressed Luc's comments
iomaganaris Dec 7, 2023
c726805
Make format happy
iomaganaris Dec 7, 2023
eb74411
Try different syntax for [[maybe_unused]]
iomaganaris Dec 7, 2023
c735717
Fix it in both places
iomaganaris Dec 7, 2023
6031540
Merge branch 'magkanar/refactor_sdlistsinit' into magkanar/nrn_reg
iomaganaris Dec 7, 2023
a18b1b8
Remove changes related to functions and procedures
iomaganaris Dec 7, 2023
471034c
Merge remote-tracking branch 'origin/master' into magkanar/nrn_reg
iomaganaris Dec 7, 2023
e943dc7
Make format happy
iomaganaris Dec 7, 2023
f98bf52
Revert "Remove changes related to functions and procedures"
iomaganaris Dec 7, 2023
86b5860
Fix compilation with external functions related to loc and point_process
iomaganaris Dec 7, 2023
1f59726
Added declaration of _hoc_<fun_or_proc>
iomaganaris Dec 7, 2023
07cfcbd
Initial work to add wrappers for HOC and Python
iomaganaris Dec 7, 2023
98b5741
Fix compilation issue with wrong declaration of functions
iomaganaris Dec 8, 2023
76d8d85
Added small unit test
iomaganaris Dec 8, 2023
b70bd35
Make format happy
iomaganaris Dec 8, 2023
8fbf07a
Merge branch 'master' into magkanar/nrn_proc_func
iomaganaris Dec 11, 2023
67d0e48
Move parts of the print_function_prototypes in separate functions
iomaganaris Dec 11, 2023
436892a
Move parts of the print_function_prototypes in separate functions
iomaganaris Dec 11, 2023
e21a92a
Merge remote-tracking branch 'origin/master' into magkanar/nrn_reg
iomaganaris Dec 11, 2023
28d1243
Merge branch 'magkanar/nrn_reg' of https://github.com/BlueBrain/nmodl…
iomaganaris Dec 11, 2023
aaab170
Added signatures of the functions
iomaganaris Dec 11, 2023
e7cb437
Added finished main logic for printing the HOC/Python wrapper
iomaganaris Dec 12, 2023
64484d0
Fix compilation
iomaganaris Dec 13, 2023
0ad09bc
Merge remote-tracking branch 'origin/master' into magkanar/nrn_reg
iomaganaris Dec 14, 2023
cbf5d37
Added (failing) usecase test
iomaganaris Dec 14, 2023
531f214
Move declaration of nrn_point_prop_ outside the neuron namespace
iomaganaris Dec 14, 2023
e69accc
Added int variables in mechanism registration
iomaganaris Dec 14, 2023
14aa578
Added hoc_register_prop_size and hoc_register_dparam_semantics
iomaganaris Dec 14, 2023
079eed5
Added ppvar_count variable
iomaganaris Dec 14, 2023
ac69f1b
Make format happy
iomaganaris Dec 14, 2023
5ffd6ee
Implemented big part of the nrn_alloc to make POINT_PROCESS work
iomaganaris Dec 14, 2023
bbcf8b2
Added test for POINT_PROCESS location
iomaganaris Dec 14, 2023
eafe0a4
Added test for parameters
iomaganaris Dec 14, 2023
1aabc64
Fix unit test
iomaganaris Dec 14, 2023
6b6729d
Merge remote-tracking branch 'origin/master' into magkanar/nrn_proc_func
iomaganaris Dec 15, 2023
7d30902
Merge remote-tracking branch 'origin/magkanar/nrn_reg' into magkanar/…
iomaganaris Dec 15, 2023
ee0016c
Fix (almost) func/proc reg functions
iomaganaris Dec 15, 2023
16b4cfc
Make code compilable
iomaganaris Dec 15, 2023
6c0ae6b
Fixed functions and processes for non point process files
iomaganaris Dec 16, 2023
837a116
Added initial python test
iomaganaris Dec 16, 2023
deebed3
Fix golden test
iomaganaris Jan 3, 2024
2493f70
Small fixes for procs and funcs
iomaganaris Jan 4, 2024
56cee6e
Added point process func/proc mod file test
iomaganaris Jan 4, 2024
1252007
WIP: check functions and procedures for RANGE/POINTER
iomaganaris Jan 5, 2024
40dd4b3
Fix compilation issue with hoc_getdata_range
iomaganaris Jan 5, 2024
efe963c
Remove GLOBAL variable from test since it's breaking it
iomaganaris Jan 5, 2024
449b7b4
Merge remote-tracking branch 'origin/master' into magkanar/nrn_proc_func
iomaganaris Jan 5, 2024
43a5b2e
Fix _prop_id check for simple functions
iomaganaris Jan 5, 2024
eac2297
Added new visitor for figuring out which func/procs need setdata
iomaganaris Jan 5, 2024
61a6035
Return from FunctionCall in NeedSetDataVisitor if there is no symbol …
iomaganaris Jan 8, 2024
f74d4d1
Rename _iml to id
iomaganaris Jan 8, 2024
cba29cb
Removed debug prints and fixed return from visit_var_name
iomaganaris Jan 8, 2024
c062d6a
Run NeedSetDataVisitor before NEURON codegen
iomaganaris Jan 8, 2024
7da138b
WIP: Semantic Analysis check for infinite function calls
iomaganaris Jan 8, 2024
b0baeec
Fixed semantic analysis and added test
iomaganaris Jan 11, 2024
d087433
Small improvements in semantic analysis visitor
iomaganaris Jan 11, 2024
d86bce2
Merge remote-tracking branch 'origin/master' into magkanar/nrn_proc_func
iomaganaris Jan 11, 2024
6d7c490
Make format happy
iomaganaris Jan 11, 2024
5a53278
Added need_setdata property in symtab
iomaganaris Jan 11, 2024
416c276
Fixed documentation in test
iomaganaris Jan 11, 2024
24e3179
Make format happy
iomaganaris Jan 11, 2024
1a8ed5f
Update symtab with NmodlType::need_setdata in CodegenHelperVisitor
iomaganaris Jan 16, 2024
60a968b
Fix issue in case of recursive function calls
iomaganaris Jan 23, 2024
42a0e8e
Added some comments to explain logic
iomaganaris Jan 23, 2024
b183ef3
Use proper submodules
iomaganaris Jan 23, 2024
dc4c7e5
Remove changes to semantic analysis visitor for infinite loops
iomaganaris Jan 23, 2024
92fc4d6
Merge branch 'magkanar/need_setdata' into magkanar/nrn_proc_func
iomaganaris Jan 23, 2024
ea02248
Remove NeedSetDataVisitor
iomaganaris Jan 23, 2024
a9448cc
Revert changes to test/unit/visitor/semantic_analysis.cpp
iomaganaris Jan 23, 2024
940f7ed
Fix int_variable_count caluclation
iomaganaris Jan 23, 2024
9780bcd
Rename semantic variable size variable
iomaganaris Jan 23, 2024
588c9c8
Make print_comma logic clearer in print_make_instance()
iomaganaris Jan 23, 2024
724bda2
Added comment in printing _nrn_mechanism_register_data_fields call
iomaganaris Jan 23, 2024
277df8e
Small fix
iomaganaris Jan 23, 2024
b598796
Merge remote-tracking branch 'origin/master' into magkanar/nrn_reg
iomaganaris Jan 23, 2024
450d9fa
Fix formatting
iomaganaris Jan 23, 2024
ada704e
Merge remote-tracking branch 'origin/magkanar/nrn_reg' into magkanar/…
iomaganaris Jan 24, 2024
9c1b5a0
Created FunctionCallpathVisitor that traversers the function calls an…
iomaganaris Jan 26, 2024
accd23c
Renamed need_setdata to use_range_ptr_var
iomaganaris Jan 26, 2024
4f72b95
Merge branch 'magkanar/need_setdata' into magkanar/nrn_proc_func
iomaganaris Jan 26, 2024
2326103
Combine some add_multi_line calls
iomaganaris Jan 26, 2024
cbb8f5a
Removed unnecessary TODOs
iomaganaris Jan 26, 2024
8715d58
Rename need_setdata to use_range_ptr_var
iomaganaris Jan 26, 2024
793c018
make format happy
iomaganaris Jan 26, 2024
efb5136
Merge branch 'master' into magkanar/nrn_proc_func
pramodk Feb 10, 2024
fce1698
add missing registration of hoc and python functions
pramodk Feb 10, 2024
3ba9265
fix test after merge
pramodk Feb 10, 2024
fc0db7d
fix merge: hoc_getdata_range() coming from global namespace
pramodk Feb 10, 2024
c3edb59
function & procedures: no need to check fo _ as they are not allowed …
pramodk Feb 10, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/codegen/codegen_helper_visitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,7 @@ void CodegenHelperVisitor::visit_suffix(const Suffix& node) {
info.point_process = true;
}
info.mod_suffix = node.get_node_name();
info.rsuffix = info.point_process ? "" : "_" + info.mod_suffix;
}


Expand Down
3 changes: 3 additions & 0 deletions src/codegen/codegen_info.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,9 @@ struct CodegenInfo {
/// name of the suffix
std::string mod_suffix;

/// point process range and functions don't have suffix
std::string rsuffix;

/// true if mod file is vectorizable (which should be always true for coreneuron)
/// But there are some blocks like LINEAR are not thread safe in neuron or mod2c
/// context. In this case vectorize is used to determine number of float variable
Expand Down
Loading
Loading