apple-altivec-5.c

来自「Mac OS X 10.4.9 for x86 Source Code gcc」· C语言 代码 · 共 32 行

C
32
字号
/* APPLE LOCAL file AltiVec *//* Test for handling of reference vector parameters.  *//* { dg-do compile { target powerpc*-*-darwin* } } *//* { dg-options "-faltivec" } */struct Vect{  typedef vector unsigned int vector_1;  static vector_1 ConvertPixel1(const vector_1 &source, const vector unsigned char &vp);  static vector_1 ConvertPixel2(const vector_1 source, const vector unsigned char vp);  static vector_1 ConvertPixel3(vector_1 &source, vector unsigned char &vp);  static vector_1 ConvertPixel4(vector_1 source, vector unsigned char vp);};Vect::vector_1 Vect::ConvertPixel1(const vector_1 &source, const vector unsigned char &vp){  return (vector_1) vec_perm(source, source, vp);}Vect::vector_1 Vect::ConvertPixel2(const vector_1 source, const vector unsigned char vp){  return (vector_1) vec_perm(source, source, vp);}Vect::vector_1 Vect::ConvertPixel3(vector_1 &source, vector unsigned char &vp){  return (vector_1) vec_perm(source, source, vp);}Vect::vector_1 Vect::ConvertPixel4(vector_1 source, vector unsigned char vp){  return (vector_1) vec_perm(source, source, vp);}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?