/ lib / numpy / distutils / checks / cpu_vsx4.c
cpu_vsx4.c
 1  #ifndef __VSX__
 2      #error "VSX is not supported"
 3  #endif
 4  #include <altivec.h>
 5  
 6  typedef __vector unsigned int v_uint32x4;
 7  
 8  int main(void)
 9  {
10      v_uint32x4 v1 = (v_uint32x4){2, 4, 8, 16};
11      v_uint32x4 v2 = (v_uint32x4){2, 2, 2, 2};
12      v_uint32x4 v3 = vec_mod(v1, v2);
13      return (int)vec_extractm(v3);
14  }