正在加载图片...
OpenMP API5.0 Page3 Directives and Constructs(continued) taskloop simd21o.2到 depend (depend-modifier dependence-type:locator-fist) declare target +h enterdbh:lscotoreprsso op simd (idausel. target exit data Hpragma omp target exit data (clousel[,Iclause/... Somp tareet exdit data fdousel L.Iclousel1 taskyield [2.10.4]12.11.2) n be suspended in favo decare target fclouselL jdousel.... pragma omp taskyield ) Somp taskyield Memory management directive Combined constructs Parallel Worksharing Loop 5 prama omptaretdouse ause lel do [clousef[idause]. omo const mem soace sepepanldb eepteaRh2aeltoodectve parallel loop) promp allocate)cuse m-behavofvrob-c 5 omp allocate作dause epnden-ype amc圆 豆 difier:scal r-expression) ehrtEebtepaaleoropdnetves evice_num Device directives and construct ession of kind omp allocator handle kind target data P3ponsousetbusel- somtegeoed ISomp target update clousel_.] arget enter data es to a econstnahndnooterttetanine #pragma omp target enter data (clousel jclousel.... 50m areet enter data [clousel f.Iclousel.I pmp-type-modiferl 92019 OpenMP AR OMP0519-01-OMP© 2019 OpenMP ARB OMP0519-01-OMP5 OpenMP API 5.0 Page 3 Directives and Constructs (continued) taskloop simd [2.10.3] [2.9.3] Specifies that a loop can be executed concurrently using SIMD instructions, and that those iterations will also be executed in parallel using OpenMP tasks. C/C++#pragma omp taskloop simd [clause[ [, ]clause] ...] for-loops For!$omp taskloop simd [clause[ [, ]clause] ...] do-loops [!$omp end taskloop simd] clause: Any accepted by the simd or taskloop directives with identical meanings and restrictions. taskyield [2.10.4] [2.11.2] Specifies that the current task can be suspended in favor of execution of a different task. C/C++ #pragma omp taskyield For !$omp taskyield Memory management directive Memory spaces [2.11.1] Predefined memory spaces [Table 2.8, below] represent storage resources for storage and retrieval of variables. Memory space Storage selection intent omp_default_mem_space System default storage. omp_large_cap_mem_space Storage with large capacity. omp_const_mem_space Storage optimized for variables with constant values. omp_high_bw_mem_space Storage with high bandwidth. omp_low_lat_mem_space Storage with low latency. allocate [2.11.3] Specifies how a set of variables is allocated. C/C++ #pragma omp allocate (list) [clause] For !$omp allocate (list) [clause] or !$omp allocate [ (list) ] clause [ !$omp allocate (list) clause [...]] allocate statement clause: allocator (allocator) - where allocator is an expression of: C/C++ type omp_allocator_handle_t For kind omp_allocator_handle_kind Device directives and construct target data [2.12.2] [2.10.1] Creates a device data environment for te extent of the region. C/C++#pragma omp target data clause[ [ [, ]clause] ...] structured-block For!$omp target data clause[ [ [, ]clause] ...] structured-block !$omp end target data clause: map ([[map-type-modifier[ ,] [map-type-modifier[,] ...] map-type: ] locator-list) use_device_ptr (ptr-list), use_device_addr (list) C/C++ if ( [target data : ] scalar-expression) C/C++ device (scalar-expression) For if ( [target data : ] scalar-logical-expression) For device (scalar-integer-expression) target enter data [2.12.3] [2.10.2] Maps variables to a device data environment. C/C++ #pragma omp target enter data [clause[ [, ]clause] ...] For !$omp target enter data [clause[ [, ]clause] ...] clause: map ([map-type-modifier[ ,] [map-type-modifier[ ,] ...] map-type: locator-list) depend ([depend-modifier,] dependence-type : locator-list) nowait C/C++ if ([ target enter data : ] scalar-expression) C/C++ device (integer-expression) For if ([ target enter data : ] scalar-logical-expression) For device (scalar-integer-expression) target exit data [2.12.4] [2.10.3] Unmaps variables from a device data environment. C/C++ #pragma omp target exit data [clause[ [, ]clause] ...] For !$omp target exit data [clause[ [, ]clause] ...] clause: map ([map-type-modifier[ ,] [map-type-modifier[ ,] ...] map-type: locator-list) depend ([depend-modifier, ] dependence-type : locator-list) nowait C/C++ if ([ target exit data : ] scalar-expression) C/C++ device (integer-expression) For if ([ target exit data : ] scalar-logical-expression) For device (scalar-integer-expression) target[2.12.5] [2.10.4] Map variables to a device data environment and execute the construct on that device. C/C++#pragma omp target [clause[ [, ]clause] ...] structured-block For!$omp target [clause[ [, ]clause] ...] structured-block !$omp end target clause: private (list), firstprivate (list) in_reduction (reduction-identifier : list) map ([[map-type-modifier[ ,] [map-type-modifier[,] ...] map-type: ] locator-list) is_device_ptr (list) defaultmap (implicit-behavior[:variable-category]) nowait depend([depend-modifier, ] dependence-type : locator-list) allocate ([allocator : ] list) uses_allocators (allocator[ (allocator-traits-array)] [,allocator[ (allocator-traits-array) ] ...] ) C/C++ if ([ target : ] scalar-expression) C/C++ device([device-modifier:] integer-expression) For if ([ target : ] scalar-logical-expression) For device ([device-modifier:] scalar-integer-expression) device-modifier: ancestor, device_num allocator: C/C++ Identifier of type omp_allocator_handle_t allocator: For Integer expression of kind omp_allocator_handle_kind allocator-traits-array: C/C++ Identifier of const omp_alloctrait_t * type. allocator-traits-array: For Array of type(omp_alloctrait) type target update [2.12.6] [2.10.5] Makes the corresponding list items in the device data environment consistent with their original list items, according to the specified motion clauses. C/C++ #pragma omp target update clause[ [ [, ]clause] ...] For !$omp target update clause[ [ [, ]clause] ...] clause: motion-clause or one of: nowait depend ([depend-modifier, ] dependence-type : locator-list) C/C++ if ([ target update : ] scalar-expression) C/C++ device (integer-expression) For if ([ target update : ] scalar-logical-expression) For device (scalar-integer-expression) motion-clause: to ([mapper(mapper-identifier) : ] locator-list) from ([mapper(mapper-identifier) : ] locator-list) declare target[2.12.7] [2.10.6] A declarative directive that specifies that variables, functions, and subroutines are mapped to a device. C/C++ #pragma omp declare target declarations-definition-seq #pragma omp end declare target - or - #pragma omp declare target (extended-list) - or - #pragma omp declare target clause[ [, ]clause ...] For !$omp declare target (extended-list) - or - !$omp declare target [clause[ [, ]clause] ...] clause: to (extended-list), link (list) device_type (host | nohost | any) extended-list: A comma-separated list of named variables, procedure names, and named common blocks. Combined constructs Parallel Worksharing Loop [2.13.1] [2.11.1] Specifies a parallel construct containing a worksharing￾loop construct with one or more associated loops. C/C++#pragma omp parallel for [clause[ [, ]clause] ...] for-loop For!$omp parallel do [clause[ [, ]clause] ...] do-loops [!$omp end parallel do] clause: Any accepted by the parallel or for/do directives, except the nowait clause, with identical meanings and restrictions. parallel loop [2.13.2] Shortcut for specifying a parallel construct containing a loop construct with one or more associated loops and no other statements. C/C++#pragma omp parallel loop [clause[ [, ]clause] ...] for-loops For!$omp parallel loop [clause[ [, ]clause] ...] do-loops [!$omp end parallel loop] clause: Any accepted by the parallel or loop directives, with identical meanings and restrictions. parallel sections [2.13.3] [2.11.2] Shortcut for specifying a parallel construct containing a sections construct and no other statements. C/C++ #pragma omp parallel sections [clause[ [, ]clause] ...] { [#pragma omp section] structured-block [#pragma omp section structured-block] ... } For !$omp parallel sections [clause[ [, ]clause] ...] [!$omp section] structured-block [!$omp section structured-block] ... !$omp end parallel sections clause: Any clauses accepted by the parallel or sections directives, with identical meanings and restrictions. parallel workshare [2.13.4] [2.11.3] Shortcut for specifying a parallel construct containing a workshare construct and no other statements. For!$omp parallel workshare [clause[ [, ]clause] ...] structured-block !$omp end parallel workshare clause: Any of the clauses accepted by the parallel directive, with identical meanings and restrictions. Continued4 Continued4
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有