正在加载图片...
23 construct can alter the previously described flow of exe depends on its g clause.then the task activates cancellation and continues execution at the end of its task region,which implies completion of that task.Any other task in that taskgroup 67 that has begun executing completes execution unless it encounters a cancellation 89 t conimes execution at the cnd ofio rtasks in that have no begun execution are aborted,which implies their completion. For all other construct-type-clause values,if a thread encounters a cancel construct,it 1213 ates cancellaion of enclosing reioy cution at the end of that region been activated for their region at cancellation points and,if so,also resume execution a the end of the canceled region. 15161718 If cancellation has been activated regardless of construct-t -clause,threads that are ier other tha implicit ba d of the can resum eeution at the end of the caneeled egon nceled regior This action car occur before the other threads reach that barrier. Synchronization constructs and library routines re available in the OpenMP API to coordinate tasks and data acce enviment variables are available to control or to querytheary routines and enviro e to control or to query the runtime environment of The OpenMP specification makes no guarantee that input or output to the same file is synchronous when executedin aralle.In this case,the progr ner is r 1527 onstructsor lrary routines.For the case where ach thread acce statements(or rout different file,no synchronization by the programmer is necessary. 28 16 OpenMP API Version 4.0-July 2013 16 OpenMP API • Version 4.0 - July 2013 The cancel construct can alter the previously described flow of execution in an OpenMP region. The effect of the cancel construct depends on its construct-type￾clause. If a task encounters a cancel construct with a taskgroup construct-type￾clause, then the task activates cancellation and continues execution at the end of its task region, which implies completion of that task. Any other task in that taskgroup that has begun executing completes execution unless it encounters a cancellation point construct, in which case it continues execution at the end of its task region, which implies its completion. Other tasks in that taskgroup region that have not begun execution are aborted, which implies their completion. For all other construct-type-clause values, if a thread encounters a cancel construct, it activates cancellation of the innermost enclosing region of the type specified and the thread continues execution at the end of that region. Threads check if cancellation has been activated for their region at cancellation points and, if so, also resume execution at the end of the canceled region. If cancellation has been activated regardless of construct-type-clause, threads that are waiting inside a barrier other than an implicit barrier at the end of the canceled region exit the barrier and resume execution at the end of the canceled region. This action can occur before the other threads reach that barrier. Synchronization constructs and library routines are available in the OpenMP API to coordinate tasks and data access in parallel regions. In addition, library routines and environment variables are available to control or to query the runtime environment of OpenMP programs. The OpenMP specification makes no guarantee that input or output to the same file is synchronous when executed in parallel. In this case, the programmer is responsible for synchronizing input and output statements (or routines) using the provided synchronization constructs or library routines. For the case where each thread accesses a different file, no synchronization by the programmer is necessary. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有