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

Method constructor

tools/api.py:1154–1171  ·  view source on GitHub ↗
(  # type: ignore
            self,
            name: str,
            params: Optional[List[Parameter]] = None,
            **kwargs)

Source from the content-addressed store, hash-verified

1152 return name + "_f"
1153
1154 def constructor( # type: ignore
1155 self,
1156 name: str,
1157 params: Optional[List[Parameter]] = None,
1158 **kwargs) -> 'Interface':
1159 create = self.substitute('allocate<${opaque_type}>($@)')
1160
1161 initial_params = gparams(obj='void*',
1162 c=self.cname('copy'),
1163 d=self.cname('delete'))
1164
1165 add_function(self.cname(name),
1166 params=initial_params + (params or []),
1167 invoke=create,
1168 returns=self.opaque_type,
1169 return_name=self.name,
1170 **kwargs)
1171 return self
1172
1173 def method(self, *args, **kwargs) -> 'Interface':
1174 super().method(*args, **kwargs)

Callers

nothing calls this directly

Calls 3

add_functionFunction · 0.85
cnameMethod · 0.80
substituteMethod · 0.45

Tested by

no test coverage detected