MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / code_gen

Method code_gen

src/jit/include/megbrain/jit/ast_c.h:156–160  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

154 bool is_half = false)
155 : m_var(var), m_cn_type(cn_type), m_is_half(is_half) {}
156 inline std::string code_gen() override {
157
158 mgb_assert(!m_is_half, "code issue, only OpenCL support as half now");
159 return "float " + m_var->code_gen() + ";";
160 }
161
162private:
163 ASTPtr m_var;

Callers

nothing calls this directly

Calls 1

code_genMethod · 0.45

Tested by

no test coverage detected