diff options
author | A. Unique TensorFlower <gardener@tensorflow.org> | 2017-01-20 13:29:02 -0800 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2017-01-20 13:50:05 -0800 |
commit | 3ecafa37a2c6cd3a95fc568b00c43a9b87649300 (patch) | |
tree | c07035e84b2442b889a02242318ee74417c0a340 /tensorflow/stream_executor/device_memory.h | |
parent | bb71ec089658fb8a91423a7cf7195e5c900c2c98 (diff) |
Add default ScopedDeviceMemory ctor in StreamExecutor
Change: 145120921
Diffstat (limited to 'tensorflow/stream_executor/device_memory.h')
-rw-r--r-- | tensorflow/stream_executor/device_memory.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tensorflow/stream_executor/device_memory.h b/tensorflow/stream_executor/device_memory.h index bcb0664b04..47bd0b0c38 100644 --- a/tensorflow/stream_executor/device_memory.h +++ b/tensorflow/stream_executor/device_memory.h @@ -182,6 +182,11 @@ class SharedDeviceMemory final : public DeviceMemoryBase { template <typename ElemT> class ScopedDeviceMemory { public: + // Default construction initializes the internal state to nullptr. This + // mirrors the std::unique_ptr<> functionality, where default construction + // produces a nullptr unique_ptr, which can be assigned later. + ScopedDeviceMemory(); + // Parameters: // parent: Executor used to deallocate memory when this instance goes // out of scope. |