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

Improved domain and type query support for registerCommand #3786

Conversation

jeremiah-corrado
Copy link
Contributor

@jeremiah-corrado jeremiah-corrado commented Sep 19, 2024

Made the following improvements to registerCommand:

  • array formals with static element types aren't instantiated for all dtypes
  • array formal types can reference domain and type queries from other formal types
    • allows two array arguments to always have the same rank or type (preventing separate instantiation for both formals)

Examples:

The following proc is only instantiated for supported array ranks (e.g., "asdf<1>", "asdf<2>", ...) because the element type is static:

@arkouda.registerCommand()
proc asdf(ref x1: [?d] real) throws {
    ...
}

The following proc is only instantiated for one set of dtype and rank arguments (e.g., "pqrs<int,1>", "pqrs<real,1>", ...) because the domain and element type are shared:

@arkouda.registerCommand()
proc pqrs(ref x1: [?d] ?t, x2: [d] t) throws {
    ...
}

…sterCommand' annotation

Signed-off-by: Jeremiah Corrado <jeremiah.corrado@hpe.com>
Signed-off-by: Jeremiah Corrado <jeremiah.corrado@hpe.com>
Copy link
Contributor

@ajpotts ajpotts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is awesome! Thanks!

Copy link
Member

@stress-tess stress-tess left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks great!! thanks jeremiah!

@stress-tess stress-tess added this pull request to the merge queue Sep 20, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Sep 20, 2024
@stress-tess stress-tess added this pull request to the merge queue Sep 20, 2024
Merged via the queue into Bears-R-Us:master with commit 8dae0c5 Sep 20, 2024
10 checks passed
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

Successfully merging this pull request may close these issues.

3 participants