diff options
author | Derek Murray <mrry@google.com> | 2018-09-05 18:16:33 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-09-05 18:20:28 -0700 |
commit | ad5c0c4d091c93ef65e91c55cb4df065d0c7a989 (patch) | |
tree | 7a2fb348f4fab36e3b65963a7613c3ac8f8f21a4 /tensorflow/contrib/data | |
parent | 7ec8114697a78271277c1b81707f53057d047901 (diff) |
[tf.data] Move all C++ code inside the `tensorflow::data` namespace.
PiperOrigin-RevId: 211733735
Diffstat (limited to 'tensorflow/contrib/data')
11 files changed, 24 insertions, 9 deletions
diff --git a/tensorflow/contrib/data/kernels/assert_next_dataset_op.cc b/tensorflow/contrib/data/kernels/assert_next_dataset_op.cc index e36c9c0634..c19a609780 100644 --- a/tensorflow/contrib/data/kernels/assert_next_dataset_op.cc +++ b/tensorflow/contrib/data/kernels/assert_next_dataset_op.cc @@ -19,6 +19,7 @@ limitations under the License. #include "tensorflow/core/framework/tensor.h" namespace tensorflow { +namespace data { namespace { // See documentation in ../ops/dataset_ops.cc for a high-level @@ -150,4 +151,5 @@ REGISTER_KERNEL_BUILDER(Name("AssertNextDataset").Device(DEVICE_CPU), AssertNextDatasetOp); } // namespace +} // namespace data } // namespace tensorflow diff --git a/tensorflow/contrib/data/kernels/csv_dataset_op.cc b/tensorflow/contrib/data/kernels/csv_dataset_op.cc index 0ba905b92e..74107d5242 100644 --- a/tensorflow/contrib/data/kernels/csv_dataset_op.cc +++ b/tensorflow/contrib/data/kernels/csv_dataset_op.cc @@ -24,6 +24,7 @@ limitations under the License. #include "tensorflow/core/lib/io/zlib_inputstream.h" namespace tensorflow { +namespace data { namespace { class CSVDatasetOp : public DatasetOpKernel { @@ -851,4 +852,5 @@ class CSVDatasetOp : public DatasetOpKernel { REGISTER_KERNEL_BUILDER(Name("CSVDataset").Device(DEVICE_CPU), CSVDatasetOp); } // namespace +} // namespace data } // namespace tensorflow diff --git a/tensorflow/contrib/data/kernels/directed_interleave_dataset_op.cc b/tensorflow/contrib/data/kernels/directed_interleave_dataset_op.cc index ccf7ec1f84..a5321620bf 100644 --- a/tensorflow/contrib/data/kernels/directed_interleave_dataset_op.cc +++ b/tensorflow/contrib/data/kernels/directed_interleave_dataset_op.cc @@ -18,7 +18,7 @@ limitations under the License. #include "tensorflow/core/lib/hash/hash.h" namespace tensorflow { - +namespace data { namespace { // See documentation in ../ops/dataset_ops.cc for a high-level @@ -276,5 +276,5 @@ REGISTER_KERNEL_BUILDER(Name("DirectedInterleaveDataset").Device(DEVICE_CPU), DirectedInterleaveDatasetOp); } // namespace - +} // namespace data } // namespace tensorflow diff --git a/tensorflow/contrib/data/kernels/identity_indexed_dataset.cc b/tensorflow/contrib/data/kernels/identity_indexed_dataset.cc index 4718c1c8b9..c3cb45dbf7 100644 --- a/tensorflow/contrib/data/kernels/identity_indexed_dataset.cc +++ b/tensorflow/contrib/data/kernels/identity_indexed_dataset.cc @@ -17,6 +17,7 @@ limitations under the License. #include "tensorflow/core/lib/core/errors.h" namespace tensorflow { +namespace data { namespace { class IdentityIndexedDatasetOp : public IndexedDatasetOpKernel { @@ -150,4 +151,5 @@ REGISTER_KERNEL_BUILDER(Name("IdentityIndexedDataset").Device(DEVICE_CPU), IdentityIndexedDatasetOp); } // namespace +} // namespace data } // namespace tensorflow diff --git a/tensorflow/contrib/data/kernels/ignore_errors_dataset_op.cc b/tensorflow/contrib/data/kernels/ignore_errors_dataset_op.cc index db24e60846..beec344534 100644 --- a/tensorflow/contrib/data/kernels/ignore_errors_dataset_op.cc +++ b/tensorflow/contrib/data/kernels/ignore_errors_dataset_op.cc @@ -18,7 +18,7 @@ limitations under the License. #include "tensorflow/core/lib/random/random.h" namespace tensorflow { - +namespace data { namespace { // See documentation in ../ops/dataset_ops.cc for a high-level @@ -137,5 +137,5 @@ REGISTER_KERNEL_BUILDER(Name("IgnoreErrorsDataset").Device(DEVICE_CPU), IgnoreErrorsDatasetOp); } // namespace - +} // namespace data } // namespace tensorflow diff --git a/tensorflow/contrib/data/kernels/indexed_dataset.cc b/tensorflow/contrib/data/kernels/indexed_dataset.cc index c69564a31b..ced8ab0d60 100644 --- a/tensorflow/contrib/data/kernels/indexed_dataset.cc +++ b/tensorflow/contrib/data/kernels/indexed_dataset.cc @@ -20,7 +20,7 @@ limitations under the License. #include "tensorflow/core/lib/gtl/cleanup.h" namespace tensorflow { - +namespace data { namespace { Status VerifyTypesMatch(const DataTypeVector& expected, @@ -367,6 +367,7 @@ REGISTER_KERNEL_BUILDER(Name("IndexedDatasetMaterialize").Device(DEVICE_CPU), MaterializeDatasetOp); REGISTER_KERNEL_BUILDER(Name("IndexedDatasetGet").Device(DEVICE_CPU), IndexedDatasetGet); -} // namespace +} // namespace +} // namespace data } // namespace tensorflow diff --git a/tensorflow/contrib/data/kernels/indexed_dataset.h b/tensorflow/contrib/data/kernels/indexed_dataset.h index 6149de888c..7aa2d3fdbc 100644 --- a/tensorflow/contrib/data/kernels/indexed_dataset.h +++ b/tensorflow/contrib/data/kernels/indexed_dataset.h @@ -19,6 +19,7 @@ limitations under the License. #include "tensorflow/core/framework/op_kernel.h" namespace tensorflow { +namespace data { // TODO(saeta): Urgh, this is ugly. class MaterializedIndexedDataset { @@ -112,6 +113,7 @@ Status GetIndexedDatasetFromVariantTensor(const Tensor& tensor, Status StoreIndexedDatasetInVariantTensor(IndexedDataset* dataset, Tensor* tensor); +} // namespace data } // namespace tensorflow #endif // TENSORFLOW_CONTRIB_DATA_KERNELS_INDEXED_DATASET_H_ diff --git a/tensorflow/contrib/data/kernels/lmdb_dataset_op.cc b/tensorflow/contrib/data/kernels/lmdb_dataset_op.cc index 80f39992fb..d233c1f8ec 100644 --- a/tensorflow/contrib/data/kernels/lmdb_dataset_op.cc +++ b/tensorflow/contrib/data/kernels/lmdb_dataset_op.cc @@ -22,6 +22,7 @@ limitations under the License. #include "lmdb.h" // NOLINT(build/include) namespace tensorflow { +namespace data { namespace { class LMDBDatasetOp : public DatasetOpKernel { @@ -212,4 +213,5 @@ class LMDBDatasetOp : public DatasetOpKernel { REGISTER_KERNEL_BUILDER(Name("LMDBDataset").Device(DEVICE_CPU), LMDBDatasetOp); } // namespace +} // namespace data } // namespace tensorflow diff --git a/tensorflow/contrib/data/kernels/prefetching_kernels.cc b/tensorflow/contrib/data/kernels/prefetching_kernels.cc index 725f8933c9..078de717e0 100644 --- a/tensorflow/contrib/data/kernels/prefetching_kernels.cc +++ b/tensorflow/contrib/data/kernels/prefetching_kernels.cc @@ -24,6 +24,7 @@ limitations under the License. #include "tensorflow/core/util/device_name_utils.h" namespace tensorflow { +namespace data { namespace { struct BufferElement { @@ -1114,5 +1115,6 @@ REGISTER_KERNEL_BUILDER( Name("MultiDeviceIteratorFromStringHandle").Device(DEVICE_CPU), MultiDeviceIteratorFromStringHandleOp); -} // anonymous namespace +} // namespace +} // namespace data } // namespace tensorflow diff --git a/tensorflow/contrib/data/kernels/threadpool_dataset_op.cc b/tensorflow/contrib/data/kernels/threadpool_dataset_op.cc index ab584504a0..30fa97a636 100644 --- a/tensorflow/contrib/data/kernels/threadpool_dataset_op.cc +++ b/tensorflow/contrib/data/kernels/threadpool_dataset_op.cc @@ -20,6 +20,7 @@ limitations under the License. #include "tensorflow/core/util/work_sharder.h" namespace tensorflow { +namespace data { namespace { class ThreadPoolResource : public ResourceBase { @@ -214,4 +215,5 @@ REGISTER_KERNEL_BUILDER(Name("ThreadPoolDataset").Device(DEVICE_CPU), ThreadPoolDatasetOp); } // namespace +} // namespace data } // namespace tensorflow diff --git a/tensorflow/contrib/data/kernels/unique_dataset_op.cc b/tensorflow/contrib/data/kernels/unique_dataset_op.cc index 6fbf5d2ebb..57fc5697a4 100644 --- a/tensorflow/contrib/data/kernels/unique_dataset_op.cc +++ b/tensorflow/contrib/data/kernels/unique_dataset_op.cc @@ -18,7 +18,7 @@ limitations under the License. #include "tensorflow/core/lib/hash/hash.h" namespace tensorflow { - +namespace data { namespace { // See documentation in ../ops/dataset_ops.cc for a high-level @@ -219,5 +219,5 @@ REGISTER_KERNEL_BUILDER(Name("UniqueDataset").Device(DEVICE_CPU), UniqueDatasetOp); } // namespace - +} // namespace data } // namespace tensorflow |