Template Numerical Library version\ main:161afe73
|
Parallel for loop for three dimensional domain of indices. More...
#include <TNL/Algorithms/ParallelFor.h>
Static Public Member Functions | |
template<typename Index , typename Function , typename... FunctionArgs> | |
static void | exec (Index startX, Index startY, Index startZ, Index endX, Index endY, Index endZ, Function f, FunctionArgs... args) |
Static method for the execution of the loop. More... | |
template<typename Index , typename Function , typename... FunctionArgs> | |
static void | exec (Index startX, Index startY, Index startZ, Index endX, Index endY, Index endZ, typename Device::LaunchConfiguration launch_config, Function f, FunctionArgs... args) |
Overload with custom launch configuration (which is ignored for TNL::Devices::Sequential). | |
Parallel for loop for three dimensional domain of indices.
Device | specifies the device where the for-loop will be executed. It can be TNL::Devices::Host, TNL::Devices::Cuda or TNL::Devices::Sequential. |
|
inlinestatic |
Static method for the execution of the loop.
Index | is the type of the loop indices. |
Function | is the type of the functor to be called in each iteration (it is usually deduced from the argument used in the function call). |
FunctionArgs | is a variadic pack of types for additional parameters that are forwarded to the functor in every iteration. |
startX | the for-loop iterates over index domain [startX,endX) x [startY,endY) x [startZ,endZ) . |
startY | the for-loop iterates over index domain [startX,endX) x [startY,endY) x [startZ,endZ) . |
startZ | the for-loop iterates over index domain [startX,endX) x [startY,endY) x [startZ,endZ) . |
endX | the for-loop iterates over index domain [startX,endX) x [startY,endY) x [startZ,endZ) . |
endY | the for-loop iterates over index domain [startX,endX) x [startY,endY) x [startZ,endZ) . |
endZ | the for-loop iterates over index domain [startX,endX) x [startY,endY) x [startZ,endZ) . |
f | is the function to be called in each iteration |
args | are additional parameters to be passed to the function f. |
The function f is called for each iteration as
where the first parameter is changing the most often.