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

Function gen_data_ast

src/jit/impl/nvrtc/codegen_cuda.cpp:70–75  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

68}
69
70ASTPtr gen_data_ast(size_t input_id, const JITExecutor::Args::Data& n) {
71 auto res = ssprintf(
72 "(static_cast<%s*>(data.inputs[%zu]))[offset_%zu]",
73 dtype_to_cstr(n.layout.dtype), input_id, input_id);
74 return ASTPtr::make<VariableAST>(res);
75}
76
77//! generate code to access input values in the kernel
78void gen_input_code(

Callers 1

gen_input_codeFunction · 0.85

Calls 1

dtype_to_cstrFunction · 0.85

Tested by

no test coverage detected