MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / AddOpHelper

Function AddOpHelper

tensorflow/c/c_test_util.cc:170–181  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

168}
169
170void AddOpHelper(TF_Operation* l, TF_Operation* r, TF_Graph* graph,
171 TF_Status* s, const char* name, TF_Operation** op,
172 bool check) {
173 TF_OperationDescription* desc = TF_NewOperation(graph, "AddN", name);
174 TF_Output add_inputs[2] = {{l, 0}, {r, 0}};
175 TF_AddInputList(desc, add_inputs, 2);
176 *op = TF_FinishOperation(desc, s);
177 if (check) {
178 ASSERT_EQ(TF_OK, TF_GetCode(s)) << TF_Message(s);
179 ASSERT_NE(*op, nullptr);
180 }
181}
182
183TF_Operation* Add(TF_Operation* l, TF_Operation* r, TF_Graph* graph,
184 TF_Status* s, const char* name) {

Callers 2

AddFunction · 0.85
AddNoCheckFunction · 0.85

Calls 5

TF_NewOperationFunction · 0.85
TF_AddInputListFunction · 0.85
TF_FinishOperationFunction · 0.85
TF_GetCodeFunction · 0.85
TF_MessageFunction · 0.85

Tested by

no test coverage detected