Compose< FuncA, FuncB, FuncADs, FuncBDs > Struct Template Reference

Compose&lt; FuncA, FuncB, FuncADs, FuncBDs &gt; Struct Template Reference#

Composable Kernel: ck_tile::element_wise::Compose< FuncA, FuncB, FuncADs, FuncBDs > Struct Template Reference
ck_tile::element_wise::Compose< FuncA, FuncB, FuncADs, FuncBDs > Struct Template Reference

Compose two unary element-wise functions into one. More...

#include <unary_element_wise_operation.hpp>

Public Member Functions

CK_TILE_HOST_DEVICE Compose (FuncA func_a_=FuncA{}, FuncB func_b_=FuncB{})
template<typename AIn, typename BOut, typename AOut = AIn, typename... ADs>
CK_TILE_HOST_DEVICE constexpr void operator() (BOut &y, const AIn &x, const ADs &... ds) const

Public Attributes

const FuncA func_a
const FuncB func_b

Detailed Description

template<typename FuncA, typename FuncB, bool FuncADs = false, bool FuncBDs = false>
struct ck_tile::element_wise::Compose< FuncA, FuncB, FuncADs, FuncBDs >

Compose two unary element-wise functions into one.

Note
The Ds tensor can be used by at most one of the composed functions. This holds even if compositions are chained: In Compose<FA, Compose<FB, FC>>, only one of FA, FB, or FC can use the Ds tensor.
Template Parameters
FuncAThe first function to be applied.
FuncBThe second function to be applied.
FuncADsWhether FuncA uses the Ds tensor.
FuncBDsWhether FuncB uses the Ds tensor.

Constructor & Destructor Documentation

◆ Compose()

template<typename FuncA, typename FuncB, bool FuncADs = false, bool FuncBDs = false>
CK_TILE_HOST_DEVICE ck_tile::element_wise::Compose< FuncA, FuncB, FuncADs, FuncBDs >::Compose ( FuncA func_a_ = FuncA{},
FuncB func_b_ = FuncB{} )
inline

Member Function Documentation

◆ operator()()

template<typename FuncA, typename FuncB, bool FuncADs = false, bool FuncBDs = false>
template<typename AIn, typename BOut, typename AOut = AIn, typename... ADs>
CK_TILE_HOST_DEVICE constexpr void ck_tile::element_wise::Compose< FuncA, FuncB, FuncADs, FuncBDs >::operator() ( BOut & y,
const AIn & x,
const ADs &... ds ) const
inlineconstexpr

Member Data Documentation

◆ func_a

template<typename FuncA, typename FuncB, bool FuncADs = false, bool FuncBDs = false>
const FuncA ck_tile::element_wise::Compose< FuncA, FuncB, FuncADs, FuncBDs >::func_a

◆ func_b

template<typename FuncA, typename FuncB, bool FuncADs = false, bool FuncBDs = false>
const FuncB ck_tile::element_wise::Compose< FuncA, FuncB, FuncADs, FuncBDs >::func_b

The documentation for this struct was generated from the following file: