-
-
Notifications
You must be signed in to change notification settings - Fork 44
Use mdspan in polyset #515
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
Conversation
|
The runtime is compared to main (after the col->row) transition? |
Yes, but would be good for more people to check, if you have time. |
| #include <numeric> | ||
| #include <array> | ||
| #include <tuple> // std::apply | ||
| #include <utility> // std::pair |
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.
Looks like a lot of these includes are repeated
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.
I think these are automatically generated, so I wouldn't bother. (the file has more 5k lines of code)
Same for the other comment.
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.
Yes, it is due to the autogeneration of the single-header file
|
I've now done a few timing tests from Python, and there is a reasonable speedup with mdspan, for higher order cells. Not huge, but from 1.1x to 2x, generally. I think this is worthwhile. |
This adds an implementation of
std::mdspanfor internal use only. In theory,std::mdspanwill be part of the C++23 standard, so in the future we can switch to it.tabulate_*functions (timed 10^6 point evaluations on P3 tets, runs 3x faster than xtensor with all optimisations on).polyset.cpp