MCPcopy Create free account
hub / github.com/ROCm/AMDMIGraphX / generate_virtual_impl

Function generate_virtual_impl

tools/api.py:1123–1142  ·  view source on GitHub ↗
(f: Function, fname: str)

Source from the content-addressed store, hash-verified

1121
1122
1123def generate_virtual_impl(f: Function, fname: str) -> str:
1124 success = success_type
1125 name = f.name
1126 return_type = 'void'
1127 output_decls = ''
1128 output = ''
1129 largs = []
1130 lparams = []
1131 if f.returns:
1132 return_type = f.returns.type.str()
1133 output_decls = '\n'.join(f.returns.virtual_output_declarations())
1134 largs += f.returns.virtual_output_args()
1135 output = f.returns.virtual_output()
1136 largs += [arg for p in f.params for arg in p.virtual_arg()]
1137 lparams += [
1138 p.virtual_param() for p in f.params if not (p.this or p.hidden)
1139 ]
1140 args = ', '.join(largs)
1141 params = ', '.join(lparams)
1142 return c_api_virtual_impl.substitute(locals())
1143
1144
1145class Interface(Handle):

Callers 1

generate_functionMethod · 0.85

Calls 7

virtual_output_argsMethod · 0.80
virtual_outputMethod · 0.80
virtual_argMethod · 0.80
virtual_paramMethod · 0.80
strMethod · 0.45
substituteMethod · 0.45

Tested by

no test coverage detected