diff options
author | Smit Hinsu <hinsu@google.com> | 2018-05-09 12:07:05 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-05-09 13:13:59 -0700 |
commit | 69bc455e699ba5d3b3227aff1932b556c93974d8 (patch) | |
tree | 5744b90de0c2bf1a6719063487e830d10e1b755d /tensorflow/stream_executor/host | |
parent | d3c2b54c6f10c3bdf0b7001d54556e9e7a8438c6 (diff) |
Use parenthesis based construction instead of brace initialization
Updates all the construction calls for Status, ScopedActivateContext and
mutexes withing stream_executor to follow the recommendation in
https://abseil.io/tips/88
PiperOrigin-RevId: 196007931
Diffstat (limited to 'tensorflow/stream_executor/host')
-rw-r--r-- | tensorflow/stream_executor/host/host_gpu_executor.h | 10 | ||||
-rw-r--r-- | tensorflow/stream_executor/host/host_platform.cc | 4 |
2 files changed, 7 insertions, 7 deletions
diff --git a/tensorflow/stream_executor/host/host_gpu_executor.h b/tensorflow/stream_executor/host/host_gpu_executor.h index 0c3991c151..e82f57569f 100644 --- a/tensorflow/stream_executor/host/host_gpu_executor.h +++ b/tensorflow/stream_executor/host/host_gpu_executor.h @@ -106,19 +106,19 @@ class HostExecutor : public internal::StreamExecutorInterface { bool HostCallback(Stream *stream, std::function<void()> callback) override; port::Status AllocateEvent(Event *event) override { - return port::Status{port::error::UNIMPLEMENTED, ""}; + return port::Status(port::error::UNIMPLEMENTED, ""); } port::Status DeallocateEvent(Event *event) override { - return port::Status{port::error::UNIMPLEMENTED, ""}; + return port::Status(port::error::UNIMPLEMENTED, ""); } port::Status RecordEvent(Stream *stream, Event *event) override { - return port::Status{port::error::UNIMPLEMENTED, ""}; + return port::Status(port::error::UNIMPLEMENTED, ""); } port::Status WaitForEvent(Stream *stream, Event *event) override { - return port::Status{port::error::UNIMPLEMENTED, ""}; + return port::Status(port::error::UNIMPLEMENTED, ""); } Event::Status PollForEventStatus(Event *event) override { @@ -167,7 +167,7 @@ class HostExecutor : public internal::StreamExecutorInterface { "Shared memory configuration is unsupported for host " "executors."}; LOG(INFO) << error_msg; - return port::Status{port::error::UNIMPLEMENTED, error_msg}; + return port::Status(port::error::UNIMPLEMENTED, error_msg); } bool SupportsBlas() const override; diff --git a/tensorflow/stream_executor/host/host_platform.cc b/tensorflow/stream_executor/host/host_platform.cc index a652b08b4f..eeb6a06e3d 100644 --- a/tensorflow/stream_executor/host/host_platform.cc +++ b/tensorflow/stream_executor/host/host_platform.cc @@ -70,11 +70,11 @@ HostPlatform::GetUncachedExecutor(const StreamExecutorConfig& config) { this, MakeUnique<HostExecutor>(config.plugin_config)); auto init_status = executor->Init(config.ordinal, config.device_options); if (!init_status.ok()) { - return port::Status{ + return port::Status( port::error::INTERNAL, port::Printf( "failed initializing StreamExecutor for device ordinal %d: %s", - config.ordinal, init_status.ToString().c_str())}; + config.ordinal, init_status.ToString().c_str())); } return std::move(executor); |