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

Add a new interface in backends for summing two fields #38

Open
semi-h opened this issue Feb 14, 2024 · 0 comments
Open

Add a new interface in backends for summing two fields #38

semi-h opened this issue Feb 14, 2024 · 0 comments
Assignees
Labels
core Issue affecting core mechanisms of the software cuda Related to CUDA backend omp Related to openMP backend performance

Comments

@semi-h
Copy link
Member

semi-h commented Feb 14, 2024

With #37 we have three distinct subroutines carrying out similar work, sum_yintox, sum_zintox, and vecadd. Just like we did in reorder subroutine we can combine all these into one interface with a switch statement.

backend%add(u, u_, SUM_Y2X)

we can make the switch statement optional so that if nothing is passed two arrays are summed without doing any reordering, resulting in the current vecadd.

The only thing is, we need this add to be able to scale u_ at least so that it can be used in the time integrator and also at the very end in the pressure correction step. I don't think we need this scaling option when we're adding a y or z oriented array into x. Given this is the case, is it better to have 2 interfaces, one combines sum_yintox and sum_zintox, and the other just deals with vecadd including scaling the input/output fields? Any thoughts?

@Nanoseb Nanoseb added core Issue affecting core mechanisms of the software performance labels Feb 16, 2024
@JamieJQuinn JamieJQuinn added omp Related to openMP backend cuda Related to CUDA backend labels Feb 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Issue affecting core mechanisms of the software cuda Related to CUDA backend omp Related to openMP backend performance
Projects
None yet
Development

No branches or pull requests

3 participants