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

CUF/ACC: Translate size(<array>[,<dim>]) and lbound(...) and ubound(...) #12

Open
4 of 6 tasks
domcharrier opened this issue May 20, 2021 · 0 comments
Open
4 of 6 tasks

Comments

@domcharrier
Copy link
Collaborator

domcharrier commented May 20, 2021

  • In extracted kernels / device subroutines, we sometimes need to translate size(<array>[,<dim>]), lbound(<array>,<dim>)
    and ubound(<array>,<dim>) intrinsic calls,

Implementation status for different types of <array> and <dim>:

  • <array> is identifier and <dim> is integer literal:
    • size(<array>,<dim>) -> <array>_n<dim>
    • lbound(<array>,<dim>) -> <array>_lb<dim>
    • ubound(<array>,<dim>) -> <array>_lb<dim> + <array>_n<dim>

NOTE: Above, the <array>_lb<dim> and <array>_n<dim> are already arguments of
the extracted routines.

  • <array> is identifier and <dim> is identifier | arithmetic expression

    • In this case, we need to generate a query function that is parameterized by array rank.
  • Other cases where <array> is not an identifier and / or <dim> is identifier are not supported

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant