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

Replace c_ptrTo array workarounds with c_addrOf #26175

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

riftEmber
Copy link
Member

@riftEmber riftEmber commented Oct 30, 2024

Replace instances of c_pointer_return with c_addrOf in module code (besides CTypes itself), and allow passing domains to c_addrOf.

There are a few instances in module code where c_pointer_return is used directly rather than c_ptrTo to avoid its special behavior on arrays. However, we now have c_addrOf as an alternative that has no such special behavior that should be used instead. This PR updates all instances to use c_addrOf instead of workarounds.

Resolves https://github.com/Cray/chapel-private/issues/6587.

[reviewer info placeholder]

Testing:

  • paratest
  • C backend paratest
  • gasnet paratest
  • GPU tests

@riftEmber riftEmber marked this pull request as draft October 30, 2024 17:39
@riftEmber riftEmber changed the title Replace some c_ptrTo array workarounds with c_addrOf Replace c_ptrTo array workarounds with c_addrOf Oct 31, 2024
@riftEmber riftEmber force-pushed the remove-cptr-workarounds branch from 083f2ef to 41805a2 Compare October 31, 2024 15:49
@riftEmber riftEmber marked this pull request as ready for review October 31, 2024 15:49
@riftEmber riftEmber force-pushed the remove-cptr-workarounds branch from 41805a2 to 460e0f6 Compare October 31, 2024 15:58
@riftEmber
Copy link
Member Author

This currently fails gasnet paratest because apparently we take arrays of addresses on other locales; see https://github.com/Cray/chapel-private/issues/6587#issuecomment-2450278329.

@riftEmber riftEmber marked this pull request as draft November 4, 2024 18:05
@riftEmber riftEmber force-pushed the remove-cptr-workarounds branch from 460e0f6 to 554cd4a Compare January 17, 2025 19:35
@riftEmber riftEmber marked this pull request as ready for review January 17, 2025 19:36
@riftEmber riftEmber force-pushed the remove-cptr-workarounds branch 2 times, most recently from 58ee116 to 9d60cf1 Compare January 27, 2025 20:45
@riftEmber riftEmber force-pushed the remove-cptr-workarounds branch 14 times, most recently from aa601c5 to d5ebbcb Compare January 29, 2025 21:28
@riftEmber riftEmber force-pushed the remove-cptr-workarounds branch from d5ebbcb to 9772374 Compare January 30, 2025 16:59
@riftEmber riftEmber marked this pull request as draft January 30, 2025 16:59
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.

1 participant