Skip to content

Conversation

@riftEmber
Copy link
Contributor

@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
Contributor 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
@arifthpe arifthpe self-assigned this Mar 6, 2025
@arifthpe arifthpe changed the title Replace c_ptrTo array workarounds with c_addrOf Replace c_ptrTo array workarounds with c_addrOf Sep 26, 2025
@arifthpe
Copy link
Collaborator

Closing in favor of #27866

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.

2 participants