Home
last modified time | relevance | path

Searched refs:mask (Results 1 – 6 of 6) sorted by relevance

/cmsis-nn-3.6.0-3.5.0/Source/ActivationFunctions/
Darm_relu_q15.c61 int32_t mask; in arm_relu_q15() local
71 mask = QSUB16(0x00000000, buf); in arm_relu_q15()
73 arm_nn_write_q15x2_ia(&output, in & (~mask)); in arm_relu_q15()
Darm_relu_q7.c61 int32_t mask; in arm_relu_q7() local
71 mask = QSUB8(0x00000000, buf); in arm_relu_q7()
73 arm_nn_write_s8x4_ia(&output, in & (~mask)); in arm_relu_q7()
/cmsis-nn-3.6.0-3.5.0/Source/SoftmaxFunctions/
Darm_softmax_s8.c41 int32x4_t mask; in arm_exp_on_negative_values_mve_32x4() local
55mask = vmvnq_m_s32(vdupq_n_s32(0), vdupq_n_s32(0), p); … in arm_exp_on_negative_values_mve_32x4()
56 …result = SELECT_USING_MASK(mask, MUL_SAT_MVE(result, vdupq_n_s32(x)), result); … in arm_exp_on_negative_values_mve_32x4()
70 mask = vmvnq_m_s32(vdupq_n_s32(0), vdupq_n_s32(0), p); in arm_exp_on_negative_values_mve_32x4()
72 result = SELECT_USING_MASK(mask, vdupq_n_s32(NN_Q31_MAX), result); in arm_exp_on_negative_values_mve_32x4()
99 const int32_t mask = (1 << shift); in arm_softmax_s8() local
126 ip = vmulq_n_s32(ip, mask); in arm_softmax_s8()
146 sum += DIV_POW2(EXP_ON_NEG(MUL_SAT(diff * mask, mult)), ACCUM_BITS); in arm_softmax_s8()
168 ip = vmulq_n_s32(ip, mask); in arm_softmax_s8()
195 … DIV_POW2(MUL_SAT(shifted_scale, EXP_ON_NEG(MUL_SAT(diff * mask, mult))), bits_over_unit) + in arm_softmax_s8()
Darm_softmax_u8.c52 const int32_t mask = (1 << shift); in arm_softmax_u8() local
75 sum += DIV_POW2(EXP_ON_NEG(MUL_SAT(diff * mask, mult)), ACCUM_BITS); in arm_softmax_u8()
89 … DIV_POW2(MUL_SAT(shifted_scale, EXP_ON_NEG(MUL_SAT(diff * mask, mult))), bits_over_unit); in arm_softmax_u8()
Darm_nn_softmax_common_s8.c65 const int32_t mask = (1 << shift); in arm_nn_softmax_common_s8() local
88 sum += DIV_POW2(EXP_ON_NEG(MUL_SAT(diff * mask, mult)), ACCUM_BITS); in arm_nn_softmax_common_s8()
109 … DIV_POW2(MUL_SAT(shifted_scale, EXP_ON_NEG(MUL_SAT(diff * mask, mult))), bits_over_unit) + in arm_nn_softmax_common_s8()
131 … DIV_POW2(MUL_SAT(shifted_scale, EXP_ON_NEG(MUL_SAT(diff * mask, mult))), bits_over_unit) + in arm_nn_softmax_common_s8()
/cmsis-nn-3.6.0-3.5.0/Include/
Darm_nnsupportfunctions.h51 #define SELECT_USING_MASK(mask, a, b) ((mask) & (a)) ^ (~(mask) & (b)) argument
1079 int32_t mask = 0; in arm_nn_exp_on_negative_values() local
1092mask = MASK_IF_NON_ZERO(remainder & (1 << shift++)); … in arm_nn_exp_on_negative_values()
1093 …result = SELECT_USING_MASK(mask, MUL_SAT(result, x), result); … in arm_nn_exp_on_negative_values()
1106 mask = MASK_IF_ZERO(val); in arm_nn_exp_on_negative_values()
1107 return SELECT_USING_MASK(mask, NN_Q31_MAX, result); in arm_nn_exp_on_negative_values()