#include "tensorflow/lite/kernels/internal/reference/comparisons.h"
#include <stdint.h>
#include "tensorflow/lite/core/c/common.h"
#include "tensorflow/lite/kernels/internal/compatibility.h"
#include "tensorflow/lite/kernels/internal/quantization_util.h"
#include "tensorflow/lite/kernels/internal/reference/reference_ops.h"
#include "tensorflow/lite/kernels/internal/tensor.h"
#include "tensorflow/lite/kernels/internal/tensor_ctypes.h"
#include "tensorflow/lite/kernels/internal/types.h"
#include "tensorflow/lite/kernels/kernel_util.h"
#include "tensorflow/lite/string_util.h"
namespace tflite {
namespace ops {
namespace builtin {
namespace comparisons {
namespace {
constexpr int kInputTensor1 = …;
constexpr int kInputTensor2 = …;
constexpr int kOutputTensor = …;
TfLiteStatus ComparisonPrepareCommon(TfLiteContext* context, TfLiteNode* node,
bool is_string_allowed) { … }
TfLiteStatus ComparisonPrepare(TfLiteContext* context, TfLiteNode* node) { … }
TfLiteStatus ComparisonPrepareStringAllowed(TfLiteContext* context,
TfLiteNode* node) { … }
void QuantizeMultiplier(double double_multiplier, int32_t* quantized_multiplier,
int* left_shift) { … }
template <typename input_dtype, reference_ops::ComparisonFn<int32> opname>
void ComparisonQuantized(const TfLiteTensor* input1, const TfLiteTensor* input2,
TfLiteTensor* output, bool requires_broadcast) { … }
template <typename T, reference_ops::ComparisonFn<T> opname>
void Comparison(const TfLiteTensor* input1, const TfLiteTensor* input2,
TfLiteTensor* output, bool requires_broadcast) { … }
void ComparisonString(bool (*opname)(const StringRef&, const StringRef&),
const TfLiteTensor* input1, const TfLiteTensor* input2,
TfLiteTensor* output, bool requires_broadcast) { … }
TfLiteStatus EqualEval(TfLiteContext* context, TfLiteNode* node) { … }
TfLiteStatus NotEqualEval(TfLiteContext* context, TfLiteNode* node) { … }
TfLiteStatus GreaterEval(TfLiteContext* context, TfLiteNode* node) { … }
TfLiteStatus GreaterEqualEval(TfLiteContext* context, TfLiteNode* node) { … }
TfLiteStatus LessEval(TfLiteContext* context, TfLiteNode* node) { … }
TfLiteStatus LessEqualEval(TfLiteContext* context, TfLiteNode* node) { … }
}
}
TfLiteRegistration* Register_EQUAL() { … }
TfLiteRegistration* Register_NOT_EQUAL() { … }
TfLiteRegistration* Register_GREATER() { … }
TfLiteRegistration* Register_GREATER_EQUAL() { … }
TfLiteRegistration* Register_LESS() { … }
TfLiteRegistration* Register_LESS_EQUAL() { … }
}
}
}