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

FEEvaluation: Add some padding between different data fields #15941

Merged
merged 1 commit into from Aug 30, 2023

Conversation

kronbichler
Copy link
Member

@kronbichler kronbichler commented Aug 29, 2023

This PR adds some padding between the values_dofs, values_quad, gradients_quad and hessians_quad fields of FEEvaluationData. This can help the caching strategies of processors, in particular set associative caches and directly mapped caches: In case the number of unknowns or data fields is a power of 2 (e.g. polynomial degree 3 with 4 quadrature points per direction), one can get conflict misses in FEEvaluation::get_value()/get_gradient() when the two fields are some fixed amount of bytes apart, e.g. 4096 bytes on 32 kiB L1 caches with 8 ways, and there are sufficiently many. This PR reduces the probability by arranging the fields with some gaps. These gaps are 4 * sizeof(VectorizedArray), and thus break powers of 2 except for the tiny sizes.

I have another much bigger PR later where I will also rearrange the entries within the gradients, but this change here is independent.

@masterleinad masterleinad merged commit 9e4242c into dealii:master Aug 30, 2023
15 checks passed
@kronbichler kronbichler deleted the pad_some_arrays branch March 18, 2024 08:31
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

3 participants