From 35293d88bcb35b87162fbbb40b76226677f98d3f Mon Sep 17 00:00:00 2001 From: Nikolay Chirkov Date: Thu, 5 Jan 2023 08:54:25 -0800 Subject: [PATCH] Tensor: move into tensor sub-directory. PiperOrigin-RevId: 499896489 --- mediapipe/framework/formats/BUILD | 2 +- mediapipe/framework/formats/tensor.h | 2 +- mediapipe/framework/formats/tensor/BUILD | 24 +++++++++++++++++++ .../{tensor_internal.h => tensor/internal.h} | 0 .../framework/formats/tensor_ahwb_gpu_test.cc | 2 +- 5 files changed, 27 insertions(+), 3 deletions(-) create mode 100644 mediapipe/framework/formats/tensor/BUILD rename mediapipe/framework/formats/{tensor_internal.h => tensor/internal.h} (100%) diff --git a/mediapipe/framework/formats/BUILD b/mediapipe/framework/formats/BUILD index cce7e5bd0..371f23ed1 100644 --- a/mediapipe/framework/formats/BUILD +++ b/mediapipe/framework/formats/BUILD @@ -430,7 +430,7 @@ cc_library( ], hdrs = [ "tensor.h", - "tensor_internal.h", + "//mediapipe/framework/formats/tensor:internal.h", ], copts = select({ "//mediapipe:apple": [ diff --git a/mediapipe/framework/formats/tensor.h b/mediapipe/framework/formats/tensor.h index 0f19bb5ee..4a952ae09 100644 --- a/mediapipe/framework/formats/tensor.h +++ b/mediapipe/framework/formats/tensor.h @@ -26,7 +26,7 @@ #include "absl/container/flat_hash_map.h" #include "absl/synchronization/mutex.h" -#include "mediapipe/framework/formats/tensor_internal.h" +#include "mediapipe/framework/formats/tensor/internal.h" #include "mediapipe/framework/port.h" #if MEDIAPIPE_METAL_ENABLED diff --git a/mediapipe/framework/formats/tensor/BUILD b/mediapipe/framework/formats/tensor/BUILD new file mode 100644 index 000000000..c634b0dda --- /dev/null +++ b/mediapipe/framework/formats/tensor/BUILD @@ -0,0 +1,24 @@ +# Copyright 2019 The MediaPipe Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +package( + default_visibility = ["//visibility:public"], + features = ["-layering_check"], +) + +licenses(["notice"]) + +exports_files([ + "internal.h", +]) diff --git a/mediapipe/framework/formats/tensor_internal.h b/mediapipe/framework/formats/tensor/internal.h similarity index 100% rename from mediapipe/framework/formats/tensor_internal.h rename to mediapipe/framework/formats/tensor/internal.h diff --git a/mediapipe/framework/formats/tensor_ahwb_gpu_test.cc b/mediapipe/framework/formats/tensor_ahwb_gpu_test.cc index ff78d1f88..b06bd3ef2 100644 --- a/mediapipe/framework/formats/tensor_ahwb_gpu_test.cc +++ b/mediapipe/framework/formats/tensor_ahwb_gpu_test.cc @@ -7,7 +7,7 @@ #include #include "mediapipe/framework/formats/tensor.h" -#include "mediapipe/framework/formats/tensor_data_types.h" +#include "mediapipe/framework/formats/tensor/views/data_types.h" #include "mediapipe/gpu/gpu_test_base.h" #include "mediapipe/gpu/shader_util.h" #include "tensorflow/lite/delegates/gpu/gl/gl_call.h"