#include <stddef.h>
#include <cstring>
#include <vector>
#include "tensorflow/lite/context_util.h"
#include "tensorflow/lite/core/c/builtin_op_data.h"
#include "tensorflow/lite/core/c/common.h"
#include "tensorflow/lite/core/subgraph.h"
#include "tensorflow/lite/kernels/control_flow_common.h"
#include "tensorflow/lite/kernels/kernel_util.h"
namespace tflite {
namespace ops {
namespace builtin {
namespace while_kernel {
struct OpData { … };
namespace {
TfLiteStatus CheckCondOutput(TfLiteContext* context,
const TfLiteTensor* cond_output) { … }
}
void* Init(TfLiteContext* context, const char* buffer, size_t length) { … }
void Free(TfLiteContext* context, void* buffer) { … }
TfLiteStatus Prepare_impl(TfLiteContext* context, TfLiteNode* node) { … }
TfLiteStatus Prepare(TfLiteContext* context, TfLiteNode* node) { … }
TfLiteStatus Eval_cond_subgraph(TfLiteContext* context, Subgraph* cond_subgraph,
bool cond_has_dynamic_output_tensors,
bool* cond_subgraph_output) { … }
void SetupUnconsumedOutputs(const TfLiteNode* node, const OpData* op_data,
Subgraph* this_subgraph, Subgraph* body_subgraph) { … }
TfLiteStatus Eval_dynamic(TfLiteContext* context, TfLiteNode* node) { … }
TfLiteStatus Eval_static(TfLiteContext* context, TfLiteNode* node) { … }
TfLiteStatus Eval(TfLiteContext* context, TfLiteNode* node) { … }
}
TfLiteRegistration* Register_WHILE() { … }
}
}
}