def loop1D(idx_var='i', lower_bound='0', upper_bound='N', increment='1', pragma='#pragma omp parallel for', padding=''):
    """ Generate a one-dimensional loop in C.

        :arg:    index variable for the loop
        :arg:    lower bound on index variable
        :arg:    upper bound on index variable
        :arg:    increment for the index variable
        :arg:    OpenMP pragma (https://en.wikipedia.org/wiki/OpenMP)
        :arg:    padding before a line (tab number)
        :return: string header, string footer

        >>> header, footer = loop1D(pragma='')
        >>> print(header)
        for (int i = 0; i < N; i++) {
        <BLANKLINE>

        >>> print(footer)
        } // END LOOP: for (int i = 0; i < N; i++)
        <BLANKLINE>

        >>> header, footer = loop1D(increment='2', pragma='', padding='    ')
        >>> print(header)
            for (int i = 0; i < N; i += 2) {
        <BLANKLINE>
    """
    # If some argument has a different type other than string, then throw an error
    if any(not isinstance(i, str) for i in (idx_var, lower_bound, upper_bound, increment, pragma)):
        raise ValueError('all parameters must have type string.')
    # Generate header and footer for a one-dimensional loop with optional parallelization using OpenMP
    pragma    = padding + pragma + '\n' if pragma else ''
    increment = ' += ' + increment if increment != '1' else '++'
    header    = padding + 'for (int {i0} = {i1}; {i0} < {i2}; {i0}{i3})'.format(
                                                            i0=idx_var, i1=lower_bound, i2=upper_bound, i3=increment)
    footer    = padding + '} // END LOOP: ' + header.strip() + '\n'
    return pragma + header + ' {\n', footer