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

Feature/optimization symbolic expr degree #1889

Merged
merged 6 commits into from
Jul 1, 2022

Conversation

vincentchabannes
Copy link
Member

@vincentchabannes vincentchabannes commented Jun 30, 2022

  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes?
  • Have you successfully run the Feel++ testsuite with your changes locally?
  • Have you written Doxygen comments in your contribution ?

  • Optimization of the computation total degree of a symbolic expr (polynomial). Previously the algo complexity was clearly very bad ( double loop + recursion non-terminal). Now it's just an iterative version which is faster. For example, this computation was done with EIM->beta() online computation and the perf is huge.
  • Reduce some log verbosity

@@ -1125,7 +1153,7 @@ private :
if ( M_isNumericExpression )
return;

std::vector<std::pair<GiNaC::symbol,int>> symbTotalDegree;
std::vector<std::pair<GiNaC::symbol,uint16_type>> symbTotalDegree;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning could you keep int ?
I am making in another branch the polynomial degree dynamic like in Eigen (compile time or dynamic)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure to understand why it's a problem because, here, it's a local variable used in the algorithm (and I need to check if value is invalid_v< uint16_type> or not. If really an issue, we can change to int and check non negative value.

@prudhomm prudhomm merged commit d907e3f into develop Jul 1, 2022
@prudhomm prudhomm deleted the feature/optimization_symbolic_expr_degree branch July 1, 2022 04:38
@prudhomm prudhomm added this to the v110 milestone Jul 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants