SmDevice2DeviceSemaphore sem(communicator, connection);
auto handle = sem.deviceHandle();
But this a case of illegal usage as we need to call communicator.setup() in between the object construction and the call to deviceHandle() method. We may need to either call the setup() internally or make the internal sendMemoryOnSetup() and recvMemoryOnSetup() calls to be more explicit.
Host2DeviceSemaphore::deviceHandle()
andSmDevice2DeviceSemaphore::deviceHandle()
interfaces look like for retrieving properties of the class object, suggesting usage such as:But this a case of illegal usage as we need to call
communicator.setup()
in between the object construction and the call todeviceHandle()
method. We may need to either call thesetup()
internally or make the internalsendMemoryOnSetup()
andrecvMemoryOnSetup()
calls to be more explicit.