-
Notifications
You must be signed in to change notification settings - Fork 16
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
Add InstanceStruct test data generation helper and unit test #546
Conversation
iomaganaris
commented
Mar 8, 2021
•
edited by pramodk
Loading
edited by pramodk
- Taken over work from https://github.com/BlueBrain/nmodl/tree/pramodk/test-helper
- Added mechanism to instantiate the InstanceStruct with deterministic data
- Compare those in a unit test
- Check if typecasting works in the unit test
- Review and cleanup by Pramod
@georgemitenkov : going to do some cleanup but this overall gives an idea of what creating data data. See |
@pramodk @iomaganaris looks great! On LLVM/JIT side, I am working on the following:
Additionally I am thinking of creating functions that can be lowered to LLVM that use |
I am curious what you meant by |
@pramodk actually you are right, and we do not strictly need it I think. We can always define these on the higher level in |
@pramodk @iomaganaris I added a sample test case in #549 to show how this would look on LLVM side. I think I have all functions I need in this PR - for the data generation and for member comparisons. The printing functions are not really necessary - I guess we may need them for visual interpretation only :) So i would say that |
} | ||
|
||
BREAKPOINT { | ||
SOLVE states METHOD cnexp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@iomaganaris @pramodk I have noticed that when the NEURON does not have current, SOLVE states METHOD cnexp
block is added to the kernel for loop:
for ( ... ) {
SOLVE states METHOD cnexp
...
}
This does not affect code generation at all, but I am wondering if we should raise a ticket for this :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@georgemitenkov : I also so that somewhere and its a bug. Could you add ticket with some details?
@iomaganaris : could you look at CI fixes? |
Yy. I am looking at that atm 👍 |
…fix issue with linking
Add missing destructor
* CodegenLLVMHelperVisitor improved without hardcoded parameters * Added get_instance_struct_ptr to get instance structure for variable information * test/unit/codegen/codegen_data_helper.cpp : first draft implementation of codegen data helper * Added test for typecasting to the proper struct type Co-authored-by: Pramod Kumbhar <pramod.s.kumbhar@gmail.com>
* CodegenLLVMHelperVisitor improved without hardcoded parameters * Added get_instance_struct_ptr to get instance structure for variable information * test/unit/codegen/codegen_data_helper.cpp : first draft implementation of codegen data helper * Added test for typecasting to the proper struct type Co-authored-by: Pramod Kumbhar <pramod.s.kumbhar@gmail.com>
* CodegenLLVMHelperVisitor improved without hardcoded parameters * Added get_instance_struct_ptr to get instance structure for variable information * test/unit/codegen/codegen_data_helper.cpp : first draft implementation of codegen data helper * Added test for typecasting to the proper struct type Co-authored-by: Pramod Kumbhar <pramod.s.kumbhar@gmail.com>
* CodegenLLVMHelperVisitor improved without hardcoded parameters * Added get_instance_struct_ptr to get instance structure for variable information * test/unit/codegen/codegen_data_helper.cpp : first draft implementation of codegen data helper * Added test for typecasting to the proper struct type Co-authored-by: Pramod Kumbhar <pramod.s.kumbhar@gmail.com>
* CodegenLLVMHelperVisitor improved without hardcoded parameters * Added get_instance_struct_ptr to get instance structure for variable information * test/unit/codegen/codegen_data_helper.cpp : first draft implementation of codegen data helper * Added test for typecasting to the proper struct type Co-authored-by: Pramod Kumbhar <pramod.s.kumbhar@gmail.com>
* CodegenLLVMHelperVisitor improved without hardcoded parameters * Added get_instance_struct_ptr to get instance structure for variable information * test/unit/codegen/codegen_data_helper.cpp : first draft implementation of codegen data helper * Added test for typecasting to the proper struct type Co-authored-by: Pramod Kumbhar <pramod.s.kumbhar@gmail.com>