正在加载图片...
OpenMP API 4.0 C/C++ Page4 Environment Variables [4] Environment variable names are upper case,and the values assigned to them are case insensitive and may have leading and trailing white space. [4.11]OMP_CANCELLATION policy [4.9][4.8]OMP_MAX_ACTIVE_LEVELS levels [4.1][4.1]OMP_SCHEDULE typel,chunk] s the ca el-var ICV.policy may be true or false Sets the rICy that c ols the ets (46]45]OMP_NESTED nested [4.13]OMP_DEFAULT_DEVICE device [4.2][4.2]OMP_NUM_THREADS ist OpenMp [4.12]OMP DISPLAY ENV var kilobytes (K). -vor ICV that defines the OpenMP ols the number of able to the execution envi nment.places is threads participating in the OpenMP program. is displayed. [4.8][4.7]OMP_WAIT_POLICY policy [4.3][4.3]OMP_DYNAMIC dynamic [4.4][4.4]OMP_PROC_BIND policy is of master, and PASSIVE. Clauses 二2装aa的贤 ibed with the direc with the directive Data Sharing Attribute Clauses [214 Operators for reduction (initialization values) SIMD Clauses [2.8.1] 01 afelen(ength) attributes to be shared shared(list) collapse(n) min (Largest representable em type A constant nositive inte ession that specifies how Data Copying Clauses [214]2.) aligned(argument-list[:olignment]) firstprivate(ist) the target plaform Map Clause 2.14.5 original item has when the c tisencoUuntere map(mop-type:ist) ment-list) more arguments to have an invariant kroaSMge man-tyne that the always be called from inearlstfinearstepl inside aconditional statement of a SIMD loop. Specifies that the function will never be called from inside (Continued >a conditional statement of a SIMD loop. cture R MPArchitecture noweonoe o tatement: hand the e of OpenMP Language Application Program Interface Specification. 2013 OpenMP ARB OMP1013C OpenMP API 4.0 C/C++ Page 4 © 2013 OpenMP ARB OMP1013C Clauses The set of clauses that is valid on a particular directive is described with the directive. Most clauses accept a comma-separated list of list items. All list items appearing in a clause must be visible, according to the scoping rules of the base language. Not all of the clauses listed in this section are valid on all directives. The set of clauses that is valid on a particular directive is described with the directive. Data Sharing Attribute Clauses [2.14.3] [2.9.3] Data-sharing attribute clauses apply only to variables whose names are visible in the construct on which the clause appears. default(shared | none) Explicitly determines the default data-sharing attributes of variables that are referenced in a parallel, task, or teams construct, causing all variables referenced in the construct that have implicitly determined data-sharing attributes to be shared. shared(list) Declares one or more list items to be shared by tasks generated by a parallel, task, or teams construct. The programmer must ensure that storage shared by an explicit task region does not reach the end of its lifetime before the explicit task region completes its execution. private(list) Declares one or more list items to be private to a task or a SIMD lane. Each task that references a list item that appears in a private clause in any statement in the construct receives a new list item. firstprivate(list) Declares list items to be private to a task, and initializes each of them with the value that the corresponding original item has when the construct is encountered. lastprivate(list) Declares one or more list items to be private to an implicit task or to a SIMD lane, and causes the corresponding original list item to be updated after the end of the region. 4.0 linear(list[:linear-step]) Declares one or more list items to be private to a SIMD lane and to have a linear relationship with respect to the iteration space of a loop. reduction(reduction-identifier:list) Specifies a reduction-identifier and one or more list items. The reduction-identifier must match a previously declared reduction-identifier of the same name and type for each of the list items. Operators for reduction (initialization values) + (0) | (0) * (1) ^ (0) - (0) && (1) & (~0) || (0) max (Least representable number in reduction list item type) min (Largest representable number in reduction list item type) Data Copying Clauses [2.14.4] [2.9.4] copyin(list) Copies the value of the master thread’s threadprivate variable to the threadprivate variable of each other member of the team executing the parallel region. copyprivate(list) Broadcasts a value from the data environment of one implicit task to the data environments of the other implicit tasks belonging to the parallel region. 4.0 Map Clause [2.14.5] map([map-type:]ist) Map a variable from the task’s data environment to the device data environment associated with the construct. map-type: alloc: On entry to the region each new corresponding list item has an undefined initial value. to: On entry to the region each new corresponding list item is initialized with the original list item’s value. from: On exit from the region the corresponding list item’s value is assigned to each original list item. (Continued >) tofrom: (Default) On entry to the region each new corresponding list item is initialized with the original list item’s value, and on exit from the region the corresponding list item’s value is assigned to each original list item. 4.0 SIMD Clauses [2.8.1] safelen(length) If used then no two iterations executed concurrently with SIMD instructions can have a greater distance in the logical iteration space than its value. collapse(n) A constant positive integer expression that specifies how many loops are associated with the loop construct. simdlen(length) A constant positive integer expression that specifies the number of concurrent arguments of the function. 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. If no optional parameter is specified, implementation-defined default alignments for SIMD instructions on the target platforms are assumed. 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. inbranch Specifies that the function will always be called from inside a conditional statement of a SIMD loop. notinbranch Specifies that the function will never be called from inside a conditional statement of a SIMD loop. Environment Variables [4] Environment variable names are upper case, and the values assigned to them are case insensitive and may have leading and trailing white space. 4.0 [4.11] OMP_CANCELLATION policy Sets the cancel-var ICV. policy may be true or false. If true, the effects of the cancel construct and of cancellation points are enabled and cancellation is activated 4.0 [4.13] OMP_DEFAULT_DEVICE device Sets the default-device-var ICV that controls the default device number to use in device constructs. 4.0 [4.12] OMP_DISPLAY_ENV var If var is TRUE, instructs the runtime to display the OpenMP version number and the value of the ICVs associated with the environment variables as name=value pairs. If var is VERBOSE, the runtime may also display vendor-specific variables. If var is FALSE, no information is displayed. [4.3] [4.3] OMP_DYNAMIC dynamic Sets the dyn-var ICV. If true, the implementation may dynamically adjust the number of threads to use for executing parallel regions. [4.9] [4.8] OMP_MAX_ACTIVE_LEVELS levels Sets the max-active-levels-var ICV that controls the maximum number of nested active parallel regions. [4.6] [4.5] OMP_NESTED nested Sets the nest-var ICV to enable or to disable nested parallelism. Valid values for nested are true or false. [4.2] [4.2] OMP_NUM_THREADS list Sets the nthreads-var ICV for the number of threads to use for parallel regions. 4.0 [4.5] OMP_PLACES places Sets the place-partition-var ICV that defines the OpenMP places available to the execution environment. places is an abstract name (threads, cores, sockets, or imple￾mentation-defined), or a list of non-negative numbers. [4.4] [4.4] OMP_PROC_BIND policy Sets the value of the global bind-var ICV, which sets the thread affinity policy to be used for parallel regions at the corresponding nested level. policy can be the values true, false, or a comma-separated list of master, close, or spread in quotes. [4.1] [4.1] OMP_SCHEDULE type[,chunk] Sets the run-sched-var ICV for the runtime schedule type and chunk size. Valid OpenMP schedule types are static, dynamic, guided, or auto. [4.7] [4.6] OMP_STACKSIZE size[B | K | M | G] Sets the stacksize-var ICV that specifies the size of the stack for threads created by the OpenMP implementation. size is a positive integer that specifies stack size. If unit is not specified, size is measured in kilobytes (K). [4.10] [4.9] OMP_THREAD_LIMIT limit Sets the thread-limit-var ICV that controls the number of threads participating in the OpenMP program. [4.8] [4.7] OMP_WAIT_POLICY policy Sets the wait-policy-var ICV that provides a hint to an OpenMP implementation about the desired behavior of waiting threads. Valid values for policy are ACTIVE (waiting threads consume processor cycles while waiting) and PASSIVE. Copyright © 2013 OpenMP Architecture Review Board. Permission to copy without fee all or part of this material is granted, provided the OpenMP Architecture Review Board copyright notice and the title of this document appear. Notice is given that copying is by permission of the OpenMP Architecture Review Board. Products or publications based on one or more of the OpenMP specifications must acknowledge the copyright by displaying the following statement: “OpenMP is a trademark of the OpenMP Architecture Review Board. Portions of this product/ publication may have been derived from the OpenMP Language Application Program Interface Specification.” ®
<<向上翻页
©2008-现在 cucdc.com 高等教育资讯网 版权所有