Function arm_elementwise_add_fp16¶
Defined in File arm_nnfunctions_flt.h
Function Documentation¶
-
arm_cmsis_nn_status arm_elementwise_add_fp16(const float16_t *input_1_vect, const float16_t *input_2_vect, float16_t *output, const float16_t out_activation_min, const float16_t out_activation_max, const int32_t block_size)¶
Legacy float16 elementwise add with fused clamp, kept only for source compatibility with callers that predate arm_elementwise_add_f16(). New code should call arm_elementwise_add_f16() instead.
This entry does NOT share the contract of arm_elementwise_add_f16():
Note
The clamp does not propagate NaN. Both the Helium path (
vminnm/vmaxnm) and the scalar path (the non-propagatingMIN/MAXclamp helper) bound againstout_activation_maxfirst, so a NaN produced by the addition comes back asout_activation_max. arm_elementwise_add_f16() documents TensorFlow Lite NaN propagation; this entry does not implement it.Warning
No argument validation is performed. A NULL
input_1_vect,input_2_vectoroutputis dereferenced rather than reported. Ablock_sizeof 0 writes nothing and still returnsARM_CMSIS_NN_SUCCESS, where arm_elementwise_add_f16() returnsARM_CMSIS_NN_ARG_ERROR.- Parameters:
input_1_vect – [in] Pointer to the first input vector. Must not be NULL.
input_2_vect – [in] Pointer to the second input vector. Must not be NULL.
output – [out] Pointer to the output vector. Must not be NULL.
out_activation_min – [in] Minimum output clamp value.
out_activation_max – [in] Maximum output clamp value.
block_size – [in] Number of elements to process.
- Returns:
ARM_CMSIS_NN_SUCCESSunconditionally.