Class encapsulating all of the possible callbacks in a Parallel.For-style loop. This includes Parallel.For, Parallel.ForReduction<T>, Parallel.ForCollapse, and Parallel.ForReductionCollapse<T>.
More...
|
| ForAction (Action< int > action) |
| Constructor for regular for loops with 1 variable. More...
|
|
| ForAction (ActionRef< T > action) |
| Constructor for reduction for loops with 1 variable. More...
|
|
| ForAction (Action< int, int > action,(int, int)[] ranges) |
| Constructor for collapsed for loops with 2 variables. More...
|
|
| ForAction (Action< int, int, int > action,(int, int)[] ranges) |
| Constructor for collapsed for loops with 3 variables. More...
|
|
| ForAction (Action< int, int, int, int > action,(int, int)[] ranges) |
| Constructor for collapsed for loops with 4 variables. More...
|
|
| ForAction (Action< int[]> action,(int, int)[] ranges) |
| Constructor for collapsed for loops with unbounded variables. More...
|
|
| ForAction (ActionRef2< T > action,(int, int)[] ranges) |
| Constructor for reduction collapsed for loops with 2 variables. More...
|
|
| ForAction (ActionRef3< T > action,(int, int)[] ranges) |
| Constructor for reduction collapsed for loops with 3 variables. More...
|
|
| ForAction (ActionRef4< T > action,(int, int)[] ranges) |
| Constructor for reduction collapsed for loops with 4 variables. More...
|
|
| ForAction (ActionRefN< T > action,(int, int)[] ranges) |
| Constructor for reduction collapsed for loops with unbounded variables. More...
|
|
void | PerformLoop (ref int curr_iter, int start, int end, ref T local) |
| Executes a chunk using the action selected by ForAction.selector More...
|
|
|
ValueTuple< int, int >[] | ranges [get, set] |
| Represents the ranges of collapsed loops for unflattening, ensuring that loops do not have too many iterations. More...
|
|
bool | IsCollapse [get, private set] |
| Tracks if the action represents a collapsed for loop. More...
|
|
bool | IsReduction [get, private set] |
| Tracks if the action represents a reduction loop. More...
|
|
|
void | ComputeIndices2 (int curr_iter, int start1, int start2, int diff2, out int i, out int j) |
| Computes the indices for collapsed loops with 2 indices. More...
|
|
void | ComputeIndices3 (int curr_iter, int start1, int start2, int start3, int diff2, int diff3, out int i, out int j, out int k) |
| Computes the indices for collapsed loops with 3 indices. More...
|
|
void | ComputeIndicesN (int curr_iter, int[] indices) |
| Computes the indices for collapsed loops with 4 or more indices. More...
|
|
|
Action< int > | omp_fn |
| Represents an action that can be selected via ActionSelector.Regular More...
|
|
ActionRef< T > | omp_red |
| Represents an action that can be selected via ActionSelector.Reduction More...
|
|
Action< int, int > | omp_col_2 |
| Represents an action that can be selected via ActionSelector.Collapse2 More...
|
|
Action< int, int, int > | omp_col_3 |
| Represents an action that can be selected via ActionSelector.Collapse3 More...
|
|
Action< int, int, int, int > | omp_col_4 |
| Represents an action that can be selected via ActionSelector.Collapse4 More...
|
|
Action< int[]> | omp_col_n |
| Represents an action that can be selected via ActionSelector.CollapseN More...
|
|
ActionRef2< T > | omp_red_col_2 |
| Represents an action that can be selected via ActionSelector.ReductionCollapse2 More...
|
|
ActionRef3< T > | omp_red_col_3 |
| Represents an action that can be selected via ActionSelector.ReductionCollapse3 More...
|
|
ActionRef4< T > | omp_red_col_4 |
| Represents an action that can be selected via ActionSelector.ReductionCollapse4 More...
|
|
ActionRefN< T > | omp_red_col_n |
| Represents an action that can be selected via ActionSelector.ReductionCollapseN More...
|
|
ActionSelector | selector |
| Holds the data regarding which action to select. More...
|
|
ValueTuple< int, int >[] | ranges_prv |
| Represents the ranges of collapsed loops for future unflattening. More...
|
|
int[] | indices |
| Array representing the starting indices. More...
|
|
int[] | end_indices |
| Array representing the ending indices. More...
|
|
int[] | diffs |
| Array which represents the length of collapsed loops in each dimension. More...
|
|
Class encapsulating all of the possible callbacks in a Parallel.For-style loop. This includes Parallel.For, Parallel.ForReduction<T>, Parallel.ForCollapse, and Parallel.ForReductionCollapse<T>.
- Template Parameters
-
T | The type of the reduction callback. |
◆ ForAction() [1/10]
Constructor for regular for loops with 1 variable.
- Parameters
-
◆ ForAction() [2/10]
Constructor for reduction for loops with 1 variable.
- Parameters
-
◆ ForAction() [3/10]
Constructor for collapsed for loops with 2 variables.
- Parameters
-
action | The action to run. |
ranges | The ranges of the collapsed loop. |
◆ ForAction() [4/10]
Constructor for collapsed for loops with 3 variables.
- Parameters
-
action | The action to run. |
ranges | The ranges of the collapsed loop. |
◆ ForAction() [5/10]
Constructor for collapsed for loops with 4 variables.
- Parameters
-
action | The action to run. |
ranges | The ranges of the collapsed loop. |
◆ ForAction() [6/10]
Constructor for collapsed for loops with unbounded variables.
- Parameters
-
action | The action to run. |
ranges | The ranges of the collapsed loop. |
◆ ForAction() [7/10]
Constructor for reduction collapsed for loops with 2 variables.
- Parameters
-
action | The action to run. |
ranges | The ranges of the collapsed loop. |
◆ ForAction() [8/10]
Constructor for reduction collapsed for loops with 3 variables.
- Parameters
-
action | The action to run. |
ranges | The ranges of the collapsed loop. |
◆ ForAction() [9/10]
Constructor for reduction collapsed for loops with 4 variables.
- Parameters
-
action | The action to run. |
ranges | The ranges of the collapsed loop. |
◆ ForAction() [10/10]
Constructor for reduction collapsed for loops with unbounded variables.
- Parameters
-
action | The action to run. |
ranges | The ranges of the collapsed loop. |
◆ ComputeIndices2()
void DotMP.ForAction< T >.ComputeIndices2 |
( |
int |
curr_iter, |
|
|
int |
start1, |
|
|
int |
start2, |
|
|
int |
diff2, |
|
|
out int |
i, |
|
|
out int |
j |
|
) |
| |
|
inlineprivate |
Computes the indices for collapsed loops with 2 indices.
- Parameters
-
curr_iter | The current iteration to unflatten. |
start1 | The start of the first pair of indices. |
start2 | The start of the second pair of indices. |
diff2 | The divisor to divrem by. |
i | The first computed index. |
j | The second computed index. |
◆ ComputeIndices3()
void DotMP.ForAction< T >.ComputeIndices3 |
( |
int |
curr_iter, |
|
|
int |
start1, |
|
|
int |
start2, |
|
|
int |
start3, |
|
|
int |
diff2, |
|
|
int |
diff3, |
|
|
out int |
i, |
|
|
out int |
j, |
|
|
out int |
k |
|
) |
| |
|
inlineprivate |
Computes the indices for collapsed loops with 3 indices.
- Parameters
-
curr_iter | The current iteration to unflatten. |
start1 | The start of the first pair of indices. |
start2 | The start of the second pair of indices. |
start3 | The start of the third pair of indices. |
diff2 | The difference in the second pair of indices. |
diff3 | The difference in the third pair of indices. |
i | The first computed index. |
j | The second computed index. |
k | The third computed index. |
◆ ComputeIndicesN()
Computes the indices for collapsed loops with 4 or more indices.
- Parameters
-
curr_iter | The current iteration to unflatten. |
indices | The array to store indices in. |
◆ PerformLoop()
void DotMP.ForAction< T >.PerformLoop |
( |
ref int |
curr_iter, |
|
|
int |
start, |
|
|
int |
end, |
|
|
ref T |
local |
|
) |
| |
|
inlinepackage |
Executes a chunk using the action selected by ForAction.selector
- Parameters
-
curr_iter | A reference to the current iteration. |
start | The start of the chunk, inclusive. |
end | The end of the chunk, exclusive. |
local | The local variable to reduce to. |
◆ diffs
Array which represents the length of collapsed loops in each dimension.
◆ end_indices
Array representing the ending indices.
◆ indices
Array representing the starting indices.
◆ omp_col_2
Represents an action that can be selected via ActionSelector.Collapse2
◆ omp_col_3
Represents an action that can be selected via ActionSelector.Collapse3
◆ omp_col_4
Represents an action that can be selected via ActionSelector.Collapse4
◆ omp_col_n
Represents an action that can be selected via ActionSelector.CollapseN
◆ omp_fn
Represents an action that can be selected via ActionSelector.Regular
◆ omp_red
Represents an action that can be selected via ActionSelector.Reduction
◆ omp_red_col_2
Represents an action that can be selected via ActionSelector.ReductionCollapse2
◆ omp_red_col_3
Represents an action that can be selected via ActionSelector.ReductionCollapse3
◆ omp_red_col_4
Represents an action that can be selected via ActionSelector.ReductionCollapse4
◆ omp_red_col_n
Represents an action that can be selected via ActionSelector.ReductionCollapseN
◆ ranges_prv
Represents the ranges of collapsed loops for future unflattening.
◆ selector
Holds the data regarding which action to select.
◆ IsCollapse
Tracks if the action represents a collapsed for loop.
◆ IsReduction
Tracks if the action represents a reduction loop.
◆ ranges
Represents the ranges of collapsed loops for unflattening, ensuring that loops do not have too many iterations.
The documentation for this class was generated from the following file: