我有一个类,它模拟需要登录的方法。targetPath, Path.GetFileName(f), True)
End If 在主模块中,我使用普通的for循环与并行的for循环相比,在for循环中使用相同的代码内容时,对复制文件的差异进行了计时: enter image description here 最初,并行复制是18秒,但在第二次运行时变为我已检查用于模
我将尝试将以下简单的while循环并行为两个线程,并使用OpenMP (我第一次尝试使用这种技术)。我试着同时使用sections和tasks。= hare ) { hare = f ( f ( hare ) );注意: f是函数对象的const & (即它有一个T operator()(const T &r))T operator() ( const T &