/* This file was generated by scramble.py. */
#include "filter.h"
#include "scramble.h"
void filter(V const *indata, int n, int instep, V *fdata, int fn, V *outdata, int outstep, int stride)
{
    /* 
     * Convolve the given data of length n with the given filter of length fn.
     * This is a slow brute force implementation. */
    V *ylow = outdata;
    /* Apply filter with brute force (no FFT) */
    V const *y = indata;
    for (int i = 0; i < n; i++)
    {
        V const *y2 = y;
        V x = 0;
        for (int j = 0; j < fn; j++)
        {
            x += *y2 * fdata[j];
            y2 -= instep * stride;
            if (y2 < indata)
            {
                y2 += n * instep;
            }
        }
        *ylow = x;
        y += instep;
        ylow += outstep;
    }
}
/* This file was generated by scramble.py. */
