7.当变量在使用中可以从堆栈中的所有线程修改,有必要
确保只有一次一个线程读写的内存位置
考虑变量,否则会发生不可预知的结果.
8.这个指令,明确或暗示,标识序列点的实施
必须确保每个线程具有一致的方向
某些变量在内存中:同样的正确的指针必须指向所有线程.该指令
必须出现在代码中的精确分际在数据同步
是必需的.
初看起来这似乎是没有必要的指示,一般自
写作/ 更新共享变量做了这样一种方式,只有一个线程
在时间允许这样做.但这只是在理论上正确的,因为什么OpenMPimplementation
并模拟一次“功能”没有一个线程指定
OpenMP的规范.这不是一个错误,而且这是一个敞开大门的
OpenMP的建置作业,让他们可以尝试优化的代码.
9.必须做的是,在每个循环迭代执行的一些发言需要进行评估
在相同的顺序,如果这样做,将循环顺序执行.