Associate a user buffer with an output of the model of the
{@link ANeuralNetworksExecution}.
If the output is optional, you can indicate that it is omitted by
passing nullptr for buffer and 0 for length.
<p>The provided buffer must outlive the execution.</p>
See {@link ANeuralNetworksExecution} for information on multithreaded usage.
Available since API level 27.
@param execution The execution to be modified.
@param index The index of the output argument we are setting. It is
an index into the lists passed to
{@link ANeuralNetworksModel_identifyInputsAndOutputs}. It is not
the index associated with {@link ANeuralNetworksModel_addOperand}.
@param type The {@link ANeuralNetworksOperandType} of the
operand. Unless the output is omitted, this should be
used to specify the dimensions that were left
unspecified when the operand was added to the
model. All other properties of the type must be the
same as specified in the model. If the type is the same
as specified when the model was built, NULL can be
passed. Neither the {@link ANeuralNetworksOperandType}
nor the dimensions it points to need to outlive the call
to {@link ANeuralNetworksExecution_setOutput}.
@param buffer The buffer where the data is to be written.
@param length The length in bytes of the buffer.
@return ANEURALNETWORKS_NO_ERROR if successful, ANEURALNETWORKS_BAD_DATA if the
name is not recognized or the buffer is too small for the output.
Associate a user buffer with an output of the model of the {@link ANeuralNetworksExecution}.
If the output is optional, you can indicate that it is omitted by passing nullptr for buffer and 0 for length.
<p>The provided buffer must outlive the execution.</p>
See {@link ANeuralNetworksExecution} for information on multithreaded usage.
Available since API level 27.
@param execution The execution to be modified. @param index The index of the output argument we are setting. It is an index into the lists passed to {@link ANeuralNetworksModel_identifyInputsAndOutputs}. It is not the index associated with {@link ANeuralNetworksModel_addOperand}. @param type The {@link ANeuralNetworksOperandType} of the operand. Unless the output is omitted, this should be used to specify the dimensions that were left unspecified when the operand was added to the model. All other properties of the type must be the same as specified in the model. If the type is the same as specified when the model was built, NULL can be passed. Neither the {@link ANeuralNetworksOperandType} nor the dimensions it points to need to outlive the call to {@link ANeuralNetworksExecution_setOutput}. @param buffer The buffer where the data is to be written. @param length The length in bytes of the buffer.
@return ANEURALNETWORKS_NO_ERROR if successful, ANEURALNETWORKS_BAD_DATA if the name is not recognized or the buffer is too small for the output.