on-internet
โ† Community

How to use pointer-to-member with a non-thread address space in Metal?

Stack Overflow ยท

I have a data type that currently lives in the device address space and I'm currently trying to form a pointer-to-member to it. But whatever I do, the pointee seems to be always in the thread scope even though the parent lives in the device scope. struct InputThing { atomic_uint prm0; atomic_uint prm1; atomic_uint prm2; atomic_uint prm3; }; typedef device InputThing DInputThing; typedef device atomic_uint d_atomic_uint; d_atomic_uint DInputThing::* reference; reference = &DInputThing::prm0; // ๐Ÿ›‘ Assigning to 'd_atomic_uint DInputThing::*' from incompatible type 'metal::atomic_uint InputThing::

Comments

Sign in or sign up to comment and upvote.

No comments yet.