Created
March 6, 2020 00:50
-
-
Save xvaldetaro/8be3ecd03557a400bf9d8603329d58e4 to your computer and use it in GitHub Desktop.
caos
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
#ifdef _ARM_HAVE_NEON | |
vDSP_Length vecN = n & ~3u; | |
for (; (a + i) < (a + vecN); i += 4) { | |
float32x4_t v = vld1q_f32(a + i); | |
uint32x4_t vInt = vcvtq_u32_f32(v); | |
vst1q_u32(c + i, vInt); | |
} | |
#endif | |
for (; (a + i) < (a + n); ++i) { | |
*(c + i) = (uint32_t)*(a + i); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment