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/dnn.h | |
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/dnn.h')
-rw-r--r-- | tensorflow/stream_executor/dnn.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tensorflow/stream_executor/dnn.h b/tensorflow/stream_executor/dnn.h index 18606eb717..5b533dedcb 100644 --- a/tensorflow/stream_executor/dnn.h +++ b/tensorflow/stream_executor/dnn.h @@ -882,8 +882,8 @@ enum class ElementwiseOperation { kAdd, kMultiply }; string ElementwiseOperationString(ElementwiseOperation op); -// A simple class representing the version of the backing library, to -// workaround the "too perfect forwarding" issue in gcc6+ compilers. +// A simple class representing the version of the backing library, to +// workaround the "too perfect forwarding" issue in gcc6+ compilers. // See PR#16309 and issue #18402 for links discussing the issue. class VersionInfo { public: @@ -2036,8 +2036,8 @@ class DnnSupport { const dnn::AlgorithmConfig& algorithm_config, float dropout, uint64 seed, ScratchAllocator* state_allocator) { - return port::Status{port::error::UNIMPLEMENTED, - "createRnnDescriptor is unimplemented"}; + return port::Status(port::error::UNIMPLEMENTED, + "createRnnDescriptor is unimplemented"); } // Create a RNN sequence descriptor that specifies either the input or output @@ -2051,8 +2051,8 @@ class DnnSupport { virtual port::StatusOr<std::unique_ptr<dnn::RnnSequenceTensorDescriptor>> createRnnSequenceTensorDescriptor(int seq_length, int batch_size, int data_size, dnn::DataType data_type) { - return port::Status{port::error::UNIMPLEMENTED, - "createRnnSequenceTensorDescriptor is unimplemented"}; + return port::Status(port::error::UNIMPLEMENTED, + "createRnnSequenceTensorDescriptor is unimplemented"); } // Create an RNN state descriptor that specifies the input or hidden state. @@ -2060,8 +2060,8 @@ class DnnSupport { virtual port::StatusOr<std::unique_ptr<dnn::RnnStateTensorDescriptor>> createRnnStateTensorDescriptor(int num_layer, int batch_size, int data_size, dnn::DataType data_type) { - return port::Status{port::error::UNIMPLEMENTED, - "createRnnStateTensorDescriptor is unimplemented"}; + return port::Status(port::error::UNIMPLEMENTED, + "createRnnStateTensorDescriptor is unimplemented"); } // Enqueue a forward operation of the RNN model onto the stream. |