[Parallel_libs-commits] [PATCH] D24195: [SE] GlobalDeviceMemory owns its handle

Jason Henline via Parallel_libs-commits parallel_libs-commits at lists.llvm.org
Fri Sep 2 09:42:52 PDT 2016


jhen created this revision.
jhen added a reviewer: jlebar.
jhen added subscribers: parallel_libs-commits, jprice.

Final step in getting GlobalDeviceMemory to own its handle.

* Make GlobalDeviceMemory movable, but no longer copyable.
* Make Device::freeDeviceMemory function private and make
  GlobalDeviceMemoryBase a friend of Device so GlobalDeviceMemoryBase
  can free its memory in its destructor.
* Make GlobalDeviceMemory constructor private and make Device a friend
  so it can construct GlobalDeviceMemory.
* Remove SharedDeviceMemoryBase class because it is never used.
* Remove explicit memory freeing from example code.

This change just consumes any errors generated during device memory freeing.
The real error handling will be added in a future patch.

https://reviews.llvm.org/D24195

Files:
  streamexecutor/examples/Example.cpp
  streamexecutor/include/streamexecutor/Device.h
  streamexecutor/include/streamexecutor/DeviceMemory.h
  streamexecutor/lib/CMakeLists.txt
  streamexecutor/lib/DeviceMemory.cpp
  streamexecutor/lib/unittests/DeviceTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D24195.70177.patch
Type: text/x-patch
Size: 16418 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/parallel_libs-commits/attachments/20160902/0f6a0830/attachment.bin>


More information about the Parallel_libs-commits mailing list