ANeuralNetworksExecution is an opaque type that can be used to apply a machine
learning model to a set of inputs.
<p>To use:<ul>
<li>Create a new execution instance by calling the
{@link ANeuralNetworksExecution_create} function.</li>
<li>Associate input buffers or memory regions to the model inputs with
{@link ANeuralNetworksExecution_setInput} or
{@link ANeuralNetworksExecution_setInputFromMemory}.</li>
<li>Associate output buffers or memory regions to the model outputs with
{@link ANeuralNetworksExecution_setOutput} or
{@link ANeuralNetworksExecution_setOutputFromMemory}.</li>
<li>Apply the model with {@link ANeuralNetworksExecution_startCompute}.</li>
<li>Wait for the execution to complete with {@link
ANeuralNetworksEvent_wait}.</li>
<li>Destroy the execution with
{@link ANeuralNetworksExecution_free}.</li></ul></p>
<p>An output buffer or memory region must not overlap with any
other output buffer or memory region, with an input buffer or
memory region, or with an operand value in a memory object
({@link ANeuralNetworksModel_setOperandValueFromMemory}).</p>
<p>An execution cannot be modified once {@link ANeuralNetworksExecution_startCompute}
has been called on it.</p>
<p>An execution can be applied to a model with
{@link ANeuralNetworksExecution_startCompute} only once. Create new executions
to do new evaluations of the model.</p>
<p>It is the application's responsibility to make sure that only one thread
modifies an execution at a given time. It is however safe for more than one
thread to use {@link ANeuralNetworksEvent_wait} at the same time.</p>
<p>It is also the application's responsibility to ensure that there are no other
uses of the execution after calling {@link ANeuralNetworksExecution_free}.</p>
ANeuralNetworksExecution is an opaque type that can be used to apply a machine learning model to a set of inputs.
<p>To use:<ul> <li>Create a new execution instance by calling the {@link ANeuralNetworksExecution_create} function.</li> <li>Associate input buffers or memory regions to the model inputs with {@link ANeuralNetworksExecution_setInput} or {@link ANeuralNetworksExecution_setInputFromMemory}.</li> <li>Associate output buffers or memory regions to the model outputs with {@link ANeuralNetworksExecution_setOutput} or {@link ANeuralNetworksExecution_setOutputFromMemory}.</li> <li>Apply the model with {@link ANeuralNetworksExecution_startCompute}.</li> <li>Wait for the execution to complete with {@link ANeuralNetworksEvent_wait}.</li> <li>Destroy the execution with {@link ANeuralNetworksExecution_free}.</li></ul></p>
<p>An output buffer or memory region must not overlap with any other output buffer or memory region, with an input buffer or memory region, or with an operand value in a memory object ({@link ANeuralNetworksModel_setOperandValueFromMemory}).</p>
<p>An execution cannot be modified once {@link ANeuralNetworksExecution_startCompute} has been called on it.</p>
<p>An execution can be applied to a model with {@link ANeuralNetworksExecution_startCompute} only once. Create new executions to do new evaluations of the model.</p>
<p>It is the application's responsibility to make sure that only one thread modifies an execution at a given time. It is however safe for more than one thread to use {@link ANeuralNetworksEvent_wait} at the same time.</p>
<p>It is also the application's responsibility to ensure that there are no other uses of the execution after calling {@link ANeuralNetworksExecution_free}.</p>
Available since API level 27.