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

Method generate

tools/api.py:1212–1233  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1210 return f"{cname} {mname} = nullptr;{function}"
1211
1212 def generate(self):
1213 required_functions = [
1214 Function('copy',
1215 params=gparams(out='void**', input='void*'),
1216 virtual=True),
1217 Function('delete', params=gparams(input='void*'), virtual=True)
1218 ]
1219 for f in self.ifunctions + required_functions:
1220 f.update()
1221 c_header_preamble.extend([
1222 f.get_cfunction().generate_function_pointer(self.cname(f.name))
1223 for f in self.ifunctions + required_functions
1224 ])
1225 function_list = [self.generate_function(f) for f in self.ifunctions]
1226 ctype = self.ctype
1227 cpptype = self.cpptype
1228 copier = self.cname('copy')
1229 deleter = self.cname('delete')
1230 functions = '\n'.join(function_list)
1231
1232 c_api_body_preamble.append(
1233 interface_handle_definition.substitute(locals()))
1234
1235
1236def handle(ctype: str,

Callers 1

with_interfaceFunction · 0.95

Calls 8

generate_functionMethod · 0.95
FunctionClass · 0.85
get_cfunctionMethod · 0.80
cnameMethod · 0.80
updateMethod · 0.45
appendMethod · 0.45
substituteMethod · 0.45

Tested by

no test coverage detected