Spoc_framework.Shared_memory_queryWhether a device shares system memory with the host (an APU or integrated GPU), as the backend that owns the device knows it. See the implementation for why this is a hook and not a field. The framework name must be the backend's name ("HIP", "CUDA/PTX", "CUDA/C"): a mismatch is read as "not known".
set ~framework f installs f, which maps a backend-local device index to "this device shares host memory". A second call for the same framework replaces the first. f runs in the calling domain: it is as thread-safe as the backend's own device lookup, which the HIP and CUDA queries use (and which may create the device on a first call).