aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/stream_executor/stream.cc
diff options
context:
space:
mode:
authorGravatar Smit Hinsu <hinsu@google.com>2018-05-09 12:07:05 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-05-09 13:13:59 -0700
commit69bc455e699ba5d3b3227aff1932b556c93974d8 (patch)
tree5744b90de0c2bf1a6719063487e830d10e1b755d /tensorflow/stream_executor/stream.cc
parentd3c2b54c6f10c3bdf0b7001d54556e9e7a8438c6 (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/stream.cc')
-rw-r--r--tensorflow/stream_executor/stream.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/tensorflow/stream_executor/stream.cc b/tensorflow/stream_executor/stream.cc
index 093f0c9306..2bc9b6b798 100644
--- a/tensorflow/stream_executor/stream.cc
+++ b/tensorflow/stream_executor/stream.cc
@@ -276,7 +276,7 @@ Stream::~Stream() {
Stream &Stream::Init() {
VLOG_CALL();
- mutex_lock lock{mu_};
+ mutex_lock lock(mu_);
CHECK_EQ(false, allocated_)
<< "stream appears to already have been initialized";
CHECK(!ok_) << "stream should be in !ok() state pre-initialization";
@@ -1899,7 +1899,7 @@ Stream &Stream::ThenCopyDevice2HostBuffer(
}
Stream *Stream::GetOrCreateSubStream() {
- mutex_lock lock{mu_};
+ mutex_lock lock(mu_);
for (auto &stream : sub_streams_) {
if (stream.second) {
stream.second = false;
@@ -1916,7 +1916,7 @@ Stream *Stream::GetOrCreateSubStream() {
}
void Stream::ReturnSubStream(Stream *sub_stream) {
- mutex_lock lock{mu_};
+ mutex_lock lock(mu_);
for (auto &stream : sub_streams_) {
if (stream.first.get() == sub_stream) {
stream.second = true;
@@ -5196,7 +5196,7 @@ port::Status Stream::BlockHostUntilDone() {
port::Status first_error;
{
// Wait until all active sub-streams have done their tasks.
- mutex_lock lock{mu_};
+ mutex_lock lock(mu_);
for (auto &stream : sub_streams_) {
if (!stream.second) {
first_error.Update(stream.first->BlockHostUntilDone());