From c31294351628addffc1cd89687fad0e81bac5a55 Mon Sep 17 00:00:00 2001 From: "A. Unique TensorFlower" Date: Fri, 20 Jan 2017 11:32:36 -0800 Subject: Better StreamExecutor constructor Using std::unique for the implementation argument makes it clear that StreamExecutor is taking ownership of that argument. Change: 145107302 --- tensorflow/stream_executor/stream_executor_pimpl.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tensorflow/stream_executor/stream_executor_pimpl.cc') diff --git a/tensorflow/stream_executor/stream_executor_pimpl.cc b/tensorflow/stream_executor/stream_executor_pimpl.cc index 71a5a45b67..c498eecb3c 100644 --- a/tensorflow/stream_executor/stream_executor_pimpl.cc +++ b/tensorflow/stream_executor/stream_executor_pimpl.cc @@ -164,9 +164,10 @@ StreamExecutor::StreamExecutor(PlatformKind platform_kind, } StreamExecutor::StreamExecutor( - const Platform *platform, internal::StreamExecutorInterface *implementation) + const Platform *platform, + std::unique_ptr implementation) : platform_(platform), - implementation_(implementation), + implementation_(std::move(implementation)), device_ordinal_(-1), background_threads_(new port::ThreadPool( port::Env::Default(), "stream_executor", kNumBackgroundThreads)), -- cgit v1.2.3