/ lib / numpy / distutils / checks / cpu_vsx3.c
cpu_vsx3.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 z4 = (v_uint32x4){0, 0, 0, 0};
11      z4 = vec_absd(z4, z4);
12      return (int)vec_extract(z4, 0);
13  }