From ae0a757cb16b7c941ce3fc292976beef46391d9e Mon Sep 17 00:00:00 2001 From: Rickard Date: Thu, 17 Sep 2020 11:08:05 +0200 Subject: [PATCH 1/7] cc/client/client_session.h: Single-parameter constructor should be marked explicit --- tensorflow/cc/client/client_session.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tensorflow/cc/client/client_session.h b/tensorflow/cc/client/client_session.h index 3765eaec9bf..a661319b074 100644 --- a/tensorflow/cc/client/client_session.h +++ b/tensorflow/cc/client/client_session.h @@ -64,7 +64,7 @@ class ClientSession { ClientSession(const Scope& scope, const string& target); /// Same as above, but use the empty string ("") as the target specification. - ClientSession(const Scope& scope); + explicit ClientSession(const Scope& scope); /// Create a new session, configuring it with `session_options`. ClientSession(const Scope& scope, const SessionOptions& session_options); From ea51c5c995d1cd0ec76d2478b62bbf988327b243 Mon Sep 17 00:00:00 2001 From: Rickard Date: Thu, 17 Sep 2020 11:09:49 +0200 Subject: [PATCH 2/7] cc/gradients/grad_testutil.h: Add #include for vector<> --- tensorflow/cc/gradients/grad_testutil.h | 1 + 1 file changed, 1 insertion(+) diff --git a/tensorflow/cc/gradients/grad_testutil.h b/tensorflow/cc/gradients/grad_testutil.h index 70c81f1a73a..b576a05ed4f 100644 --- a/tensorflow/cc/gradients/grad_testutil.h +++ b/tensorflow/cc/gradients/grad_testutil.h @@ -16,6 +16,7 @@ limitations under the License. #ifndef TENSORFLOW_CC_GRADIENTS_GRAD_TESTUTIL_H_ #define TENSORFLOW_CC_GRADIENTS_GRAD_TESTUTIL_H_ +#include #include "tensorflow/cc/framework/ops.h" #include "tensorflow/cc/framework/scope.h" From 9a6d8fc7f4e466913c7ee8211ea26c74a0d95087 Mon Sep 17 00:00:00 2001 From: Rickard Date: Thu, 17 Sep 2020 11:11:03 +0200 Subject: [PATCH 3/7] cc/ops/const_op.h: Add #include for vector<> --- tensorflow/cc/ops/const_op.h | 1 + 1 file changed, 1 insertion(+) diff --git a/tensorflow/cc/ops/const_op.h b/tensorflow/cc/ops/const_op.h index 424a683665f..c6e5896e421 100644 --- a/tensorflow/cc/ops/const_op.h +++ b/tensorflow/cc/ops/const_op.h @@ -16,6 +16,7 @@ limitations under the License. #ifndef TENSORFLOW_CC_OPS_CONST_OP_H_ #define TENSORFLOW_CC_OPS_CONST_OP_H_ +#include #include "tensorflow/cc/framework/ops.h" #include "tensorflow/cc/framework/scope.h" #include "tensorflow/core/graph/node_builder.h" From 6e7a1c901eee20babaaaf8097c995ee53801e454 Mon Sep 17 00:00:00 2001 From: Rickard Date: Thu, 17 Sep 2020 11:12:22 +0200 Subject: [PATCH 4/7] cc/ops/const_op.h: Add #include for vector<> and #include for string --- tensorflow/cc/ops/while_loop.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tensorflow/cc/ops/while_loop.h b/tensorflow/cc/ops/while_loop.h index 727237b5c7a..b224ebf3f78 100644 --- a/tensorflow/cc/ops/while_loop.h +++ b/tensorflow/cc/ops/while_loop.h @@ -16,6 +16,8 @@ limitations under the License. #ifndef TENSORFLOW_CC_OPS_WHILE_LOOP_H_ #define TENSORFLOW_CC_OPS_WHILE_LOOP_H_ +#include +#include #include "tensorflow/cc/framework/ops.h" #include "tensorflow/cc/framework/scope.h" From 44275dc6b0d2bc8620dacccc1a12a66aea3edef0 Mon Sep 17 00:00:00 2001 From: Rickard Date: Thu, 17 Sep 2020 11:14:49 +0200 Subject: [PATCH 5/7] cc/profiler/profiler.h: Add #include for unique_ptr<> and #include for string --- tensorflow/cc/profiler/profiler.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tensorflow/cc/profiler/profiler.h b/tensorflow/cc/profiler/profiler.h index 64edbb5766c..56f3e603848 100644 --- a/tensorflow/cc/profiler/profiler.h +++ b/tensorflow/cc/profiler/profiler.h @@ -16,6 +16,8 @@ limitations under the License. #ifndef TENSORFLOW_CC_PROFILER_PROFILER_H_ #define TENSORFLOW_CC_PROFILER_PROFILER_H_ +#include +#include #include "tensorflow/core/framework/graph.pb.h" #include "tensorflow/core/lib/core/status.h" #include "tensorflow/core/profiler/internal/tfprof_stats.h" From 78a3e527caf5d568b567fd4f16db7ae8b995afe2 Mon Sep 17 00:00:00 2001 From: Rickard Date: Thu, 17 Sep 2020 11:15:38 +0200 Subject: [PATCH 6/7] cc/profiler/profiler.h: Marking single-parameter constructor as explicit --- tensorflow/cc/profiler/profiler.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tensorflow/cc/profiler/profiler.h b/tensorflow/cc/profiler/profiler.h index 56f3e603848..6ac46b37a95 100644 --- a/tensorflow/cc/profiler/profiler.h +++ b/tensorflow/cc/profiler/profiler.h @@ -58,7 +58,7 @@ namespace tfprof { class Profiler { public: /// `graph` is the model's GraphDef. - Profiler(const GraphDef& graph); + explicit Profiler(const GraphDef& graph); /// Adds tracing information `run_meta` to profiler. A `run_meta` is /// generated by a TensorFlow session run call. `step` is the key From b3ce8724d5052a199b540751703429c8c9f71f8f Mon Sep 17 00:00:00 2001 From: Rickard Date: Thu, 17 Sep 2020 11:17:01 +0200 Subject: [PATCH 7/7] Adding space between C++ standard library headers and project headers --- tensorflow/cc/gradients/grad_testutil.h | 1 + tensorflow/cc/ops/const_op.h | 1 + tensorflow/cc/ops/while_loop.h | 1 + tensorflow/cc/profiler/profiler.h | 1 + 4 files changed, 4 insertions(+) diff --git a/tensorflow/cc/gradients/grad_testutil.h b/tensorflow/cc/gradients/grad_testutil.h index b576a05ed4f..43d533ad760 100644 --- a/tensorflow/cc/gradients/grad_testutil.h +++ b/tensorflow/cc/gradients/grad_testutil.h @@ -17,6 +17,7 @@ limitations under the License. #define TENSORFLOW_CC_GRADIENTS_GRAD_TESTUTIL_H_ #include + #include "tensorflow/cc/framework/ops.h" #include "tensorflow/cc/framework/scope.h" diff --git a/tensorflow/cc/ops/const_op.h b/tensorflow/cc/ops/const_op.h index c6e5896e421..9c888701b45 100644 --- a/tensorflow/cc/ops/const_op.h +++ b/tensorflow/cc/ops/const_op.h @@ -17,6 +17,7 @@ limitations under the License. #define TENSORFLOW_CC_OPS_CONST_OP_H_ #include + #include "tensorflow/cc/framework/ops.h" #include "tensorflow/cc/framework/scope.h" #include "tensorflow/core/graph/node_builder.h" diff --git a/tensorflow/cc/ops/while_loop.h b/tensorflow/cc/ops/while_loop.h index b224ebf3f78..ee63d803ffa 100644 --- a/tensorflow/cc/ops/while_loop.h +++ b/tensorflow/cc/ops/while_loop.h @@ -18,6 +18,7 @@ limitations under the License. #include #include + #include "tensorflow/cc/framework/ops.h" #include "tensorflow/cc/framework/scope.h" diff --git a/tensorflow/cc/profiler/profiler.h b/tensorflow/cc/profiler/profiler.h index 6ac46b37a95..7436179c0b9 100644 --- a/tensorflow/cc/profiler/profiler.h +++ b/tensorflow/cc/profiler/profiler.h @@ -18,6 +18,7 @@ limitations under the License. #include #include + #include "tensorflow/core/framework/graph.pb.h" #include "tensorflow/core/lib/core/status.h" #include "tensorflow/core/profiler/internal/tfprof_stats.h"