#include <stdint.h>
#include <algorithm>
#include "flatbuffers/flatbuffers.h"
#include "tensorflow/lite/core/c/builtin_op_data.h"
#include "tensorflow/lite/core/c/common.h"
#include "tensorflow/lite/kernels/internal/tensor.h"
#include "tensorflow/lite/kernels/internal/tensor_ctypes.h"
#include "tensorflow/lite/kernels/kernel_util.h"
namespace tflite {
namespace ops {
namespace builtin {
namespace bucketize {
namespace {
constexpr int kInputTensor = …;
constexpr int kOutputTensor = …;
struct OpData { … };
void* Init(TfLiteContext* context, const char* buffer, size_t length) { … }
void Free(TfLiteContext* context, void* buffer) { … }
TfLiteStatus Prepare(TfLiteContext* context, TfLiteNode* node) { … }
template <typename T>
inline void Bucketize(const RuntimeShape& input_shape, const T* input_data,
const float* boundaries, int num_boundaries,
const RuntimeShape& output_shape, int32_t* output_data) { … }
template <typename T>
TfLiteStatus BucketizeImpl(TfLiteContext* context, TfLiteNode* node) { … }
TfLiteStatus Eval(TfLiteContext* context, TfLiteNode* node) { … }
}
}
TfLiteRegistration* Register_BUCKETIZE() { … }
}
}
}