2#define ENABLE_NE10_FIR_FLOAT_NEON
3#include <libraries/ne10/NE10.h>
9 ConvolverChannel(
const std::vector<float>& ir,
unsigned int blockSize) {setup(ir, blockSize);};
10 int setup(
const std::vector<float>& ir,
unsigned int blockSize);
11 void process(ne10_float32_t* filterOut,
const ne10_float32_t* filterIn);
14 ne10_fir_instance_f32_t firFilter;
15 unsigned int blockSize;
16 ne10_float32_t* firFilterCoeff =
nullptr;
17 ne10_float32_t* firFilterState =
nullptr;
29 ~Convolver() { cleanup(); };
40 int setup(
const std::string& filename,
unsigned int blockSize,
unsigned int maxLength = 0);
49 int setup(
const std::vector<std::vector<float>>& irs,
unsigned int blockSize);
58 void process(
float* out,
const float* in,
unsigned int frames,
unsigned int channel = 0);
70 void processInterleaved(
float* out,
const float* in,
unsigned int frames,
unsigned int outChannels,
unsigned int inChannels);
75 unsigned int getChannels() {
return convolverChannels.size(); }
77 void doProcessInterleaved(
float* out,
const float* in,
unsigned int frames,
unsigned int outChannels,
unsigned int inChannels,
unsigned int channel);
78 std::vector<ConvolverChannel> convolverChannels;
79 ne10_float32_t* filterIn =
nullptr;
80 ne10_float32_t* filterOut =
nullptr;
int setup(const std::string &filename, unsigned int blockSize, unsigned int maxLength=0)
Definition Convolver.cpp:37
void process(float *out, const float *in, unsigned int frames, unsigned int channel=0)
Definition Convolver.cpp:69
unsigned int getChannels()
Definition Convolver.h:75
void processInterleaved(float *out, const float *in, unsigned int frames, unsigned int outChannels, unsigned int inChannels)
Definition Convolver.cpp:74