1 /* Copyright 2020 The TensorFlow Authors. All Rights Reserved. 2 3 Licensed under the Apache License, Version 2.0 (the "License"); 4 you may not use this file except in compliance with the License. 5 You may obtain a copy of the License at 6 7 http://www.apache.org/licenses/LICENSE-2.0 8 9 Unless required by applicable law or agreed to in writing, software 10 distributed under the License is distributed on an "AS IS" BASIS, 11 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 See the License for the specific language governing permissions and 13 limitations under the License. 14 ==============================================================================*/ 15 16 #ifndef TENSORFLOW_LITE_DELEGATES_GPU_COMMON_TASK_GPU_TENSOR_H_ 17 #define TENSORFLOW_LITE_DELEGATES_GPU_COMMON_TASK_GPU_TENSOR_H_ 18 19 namespace tflite { 20 namespace gpu { 21 22 // Interface for GpuSpatialTensor. 23 // Spatial means that it has Width/Height/Depth dimensions(or their combination) 24 // and Channels dimension 25 // Batch dimension optional 26 class GpuSpatialTensor { 27 public: 28 GpuSpatialTensor() = default; 29 virtual ~GpuSpatialTensor() = default; 30 31 virtual int Width() const = 0; 32 virtual int Height() const = 0; 33 virtual int Depth() const = 0; 34 virtual int Channels() const = 0; 35 virtual int Slices() const = 0; 36 virtual int Batch() const = 0; 37 }; 38 39 } // namespace gpu 40 } // namespace tflite 41 42 #endif // TENSORFLOW_LITE_DELEGATES_GPU_COMMON_TASK_GPU_TENSOR_H_ 43