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

Method substitute

tools/api.py:242–254  ·  view source on GitHub ↗
(self,
                   s: str,
                   prefix: Optional[str] = None,
                   result: Optional[str] = None)

Source from the content-addressed store, hash-verified

240 return self.type.str()
241
242 def substitute(self,
243 s: str,
244 prefix: Optional[str] = None,
245 result: Optional[str] = None) -> str:
246 ctype = None
247 if len(self.cparams) > 0:
248 ctype = Type(self.cparams[0][0]).basic().str()
249 return Template(s).safe_substitute(name=self.get_name(prefix),
250 type=self.type.str(),
251 ctype=ctype or '',
252 cpptype=self.get_cpp_type(),
253 size=self.size_name,
254 result=result or '')
255
256 def add_param(self, t: Union[str, Type],
257 name: Optional[str] = None) -> None:

Callers 9

virtual_argMethod · 0.95
virtual_paramMethod · 0.95
virtual_outputMethod · 0.95
cpp_paramMethod · 0.95
cpp_argMethod · 0.95
cpp_outputMethod · 0.95
inputMethod · 0.95
outputsMethod · 0.95
add_to_cfunctionMethod · 0.95

Calls 7

get_nameMethod · 0.95
get_cpp_typeMethod · 0.95
lenFunction · 0.85
TypeClass · 0.85
TemplateClass · 0.85
basicMethod · 0.80
strMethod · 0.45

Tested by

no test coverage detected