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

Replace mxGetPr #55

Merged
merged 8 commits into from
Jul 16, 2018
Merged

Replace mxGetPr #55

merged 8 commits into from
Jul 16, 2018

Conversation

lfarv
Copy link
Contributor

@lfarv lfarv commented Jul 16, 2018

As reported by @carmignani in #52, Matlab R2018a introduces a new C API where:

  1. The representation of complex variables is changed (interleaved real and imaginary parts instead of separate real and imaginary arrays (no problem for AT : no complex data accessible in integrators)
  2. Data access should be done with specialized macros (mxGetDoubles, mxGetInt32s...) instead of mxGetPr

This new API is accessed when using the -R2018a flag in the mex command. This not the default yet but it will come in the future. The proposed modifications apply the new API when the -R2018a flag is used and keep the old one otherwise, as for the previous Matlab versions.

While doing this, all integrators have been converted to the Python-compatible trackFunction instead of passFunction

@willrogers
Copy link
Contributor

Looks fine to me, and the tests still pass.

@carmignani
Copy link
Member

It looks very good!

@lfarv
Copy link
Contributor Author

lfarv commented Jul 16, 2018

When converting the few last integrators to the trackFunction, I found some problems with data-ordering: see #56. Until this is solved, I think that in pyat:

  • the processing of axis rotations is wrong.
  • Matrix66Pass and MatrixTijkPass are wrong

@lfarv lfarv merged commit 6fd8f7c into master Jul 16, 2018
@lfarv lfarv deleted the replace_mxGetPr branch July 16, 2018 20:08
@lfarv lfarv restored the replace_mxGetPr branch July 16, 2018 20:15
@lfarv lfarv deleted the replace_mxGetPr branch July 16, 2018 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants