380{
381 auto res = make_unique<pp::LinearDocument>();
382
383 const auto compilation = _compilation_ctx.at(binder);
384
385 res->append("ANeuralNetworksExecution *execution;");
386 res->append("ANeuralNetworksEvent *event;");
387 res->append();
388 res->append("ANeuralNetworksExecution_create(", compilation, ", &execution);");
389
390
392 {
393 auto bag = binder->
input(n);
394 auto base = _mem.
base(bag);
396
397 res->append(
"ANeuralNetworksExecution_setInput(execution, ", n,
", nullptr, ", base,
", ",
size,
398 ");");
399 }
400
401
403 {
404 auto bag = binder->
output(n);
405 auto base = _mem.
base(bag);
407
408 res->append("ANeuralNetworksExecution_setOutput(execution, ", n, ", nullptr, ", base, ", ",
410 }
411
412 res->append("ANeuralNetworksExecution_startCompute(execution, &event);");
413 res->append("ANeuralNetworksEvent_wait(event);");
414 res->append("ANeuralNetworksEvent_free(event);");
415
416 res->append("ANeuralNetworksExecution_free(execution);");
417
418 return res;
419}
const ann::Module * module(void) const
coco::Bag * input(uint32_t n) const
coco::Bag * output(uint32_t n) const
void size(const coco::Bag *bag, const std::string &exp)
void base(const coco::Bag *bag, const std::string &exp)