This class abstracts the semantics of a butterfly skeleton by exposing only the necessary information in its representation. More...
Public Member Functions | |
butterfly (Op const &op, Filter const &filter) | |
Op | get_op (void) const |
Filter | get_filter (void) const |
std::size_t | operator() (std::size_t a) |
Public Types | |
using | skeleton_tag_type = typename std::conditional< is_reversed, tags::reverse_butterfly< std::is_same< Filter, stapl::use_default >::value >, tags::butterfly< std::is_same< Filter, stapl::use_default >::value > >::type |
using | op_type = Op |
using | base_type = decltype(skeletons::repeat< Flows >(skeletons::elem< Span >(skeletons::butterfly_pd< is_pos_aware, is_reversed >(std::declval< Op >(), std::declval< Filter >())), log_lazysize< 2 >())) |
This class abstracts the semantics of a butterfly skeleton by exposing only the necessary information in its representation.
An butterfly skeleton is a well-known skeleton used especially in network configuration and other applications such as FFT.
This abstraction not only makes the reconstruction of a butterfly skeleton easier, but also provides access to the underlying operation and filter used in each level. Furthermore, it reduces the symbol size for an butterfly skeleton, hence, reducing the total compilation time.
Op | the operation to be used while reducing the input. |
is_pos_aware | whether the computation needs spatial information for its computation or not. |
is_reversed | whether this butterfly is a regular or a reversed butterfly |
Filter | the filter to be applied on the result of each computation. In some algorithms only a portion of the produced data by Op is passed to the next computations. |
Flows | the flow between levels of the butterfly skeleton. |
Span | the iteration space for elements on each level of the butterfly skeleton |