def test_fft():
    numpy = pytest.importorskip('numpy')
    from pymbolic import var
    from pymbolic.algorithm import fft, sym_fft
    vars = numpy.array([var(chr((97 + i))) for i in range(16)], dtype=object)
    print(vars)
    print(fft(vars))
    traced_fft = sym_fft(vars)
    from pymbolic.mapper.stringifier import PREC_NONE
    from pymbolic.mapper.c_code import CCodeMapper
    ccm = CCodeMapper()
    code = [ccm(tfi, PREC_NONE) for tfi in traced_fft]
    for (cse_name, cse_str) in enumerate(ccm.cse_name_list):
        print(f'{cse_name} = {cse_str}')
    for (i, line) in enumerate(code):
        print(('result[%d] = %s' % (i, line)))
def test_fft():
    numpy = pytest.importorskip('numpy')
    from pymbolic import var
    from pymbolic.algorithm import fft, sym_fft
    vars = numpy.array([var(chr((97 + i))) for i in range(16)], dtype=object)
    print(vars)
    print(fft(vars))
    traced_fft = sym_fft(vars)
    from pymbolic.mapper.stringifier import PREC_NONE
    from pymbolic.mapper.c_code import CCodeMapper
    ccm = CCodeMapper()
    code = [ccm(tfi, PREC_NONE) for tfi in traced_fft]
    for (cse_name, cse_str) in enumerate(ccm.cse_name_list):
        print(f'{cse_name} = {cse_str}')
    for (i, line) in enumerate(code):
        print(('result[%d] = %s' % (i, line)))