diff options
author | A. Unique TensorFlower <gardener@tensorflow.org> | 2017-01-20 11:32:36 -0800 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2017-01-20 11:45:29 -0800 |
commit | c31294351628addffc1cd89687fad0e81bac5a55 (patch) | |
tree | b46ae106452f55a0e65b132f1ee33399a6c6b0ed /tensorflow/stream_executor/stream_executor_pimpl.h | |
parent | 45208ae00457d92ae4bb5889a35597a155074457 (diff) |
Better StreamExecutor constructor
Using std::unique for the implementation argument makes it clear that
StreamExecutor is taking ownership of that argument.
Change: 145107302
Diffstat (limited to 'tensorflow/stream_executor/stream_executor_pimpl.h')
-rw-r--r-- | tensorflow/stream_executor/stream_executor_pimpl.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tensorflow/stream_executor/stream_executor_pimpl.h b/tensorflow/stream_executor/stream_executor_pimpl.h index 83fd27599e..a5da0e047e 100644 --- a/tensorflow/stream_executor/stream_executor_pimpl.h +++ b/tensorflow/stream_executor/stream_executor_pimpl.h @@ -17,6 +17,7 @@ limitations under the License. #define TENSORFLOW_STREAM_EXECUTOR_STREAM_EXECUTOR_PIMPL_H_ #include <atomic> +#include <memory> #include <set> #include <tuple> #include <vector> @@ -71,8 +72,10 @@ class StreamExecutor { public: explicit StreamExecutor(PlatformKind kind, const PluginConfig &plugin_config = PluginConfig()); - StreamExecutor(const Platform *platform, - internal::StreamExecutorInterface *implementation); + + StreamExecutor( + const Platform *platform, + std::unique_ptr<internal::StreamExecutorInterface> implementation); ~StreamExecutor(); |