同步操作将从 Gitee 极速下载/cpp-taskflow 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
import matplotlib.pyplot as pltimport numpy as npimport matplotlib.mlab as mlabimport matplotlib.gridspec as gridspec# Fixing random state for reproducibilitycosts = [5326, 1608, 920]plt.subplot(131)x = np.arange(3)#plt.plot(costs, label='v1 (OpenMP)', color='black')plt.bar(x, costs)plt.title('Development Cost', fontsize=22)plt.xlabel('task model', fontsize=18)plt.ylabel('$USD', fontsize=16)plt.xticks(x, ('OpenMP', 'TBB', 'Cpp-Taskflow'))plt.legend()# Fixing random state for reproducibilityraw = [line.strip() for line in open("graph_algorithm.txt")]graph_sizes = []omp_runtimes = []tbb_runtimes = []ctf_runtimes = []# extract the output datai = 0for line in raw:token = line.split();assert(len(token) == 4)graph_sizes.append(int(token[0]))omp_runtimes.append(float(token[1]))tbb_runtimes.append(float(token[2]))ctf_runtimes.append(float(token[3]))i = i+1plt.subplot(132)plt.plot(graph_sizes, omp_runtimes, label='OpenMP')plt.plot(graph_sizes, tbb_runtimes, label='TBB')plt.plot(graph_sizes, ctf_runtimes, label='Cpp-Taskflow')plt.title('Graph Algorithm', fontsize=22)plt.xlabel('graph size (|V|+|E| ~ # tasks)', fontsize=18)plt.ylabel('cpu runtime (ms)', fontsize=16)#plt.xticks(np.arange(len(graph_sizes)), graph_sizes)plt.legend(fontsize=16)# Fixing random state for reproducibilityraw = [line.strip() for line in open("matrix_operation.txt")]graph_sizes = []omp_runtimes = []tbb_runtimes = []ctf_runtimes = []# extract the output datai = 0for line in raw:token = line.split();assert(len(token) == 4)graph_sizes.append(int(token[0]))omp_runtimes.append(float(token[1]))tbb_runtimes.append(float(token[2]))ctf_runtimes.append(float(token[3]))i = i+1plt.subplot(133)plt.plot(graph_sizes, omp_runtimes, label='OpenMP')plt.plot(graph_sizes, tbb_runtimes, label='TBB')plt.plot(graph_sizes, ctf_runtimes, label='Cpp-Taskflow')plt.title('Matrix Operation', fontsize=22)plt.xlabel('partition count (# tasks)', fontsize=18)plt.ylabel('cpu runtime (ms)', fontsize=16)#plt.xticks(np.arange(len(graph_sizes)), graph_sizes)plt.legend(fontsize=16)plt.show()
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。