def gen_data(dt):
    arrays = {}
    if (dt == np.float128):
        pg = './fftw_longdouble'
    elif (dt == np.double):
        pg = './fftw_double'
    elif (dt == np.float32):
        pg = './fftw_single'
    else:
        raise ValueError(('unknown: %s' % dt))
    for type in [1, 2, 3, 4, 5, 6, 7, 8]:
        arrays[type] = {}
        for sz in SZ:
            a = Popen([pg, str(type), str(sz)], stdout=PIPE, stderr=STDOUT)
            st = [i.decode('ascii').strip() for i in a.stdout.readlines()]
            arrays[type][sz] = np.fromstring(','.join(st), sep=',', dtype=dt)
    return arrays
def gen_data(dt):
    arrays = {}
    if (dt == np.float128):
        pg = './fftw_longdouble'
    elif (dt == np.double):
        pg = './fftw_double'
    elif (dt == np.float32):
        pg = './fftw_single'
    else:
        raise ValueError(('unknown: %s' % dt))
    for type in [1, 2, 3, 4, 5, 6, 7, 8]:
        arrays[type] = {}
        for sz in SZ:
            a = Popen([pg, str(type), str(sz)], stdout=PIPE, stderr=STDOUT)
            st = [i.decode('ascii').strip() for i in a.stdout.readlines()]
            arrays[type][sz] = np.fromstring(','.join(st), sep=',', dtype=dt)
    return arrays