#include "tensorflow/lite/optional_debug_tools.h"
#include <cassert>
#include <cinttypes>
#include <cstddef>
#include <cstdio>
#include <functional>
#include <limits>
#include <set>
#include <sstream>
#include <string>
#include <utility>
#include <vector>
#include "tensorflow/lite/context_util.h"
#include "tensorflow/lite/core/interpreter.h"
#include "tensorflow/lite/core/subgraph.h"
#include "tensorflow/lite/schema/schema_generated.h"
namespace tflite {
namespace {
const char* AllocTypeName(TfLiteAllocationType type);
void PrintIntVector(const std::vector<int>& v,
bool collapse_consecutives = true,
bool add_newline = false);
class MemoryArenaInfo { … };
class DynamicMemoryInfo { … };
class ModelTensorMemoryInfo { … };
template <typename T>
void PrintTotalBytesOfTensors(const Subgraph& subgraph, const T& tensor_ids,
const std::string& prefix = " -> ") { … }
void PrintIntVector(const std::vector<int>& v, bool collapse_consecutives,
bool add_newline) { … }
void PrintTfLiteIntVector(const TfLiteIntArray* v,
bool collapse_consecutives = true,
bool add_newline = false) { … }
const char* TensorTypeName(TfLiteType type) { … }
const char* AllocTypeName(TfLiteAllocationType type) { … }
std::string TruncateString(const char* str, int size_limit,
bool truncate_at_end = false) { … }
}
void PrintInterpreterState(const Interpreter* interpreter,
const int32_t tensor_name_display_length,
const int32_t tensor_type_display_length,
const int32_t alloc_type_display_length) { … }
}