The returned MemoryResource should only be used with the current CUDA device.
Changing the current device (e.g. calling Device.activate()) and then using the returned
resource can result in undefined behavior. The behavior of a MemoryResource is undefined
if used while the active CUDA device is a different device from the one that was active when the
MemoryResource was created.
Note
The returned MemoryResource should only be used with the current CUDA device. Changing the current device (e.g. calling
Device.activate()) and then using the returned resource can result in undefined behavior. The behavior of a MemoryResource is undefined if used while the active CUDA device is a different device from the one that was active when the MemoryResource was created.