chromium/third_party/tflite/src/tensorflow/lite/kernels/unsorted_segment.cc

/* Copyright 2022 The TensorFlow Authors. All Rights Reserved.

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.
==============================================================================*/

#include <stdint.h>

#include <algorithm>
#include <functional>

#include "tensorflow/lite/core/c/common.h"
#include "tensorflow/lite/kernels/internal/reference/reference_ops.h"
#include "tensorflow/lite/kernels/internal/tensor_ctypes.h"
#include "tensorflow/lite/kernels/kernel_util.h"

namespace tflite {
namespace ops {
namespace builtin {
namespace unsorted_segment {

enum SegmentType {};

static const int kInputDataTensor =;
static const int kInputSegmentIdsTensor =;
static const int kInputNumSegmentsTensor =;
static const int kOutputTensor =;

TfLiteStatus ResizeOutputTensor(TfLiteContext* context,
                                const TfLiteTensor* data,
                                const TfLiteTensor* segment_ids,
                                const TfLiteTensor* num_segments,
                                TfLiteTensor* output) {}

TfLiteStatus Prepare(TfLiteContext* context, TfLiteNode* node) {}

template <typename T>
struct SegmenMax {};

template <typename T>
struct SegmenMin {};

template <typename T>
struct SegmenProd {};

template <typename T>
struct SegmenSum {};

template <typename T>
TfLiteStatus EvalType(TfLiteContext* context, const RuntimeShape& input_shape,
                      const T* input_data,
                      const RuntimeShape& segment_ids_shape,
                      const int32_t* segment_ids_data,
                      const RuntimeShape& output_shape, T* output_data,
                      SegmentType segment_type) {}

TfLiteStatus EvalGeneric(TfLiteContext* context, TfLiteNode* node,
                         SegmentType segment_type) {}

TfLiteStatus EvalProd(TfLiteContext* context, TfLiteNode* node) {}
TfLiteStatus EvalMax(TfLiteContext* context, TfLiteNode* node) {}
TfLiteStatus EvalSum(TfLiteContext* context, TfLiteNode* node) {}
TfLiteStatus EvalMin(TfLiteContext* context, TfLiteNode* node) {}

}  // namespace unsorted_segment

TfLiteRegistration* Register_UNSORTED_SEGMENT_PROD() {}

TfLiteRegistration* Register_UNSORTED_SEGMENT_MAX() {}

TfLiteRegistration* Register_UNSORTED_SEGMENT_SUM() {}

TfLiteRegistration* Register_UNSORTED_SEGMENT_MIN() {}

}  // namespace builtin
}  // namespace ops
}  // namespace tflite