|
| repeat (S const &skeleton, SizeF const &size_functor) |
|
nested_p_type | nested_skeleton () const |
| returns underlying skeleton to be repeated
|
|
in_port_type | in_port (std::size_t id_offset) const |
| maps the input port of repeated skeleton More...
|
|
template<typename In > |
out_port_type< In >::type | out_port (In const &in, std::size_t id_offset) const |
| maps the output port of repeated skeleton More...
|
|
std::size_t | lid_offset (std::size_t repeat_lid_offset, std::size_t iter_num) const |
| calculate the offset of underlying skeleton based on repeat offset and current iteration number More...
|
|
nested_p_type::in_port_type | nested_in_port (std::size_t repeat_lid_offset, std::size_t iter_num) const |
| maps the in port of current underlying skeleton based on the the offset of repeat and iteration number More...
|
|
template<typename In > |
nested_p_type::template out_port_type< In >::type | nested_out_port (In const &in, std::size_t repeat_lid_offset, std::size_t iter_num) const |
| maps the out port of current underlying skeleton based on the the offset of repeat and iteration number More...
|
|
template<typename Spawner , typename... Views> |
void | set_dimensions (Spawner const &spawner, Views const &... views) |
| sets the underlying skeleton sizes based on the given tuple of view sizes. It computes its own size by passing the underlying skeleton's size to the SizeF More...
|
|
dims_type | dimensions () const |
|
std::size_t | last_id () const |
| last_id is the maximum task id that this skeleton will create
|
|
template<typename Spawner , typename Coord , typename In , typename Out > |
bool | spawn (Spawner &spawner, std::size_t lid_offset, Coord const &skeleton_size, Coord const &coord, In const &in, Out const &out, std::size_t cur_stage=0) |
| A repeat skeleton starts the spawning process by spawning one iteration at a time and with the help of the flows given it redirects input and outputs in between the iterations. It continues the spawning process for the number of times given by SizeF . More...
|
|
template<typename S, typename SizeF, typename Flows>
class stapl::skeletons::skeletons_impl::repeat< S, SizeF, Flows >
A repeat skeleton spawns a single skeleton for the number of times specified by SizeF
.
- Template Parameters
-
S | the enclosed skeleton that will be spawned for SizeF times |
SizeF | a size functor used to determine number of iterations |
Flows | specifies the high-level flow dependencies for this repeat skeleton |
Example - A simple repeat
skeleton with piped
flow:
template<typename S , typename SizeF , typename Flows >
template<typename Spawner , typename Coord , typename In , typename Out >
bool stapl::skeletons::skeletons_impl::repeat< S, SizeF, Flows >::spawn |
( |
Spawner & |
spawner, |
|
|
std::size_t |
lid_offset, |
|
|
Coord const & |
skeleton_size, |
|
|
Coord const & |
coord, |
|
|
In const & |
in, |
|
|
Out const & |
out, |
|
|
std::size_t |
cur_stage = 0 |
|
) |
| |
A repeat
skeleton starts the spawning process by spawning one iteration at a time and with the help of the flows given it redirects input and outputs in between the iterations. It continues the spawning process for the number of times given by SizeF
.
Similar to the other composite skeletons, a repeat skeleton can pause the spawning process and continue later on.
- Parameters
-
spawner | is used for spawning the enclosed skeleton for the given number of times by SizeF |
lid_offset | the safe id to start the spawning from |
skeleton_size | the size of skeletons enclosing this skeleton |
coord | the coordinate of this skeleton in the evaluated skeletons coordinate space |
in | the input flow passed to this skeleton |
out | the output flow that this skeleton would produce its results for |
cur_stage | current iteration number of the repetition |
- Returns
- true if spawning of last iteration is finished
- See also
- repeat.hpp
-
spawner.hpp