Go to the source code of this file.
|
| #define | parallelForWithSchedulerInstructions(counter, max, loopParallelism) for( int counter = 0; counter < max; counter++ ) { |
| | Parallel for.
|
| |
| #define | endParallelFor } |
| |
| #define | parallelDforWithDynamicScheduling2d(counter, max, loopParallelism) |
| |
| #define | parallelDforWithDynamicScheduling3d(counter, max, loopParallelism) |
| |
| #define | parallelDforWithDynamicScheduling4d(counter, max, loopParallelism) |
| |
| #define | parallelDforWithDynamicScheduling5d(counter, max, loopParallelism) |
| |
| #define | endParallelDfor }} |
| |
| #define | simtForWithSchedulerInstructions(counter, max, loopParallelism) |
| |
| #define | endSimtFor |
| |
| #define | simtDforWithDynamicScheduling2d(counter, max, loopParallelism) |
| | We need an additional opening bracket here, as we need one more nested scope for 4d and 5d.
|
| |
| #define | simtDforWithDynamicScheduling3d(counter, max, loopParallelism) |
| |
| #define | simtDforWithDynamicScheduling4d(counter, max, loopParallelism) |
| |
| #define | simtDforWithDynamicScheduling5d(counter, max, loopParallelism) |
| |
| #define | endSimtDfor |
| |
◆ endParallelDfor
| #define endParallelDfor }} |
◆ endParallelFor
◆ endSimtDfor
Value: }} \
); \
}
void wait(MPI_Request &request, const std::string &fullQualifiedClassName, const std::string &functionName)
Wrapper around MPI_Wait.
- The first two (curly) brackets close the functor and the for loop within this functor (4d and 5d). For d=2 and d=3, the functor is using two opening brackets.
- The third (round) bracket closes the parallel_for, which is a mere function call. So it followed by a semicolon.
- The fourth combination of a curly plus round bracket close the submit(). This one is followed by a wait().
- We have another curly bracket here as we also embed the counter##Max thing into a scope. If we have two loops with the same counter name, we don't want to run into a duplicate variable error.
Definition at line 139 of file Loop.h.
◆ endSimtFor
Value:
- The first (curly) bracket closes functor of the loop body.
- The second (round) bracket closes the parallel_for, which is a mere function call. So it is followed by a semicolon.
- The third combination of a curly plus round bracket close the submit(). It also comprises the wait().
Definition at line 72 of file Loop.h.
◆ parallelDforWithDynamicScheduling2d
| #define parallelDforWithDynamicScheduling2d |
( |
|
counter, |
|
|
|
max, |
|
|
|
loopParallelism |
|
) |
| |
Value: { \
for( int counter##0 = 0; counter##0 < counter##Max(0); counter##0++ ) \
for( int counter##1 = 0; counter##1 < counter##Max(1); counter##1++ ) { \
Definition at line 20 of file Loop.h.
◆ parallelDforWithDynamicScheduling3d
| #define parallelDforWithDynamicScheduling3d |
( |
|
counter, |
|
|
|
max, |
|
|
|
loopParallelism |
|
) |
| |
Value: { \
for( int counter##0 = 0; counter##0 < counter##Max(0); counter##0++ ) \
for( int counter##1 = 0; counter##1 < counter##Max(1); counter##1++ ) \
for( int counter##2 = 0; counter##2 < counter##Max(2); counter##2++ ) { \
Definition at line 27 of file Loop.h.
◆ parallelDforWithDynamicScheduling4d
| #define parallelDforWithDynamicScheduling4d |
( |
|
counter, |
|
|
|
max, |
|
|
|
loopParallelism |
|
) |
| |
Value: { \
for( int counter##0 = 0; counter##0 < counter##Max(0); counter##0++ ) \
for( int counter##1 = 0; counter##1 < counter##Max(1); counter##1++ ) \
for( int counter##2 = 0; counter##2 < counter##Max(2); counter##2++ ) \
for( int counter##3 = 0; counter##3 < counter##Max(3); counter##3++ ) { \
Definition at line 35 of file Loop.h.
◆ parallelDforWithDynamicScheduling5d
| #define parallelDforWithDynamicScheduling5d |
( |
|
counter, |
|
|
|
max, |
|
|
|
loopParallelism |
|
) |
| |
Value: { \
for( int counter##0 = 0; counter##0 < counter##Max(0); counter##0++ ) \
for( int counter##1 = 0; counter##1 < counter##Max(1); counter##1++ ) \
for( int counter##2 = 0; counter##2 < counter##Max(2); counter##2++ ) \
for( int counter##3 = 0; counter##3 < counter##Max(3); counter##3++ ) \
for( int counter##4 = 0; counter##4 < counter##Max(4); counter##4++ ) { \
Definition at line 44 of file Loop.h.
◆ parallelForWithSchedulerInstructions
| #define parallelForWithSchedulerInstructions |
( |
|
counter, |
|
|
|
max, |
|
|
|
loopParallelism |
|
) |
| for( int counter = 0; counter < max; counter++ ) { |
Parallel for.
SYCL does not support a classic parallel for which can host virtual function calls, semaphores, etc. Therefore, this is maps onto a plain for.
Definition at line 14 of file Loop.h.
◆ simtDforWithDynamicScheduling2d
| #define simtDforWithDynamicScheduling2d |
( |
|
counter, |
|
|
|
max, |
|
|
|
loopParallelism |
|
) |
| |
Value: { \
tarch::multicore::getHostSYCLQueue().submit([&](auto& handle) { \
handle.parallel_for( \
::sycl::range<2>{static_cast<std::size_t>(counter##Max(0)),static_cast<std::size_t>(counter##Max(1))}, \
[=](::sycl::id<2> counter##Iterator) {{ \
We need an additional opening bracket here, as we need one more nested scope for 4d and 5d.
- See also
- simtDforWithDynamicScheduling4d
-
simtDforWithDynamicScheduling5d
Definition at line 84 of file Loop.h.
◆ simtDforWithDynamicScheduling3d
| #define simtDforWithDynamicScheduling3d |
( |
|
counter, |
|
|
|
max, |
|
|
|
loopParallelism |
|
) |
| |
Value: { \
tarch::multicore::getHostSYCLQueue().submit([&](auto& handle) { \
handle.parallel_for( \
::sycl::range<3>{static_cast<std::size_t>(counter##Max(0)),static_cast<std::size_t>(counter##Max(1)),static_cast<std::size_t>(counter##Max(2))}, \
[=](::sycl::id<3> counter##Iterator) {{ \
tarch::la::Vector<3, int> counter = {
static_cast<int>(counter##Iterator[0]),
static_cast<int>(counter##Iterator[1]),
static_cast<int>(counter##Iterator[2]) };
Definition at line 94 of file Loop.h.
◆ simtDforWithDynamicScheduling4d
| #define simtDforWithDynamicScheduling4d |
( |
|
counter, |
|
|
|
max, |
|
|
|
loopParallelism |
|
) |
| |
Value: { \
tarch::multicore::getHostSYCLQueue().submit([&](auto& handle) { \
handle.parallel_for( \
::sycl::range<3>{static_cast<std::size_t>(counter##Max(0)),static_cast<std::size_t>(counter##Max(1)),static_cast<std::size_t>(counter##Max(2))}, \
[=](::sycl::id<3> counter##Iterator) { \
for (int counter##Iterator3 = 0; counter##Iterator3<counter##Max(3); counter##Iterator3++ ) { \
tarch::la::Vector<4, int> counter = {
static_cast<int>(counter##Iterator[0]),
static_cast<int>(counter##Iterator[1]),
static_cast<int>(counter##Iterator[2]),
static_cast<int>(counter##Iterator3) };
Definition at line 104 of file Loop.h.
◆ simtDforWithDynamicScheduling5d
| #define simtDforWithDynamicScheduling5d |
( |
|
counter, |
|
|
|
max, |
|
|
|
loopParallelism |
|
) |
| |
Value: { \
tarch::multicore::getHostSYCLQueue().submit([&](auto& handle) { \
handle.parallel_for( \
::sycl::range<3>{static_cast<std::size_t>(counter##Max(0)),static_cast<std::size_t>(counter##Max(1)),static_cast<std::size_t>(counter##Max(2))}, \
[=](::sycl::id<3> counter##Iterator) { \
for (int counter##Iterator3 = 0; counter##Iterator3<counter##Max(3); counter##Iterator3++ ) \
for (int counter##Iterator4 = 0; counter##Iterator4<counter##Max(4); counter##Iterator4++ ) { \
tarch::la::Vector<5, int> counter = {
static_cast<int>(counter##Iterator[0]),
static_cast<int>(counter##Iterator[1]),
static_cast<int>(counter##Iterator[2]),
static_cast<int>(counter##Iterator3),
static_cast<int>(counter##Iterator4) };
Definition at line 115 of file Loop.h.
◆ simtForWithSchedulerInstructions
| #define simtForWithSchedulerInstructions |
( |
|
counter, |
|
|
|
max, |
|
|
|
loopParallelism |
|
) |
| |
Value: tarch::multicore::getHostSYCLQueue().submit([&](auto& handle) { \
handle.parallel_for( \
::sycl::range<1>{static_cast<std::size_t>(max)}, \
[=](::sycl::id<1> counter##Iterator) { \
int counter = counter##Iterator[0];
Definition at line 57 of file Loop.h.