#ifndef GEMMSTONE_DSL_IR_REDUCE_HPP
#define GEMMSTONE_DSL_IR_REDUCE_HPP
#include "gemmstone/../../dsl/ir/ir.hpp"
#include "gemmstone/../../dsl/ir/reorder.hpp"
GEMMSTONE_NAMESPACE_START
namespace dsl {
namespace ir {
class reduce_t : public func_impl_t, public object::info_t<reduce_t> {
public:
static func_t make(
const dsl::layout_t &src_layout, const dsl::layout_t &dst_layout) {
return func_t(new reduce_t(src_layout, dst_layout));
}
std::string str() const override {
ostringstream_t oss;
oss << "reduce[" << src_layout << ", " << dst_layout << "]";
return oss.str();
}
IR_DEFINE_ARG_GET(dst_buf, 0)
IR_DEFINE_ARG_GET(src_buf, 1)
dsl::layout_t src_layout;
dsl::layout_t dst_layout;
private:
reduce_t(const dsl::layout_t &src_layout, const dsl::layout_t &dst_layout)
: func_impl_t(get_info())
, src_layout(src_layout)
, dst_layout(dst_layout) {}
};
} } GEMMSTONE_NAMESPACE_END
#endif