正在加载图片...
Page 10 OpenMP API 5.0 Clauses(continued) Depend(continued) askeducioneducton-denitierlel Tasking Clauses edtcion-tcrferSanesoethcion out,mute ce-tut a9kop】 eduction-moaper: cp f the on this page.(Not used n task.) ask will be a dep of that ing operato a si depend ndence-type nax min.iand.ior.icor auses and f Clause in this at be f Clause [2is](212] Cantposiv teger expression wh 6 gainstelgrothste ession) modfer:]scolar-ogicalexpression)Fo Map Clause on) lastprivate ap-ypose (Not used in task) Attribute Clauses,page 9 of this guide Ordered Clause imdlen ler oops or how many loops to associate with Reduction Clauses rguments to ha ve an invariant he tifier:Same as for re pmiory Iterators identifier:A base language identifier d to multiple values in the clause on which they angea range-specifica torbeoin:cnd:tcpl heir type tor (terato guid torea6-e1ieenfer=ronge-pecfcation iterator-type:A type specifier.Fo 2019 OpenMP ARB OMP0519-01-OMPS Page 10 OpenMP API 5.0 © 2019 OpenMP ARB OMP0519-01-OMP5 Clauses (continued) Depend (continued) • out and inout: The generated task will be a depen￾dent task of all previously generated sibling tasks that reference at least one of the list items in an in, out, mutexinoutset, or inout dependence-type list. • mutexinoutset: If the storage location of at least one of the list items is the same as that of a list item appearing in a depend clause with an in, out, or inout dependence-type on a construct from which a sibling task was previously generated, then the generated task will be a dependent task of that sibling task. If the storage location of at least one of the list items is the same as that of a list item appearing in a depend clause with a mutexinoutset dependence-type on a construct from which a sibling task was previously generated, then the sibling tasks will be mutually exclusive tasks. • depobj: The task dependences are derived from the depend clause specified in the depobj constructs that initialized dependences represented by the depend objects specified on in the depend clause as if the depend clauses of the depobj constructs were specified in the current construct. If Clause [2.15] [2.12] The effect of the if clause depends on the construct to which it is applied. For combined or composite constructs, it only applies to the semantics of the construct named in the directive-name-modifier if one is specified. If none is specified for a combined or composite construct then the if clause applies to all constructs to which an if clause can apply. if ([directive-name-modifier :] scalar-expression) C/C++ if ([directive-name-modifier :] scalar-logical-expression) For Map Clause [2.19.7.1] [2.15.5.1] map ([[map-type-modifier[,] [map-type-modifier[,] ... ] map-type : ] locator-list) Map an original list item from the current task’s data environment to a corresponding list item in the device data environment of the device identified by the construct. map-type: alloc, to, from, tofrom, release, delete map-type-modifier: always, close, mapper (mapper-identifier) Ordered Clause [2.9.2] ordered [ (n) ] Indicates the loops or how many loops to associate with a construct. Reduction Clauses [2.19.5] [2.15.3.6] in_reduction (reduction-identifier: list) Specifies that a task participates in a reduction reduction-identifier: Same as for reduction task_reduction (reduction-identifier: list) Specifies a reduction among tasks. reduction-identifier: Same as for reduction reduction ([ reduction-modifier ,] reduction-identifier : list) Specifies a reduction-identifier and one or more list items. reduction-modifier: inscan, task, default reduction-identifier: C++ Either an id-expression or one of the following operators: +, -, *, &, |, ^, &&, || reduction-identifier: C Either an identifier or one of the following operators: +, -, *, &, |, ^, &&, || reduction-identifier: For Either a base language identifier, a user-defined operator, one of the following operators: +, -, *, .and., .or., .eqv., .neqv., or one of the following intrinsic procedure names: max, min, iand, ior, ieor. SIMD Clauses [2.9.3] [2.8] Also see Data Sharing Attribute Clauses and If Clause in this guide. aligned (argument-list[:alignment]) Declares one or more list items to be aligned to the specified number of bytes. alignment, if present, must be a constant positive integer expression. collapse (n) A constant positive integer expression that specifies how many loops are associated with the construct. (Not used in declare simd.) inbranch Specifies that the function will always be called from inside a conditional statement of a SIMD loop. (Not used in simd.) nontemporal (list) Specifies that accesses to the storage locations to which the list items refer have low temporal locality across the iterations in which those storage locations are accessed. notinbranch Specifies that the function will never be called from inside a conditional statement of a SIMD loop. (Not used in simd.) safelen (length) If used then no two iterations executed concurrently with SIMD instructions can have a greater distance in the logical iteration space than the value of length. (Not used in declare simd.) simdlen (length) A constant positive integer expression that specifies the preferred number of iterations to be executed concurrently. uniform (argument-list) Declares one or more arguments to have an invariant value for all concurrent invocations of the function in the execution of a single SIMD loop. (Not used in simd.) Tasking Clauses [2.10] [2.9] affinity ([aff-modifier: ] locator-list) A hint to execute closely to the location of the list items. aff-modifier is iterator (iterators-definition). (Not used in taskloop.) allocate ([allocator: ]list) See Allocate Clause, page 9 of this guide. collapse (n) See SIMD Clauses on this page. (Not used in task.) default (shared | none) C/C++ default (private | firstprivate | shared | none) For See Data Sharing Attribute Clauses, page 9 of this guide. depend ([depend-modifier, ] dependence-type : locator-list) See Depend Clause, page 9 of this guide. (Not used in taskloop.) detach (list) Causes an implicit reference to the variable list in all enclosing constructs. (Not used in taskloop.) final (scalar-expression) C/C++ final (scalar-logical-expression) For The generated task will be a final task if the final expression evaluates to true. firstprivate (list) See Data Sharing Attribute Clauses, page 9 of this guide. grainsize (grain-size) Causes the number of logical loop iterations assigned to each created task to be greater than or equal to the minimum of the value of the grain-size expression and the number of logical loop iterations, but less than twice the value of the grain-size expression. (Not used in task.) if ([ task : ] scalar-expression) C/C++ if ([ task : ] scalar-logical-expression) For Also see If Clause on this page. in_reduction (reduction-identifier: list) See Reduction Clauses on this page. lastprivate (list) See Data Sharing Attribute Clauses, page 9 of this guide. (Not used in task.) mergeable Specifies that the generated task is a mergeable task. nogroup Prevents an implicit taskgroup region to be created. (Not used in task.) num_tasks (num-tasks) Create as many tasks as the minimum of the num-tasks expression and the number of logical loop iterations. (Not used in task.) priority (priority-value) A non-negative numerical scalar expression that specifies a hint for the priority of the generated task. private (list) See Data Sharing Attribute Clauses, page 9 of this guide. reduction ([ reduction-modifier ,] reduction-identifier : list) See Reduction Clauses on this page. (Not used in task.) shared (list) See Data Sharing Attribute Clauses, page 9 of this guide. untied If present, any thread in the team can resume the task region after a suspension. Iterators iterators [2.1.6] Identifiers that expand to multiple values in the clause on which they appear. iterator (iterators-definition) iterators-definition: iterator-specifier [, iterators-definition ] iterators-specifier: [ iterator-type ] identifier = range-specification identifier: A base language identifier. range-specification: begin : end[: step] begin, end: Expressions for which their types can be converted to iterator-type step: An integral expression. iterator-type: A type name. C/C++ iterator-type: A type specifier. For
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有