-
-
Notifications
You must be signed in to change notification settings - Fork 410
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
improve inlining specifications and fix a few problems #386
Conversation
@mreineck this is great!! let's see if it passes the tests. |
@mreineck Okay it seems to be stumbling at |
@mreineck there is always the possibility to mark this test as |
@mreineck, @wkerzendorf |
@unoebauer this is very good!! |
I think we are now roughly a factor of 10 below my initial cython implementation 😉 |
@mreinecke @wkerzendorf |
@@ -274,7 +278,7 @@ bool | |||
test_montecarlo_bound_free_scatter(){ | |||
double DISTANCE = 1e13; | |||
montecarlo_bound_free_scatter(rp, sm, DISTANCE); | |||
return rpacket_get_status(rp); | |||
return (rpacket_get_status(rp)!=0); |
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.
@mreineck no mark it as xfail in the python file. Here's how: https://github.com/tardis-sn/tardis/blob/master/tardis/montecarlo/tests/test_cmontecarlo.py#L74 add @pytest.mark.xfail
above that. that will show us continually that this is an xfail.
I did that now as well. But the condition in the C code was also incorrect: thet status can go from 0 to some positive value>1, but the return type of bool indicates that only 0 and 1 are acceptable. |
Well it seems all checks pass. @orbitfold can you have a quick view as well? If we are all happy - let's merge. |
improve inlining specifications and fix a few problems
This pull request should enable all small rpacket-related functions to be inlinable, by moving them from rpacket.c to rpacket.h. I also fixed a few other inline-related problems, added missing prototypes to the header files and created an extra header for mt_state and line_search(), to avoid recursive header inclusion.