// int[,] label = new int[m, n]; Parallel.For(0, thread_num, (n) => { for (int i = switchPoint[n]; i < switchPoint[n + 1]; i++) { int[] tmp = new int[n]; } });
空间开在并行块之外远远快于开在循环块之内。不确定是否是因为线程之间的竞争~~
2022-05-07 06:57:04
// int[,] label = new int[m, n]; Parallel.For(0, thread_num, (n) => { for (int i = switchPoint[n]; i < switchPoint[n + 1]; i++) { int[] tmp = new int[n]; } });
空间开在并行块之外远远快于开在循环块之内。不确定是否是因为线程之间的竞争~~