Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save xvaldetaro/8be3ecd03557a400bf9d8603329d58e4 to your computer and use it in GitHub Desktop.
Save xvaldetaro/8be3ecd03557a400bf9d8603329d58e4 to your computer and use it in GitHub Desktop.
caos
#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