26template <
int idx,
typename tile_op_args_t>
41 this->args = args_helper.
args;
50 inline void set_args(
const tile_op_args_t &new_args) {
args = new_args; }
53template <
int idx,
typename... tile_op_args_t>
56template <
int idx,
typename curr_args_t,
typename... remain_args_t>
62 curr_args_t curr_args, remain_args_t... remain_args)
71 template <
int idx_,
typename T>
72 inline T
get()
const {
75 template <
int idx_,
typename T>
76 inline void set(T new_args) {
81template <
typename... tile_op_t>
85 static constexpr int list_size =
sizeof...(tile_op_t);
86 template <
typename matAcc_t,
typename coord_t>
88 const coord_t &coord,
const arguments_t &args_helper,
89 uint32_t slm_base = 0, uint32_t nbarrier_base = 0) {
93 chained_tile_op_helper<tile_op_t...> chained_tile_op;
95 matAcc, coord, args_helper, slm_base, nbarrier_base);
100 template <
typename... total_tile_op_t>
101 struct chained_tile_op_helper {};
103 template <
typename curr_tile_op_t,
typename... remain_tile_op_t>
104 struct chained_tile_op_helper<curr_tile_op_t, remain_tile_op_t...> {
105 using curr_tile_op_args_t =
typename curr_tile_op_t::arguments_t;
106 static constexpr int curr_idx
107 =
list_size -
sizeof...(remain_tile_op_t) - 1;
108 template <
typename matAcc_t,
typename coord_t>
110 const coord_t &coord,
const arguments_t &args_helper,
111 uint32_t slm_base = 0, uint32_t nbarrier_base = 0) {
112 curr_tile_op_t curr_tile_op;
114 curr_tile_op(matAcc, coord,
115 args_helper.template get<curr_idx, curr_tile_op_args_t>(),
116 slm_base, nbarrier_base);
117 if constexpr (
sizeof...(remain_tile_op_t) > 0) {
118 chained_tile_op_helper<remain_tile_op_t...> remain_tile_op;
120 matAcc, coord, args_helper, slm_base, nbarrier_base);
#define __XETLA_API
Definition common.hpp:43
#define KERNEL_FUNC
KERNEL_FUNC macro.
Definition common.hpp:39
Definition limitation.hpp:457
chained_tile_op_arg_t(curr_args_t curr_args, remain_args_t... remain_args)
Definition chained_tile_op.hpp:61
void set(T new_args)
Definition chained_tile_op.hpp:76
T get() const
Definition chained_tile_op.hpp:72
chained_tile_op_arg_t(chained_tile_op_arg_t< idx, curr_args_t, remain_args_t... > const &args)=default
chained_tile_op_arg_t()=default
Definition chained_tile_op.hpp:54
Definition chained_tile_op.hpp:82
chained_tile_op_arg_t< 0, typename tile_op_t::arguments_t... > arguments_t
Definition chained_tile_op.hpp:84
__XETLA_API KERNEL_FUNC void operator()(matAcc_t &matAcc, const coord_t &coord, const arguments_t &args_helper, uint32_t slm_base=0, uint32_t nbarrier_base=0)
Definition chained_tile_op.hpp:87
static constexpr int list_size
Definition chained_tile_op.hpp:85
Definition chained_tile_op.hpp:27
tile_op_args_t args
Definition chained_tile_op.hpp:28
tile_op_arg_helper_t()=default
void set_args(const tile_op_args_t &new_args)
Definition chained_tile_op.hpp:50
tile_op_arg_helper_t & operator=(const tile_op_arg_helper_t< idx, tile_op_args_t > &args_helper)
Definition chained_tile_op.hpp:39
tile_op_arg_helper_t(tile_op_args_t args_)
Definition chained_tile_op.hpp:29
tile_op_arg_helper_t(const tile_op_arg_helper_t< idx, tile_op_args_t > &args_helper)
Definition chained_tile_op.hpp:33
tile_op_args_t get_args() const
Definition chained_tile_op.hpp:49