aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/stream_executor/device_memory.h
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2017-01-20 13:29:02 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2017-01-20 13:50:05 -0800
commit3ecafa37a2c6cd3a95fc568b00c43a9b87649300 (patch)
treec07035e84b2442b889a02242318ee74417c0a340 /tensorflow/stream_executor/device_memory.h
parentbb71ec089658fb8a91423a7cf7195e5c900c2c98 (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.h5
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.