This is the first in a series of patches that will convert
GlobalDeviceMemory to own its device memory handle. The first step is to
remove GlobalDeviceMemoryBase from the PlatformInterface interfaces and
use raw handles there instead. This is useful because
GlobalDeviceMemoryBase is going to lose its importance in this process.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
I like factoring out this test platform.
streamexecutor/include/streamexecutor/PlatformInterfaces.h | ||
---|---|---|
108 ↗ | (On Diff #69933) | Do we want the dst handles to be non-const void*s? Or is the idea that the handle is always a const thing because you never write to it from host code? |
134 ↗ | (On Diff #69933) | Same for the handle we're freeing here. (Although, as was pointed out to me recently, it's perfectly OK to call delete on a C++ const pointer.) |
streamexecutor/include/streamexecutor/PlatformInterfaces.h | ||
---|---|---|
108 ↗ | (On Diff #69933) | Yeah, I wanted it to be const because I think that's more appropriate for an opaque handle. I'll keep it that way unless others want it changed. |
134 ↗ | (On Diff #69933) | My idea is that the platform-specific implementation Will probably have to cast this handle to something else before using it anyway, so throwing on a const_cast too, if necessary, should seem natural. |