57 const bool cond_value =
cond()->
data<
bool>()[0];
59 RuntimeGraph *active_graph = cond_value ? _then_graph : _else_graph;
61 const auto &graph_outputs = active_graph->getOutputTensors();
67 graph_inputs[i]->resize(
input(i)->shape());
72 active_graph->configureAllocations(graph_inputs[i]);
73 std::memcpy(graph_inputs[i]->data<void>(),
input(i)->data<void>(), num_elements * element_size);
76 active_graph->execute();
84 active_graph->configureAllocations(
output(i));
88 std::memcpy(
output(i)->data<void>(), graph_outputs[i]->data<void>(),
89 num_elements * element_size);