INNER CODE UNIT · Python

do_tidy

faasm/faasm · bin/run_clang_tidy.py:78

def do_tidy(file_list):
    if not file_list:
        print("Got no files to tidy")
        exit(1)

    n_cpus = cpu_count()
    file_chunks = np.array_split(file_list, n_cpus)
    non_empty_chunks = [f for f in file_chunks if len(f) > 0]
    n_non_empty = len(non_empty_chunks)

    print(
        "Running clang-tidy on {} files in {} chunks".format(
            len(file_list), n_non_empty
        )
    )

    with Pool(n_non_empty) as p:
        p.map(inner_tidy, non_empty_chunks)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…