#ifndef TENSORFLOW_LITE_KERNELS_INTERNAL_REFERENCE_SVDF_H_
#define TENSORFLOW_LITE_KERNELS_INTERNAL_REFERENCE_SVDF_H_
#include <stdint.h>
#include <algorithm>
#include <limits>
#include "tensorflow/lite/core/c/builtin_op_data.h"
#include "tensorflow/lite/core/c/common.h"
#include "tensorflow/lite/kernels/internal/common.h"
#include "tensorflow/lite/kernels/internal/tensor_ctypes.h"
#include "tensorflow/lite/kernels/internal/tensor_utils.h"
#include "tensorflow/lite/kernels/internal/types.h"
namespace tflite {
namespace reference_ops {
static inline void ApplyTimeWeightsBiasAndActivation(
int batch_size, int memory_size, int num_filters, int num_units, int rank,
const float* const __restrict__ weights_time_data,
const float* const __restrict__ bias_ptr, TfLiteFusedActivation activation,
float* const __restrict__ state_ptr, float* const __restrict__ scratch_ptr,
float* const __restrict__ output_ptr) { … }
inline void EvalIntegerSVDF(
const TfLiteSVDFParams* params, const RuntimeShape& input_shape,
const int8_t* input_data, const RuntimeShape& weights_feature_shape,
const int8_t* weights_feature_data, const RuntimeShape& weights_time_shape,
const int16_t* weights_time_data, const RuntimeShape& bias_shape,
const int32_t* bias_data, int16_t* state_data,
const RuntimeShape& output_shape, int8_t* output_data,
int32_t* scratch_data, int32_t* output_temp_data, int32_t scale_1_a,
int scale_1_b, int32_t scale_2_a, int scale_2_b, int32_t input_zp,
int32_t output_zp) { … }
inline void EvalFloatSVDF(
const TfLiteSVDFParams* params, const RuntimeShape& input_shape,
const float* input_data, const RuntimeShape& weights_feature_shape,
const float* weights_feature_data, const RuntimeShape& weights_time_shape,
const float* weights_time_data, const RuntimeShape& bias_shape,
const float* bias_data, float* scratch_data, float* state_data,
const RuntimeShape& output_shape, float* output_data) { … }
inline void EvalHybridSVDF(
const TfLiteSVDFParams* params, const RuntimeShape& input_shape,
const float* input_data, const RuntimeShape& weights_feature_shape,
const int8_t* weights_feature_data, const float weights_feature_scale,
const RuntimeShape& weights_time_shape, const float* weights_time_data,
const RuntimeShape& bias_shape, const float* bias_data, float* scratch,
float* scaling_factors, int8_t* quantized_input, float* state,
const RuntimeShape& output_shape, float* output_data, int32_t* zero_points,
int32_t* row_sums, bool* compute_row_sums) { … }
}
}
#endif