Execute a zip_reduce with one view in place. More...
Static Public Member Functions | |
template<typename Skeleton , typename V > | |
static result_type | execute (Skeleton &&skel, V &&view) |
Public Types | |
using | result_type = decltype(std::declval< ReduceOp >()(std::declval< zip_value_type >(), std::declval< zip_value_type >())) |
Execute a zip_reduce with one view in place.
This implementation requires that identity_value is defined for the reduction operator. This is for two reasons: 1. This method is SPMD and thus there needs to be a way to incorporate an empty location's result without affecting the globally reduced value. 2. It is not clear how to have a preamble that only applies the zip operator to the first element, and then skips the first element for the main loop, since there are nested loops.
ZipOp | The zip operator of the skeleton |
ReduceOp | The reduction operator of the skeleton |
View | The single view to use as the source of data |