-
Notifications
You must be signed in to change notification settings - Fork 28
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
Generic math interface #706
Comments
The generic interface prevented inline of the small leaf routines in |
@njansson As a small comment, we mostly used |
@njansson I wonder if we can also use assumed shape arrays in |
@njansson How about a poor man's generic interface, which is just subroutine rzero(x, n)
if (NEKO_BCKND_DEVICE .eq. 1) then
x_d = device_get_ptr(x)
call device_rzero(x_d, n)
else
call cpu_rzero(x, n)
end
end This should not affect performance I suppose since this is exactly what we do all over the code? It would still clean up a lot of if-statements! |
Since |
Maybe a bit clearer, I would suggest we take the approach of |
Add a generic math interface for all kinds of backends.
math
tohost_math
#709The text was updated successfully, but these errors were encountered: