#include <stdint.h>
#include <vector>
#include "tensorflow/lite/core/c/common.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/kernel_util.h"
#include "tensorflow/lite/kernels/op_macros.h"
namespace tflite {
namespace ops {
namespace builtin {
namespace sparse_to_dense {
constexpr int kIndicesTensor = …;
constexpr int kOutputShapeTensor = …;
constexpr int kValueInputTensor = …;
constexpr int kDefaultValueTensor = …;
constexpr int kOutputTensor = …;
constexpr int kMaxDimensions = …;
template <typename T>
TfLiteStatus Resize(TfLiteContext* context, const TfLiteTensor* output_shape,
TfLiteTensor* output) { … }
TfLiteStatus CheckDimensionsMatch(TfLiteContext* context,
const TfLiteTensor* indices,
const TfLiteTensor* output_shape,
const TfLiteTensor* values) { … }
template <typename T>
TfLiteStatus GetIndicesVector(TfLiteContext* context,
const TfLiteTensor* indices,
const int num_indices,
std::vector<std::vector<T>>* indices_vector) { … }
TfLiteStatus ResizeOutputShape(TfLiteContext* context,
const TfLiteTensor* output_shape,
TfLiteTensor* output) { … }
TfLiteStatus Prepare(TfLiteContext* context, TfLiteNode* node) { … }
template <typename T, typename TI>
TfLiteStatus SparseToDenseImpl(TfLiteContext* context, TfLiteNode* node) { … }
template <typename T>
TfLiteStatus EvalForIndexType(TfLiteContext* context, TfLiteNode* node,
const TfLiteTensor* indices) { … }
TfLiteStatus Eval(TfLiteContext* context, TfLiteNode* node) { … }
}
TfLiteRegistration* Register_SPARSE_TO_DENSE() { … }
}
}
}