阅读背景:

带有break语句的并行OpenMP循环

来源:互联网 

I know that you cannot have a break statement for an OpenMP loop, but I was wondering if there is any workaround while still the benefiting from parallelism. Basically I have 'for' loop, that loops through the elements of a large vector looking for one element that satisfies a certain condition. However there is only one element that will satisfy the condition so once that is found we can break out of the loop, Thanks in advanceI know that you cannot have a break statement f




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: