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

Specialize EvaluatorTensorProduct<evaluate_evenodd> for non-templated execution #14237

Merged
merged 1 commit into from Sep 7, 2022

Conversation

peterrum
Copy link
Member

@peterrum peterrum commented Sep 3, 2022

No description provided.

Comment on lines +1580 to +1581
inline void
even_odd_apply(const int n_rows_in,
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 made this to free function, since ...

Comment on lines 1952 to 1964
static void
apply(const Number2 *DEAL_II_RESTRICT shape_data,
Copy link
Member Author

Choose a reason for hiding this comment

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

... the "old" apply function is static, which does not work for the non-templated case, where we pass in the bounds via the constructor.

{
for (int i1 = 0; i1 < n_blocks1; ++i1)
{
Number xp[mid > 0 ? mid : 1], xm[mid > 0 ? mid : 1];
Copy link
Member

Choose a reason for hiding this comment

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

Does this work? This would create a variable-sized array, which is (IIRC) a GNU extension.

Copy link
Member Author

Choose a reason for hiding this comment

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

You are right. I am a bit surprised that I did not get a warning. I have pushed a fix.

@peterrum
Copy link
Member Author

peterrum commented Sep 3, 2022

/rebuild

Copy link
Member

@kronbichler kronbichler left a comment

Choose a reason for hiding this comment

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

This looks good. As far as I can see, this should not have any effect on the code generation for the case n_rows > 0, so I am looking forward to see this confirmed in the performance tests.

@kronbichler kronbichler merged commit ef74666 into dealii:master Sep 7, 2022
mkghadban pushed a commit to OpenFCST/dealii that referenced this pull request Sep 8, 2022
Specialize EvaluatorTensorProduct<evaluate_evenodd> for non-templated execution
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants