#include <math.h>
#include <stddef.h>
#include <stdint.h>
#include <string.h>
#include <algorithm>
#include <complex>
#include "third_party/fft2d/fft2d.h"
#include "ruy/profiler/instrumentation.h"
#include "tensorflow/lite/core/c/common.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"
namespace tflite {
namespace ops {
namespace builtin {
namespace rfft2d {
complex;
constexpr int kInputTensor = …;
constexpr int kFftLengthTensor = …;
constexpr int kOutputTensor = …;
constexpr int kFftIntegerWorkingAreaTensor = …;
constexpr int kFftDoubleWorkingAreaTensor = …;
constexpr int kTensorNotAllocated = …;
struct OpData { … };
bool IsPowerOfTwo(uint32_t v) { … }
static TfLiteStatus InitTemporaryTensors(TfLiteContext* context,
TfLiteNode* node) { … }
TfLiteStatus ResizeOutputandTemporaryTensors(TfLiteContext* context,
TfLiteNode* node) { … }
void* Init(TfLiteContext* context, const char* buffer, size_t length) { … }
void Free(TfLiteContext* context, void* buffer) { … }
TfLiteStatus Prepare(TfLiteContext* context, TfLiteNode* node) { … }
void Rfft2dReorder(int fft_height, int fft_width, double** fft_input_output) { … }
void Rfft2dImpl(int fft_height, int fft_width, double** fft_input_output,
int* fft_integer_working_area_data,
double* fft_double_working_area_data) { … }
void PrepareInputBuffer(const float* input_data, int input_height,
int input_width, int fft_height, int fft_width,
double** fft_input_output) { … }
void PrepareOutputBuffer(complex<float>* output_data, int fft_height,
int fft_width, double** fft_input_output) { … }
TfLiteStatus Rfft2dHelper(TfLiteContext* context, TfLiteNode* node) { … }
TfLiteStatus Eval(TfLiteContext* context, TfLiteNode* node) { … }
}
TfLiteRegistration* Register_RFFT2D() { … }
}
}
}