英语翻译

问题描述:

英语翻译
7.When a variable in use can be modified from all threads in a team,it is necessary to
ensure that only one thread at a time is writing/updating the memory location of the
considered variable,otherwise unpredictable results will occur.
8.This directive,whether explicit or implied,identifies a sequence point at which the implementation
is required to ensure that each thread in the team has a consistent view of
certain variables in memory:the same correct value has to be seen by all threads.This directive
must appear at the precise point in the code at which the data synchronization
is required.
At a first glance it seems that this directive is not necessary,since in general the
writing/updating of shared variables has been done in such a way,that only one thread
at a time is allowed to do that.But this is only true in theory,because what the OpenMPimplementation
does to simulate the ”one thread at a time” feature is not specified by
the OpenMP specification.This is not a fault,moreover it is a door left open to the
OpenMP-implementations so that they can try to optimize the resulting code.
9.In certain do-loops some of the statements executed at each iteration need to be evaluated
in the same order as if the do-loop would be executed sequentially.

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