且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

并行while循环使用OpenMP

更新时间:2022-04-14 03:28:45

您确认您的过程实际上是CPU密集型的,而不是I / O密集​​型?您code看起来很像I / O密集​​型code,这将受益于并行一无所获。

Have you checked that your process is actually CPU-bound and not I/O-bound? Your code looks very much like I/O-bound code, which would gain nothing from parallelization.