def METHOD_NAME(xin, yin, xp, yp, x, dx, y):
    Nin = len(xin)
    Np = len(xp)
    N = len(x)
    # /* FIXME fails if xin are not sorted
    # * slow if x not sorted */
    if not Nin > 1:
        raise ValueError("Nin must be > 1")
    # /* Scan through all x values to be calculated */
    # /* Re: omp, each thread is going through the entire input array,
    # * independently, computing the resolution from the neighbourhood
    # * around its individual output points.  The firstprivate( in )
    # * clause sets each thread to keep its own copy of in, initialized
    # * at in's initial value of zero.  The "schedule(static,1)" clause
    # * puts neighbouring points in separate threads, which is a benefit
    # * since there will be less backtracking if resolution width increases
    # * from point to point.  Because the schedule is static, this does not
    # * significantly increase the parallelization overhead.  Because the
    # * threads are operating on interleaved points, there should be fewer cache
    # * misses than if each thread were given different stretches of x to
    # * convolve.
    # */
    _in = 0
    # ifdef _OPENMP
    # pragma omp parallel for firstprivate(in) schedule(static,1)
    # endif
    for _out in range(N):
        # /* width of resolution window for x is w = 2 dx ^ 2. */
        limit = -dx[_out]*xp[0]
        xo = x[_out]
        # /* Line up the left edge of the convolution window */
        # /* It is probably forward from the current position, */
        # /* but if the next dx is a lot higher than the current */
        # /* dx or if the x are not sorted, then it may be before */
        # /* the current position. * /
        # /* FIXME verify that the convolution window is just right */
        while (_in < Nin-1 and xin[_in] < xo-limit):
            _in += 1
        while (_in > 0 and xin[_in] > xo-limit):
            _in -= 1
        # /* Special handling to avoid 0/0 for w = 0. */
        if (dx[_out] > 0.):
            # printf("convolve in:%ld out:%ld, xo:%g dx:%g\n",in,out,xo,dx[out])
            y[_out] = convolve_point_sampled(
                Nin, xin, yin, Np, xp, yp, xo, dx[_out], _in)
        elif (_in < Nin-1):
            # /* Linear interpolation */
            m = (yin[_in + 1] - yin[_in]) / (xin[_in + 1] - xin[_in])
            b = yin[_in] - m*xin[_in]
            y[_out] = m*xo + b
        elif (_in > 0):
            # /* Linear extrapolation */
            m = (yin[_in]-yin[_in - 1])/(xin[_in]-xin[_in - 1])
            b = yin[_in] - m*xin[_in]
            y[_out] = m*xo + b
        else:
            # /* Can't happen because there is more than one point in xin. */
            if not Nin > 1:
                raise ValueError("should be more than one point in Nin")