STAPL API Reference |
Modules Classes |
Executable skeletons change functional skeletons from higher-order functions to regular functions by providing access to the input data. More...
Modules | |
Executable Skeletons Internal | |
Functions | |
template<typename MapOp , typename ... V> | |
void | stapl::map_func (MapOp const &map_op, V &&... views) |
Construct and execute a PARAGRAPH that will perform a map operation, applying the fine-grain work function to the element of the views provided. More... | |
template<typename MapOp , typename ReduceOp , typename ... V> | |
std::enable_if< !std::is_base_of< skeletons::tags::coarsening_tag, MapOp >::value, stapl::result_of::map_reduce< stapl::use_default, MapOp, ReduceOp, V... >>::type::type | stapl::map_reduce (MapOp const &map_op, ReduceOp const &reduce_op, V &&... v) |
Applies map-reduce on a set of inputs. In the first step the given map operation (zip operation if there is more than one view involved) on the given inputs and the results are reduce using the given reduce operation (reduce_op ) More... | |
template<typename Tag , typename MapOp , typename ReduceOp , typename ... V> | |
stapl::result_of::map_reduce< Tag, MapOp, ReduceOp, V... >::type | stapl::map_reduce (MapOp const &map_op, ReduceOp const &reduce_op, V &&... v) |
Applies map-reduce on the given input by using the specific map_reduce implementation specified by the given tag. Current set of tags which can be used for map_reduce are: More... | |
template<typename Scheduler , typename MapOp , typename ReduceOp , typename ... V> | |
stapl::result_of::map_reduce< stapl::use_default, MapOp, ReduceOp, V... >::type | stapl::map_reduce_sched (Scheduler const &scheduler, MapOp const &map_op, ReduceOp const &reduce_op, V &&... v) |
Construct and execute a PARAGRAPH that will perform a map operation, applying the fine-grain work function to the element of the views provided. The scheduler provided will be used by the executor processing the tasks of the PARAGRAPH as it is executed. More... | |
template<typename Scheduler , typename MapOp , typename ... V> | |
void | stapl::map_func_sched (Scheduler const &scheduler, MapOp const &map_op, V &&... views) |
Construct and execute a PARAGRAPH that will perform a map operation, applying the fine-grain work function to the element of the views provided. The scheduler provided will be used by the executor processing the tasks of the PARAGRAPH as it is executed. More... | |
template<typename Tag = stapl::use_default, typename View , typename BinaryOp > | |
std::decay< View >::type::value_type | stapl::reduce (View &&view, BinaryOp const &binop) |
Users can specify which version of the reduce skeleton to be used for reduction algorithm. The possible choices are. More... | |
template<typename ScanTag , typename CoarseTag , typename View0 , typename View1 , typename Binop > | |
void | stapl::scan (View0 &&view0, View1 &&view1, Binop binop) |
A scan is an operation in which each element in the results is the result of the cumulative operation on all elements before it. It can be one of two types. More... | |
template<typename CoarseTag = stapl::use_default, typename View0 , typename View1 , typename Binop > | |
void | stapl::scan (View0 &&view0, View1 &&view1, Binop binop, bool shift=false) |
A scan is an operation in which each element in the results is the result of the cumulative operation on all elements before it. It can be one of two types. More... | |
template<typename ScanTag , typename CoarseTag , typename View0 , typename View1 , typename Binop > | |
std::decay< View0 >::type::value_type | stapl::scan_reduce (View0 &&view0, View1 &&view1, Binop binop) |
combines the functionality of scan and reduce skeleton. More... | |
template<typename CoarseTag = stapl::use_default, typename View0 , typename View1 , typename Binop > | |
std::decay< View0 >::type::value_type | stapl::scan_reduce (View0 &&view0, View1 &&view1, Binop binop, bool shift=false) |
Combines the functionality of scan and reduce skeleton. More... | |
Executable skeletons change functional skeletons from higher-order functions to regular functions by providing access to the input data.
void stapl::map_func | ( | MapOp const & | map_op, |
V &&... | views | ||
) |
Construct and execute a PARAGRAPH that will perform a map operation, applying the fine-grain work function to the element of the views provided.
map_op | Fine-grain map work function. |
views | One or more views to process with the map work function. |
std::enable_if< !std::is_base_of<skeletons::tags::coarsening_tag, MapOp>::value, stapl::result_of::map_reduce<stapl::use_default, MapOp, ReduceOp, V...>>::type::type stapl::map_reduce | ( | MapOp const & | map_op, |
ReduceOp const & | reduce_op, | ||
V &&... | v | ||
) |
Applies map-reduce on a set of inputs. In the first step the given map operation (zip operation if there is more than one view involved) on the given inputs and the results are reduce using the given reduce operation (reduce_op
)
map_op | the operation to be applied in the first step on the given input(s) |
reduce_op | the operation to be applied on the results of the the first map phase |
v | the inputs |
stapl::result_of::map_reduce<Tag, MapOp, ReduceOp, V...>::type stapl::map_reduce | ( | MapOp const & | map_op, |
ReduceOp const & | reduce_op, | ||
V &&... | v | ||
) |
Applies map-reduce on the given input by using the specific map_reduce
implementation specified by the given tag. Current set of tags which can be used for map_reduce are:
map_op
can handle coarse-grain inputs map_op | the operation to be applied in the first step on the given input(s) |
reduce_op | the operation to be applied on the results of the the first map phase |
v | the inputs |
stapl::result_of::map_reduce<stapl::use_default, MapOp, ReduceOp, V...>::type stapl::map_reduce_sched | ( | Scheduler const & | scheduler, |
MapOp const & | map_op, | ||
ReduceOp const & | reduce_op, | ||
V &&... | v | ||
) |
Construct and execute a PARAGRAPH that will perform a map operation, applying the fine-grain work function to the element of the views provided. The scheduler provided will be used by the executor processing the tasks of the PARAGRAPH as it is executed.
scheduler | Scheduler to employ in the executor processing the PARAGRAPH. |
map_op | Fine-grain map work function. |
view | One or more views to process with the map work function. |
void stapl::map_func_sched | ( | Scheduler const & | scheduler, |
MapOp const & | map_op, | ||
V &&... | views | ||
) |
Construct and execute a PARAGRAPH that will perform a map operation, applying the fine-grain work function to the element of the views provided. The scheduler provided will be used by the executor processing the tasks of the PARAGRAPH as it is executed.
scheduler | Scheduler to employ in the executor processing the PARAGRAPH. |
map_op | Fine-grain map work function. |
views | One or more views to process with the map work function. |
std::decay<View>::type::value_type stapl::reduce | ( | View && | view, |
BinaryOp const & | binop | ||
) |
Users can specify which version of the reduce skeleton to be used for reduction algorithm. The possible choices are.
view | the input view |
binop | the operation used to reduce the values |
Tag | which reduction to be used |
void stapl::scan | ( | View0 && | view0, |
View1 && | view1, | ||
Binop | binop | ||
) |
A scan is an operation in which each element in the results is the result of the cumulative operation on all elements before it. It can be one of two types.
The type of the scan to be used is determined by the scan tag passed to this function. In addition, one can choose the coarsening method used for the skeleton by specifying a CoarseTag
view0 | A one-dimensional view over the input elements that are of a numeric type. |
view1 | A one-dimensional view over the elements where the result of the scan will be written. |
binop | The binary functor that will be used to compute the result of scan operation. |
ScanTag | which scan algorithm to be used |
CoarseTag | what type of coarsening to be used (if any) |
void stapl::scan | ( | View0 && | view0, |
View1 && | view1, | ||
Binop | binop, | ||
bool | shift = false |
||
) |
A scan is an operation in which each element in the results is the result of the cumulative operation on all elements before it. It can be one of two types.
This function specifies the default skeleton to be used for both inclusive and exclusive skeletons. The default case for an exclusive scan is Blelloch and the default for inclusive scan is Binomial.
view0 | A one-dimensional view over the input elements that are of a numeric type. |
view1 | A one-dimensional view over the elements where the result of the scan will be written. |
binop | The binary functor that will be used to compute the result of scan operation. |
shift | Whether to use an exclusive or inclusive scan. |
CoarseTag | which type of coarsening to be used for the coarsening of the scan skeleton. One can pass no_coarsening in order to avoid the coarsening as a whole. |
std::decay<View0>::type::value_type stapl::scan_reduce | ( | View0 && | view0, |
View1 && | view1, | ||
Binop | binop | ||
) |
combines the functionality of scan and reduce skeleton.
for the scan skeleton it can be one of two types
The type of the scan to be used is determined by the scan tag passed to this function. In addition, one can choose the coarsening method used for the skeleton by specifying a CoarseTag
view0 | A one-dimensional view over the input elements that are of a numeric type. |
view1 | A one-dimensional view over the elements where the result of the scan will be written. |
binop | The binary functor that will be used to compute the result of scan and reduce operation. |
ScanTag | which scan algorithm to be used |
CoarseTag | what type of coarsening to be used (if any) |
std::decay<View0>::type::value_type stapl::scan_reduce | ( | View0 && | view0, |
View1 && | view1, | ||
Binop | binop, | ||
bool | shift = false |
||
) |
Combines the functionality of scan and reduce skeleton.
This function specifies the default skeleton to be used for scan skeleton. The default case for an exclusive scan is Blelloch and the default for inclusive scan is Binomial.
view0 | A one-dimensional view over the input elements that are of a numeric type. |
view1 | A one-dimensional view over the elements where the result of the scan will be written. |
binop | The binary functor that will be used to compute the result of scan and reduce operation. |
shift | Whether to use an exclusive or inclusive scan. |
CoarseTag | which type of coarsening to be used for the coarsening of the scan skeleton. One can pass no_coarsening in order to avoid the coarsening as a whole. |