You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The existing addressof_sharedarray example already covers shared pointers stored in enum payloads, including nested structs and bounded arrays. What is currently missing is an explicit end-to-end test that passes aggregates containing shared pointers through a non-inlined device function and returns them back to the caller before using the recovered pointer as shared memory.
Motivation
A shared pointer embedded in an aggregate exercises several lowering boundaries:
construct an aggregate containing an AS3 pointer,
pass the aggregate through a device-call ABI boundary,
reconstruct/use the value in the callee,
return the aggregate,
project the pointer from the returned aggregate,
use the pointer again as shared memory.
This should be covered explicitly for the main aggregate shapes supported by the current lowering.
with #[inline(never)] #[device] round-trip helpers for:
struct
tuple
array
enum
Each returned aggregate should be validated by actually dereferencing or storing through the recovered shared pointer, rather than checking only its integer address.
Using #[inline(never)] ensures the device-call ABI boundary remains observable.
Acceptance criteria
Struct containing an AS3 pointer survives device call + return.
Tuple containing an AS3 pointer survives device call + return.
Activity