MCPcopy Create free account
hub / github.com/chigraph/chigraph / CFuncNode

Method CFuncNode

libchigraph/src/GraphModule.cpp:177–192  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

175/// The NodeType for calling C functions
176struct CFuncNode : NodeType {
177 CFuncNode(GraphModule& mod, std::string cCode, std::string functionName,
178 std::vector<std::string> extraArgs, std::vector<NamedDataType> inputs,
179 DataType output)
180 : NodeType{mod, "c-call", "call C code"},
181 mFunctionName{std::move(functionName)},
182 mCCode(std::move(cCode)),
183 mExtraArguments{std::move(extraArgs)},
184 mInputs{std::move(inputs)},
185 mOutput{std::move(output)},
186 mGraphModule{&mod} {
187 setExecInputs({""});
188 setExecOutputs({""});
189
190 setDataInputs(mInputs);
191 if (mOutput.valid()) { setDataOutputs({{"", mOutput}}); }
192 }
193
194 Result codegen(
195 size_t /*inID*/, const llvm::DebugLoc& nodeLocation, const std::vector<llvm::Value*>& io,

Callers

nothing calls this directly

Calls 1

validMethod · 0.45

Tested by

no test coverage detected