cpu_lsx.cpp 278 B

123456789101112131415
  1. #include <stdio.h>
  2. #include <lsxintrin.h>
  3. int test()
  4. {
  5. const float src[] = { 0.0f, 1.0f, 2.0f, 3.0f};
  6. v4f32 val = (v4f32)__lsx_vld((const float*)(src), 0);
  7. return __lsx_vpickve2gr_w(__lsx_vftint_w_s(val), 3);
  8. }
  9. int main()
  10. {
  11. printf("%d\n", test());
  12. return 0;
  13. }