コード例 #1
0
ファイル: parallel_processing.py プロジェクト: ruochen627/DFT
def parallel_processing():
    parser = argparse.ArgumentParser()
    parser.add_argument("c_name", type = str, help = "Please enter the name of circuit, i.e., c17, c880, no extensions required")
    parser.add_argument("thread_cnt", type = int, help = "-1 if you just want to get the input count, otherwise the number of threads running")
    parser.add_argument("idx", type = int, help = "-1 if you just want to get the input count, otherwise idx of thread")
    args = parser.parse_args()
    idx = args.idx
    c_name = args.c_name
    thread_cnt = args.thread_cnt
    circuit = Circuit(c_name)
    circuit.read_circuit()
    if (thread_cnt == -1):
        print(circuit.input_cnt)
        exit(0)
    else:
        circuit.lev()
        circuit.get_full_fault_list()
        circuit.gen_fault_dic_multithreading(thread_cnt, idx)