Created
February 28, 2018 03:39
-
-
Save luctrudeau/7e6ca1ce23c44afe64c7dd271886c98c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int16x4_t vqadd_s16_c(int16x4_t a, int16x4_t b) { | |
int16x4_t c; | |
for (int i = 0; i < 4; i++) { | |
int32_t tmp = a[i] + b[i]; | |
tmp = (tmp > INT16_MAX) ? INT16_MAX : tmp; | |
tmp = (tmp < INT16_MIN) ? INT16_MIN : tmp; | |
c[i] = (int16_t)tmp; | |
} | |
return c; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment