#ifndef GPU_INTEL_JIT_IR_SEND_PLAN_HPP
#define GPU_INTEL_JIT_IR_SEND_PLAN_HPP
#include <memory>
#include "gpu/intel/jit/ir/hw.hpp"
#include "gpu/intel/jit/ir/legacy.hpp"
#include "gpu/intel/jit/ir/tensor.hpp"
namespace dnnl {
namespace impl {
namespace gpu {
namespace intel {
namespace jit {
class send_plan_impl_t;
struct send_params_t;
class send_plan_t {
public:
send_plan_t();
send_plan_t(send_plan_t &&other);
send_plan_t(std::unique_ptr<send_plan_impl_t> impl);
~send_plan_t();
send_plan_t &operator=(send_plan_t &&other);
operator bool() const { return (bool)impl_; }
const send_params_t &send_params() const;
bool is_2d() const;
bool is_scattered() const;
const layout_t ®_layout() const;
int reg_buf_size() const;
void set_reg_buf_size(int size);
stmt_t create_stmt(const expr_t &mem_buf, const expr_t ®_buf,
int subtile_idx = 0, const expr_t &pattern = {}) const;
int estimate_regs(bool with_buffer = true, bool with_headers = true,
bool reuse_headers = false) const;
bool can_split(int factor) const;
void set_split(int factor);
int split_factor() const;
std::string str(const std::string &tag = "send_plan") const;
XE_DEFINE_DUMP()
private:
std::unique_ptr<send_plan_impl_t> impl_;
};
bool can_use_send_plan(const view_t &view);
send_plan_t create_send_plan(const dsl::kernel::options_t &options,
const view_t &view, const send_params_t &send_params,
bool zero_out = true);
} } } } }
#endif