Closed tkoskela closed 8 months ago
I don't see any noticeable performance impact of passing the subroutine as an argument instead of selecting it with an if
statement inside the loop nest. I like not having an if
statement at the bottom of the loop nest from a code readability point of view.
Only minor aesthetic comments
Thanks! All done now
Closes #244
I've merged the two identical subroutines into
PAO_or_gradPAO_to_grid
. The subroutine called in the inner loop is passed in as a procedure argument through an interface. As a side effect I had to always passdirection
into both subroutines to make them conform to the same interface, inevaluate_pao
it's just a dummy argument that does nothing. I've updated all calls toPAO_or_gradPAO_to_grid
,evaluate_pao
andpao_elem_derivative_2
and added a bit of explanation in comments.Very open to a more descriptive names for the subroutine and the interface
Gets rid of OpenMP overheads in
single_PAO_to_grad
we were seeing earlierPreviously:
This PR: