summaryrefslogtreecommitdiffstats
path: root/test/OpenMP/distribute_parallel_for_copyin_messages.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Resubmission of http://reviews.llvm.org/D21564 after fixes.Carlo Bertolli2016-06-271-0/+190
| | | | | | | | | | | | | | | | [OpenMP] Initial implementation of parse and sema for composite pragma 'distribute parallel for' This patch is an initial implementation for #distribute parallel for. The main differences that affect other pragmas are: The implementation of 'distribute parallel for' requires blocking of the associated loop, where blocks are "distributed" to different teams and iterations within each block are scheduled to parallel threads within each team. To implement blocking, sema creates two additional worksharing directive fields that are used to pass the team assigned block lower and upper bounds through the outlined function resulting from 'parallel'. In this way, scheduling for 'for' to threads can use those bounds. As a consequence of blocking, the stride of 'distribute' is not 1 but it is equal to the blocking size. This is returned by the runtime and sema prepares a DistIncrExpr variable to hold that value. As a consequence of blocking, the global upper bound (EnsureUpperBound) expression of the 'for' is not the original loop upper bound (e.g. in for(i = 0 ; i < N; i++) this is 'N') but it is the team-assigned block upper bound. Sema creates a new expression holding the calculation of the actual upper bound for 'for' as UB = min(UB, PrevUB), where UB is the loop upper bound, and PrevUB is the team-assigned block upper bound. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@273884 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r273705Carlo Bertolli2016-06-241-190/+0
| | | | | | | | | [OpenMP] Initial implementation of parse and sema for composite pragma 'distribute parallel for' git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@273709 91177308-0d34-0410-b5e6-96231b3b80d8
* [OpenMP] Initial implementation of parse and sema for composite pragma ↵Carlo Bertolli2016-06-241-0/+190
'distribute parallel for' http://reviews.llvm.org/D21564 This patch is an initial implementation for #distribute parallel for. The main differences that affect other pragmas are: The implementation of 'distribute parallel for' requires blocking of the associated loop, where blocks are "distributed" to different teams and iterations within each block are scheduled to parallel threads within each team. To implement blocking, sema creates two additional worksharing directive fields that are used to pass the team assigned block lower and upper bounds through the outlined function resulting from 'parallel'. In this way, scheduling for 'for' to threads can use those bounds. As a consequence of blocking, the stride of 'distribute' is not 1 but it is equal to the blocking size. This is returned by the runtime and sema prepares a DistIncrExpr variable to hold that value. As a consequence of blocking, the global upper bound (EnsureUpperBound) expression of the 'for' is not the original loop upper bound (e.g. in for(i = 0 ; i < N; i++) this is 'N') but it is the team-assigned block upper bound. Sema creates a new expression holding the calculation of the actual upper bound for 'for' as UB = min(UB, PrevUB), where UB is the loop upper bound, and PrevUB is the team-assigned block upper bound. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@273705 91177308-0d34-0410-b5e6-96231b3b80d8