4 gcc -O -g -Wall -maltivec -mabi=altivec -DALTIVEC -DGCC_COMPILER
10 * testVMX - A test program to check the correctness of VMX instructions
12 * Copyright (C) 2004 CEPBA-IBM Research Institute
14 * Authors: Jose Maria Cela, Raul de la Cruz,
15 * Rogeli Grima, Xavier Saez <blade_support@ciri.upc.es>
17 * Web page: http://www.ciri.upc.es/cela_pblade/
19 * This file is part of testVMX.
21 * testVMX is free software; you can redistribute it and/or modify
22 * it under the terms of the GNU General Public License as published by
23 * the Free Software Foundation; either version 2 of the License, or
24 * (at your option) any later version.
26 * testVMX is distributed in the hope that it will be useful,
27 * but WITHOUT ANY WARRANTY; without even the implied warranty of
28 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
29 * GNU General Public License for more details.
31 * You should have received a copy of the GNU General Public License
32 * along with testVMX; if not, write to the Free Software
33 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US
37 * Version 0.2.2 2004/09/02
38 * Removed some not useful flags for compilation and changed the GPL license
39 * header updating the contact email and adding the web page URL
41 * Version 0.2.1 2004/07/07
42 * Some flags added in Makefile for XLC compilation (-qalias, -qinline)
44 * Version 0.2 2004/07/02
45 * Makefile and testVMX.c patched to compile with SLES 9 (Linux - GCC 3.3.3),
46 * IBM XLC Enterprise Edition and MacOS X 10.3 (Darwin - GCC 3.3)
48 * Version 0.1 2004/03/05
49 * First public version release
59 /* Calloc for align data to 16 bytes boundaries */
61 /* ----------- BEGIN #include "memoryVector.h" ----------- */
64 * testVMX - A test program to check the correctness of VMX instructions
66 * Copyright (C) 2004 CEPBA-IBM Research Institute
68 * Authors: Jose Maria Cela, Raul de la Cruz,
69 * Rogeli Grima, Xavier Saez <blade_support@ciri.upc.es>
71 * Web page: http://www.ciri.upc.es/cela_pblade/
73 * This file is part of testVMX.
75 * testVMX is free software; you can redistribute it and/or modify
76 * it under the terms of the GNU General Public License as published by
77 * the Free Software Foundation; either version 2 of the License, or
78 * (at your option) any later version.
80 * testVMX is distributed in the hope that it will be useful,
81 * but WITHOUT ANY WARRANTY; without even the implied warranty of
82 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
83 * GNU General Public License for more details.
85 * You should have received a copy of the GNU General Public License
86 * along with testVMX; if not, write to the Free Software
87 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US
90 #ifndef MEMORY_VECTOR_H
91 # define MEMORY_VECTOR_H
95 void *calloc_vec( size_t nmemb, size_t size );
96 void free_vec( void *ptr );
100 /* ----------- END #include "memoryVector.h" ----------- */
102 /* ----------- BEGIN #include "memoryVector.c" ----------- */
105 * testVMX - A test program to check the correctness of VMX instructions
107 * Copyright (C) 2004 CEPBA-IBM Research Institute
109 * Authors: Jose Maria Cela, Raul de la Cruz,
110 * Rogeli Grima, Xavier Saez <blade_support@ciri.upc.es>
112 * Web page: http://www.ciri.upc.es/cela_pblade/
114 * This file is part of testVMX.
116 * testVMX is free software; you can redistribute it and/or modify
117 * it under the terms of the GNU General Public License as published by
118 * the Free Software Foundation; either version 2 of the License, or
119 * (at your option) any later version.
121 * testVMX is distributed in the hope that it will be useful,
122 * but WITHOUT ANY WARRANTY; without even the implied warranty of
123 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
124 * GNU General Public License for more details.
126 * You should have received a copy of the GNU General Public License
127 * along with testVMX; if not, write to the Free Software
128 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US
133 /* #include "memoryVector.h"*/
142 static Tmemtab *memTab = NULL;
143 static size_t nadd = 0;
144 static size_t MAX_N_ADD = 100;
147 void *calloc_vec( size_t nmemb, size_t size )
149 /* ---------------------------------------------------------- Local Variables */
152 size_t nbytes, cc, rr;
154 /* -------------------------------------------------------------------- BEGIN */
155 if (memTab == (Tmemtab*)NULL)
157 memTab = (Tmemtab *) malloc( MAX_N_ADD*sizeof(Tmemtab) );
158 if (memTab == (Tmemtab*)NULL)
160 fprintf(stderr, "\n------------ FATAL ERRROR ------------------\n");
161 fprintf(stderr, "Memory table out of memory\n");
166 /* 16 extra bytes are allocated for adjust alignement */
167 nbytes = (size*nmemb)+16;
169 /* Alloc a block of 'nbytes' */
170 realadd = (char *) malloc( nbytes );
171 if (realadd == (char *)NULL)
173 fprintf(stderr, "\n------------ FATAL ERRROR ------------------\n");
174 fprintf(stderr, "Out of memory\n");
178 memset( realadd, 0, nbytes );
180 cc = ((size_t)realadd)/16;
181 rr = ((size_t)realadd)%16;
185 retadd = (char *)((cc+1)*16);
187 if (nadd == MAX_N_ADD)
190 memTab = (Tmemtab*) realloc( memTab, MAX_N_ADD*sizeof(Tmemtab) );
191 if (memTab == (Tmemtab*)NULL)
194 fprintf(stderr, "\n------------ FATAL ERRROR ------------------\n");
195 fprintf(stderr, "Memory table out of memory\n");
200 memTab[nadd].realAdd = realadd;
201 memTab[nadd].returnAdd = retadd;;
204 return (void*)retadd;
205 /* ---------------------------------------------------------------------- END */
209 void free_vec( void *ptr )
211 /* ---------------------------------------------------------- Local Variables */
214 /* -------------------------------------------------------------------- BEGIN */
216 for (ii= 0; ii< nadd; ii++)
217 if (memTab[ii].returnAdd == ptr)
225 fprintf(stderr, "\n------------ WARNING ------------------------\n");
226 fprintf(stderr, "Pointer not found in memory table\n\n");
230 free( memTab[ii].realAdd );
232 for (ii= pos+1; ii< nadd; ii++)
233 memTab[ii-1] = memTab[ii];
243 /* ---------------------------------------------------------------------- END */
247 /* ----------- END #include "memoryVector.c" ----------- */
252 # include <altivec.h>
257 //#define TEST_FLOATS
261 /* Redefinition for undefined NAN and xlC compiling C++ code */
262 # if !defined(NAN) || ( defined(__IBMCPP__) && defined(XLC_COMPILER) )
264 # define NAN 0x7FC00000
265 /* # define NAN 0xFFFA5A5A
266 * # define NAN 0x80000000
267 * # define NAN 0x00008000
281 vector signed char v;
287 vector unsigned char v;
299 vector signed short v;
305 vector unsigned short v;
323 vector unsigned int v;
333 #if defined TEST_FLOATS
342 /* Scalar bool types declaration */
343 typedef unsigned char TboolChar;
344 typedef unsigned short TboolShort;
345 typedef unsigned int TboolInt;
354 /**********************************************************************
356 **********************************************************************/
362 TvecChar Caux1, Caux2, Caux3;//, Caux4;
363 TvecUChar UCaux1, UCaux2, UCaux3;//, UCaux4;
364 TvecBChar BCaux1;//, BCaux2, BCaux3, BCaux4;
365 TvecShort Saux1, Saux2, Saux3;//, Saux4;
366 TvecUShort USaux1, USaux2, USaux3;//, USaux4;
367 TvecBShort BSaux1;//, BSaux2, BSaux3, BSaux4;
368 TvecInt Iaux1, Iaux2, Iaux3;//, Iaux4;
369 TvecUInt UIaux1, UIaux2, UIaux3;//, UIaux4;
370 TvecBInt BIaux1;//, BIaux2, BIaux3, BIaux4;
371 #if defined TEST_FLOATS
372 TvecFloat Faux1, Faux2, Faux3;//, Faux4;
375 int i, err, j;//, b, bAux;
376 #if defined TEST_FLOATS
378 signed int Ivec1, Ivec2, Ivec3;
381 // unsigned char *UCvec1;
382 // signed short *Svec1;
383 // unsigned short *USvec1;
384 // unsigned int *UIvec1;
385 #if defined TEST_FLOATS
389 /* For saturated rutines */
390 // long long int LLaux;
395 unsigned short USaux;
396 signed int Iaux;//, I1, I2;
397 unsigned int UIaux;//, UI1, UI2;
398 #if defined TEST_FLOATS
402 /* Scalar bool types definition */
414 unsigned short us[2];
417 } INTunion1, INTunion2;
425 } SHOunion1, SHOunion2;
428 #if defined (GCC_COMPILER)
429 vector signed char Ccons1 = (vector signed char){-8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7};
430 vector signed char Ccons2 = (vector signed char){1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1};
431 vector signed char Ccons3 = (vector signed char){-128, 127, -128, 127, -128, 127, -128, 127, -128, 127, -128, 127, -128, 127, -128, 127};
432 vector unsigned char UCcons1 = (vector unsigned char){248, 249, 250, 251, 252, 253, 254, 255, 0, 1, 2, 3, 4, 5, 6, 7};
433 vector unsigned char UCcons2 = (vector unsigned char){2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2};
434 vector unsigned char UCcons3 = (vector unsigned char){1, 2, 3, 4, 5, 6, 7, 8, 1, 2, 3, 4, 5, 6, 7, 8};
435 vector signed short Scons1 = (vector signed short){-4, -3, -2, -1, 0, 1, 2, 3};
436 vector signed short Scons2 = (vector signed short){-32768, 10000, 1, 1, 1, 1, -10000, -10000};
437 vector signed short Scons3 = (vector signed short){-32768, 32767, -32768, 32767, -32768, 32767, -32768, 32767};
438 vector unsigned short UScons1 = (vector unsigned short){65532, 65533, 65534, 65535, 0, 1, 2, 3};
439 vector unsigned short UScons2 = (vector unsigned short){1, 1, 1, 1, 1, 1, 1, 1};
440 vector unsigned short UScons3 = (vector unsigned short){1, 2, 3, 4, 1, 2, 3, 4};
441 vector signed int Icons1 = (vector signed int){-4, -1, 1, 4};
442 vector signed int Icons2 = (vector signed int){1, 1, 1, 1};
443 vector signed int Icons3 = (vector signed int){0x80000000, 0x7FFFFFFF, 0x80000000, 0x7FFFFFFF};
444 vector unsigned int UIcons1 = (vector unsigned int){0xFFFFFFFE, 0xFFFFFFFF, 0, 1};
445 vector unsigned int UIcons2 = (vector unsigned int){1, 1, 1, 1};
446 vector unsigned int UIcons3 = (vector unsigned int){1, 2, 1, 2};
448 #if defined TEST_FLOATS
449 vector float Fcons1 = (vector float){-1.5, 1.0, 0.5, -3.999};
450 vector float Fcons2 = (vector float){1.0, 1.0, 1.0, 1.0};
451 vector float Fcons3 = (vector float){100000000000.0, 1.0, -1.0, -1234567890.0};
454 #elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
455 vector signed char Ccons1 = (vector signed char)(-8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7);
456 vector signed char Ccons2 = (vector signed char)(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1);
457 vector signed char Ccons3 = (vector signed char)(-128, 127, -128, 127, -128, 127, -128, 127, -128, 127, -128, 127, -128, 127, -128, 127);
458 vector unsigned char UCcons1 = (vector unsigned char)(248, 249, 250, 251, 252, 253, 254, 255, 0, 1, 2, 3, 4, 5, 6, 7);
459 vector unsigned char UCcons2 = (vector unsigned char)(2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2);
460 vector unsigned char UCcons3 = (vector unsigned char)(1, 2, 3, 4, 5, 6, 7, 8, 1, 2, 3, 4, 5, 6, 7, 8);
461 vector signed short Scons1 = (vector signed short)(-4, -3, -2, -1, 0, 1, 2, 3);
462 vector signed short Scons2 = (vector signed short)(-32768, 10000, 1, 1, 1, 1, -10000, -10000);
463 vector signed short Scons3 = (vector signed short)(-32768, 32767, -32768, 32767, -32768, 32767, -32768, 32767);
464 vector unsigned short UScons1 = (vector unsigned short)(65532, 65533, 65534, 65535, 0, 1, 2, 3);
465 vector unsigned short UScons2 = (vector unsigned short)(1, 1, 1, 1, 1, 1, 1, 1);
466 vector unsigned short UScons3 = (vector unsigned short)(1, 2, 3, 4, 1, 2, 3, 4);
467 vector signed int Icons1 = (vector signed int)(-4, -1, 1, 4);
468 vector signed int Icons2 = (vector signed int)(1, 1, 1, 1);
469 vector signed int Icons3 = (vector signed int)(0x80000000, 0x7FFFFFFF, 0x80000000, 0x7FFFFFFF);
470 vector unsigned int UIcons1 = (vector unsigned int)(0xFFFFFFFE, 0xFFFFFFFF, 0, 1);
471 vector unsigned int UIcons2 = (vector unsigned int)(1, 1, 1, 1);
472 vector unsigned int UIcons3 = (vector unsigned int)(1, 2, 1, 2);
474 #if defined TEST_FLOATS
475 vector float Fcons1 = (vector float)(-1.5, 1.0, 0.5, -3.999);
476 vector float Fcons2 = (vector float)(1.0, 1.0, 1.0, 1.0);
477 vector float Fcons3 = (vector float)(100000000000.0, 1.0, -1.0, -1234567890.0);
483 /* Function vec_abs */
484 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
486 Caux1.v = vec_abs( Ccons1 );
488 for( i=0; i< 16; i++ )
489 if (Caux1.e[i] != abs( Caux2.e[i] ))
492 printf("Function vec_abs [type char] ===> Error\n");
494 printf("Function vec_abs [type char] ===> OK\n");
497 Saux1.v = vec_abs( Scons1 );
499 for( i=0; i< 8; i++ )
500 if (Saux1.e[i] != abs( Saux2.e[i] ))
503 printf("Function vec_abs [type short] ===> Error\n");
505 printf("Function vec_abs [type short] ===> OK\n");
508 Iaux1.v = vec_abs( Icons1 );
510 for( i=0; i< 4; i++ )
511 if (Iaux1.e[i] != abs( Iaux2.e[i] ))
514 printf("Function vec_abs [type integer] ===> Error\n");
516 printf("Function vec_abs [type integer] ===> OK\n");
518 #if defined TEST_FLOATS
520 Faux1.v = vec_abs( Fcons1 );
522 for( i=0; i< 4; i++ )
523 if (Faux1.e[i] != fabs( Faux2.e[i] ))
526 printf("Function vec_abs [type float] ===> Error\n");
528 printf("Function vec_abs [type float] ===> OK\n");
531 /* Function vec_abss */
532 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
534 Caux1.v = vec_abss( Ccons1 );
536 for( i=0; i< 16; i++ )
537 if (Caux1.e[i] != abs( Caux2.e[i] ))
540 printf("Function vec_abss [type char] ===> Error\n");
542 printf("Function vec_abss [type char] ===> OK\n");
545 Saux1.v = vec_abss( Scons1 );
547 for( i=0; i< 8; i++ )
548 if (Saux1.e[i] != abs( Saux2.e[i] ))
551 printf("Function vec_abss [type short] ===> Error\n");
553 printf("Function vec_abss [type short] ===> OK\n");
556 Iaux1.v = vec_abss( Icons1 );
558 for( i=0; i< 4; i++ )
559 if (Iaux1.e[i] != abs( Iaux2.e[i] ))
562 printf("Function vec_abss [type integer] ===> Error\n");
564 printf("Function vec_abss [type integer] ===> OK\n");
566 /* Function vec_add */
567 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
569 Caux1.v = vec_add( Ccons1, Ccons2 );
572 for( i=0; i< 16; i++ )
574 Caux = Caux2.e[i]+Caux3.e[i];
575 if (Caux1.e[i] != Caux)
579 printf("Function vec_add [type char] ===> Error\n");
581 printf("Function vec_add [type char] ===> OK\n");
584 UCaux1.v = vec_add( UCcons1, UCcons2 );
587 for( i=0; i< 16; i++ )
589 UCaux = UCaux2.e[i]+UCaux3.e[i];
590 if (UCaux1.e[i] != UCaux)
594 printf("Function vec_add [type unsigned char] ===> Error\n");
596 printf("Function vec_add [type unsigned char] ===> OK\n");
599 Saux1.v = vec_add( Scons1, Scons2 );
602 for( i=0; i< 8; i++ )
604 Saux = Saux2.e[i]+Saux3.e[i];
605 if (Saux1.e[i] != Saux)
609 printf("Function vec_add [type short] ===> Error\n");
611 printf("Function vec_add [type short] ===> OK\n");
614 USaux1.v = vec_add( UScons1, UScons2 );
617 for( i=0; i< 8; i++ )
619 USaux = USaux2.e[i]+USaux3.e[i];
620 if (USaux1.e[i] != USaux)
624 printf("Function vec_add [type unsigned short] ===> Error\n");
626 printf("Function vec_add [type unsigned short] ===> OK\n");
629 Iaux1.v = vec_add( Icons1, Icons2 );
632 for( i=0; i< 4; i++ )
634 Iaux = Iaux2.e[i]+Iaux3.e[i];
635 if (Iaux1.e[i] != Iaux)
639 printf("Function vec_add [type integer] ===> Error\n");
641 printf("Function vec_add [type integer] ===> OK\n");
644 UIaux1.v = vec_add( UIcons1, UIcons3 );
647 for( i=0; i< 4; i++ )
649 UIaux = UIaux2.e[i]+UIaux3.e[i];
650 if (UIaux1.e[i] != UIaux)
654 printf("Function vec_add [type unsigned int] ===> Error\n");
656 printf("Function vec_add [type unsigned int] ===> OK\n");
658 #if defined TEST_FLOATS
660 Faux1.v = vec_add( Fcons1, Fcons2 );
663 for( i=0; i< 4; i++ )
665 Faux = Faux2.e[i]+Faux3.e[i];
666 if (Faux1.e[i] != Faux)
670 printf("Function vec_add [type float] ===> Error\n");
672 printf("Function vec_add [type float] ===> OK\n");
676 /* Function vec_addc */
677 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
679 UIaux1.v = vec_addc( UIcons1, UIcons3 );
682 for( i=0; i< 4; i++ )
684 UIaux = (unsigned int)(UIaux2.e[i]+UIaux3.e[i]);
685 if ((UIaux< UIaux2.e[i]) || (UIaux< UIaux3.e[i]))
689 if (UIaux1.e[i] != UIaux)
693 printf("Function vec_addc [type unsigned int] ===> Error\n");
695 printf("Function vec_addc [type unsigned int] ===> OK\n");
697 /* Function vec_adds */
698 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
700 Caux1.v = vec_adds( Ccons1, Ccons3 );
703 for( i=0; i< 16; i++ )
705 Caux = Caux2.e[i]+Caux3.e[i];
706 if ((Caux2.e[i]>0)&&(Caux3.e[i]>0))
711 else if ((Caux2.e[i]<0)&&(Caux3.e[i]<0))
716 if (Caux1.e[i] != Caux)
720 printf("Function vec_adds [type char] ===> Error\n");
722 printf("Function vec_adds [type char] ===> OK\n");
725 UCaux1.v = vec_adds( UCcons1, UCcons3 );
728 for( i=0; i< 16; i++ )
730 UCaux = (unsigned char)(UCaux2.e[i]+UCaux3.e[i]);
731 if ((UCaux< UCaux2.e[i]) || (UCaux< UCaux3.e[i]))
733 if (UCaux1.e[i] != UCaux)
737 printf("Function vec_adds [type unsigned char] ===> Error\n");
739 printf("Function vec_adds [type unsigned char] ===> OK\n");
742 Saux1.v = vec_adds( Scons1, Scons3 );
745 for( i=0; i< 8; i++ )
747 Saux = Saux2.e[i]+Saux3.e[i];
748 if ((Saux2.e[i]>0)&&(Saux3.e[i]>0))
753 else if ((Saux2.e[i]<0)&&(Saux3.e[i]<0))
758 if (Saux1.e[i] != Saux)
762 printf("Function vec_adds [type short] ===> Error\n");
764 printf("Function vec_adds [type short] ===> OK\n");
767 USaux1.v = vec_adds( UScons1, UScons3 );
770 for( i=0; i< 8; i++ )
772 USaux = (unsigned short)(USaux2.e[i]+USaux3.e[i]);
773 if ((USaux< USaux2.e[i]) || (USaux< USaux3.e[i]))
775 if (USaux1.e[i] != USaux)
779 printf("Function vec_adds [type unsigned short] ===> Error\n");
781 printf("Function vec_adds [type unsigned short] ===> OK\n");
785 Iaux1.v = vec_adds( Icons1, Icons3 );
788 for( i=0; i< 4; i++ )
790 Iaux = Iaux2.e[i]+Iaux3.e[i];
791 if ((Iaux2.e[i]>0)&&(Iaux3.e[i]>0))
796 else if ((Iaux2.e[i]<0)&&(Iaux3.e[i]<0))
801 if (Iaux1.e[i] != Iaux)
805 printf("Function vec_adds [type integer] ===> Error\n");
807 printf("Function vec_adds [type integer] ===> OK\n");
810 UIaux1.v = vec_adds( UIcons1, UIcons3 );
813 for( i=0; i< 4; i++ )
815 UIaux = (unsigned int)(UIaux2.e[i]+UIaux3.e[i]);
816 if ((UIaux< UIaux2.e[i]) || (UIaux< UIaux3.e[i]))
818 if (UIaux1.e[i] != UIaux)
822 printf("Function vec_adds [type unsigned int] ===> Error\n");
824 printf("Function vec_adds [type unsigned int] ===> OK\n");
826 /* Function vec_and */
827 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
829 Caux1.v = vec_and( Ccons1, Ccons2 );
832 for( i=0; i< 16; i++ )
833 if (Caux1.e[i] != (Caux2.e[i] & Caux3.e[i]))
836 printf("Function vec_and [type char] ===> Error\n");
838 printf("Function vec_and [type char] ===> OK\n");
841 UCaux1.v = vec_and( UCcons1, UCcons2 );
844 for( i=0; i< 16; i++ )
845 if (UCaux1.e[i] != (UCaux2.e[i] & UCaux3.e[i]))
848 printf("Function vec_and [type unsigned char] ===> Error\n");
850 printf("Function vec_and [type unsigned char] ===> OK\n");
853 Saux1.v = vec_and( Scons1, Scons2 );
856 for( i=0; i< 8; i++ )
857 if (Saux1.e[i] != (Saux2.e[i] & Saux3.e[i]))
860 printf("Function vec_and [type short] ===> Error\n");
862 printf("Function vec_and [type short] ===> OK\n");
865 USaux1.v = vec_and( UScons1, UScons2 );
868 for( i=0; i< 8; i++ )
869 if (USaux1.e[i] != (USaux2.e[i] & USaux3.e[i]))
872 printf("Function vec_and [type unsigned short] ===> Error\n");
874 printf("Function vec_and [type unsigned short] ===> OK\n");
877 Iaux1.v = vec_and( Icons1, Icons2 );
880 for( i=0; i< 4; i++ )
881 if (Iaux1.e[i] != (Iaux2.e[i] & Iaux3.e[i]))
884 printf("Function vec_and [type integer] ===> Error\n");
886 printf("Function vec_and [type integer] ===> OK\n");
889 UIaux1.v = vec_and( UIcons1, UIcons2 );
892 for( i=0; i< 4; i++ )
893 if (UIaux1.e[i] != (UIaux2.e[i] & UIaux3.e[i]))
896 printf("Function vec_and [type unsigned int] ===> Error\n");
898 printf("Function vec_and [type unsigned int] ===> OK\n");
900 #if defined TEST_FLOATS
902 Faux1.v = vec_and( Fcons1, Fcons2 );
905 for( i=0; i< 4; i++ )
910 if ((Ivec1) != ((Ivec2) & (Ivec3)))
914 printf("Function vec_and [type float] ===> Error\n");
916 printf("Function vec_and [type float] ===> OK\n");
919 /* Function vec_andc */
920 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
922 Caux1.v = vec_andc( Ccons1, Ccons2 );
925 for( i=0; i< 16; i++ )
926 if (Caux1.e[i] != (Caux2.e[i] & ~Caux3.e[i]))
929 printf("Function vec_andc [type char] ===> Error\n");
931 printf("Function vec_andc [type char] ===> OK\n");
934 UCaux1.v = vec_andc( UCcons1, UCcons2 );
937 for( i=0; i< 16; i++ )
938 if (UCaux1.e[i] != (UCaux2.e[i] & ~UCaux3.e[i]))
941 printf("Function vec_andc [type unsigned char] ===> Error\n");
943 printf("Function vec_andc [type unsigned char] ===> OK\n");
946 Saux1.v = vec_andc( Scons1, Scons2 );
949 for( i=0; i< 8; i++ )
950 if (Saux1.e[i] != (Saux2.e[i] & ~Saux3.e[i]))
953 printf("Function vec_andc [type short] ===> Error\n");
955 printf("Function vec_andc [type short] ===> OK\n");
958 USaux1.v = vec_andc( UScons1, UScons2 );
961 for( i=0; i< 8; i++ )
962 if (USaux1.e[i] != (USaux2.e[i] & ~USaux3.e[i]))
965 printf("Function vec_andc [type unsigned short] ===> Error\n");
967 printf("Function vec_andc [type unsigned short] ===> OK\n");
970 Iaux1.v = vec_andc( Icons1, Icons2 );
973 for( i=0; i< 4; i++ )
974 if (Iaux1.e[i] != (Iaux2.e[i] & ~Iaux3.e[i]))
977 printf("Function vec_andc [type integer] ===> Error\n");
979 printf("Function vec_andc [type integer] ===> OK\n");
982 UIaux1.v = vec_andc( UIcons1, UIcons2 );
985 for( i=0; i< 4; i++ )
986 if (UIaux1.e[i] != (UIaux2.e[i] & ~UIaux3.e[i]))
989 printf("Function vec_andc [type unsigned int] ===> Error\n");
991 printf("Function vec_andc [type unsigned int] ===> OK\n");
993 #if defined TEST_FLOATS
995 Faux1.v = vec_andc( Fcons1, Fcons2 );
998 for( i=0; i< 4; i++ )
1003 if ((Ivec1) != ((Ivec2) & ~(Ivec3)))
1007 printf("Function vec_andc [type float] ===> Error\n");
1009 printf("Function vec_andc [type float] ===> OK\n");
1012 /* Function vec_avg */
1013 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
1015 Caux1.v = vec_avg( Ccons1, Ccons2 );
1018 for( i=0; i< 16; i++ )
1020 j = (Caux2.e[i]+Caux3.e[i]+1) >> 1;
1021 if (Caux1.e[i] != j)
1025 printf("Function vec_avg [type char] ===> Error\n");
1027 printf("Function vec_avg [type char] ===> OK\n");
1030 UCaux1.v = vec_avg( UCcons1, UCcons2 );
1033 for( i=0; i< 16; i++ )
1035 j = (UCaux2.e[i]+UCaux3.e[i]+1) >> 1;
1036 if (UCaux1.e[i] != j)
1040 printf("Function vec_avg [type unsigned char] ===> Error\n");
1042 printf("Function vec_avg [type unsigned char] ===> OK\n");
1045 Saux1.v = vec_avg( Scons1, Scons2 );
1048 for( i=0; i< 8; i++ )
1050 j = (Saux2.e[i]+Saux3.e[i]+1) >> 1;
1051 if (Saux1.e[i] != j)
1055 printf("Function vec_avg [type short] ===> Error\n");
1057 printf("Function vec_avg [type short] ===> OK\n");
1060 USaux1.v = vec_avg( UScons1, UScons2 );
1063 for( i=0; i< 8; i++ )
1065 j = (USaux2.e[i]+USaux3.e[i]+1) >> 1;
1066 if (USaux1.e[i] != j)
1070 printf("Function vec_avg [type unsigned short] ===> Error\n");
1072 printf("Function vec_avg [type unsigned short] ===> OK\n");
1075 Iaux1.v = vec_avg( Icons1, Icons2 );
1078 for( i=0; i< 4; i++ )
1080 Iaux = Iaux2.e[i]%2;
1085 Iaux = (Iaux - Iaux3.e[i]%2 + 1)>>1;
1087 Iaux = (Iaux + Iaux3.e[i]%2 + 1)>>1;
1088 Iaux = (Iaux2.e[i] >> 1) + (Iaux3.e[i] >> 1) + Iaux;
1089 if (Iaux1.e[i] != Iaux)
1093 printf("Function vec_avg [type integer] ===> Error\n");
1095 printf("Function vec_avg [type integer] ===> OK\n");
1098 UIaux1.v = vec_avg( UIcons1, UIcons2 );
1101 for( i=0; i< 4; i++ )
1103 UIaux = (UIaux2.e[i] >> 1) + (UIaux3.e[i] >> 1) +
1104 ((UIaux2.e[i]%2 + UIaux3.e[i]%2 + 1 )>>1);
1105 if (UIaux1.e[i] != UIaux)
1109 printf("Function vec_avg [type unsigned int] ===> Error\n");
1111 printf("Function vec_avg [type unsigned int] ===> OK\n");
1113 #if defined TEST_FLOATS
1114 /* Function vec_ceil */
1115 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
1117 Faux1.v = vec_ceil( Fcons1 );
1119 for( i=0; i< 4; i++ )
1120 if (Faux1.e[i] != ceil(Faux2.e[i]))
1123 printf("Function vec_ceil [type float] ===> Error\n");
1125 printf("Function vec_ceil [type float] ===> OK\n");
1128 #if defined TEST_FLOATS
1129 /* Function vec_cmpb */
1130 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
1132 Iaux1.v = vec_cmpb( Fcons1, Fcons2 );
1135 for( i=0; i< 4; i++ )
1138 if (Faux2.e[i]>Faux3.e[i])
1140 if (Faux2.e[i]<-Faux3.e[i])
1142 if (Iaux1.e[i] != j)
1147 printf("Function vec_cmpb [type float] ===> Error\n");
1149 printf("Function vec_cmpb [type float] ===> OK\n");
1152 /* Function vec_cmpeq */
1153 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
1155 BCaux1.v = vec_cmpeq( Ccons1, Ccons2 );
1158 for( i=0; i< 16; i++ )
1160 if (Caux2.e[i] == Caux3.e[i])
1164 if (BCaux1.e[i] != BCaux)
1168 printf("Function vec_cmpeq [type char] ===> Error\n");
1170 printf("Function vec_cmpeq [type char] ===> OK\n");
1173 BCaux1.v = vec_cmpeq( UCcons1, UCcons2 );
1176 for( i=0; i< 16; i++ )
1178 if (UCaux2.e[i] == UCaux3.e[i])
1182 if (BCaux1.e[i] != BCaux)
1186 printf("Function vec_cmpeq [type unsigned char] ===> Error\n");
1188 printf("Function vec_cmpeq [type unsigned char] ===> OK\n");
1191 BSaux1.v = vec_cmpeq( Scons1, Scons2 );
1194 for( i=0; i< 8; i++ )
1196 if (Saux2.e[i] == Saux3.e[i])
1200 if (BSaux1.e[i] != BSaux)
1204 printf("Function vec_cmpeq [type short] ===> Error\n");
1206 printf("Function vec_cmpeq [type short] ===> OK\n");
1209 BSaux1.v = vec_cmpeq( UScons1, UScons2 );
1212 for( i=0; i< 8; i++ )
1214 if (USaux2.e[i] == USaux3.e[i])
1218 if (BSaux1.e[i] != BSaux)
1222 printf("Function vec_cmpeq [type unsigned short] ===> Error\n");
1224 printf("Function vec_cmpeq [type unsigned short] ===> OK\n");
1227 BIaux1.v = vec_cmpeq( Icons1, Icons2 );
1230 for( i=0; i< 4; i++ )
1232 if (Iaux2.e[i] == Iaux3.e[i])
1236 if (BIaux1.e[i] != BIaux)
1240 printf("Function vec_cmpeq [type integer] ===> Error\n");
1242 printf("Function vec_cmpeq [type integer] ===> OK\n");
1245 BIaux1.v = vec_cmpeq( UIcons1, UIcons2 );
1248 for( i=0; i< 4; i++ )
1250 if (UIaux2.e[i] == UIaux3.e[i])
1254 if (BIaux1.e[i] != BIaux)
1258 printf("Function vec_cmpeq [type unsigned int] ===> Error\n");
1260 printf("Function vec_cmpeq [type unsigned int] ===> OK\n");
1262 #if defined TEST_FLOATS
1264 BIaux1.v = vec_cmpeq( Fcons1, Fcons2 );
1267 for( i=0; i< 4; i++ )
1269 if (Faux2.e[i] == Faux3.e[i])
1273 if (BIaux1.e[i] != BIaux)
1277 printf("Function vec_cmpeq [type float] ===> Error\n");
1279 printf("Function vec_cmpeq [type float] ===> OK\n");
1282 #if defined TEST_FLOATS
1283 /* Function vec_cmpge */
1284 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
1286 BIaux1.v = vec_cmpge( Fcons1, Fcons2 );
1289 for( i=0; i< 4; i++ )
1291 if (Faux2.e[i] >= Faux3.e[i])
1295 if (BIaux1.e[i] != BIaux)
1299 printf("Function vec_cmpge [type float] ===> Error\n");
1301 printf("Function vec_cmpge [type float] ===> OK\n");
1304 /* Function vec_cmpgt */
1305 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
1307 BCaux1.v = vec_cmpgt( Ccons1, Ccons2 );
1310 for( i=0; i< 16; i++ )
1312 if (Caux2.e[i] > Caux3.e[i])
1316 if (BCaux1.e[i] != BCaux)
1320 printf("Function vec_cmpgt [type char] ===> Error\n");
1322 printf("Function vec_cmpgt [type char] ===> OK\n");
1325 BCaux1.v = vec_cmpgt( UCcons1, UCcons2 );
1328 for( i=0; i< 16; i++ )
1330 if (UCaux2.e[i] > UCaux3.e[i])
1334 if (BCaux1.e[i] != BCaux)
1338 printf("Function vec_cmpgt [type unsigned char] ===> Error\n");
1340 printf("Function vec_cmpgt [type unsigned char] ===> OK\n");
1343 BSaux1.v = vec_cmpgt( Scons1, Scons2 );
1346 for( i=0; i< 8; i++ )
1348 if (Saux2.e[i] > Saux3.e[i])
1352 if (BSaux1.e[i] != BSaux)
1356 printf("Function vec_cmpgt [type short] ===> Error\n");
1358 printf("Function vec_cmpgt [type short] ===> OK\n");
1361 BSaux1.v = vec_cmpgt( UScons1, UScons2 );
1364 for( i=0; i< 8; i++ )
1366 if (USaux2.e[i] > USaux3.e[i])
1370 if (BSaux1.e[i] != BSaux)
1374 printf("Function vec_cmpgt [type unsigned short] ===> Error\n");
1376 printf("Function vec_cmpgt [type unsigned short] ===> OK\n");
1379 BIaux1.v = vec_cmpgt( Icons1, Icons2 );
1382 for( i=0; i< 4; i++ )
1384 if (Iaux2.e[i] > Iaux3.e[i])
1388 if (BIaux1.e[i] != BIaux)
1392 printf("Function vec_cmpgt [type integer] ===> Error\n");
1394 printf("Function vec_cmpgt [type integer] ===> OK\n");
1397 BIaux1.v = vec_cmpgt( UIcons1, UIcons2 );
1400 for( i=0; i< 4; i++ )
1402 if (UIaux2.e[i] > UIaux3.e[i])
1406 if (BIaux1.e[i] != BIaux)
1410 printf("Function vec_cmpgt [type unsigned int] ===> Error\n");
1412 printf("Function vec_cmpgt [type unsigned int] ===> OK\n");
1414 #if defined TEST_FLOATS
1416 BIaux1.v = vec_cmpgt( Fcons1, Fcons2 );
1419 for( i=0; i< 4; i++ )
1421 if (Faux2.e[i] > Faux3.e[i])
1425 if (BIaux1.e[i] != BIaux)
1429 printf("Function vec_cmpgt [type float] ===> Error\n");
1431 printf("Function vec_cmpgt [type float] ===> OK\n");
1434 #if defined TEST_FLOATS
1435 /* Function vec_cmple */
1436 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
1438 BIaux1.v = vec_cmple( Fcons1, Fcons2 );
1441 for( i=0; i< 4; i++ )
1443 if (Faux2.e[i] <= Faux3.e[i])
1447 if (BIaux1.e[i] != BIaux)
1451 printf("Function vec_cmple [type float] ===> Error\n");
1453 printf("Function vec_cmple [type float] ===> OK\n");
1456 /* Function vec_cmplt */
1457 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
1459 BCaux1.v = vec_cmplt( Ccons1, Ccons2 );
1462 for( i=0; i< 16; i++ )
1464 if (Caux2.e[i] < Caux3.e[i])
1468 if (BCaux1.e[i] != BCaux)
1472 printf("Function vec_cmplt [type char] ===> Error\n");
1474 printf("Function vec_cmplt [type char] ===> OK\n");
1477 BCaux1.v = vec_cmplt( UCcons1, UCcons2 );
1480 for( i=0; i< 16; i++ )
1482 if (UCaux2.e[i] < UCaux3.e[i])
1486 if (BCaux1.e[i] != BCaux)
1490 printf("Function vec_cmplt [type unsigned char] ===> Error\n");
1492 printf("Function vec_cmplt [type unsigned char] ===> OK\n");
1495 BSaux1.v = vec_cmplt( Scons1, Scons2 );
1498 for( i=0; i< 8; i++ )
1500 if (Saux2.e[i] < Saux3.e[i])
1504 if (BSaux1.e[i] != BSaux)
1508 printf("Function vec_cmplt [type short] ===> Error\n");
1510 printf("Function vec_cmplt [type short] ===> OK\n");
1513 BSaux1.v = vec_cmplt( UScons1, UScons2 );
1516 for( i=0; i< 8; i++ )
1518 if (USaux2.e[i] < USaux3.e[i])
1522 if (BSaux1.e[i] != BSaux)
1526 printf("Function vec_cmplt [type unsigned short] ===> Error\n");
1528 printf("Function vec_cmplt [type unsigned short] ===> OK\n");
1531 BIaux1.v = vec_cmplt( Icons1, Icons2 );
1534 for( i=0; i< 4; i++ )
1536 if (Iaux2.e[i] < Iaux3.e[i])
1540 if (BIaux1.e[i] != BIaux)
1544 printf("Function vec_cmplt [type integer] ===> Error\n");
1546 printf("Function vec_cmplt [type integer] ===> OK\n");
1549 BIaux1.v = vec_cmplt( UIcons1, UIcons2 );
1552 for( i=0; i< 4; i++ )
1554 if (UIaux2.e[i] < UIaux3.e[i])
1558 if (BIaux1.e[i] != BIaux)
1562 printf("Function vec_cmplt [type unsigned int] ===> Error\n");
1564 printf("Function vec_cmplt [type unsigned int] ===> OK\n");
1566 #if defined TEST_FLOATS
1568 BIaux1.v = vec_cmplt( Fcons1, Fcons2 );
1571 for( i=0; i< 4; i++ )
1573 if (Faux2.e[i] < Faux3.e[i])
1577 if (BIaux1.e[i] != BIaux)
1581 printf("Function vec_cmplt [type float] ===> Error\n");
1583 printf("Function vec_cmplt [type float] ===> OK\n");
1586 #if defined TEST_FLOATS
1587 /* Function vec_ctf */
1588 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
1591 Faux1.v = vec_ctf( Icons1, 2 );
1593 for( i=0; i< 4; i++ )
1594 if (Faux1.e[i] != (((float)Iaux1.e[i])/(1<<b)))
1597 printf("Function vec_ctf [type integer] ===> Error\n");
1599 printf("Function vec_ctf [type integer] ===> OK\n");
1603 Faux1.v = vec_ctf( UIcons1, 2 );
1605 for( i=0; i< 4; i++ )
1606 if (Faux1.e[i] != (((float)UIaux1.e[i])/(1<<b)))
1609 printf("Function vec_ctf [type unsigned int] ===> Error\n");
1611 printf("Function vec_ctf [type unsigned int] ===> OK\n");
1614 #if defined TEST_FLOATS
1615 /* Function vec_cts */
1616 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
1619 Iaux1.v = vec_cts( Fcons3, 2 );
1621 for( i=0; i< 4; i++ )
1622 if (Iaux1.e[i] != (int)(Faux1.e[i]*(1<<b)))
1625 printf("Function vec_cts [type float] ===> Error\n");
1627 printf("Function vec_cts [type float] ===> OK\n");
1630 #if defined TEST_FLOATS
1631 /* Function vec_ctu */
1632 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
1635 UIaux1.v = vec_ctu( Fcons3, 2 );
1637 for( i=0; i< 4; i++ )
1639 double d = Faux1.e[i]*(1<<b);
1644 if (UIaux1.e[i] != (unsigned int)(d))
1648 printf("Function vec_ctu [type float] ===> Error\n");
1650 printf("Function vec_ctu [type float] ===> OK\n");
1671 TvecChar Caux1;//, Caux2, Caux3, Caux4;
1672 TvecUChar UCaux1;//, UCaux2, UCaux3, UCaux4;
1673 TvecShort Saux1;//, Saux2, Saux3, Saux4;
1674 TvecUShort USaux1;//, USaux2, USaux3, USaux4;
1675 TvecInt Iaux1;//, Iaux2, Iaux3, Iaux4;
1676 TvecUInt UIaux1;//, UIaux2, UIaux3, UIaux4;
1677 #if defined TEST_FLOATS
1678 TvecFloat Faux1, Faux2;//, Faux3, Faux4;
1681 int i, err, j;//, b, bAux;
1682 // signed int Ivec1, Ivec2, Ivec3;
1683 // signed short *Svec1;
1684 // unsigned int *UIvec1;
1685 // unsigned short *USvec1;
1686 // unsigned char *UCvec1;
1687 #if defined TEST_FLOATS
1691 /* For saturated rutines */
1692 // long long int LLaux;
1694 #if defined TEST_FLOATS
1697 signed int Iaux;//, I1, I2;
1698 // unsigned int UIaux, UI1, UI2;
1699 // signed short Saux;
1700 // unsigned short USaux;
1701 // signed char Caux;
1702 // unsigned char UCaux;
1711 unsigned short us[2];
1713 unsigned char uc[4];
1714 } INTunion1, INTunion2;
1721 unsigned char uc[2];
1722 } SHOunion1, SHOunion2;
1725 #if defined (GCC_COMPILER)
1726 vector signed char Ccons1 = (vector signed char){-8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7};
1727 // vector signed char Ccons2 = (vector signed char){1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1};
1728 // vector signed char Ccons3 = (vector signed char){-128, 127, -128, 127, -128, 127, -128, 127, -128, 127, -128, 127, -128, 127, -128, 127};
1729 vector unsigned char UCcons1 = (vector unsigned char){248, 249, 250, 251, 252, 253, 254, 255, 0, 1, 2, 3, 4, 5, 6, 7};
1730 // vector unsigned char UCcons2 = (vector unsigned char){2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2};
1731 // vector unsigned char UCcons3 = (vector unsigned char){1, 2, 3, 4, 5, 6, 7, 8, 1, 2, 3, 4, 5, 6, 7, 8};
1732 vector signed short Scons1 = (vector signed short){-4, -3, -2, -1, 0, 1, 2, 3};
1733 // vector signed short Scons2 = (vector signed short){-32768, 10000, 1, 1, 1, 1, -10000, -10000};
1734 // vector signed short Scons3 = (vector signed short){-32768, 32767, -32768, 32767, -32768, 32767, -32768, 32767};
1735 // vector unsigned short UScons1 = (vector unsigned short){65532, 65533, 65534, 65535, 0, 1, 2, 3};
1736 // vector unsigned short UScons2 = (vector unsigned short){1, 1, 1, 1, 1, 1, 1, 1};
1737 vector unsigned short UScons3 = (vector unsigned short){1, 2, 3, 4, 1, 2, 3, 4};
1738 vector signed int Icons1 = (vector signed int){-4, -1, 1, 4};
1739 // vector signed int Icons2 = (vector signed int){1, 1, 1, 1};
1740 // vector signed int Icons3 = (vector signed int){0x80000000, 0x7FFFFFFF, 0x80000000, 0x7FFFFFFF};
1741 vector unsigned int UIcons1 = (vector unsigned int){0xFFFFFFFE, 0xFFFFFFFF, 0, 1};
1742 // vector unsigned int UIcons2 = (vector unsigned int){1, 1, 1, 1};
1743 // vector unsigned int UIcons3 = (vector unsigned int){1, 2, 1, 2};
1745 #if defined TEST_FLOATS
1746 vector float Fcons1 = (vector float){-1.5, 1.0, 0.5, -3.999};
1747 // vector float Fcons2 = (vector float){1.0, 1.0, 1.0, 1.0};
1748 vector float Fcons3 = (vector float){100000000000.0, 1.0, -1.0, -1234567890.0};
1751 #elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
1752 vector signed char Ccons1 = (vector signed char)(-8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7);
1753 vector signed char Ccons2 = (vector signed char)(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1);
1754 vector signed char Ccons3 = (vector signed char)(-128, 127, -128, 127, -128, 127, -128, 127, -128, 127, -128, 127, -128, 127, -128, 127);
1755 vector unsigned char UCcons1 = (vector unsigned char)(248, 249, 250, 251, 252, 253, 254, 255, 0, 1, 2, 3, 4, 5, 6, 7);
1756 vector unsigned char UCcons2 = (vector unsigned char)(2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2);
1757 vector unsigned char UCcons3 = (vector unsigned char)(1, 2, 3, 4, 5, 6, 7, 8, 1, 2, 3, 4, 5, 6, 7, 8);
1758 vector signed short Scons1 = (vector signed short)(-4, -3, -2, -1, 0, 1, 2, 3);
1759 vector signed short Scons2 = (vector signed short)(-32768, 10000, 1, 1, 1, 1, -10000, -10000);
1760 vector signed short Scons3 = (vector signed short)(-32768, 32767, -32768, 32767, -32768, 32767, -32768, 32767);
1761 vector unsigned short UScons1 = (vector unsigned short)(65532, 65533, 65534, 65535, 0, 1, 2, 3);
1762 vector unsigned short UScons2 = (vector unsigned short)(1, 1, 1, 1, 1, 1, 1, 1);
1763 vector unsigned short UScons3 = (vector unsigned short)(1, 2, 3, 4, 1, 2, 3, 4);
1764 vector signed int Icons1 = (vector signed int)(-4, -1, 1, 4);
1765 vector signed int Icons2 = (vector signed int)(1, 1, 1, 1);
1766 vector signed int Icons3 = (vector signed int)(0x80000000, 0x7FFFFFFF, 0x80000000, 0x7FFFFFFF);
1767 vector unsigned int UIcons1 = (vector unsigned int)(0xFFFFFFFE, 0xFFFFFFFF, 0, 1);
1768 vector unsigned int UIcons2 = (vector unsigned int)(1, 1, 1, 1);
1769 vector unsigned int UIcons3 = (vector unsigned int)(1, 2, 1, 2);
1771 #if defined TEST_FLOATS
1772 vector float Fcons1 = (vector float)(-1.5, 1.0, 0.5, -3.999);
1773 vector float Fcons2 = (vector float)(1.0, 1.0, 1.0, 1.0);
1774 vector float Fcons3 = (vector float)(100000000000.0, 1.0, -1.0, -1234567890.0);
1780 /* Variables to be allocated with calloc_vec (16 bytes aligned) */
1781 unsigned char *UCmem = (unsigned char*)calloc_vec( 1, sizeof(vector unsigned char) );
1782 signed char *Cmem = (signed char*)calloc_vec( 1, sizeof(vector signed char) );
1783 unsigned short *USmem = (unsigned short*)calloc_vec( 1, sizeof(vector unsigned short) );
1784 signed short *Smem = (signed short*)calloc_vec( 1, sizeof(vector signed short) );
1785 unsigned int *UImem = (unsigned int*)calloc_vec( 1, sizeof(vector unsigned int) );
1786 signed int *Imem = (signed int*)calloc_vec( 1, sizeof(vector signed int) );
1787 #if defined TEST_FLOATS
1788 float *Fmem = (float*)calloc_vec( 1, sizeof(vector float) );
1791 /* Function vec_dss */
1792 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
1793 printf("Function vec_dss [Vector data Stream Stop] not checked\n");
1795 /* Function vec_dssall */
1796 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
1797 printf("Function vec_dssall [Vector Stream Stop all] not checked\n");
1799 /* Function vec_dst */
1800 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
1801 printf("Function vec_dst [Vector Data Stream Touch] not checked\n");
1803 /* Function vec_dstst */
1804 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
1805 printf("Function vec_dstst [Vector Data Stream Touch for Store] not checked\n");
1807 /* Function vec_dststt */
1808 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
1809 printf("Function vec_dststt [Vector Data Stream Touch for Store Transient] not checked\n");
1811 /* Function vec_dstt */
1812 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
1813 printf("Function vec_dstt [Vector Data Stream Touch Transient] not checked\n");
1815 #if defined TEST_FLOATS
1816 /* Function vec_expte */
1817 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
1819 Faux1.v = vec_expte( Fcons1 );
1821 for( i=0; i< 4; i++ )
1823 Faux = pow(2,Faux2.e[i]);
1825 Ivec1 = (signed int*)(&Faux1.e[i]);
1826 Ivec2 = (signed int*)(&Faux);
1827 *Ivec1 = (*Ivec1) & 0xFFF00000;
1828 *Ivec2 = (*Ivec2) & 0xFFF00000;
1829 if (Faux1.e[i] != Faux)
1832 Faux = (Faux - Faux1.e[i])/Faux;
1837 printf("Function vec_expte [type float] ===> Error\n");
1839 printf("Function vec_expte [type float] ===> OK\n");
1842 #if defined TEST_FLOATS
1843 /* Function vec_floor */
1844 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
1846 Faux1.v = vec_floor( Fcons1 );
1848 for( i=0; i< 4; i++ )
1849 if (Faux1.e[i] != floor(Faux2.e[i]))
1852 printf("Function vec_floor [type float] ===> Error\n");
1854 printf("Function vec_floor [type float] ===> OK\n");
1857 /* Function vec_ld */
1858 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
1860 memcpy( UCmem, &UCcons1, sizeof(vector unsigned char) );
1861 UCaux1.v = vec_ld( 0, UCmem );
1863 for ( i=0; i< 16; i++ )
1865 Iaux = Iaux && (UCaux1.e[i]==UCmem[i]);
1870 printf("Function vec_ld [type unsigned char] ===> Error\n");
1872 printf("Function vec_ld [type unsigned char] ===> OK\n");
1875 memcpy( Cmem, &Ccons1, sizeof(vector signed char) );
1876 Caux1.v = vec_ld( 0, Cmem );
1878 for ( i=0; i< 16; i++ )
1880 Iaux = Iaux && (Caux1.e[i]==Cmem[i]);
1885 printf("Function vec_ld [type char] ===> Error\n");
1887 printf("Function vec_ld [type char] ===> OK\n");
1890 memcpy( USmem, &UScons3, sizeof(vector unsigned short) );
1891 USaux1.v = vec_ld( 0, USmem );
1893 for ( i=0; i< 8; i++ )
1895 Iaux = Iaux && (USaux1.e[i]==USmem[i]);
1900 printf("Function vec_ld [type unsigned short] ===> Error\n");
1902 printf("Function vec_ld [type unsigned short] ===> OK\n");
1905 memcpy( Smem, &Scons1, sizeof(vector signed short) );
1906 Saux1.v = vec_ld( 0, Smem );
1908 for ( i=0; i< 8; i++ )
1910 Iaux = Iaux && (Saux1.e[i]==Smem[i]);
1915 printf("Function vec_ld [type short] ===> Error\n");
1917 printf("Function vec_ld [type short] ===> OK\n");
1920 memcpy( UImem, &UIcons1, sizeof(vector unsigned int) );
1921 UIaux1.v = vec_ld( 0, UImem );
1923 for ( i=0; i< 4; i++ )
1925 Iaux = Iaux && (UIaux1.e[i]==UImem[i]);
1930 printf("Function vec_ld [type unsigned int] ===> Error\n");
1932 printf("Function vec_ld [type unsigned int] ===> OK\n");
1935 memcpy( Imem, &Icons1, sizeof(vector signed int) );
1936 Iaux1.v = vec_ld( 0, Imem );
1938 for ( i=0; i< 4; i++ )
1940 Iaux = Iaux && (Iaux1.e[i]==Imem[i]);
1945 printf("Function vec_ld [type int] ===> Error\n");
1947 printf("Function vec_ld [type int] ===> OK\n");
1949 #if defined TEST_FLOATS
1951 memcpy( Fmem, &Fcons1, sizeof(vector float) );
1952 Faux1.v = vec_ld( 0, Fmem );
1954 for ( i=0; i< 4; i++ )
1956 Iaux = Iaux && (Faux1.e[i]==Fmem[i]);
1961 printf("Function vec_ld [type float] ===> Error\n");
1963 printf("Function vec_ld [type float] ===> OK\n");
1966 /* Function vec_lde */
1967 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
1970 for (i= 0; i< 16; i++)
1971 UCmem[i] = (unsigned char)i;
1973 i = j*sizeof(unsigned char);
1974 UCaux1.v = vec_lde( i, UCmem );
1976 if (UCaux1.e[j] != UCmem[j]) err++;
1979 printf("Function vec_lde [type unsigned char] ===> Error\n");
1981 printf("Function vec_lde [type unsigned char] ===> OK\n");
1984 for (i= 0; i< 16; i++)
1985 Cmem[i] = (char)(-i);
1988 Caux1.v = vec_lde( i, Cmem );
1990 if (Caux1.e[j] != Cmem[j]) err++;
1993 printf("Function vec_lde [type char] ===> Error\n");
1995 printf("Function vec_lde [type char] ===> OK\n");
1998 for (i= 0; i< 8; i++)
1999 USmem[i] = (unsigned short)(i);
2001 i = j*sizeof(unsigned short);
2002 USaux1.v = vec_lde( i, USmem );
2004 if (USaux1.e[j] != USmem[j]) err++;
2007 printf("Function vec_lde [type unsigned short] ===> Error\n");
2009 printf("Function vec_lde [type unsigned short] ===> OK\n");
2012 for (i= 0; i< 8; i++)
2013 Smem[i] = (short)(-i);
2015 i = j*sizeof(short);
2016 Saux1.v = vec_lde( i, Smem );
2018 if (Saux1.e[j] != Smem[j]) err++;
2021 printf("Function vec_lde [type short] ===> Error\n");
2023 printf("Function vec_lde [type short] ===> OK\n");
2026 for (i= 0; i< 4; i++)
2027 UImem[i] = (unsigned int)(i);
2029 i = j*sizeof(unsigned int);
2030 UIaux1.v = vec_lde( i, UImem );
2032 if (UIaux1.e[j] != UImem[j]) err++;
2035 printf("Function vec_lde [type unsigned int] ===> Error\n");
2037 printf("Function vec_lde [type unsigned int] ===> OK\n");
2040 for (i= 0; i< 4; i++)
2041 Imem[i] = (int)(-i);
2044 Iaux1.v = vec_lde( i, Imem );
2046 if (Iaux1.e[j] != Imem[j]) err++;
2049 printf("Function vec_lde [type int] ===> Error\n");
2051 printf("Function vec_lde [type int] ===> OK\n");
2053 #if defined TEST_FLOATS
2055 for (i= 0; i< 4; i++)
2056 Fmem[i] = ((float)(-i)) - 0.5;
2058 i = j*sizeof(float);
2059 Faux1.v = vec_lde( i, Fmem );
2061 if (Faux1.e[j] != Fmem[j]) err++;
2064 printf("Function vec_lde [type float] ===> Error\n");
2066 printf("Function vec_lde [type float] ===> OK\n");
2070 /* Function vec_ldl */
2071 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
2073 memcpy( UCmem, &UCcons1, sizeof(vector unsigned char) );
2074 UCaux1.v = vec_ldl( 0, UCmem );
2076 for ( i=0; i< 16; i++ )
2078 Iaux = Iaux && (UCaux1.e[i]==UCmem[i]);
2083 printf("Function vec_ldl [type unsigned char] ===> Error\n");
2085 printf("Function vec_ldl [type unsigned char] ===> OK\n");
2088 memcpy( Cmem, &Ccons1, sizeof(vector signed char) );
2089 Caux1.v = vec_ldl( 0, Cmem );
2091 for ( i=0; i< 16; i++ )
2093 Iaux = Iaux && (Caux1.e[i]==Cmem[i]);
2098 printf("Function vec_ldl [type char] ===> Error\n");
2100 printf("Function vec_ldl [type char] ===> OK\n");
2103 memcpy( USmem, &UScons3, sizeof(vector unsigned short) );
2104 USaux1.v = vec_ldl( 0, USmem );
2106 for ( i=0; i< 8; i++ )
2108 Iaux = Iaux && (USaux1.e[i]==USmem[i]);
2113 printf("Function vec_ldl [type unsigned short] ===> Error\n");
2115 printf("Function vec_ldl [type unsigned short] ===> OK\n");
2118 memcpy( Smem, &Scons1, sizeof(vector signed short) );
2119 Saux1.v = vec_ldl( 0, Smem );
2121 for ( i=0; i< 8; i++ )
2123 Iaux = Iaux && (Saux1.e[i]==Smem[i]);
2128 printf("Function vec_ldl [type short] ===> Error\n");
2130 printf("Function vec_ldl [type short] ===> OK\n");
2133 memcpy( UImem, &UIcons1, sizeof(vector unsigned int) );
2134 UIaux1.v = vec_ldl( 0, UImem );
2136 for ( i=0; i< 4; i++ )
2138 Iaux = Iaux && (UIaux1.e[i]==UImem[i]);
2143 printf("Function vec_ldl [type unsigned int] ===> Error\n");
2145 printf("Function vec_ldl [type unsigned int] ===> OK\n");
2148 memcpy( Imem, &Icons1, sizeof(vector signed int) );
2149 Iaux1.v = vec_ldl( 0, Imem );
2151 for ( i=0; i< 4; i++ )
2153 Iaux = Iaux && (Iaux1.e[i]==Imem[i]);
2158 printf("Function vec_ldl [type int] ===> Error\n");
2160 printf("Function vec_ldl [type int] ===> OK\n");
2162 #if defined TEST_FLOATS
2164 memcpy( Fmem, &Fcons1, sizeof(vector float) );
2165 Faux1.v = vec_ldl( 0, Fmem );
2167 for ( i=0; i< 4; i++ )
2169 Iaux = Iaux && (Faux1.e[i]==Fmem[i]);
2174 printf("Function vec_ldl [type float] ===> Error\n");
2176 printf("Function vec_ldl [type float] ===> OK\n");
2180 /* Free dynamic vector variables */
2187 #if defined TEST_FLOATS
2191 #if defined TEST_FLOATS
2192 /* Function vec_loge */
2193 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
2195 Faux1.v = vec_loge( Fcons3 );
2197 for( i=0; i< 4; i++ )
2199 Faux = log2(Faux2.e[i]);
2201 Faux = (Faux - Faux1.e[i])/Faux;
2203 Faux = Faux - Faux1.e[i];
2208 printf("Function vec_loge [type float] ===> Error\n");
2210 printf("Function vec_loge [type float] ===> OK\n");
2221 TvecChar Caux1, Caux2, Caux3;//, Caux4;
2222 TvecUChar UCaux1, UCaux2, UCaux3;//, UCaux4;
2223 TvecShort Saux1, Saux2, Saux3, Saux4;
2224 TvecUShort USaux1, USaux2, USaux3, USaux4;
2225 TvecInt Iaux1, Iaux2, Iaux3;//, Iaux4;
2226 TvecUInt UIaux1, UIaux2, UIaux3;//, UIaux4;
2227 #if defined TEST_FLOATS
2228 TvecFloat Faux1, Faux2, Faux3, Faux4;
2231 int i, err, j, b, bAux;
2232 #if defined TEST_FLOATS
2233 signed int Ivec1, Ivec2, Ivec3;
2235 // signed short *Svec1;
2236 // unsigned int *UIvec1;
2237 // unsigned short *USvec1;
2238 // unsigned char *UCvec1;
2239 #if defined TEST_FLOATS
2243 /* For saturated rutines */
2244 // long long int LLaux;
2246 #if defined TEST_FLOATS
2249 signed int Iaux, I1, I2;
2250 unsigned int UIaux, UI1, UI2;
2252 unsigned short USaux;
2254 unsigned char UCaux;
2262 unsigned short us[2];
2264 unsigned char uc[4];
2265 } INTunion1;//, INTunion2;
2273 unsigned char uc[2];
2274 } SHOunion1, SHOunion2;
2277 #if defined (GCC_COMPILER)
2278 vector signed char Ccons1 = (vector signed char){-8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7};
2279 vector signed char Ccons2 = (vector signed char){1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1};
2280 // vector signed char Ccons3 = (vector signed char){-128, 127, -128, 127, -128, 127, -128, 127, -128, 127, -128, 127, -128, 127, -128, 127};
2281 vector unsigned char UCcons1 = (vector unsigned char){248, 249, 250, 251, 252, 253, 254, 255, 0, 1, 2, 3, 4, 5, 6, 7};
2282 vector unsigned char UCcons2 = (vector unsigned char){2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2};
2283 // vector unsigned char UCcons3 = (vector unsigned char){1, 2, 3, 4, 5, 6, 7, 8, 1, 2, 3, 4, 5, 6, 7, 8};
2284 vector signed short Scons1 = (vector signed short){256, 320, 340, -1, 0, 1, 2, 3};
2285 vector signed short Scons2 = (vector signed short){256, 320, 340, 1, 1, 1, -10000, -10000};
2286 vector signed short Scons3 = (vector signed short){256, 320, 340, 32767, -32768, 32767, -32768, 32767};
2287 vector unsigned short UScons1 = (vector unsigned short){65532, 65533, 65534, 65535, 0, 1, 2, 3};
2288 vector unsigned short UScons2 = (vector unsigned short){1, 1, 1, 1, 1, 1, 1, 1};
2289 vector unsigned short UScons3 = (vector unsigned short){1, 2, 3, 4, 1, 2, 3, 4};
2290 vector signed int Icons1 = (vector signed int){-4, -1, 1, 4};
2291 vector signed int Icons2 = (vector signed int){1, 1, 1, 1};
2292 vector signed int Icons3 = (vector signed int){0x80000000, 0x7FFFFFFF, 0x80000000, 0x7FFFFFFF};
2293 vector unsigned int UIcons1 = (vector unsigned int){0xFFFFFFFE, 0xFFFFFFFF, 0, 1};
2294 vector unsigned int UIcons2 = (vector unsigned int){1, 1, 1, 1};
2295 vector unsigned int UIcons3 = (vector unsigned int){1, 2, 1, 2};
2297 #if defined TEST_FLOATS
2298 vector float Fcons1 = (vector float){-1.5, 1.0, 0.5, -3.999};
2299 vector float Fcons2 = (vector float){1.0, 1.0, 1.0, 1.0};
2300 vector float Fcons3 = (vector float){100000000000.0, 1.0, -1.0, -1234567890.0};
2303 #elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
2304 vector signed char Ccons1 = (vector signed char)(-8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7);
2305 vector signed char Ccons2 = (vector signed char)(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1);
2306 vector signed char Ccons3 = (vector signed char)(-128, 127, -128, 127, -128, 127, -128, 127, -128, 127, -128, 127, -128, 127, -128, 127);
2307 vector unsigned char UCcons1 = (vector unsigned char)(248, 249, 250, 251, 252, 253, 254, 255, 0, 1, 2, 3, 4, 5, 6, 7);
2308 vector unsigned char UCcons2 = (vector unsigned char)(2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2);
2309 // vector unsigned char UCcons3 = (vector unsigned char)(1, 2, 3, 4, 5, 6, 7, 8, 1, 2, 3, 4, 5, 6, 7, 8);
2310 vector signed short Scons1 = (vector signed short)(-4, -3, -2, -1, 0, 1, 2, 3);
2311 vector signed short Scons2 = (vector signed short)(-32768, 10000, 1, 1, 1, 1, -10000, -10000);
2312 vector signed short Scons3 = (vector signed short)(-32768, 32767, -32768, 32767, -32768, 32767, -32768, 32767);
2313 vector unsigned short UScons1 = (vector unsigned short)(65532, 65533, 65534, 65535, 0, 1, 2, 3);
2314 vector unsigned short UScons2 = (vector unsigned short)(1, 1, 1, 1, 1, 1, 1, 1);
2315 vector unsigned short UScons3 = (vector unsigned short)(1, 2, 3, 4, 1, 2, 3, 4);
2316 vector signed int Icons1 = (vector signed int)(-4, -1, 1, 4);
2317 vector signed int Icons2 = (vector signed int)(1, 1, 1, 1);
2318 vector signed int Icons3 = (vector signed int)(0x80000000, 0x7FFFFFFF, 0x80000000, 0x7FFFFFFF);
2319 vector unsigned int UIcons1 = (vector unsigned int)(0xFFFFFFFE, 0xFFFFFFFF, 0, 1);
2320 vector unsigned int UIcons2 = (vector unsigned int)(1, 1, 1, 1);
2321 vector unsigned int UIcons3 = (vector unsigned int)(1, 2, 1, 2);
2323 #if defined TEST_FLOATS
2324 vector float Fcons1 = (vector float)(-1.5, 1.0, 0.5, -3.999);
2325 vector float Fcons2 = (vector float)(1.0, 1.0, 1.0, 1.0);
2326 vector float Fcons3 = (vector float)(100000000000.0, 1.0, -1.0, -1234567890.0);
2332 /* Function vec_lvsl */
2333 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
2336 UCaux1.v = vec_lvsl( b, &b);
2337 bAux = b + (size_t)(&b);
2339 # if defined(GCC_COMPILER)
2340 UCaux2.v =(vector unsigned char){0x0,0x1,0x2,0x3,0x4,0x5,0x6,0x7,0x8,0x9,0xA,0xB,0xC,0xD,0xE,0xF};
2341 # elif defined(MAC_COMPILER) || defined (XLC_COMPILER)
2342 UCaux2.v =(vector unsigned char)(0x0,0x1,0x2,0x3,0x4,0x5,0x6,0x7,0x8,0x9,0xA,0xB,0xC,0xD,0xE,0xF);
2344 for( i=0; i< 16; i++ )
2346 UCaux = UCaux2.e[i]+b;
2347 if (UCaux1.e[i] != UCaux)
2351 printf("Function vec_lvsl [type unsigned char] ===> Error\n");
2353 printf("Function vec_lvsl [type unsigned char] ===> OK\n");
2355 /* Function vec_lvsr */
2356 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
2359 UCaux1.v = vec_lvsr( b, &b);
2360 bAux = b + (size_t)(&b);
2362 # if defined (GCC_COMPILER)
2363 UCaux2.v =(vector unsigned char){0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F};
2364 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
2365 UCaux2.v =(vector unsigned char)(0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F);
2367 for( i=0; i< 16; i++ )
2369 UCaux = UCaux2.e[i]-b;
2370 if (UCaux1.e[i] != UCaux)
2374 printf("Function vec_lvsr [type unsigned char] ===> Error\n");
2376 printf("Function vec_lvsr [type unsigned char] ===> OK\n");
2378 #if defined TEST_FLOATS
2379 /* Function vec_madd */
2380 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
2382 Faux1.v = vec_madd( Fcons1, Fcons2, Fcons3 );
2386 for( i=0; i< 4; i++ )
2387 if (Faux1.e[i] != (Faux2.e[i]*Faux3.e[i]+Faux4.e[i]))
2390 printf("Function vec_madd [type float] ===> Error\n");
2392 printf("Function vec_madd [type float] ===> OK\n");
2395 /* Function vec_madds */
2396 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
2398 Saux1.v = vec_madds( Scons1, Scons3, Scons2 );
2402 for( i=0; i< 8; i++ )
2404 INTunion1.si = Saux2.e[i]*Saux3.e[i];
2405 INTunion1.si = INTunion1.si >> 15;
2406 INTunion1.si = INTunion1.si + Saux4.e[i];
2407 if (INTunion1.si>32767)
2409 else if (INTunion1.si<(-32768))
2412 Saux= INTunion1.ss[1];
2413 if (Saux1.e[i] != Saux)
2417 printf("Function vec_madds [type short] ===> Error\n");
2419 printf("Function vec_madds [type short] ===> OK\n");
2421 /* Function vec_max */
2422 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
2424 Caux1.v = vec_max( Ccons1, Ccons2 );
2427 for( i=0; i< 16; i++ )
2429 if (Caux2.e[i]>Caux3.e[i])
2433 if (Caux1.e[i] != Caux)
2437 printf("Function vec_max [type char] ===> Error\n");
2439 printf("Function vec_max [type char] ===> OK\n");
2442 UCaux1.v = vec_max( UCcons1, UCcons2 );
2445 for( i=0; i< 16; i++ )
2447 if (UCaux2.e[i]>UCaux3.e[i])
2448 UCaux = UCaux2.e[i];
2450 UCaux = UCaux3.e[i];
2451 if (UCaux1.e[i] != UCaux)
2455 printf("Function vec_max [type unsigned char] ===> Error\n");
2457 printf("Function vec_max [type unsigned char] ===> OK\n");
2460 Saux1.v = vec_max( Scons1, Scons3 );
2463 for( i=0; i< 8; i++ )
2465 if (Saux2.e[i]>Saux3.e[i])
2469 if (Saux1.e[i] != Saux)
2473 printf("Function vec_max [type short] ===> Error\n");
2475 printf("Function vec_max [type short] ===> OK\n");
2478 USaux1.v = vec_max( UScons1, UScons2 );
2481 for( i=0; i< 8; i++ )
2483 if (USaux2.e[i]>USaux3.e[i])
2484 USaux = USaux2.e[i];
2486 USaux = USaux3.e[i];
2487 if (USaux1.e[i] != USaux)
2491 printf("Function vec_max [type unsigned short] ===> Error\n");
2493 printf("Function vec_max [type unsigned short] ===> OK\n");
2496 Iaux1.v = vec_max( Icons1, Icons2 );
2499 for( i=0; i< 4; i++ )
2501 if (Iaux2.e[i]>Iaux3.e[i])
2505 if (Iaux1.e[i] != Iaux)
2509 printf("Function vec_max [type integer] ===> Error\n");
2511 printf("Function vec_max [type integer] ===> OK\n");
2514 UIaux1.v = vec_max( UIcons1, UIcons2 );
2517 for( i=0; i< 4; i++ )
2519 if (UIaux2.e[i]>UIaux3.e[i])
2520 UIaux = UIaux2.e[i];
2522 UIaux = UIaux3.e[i];
2523 if (UIaux1.e[i] != UIaux)
2527 printf("Function vec_max [type unsigned int] ===> Error\n");
2529 printf("Function vec_max [type unsigned int] ===> OK\n");
2531 #if defined TEST_FLOATS
2533 Faux1.v = vec_max( Fcons1, Fcons2 );
2536 for( i=0; i< 4; i++ )
2538 if (Faux2.e[i]>Faux3.e[i])
2542 if (Faux1.e[i] != Faux)
2546 printf("Function vec_max [type float] ===> Error\n");
2548 printf("Function vec_max [type float] ===> OK\n");
2551 /* Function vec_mergeh */
2552 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
2554 Caux1.v = vec_mergeh( Ccons1, Ccons2 );
2557 for( i=0; i< 8; i++ )
2558 if ((Caux1.e[2*i] != Caux2.e[i])||(Caux1.e[2*i+1]!=Caux3.e[i]))
2561 printf("Function vec_mergeh [type char] ===> Error\n");
2563 printf("Function vec_mergeh [type char] ===> OK\n");
2566 UCaux1.v = vec_mergeh( UCcons1, UCcons2 );
2569 for( i=0; i< 8; i++ )
2570 if ((UCaux1.e[2*i] != UCaux2.e[i])||(UCaux1.e[2*i+1]!=UCaux3.e[i]))
2573 printf("Function vec_mergeh [type unsigned char] ===> Error\n");
2575 printf("Function vec_mergeh [type unsigned char] ===> OK\n");
2578 Saux1.v = vec_mergeh( Scons1, Scons2 );
2581 for( i=0; i< 4; i++ )
2582 if ((Saux1.e[2*i] != Saux2.e[i])||(Saux1.e[2*i+1]!=Saux3.e[i]))
2585 printf("Function vec_mergeh [type short] ===> Error\n");
2587 printf("Function vec_mergeh [type short] ===> OK\n");
2590 USaux1.v = vec_mergeh( UScons1, UScons2 );
2593 for( i=0; i< 4; i++ )
2594 if ((USaux1.e[2*i] != USaux2.e[i])||(USaux1.e[2*i+1]!=USaux3.e[i]))
2597 printf("Function vec_mergeh [type unsigned short] ===> Error\n");
2599 printf("Function vec_mergeh [type unsigned short] ===> OK\n");
2602 Iaux1.v = vec_mergeh( Icons1, Icons2 );
2605 for( i=0; i< 2; i++ )
2606 if ((Iaux1.e[2*i] != Iaux2.e[i])||(Iaux1.e[2*i+1]!=Iaux3.e[i]))
2609 printf("Function vec_mergeh [type integer] ===> Error\n");
2611 printf("Function vec_mergeh [type integer] ===> OK\n");
2614 UIaux1.v = vec_mergeh( UIcons1, UIcons2 );
2617 for( i=0; i< 2; i++ )
2618 if ((UIaux1.e[2*i] != UIaux2.e[i])||(UIaux1.e[2*i+1]!=UIaux3.e[i]))
2621 printf("Function vec_mergeh [type unsigned int] ===> Error\n");
2623 printf("Function vec_mergeh [type unsigned int] ===> OK\n");
2625 #if defined TEST_FLOATS
2627 Faux1.v = vec_mergeh( Fcons1, Fcons2 );
2630 for( i=0; i< 2; i++ )
2631 if ((Faux1.e[2*i] != Faux2.e[i])||(Faux1.e[2*i+1]!=Faux3.e[i]))
2634 printf("Function vec_mergeh [type float] ===> Error\n");
2636 printf("Function vec_mergeh [type float] ===> OK\n");
2639 /* Function vec_mergel */
2640 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
2642 Caux1.v = vec_mergel( Ccons1, Ccons2 );
2645 for( i=0; i< 8; i++ )
2646 if ((Caux1.e[2*i] != Caux2.e[i+8])||(Caux1.e[2*i+1]!=Caux3.e[i+8]))
2649 printf("Function vec_mergel [type char] ===> Error\n");
2651 printf("Function vec_mergel [type char] ===> OK\n");
2654 UCaux1.v = vec_mergel( UCcons1, UCcons2 );
2657 for( i=0; i< 8; i++ )
2658 if ((UCaux1.e[2*i] != UCaux2.e[i+8])||(UCaux1.e[2*i+1]!=UCaux3.e[i+8]))
2661 printf("Function vec_mergel [type unsigned char] ===> Error\n");
2663 printf("Function vec_mergel [type unsigned char] ===> OK\n");
2666 Saux1.v = vec_mergel( Scons1, Scons2 );
2669 for( i=0; i< 4; i++ )
2670 if ((Saux1.e[2*i] != Saux2.e[i+4])||(Saux1.e[2*i+1]!=Saux3.e[i+4]))
2673 printf("Function vec_mergel [type short] ===> Error\n");
2675 printf("Function vec_mergel [type short] ===> OK\n");
2678 USaux1.v = vec_mergel( UScons1, UScons2 );
2681 for( i=0; i< 4; i++ )
2682 if ((USaux1.e[2*i] != USaux2.e[i+4])||(USaux1.e[2*i+1]!=USaux3.e[i+4]))
2685 printf("Function vec_mergel [type unsigned short] ===> Error\n");
2687 printf("Function vec_mergel [type unsigned short] ===> OK\n");
2690 Iaux1.v = vec_mergel( Icons1, Icons2 );
2693 for( i=0; i< 2; i++ )
2694 if ((Iaux1.e[2*i] != Iaux2.e[i+2])||(Iaux1.e[2*i+1]!=Iaux3.e[i+2]))
2697 printf("Function vec_mergel [type integer] ===> Error\n");
2699 printf("Function vec_mergel [type integer] ===> OK\n");
2702 UIaux1.v = vec_mergel( UIcons1, UIcons2 );
2705 for( i=0; i< 2; i++ )
2706 if ((UIaux1.e[2*i] != UIaux2.e[i+2])||(UIaux1.e[2*i+1]!=UIaux3.e[i+2]))
2709 printf("Function vec_mergel [type unsigned int] ===> Error\n");
2711 printf("Function vec_mergel [type unsigned int] ===> OK\n");
2713 #if defined TEST_FLOATS
2715 Faux1.v = vec_mergel( Fcons1, Fcons2 );
2718 for( i=0; i< 2; i++ )
2719 if ((Faux1.e[2*i] != Faux2.e[i+2])||(Faux1.e[2*i+1]!=Faux3.e[i+2]))
2722 printf("Function vec_mergel [type float] ===> Error\n");
2724 printf("Function vec_mergel [type float] ===> OK\n");
2727 /* Function vec_mfvscr */
2728 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
2729 printf("Function vec_mfvscr [Vector Move from Vector Status and Control Register] not checked\n");
2731 /* Function vec_min */
2732 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
2733 #ifndef XLC_COMPILER
2735 Caux1.v = vec_min( Ccons1, Ccons2 );
2738 for( i=0; i< 8; i++ )
2740 if (Caux2.e[i]<Caux3.e[i])
2744 if (Caux1.e[i] != Caux)
2748 printf("Function vec_min [type char] ===> Error\n");
2750 printf("Function vec_min [type char] ===> OK\n");
2754 UCaux1.v = vec_min( UCcons1, UCcons2 );
2757 for( i=0; i< 8; i++ )
2759 if (UCaux2.e[i]<UCaux3.e[i])
2760 UCaux = UCaux2.e[i];
2762 UCaux = UCaux3.e[i];
2763 if (UCaux1.e[i] != UCaux)
2767 printf("Function vec_min [type unsigned char] ===> Error\n");
2769 printf("Function vec_min [type unsigned char] ===> OK\n");
2771 #ifndef XLC_COMPILER
2773 Saux1.v = vec_min( Scons1, Scons2 );
2776 for( i=0; i< 8; i++ )
2778 if (Saux2.e[i]<Saux3.e[i])
2782 if (Saux1.e[i] != Saux)
2786 printf("Function vec_min [type short] ===> Error\n");
2788 printf("Function vec_min [type short] ===> OK\n");
2791 USaux1.v = vec_min( UScons1, UScons2 );
2794 for( i=0; i< 8; i++ )
2796 if (USaux2.e[i]<USaux3.e[i])
2797 USaux = USaux2.e[i];
2799 USaux = USaux3.e[i];
2800 if (USaux1.e[i] != USaux)
2804 printf("Function vec_min [type unsigned short] ===> Error\n");
2806 printf("Function vec_min [type unsigned short] ===> OK\n");
2809 Iaux1.v = vec_min( Icons1, Icons2 );
2812 for( i=0; i< 4; i++ )
2814 if (Iaux2.e[i]<Iaux3.e[i])
2818 if (Iaux1.e[i] != Iaux)
2822 printf("Function vec_min [type integer] ===> Error\n");
2824 printf("Function vec_min [type integer] ===> OK\n");
2827 UIaux1.v = vec_min( UIcons1, UIcons2 );
2830 for( i=0; i< 4; i++ )
2832 if (UIaux2.e[i]<UIaux3.e[i])
2833 UIaux = UIaux2.e[i];
2835 UIaux = UIaux3.e[i];
2836 if (UIaux1.e[i] != UIaux)
2840 printf("Function vec_min [type unsigned int] ===> Error\n");
2842 printf("Function vec_min [type unsigned int] ===> OK\n");
2844 #if defined TEST_FLOATS
2846 Faux1.v = vec_min( Fcons1, Fcons2 );
2849 for( i=0; i< 4; i++ )
2851 if (Faux2.e[i]<Faux3.e[i])
2855 if (Faux1.e[i] != Faux)
2859 printf("Function vec_min [type float] ===> Error\n");
2861 printf("Function vec_min [type float] ===> OK\n");
2866 /* Function vec_mladd */
2867 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
2868 #ifndef XLC_COMPILER
2870 Saux1.v = vec_mladd( Scons1, Scons2, Scons3 );
2874 for( i=0; i< 8; i++ )
2876 INTunion1.si = Saux2.e[i]*Saux3.e[i];
2877 INTunion1.si = INTunion1.si + Saux4.e[i];
2878 if (Saux1.e[i] != INTunion1.ss[1])
2882 printf("Function vec_mladd [type short] ===> Error\n");
2884 printf("Function vec_mladd [type short] ===> OK\n");
2888 USaux1.v = vec_mladd( UScons1, UScons2, UScons3 );
2892 for( i=0; i< 8; i++ )
2894 INTunion1.ui = USaux2.e[i]*USaux3.e[i];
2895 INTunion1.ui = INTunion1.ui + USaux4.e[i];
2896 if (USaux1.e[i] != INTunion1.us[1])
2900 printf("Function vec_mladd [type unsigned short] ===> Error\n");
2902 printf("Function vec_mladd [type unsigned short] ===> OK\n");
2904 /* Function vec_mradds */
2905 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
2907 Saux1.v = vec_mradds( Scons1, Scons2, Scons3 );
2911 for( i=0; i< 8; i++ )
2913 INTunion1.si = Saux2.e[i]*Saux3.e[i]+0x4000;
2914 INTunion1.si = INTunion1.si >> 15;
2915 INTunion1.si = INTunion1.si + Saux4.e[i];
2916 if (INTunion1.si>32767)
2918 else if (INTunion1.si<(-32768))
2921 Saux = INTunion1.ss[1];
2922 if (Saux1.e[i] != Saux)
2925 printf("vector: %d \n", Saux1.e[i]);
2926 printf("scalar: %d \n", Saux);
2930 printf("Function vec_mradds [type short] ===> Error\n");
2932 printf("Function vec_mradds [type short] ===> OK\n");
2934 /* Function vec_msum */
2935 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
2936 #ifndef XLC_COMPILER
2938 Iaux1.v = vec_msum( Ccons1, UCcons2, Icons1 );
2942 for( i=0; i< 4; i++ )
2945 for (j=0; j< 4; j++)
2946 Iaux = Iaux + Caux1.e[4*i+j]*UCaux1.e[4*i+j];
2947 if (Iaux1.e[i] != Iaux)
2951 printf("Function vec_msum [type char] ===> Error\n");
2953 printf("Function vec_msum [type char] ===> OK\n");
2957 UIaux1.v = vec_msum( UCcons1, UCcons2, UIcons1 );
2961 for( i=0; i< 4; i++ )
2963 UIaux = UIaux2.e[i];
2964 for (j=0; j< 4; j++)
2965 UIaux = UIaux + UCaux1.e[4*i+j]*UCaux2.e[4*i+j];
2966 if (UIaux1.e[i] != UIaux)
2970 printf("Function vec_msum [type unsigned char] ===> Error\n");
2972 printf("Function vec_msum [type unsigned char] ===> OK\n");
2974 #ifndef XLC_COMPILER
2976 Iaux1.v = vec_msum( Scons1, Scons2, Icons1 );
2980 for( i=0; i< 4; i++ )
2983 for (j=0; j< 2; j++)
2984 Iaux = Iaux + Saux1.e[2*i+j]*Saux2.e[2*i+j];
2985 if (Iaux1.e[i] != Iaux)
2989 printf("Function vec_msum [type short] ===> Error\n");
2991 printf("Function vec_msum [type short] ===> OK\n");
2994 UIaux1.v = vec_msum( UScons1, UScons2, UIcons1 );
2998 for( i=0; i< 4; i++ )
3000 UIaux = UIaux2.e[i];
3001 for (j=0; j< 2; j++)
3002 UIaux = UIaux + USaux1.e[2*i+j]*USaux2.e[2*i+j];
3003 if (UIaux1.e[i] != UIaux)
3007 printf("Function vec_msum [type unsigned short] ===> Error\n");
3009 printf("Function vec_msum [type unsigned short] ===> OK\n");
3012 /* Function vec_msums */
3013 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
3015 Iaux1.v = vec_msums( Scons2, Scons3, Icons3 );
3019 for( i=0; i< 4; i++ )
3021 I1 = Saux1.e[2*i]*Saux2.e[2*i];
3022 I2 = Saux1.e[2*i+1]*Saux2.e[2*i+1];
3024 if ((I1>0)&&(I2>0)&&(Iaux<0))
3026 else if ((I1<0)&&(I2<0)&&(Iaux>0))
3031 if ((I1>0)&&(I2>0)&&(Iaux<0))
3033 else if ((I1<0)&&(I2<0)&&(Iaux>0))
3035 if (Iaux1.e[i] != Iaux)
3039 printf("Function vec_msums [type short] ===> Error\n");
3041 printf("Function vec_msums [type short] ===> OK\n");
3044 UIaux1.v = vec_msums( UScons2, UScons3, UIcons3 );
3048 for( i=0; i< 4; i++ )
3050 UI1 = USaux1.e[2*i]*USaux2.e[2*i];
3051 UI2 = USaux1.e[2*i+1]*USaux2.e[2*i+1];
3053 if ((UIaux<UI1)||(UIaux<UI2))
3058 if ((UIaux<UI1)||(UIaux<UI2))
3060 if (UIaux1.e[i] != UIaux)
3064 printf("Function vec_msums [type unsigned short] ===> Error\n");
3066 printf("Function vec_msums [type unsigned short] ===> OK\n");
3068 /* Function vec_mtvscr */
3069 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
3070 printf("Function vec_mtvscr [Vector Move to Vector Status and Control Register] not checked\n");
3072 /* Function vec_mule */
3073 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
3075 Saux1.v = vec_mule( Ccons1, Ccons2 );
3078 for( i=0; i< 4; i++ )
3079 if (Saux1.e[i] != (Caux1.e[2*i]*Caux2.e[2*i]))
3082 printf("Function vec_mule [type char] ===> Error\n");
3084 printf("Function vec_mule [type char] ===> OK\n");
3087 USaux1.v = vec_mule( UCcons1, UCcons2 );
3090 for( i=0; i< 4; i++ )
3091 if (USaux1.e[i] != (UCaux1.e[2*i]*UCaux2.e[2*i]))
3094 printf("Function vec_mule [type unsigned char] ===> Error\n");
3096 printf("Function vec_mule [type unsigned char] ===> OK\n");
3099 Iaux1.v = vec_mule( Scons1, Scons2 );
3102 for( i=0; i< 4; i++ )
3103 if (Iaux1.e[i] != (Saux1.e[2*i]*Saux2.e[2*i]))
3106 printf("Function vec_mule [type short] ===> Error\n");
3108 printf("Function vec_mule [type short] ===> OK\n");
3111 UIaux1.v = vec_mule( UScons1, UScons2 );
3114 for( i=0; i< 4; i++ )
3115 if (UIaux1.e[i] != (USaux1.e[2*i] * USaux2.e[2*i]))
3118 printf("Function vec_mule [type unsigned short] ===> Error\n");
3120 printf("Function vec_mule [type unsigned short] ===> OK\n");
3122 /* Function vec_mulo */
3123 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
3125 Saux1.v = vec_mulo( Ccons1, Ccons2 );
3128 for( i=0; i< 4; i++ )
3129 if (Saux1.e[i] != (Caux1.e[2*i+1]*Caux2.e[2*i+1]))
3132 printf("Function vec_mulo [type char] ===> Error\n");
3134 printf("Function vec_mulo [type char] ===> OK\n");
3137 USaux1.v = vec_mulo( UCcons1, UCcons2 );
3140 for( i=0; i< 4; i++ )
3141 if (USaux1.e[i] != (UCaux1.e[2*i+1]*UCaux2.e[2*i+1]))
3144 printf("Function vec_mulo [type unsigned char] ===> Error\n");
3146 printf("Function vec_mulo [type unsigned char] ===> OK\n");
3149 Iaux1.v = vec_mulo( Scons1, Scons2 );
3152 for( i=0; i< 4; i++ )
3153 if (Iaux1.e[i] != (Saux1.e[2*i+1]*Saux2.e[2*i+1]))
3156 printf("Function vec_mulo [type short] ===> Error\n");
3158 printf("Function vec_mulo [type short] ===> OK\n");
3161 UIaux1.v = vec_mulo( UScons1, UScons2 );
3164 for( i=0; i< 4; i++ )
3165 if (UIaux1.e[i] != (USaux1.e[2*i+1]*USaux2.e[2*i+1]))
3168 printf("Function vec_mulo [type unsigned short] ===> Error\n");
3170 printf("Function vec_mulo [type unsigned short] ===> OK\n");
3172 #if defined TEST_FLOATS
3173 /* Function vec_nmsub */
3174 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
3176 Faux1.v = vec_nmsub( Fcons1, Fcons2, Fcons3 );
3180 for( i=0; i< 4; i++ )
3182 if (Faux1.e[i] != (-Faux2.e[i]*Faux3.e[i]+Faux4.e[i]))
3186 printf("Function vec_nmsub [type float] ===> Error\n");
3188 printf("Function vec_nmsub [type float] ===> OK\n");
3191 /* Function vec_nor */
3192 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
3194 Caux1.v = vec_nor( Ccons1, Ccons2 );
3197 for( i=0; i< 16; i++ )
3198 if (Caux1.e[i] != ~(Caux2.e[i] | Caux3.e[i]))
3201 printf("Function vec_nor [type char] ===> Error\n");
3203 printf("Function vec_nor [type char] ===> OK\n");
3206 UCaux1.v = vec_nor( UCcons1, UCcons2 );
3209 for( i=0; i< 16; i++ )
3211 UCaux = UCaux2.e[i] | UCaux3.e[i];
3213 if (UCaux1.e[i] != UCaux )
3217 printf("Function vec_nor [type unsigened char] ===> Error\n");
3219 printf("Function vec_nor [type unsigened char] ===> OK\n");
3222 Saux1.v = vec_nor( Scons1, Scons2 );
3225 for( i=0; i< 8; i++ )
3226 if (Saux1.e[i] != ~(Saux2.e[i] | Saux3.e[i]))
3229 printf("Function vec_nor [type short] ===> Error\n");
3231 printf("Function vec_nor [type short] ===> OK\n");
3234 USaux1.v = vec_nor( UScons1, UScons2 );
3237 for( i=0; i< 8; i++ )
3239 USaux = USaux2.e[i] | USaux3.e[i];
3241 if (USaux1.e[i] != USaux )
3245 printf("Function vec_nor [type unsigned short] ===> Error\n");
3247 printf("Function vec_nor [type unsigned short] ===> OK\n");
3250 Iaux1.v = vec_nor( Icons1, Icons2 );
3253 for( i=0; i< 4; i++ )
3254 if (Iaux1.e[i] != ~(Iaux2.e[i] | Iaux3.e[i]))
3257 printf("Function vec_nor [type integer] ===> Error\n");
3259 printf("Function vec_nor [type integer] ===> OK\n");
3262 UIaux1.v = vec_nor( UIcons1, UIcons2 );
3265 for( i=0; i< 4; i++ )
3266 if (UIaux1.e[i] != ~(UIaux2.e[i] | UIaux3.e[i]))
3269 printf("Function vec_nor [type unsigened int] ===> Error\n");
3271 printf("Function vec_nor [type unsigened int] ===> OK\n");
3273 #if defined TEST_FLOATS
3275 Faux1.v = vec_nor( Fcons1, Fcons2 );
3278 for( i=0; i< 4; i++ )
3283 if ((Ivec1) != ~((Ivec2) | (Ivec3)))
3287 printf("Function vec_nor [type float] ===> Error\n");
3289 printf("Function vec_nor [type float] ===> OK\n");
3292 /* Function vec_or */
3293 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
3295 Caux1.v = vec_or( Ccons1, Ccons2 );
3298 for( i=0; i< 16; i++ )
3299 if (Caux1.e[i] != (Caux2.e[i] | Caux3.e[i]))
3302 printf("Function vec_or [type char] ===> Error\n");
3304 printf("Function vec_or [type char] ===> OK\n");
3307 UCaux1.v = vec_or( UCcons1, UCcons2 );
3310 for( i=0; i< 16; i++ )
3312 UCaux = UCaux2.e[i] | UCaux3.e[i];
3313 if (UCaux1.e[i] != UCaux )
3317 printf("Function vec_or [type unsigened char] ===> Error\n");
3319 printf("Function vec_or [type unsigened char] ===> OK\n");
3322 Saux1.v = vec_or( Scons1, Scons2 );
3325 for( i=0; i< 8; i++ )
3326 if (Saux1.e[i] != (Saux2.e[i] | Saux3.e[i]))
3329 printf("Function vec_or [type short] ===> Error\n");
3331 printf("Function vec_or [type short] ===> OK\n");
3334 USaux1.v = vec_or( UScons1, UScons2 );
3337 for( i=0; i< 8; i++ )
3339 USaux = USaux2.e[i] | USaux3.e[i];
3340 if (USaux1.e[i] != USaux )
3344 printf("Function vec_or [type unsigned short] ===> Error\n");
3346 printf("Function vec_or [type unsigned short] ===> OK\n");
3349 Iaux1.v = vec_or( Icons1, Icons2 );
3352 for( i=0; i< 4; i++ )
3353 if (Iaux1.e[i] != (Iaux2.e[i] | Iaux3.e[i]))
3356 printf("Function vec_or [type integer] ===> Error\n");
3358 printf("Function vec_or [type integer] ===> OK\n");
3361 UIaux1.v = vec_or( UIcons1, UIcons2 );
3364 for( i=0; i< 4; i++ )
3365 if (UIaux1.e[i] != (UIaux2.e[i] | UIaux3.e[i]))
3368 printf("Function vec_or [type unsigened int] ===> Error\n");
3370 printf("Function vec_or [type unsigened int] ===> OK\n");
3372 #if defined TEST_FLOATS
3374 Faux1.v = vec_or( Fcons1, Fcons2 );
3377 for( i=0; i< 4; i++ )
3382 if ((Ivec1) != ((Ivec2) | (Ivec3)))
3386 printf("Function vec_or [type float] ===> Error\n");
3388 printf("Function vec_or [type float] ===> OK\n");
3399 TvecChar Caux1, Caux2, Caux3;//, Caux4;
3400 TvecUChar UCaux1, UCaux2, UCaux3, UCaux4;
3401 TvecShort Saux1, Saux2, Saux3;//, Saux4;
3402 TvecUShort USaux1, USaux2, USaux3, USaux4;
3403 TvecInt Iaux1, Iaux2, Iaux3;//, Iaux4;
3404 TvecUInt UIaux1, UIaux2, UIaux3, UIaux4;
3405 #if defined TEST_FLOATS
3406 TvecFloat Faux1, Faux2, Faux3;//, Faux4;
3409 int i, err, /*j,*/ b;//, bAux;
3410 #if defined TEST_FLOATS
3411 signed int Ivec1, Ivec2;//, Ivec3;
3413 // signed short *Svec1;
3414 unsigned int *UIvec1;
3415 unsigned short *USvec1;
3416 unsigned char *UCvec1;
3417 #if defined TEST_FLOATS
3421 /* For saturated rutines */
3422 // long long int LLaux;
3424 #if defined TEST_FLOATS
3427 signed int Iaux;//, I1, I2;
3428 unsigned int UIaux;//, UI1, UI2;
3430 unsigned short USaux;
3432 unsigned char UCaux;
3440 unsigned short us[2];
3442 unsigned char uc[4];
3443 } INTunion1, INTunion2;
3450 unsigned char uc[2];
3451 } SHOunion1, SHOunion2;
3454 #if defined (GCC_COMPILER)
3455 vector signed char Ccons1 = (vector signed char){-8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7};
3456 vector signed char Ccons2 = (vector signed char){1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1};
3457 vector signed char Ccons3 = (vector signed char){-128, 127, -128, 127, -128, 127, -128, 127, -128, 127, -128, 127, -128, 127, -128, 127};
3458 vector unsigned char UCcons1 = (vector unsigned char){248, 249, 250, 251, 252, 253, 254, 255, 0, 1, 2, 3, 4, 5, 6, 7};
3459 vector unsigned char UCcons2 = (vector unsigned char){2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2};
3460 vector unsigned char UCcons3 = (vector unsigned char){1, 2, 3, 4, 5, 6, 7, 8, 1, 2, 3, 4, 5, 6, 7, 8};
3461 vector signed short Scons1 = (vector signed short){-4, -3, -2, -1, 0, 1, 2, 3};
3462 vector signed short Scons2 = (vector signed short){-32768, 10000, 1, 1, 1, 1, -10000, -10000};
3463 vector signed short Scons3 = (vector signed short){-32768, 32767, -32768, 32767, -32768, 32767, -32768, 32767};
3464 vector unsigned short UScons1 = (vector unsigned short){65532, 65533, 65534, 65535, 0, 1, 2, 3};
3465 vector unsigned short UScons2 = (vector unsigned short){1, 1, 1, 1, 1, 1, 1, 1};
3466 vector unsigned short UScons3 = (vector unsigned short){1, 2, 3, 4, 1, 2, 3, 4};
3467 vector signed int Icons1 = (vector signed int){-4, -1, 1, 4};
3468 vector signed int Icons2 = (vector signed int){1, 1, 1, 1};
3469 vector signed int Icons3 = (vector signed int){0x80000000, 0x7FFFFFFF, 0x80000000, 0x7FFFFFFF};
3470 vector unsigned int UIcons1 = (vector unsigned int){0xFFFFFFFE, 0xFFFFFFFF, 0, 1};
3471 vector unsigned int UIcons2 = (vector unsigned int){1, 1, 1, 1};
3472 vector unsigned int UIcons3 = (vector unsigned int){1, 2, 1, 2};
3474 #if defined TEST_FLOATS
3475 vector float Fcons1 = (vector float){-1.5, 1.0, 0.5, -3.999};
3476 vector float Fcons2 = (vector float){1.0, 1.0, 1.0, 1.0};
3477 vector float Fcons3 = (vector float){100000000000.0, 1.0, -1.0, -1234567890.0};
3480 #elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
3481 vector signed char Ccons1 = (vector signed char)(-8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7);
3482 vector signed char Ccons2 = (vector signed char)(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1);
3483 vector signed char Ccons3 = (vector signed char)(-128, 127, -128, 127, -128, 127, -128, 127, -128, 127, -128, 127, -128, 127, -128, 127);
3484 vector unsigned char UCcons1 = (vector unsigned char)(248, 249, 250, 251, 252, 253, 254, 255, 0, 1, 2, 3, 4, 5, 6, 7);
3485 vector unsigned char UCcons2 = (vector unsigned char)(2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2);
3486 vector unsigned char UCcons3 = (vector unsigned char)(1, 2, 3, 4, 5, 6, 7, 8, 1, 2, 3, 4, 5, 6, 7, 8);
3487 vector signed short Scons1 = (vector signed short)(-4, -3, -2, -1, 0, 1, 2, 3);
3488 vector signed short Scons2 = (vector signed short)(-32768, 10000, 1, 1, 1, 1, -10000, -10000);
3489 vector signed short Scons3 = (vector signed short)(-32768, 32767, -32768, 32767, -32768, 32767, -32768, 32767);
3490 vector unsigned short UScons1 = (vector unsigned short)(65532, 65533, 65534, 65535, 0, 1, 2, 3);
3491 vector unsigned short UScons2 = (vector unsigned short)(1, 1, 1, 1, 1, 1, 1, 1);
3492 vector unsigned short UScons3 = (vector unsigned short)(1, 2, 3, 4, 1, 2, 3, 4);
3493 vector signed int Icons1 = (vector signed int)(-4, -1, 1, 4);
3494 vector signed int Icons2 = (vector signed int)(1, 1, 1, 1);
3495 vector signed int Icons3 = (vector signed int)(0x80000000, 0x7FFFFFFF, 0x80000000, 0x7FFFFFFF);
3496 vector unsigned int UIcons1 = (vector unsigned int)(0xFFFFFFFE, 0xFFFFFFFF, 0, 1);
3497 vector unsigned int UIcons2 = (vector unsigned int)(1, 1, 1, 1);
3498 vector unsigned int UIcons3 = (vector unsigned int)(1, 2, 1, 2);
3500 #if defined TEST_FLOATS
3501 vector float Fcons1 = (vector float)(-1.5, 1.0, 0.5, -3.999);
3502 vector float Fcons2 = (vector float)(1.0, 1.0, 1.0, 1.0);
3503 vector float Fcons3 = (vector float)(100000000000.0, 1.0, -1.0, -1234567890.0);
3509 /* Variables to be allocated with calloc_vec (16 bytes aligned) */
3510 unsigned char *UCmem = (unsigned char*)calloc_vec( 1, sizeof(vector unsigned char) );
3511 signed char *Cmem = (signed char*)calloc_vec( 1, sizeof(vector signed char) );
3512 unsigned short *USmem = (unsigned short*)calloc_vec( 1, sizeof(vector unsigned short) );
3513 signed short *Smem = (signed short*)calloc_vec( 1, sizeof(vector signed short) );
3514 unsigned int *UImem = (unsigned int*)calloc_vec( 1, sizeof(vector unsigned int) );
3515 signed int *Imem = (signed int*)calloc_vec( 1, sizeof(vector signed int) );
3516 #if defined TEST_FLOATS
3517 float *Fmem = (float*)calloc_vec( 1, sizeof(vector float) );
3520 /* Function vec_pack */
3521 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
3523 Caux1.v = vec_pack( Scons1, Scons2 );
3526 for( i=0; i< 8; i++ )
3528 SHOunion1.ss = Saux1.e[i];
3529 if (Caux1.e[i] != SHOunion1.sc[1])
3531 SHOunion1.ss = Saux2.e[i];
3532 if (Caux1.e[i+8] != SHOunion1.sc[1])
3536 printf("Function vec_pack [type char] ===> Error\n");
3538 printf("Function vec_pack [type char] ===> OK\n");
3541 UCaux1.v = vec_pack( UScons1, UScons2 );
3544 for( i=0; i< 8; i++ )
3546 SHOunion1.ss = USaux1.e[i];
3547 if (UCaux1.e[i] != SHOunion1.uc[1])
3549 SHOunion1.ss = USaux2.e[i];
3550 if (UCaux1.e[i+8] != SHOunion1.uc[1])
3554 printf("Function vec_pack [type unsigned char] ===> Error\n");
3556 printf("Function vec_pack [type unsigned char] ===> OK\n");
3559 Saux1.v = vec_pack( Icons1, Icons2 );
3562 for( i=0; i< 4; i++ )
3564 INTunion1.si = Iaux1.e[i];
3565 if (Saux1.e[i] != INTunion1.ss[1])
3567 INTunion1.si = Iaux2.e[i];
3568 if (Saux1.e[i+4] != INTunion1.ss[1])
3572 printf("Function vec_pack [type short] ===> Error\n");
3574 printf("Function vec_pack [type short] ===> OK\n");
3577 USaux1.v = vec_pack( UIcons1, UIcons2 );
3580 for( i=0; i< 4; i++ )
3582 INTunion1.ui = UIaux1.e[i];
3583 if (USaux1.e[i] != INTunion1.us[1])
3585 INTunion1.ui = UIaux2.e[i];
3586 if (USaux1.e[i+4] != INTunion1.us[1])
3590 printf("Function vec_pack [type unsigned short] ===> Error\n");
3592 printf("Function vec_pack [type unsigned short] ===> OK\n");
3594 /* Function vec_packpx */
3595 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
3596 printf("Function vec_packpx [Vector Pack Pixel] not checked\n");
3598 /* Function vec_packs */
3599 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
3601 Caux1.v = vec_packs( Scons1, Scons2 );
3604 for( i=0; i< 8; i++ )
3608 else if (Saux1.e[i]<(-128))
3611 Caux = (signed char)Saux1.e[i];
3612 if (Caux1.e[i] != Caux)
3616 else if (Saux2.e[i]<(-128))
3619 Caux = (signed char)Saux2.e[i];
3620 if (Caux1.e[i+8] != Caux)
3624 printf("Function vec_packs [type char] ===> Error\n");
3626 printf("Function vec_packs [type char] ===> OK\n");
3629 UCaux1.v = vec_packs( UScons1, UScons2 );
3632 for( i=0; i< 8; i++ )
3634 if (USaux1.e[i]>255)
3637 UCaux = (unsigned char)USaux1.e[i];
3638 if (UCaux1.e[i] != UCaux)
3640 if (USaux2.e[i]>255)
3643 UCaux = (unsigned char)USaux2.e[i];
3644 if (UCaux1.e[i+8] != UCaux)
3648 printf("Function vec_packs [type unsigned char] ===> Error\n");
3650 printf("Function vec_packs [type unsigned char] ===> OK\n");
3653 Saux1.v = vec_packs( Icons1, Icons2 );
3656 for( i=0; i< 4; i++ )
3658 if (Iaux1.e[i]>32767)
3660 else if (Iaux1.e[i]<(-32768))
3663 Saux = (signed char)Iaux1.e[i];
3664 if (Saux1.e[i] != Saux)
3666 if (Iaux2.e[i]>32767)
3668 else if (Iaux2.e[i]<(-32768))
3671 Saux = (signed char)Iaux2.e[i];
3672 if (Saux1.e[i+4] != Saux)
3676 printf("Function vec_packs [type short] ===> Error\n");
3678 printf("Function vec_packs [type short] ===> OK\n");
3681 USaux1.v = vec_packs( UIcons1, UIcons2 );
3684 for( i=0; i< 4; i++ )
3686 if (UIaux1.e[i]>65535)
3689 USaux = (unsigned char)UIaux1.e[i];
3690 if (USaux1.e[i] != USaux)
3692 if (UIaux2.e[i]>65535)
3695 USaux = (unsigned char)UIaux2.e[i];
3696 if (USaux1.e[i+4] != USaux)
3700 printf("Function vec_packs [type unsigned short] ===> Error\n");
3702 printf("Function vec_packs [type unsigned short] ===> OK\n");
3704 /* Function vec_packsu */
3705 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
3707 UCaux1.v = vec_packsu( Scons1, Scons2 );
3710 for( i=0; i< 8; i++ )
3714 else if (Saux1.e[i]<0)
3717 UCaux = (unsigned char)Saux1.e[i];
3718 if (UCaux1.e[i] != UCaux)
3722 else if (Saux2.e[i]<0)
3725 UCaux = (unsigned char)Saux2.e[i];
3726 if (UCaux1.e[i+8] != UCaux)
3730 printf("Function vec_packsu [type char] ===> Error\n");
3732 printf("Function vec_packsu [type char] ===> OK\n");
3735 UCaux1.v = vec_packsu( UScons1, UScons2 );
3738 for( i=0; i< 8; i++ )
3740 if (USaux1.e[i]>255)
3743 UCaux = (unsigned char)USaux1.e[i];
3744 if (UCaux1.e[i] != UCaux)
3746 if (USaux2.e[i]>255)
3749 UCaux = (unsigned char)USaux2.e[i];
3750 if (UCaux1.e[i+8] != UCaux)
3754 printf("Function vec_packsu [type unsigned char] ===> Error\n");
3756 printf("Function vec_packsu [type unsigned char] ===> OK\n");
3759 USaux1.v = vec_packsu( Icons1, Icons2 );
3762 for( i=0; i< 4; i++ )
3764 if (Iaux1.e[i]>65535)
3766 else if (Iaux1.e[i]<0)
3769 USaux = (unsigned short)Iaux1.e[i];
3770 if (USaux1.e[i] != USaux)
3772 if (Iaux2.e[i]>65535)
3774 else if (Iaux2.e[i]<0)
3777 USaux = (unsigned short)Iaux2.e[i];
3778 if (USaux1.e[i+4] != USaux)
3782 printf("Function vec_packsu [type short] ===> Error\n");
3784 printf("Function vec_packsu [type short] ===> OK\n");
3787 USaux1.v = vec_packsu( UIcons1, UIcons2 );
3790 for( i=0; i< 4; i++ )
3792 if (UIaux1.e[i]>65535)
3795 USaux = (unsigned char)UIaux1.e[i];
3796 if (USaux1.e[i] != USaux)
3798 if (UIaux2.e[i]>65535)
3801 USaux = (unsigned char)UIaux2.e[i];
3802 if (USaux1.e[i+4] != USaux)
3806 printf("Function vec_packsu [type unsigned short] ===> Error\n");
3808 printf("Function vec_packsu [type unsigned short] ===> OK\n");
3810 /* Function vec_perm */
3811 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
3812 printf("Function vec_perm [Vector Permute] not checked\n");
3814 #if defined TEST_FLOATS
3815 /* Function vec_re */
3816 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
3818 Faux1.v = vec_re( Fcons1 );
3820 for( i=0; i< 4; i++ )
3822 Faux = 1/Faux2.e[i];
3824 Faux = (Faux - Faux1.e[i])/Faux;
3826 Faux = Faux - Faux1.e[i];
3827 if (Faux>(1.0/4096.0))
3831 printf("Function vec_re [type float] ===> Error\n");
3833 printf("Function vec_re [type float] ===> OK\n");
3836 /* Function vec_rl */
3837 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
3839 Caux1.v = vec_rl( Ccons1, UCcons3 );
3842 for( i=0; i< 16; i++ )
3845 UCvec1 = (unsigned char *)(&Caux2.e[i]);
3846 Caux = ((*UCvec1)>>(8-b)) | ((*UCvec1)<<b);
3847 if (Caux1.e[i] != Caux)
3851 printf("Function vec_rl [type char] ===> Error\n");
3853 printf("Function vec_rl [type char] ===> OK\n");
3856 UCaux1.v = vec_rl( UCcons1, UCcons3 );
3859 for( i=0; i< 16; i++ )
3862 UCaux = (UCaux2.e[i]>>(8-b)) | (UCaux2.e[i]<<b);
3863 if (UCaux1.e[i] != UCaux)
3867 printf("Function vec_rl [type unsigned char] ===> Error\n");
3869 printf("Function vec_rl [type unsigned char] ===> OK\n");
3872 Saux1.v = vec_rl( Scons1, UScons3 );
3875 for( i=0; i< 8; i++ )
3878 USvec1 = (unsigned short *)(&Saux2.e[i]);
3879 Saux = ((*USvec1)>>(16-b)) | ((*USvec1)<<b);
3880 if (Saux1.e[i] != Saux)
3884 printf("Function vec_rl [type short] ===> Error\n");
3886 printf("Function vec_rl [type short] ===> OK\n");
3889 USaux1.v = vec_rl( UScons1, UScons3 );
3892 for( i=0; i< 8; i++ )
3895 USaux = (USaux2.e[i]>>(16-b)) | (USaux2.e[i]<<b);
3896 if (USaux1.e[i] != USaux)
3900 printf("Function vec_rl [type unsigned short] ===> Error\n");
3902 printf("Function vec_rl [type unsigned short] ===> OK\n");
3905 Iaux1.v = vec_rl( Icons1, UIcons3 );
3908 for( i=0; i< 4; i++ )
3911 UIvec1 = (unsigned int *)(&Iaux2.e[i]);
3912 Iaux = ((*UIvec1)>>(32-b)) | ((*UIvec1)<<b);
3913 if (Iaux1.e[i] != Iaux)
3917 printf("Function vec_rl [type integer] ===> Error\n");
3919 printf("Function vec_rl [type integer] ===> OK\n");
3922 UIaux1.v = vec_rl( UIcons1, UIcons3 );
3925 for( i=0; i< 4; i++ )
3928 UIaux = (UIaux2.e[i]>>(32-b)) | (UIaux2.e[i]<<b);
3929 if (UIaux1.e[i] != UIaux)
3933 printf("Function vec_rl [type unsigned int] ===> Error\n");
3935 printf("Function vec_rl [type unsigned int] ===> OK\n");
3937 #if defined TEST_FLOATS
3938 /* Function vec_round */
3939 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
3941 Faux1.v = vec_round( Fcons1 );
3943 for( i=0; i< 4; i++ )
3945 Faux = floor(Faux2.e[i]);
3946 if ((Faux2.e[i]-Faux)>0.5)
3948 else if (((Faux2.e[i]-Faux)==0.5)&&(Iaux%2))
3950 if (Faux1.e[i] != Faux)
3954 printf("Function vec_round [type float] ===> Error\n");
3956 printf("Function vec_round [type float] ===> OK\n");
3959 #if defined TEST_FLOATS
3960 /* Function vec_rsqrte */
3961 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
3963 Faux1.v = vec_rsqrte( Fcons1 );
3965 for( i=0; i< 4; i++ )
3967 Faux = sqrtf(Faux2.e[i]);
3969 Faux = (Faux - Faux1.e[i])/Faux;
3971 Faux = Faux - Faux1.e[i];
3972 if (Faux>(1.0/4096.0))
3976 printf("Function vec_rsqrte [type float] ===> Error\n");
3978 printf("Function vec_rsqrte [type float] ===> OK\n");
3981 /* Function vec_sel */
3982 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
3984 Caux1.v = vec_sel( Ccons1, Ccons2, UCcons1 );
3988 for( i=0; i< 16; i++ )
3990 Caux = (Caux2.e[i] & (~UCaux1.e[i])) | (Caux3.e[i] & UCaux1.e[i]);
3991 if (Caux1.e[i] != Caux)
3995 printf("Function vec_sel [type char] ===> Error\n");
3997 printf("Function vec_sel [type char] ===> OK\n");
4000 UCaux1.v = vec_sel( UCcons1, UCcons2, UCcons3 );
4004 for( i=0; i< 16; i++ )
4006 UCaux = (UCaux2.e[i] & (~UCaux4.e[i])) | (UCaux3.e[i] & UCaux4.e[i]);
4007 if (UCaux1.e[i] != UCaux)
4011 printf("Function vec_sel [type unsigned char] ===> Error\n");
4013 printf("Function vec_sel [type unsigned char] ===> OK\n");
4016 Saux1.v = vec_sel( Scons1, Scons2, UScons1 );
4020 for( i=0; i< 8; i++ )
4022 Saux = (Saux2.e[i] & (~USaux1.e[i])) | (Saux3.e[i] & USaux1.e[i]);
4023 if (Saux1.e[i] != Saux)
4027 printf("Function vec_sel [type short] ===> Error\n");
4029 printf("Function vec_sel [type short] ===> OK\n");
4032 USaux1.v = vec_sel( UScons1, UScons2, UScons3 );
4036 for( i=0; i< 8; i++ )
4038 USaux = (USaux2.e[i] & (~USaux4.e[i])) | (USaux3.e[i] & USaux4.e[i]);
4039 if (USaux1.e[i] != USaux)
4043 printf("Function vec_sel [type unsigned short] ===> Error\n");
4045 printf("Function vec_sel [type unsigned short] ===> OK\n");
4048 Iaux1.v = vec_sel( Icons1, Icons2, UIcons1 );
4052 for( i=0; i< 4; i++ )
4054 Iaux = (Iaux2.e[i] & (~UIaux1.e[i])) | (Iaux3.e[i] & UIaux1.e[i]);
4055 if (Iaux1.e[i] != Iaux)
4059 printf("Function vec_sel [type integer] ===> Error\n");
4061 printf("Function vec_sel [type integer] ===> OK\n");
4064 UIaux1.v = vec_sel( UIcons1, UIcons2, UIcons3 );
4068 for( i=0; i< 4; i++ )
4070 UIaux = (UIaux2.e[i] & (~UIaux4.e[i])) | (UIaux3.e[i] & UIaux4.e[i]);
4071 if (UIaux1.e[i] != UIaux)
4075 printf("Function vec_sel [type unsigned int] ===> Error\n");
4077 printf("Function vec_sel [type unsigned int] ===> OK\n");
4079 #if defined TEST_FLOATS
4081 Faux1.v = vec_sel( Fcons1, Fcons2, UIcons1 );
4085 for( i=0; i< 4; i++ )
4089 Iaux = (Ivec1 & (~UIaux1.e[i])) | (Ivec2 & UIaux1.e[i]);
4091 if ((Ivec1) != Iaux)
4095 printf("Function vec_sel [type float] ===> Error\n");
4097 printf("Function vec_sel [type float] ===> OK\n");
4100 /* Function vec_sl */
4101 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
4103 Caux1.v = vec_sl( Ccons1, UCcons3 );
4106 for( i=0; i< 16; i++ )
4108 b = UCaux1.e[i]%(128/16);
4109 Caux = Caux2.e[i] << b;
4110 if (Caux1.e[i] != Caux)
4114 printf("Function vec_sl [type char] ===> Error\n");
4116 printf("Function vec_sl [type char] ===> OK\n");
4119 UCaux1.v = vec_sl( UCcons1, UCcons3 );
4122 for( i=0; i< 16; i++ )
4124 b = UCaux3.e[i]%(128/16);
4125 UCaux = UCaux2.e[i] << b;
4126 if (UCaux1.e[i] != UCaux)
4130 printf("Function vec_sl [type unsigned char] ===> Error\n");
4132 printf("Function vec_sl [type unsigned char] ===> OK\n");
4135 Saux1.v = vec_sl( Scons1, UScons3 );
4138 for( i=0; i< 8; i++ )
4140 b = USaux1.e[i]%(128/8);
4141 Saux = Saux2.e[i] << b;
4142 if (Saux1.e[i] != Saux)
4146 printf("Function vec_sl [type short] ===> Error\n");
4148 printf("Function vec_sl [type short] ===> OK\n");
4151 USaux1.v = vec_sl( UScons1, UScons3 );
4154 for( i=0; i< 8; i++ )
4156 b = USaux3.e[i]%(128/8);
4157 USaux = USaux2.e[i] << b;
4158 if (USaux1.e[i] != USaux)
4162 printf("Function vec_sl [type unsigned short] ===> Error\n");
4164 printf("Function vec_sl [type unsigned short] ===> OK\n");
4167 Iaux1.v = vec_sl( Icons1, UIcons3 );
4170 for( i=0; i< 4; i++ )
4172 b = UIaux1.e[i]%(128/4);
4173 Iaux = Iaux2.e[i] << b;
4174 if (Iaux1.e[i] != Iaux)
4178 printf("Function vec_sl [type int] ===> Error\n");
4180 printf("Function vec_sl [type int] ===> OK\n");
4183 UIaux1.v = vec_sl( UIcons1, UIcons3 );
4186 for( i=0; i< 4; i++ )
4188 b = UIaux3.e[i]%(128/4);
4189 UIaux = UIaux2.e[i] << b;
4190 if (UIaux1.e[i] != UIaux)
4194 printf("Function vec_sl [type unsigned integer] ===> Error\n");
4196 printf("Function vec_sl [type unsigned integer] ===> OK\n");
4198 /* Function vec_sld */
4199 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
4202 Caux1.v = vec_sld( Ccons1, Ccons2, 3 );
4205 for( i=0; i< 16; i++ )
4209 if (Caux1.e[i] != Caux2.e[i+b])
4214 if (Caux1.e[i] != Caux3.e[i+b-16])
4219 printf("Function vec_sld [type char] ===> Error\n");
4221 printf("Function vec_sld [type char] ===> OK\n");
4225 UCaux1.v = vec_sld( UCcons1, UCcons2, 3 );
4228 for( i=0; i< 16; i++ )
4232 if (UCaux1.e[i] != UCaux2.e[i+b])
4237 if (UCaux1.e[i] != UCaux3.e[i+b-16])
4242 printf("Function vec_sld [type unsigned char] ===> Error\n");
4244 printf("Function vec_sld [type unsigned char] ===> OK\n");
4248 Saux1.v = vec_sld( Scons1, Scons2, 3 );
4251 for( i=0; i< 16; i++ )
4253 SHOunion1.ss = Saux1.e[i/2];
4255 SHOunion2.ss = Saux2.e[(i+b)/2];
4257 SHOunion2.ss = Saux3.e[(i+b-16)/2];
4258 if (SHOunion1.sc[i%2] != SHOunion2.sc[(i+b)%2])
4262 printf("Function vec_sld [type short] ===> Error\n");
4264 printf("Function vec_sld [type short] ===> OK\n");
4268 USaux1.v = vec_sld( UScons1, UScons2, 3 );
4271 for( i=0; i< 16; i++ )
4273 SHOunion1.us = USaux1.e[i/2];
4275 SHOunion2.us = USaux2.e[(i+b)/2];
4277 SHOunion2.us = USaux3.e[(i+b-16)/2];
4278 if (SHOunion1.uc[i%2] != SHOunion2.uc[(i+b)%2])
4282 printf("Function vec_sld [type unsigned short] ===> Error\n");
4284 printf("Function vec_sld [type unsigned short] ===> OK\n");
4288 Iaux1.v = vec_sld( Icons1, Icons2, 3 );
4291 for( i=0; i< 16; i++ )
4293 INTunion1.si = Iaux1.e[i/4];
4295 INTunion2.si = Iaux2.e[(i+b)/4];
4297 INTunion2.si = Iaux3.e[(i+b-16)/4];
4298 if (INTunion1.sc[i%4] != INTunion2.sc[(i+b)%4])
4302 printf("Function vec_sld [type integer] ===> Error\n");
4304 printf("Function vec_sld [type integer] ===> OK\n");
4308 UIaux1.v = vec_sld( UIcons1, UIcons2, 3 );
4311 for( i=0; i< 16; i++ )
4313 INTunion1.ui = UIaux1.e[i/4];
4315 INTunion2.ui = UIaux2.e[(i+b)/4];
4317 INTunion2.ui = UIaux3.e[(i+b-16)/4];
4318 if (INTunion1.uc[i%4] != INTunion2.uc[(i+b)%4])
4322 printf("Function vec_sld [type unsigned int] ===> Error\n");
4324 printf("Function vec_sld [type unsigned int] ===> OK\n");
4326 #if defined TEST_FLOATS
4329 Faux1.v = vec_sld( Fcons1, Fcons2, 3 );
4332 for( i=0; i< 16; i++ )
4334 INTunion1.f = Faux1.e[i/4];
4336 INTunion2.f = Faux2.e[(i+b)/4];
4338 INTunion2.f = Faux3.e[(i+b-16)/4];
4339 if (INTunion1.sc[i%4] != INTunion2.sc[(i+b)%4])
4343 printf("Function vec_sld [type float] ===> Error\n");
4345 printf("Function vec_sld [type float] ===> OK\n");
4348 /* Function vec_sll */
4349 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
4351 Caux1.v = vec_sll( Ccons1, UCcons2 );
4354 b = UCaux1.e[15] & 0x7;
4355 for( i=0; i< 15; i++ )
4356 if ((UCaux1.e[i] & 0x7)!=b)
4360 printf("The three low-order bits of all byte elements in b must be the same\n");
4361 printf("otherwise the value into d is undefined\n");
4365 for( i=0; i< 16; i++ )
4367 UCvec1 = (unsigned char *)(&Caux2.e[i]);
4368 Caux = UCvec1[0]<<b;
4370 Caux = Caux | (UCvec1[1]>>(8-b));
4371 if (Caux != Caux1.e[i])
4375 printf("Function vec_sll [type char] ===> Error\n");
4377 printf("Function vec_sll [type char] ===> OK\n");
4380 UCaux1.v = vec_sll( UCcons1, UCcons2 );
4383 b = UCaux3.e[15] & 0x7;
4384 for( i=0; i< 15; i++ )
4385 if ((UCaux3.e[i] & 0x7)!=b)
4389 printf("The three low-order bits of all byte elements in b must be the same\n");
4390 printf("otherwise the value into d is undefined\n");
4394 for( i=0; i< 16; i++ )
4396 UCvec1 = (unsigned char *)(&UCaux2.e[i]);
4397 UCaux = UCvec1[0]<<b;
4399 UCaux = UCaux | (UCvec1[1]>>(8-b));
4400 if (UCaux != UCaux1.e[i])
4404 printf("Function vec_sll [type unsigned char] ===> Error\n");
4406 printf("Function vec_sll [type unsigned char] ===> OK\n");
4410 Saux1.v = vec_sll( Scons1, UCcons2 );
4413 b = UCaux1.e[15] & 0x7;
4414 for( i=0; i< 15; i++ )
4415 if ((UCaux1.e[i] & 0x7)!=b)
4419 printf("The three low-order bits of all byte elements in b must be the same\n");
4420 printf("otherwise the value into d is undefined\n");
4424 for( i=0; i< 8; i++ )
4426 USvec1 = (unsigned short *)(&Saux2.e[i]);
4427 Saux = USvec1[0]<<b;
4429 Saux = Saux | (USvec1[1]>>(16-b));
4430 if (Saux != Saux1.e[i])
4434 printf("Function vec_sll [type short] ===> Error\n");
4436 printf("Function vec_sll [type short] ===> OK\n");
4439 USaux1.v = vec_sll( UScons1, UCcons2 );
4442 b = UCaux1.e[15] & 0x7;
4443 for( i=0; i< 15; i++ )
4444 if ((UCaux1.e[i] & 0x7)!=b)
4448 printf("The three low-order bits of all byte elements in b must be the same\n");
4449 printf("otherwise the value into d is undefined\n");
4453 for( i=0; i< 8; i++ )
4455 USvec1 = (unsigned short *)(&USaux2.e[i]);
4456 USaux = USvec1[0]<<b;
4458 USaux = USaux | (USvec1[1]>>(16-b));
4459 if (USaux != USaux1.e[i])
4463 printf("Function vec_sll [type unsigned char] ===> Error\n");
4465 printf("Function vec_sll [type unsigned char] ===> OK\n");
4469 Iaux1.v = vec_sll( Icons1, UCcons2 );
4472 b = UCaux1.e[15] & 0x7;
4473 for( i=0; i< 15; i++ )
4474 if ((UCaux1.e[i] & 0x7)!=b)
4478 printf("The three low-order bits of all byte elements in b must be the same\n");
4479 printf("otherwise the value into d is undefined\n");
4483 for( i=0; i< 4; i++ )
4485 UIvec1 = (unsigned int *)(&Iaux2.e[i]);
4486 Iaux = UIvec1[0]<<b;
4488 Iaux = Iaux | (UIvec1[1]>>(32-b));
4489 if (Iaux != Iaux1.e[i])
4493 printf("Function vec_sll [type integer] ===> Error\n");
4495 printf("Function vec_sll [type integer] ===> OK\n");
4498 UIaux1.v = vec_sll( UIcons1, UCcons2 );
4501 b = UCaux1.e[15] & 0x7;
4502 for( i=0; i< 15; i++ )
4503 if ((UCaux1.e[i] & 0x7)!=b)
4507 printf("The three low-order bits of all byte elements in b must be the same\n");
4508 printf("otherwise the value into d is undefined\n");
4512 for( i=0; i< 4; i++ )
4514 UIvec1 = (unsigned int *)(&UIaux2.e[i]);
4515 UIaux = UIvec1[0]<<b;
4517 UIaux = UIaux | (UIvec1[1]>>(32-b));
4518 if (UIaux != UIaux1.e[i])
4522 printf("Function vec_sll [type unsigned int] ===> Error\n");
4524 printf("Function vec_sll [type unsigned int] ===> OK\n");
4527 /* Function vec_slo */
4528 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
4530 Caux1.v = vec_slo( Ccons3, Ccons1 );
4533 b = (Caux3.e[15] & 0x78) >> 3;
4534 for( i=0; i< 16; i++ )
4538 if (Caux1.e[i] != Caux2.e[i+b])
4543 if (Caux1.e[i] != 0)
4548 printf("Function vec_slo [type char] ===> Error\n");
4550 printf("Function vec_slo [type char] ===> OK\n");
4553 UCaux1.v = vec_slo( UCcons3, UCcons1 );
4556 b = (UCaux3.e[15] & 0x78) >> 3;
4557 for( i=0; i< 16; i++ )
4561 if (UCaux1.e[i] != UCaux2.e[i+b])
4566 if (UCaux1.e[i] != 0)
4571 printf("Function vec_slo [type unsigned char] ===> Error\n");
4573 printf("Function vec_slo [type unsigned char] ===> OK\n");
4576 Saux1.v = vec_slo( Scons3, UCcons1 );
4579 b = (UCaux3.e[15] & 0x78) >> 3;
4580 for( i=0; i< 16; i++ )
4582 SHOunion1.ss = Saux1.e[i/2];
4584 SHOunion2.ss = Saux2.e[(i+b)/2];
4587 if (SHOunion1.sc[i%2] != SHOunion2.sc[(i+b)%2])
4591 printf("Function vec_slo [type short] ===> Error\n");
4593 printf("Function vec_slo [type short] ===> OK\n");
4596 USaux1.v = vec_slo( UScons3, UCcons1 );
4599 b = (UCaux3.e[15] & 0x78) >> 3;
4600 for( i=0; i< 16; i++ )
4602 SHOunion1.us = USaux1.e[i/2];
4604 SHOunion2.us = USaux2.e[(i+b)/2];
4607 if (SHOunion1.uc[i%2] != SHOunion2.uc[(i+b)%2])
4611 printf("Function vec_slo [type unsigned short] ===> Error\n");
4613 printf("Function vec_slo [type unsigned short] ===> OK\n");
4616 Iaux1.v = vec_slo( Icons3, UCcons1 );
4619 b = (UCaux3.e[15] & 0x78) >> 3;
4620 for( i=0; i< 16; i++ )
4622 INTunion1.si = Iaux1.e[i/4];
4624 INTunion2.si = Iaux2.e[(i+b)/4];
4627 if (INTunion1.sc[i%4] != INTunion2.sc[(i+b)%4])
4631 printf("Function vec_slo [type integer] ===> Error\n");
4633 printf("Function vec_slo [type integer] ===> OK\n");
4636 UIaux1.v = vec_slo( UIcons3, UCcons1 );
4639 b = (UCaux3.e[15] & 0x78) >> 3;
4640 for( i=0; i< 16; i++ )
4642 INTunion1.ui = UIaux1.e[i/4];
4644 INTunion2.ui = UIaux2.e[(i+b)/4];
4647 if (INTunion1.uc[i%4] != INTunion2.uc[(i+b)%4])
4651 printf("Function vec_slo [type unsigned int] ===> Error\n");
4653 printf("Function vec_slo [type unsigned int] ===> OK\n");
4655 #if defined TEST_FLOATS
4657 Faux1.v = vec_slo( Fcons3, UCcons1 );
4660 b = (UCaux3.e[15] & 0x78) >> 3;
4661 for( i=0; i< 16; i++ )
4663 INTunion1.f = Faux1.e[i/4];
4665 INTunion2.f = Faux2.e[(i+b)/4];
4668 if (INTunion1.sc[i%4] != INTunion2.sc[(i+b)%4])
4672 printf("Function vec_slo [type float] ===> Error\n");
4674 printf("Function vec_slo [type float] ===> OK\n");
4677 /* Function vec_splat */
4678 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
4681 Caux1.v = vec_splat( Ccons1, 3 );
4683 for( i=0; i< 16; i++ )
4684 if (Caux1.e[i] != Caux2.e[b])
4687 printf("Function vec_splat [type char] ===> Error\n");
4689 printf("Function vec_splat [type char] ===> OK\n");
4693 UCaux1.v = vec_splat( UCcons1, 3 );
4695 for( i=0; i< 16; i++ )
4696 if (UCaux1.e[i] != UCaux2.e[b])
4699 printf("Function vec_splat [type unsigned char] ===> Error\n");
4701 printf("Function vec_splat [type unsigned char] ===> OK\n");
4705 Saux1.v = vec_splat( Scons1, 3 );
4707 for( i=0; i< 8; i++ )
4708 if (Saux1.e[i] != Saux2.e[b])
4711 printf("Function vec_splat [type short] ===> Error\n");
4713 printf("Function vec_splat [type short] ===> OK\n");
4717 USaux1.v = vec_splat( UScons1, 3 );
4719 for( i=0; i< 8; i++ )
4720 if (USaux1.e[i] != USaux2.e[b])
4723 printf("Function vec_splat [type unsigned short] ===> Error\n");
4725 printf("Function vec_splat [type unsigned short] ===> OK\n");
4729 Iaux1.v = vec_splat( Icons1, 3 );
4731 for( i=0; i< 4; i++ )
4732 if (Iaux1.e[i] != Iaux2.e[b])
4735 printf("Function vec_splat [type integer] ===> Error\n");
4737 printf("Function vec_splat [type integer] ===> OK\n");
4741 UIaux1.v = vec_splat( UIcons1, 3 );
4743 for( i=0; i< 4; i++ )
4744 if (UIaux1.e[i] != UIaux2.e[b])
4747 printf("Function vec_splat [type unsigned int] ===> Error\n");
4749 printf("Function vec_splat [type unsigned int] ===> OK\n");
4751 #if defined TEST_FLOATS
4754 Faux1.v = vec_splat( Fcons1, 3 );
4756 for( i=0; i< 4; i++ )
4757 if (Faux1.e[i] != Faux2.e[b])
4760 printf("Function vec_splat [type float] ===> Error\n");
4762 printf("Function vec_splat [type float] ===> OK\n");
4765 /* Function vec_splat_s8 */
4766 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
4769 Caux1.v = vec_splat_s8( 15 );
4770 for( i=0; i< 16; i++ )
4771 if (Caux1.e[i] != Caux)
4774 printf("Function vec_splat_s8 [type char] ===> Error\n");
4776 printf("Function vec_splat_s8 [type char] ===> OK\n");
4778 /* Function vec_splat_s16 */
4779 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
4782 Saux1.v = vec_splat_s16( 15 );
4783 for( i=0; i< 8; i++ )
4784 if (Saux1.e[i] != Saux)
4787 printf("Function vec_splat_s16 [type short] ===> Error\n");
4789 printf("Function vec_splat_s16 [type short] ===> OK\n");
4791 /* Function vec_splat_s32 */
4792 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
4795 Iaux1.v = vec_splat_s32( 15 );
4796 for( i=0; i< 4; i++ )
4797 if (Iaux1.e[i] != Iaux)
4800 printf("Function vec_splat_s32 [type integer] ===> Error\n");
4802 printf("Function vec_splat_s32 [type integer] ===> OK\n");
4804 /* Function vec_splat_u8 */
4805 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
4808 UCaux1.v = vec_splat_u8( 15 );
4809 for( i=0; i< 16; i++ )
4810 if (UCaux1.e[i] != UCaux)
4813 printf("Function vec_splat_u8 [type unsig. char] ===> Error\n");
4815 printf("Function vec_splat_u8 [type unsig. char] ===> OK\n");
4817 /* Function vec_splat_u16 */
4818 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
4821 USaux1.v = vec_splat_u16( 15 );
4822 for( i=0; i< 8; i++ )
4823 if (USaux1.e[i] != Saux)
4826 printf("Function vec_splat_u16 [type unsg. short] ===> Error\n");
4828 printf("Function vec_splat_u16 [type unsg. short] ===> OK\n");
4830 /* Function vec_splat_u32 */
4831 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
4834 UIaux1.v = vec_splat_u32( 15 );
4835 for( i=0; i< 4; i++ )
4836 if (UIaux1.e[i] != UIaux)
4839 printf("Function vec_splat_u32 [type unsig. int] ===> Error\n");
4841 printf("Function vec_splat_u32 [type unsig. int] ===> OK\n");
4843 /* Function vec_sr */
4844 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
4846 Caux1.v = vec_sr( Ccons3, UCcons3 );
4849 for( i=0; i< 16; i++ )
4851 SHOunion1.sc[0] = Caux2.e[i];
4852 SHOunion1.uc[0] = SHOunion1.uc[0] >> (UCaux3.e[i]%8);
4853 if (Caux1.e[i] != SHOunion1.sc[0])
4857 printf("Function vec_sr [type char] ===> Error\n");
4859 printf("Function vec_sr [type char] ===> OK\n");
4862 UCaux1.v = vec_sr( UCcons1, UCcons3 );
4865 for( i=0; i< 16; i++ )
4867 UCaux = UCaux2.e[i] >> (UCaux3.e[i]%8);
4868 if (UCaux1.e[i] != UCaux)
4872 printf("Function vec_sr [type unsigned char] ===> Error\n");
4874 printf("Function vec_sr [type unsigned char] ===> OK\n");
4877 Saux1.v = vec_sr( Scons3, UScons3 );
4880 for( i=0; i< 8; i++ )
4882 SHOunion1.ss = Saux2.e[i];
4883 SHOunion1.us = SHOunion1.us >> (USaux3.e[i]%16);
4884 if (Saux1.e[i] != SHOunion1.ss)
4888 printf("Function vec_sr [type short] ===> Error\n");
4890 printf("Function vec_sr [type short] ===> OK\n");
4893 USaux1.v = vec_sr( UScons1, UScons3 );
4896 for( i=0; i< 8; i++ )
4898 USaux = USaux2.e[i] >> (USaux3.e[i]%16);
4899 if (USaux1.e[i] != USaux)
4903 printf("Function vec_sr [type unsigned short] ===> Error\n");
4905 printf("Function vec_sr [type unsigned short] ===> OK\n");
4908 Iaux1.v = vec_sr( Icons3, UIcons3 );
4911 for( i=0; i< 4; i++ )
4913 INTunion1.si = Iaux2.e[i];
4914 INTunion1.ui = INTunion1.ui >> (UIaux3.e[i]%32);
4915 if (Iaux1.e[i] != INTunion1.si)
4919 printf("Function vec_sr [type integer] ===> Error\n");
4921 printf("Function vec_sr [type integer] ===> OK\n");
4924 UIaux1.v = vec_sr( UIcons1, UIcons3 );
4927 for( i=0; i< 4; i++ )
4929 UIaux = UIaux2.e[i] >> (UIaux3.e[i]%32);
4930 if (UIaux1.e[i] != UIaux)
4934 printf("Function vec_sr [type unsigned int] ===> Error\n");
4936 printf("Function vec_sr [type unsigned int] ===> OK\n");
4938 /* Function vec_sra */
4939 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
4941 Caux1.v = vec_sra( Ccons3, UCcons3 );
4944 for( i=0; i< 16; i++ )
4946 Caux = Caux2.e[i] >> (UCaux3.e[i]%8);
4947 if (Caux1.e[i] != Caux)
4951 printf("Function vec_sra [type char] ===> Error\n");
4953 printf("Function vec_sra [type char] ===> OK\n");
4956 UCaux1.v = vec_sra( UCcons1, UCcons3 );
4959 for( i=0; i< 16; i++ )
4961 INTunion1.uc[0] = UCaux2.e[i];
4962 INTunion1.sc[0] = INTunion1.sc[0] >> (UCaux3.e[i]%8);
4963 if (UCaux1.e[i] != INTunion1.uc[0])
4967 printf("Function vec_sra [type unsigned char] ===> Error\n");
4969 printf("Function vec_sra [type unsigned char] ===> OK\n");
4972 Saux1.v = vec_sra( Scons3, UScons3 );
4975 for( i=0; i< 8; i++ )
4977 Saux = Saux2.e[i] >> (USaux3.e[i]%16);
4978 if (Saux1.e[i] != Saux)
4982 printf("Function vec_sra [type short] ===> Error\n");
4984 printf("Function vec_sra [type short] ===> OK\n");
4987 USaux1.v = vec_sra( UScons1, UScons3 );
4990 for( i=0; i< 8; i++ )
4992 INTunion1.us[0] = USaux2.e[i];
4993 INTunion1.ss[0] = INTunion1.ss[0] >> (USaux3.e[i]%16);
4994 if (USaux1.e[i] != INTunion1.us[0])
4998 printf("Function vec_sra [type unsigned short] ===> Error\n");
5000 printf("Function vec_sra [type unsigned short] ===> OK\n");
5003 Iaux1.v = vec_sra( Icons3, UIcons3 );
5006 for( i=0; i< 4; i++ )
5008 Iaux = Iaux2.e[i] >> (UIaux3.e[i]%32);
5009 if (Iaux1.e[i] != Iaux)
5013 printf("Function vec_sra [type integer] ===> Error\n");
5015 printf("Function vec_sra [type integer] ===> OK\n");
5018 UIaux1.v = vec_sra( UIcons1, UIcons3 );
5021 for( i=0; i< 4; i++ )
5023 INTunion1.ui = UIaux2.e[i];
5024 INTunion1.si = INTunion1.si >> (UIaux3.e[i]%32);
5025 if (UIaux1.e[i] != INTunion1.ui)
5029 printf("Function vec_sra [type unsigned int] ===> Error\n");
5031 printf("Function vec_sra [type unsigned int] ===> OK\n");
5033 /* Function vec_srl */
5034 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
5036 Caux1.v = vec_srl( Ccons1, UCcons2 );
5039 b = UCaux3.e[15] & 0x7;
5040 for( i=0; i< 15; i++ )
5041 if ((UCaux3.e[i] & 0x7)!=b)
5045 printf("The three low-order bits of all byte elements in b must be the same\n");
5046 printf("otherwise the value into d is undefined\n");
5051 for( i=0; i< 16; i++ )
5053 INTunion1.sc[0] = Caux2.e[i];
5054 Caux = Caux | (INTunion1.uc[0]>>b);
5055 if (Caux != Caux1.e[i])
5057 Caux = INTunion1.uc[0]<<(8-b);
5060 printf("Function vec_srl [type char] ===> Error\n");
5062 printf("Function vec_srl [type char] ===> OK\n");
5066 UCaux1.v = vec_srl( UCcons1, UCcons2 );
5069 b = UCaux3.e[15] & 0x7;
5070 for( i=0; i< 15; i++ )
5071 if ((UCaux3.e[i] & 0x7)!=b)
5075 printf("The three low-order bits of all byte elements in b must be the same\n");
5076 printf("otherwise the value into d is undefined\n");
5081 for( i=0; i< 16; i++ )
5083 UCaux = UCaux | (UCaux2.e[i]>>b);
5084 if (UCaux != UCaux1.e[i])
5086 UCaux = UCaux2.e[i]<<(8-b);
5089 printf("Function vec_srl [type unsigned char] ===> Error\n");
5091 printf("Function vec_srl [type unsigned char] ===> OK\n");
5095 Saux1.v = vec_srl( Scons1, UCcons2 );
5098 b = UCaux3.e[15] & 0x7;
5099 for( i=0; i< 15; i++ )
5100 if ((UCaux3.e[i] & 0x7)!=b)
5104 printf("The three low-order bits of all byte elements in b must be the same\n");
5105 printf("otherwise the value into d is undefined\n");
5110 for( i=0; i< 8; i++ )
5112 INTunion1.ss[0] = Saux2.e[i];
5113 Saux = Saux | (INTunion1.us[0]>>b);
5114 if (Saux != Saux1.e[i])
5116 Saux = INTunion1.us[0]<<(16-b);
5119 printf("Function vec_srl [type short] ===> Error\n");
5121 printf("Function vec_srl [type short] ===> OK\n");
5125 USaux1.v = vec_srl( UScons1, UCcons2 );
5128 b = UCaux3.e[15] & 0x7;
5129 for( i=0; i< 15; i++ )
5130 if ((UCaux3.e[i] & 0x7)!=b)
5134 printf("The three low-order bits of all byte elements in b must be the same\n");
5135 printf("otherwise the value into d is undefined\n");
5140 for( i=0; i< 8; i++ )
5142 USaux = USaux | (USaux2.e[i]>>b);
5143 if (USaux != USaux1.e[i])
5145 USaux = USaux2.e[i]<<(16-b);
5148 printf("Function vec_srl [type unsigned short] ===> Error\n");
5150 printf("Function vec_srl [type unsigned short] ===> OK\n");
5154 Iaux1.v = vec_srl( Icons1, UCcons2 );
5157 b = UCaux3.e[15] & 0x7;
5158 for( i=0; i< 15; i++ )
5159 if ((UCaux3.e[i] & 0x7)!=b)
5163 printf("The three low-order bits of all byte elements in b must be the same\n");
5164 printf("otherwise the value into d is undefined\n");
5169 for( i=0; i< 4; i++ )
5171 INTunion1.si = Iaux2.e[i];
5172 Iaux = Iaux | (INTunion1.ui>>b);
5173 if (Iaux != Iaux1.e[i])
5175 Iaux = INTunion1.ui<<(32-b);
5178 printf("Function vec_srl [type integer] ===> Error\n");
5180 printf("Function vec_srl [type integer] ===> OK\n");
5184 UIaux1.v = vec_srl( UIcons1, UCcons2 );
5187 b = UCaux3.e[15] & 0x7;
5188 for( i=0; i< 15; i++ )
5189 if ((UCaux3.e[i] & 0x7)!=b)
5193 printf("The three low-order bits of all byte elements in b must be the same\n");
5194 printf("otherwise the value into d is undefined\n");
5199 for( i=0; i< 4; i++ )
5201 UIaux = UIaux | (UIaux2.e[i]>>b);
5202 if (UIaux != UIaux1.e[i])
5204 UIaux = UIaux2.e[i]<<(32-b);
5207 printf("Function vec_srl [type unsigned int] ===> Error\n");
5209 printf("Function vec_srl [type unsigned int] ===> OK\n");
5212 /* Function vec_sro */
5213 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
5215 Caux1.v = vec_sro( Ccons3, Ccons1 );
5218 b = (Caux3.e[15] & 0x78) >>3;
5219 for( i=0; i< 16; i++ )
5223 if (Caux1.e[i] != Caux2.e[i-b])
5228 if (Caux1.e[i] != 0)
5233 printf("Function vec_sro [type char] ===> Error\n");
5235 printf("Function vec_sro [type char] ===> OK\n");
5238 UCaux1.v = vec_sro( UCcons3, UCcons1 );
5241 b = (UCaux3.e[15] & 0x78) >>3;
5242 for( i=0; i< 16; i++ )
5246 if (UCaux1.e[i] != UCaux2.e[i-b])
5251 if (UCaux1.e[i] != 0)
5256 printf("Function vec_sro [type unsigned char] ===> Error\n");
5258 printf("Function vec_sro [type unsigned char] ===> OK\n");
5261 Saux1.v = vec_sro( Scons3, Ccons1 );
5264 b = (Caux3.e[15] & 0x78) >>3;
5265 for( i=0; i< 16; i++ )
5267 SHOunion1.ss = Saux1.e[i/2];
5270 SHOunion2.ss = Saux2.e[(i-b)/2];
5271 if (SHOunion1.sc[i%2] != SHOunion2.sc[(i-b)%2])
5276 if (SHOunion1.sc[i%2] != 0)
5281 printf("Function vec_sro [type short] ===> Error\n");
5283 printf("Function vec_sro [type short] ===> OK\n");
5286 USaux1.v = vec_sro( UScons3, UCcons1 );
5289 b = (UCaux3.e[15] & 0x78) >>3;
5290 for( i=0; i< 16; i++ )
5292 SHOunion1.us = USaux1.e[i/2];
5295 SHOunion2.us = USaux2.e[(i-b)/2];
5296 if (SHOunion1.uc[i%2] != SHOunion2.uc[(i-b)%2])
5301 if (SHOunion1.uc[i%2] != 0)
5306 printf("Function vec_sro [type unsigned short] ===> Error\n");
5308 printf("Function vec_sro [type unsigned short] ===> OK\n");
5311 Iaux1.v = vec_sro( Icons3, Ccons1 );
5314 b = (Caux3.e[15] & 0x78) >>3;
5315 for( i=0; i< 16; i++ )
5317 INTunion1.si = Iaux1.e[i/4];
5320 INTunion2.si = Iaux2.e[(i-b)/4];
5321 if (INTunion1.sc[i%4] != INTunion2.sc[(i-b)%4])
5326 if (INTunion1.sc[i%4] != 0)
5331 printf("Function vec_sro [type integer] ===> Error\n");
5333 printf("Function vec_sro [type integer] ===> OK\n");
5336 UIaux1.v = vec_sro( UIcons3, UCcons1 );
5339 b = (UCaux3.e[15] & 0x78) >>3;
5340 for( i=0; i< 16; i++ )
5342 INTunion1.ui = UIaux1.e[i/4];
5345 INTunion2.ui = UIaux2.e[(i-b)/4];
5346 if (INTunion1.uc[i%4] != INTunion2.sc[(i-b)%4])
5351 if (INTunion1.uc[i%4] != 0)
5356 printf("Function vec_sro [type unsigned int] ===> Error\n");
5358 printf("Function vec_sro [type unsigned int] ===> OK\n");
5360 #if defined TEST_FLOATS
5362 Faux1.v = vec_sro( Fcons3, Ccons1 );
5365 b = (Caux3.e[15] & 0x78) >>3;
5366 for( i=0; i< 16; i++ )
5368 INTunion1.f = Faux1.e[i/4];
5371 INTunion2.f = Faux2.e[(i-b)/4];
5372 if (INTunion1.sc[i%4] != INTunion2.sc[(i-b)%4])
5377 if (INTunion1.sc[i%4] != 0)
5382 printf("Function vec_sro [type float] ===> Error\n");
5384 printf("Function vec_sro [type float] ===> OK\n");
5387 /* Function vec_st */
5388 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
5391 vec_st( UCaux1.v, 0, UCmem );
5393 for ( i=0; i< 16; i++ )
5395 Iaux = Iaux && (UCaux1.e[i]==UCmem[i]);
5400 printf("Function vec_st [type unsigned char] ===> Error\n");
5402 printf("Function vec_st [type unsigned char] ===> OK\n");
5406 vec_st( Caux1.v, 0, Cmem );
5408 for ( i=0; i< 16; i++ )
5410 Iaux = Iaux && (Caux1.e[i]==Cmem[i]);
5415 printf("Function vec_st [type char] ===> Error\n");
5417 printf("Function vec_st [type char] ===> OK\n");
5421 vec_st( USaux1.v, 0, USmem );
5423 for ( i=0; i< 8; i++ )
5425 Iaux = Iaux && (USaux1.e[i]==USmem[i]);
5430 printf("Function vec_st [type unsigned short] ===> Error\n");
5432 printf("Function vec_st [type unsigned short] ===> OK\n");
5436 vec_st( Saux1.v, 0, Smem );
5438 for ( i=0; i< 8; i++ )
5440 Iaux = Iaux && (Saux1.e[i]==Smem[i]);
5445 printf("Function vec_st [type short] ===> Error\n");
5447 printf("Function vec_st [type short] ===> OK\n");
5451 vec_st( UIaux1.v, 0, UImem );
5453 for ( i=0; i< 4; i++ )
5455 Iaux = Iaux && (UIaux1.e[i]==UImem[i]);
5460 printf("Function vec_st [type unsigned int] ===> Error\n");
5462 printf("Function vec_st [type unsigned int] ===> OK\n");
5466 vec_st( Iaux1.v, 0, Imem );
5468 for ( i=0; i< 4; i++ )
5470 Iaux = Iaux && (Iaux1.e[i]==Imem[i]);
5475 printf("Function vec_st [type int] ===> Error\n");
5477 printf("Function vec_st [type int] ===> OK\n");
5479 #if defined TEST_FLOATS
5482 vec_st( Faux1.v, 0, Fmem );
5484 for ( i=0; i< 4; i++ )
5486 Iaux = Iaux && (Faux1.e[i]==Fmem[i]);
5491 printf("Function vec_st [type float] ===> Error\n");
5493 printf("Function vec_st [type float] ===> OK\n");
5496 /* Function vec_ste */
5497 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
5501 vec_ste( UCaux1.v, b, UCmem );
5503 if (UCaux1.e[i]!=UCmem[i]) err++;
5506 printf("Function vec_ste [type unsigned char] ===> Error\n");
5508 printf("Function vec_ste [type unsigned char] ===> OK\n");
5513 vec_ste( Caux1.v, b, Cmem );
5515 if (Caux1.e[i]!=Cmem[i]) err++;
5518 printf("Function vec_ste [type char] ===> Error\n");
5520 printf("Function vec_ste [type char] ===> OK\n");
5525 vec_ste( USaux1.v, b, USmem );
5527 if (USaux1.e[i]!=USmem[i]) err++;
5529 printf("Function vec_ste [type unsigned short] ===> Error\n");
5531 printf("Function vec_ste [type unsigned short] ===> OK\n");
5536 vec_ste( Saux1.v, b, Smem );
5538 if (Saux1.e[i]!=Smem[i]) err++;
5540 printf("Function vec_ste [type short] ===> Error\n");
5542 printf("Function vec_ste [type short] ===> OK\n");
5547 vec_ste( UIaux1.v, b, UImem );
5549 if (UIaux1.e[i]!=UImem[i]) err++;
5551 printf("Function vec_ste [type unsigned int] ===> Error\n");
5553 printf("Function vec_ste [type unsigned int] ===> OK\n");
5558 vec_ste( Iaux1.v, b, Imem );
5560 if (Iaux1.e[i]!=Imem[i]) err++;
5562 printf("Function vec_ste [type int] ===> Error\n");
5564 printf("Function vec_ste [type int] ===> OK\n");
5566 #if defined TEST_FLOATS
5570 vec_ste( Faux1.v, b, Fmem );
5572 if (Faux1.e[i]!=Fmem[i]) err++;
5574 printf("Function vec_ste [type float] ===> Error\n");
5576 printf("Function vec_ste [type float] ===> OK\n");
5580 /* Function vec_stl */
5581 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
5584 vec_stl( UCaux1.v, 0, UCmem );
5586 for ( i=0; i< 16; i++ )
5588 Iaux = Iaux && (UCaux1.e[i]==UCmem[i]);
5593 printf("Function vec_stl [type unsigned char] ===> Error\n");
5595 printf("Function vec_stl [type unsigned char] ===> OK\n");
5599 vec_stl( Caux1.v, 0, Cmem );
5601 for ( i=0; i< 16; i++ )
5603 Iaux = Iaux && (Caux1.e[i]==Cmem[i]);
5608 printf("Function vec_stl [type char] ===> Error\n");
5610 printf("Function vec_stl [type char] ===> OK\n");
5614 vec_stl( USaux1.v, 0, USmem );
5616 for ( i=0; i< 8; i++ )
5618 Iaux = Iaux && (USaux1.e[i]==USmem[i]);
5623 printf("Function vec_stl [type unsigned short] ===> Error\n");
5625 printf("Function vec_stl [type unsigned short] ===> OK\n");
5629 vec_stl( Saux1.v, 0, Smem );
5631 for ( i=0; i< 8; i++ )
5633 Iaux = Iaux && (Saux1.e[i]==Smem[i]);
5638 printf("Function vec_stl [type short] ===> Error\n");
5640 printf("Function vec_stl [type short] ===> OK\n");
5644 vec_stl( UIaux1.v, 0, UImem );
5646 for ( i=0; i< 4; i++ )
5648 Iaux = Iaux && (UIaux1.e[i]==UImem[i]);
5653 printf("Function vec_stl [type unsigned int] ===> Error\n");
5655 printf("Function vec_stl [type unsigned int] ===> OK\n");
5659 vec_stl( Iaux1.v, 0, Imem );
5661 for ( i=0; i< 4; i++ )
5663 Iaux = Iaux && (Iaux1.e[i]==Imem[i]);
5668 printf("Function vec_stl [type int] ===> Error\n");
5670 printf("Function vec_stl [type int] ===> OK\n");
5672 #if defined TEST_FLOATS
5675 vec_stl( Faux1.v, 0, Fmem );
5677 for ( i=0; i< 4; i++ )
5679 Iaux = Iaux && (Faux1.e[i]==Fmem[i]);
5684 printf("Function vec_stl [type float] ===> Error\n");
5686 printf("Function vec_stl [type float] ===> OK\n");
5690 /* Free dynamic vector variables */
5697 #if defined TEST_FLOATS
5709 TvecChar Caux1, Caux2, Caux3;//, Caux4;
5710 TvecUChar UCaux1, UCaux2, UCaux3;//, UCaux4;
5711 TvecShort Saux1, Saux2, Saux3;//, Saux4;
5712 TvecUShort USaux1, USaux2, USaux3;//, USaux4;
5713 TvecInt Iaux1, Iaux2, Iaux3;//, Iaux4;
5714 TvecUInt UIaux1, UIaux2, UIaux3;//, UIaux4;
5715 #if defined TEST_FLOATS
5716 TvecFloat Faux1, Faux2, Faux3;//, Faux4;
5719 int i, err, j;//, b, bAux;
5720 // signed int Ivec1, Ivec2, Ivec3;
5721 // signed short *Svec1;
5722 // unsigned int *UIvec1;
5723 // unsigned short *USvec1;
5724 // unsigned char *UCvec1;
5725 #if defined TEST_FLOATS
5729 /* For saturated rutines */
5730 long long int LLaux;
5732 #if defined TEST_FLOATS
5735 signed int Iaux;//, I1, I2;
5736 unsigned int UIaux;//, UI1, UI2;
5738 unsigned short USaux;
5740 unsigned char UCaux;
5749 unsigned short us[2];
5751 unsigned char uc[4];
5752 } INTunion1, INTunion2;
5759 unsigned char uc[2];
5760 } SHOunion1, SHOunion2;
5763 #if defined (GCC_COMPILER)
5764 vector signed char Ccons1 = (vector signed char){-8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7};
5765 vector signed char Ccons2 = (vector signed char){1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1};
5766 vector signed char Ccons3 = (vector signed char){-128, 127, -128, 127, -128, 127, -128, 127, -128, 127, -128, 127, -128, 127, -128, 127};
5767 vector unsigned char UCcons1 = (vector unsigned char){248, 249, 250, 251, 252, 253, 254, 255, 0, 1, 2, 3, 4, 5, 6, 7};
5768 vector unsigned char UCcons2 = (vector unsigned char){2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2};
5769 vector unsigned char UCcons3 = (vector unsigned char){1, 2, 3, 4, 5, 6, 7, 8, 1, 2, 3, 4, 5, 6, 7, 8};
5770 vector signed short Scons1 = (vector signed short){-4, -3, -2, -1, 0, 1, 2, 3};
5771 vector signed short Scons2 = (vector signed short){-32768, 10000, 1, 1, 1, 1, -10000, -10000};
5772 vector signed short Scons3 = (vector signed short){-32768, 32767, -32768, 32767, -32768, 32767, -32768, 32767};
5773 vector unsigned short UScons1 = (vector unsigned short){65532, 65533, 65534, 65535, 0, 1, 2, 3};
5774 vector unsigned short UScons2 = (vector unsigned short){1, 1, 1, 1, 1, 1, 1, 1};
5775 vector unsigned short UScons3 = (vector unsigned short){1, 2, 3, 4, 1, 2, 3, 4};
5776 vector signed int Icons1 = (vector signed int){-4, -1, 1, 4};
5777 vector signed int Icons2 = (vector signed int){1, 1, 1, 1};
5778 vector signed int Icons3 = (vector signed int){0x80000000, 0x7FFFFFFF, 0x80000000, 0x7FFFFFFF};
5779 vector unsigned int UIcons1 = (vector unsigned int){0xFFFFFFFE, 0xFFFFFFFF, 0, 1};
5780 vector unsigned int UIcons2 = (vector unsigned int){1, 1, 1, 1};
5781 vector unsigned int UIcons3 = (vector unsigned int){1, 2, 1, 2};
5783 #if defined TEST_FLOATS
5784 vector float Fcons1 = (vector float){-1.5, 1.0, 0.5, -3.999};
5785 vector float Fcons2 = (vector float){1.0, 1.0, 1.0, 1.0};
5786 vector float Fcons3 = (vector float){100000000000.0, 1.0, -1.0, -1234567890.0};
5789 #elif defined (MAC_COMPILER) || defined(XLC_COMPILER)
5790 vector signed char Ccons1 = (vector signed char)(-8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7);
5791 vector signed char Ccons2 = (vector signed char)(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1);
5792 vector signed char Ccons3 = (vector signed char)(-128, 127, -128, 127, -128, 127, -128, 127, -128, 127, -128, 127, -128, 127, -128, 127);
5793 vector unsigned char UCcons1 = (vector unsigned char)(248, 249, 250, 251, 252, 253, 254, 255, 0, 1, 2, 3, 4, 5, 6, 7);
5794 vector unsigned char UCcons2 = (vector unsigned char)(2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2);
5795 vector unsigned char UCcons3 = (vector unsigned char)(1, 2, 3, 4, 5, 6, 7, 8, 1, 2, 3, 4, 5, 6, 7, 8);
5796 vector signed short Scons1 = (vector signed short)(-4, -3, -2, -1, 0, 1, 2, 3);
5797 vector signed short Scons2 = (vector signed short)(-32768, 10000, 1, 1, 1, 1, -10000, -10000);
5798 vector signed short Scons3 = (vector signed short)(-32768, 32767, -32768, 32767, -32768, 32767, -32768, 32767);
5799 vector unsigned short UScons1 = (vector unsigned short)(65532, 65533, 65534, 65535, 0, 1, 2, 3);
5800 vector unsigned short UScons2 = (vector unsigned short)(1, 1, 1, 1, 1, 1, 1, 1);
5801 vector unsigned short UScons3 = (vector unsigned short)(1, 2, 3, 4, 1, 2, 3, 4);
5802 vector signed int Icons1 = (vector signed int)(-4, -1, 1, 4);
5803 vector signed int Icons2 = (vector signed int)(1, 1, 1, 1);
5804 vector signed int Icons3 = (vector signed int)(0x80000000, 0x7FFFFFFF, 0x80000000, 0x7FFFFFFF);
5805 vector unsigned int UIcons1 = (vector unsigned int)(0xFFFFFFFE, 0xFFFFFFFF, 0, 1);
5806 vector unsigned int UIcons2 = (vector unsigned int)(1, 1, 1, 1);
5807 vector unsigned int UIcons3 = (vector unsigned int)(1, 2, 1, 2);
5809 #if defined TEST_FLOATS
5810 vector float Fcons1 = (vector float)(-1.5, 1.0, 0.5, -3.999);
5811 vector float Fcons2 = (vector float)(1.0, 1.0, 1.0, 1.0);
5812 vector float Fcons3 = (vector float)(100000000000.0, 1.0, -1.0, -1234567890.0);
5818 /* Function vec_sub */
5819 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
5821 Caux1.v = vec_sub( Ccons1, Ccons2 );
5824 for( i=0; i< 16; i++ )
5826 Caux = Caux2.e[i] - Caux3.e[i];
5827 if (Caux1.e[i] != Caux)
5831 printf("Function vec_sub [type char] ===> Error\n");
5833 printf("Function vec_sub [type char] ===> OK\n");
5836 UCaux1.v = vec_sub( UCcons1, UCcons2 );
5839 for( i=0; i< 16; i++ )
5841 UCaux = UCaux2.e[i] - UCaux3.e[i];
5842 if (UCaux1.e[i] != UCaux)
5846 printf("Function vec_sub [type unsigned char] ===> Error\n");
5848 printf("Function vec_sub [type unsigned char] ===> OK\n");
5851 Saux1.v = vec_sub( Scons1, Scons2 );
5854 for( i=0; i< 8; i++ )
5856 Saux = Saux2.e[i] - Saux3.e[i];
5857 if (Saux1.e[i] != Saux)
5861 printf("Function vec_sub [type short] ===> Error\n");
5863 printf("Function vec_sub [type short] ===> OK\n");
5866 USaux1.v = vec_sub( UScons1, UScons2 );
5869 for( i=0; i< 8; i++ )
5871 USaux = USaux2.e[i] - USaux3.e[i];
5872 if (USaux1.e[i] != USaux)
5876 printf("Function vec_sub [type unsigned short] ===> Error\n");
5878 printf("Function vec_sub [type unsigned short] ===> OK\n");
5881 Iaux1.v = vec_sub( Icons1, Icons2 );
5884 for( i=0; i< 4; i++ )
5886 Iaux = Iaux2.e[i] - Iaux3.e[i];
5887 if (Iaux1.e[i] != Iaux)
5891 printf("Function vec_sub [type integer] ===> Error\n");
5893 printf("Function vec_sub [type integer] ===> OK\n");
5896 UIaux1.v = vec_sub( UIcons1, UIcons2 );
5899 for( i=0; i< 4; i++ )
5901 UIaux = UIaux2.e[i] - UIaux3.e[i];
5902 if (UIaux1.e[i] != UIaux)
5906 printf("Function vec_sub [type unsigned int] ===> Error\n");
5908 printf("Function vec_sub [type unsigned int] ===> OK\n");
5910 #if defined TEST_FLOATS
5912 Faux1.v = vec_sub( Fcons1, Fcons2 );
5915 for( i=0; i< 4; i++ )
5917 Faux = Faux2.e[i] - Faux3.e[i];
5918 if (Faux1.e[i] != Faux)
5922 printf("Function vec_sub [type float] ===> Error\n");
5924 printf("Function vec_sub [type float] ===> OK\n");
5927 /* Function vec_subc */
5928 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
5930 UIaux1.v = vec_subc( UIcons2, UIcons3 );
5933 for( i=0; i< 4; i++ )
5935 if (UIaux3.e[i]>UIaux2.e[i])
5937 if (UIaux1.e[i] != 0)
5942 if (UIaux1.e[i] != 1)
5947 printf("Function vec_subc [type unsigned int] ===> Error\n");
5949 printf("Function vec_subc [type unsigned int] ===> OK\n");
5951 /* Function vec_subs */
5952 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
5954 Caux1.v = vec_subs( Ccons1, Ccons3 );
5957 for( i=0; i< 16; i++ )
5959 Caux = (signed char)Caux2.e[i]-Caux3.e[i];
5960 if ((Caux2.e[i]>=0)&&(Caux3.e[i]<0))
5962 if (Caux< Caux2.e[i])
5965 else if ((Caux2.e[i]<0)&&(Caux3.e[i]>0))
5967 if (Caux> Caux2.e[i])
5970 if (Caux1.e[i] != Caux)
5974 printf("Function vec_subs [type char] ===> Error\n");
5976 printf("Function vec_subs [type char] ===> OK\n");
5979 UCaux1.v = vec_subs( UCcons1, UCcons3 );
5982 for( i=0; i< 16; i++ )
5984 UCaux = (unsigned char)(UCaux2.e[i]-UCaux3.e[i]);
5985 if (UCaux> UCaux2.e[i])
5987 if (UCaux1.e[i] != UCaux)
5991 printf("Function vec_subs [type unsigned char] ===> Error\n");
5993 printf("Function vec_subs [type unsigned char] ===> OK\n");
5996 Saux1.v = vec_subs( Scons1, Scons3 );
5999 for( i=0; i< 8; i++ )
6001 Saux = (signed short)(Saux2.e[i] - Saux3.e[i]);
6002 if ((Saux2.e[i]>=0)&&(Saux3.e[i]<0))
6004 if (Saux< Saux2.e[i])
6007 else if ((Saux2.e[i]<0)&&(Saux3.e[i]>0))
6009 if (Saux> Saux2.e[i])
6012 if (Saux1.e[i] != Saux)
6016 printf("Function vec_subs [type short] ===> Error\n");
6018 printf("Function vec_subs [type short] ===> OK\n");
6021 USaux1.v = vec_subs( UScons1, UScons3 );
6024 for( i=0; i< 8; i++ )
6026 USaux = (unsigned short)(USaux2.e[i] - USaux3.e[i]);
6027 if (USaux> USaux2.e[i])
6029 if (USaux1.e[i] != USaux)
6033 printf("Function vec_subs [type unsigned short] ===> Error\n");
6035 printf("Function vec_subs [type unsigned short] ===> OK\n");
6039 Iaux1.v = vec_subs( Icons1, Icons3 );
6042 for( i=0; i< 4; i++ )
6044 Iaux = (signed int)(Iaux2.e[i] - Iaux3.e[i]);
6045 if ((Iaux2.e[i]>=0)&&(Iaux3.e[i]<0))
6047 if (Iaux< Iaux2.e[i])
6050 else if ((Iaux2.e[i]<0)&&(Iaux3.e[i]>0))
6052 if (Iaux> Iaux2.e[i])
6054 printf("%d > %d\n", Iaux, Iaux2.e[i]);
6058 if (Iaux1.e[i] != Iaux)
6062 printf("Function vec_subs [type integer] ===> Error\n");
6064 printf("Function vec_subs [type integer] ===> OK\n");
6067 UIaux1.v = vec_subs( UIcons1, UIcons3 );
6070 for( i=0; i< 4; i++ )
6072 UIaux = (unsigned int)(UIaux2.e[i] - UIaux3.e[i]);
6073 if (UIaux> UIaux2.e[i])
6075 if (UIaux1.e[i] != UIaux)
6079 printf("Function vec_subs [type unsigned int] ===> Error\n");
6081 printf("Function vec_subs [type unsigned int] ===> OK\n");
6083 /* Function vec_sum4s */
6084 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
6086 Iaux1.v = vec_sum4s( Ccons2, Icons2 );
6089 for( i=0; i< 4; i++ )
6092 for( j=0; j< 4; j++ )
6093 Iaux = Iaux + Caux1.e[4*i+j];
6094 if (Iaux1.e[i] != Iaux)
6098 printf("Function vec_sum4s [type char] ===> Error\n");
6100 printf("Function vec_sum4s [type char] ===> OK\n");
6103 UIaux1.v = vec_sum4s( UCcons2, UIcons2 );
6106 for( i=0; i< 4; i++ )
6108 UIaux = UIaux2.e[i];
6109 for( j=0; j< 4; j++ )
6110 UIaux = UIaux + UCaux1.e[4*i+j];
6111 if (UIaux1.e[i] != UIaux)
6115 printf("Function vec_sum4s [type unsigned char] ===> Error\n");
6117 printf("Function vec_sum4s [type unsigned char] ===> OK\n");
6120 Iaux1.v = vec_sum4s( Scons2, Icons2 );
6123 for( i=0; i< 4; i++ )
6126 for( j=0; j< 2; j++ )
6127 Iaux = Iaux + Saux1.e[2*i+j];
6128 if (Iaux1.e[i] != Iaux)
6132 printf("Function vec_sum4s [type short] ===> Error\n");
6134 printf("Function vec_sum4s [type short] ===> OK\n");
6136 /* Function vec_sum2s */
6137 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
6141 Iaux3.v = vec_sum2s( Iaux1.v, Iaux2.v );
6142 for( i=0; i< 2; i++ )
6144 LLaux = (long long int) Iaux1.e[2*i] + Iaux1.e[(2*i)+1] + Iaux2.e[(2*i)+1];
6145 if (LLaux > INT_MAX)
6147 Iaux=0x7FFFFFFF; /* INT_MAX */
6149 else if (LLaux < INT_MIN)
6151 Iaux=0x80000000; /* INT_MIN */
6153 else Iaux = (signed int) LLaux;
6155 if ((Iaux3.e[2*i] != 0) || (Iaux3.e[(2*i)+1] != Iaux))
6159 printf("Function vec_sum2s [type integer] ===> Error\n");
6161 printf("Function vec_sum2s [type integer] ===> OK\n");
6163 /* Function vec_sums */
6164 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
6167 /* Not saturated test */
6170 Iaux3.v = vec_sums( Iaux1.v, Iaux2.v );
6172 LLaux = (long long int) Iaux1.e[0] + Iaux1.e[1] + Iaux1.e[2] + Iaux1.e[3] + Iaux2.e[3];
6173 if (LLaux > INT_MAX)
6175 Iaux=0x7FFFFFFF; /* INT_MAX */
6177 else if (LLaux < INT_MIN)
6179 Iaux=0x80000000; /* INT_MIN */
6181 else Iaux = (signed int) LLaux;
6183 if ((Iaux3.e[0] != 0) || (Iaux3.e[1] != 0) || (Iaux3.e[2] != 0) ||
6184 (Iaux3.e[3] != Iaux))
6187 /* Saturated test */
6190 Iaux3.v = vec_sums( Iaux1.v, Iaux2.v );
6192 LLaux = (long long int) Iaux1.e[0] + Iaux1.e[1] + Iaux1.e[2] + Iaux1.e[3] + Iaux2.e[3];
6193 if (LLaux > INT_MAX)
6195 Iaux=0x7FFFFFFF; /* INT_MAX */
6197 else if (LLaux < INT_MIN)
6199 Iaux=0x80000000; /* INT_MIN */
6201 else Iaux = (signed int) LLaux;
6203 if ((Iaux3.e[0] != 0) || (Iaux3.e[1] != 0) || (Iaux3.e[2] != 0) ||
6204 (Iaux3.e[3] != Iaux))
6208 printf("Function vec_sums [type integer] ===> Error\n");
6210 printf("Function vec_sums [type integer] ===> OK\n");
6212 #if defined TEST_FLOATS
6213 /* Function vec_trunc */
6214 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
6217 Faux2.v = vec_trunc( Faux1.v );
6218 for( i=0; i< 4; i++ )
6220 Faux = truncf(Faux1.e[i]);
6221 if (Faux2.e[i] != Faux)
6225 printf("Function vec_trunc [type float] ===> Error\n");
6227 printf("Function vec_trunc [type float] ===> OK\n");
6230 /* Function vec_unpackh */
6231 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
6234 Saux1.v = vec_unpackh( Caux1.v );
6235 for ( i=0; i< 8; i++ )
6237 Saux = (signed short)Caux1.e[i];
6238 if (Saux1.e[i] != Saux)
6243 printf("Function vec_unpackh [type short-char] ===> Error\n");
6245 printf("Function vec_unpackh [type short-char] ===> OK\n");
6249 Iaux1.v = vec_unpackh( Saux1.v );
6250 for ( i=0; i< 4; i++ )
6252 Iaux = (signed int)Saux1.e[i];
6253 if (Iaux1.e[i] != Iaux)
6258 printf("Function vec_unpackh [type int-short] ===> Error\n");
6260 printf("Function vec_unpackh [type int-short] ===> OK\n");
6262 /* Function vec_unpackl */
6263 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
6266 Saux1.v = vec_unpackl( Caux1.v );
6267 for ( i=0; i< 8; i++ )
6269 Saux = (signed short)Caux1.e[i+8];
6270 if (Saux1.e[i] != Saux)
6275 printf("Function vec_unpackl [type short-char] ===> Error\n");
6277 printf("Function vec_unpackl [type short-char] ===> OK\n");
6281 Iaux1.v = vec_unpackl( Saux1.v );
6282 for ( i=0; i< 4; i++ )
6284 Iaux = (signed int)Saux1.e[i+4];
6285 if (Iaux1.e[i] != Iaux)
6290 printf("Function vec_unpackl [type int-short] ===> Error\n");
6292 printf("Function vec_unpackl [type int-short] ===> OK\n");
6294 /* Function vec_xor */
6295 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
6299 UCaux3.v = vec_xor( UCaux1.v, UCaux2.v );
6300 for( i=0; i< 16; i++ )
6302 UCaux = UCaux1.e[i] ^ UCaux2.e[i];
6303 if (UCaux3.e[i] != UCaux)
6307 printf("Function vec_xor [type unsigned char] ===> Error\n");
6309 printf("Function vec_xor [type unsigned char] ===> OK\n");
6314 Caux3.v = vec_xor( Caux1.v, Caux2.v );
6315 for( i=0; i< 16; i++ )
6317 Caux = Caux1.e[i] ^ Caux2.e[i];
6318 if (Caux3.e[i] != Caux)
6322 printf("Function vec_xor [type char] ===> Error\n");
6324 printf("Function vec_xor [type char] ===> OK\n");
6329 USaux3.v = vec_xor( USaux1.v, USaux2.v );
6330 for( i=0; i< 8; i++ )
6332 USaux = USaux1.e[i] ^ USaux2.e[i];
6333 if (USaux3.e[i] != USaux)
6337 printf("Function vec_xor [type unsigned short] ===> Error\n");
6339 printf("Function vec_xor [type unsigned short] ===> OK\n");
6344 Saux3.v = vec_xor( Saux1.v, Saux2.v );
6345 for( i=0; i< 8; i++ )
6347 Saux = Saux1.e[i] ^ Saux2.e[i];
6348 if (Saux3.e[i] != Saux)
6352 printf("Function vec_xor [type short] ===> Error\n");
6354 printf("Function vec_xor [type short] ===> OK\n");
6359 UIaux3.v = vec_xor( UIaux1.v, UIaux2.v );
6360 for( i=0; i< 4; i++ )
6362 UIaux = UIaux1.e[i] ^ UIaux2.e[i];
6363 if (UIaux3.e[i] != UIaux)
6367 printf("Function vec_xor [type unsigned int] ===> Error\n");
6369 printf("Function vec_xor [type unsigned int] ===> OK\n");
6374 Iaux3.v = vec_xor( Iaux1.v, Iaux2.v );
6375 for( i=0; i< 4; i++ )
6377 Iaux = Iaux1.e[i] ^ Iaux2.e[i];
6378 if (Iaux3.e[i] != Iaux)
6382 printf("Function vec_xor [type int] ===> Error\n");
6384 printf("Function vec_xor [type int] ===> OK\n");
6386 #if defined TEST_FLOATS
6390 Faux3.v = vec_xor( Faux1.v, Faux2.v );
6391 for( i=0; i< 4; i++ )
6393 Iaux = Faux1.i[i] ^ Faux2.i[i];
6395 if (Faux3.i[i] != Iaux)
6399 printf("Function vec_xor [type float] ===> Error\n");
6401 printf("Function vec_xor [type float] ===> OK\n");
6412 TvecChar Caux1, Caux2;//, Caux3, Caux4;
6413 TvecUChar UCaux1, UCaux2;//, UCaux3, UCaux4;
6414 TvecShort Saux1, Saux2;//, Saux3, Saux4;
6415 TvecUShort USaux1, USaux2;//, USaux3, USaux4;
6416 TvecInt Iaux1, Iaux2;//, Iaux3, Iaux4;
6417 TvecUInt UIaux1, UIaux2;//, UIaux3, UIaux4;
6418 #if defined TEST_FLOATS
6419 TvecFloat Faux1, Faux2;//, Faux3, Faux4;
6422 int i, err, /*j,*/ b, bAux;
6423 // signed int Ivec1, Ivec2, Ivec3;
6424 // signed short *Svec1;
6425 // unsigned int *UIvec1;
6426 // unsigned short *USvec1;
6427 // unsigned char *UCvec1;
6428 #if defined TEST_FLOATS
6432 /* For saturated rutines */
6433 // long long int LLaux;
6435 #if defined TEST_FLOATS
6438 signed int Iaux, I1;//, I2;
6439 // unsigned int UIaux, UI1, UI2;
6440 // signed short Saux;
6441 // unsigned short USaux;
6442 // signed char Caux;
6443 // unsigned char UCaux;
6452 unsigned short us[2];
6454 unsigned char uc[4];
6455 } INTunion1, INTunion2;
6462 unsigned char uc[2];
6463 } SHOunion1, SHOunion2;
6467 #if defined (GCC_COMPILER)
6468 vector signed char Ccons1 = (vector signed char){-8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7};
6469 vector signed char Ccons2 = (vector signed char){1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1};
6470 vector signed char Ccons3 = (vector signed char){-128, 127, -128, 127, -128, 127, -128, 127, -128, 127, -128, 127, -128, 127, -128, 127};
6471 vector unsigned char UCcons1 = (vector unsigned char){248, 249, 250, 251, 252, 253, 254, 255, 0, 1, 2, 3, 4, 5, 6, 7};
6472 vector unsigned char UCcons2 = (vector unsigned char){2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2};
6473 vector unsigned char UCcons3 = (vector unsigned char){1, 2, 3, 4, 5, 6, 7, 8, 1, 2, 3, 4, 5, 6, 7, 8};
6474 vector signed short Scons1 = (vector signed short){-4, -3, -2, -1, 0, 1, 2, 3};
6475 vector signed short Scons2 = (vector signed short){-32768, 10000, 1, 1, 1, 1, -10000, -10000};
6476 vector signed short Scons3 = (vector signed short){-32768, 32767, -32768, 32767, -32768, 32767, -32768, 32767};
6477 vector unsigned short UScons1 = (vector unsigned short){65532, 65533, 65534, 65535, 0, 1, 2, 3};
6478 vector unsigned short UScons2 = (vector unsigned short){1, 1, 1, 1, 1, 1, 1, 1};
6479 vector unsigned short UScons3 = (vector unsigned short){1, 2, 3, 4, 1, 2, 3, 4};
6480 vector signed int Icons1 = (vector signed int){-4, -1, 1, 4};
6481 vector signed int Icons2 = (vector signed int){1, 1, 1, 1};
6482 vector signed int Icons3 = (vector signed int){0x80000000, 0x7FFFFFFF, 0x80000000, 0x7FFFFFFF};
6483 vector unsigned int UIcons1 = (vector unsigned int){0xFFFFFFFE, 0xFFFFFFFF, 0, 1};
6484 vector unsigned int UIcons2 = (vector unsigned int){1, 1, 1, 1};
6485 vector unsigned int UIcons3 = (vector unsigned int){1, 2, 1, 2};
6487 #if defined TEST_FLOATS
6488 vector float Fcons1 = (vector float){-1.5, 1.0, 0.5, -3.999};
6489 vector float Fcons2 = (vector float){1.0, 1.0, 1.0, 1.0};
6490 vector float Fcons3 = (vector float){100000000000.0, 1.0, -1.0, -1234567890.0};
6493 #elif defined (MAC_COMPILER) || defined(XLC_COMPILER)
6494 vector signed char Ccons1 = (vector signed char)(-8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7);
6495 vector signed char Ccons2 = (vector signed char)(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1);
6496 vector signed char Ccons3 = (vector signed char)(-128, 127, -128, 127, -128, 127, -128, 127, -128, 127, -128, 127, -128, 127, -128, 127);
6497 vector unsigned char UCcons1 = (vector unsigned char)(248, 249, 250, 251, 252, 253, 254, 255, 0, 1, 2, 3, 4, 5, 6, 7);
6498 vector unsigned char UCcons2 = (vector unsigned char)(2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2);
6499 vector unsigned char UCcons3 = (vector unsigned char)(1, 2, 3, 4, 5, 6, 7, 8, 1, 2, 3, 4, 5, 6, 7, 8);
6500 vector signed short Scons1 = (vector signed short)(-4, -3, -2, -1, 0, 1, 2, 3);
6501 vector signed short Scons2 = (vector signed short)(-32768, 10000, 1, 1, 1, 1, -10000, -10000);
6502 vector signed short Scons3 = (vector signed short)(-32768, 32767, -32768, 32767, -32768, 32767, -32768, 32767);
6503 vector unsigned short UScons1 = (vector unsigned short)(65532, 65533, 65534, 65535, 0, 1, 2, 3);
6504 vector unsigned short UScons2 = (vector unsigned short)(1, 1, 1, 1, 1, 1, 1, 1);
6505 vector unsigned short UScons3 = (vector unsigned short)(1, 2, 3, 4, 1, 2, 3, 4);
6506 vector signed int Icons1 = (vector signed int)(-4, -1, 1, 4);
6507 vector signed int Icons2 = (vector signed int)(1, 1, 1, 1);
6508 vector signed int Icons3 = (vector signed int)(0x80000000, 0x7FFFFFFF, 0x80000000, 0x7FFFFFFF);
6509 vector unsigned int UIcons1 = (vector unsigned int)(0xFFFFFFFE, 0xFFFFFFFF, 0, 1);
6510 vector unsigned int UIcons2 = (vector unsigned int)(1, 1, 1, 1);
6511 vector unsigned int UIcons3 = (vector unsigned int)(1, 2, 1, 2);
6513 #if defined TEST_FLOATS
6514 vector float Fcons1 = (vector float)(-1.5, 1.0, 0.5, -3.999);
6515 vector float Fcons2 = (vector float)(1.0, 1.0, 1.0, 1.0);
6516 vector float Fcons3 = (vector float)(100000000000.0, 1.0, -1.0, -1234567890.0);
6522 /* Function vec_all_eq */
6523 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
6527 I1 = vec_all_eq( UCaux1.v, UCaux2.v );
6529 for ( i=0; i< 16; i++ )
6531 Iaux = Iaux && (UCaux1.e[i]==UCaux2.e[i]);
6533 if (I1 != Iaux) err++;
6537 I1 = vec_all_eq( UCaux1.v, UCaux2.v );
6539 for ( i=0; i< 16; i++ )
6541 Iaux = Iaux && (UCaux1.e[i]==UCaux2.e[i]);
6543 if (I1 != Iaux) err++;
6546 printf("Function vec_all_eq [type unsigned char] ===> Error\n");
6548 printf("Function vec_all_eq [type unsigned char] ===> OK\n");
6553 I1 = vec_all_eq( Caux1.v, Caux2.v );
6555 for ( i=0; i< 16; i++ )
6557 Iaux = Iaux && (Caux1.e[i]==Caux2.e[i]);
6559 if (I1 != Iaux) err++;
6563 I1 = vec_all_eq( Caux1.v, Caux2.v );
6565 for ( i=0; i< 16; i++ )
6567 Iaux = Iaux && (Caux1.e[i]==Caux2.e[i]);
6569 if (I1 != Iaux) err++;
6572 printf("Function vec_all_eq [type char] ===> Error\n");
6574 printf("Function vec_all_eq [type char] ===> OK\n");
6579 I1 = vec_all_eq( USaux1.v, USaux2.v );
6581 for ( i=0; i< 8; i++ )
6583 Iaux = Iaux && (USaux1.e[i]==USaux2.e[i]);
6585 if (I1 != Iaux) err++;
6589 I1 = vec_all_eq( USaux1.v, USaux2.v );
6591 for ( i=0; i< 8; i++ )
6593 Iaux = Iaux && (USaux1.e[i]==USaux2.e[i]);
6595 if (I1 != Iaux) err++;
6598 printf("Function vec_all_eq [type unsigned short] ===> Error\n");
6600 printf("Function vec_all_eq [type unsigned short] ===> OK\n");
6605 I1 = vec_all_eq( Saux1.v, Saux2.v );
6607 for ( i=0; i< 8; i++ )
6609 Iaux = Iaux && (Saux1.e[i]==Saux2.e[i]);
6611 if (I1 != Iaux) err++;
6615 I1 = vec_all_eq( Saux1.v, Saux2.v );
6617 for ( i=0; i< 8; i++ )
6619 Iaux = Iaux && (Saux1.e[i]==Saux2.e[i]);
6621 if (I1 != Iaux) err++;
6624 printf("Function vec_all_eq [type short] ===> Error\n");
6626 printf("Function vec_all_eq [type short] ===> OK\n");
6631 I1 = vec_all_eq( UIaux1.v, UIaux2.v );
6633 for ( i=0; i< 4; i++ )
6635 Iaux = Iaux && (UIaux1.e[i]==UIaux2.e[i]);
6637 if (I1 != Iaux) err++;
6641 I1 = vec_all_eq( UIaux1.v, UIaux2.v );
6643 for ( i=0; i< 4; i++ )
6645 Iaux = Iaux && (UIaux1.e[i]==UIaux2.e[i]);
6647 if (I1 != Iaux) err++;
6650 printf("Function vec_all_eq [type unsigned int] ===> Error\n");
6652 printf("Function vec_all_eq [type unsigned int] ===> OK\n");
6657 I1 = vec_all_eq( Iaux1.v, Iaux2.v );
6659 for ( i=0; i< 4; i++ )
6661 Iaux = Iaux && (Iaux1.e[i]==Iaux2.e[i]);
6663 if (I1 != Iaux) err++;
6667 I1 = vec_all_eq( Iaux1.v, Iaux2.v );
6669 for ( i=0; i< 4; i++ )
6671 Iaux = Iaux && (Iaux1.e[i]==Iaux2.e[i]);
6673 if (I1 != Iaux) err++;
6676 printf("Function vec_all_eq [type int] ===> Error\n");
6678 printf("Function vec_all_eq [type int] ===> OK\n");
6680 #if defined TEST_FLOATS
6684 I1 = vec_all_eq( Faux1.v, Faux2.v );
6686 for ( i=0; i< 4; i++ )
6688 Iaux = Iaux && (Faux1.e[i]==Faux2.e[i]);
6690 if (I1 != Iaux) err++;
6694 I1 = vec_all_eq( Faux1.v, Faux2.v );
6696 for ( i=0; i< 4; i++ )
6698 Iaux = Iaux && (Faux1.e[i]==Faux2.e[i]);
6700 if (I1 != Iaux) err++;
6703 printf("Function vec_all_eq [type float] ===> Error\n");
6705 printf("Function vec_all_eq [type float] ===> OK\n");
6708 /* Function vec_all_ge */
6709 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
6713 I1 = vec_all_ge( UCaux1.v, UCaux2.v );
6715 for ( i=0; i< 16; i++ )
6717 Iaux = Iaux && (UCaux1.e[i]>=UCaux2.e[i]);
6719 if (I1 != Iaux) err++;
6723 I1 = vec_all_ge( UCaux1.v, UCaux2.v );
6725 for ( i=0; i< 16; i++ )
6727 Iaux = Iaux && (UCaux1.e[i]>=UCaux2.e[i]);
6729 if (I1 != Iaux) err++;
6732 printf("Function vec_all_ge [type unsigned char] ===> Error\n");
6734 printf("Function vec_all_ge [type unsigned char] ===> OK\n");
6739 I1 = vec_all_ge( Caux1.v, Caux2.v );
6741 for ( i=0; i< 16; i++ )
6743 Iaux = Iaux && (Caux1.e[i]>=Caux2.e[i]);
6745 if (I1 != Iaux) err++;
6749 I1 = vec_all_ge( Caux1.v, Caux2.v );
6751 for ( i=0; i< 16; i++ )
6753 Iaux = Iaux && (Caux1.e[i]>=Caux2.e[i]);
6755 if (I1 != Iaux) err++;
6758 printf("Function vec_all_ge [type char] ===> Error\n");
6760 printf("Function vec_all_ge [type char] ===> OK\n");
6765 I1 = vec_all_ge( USaux1.v, USaux2.v );
6767 for ( i=0; i< 8; i++ )
6769 Iaux = Iaux && (USaux1.e[i]>=USaux2.e[i]);
6771 if (I1 != Iaux) err++;
6775 I1 = vec_all_ge( USaux1.v, USaux2.v );
6777 for ( i=0; i< 8; i++ )
6779 Iaux = Iaux && (USaux1.e[i]>=USaux2.e[i]);
6781 if (I1 != Iaux) err++;
6784 printf("Function vec_all_ge [type unsigned short] ===> Error\n");
6786 printf("Function vec_all_ge [type unsigned short] ===> OK\n");
6791 I1 = vec_all_ge( Saux1.v, Saux2.v );
6793 for ( i=0; i< 8; i++ )
6795 Iaux = Iaux && (Saux1.e[i]>=Saux2.e[i]);
6797 if (I1 != Iaux) err++;
6801 I1 = vec_all_ge( Saux1.v, Saux2.v );
6803 for ( i=0; i< 8; i++ )
6805 Iaux = Iaux && (Saux1.e[i]>=Saux2.e[i]);
6807 if (I1 != Iaux) err++;
6810 printf("Function vec_all_ge [type short] ===> Error\n");
6812 printf("Function vec_all_ge [type short] ===> OK\n");
6817 I1 = vec_all_ge( UIaux1.v, UIaux2.v );
6819 for ( i=0; i< 4; i++ )
6821 Iaux = Iaux && (UIaux1.e[i]>=UIaux2.e[i]);
6823 if (I1 != Iaux) err++;
6827 I1 = vec_all_ge( UIaux1.v, UIaux2.v );
6829 for ( i=0; i< 4; i++ )
6831 Iaux = Iaux && (UIaux1.e[i]>=UIaux2.e[i]);
6833 if (I1 != Iaux) err++;
6836 printf("Function vec_all_ge [type unsigned int] ===> Error\n");
6838 printf("Function vec_all_ge [type unsigned int] ===> OK\n");
6843 I1 = vec_all_ge( Iaux1.v, Iaux2.v );
6845 for ( i=0; i< 4; i++ )
6847 Iaux = Iaux && (Iaux1.e[i]>=Iaux2.e[i]);
6849 if (I1 != Iaux) err++;
6853 I1 = vec_all_ge( Iaux1.v, Iaux2.v );
6855 for ( i=0; i< 4; i++ )
6857 Iaux = Iaux && (Iaux1.e[i]>=Iaux2.e[i]);
6859 if (I1 != Iaux) err++;
6862 printf("Function vec_all_ge [type int] ===> Error\n");
6864 printf("Function vec_all_ge [type int] ===> OK\n");
6866 #if defined TEST_FLOATS
6870 I1 = vec_all_ge( Faux1.v, Faux2.v );
6872 for ( i=0; i< 4; i++ )
6874 Iaux = Iaux && (Faux1.e[i]>=Faux2.e[i]);
6876 if (I1 != Iaux) err++;
6880 I1 = vec_all_ge( Faux1.v, Faux2.v );
6882 for ( i=0; i< 4; i++ )
6884 Iaux = Iaux && (Faux1.e[i]>=Faux2.e[i]);
6886 if (I1 != Iaux) err++;
6889 printf("Function vec_all_ge [type float] ===> Error\n");
6891 printf("Function vec_all_ge [type float] ===> OK\n");
6894 /* Function vec_all_gt */
6895 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
6897 # if defined (GCC_COMPILER)
6898 UCaux1.v = (vector unsigned char){248, 249, 250, 251, 252, 253, 254, 255, 2, 3, 4, 5, 6, 7, 8, 9};
6899 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
6900 UCaux1.v = (vector unsigned char)(248, 249, 250, 251, 252, 253, 254, 255, 2, 3, 4, 5, 6, 7, 8, 9);
6903 I1 = vec_all_gt( UCaux1.v, UCaux2.v );
6905 for ( i=0; i< 16; i++ )
6907 Iaux = Iaux && (UCaux1.e[i]>UCaux2.e[i]);
6909 if (I1 != Iaux) err++;
6913 I1 = vec_all_gt( UCaux1.v, UCaux2.v );
6915 for ( i=0; i< 16; i++ )
6917 Iaux = Iaux && (UCaux1.e[i]>UCaux2.e[i]);
6919 if (I1 != Iaux) err++;
6922 printf("Function vec_all_gt [type unsigned char] ===> Error\n");
6924 printf("Function vec_all_gt [type unsigned char] ===> OK\n");
6927 # if defined (GCC_COMPILER)
6928 Caux1.v = (vector signed char){9, 8, 7, 6, 5, 4, 3, 2, 3, 4, 5, 6, 7, 8, 9, 10};
6929 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
6930 Caux1.v = (vector signed char)(9, 8, 7, 6, 5, 4, 3, 2, 3, 4, 5, 6, 7, 8, 9, 10);
6933 I1 = vec_all_gt( Caux1.v, Caux2.v );
6935 for ( i=0; i< 16; i++ )
6937 Iaux = Iaux && (Caux1.e[i]>Caux2.e[i]);
6939 if (I1 != Iaux) err++;
6943 I1 = vec_all_gt( Caux1.v, Caux2.v );
6945 for ( i=0; i< 16; i++ )
6947 Iaux = Iaux && (Caux1.e[i]>Caux2.e[i]);
6949 if (I1 != Iaux) err++;
6952 printf("Function vec_all_gt [type char] ===> Error\n");
6954 printf("Function vec_all_gt [type char] ===> OK\n");
6957 # if defined (GCC_COMPILER)
6958 USaux1.v = (vector unsigned short){65532, 65533, 65534, 65535, 2, 3, 4, 5};
6959 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
6960 USaux1.v = (vector unsigned short)(65532, 65533, 65534, 65535, 2, 3, 4, 5);
6963 I1 = vec_all_gt( USaux1.v, USaux2.v );
6965 for ( i=0; i< 8; i++ )
6967 Iaux = Iaux && (USaux1.e[i]>USaux2.e[i]);
6969 if (I1 != Iaux) err++;
6973 I1 = vec_all_gt( USaux1.v, USaux2.v );
6975 for ( i=0; i< 8; i++ )
6977 Iaux = Iaux && (USaux1.e[i]>USaux2.e[i]);
6979 if (I1 != Iaux) err++;
6982 printf("Function vec_all_gt [type unsigned short] ===> Error\n");
6984 printf("Function vec_all_gt [type unsigned short] ===> OK\n");
6987 # if defined (GCC_COMPILER)
6988 Saux1.v = (vector signed short){4, 3, 2, 1, 2, 3, 4, 5};
6989 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
6990 Saux1.v = (vector signed short)(4, 3, 2, 1, 2, 3, 4, 5);
6993 I1 = vec_all_gt( Saux1.v, Saux2.v );
6995 for ( i=0; i< 8; i++ )
6997 Iaux = Iaux && (Saux1.e[i]>Saux2.e[i]);
6999 if (I1 != Iaux) err++;
7003 I1 = vec_all_gt( Saux1.v, Saux2.v );
7005 for ( i=0; i< 8; i++ )
7007 Iaux = Iaux && (Saux1.e[i]>Saux2.e[i]);
7009 if (I1 != Iaux) err++;
7012 printf("Function vec_all_gt [type short] ===> Error\n");
7014 printf("Function vec_all_gt [type short] ===> OK\n");
7017 # if defined (GCC_COMPILER)
7018 UIaux1.v = (vector unsigned int){3, 2, 3, 2};
7019 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
7020 UIaux1.v = (vector unsigned int)(3, 2, 3, 2);
7023 I1 = vec_all_gt( UIaux1.v, UIaux2.v );
7025 for ( i=0; i< 4; i++ )
7027 Iaux = Iaux && (UIaux1.e[i]>UIaux2.e[i]);
7029 if (I1 != Iaux) err++;
7033 I1 = vec_all_gt( UIaux1.v, UIaux2.v );
7035 for ( i=0; i< 4; i++ )
7037 Iaux = Iaux && (UIaux1.e[i]>UIaux2.e[i]);
7039 if (I1 != Iaux) err++;
7042 printf("Function vec_all_gt [type unsigned int] ===> Error\n");
7044 printf("Function vec_all_gt [type unsigned int] ===> OK\n");
7047 # if defined (GCC_COMPILER)
7048 Iaux1.v = (vector signed int){4, 10, 10, 4};
7049 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
7050 Iaux1.v = (vector signed int)(4, 10, 10, 4);
7053 I1 = vec_all_gt( Iaux1.v, Iaux2.v );
7055 for ( i=0; i< 4; i++ )
7057 Iaux = Iaux && (Iaux1.e[i]>Iaux2.e[i]);
7059 if (I1 != Iaux) err++;
7063 I1 = vec_all_gt( Iaux1.v, Iaux2.v );
7065 for ( i=0; i< 4; i++ )
7067 Iaux = Iaux && (Iaux1.e[i]>Iaux2.e[i]);
7069 if (I1 != Iaux) err++;
7072 printf("Function vec_all_gt [type int] ===> Error\n");
7074 printf("Function vec_all_gt [type int] ===> OK\n");
7076 #if defined TEST_FLOATS
7078 # if defined (GCC_COMPILER)
7079 Faux1.v = (vector float){100000000000.0, 12.0, 12.0, 1234567890.0};
7080 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
7081 Faux1.v = (vector float)(100000000000.0, 12.0, 12.0, 1234567890.0);
7084 I1 = vec_all_gt( Faux1.v, Faux2.v );
7086 for ( i=0; i< 4; i++ )
7088 Iaux = Iaux && (Faux1.e[i]>Faux2.e[i]);
7090 if (I1 != Iaux) err++;
7094 I1 = vec_all_gt( Faux1.v, Faux2.v );
7096 for ( i=0; i< 4; i++ )
7098 Iaux = Iaux && (Faux1.e[i]>Faux2.e[i]);
7100 if (I1 != Iaux) err++;
7103 printf("Function vec_all_gt [type float] ===> Error\n");
7105 printf("Function vec_all_gt [type float] ===> OK\n");
7108 #if defined TEST_FLOATS
7109 /* Function vec_all_in */
7110 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
7114 I1 = vec_all_in( Faux1.v, Faux2.v );
7116 for ( i=0; i< 4; i++ )
7118 Iaux = Iaux && ((Faux1.e[i]<=Faux2.e[i]) && (Faux1.e[i]>=-Faux2.e[i]));
7120 if (I1 != Iaux) err++;
7123 # if defined (GCC_COMPILER)
7124 Faux2.v = (vector float){100000000000.0, 1.0, 1.0, 1234567890.0};
7125 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
7126 Faux2.v = (vector float)(100000000000.0, 1.0, 1.0, 1234567890.0);
7128 I1 = vec_all_in( Faux1.v, Faux2.v );
7130 for ( i=0; i< 4; i++ )
7132 Iaux = Iaux && ((Faux1.e[i]<=Faux2.e[i]) && (Faux1.e[i]>=-Faux2.e[i]));
7134 if (I1 != Iaux) err++;
7137 printf("Function vec_all_in [type float] ===> Error\n");
7139 printf("Function vec_all_in [type float] ===> OK\n");
7142 /* Function vec_all_le */
7143 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
7147 I1 = vec_all_le( UCaux1.v, UCaux2.v );
7149 for ( i=0; i< 16; i++ )
7151 Iaux = Iaux && (UCaux1.e[i]<=UCaux2.e[i]);
7153 if (I1 != Iaux) err++;
7157 I1 = vec_all_le( UCaux1.v, UCaux2.v );
7159 for ( i=0; i< 16; i++ )
7161 Iaux = Iaux && (UCaux1.e[i]<=UCaux2.e[i]);
7163 if (I1 != Iaux) err++;
7166 printf("Function vec_all_le [type unsigned char] ===> Error\n");
7168 printf("Function vec_all_le [type unsigned char] ===> OK\n");
7173 I1 = vec_all_le( Caux1.v, Caux2.v );
7175 for ( i=0; i< 16; i++ )
7177 Iaux = Iaux && (Caux1.e[i]<=Caux2.e[i]);
7179 if (I1 != Iaux) err++;
7183 I1 = vec_all_le( Caux1.v, Caux2.v );
7185 for ( i=0; i< 16; i++ )
7187 Iaux = Iaux && (Caux1.e[i]<=Caux2.e[i]);
7189 if (I1 != Iaux) err++;
7192 printf("Function vec_all_le [type char] ===> Error\n");
7194 printf("Function vec_all_le [type char] ===> OK\n");
7199 I1 = vec_all_le( USaux1.v, USaux2.v );
7201 for ( i=0; i< 8; i++ )
7203 Iaux = Iaux && (USaux1.e[i]<=USaux2.e[i]);
7205 if (I1 != Iaux) err++;
7209 I1 = vec_all_le( USaux1.v, USaux2.v );
7211 for ( i=0; i< 8; i++ )
7213 Iaux = Iaux && (USaux1.e[i]<=USaux2.e[i]);
7215 if (I1 != Iaux) err++;
7218 printf("Function vec_all_le [type unsigned short] ===> Error\n");
7220 printf("Function vec_all_le [type unsigned short] ===> OK\n");
7225 I1 = vec_all_le( Saux1.v, Saux2.v );
7227 for ( i=0; i< 8; i++ )
7229 Iaux = Iaux && (Saux1.e[i]<=Saux2.e[i]);
7231 if (I1 != Iaux) err++;
7235 I1 = vec_all_le( Saux1.v, Saux2.v );
7237 for ( i=0; i< 8; i++ )
7239 Iaux = Iaux && (Saux1.e[i]<=Saux2.e[i]);
7241 if (I1 != Iaux) err++;
7244 printf("Function vec_all_le [type short] ===> Error\n");
7246 printf("Function vec_all_le [type short] ===> OK\n");
7251 I1 = vec_all_le( UIaux1.v, UIaux2.v );
7253 for ( i=0; i< 4; i++ )
7255 Iaux = Iaux && (UIaux1.e[i]<=UIaux2.e[i]);
7257 if (I1 != Iaux) err++;
7261 I1 = vec_all_le( UIaux1.v, UIaux2.v );
7263 for ( i=0; i< 4; i++ )
7265 Iaux = Iaux && (UIaux1.e[i]<=UIaux2.e[i]);
7267 if (I1 != Iaux) err++;
7270 printf("Function vec_all_le [type unsigned int] ===> Error\n");
7272 printf("Function vec_all_le [type unsigned int] ===> OK\n");
7277 I1 = vec_all_le( Iaux1.v, Iaux2.v );
7279 for ( i=0; i< 4; i++ )
7281 Iaux = Iaux && (Iaux1.e[i]<=Iaux2.e[i]);
7283 if (I1 != Iaux) err++;
7287 I1 = vec_all_le( Iaux1.v, Iaux2.v );
7289 for ( i=0; i< 4; i++ )
7291 Iaux = Iaux && (Iaux1.e[i]<=Iaux2.e[i]);
7293 if (I1 != Iaux) err++;
7296 printf("Function vec_all_le [type int] ===> Error\n");
7298 printf("Function vec_all_le [type int] ===> OK\n");
7300 #if defined TEST_FLOATS
7304 I1 = vec_all_le( Faux1.v, Faux2.v );
7306 for ( i=0; i< 4; i++ )
7308 Iaux = Iaux && (Faux1.e[i]<=Faux2.e[i]);
7310 if (I1 != Iaux) err++;
7314 I1 = vec_all_le( Faux1.v, Faux2.v );
7316 for ( i=0; i< 4; i++ )
7318 Iaux = Iaux && (Faux1.e[i]<=Faux2.e[i]);
7320 if (I1 != Iaux) err++;
7323 printf("Function vec_all_le [type float] ===> Error\n");
7325 printf("Function vec_all_le [type float] ===> OK\n");
7328 /* Function vec_all_lt */
7329 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
7332 # if defined (GCC_COMPILER)
7333 UCaux2.v = (vector unsigned char){248, 249, 250, 251, 252, 253, 254, 255, 2, 3, 4, 5, 6, 7, 8, 9};
7334 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
7335 UCaux2.v = (vector unsigned char)(248, 249, 250, 251, 252, 253, 254, 255, 2, 3, 4, 5, 6, 7, 8, 9);
7337 I1 = vec_all_lt( UCaux1.v, UCaux2.v );
7339 for ( i=0; i< 16; i++ )
7341 Iaux = Iaux && (UCaux1.e[i]<UCaux2.e[i]);
7343 if (I1 != Iaux) err++;
7347 I1 = vec_all_lt( UCaux1.v, UCaux2.v );
7349 for ( i=0; i< 16; i++ )
7351 Iaux = Iaux && (UCaux1.e[i]<UCaux2.e[i]);
7353 if (I1 != Iaux) err++;
7356 printf("Function vec_all_lt [type unsigned char] ===> Error\n");
7358 printf("Function vec_all_lt [type unsigned char] ===> OK\n");
7362 # if defined (GCC_COMPILER)
7363 Caux2.v = (vector signed char){9, 8, 7, 6, 5, 4, 3, 2, 3, 4, 5, 6, 7, 8, 9, 10};
7364 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
7365 Caux2.v = (vector signed char)(9, 8, 7, 6, 5, 4, 3, 2, 3, 4, 5, 6, 7, 8, 9, 10);
7367 I1 = vec_all_lt( Caux1.v, Caux2.v );
7369 for ( i=0; i< 16; i++ )
7371 Iaux = Iaux && (Caux1.e[i]<Caux2.e[i]);
7373 if (I1 != Iaux) err++;
7377 I1 = vec_all_lt( Caux1.v, Caux2.v );
7379 for ( i=0; i< 16; i++ )
7381 Iaux = Iaux && (Caux1.e[i]<Caux2.e[i]);
7383 if (I1 != Iaux) err++;
7386 printf("Function vec_all_lt [type char] ===> Error\n");
7388 printf("Function vec_all_lt [type char] ===> OK\n");
7392 # if defined (GCC_COMPILER)
7393 USaux2.v = (vector unsigned short){65532, 65533, 65534, 65535, 2, 3, 4, 5};
7394 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
7395 USaux2.v = (vector unsigned short)(65532, 65533, 65534, 65535, 2, 3, 4, 5);
7397 I1 = vec_all_lt( USaux1.v, USaux2.v );
7399 for ( i=0; i< 8; i++ )
7401 Iaux = Iaux && (USaux1.e[i]<USaux2.e[i]);
7403 if (I1 != Iaux) err++;
7407 I1 = vec_all_lt( USaux1.v, USaux2.v );
7409 for ( i=0; i< 8; i++ )
7411 Iaux = Iaux && (USaux1.e[i]<USaux2.e[i]);
7413 if (I1 != Iaux) err++;
7416 printf("Function vec_all_lt [type unsigned short] ===> Error\n");
7418 printf("Function vec_all_lt [type unsigned short] ===> OK\n");
7422 # if defined (GCC_COMPILER)
7423 Saux2.v = (vector signed short){4, 3, 2, 1, 2, 3, 4, 5};
7424 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
7425 Saux2.v = (vector signed short)(4, 3, 2, 1, 2, 3, 4, 5);
7427 I1 = vec_all_lt( Saux1.v, Saux2.v );
7429 for ( i=0; i< 8; i++ )
7431 Iaux = Iaux && (Saux1.e[i]<Saux2.e[i]);
7433 if (I1 != Iaux) err++;
7437 I1 = vec_all_lt( Saux1.v, Saux2.v );
7439 for ( i=0; i< 8; i++ )
7441 Iaux = Iaux && (Saux1.e[i]<Saux2.e[i]);
7443 if (I1 != Iaux) err++;
7446 printf("Function vec_all_lt [type short] ===> Error\n");
7448 printf("Function vec_all_lt [type short] ===> OK\n");
7452 # if defined (GCC_COMPILER)
7453 UIaux2.v = (vector unsigned int){3, 2, 3, 2};
7454 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
7455 UIaux2.v = (vector unsigned int)(3, 2, 3, 2);
7457 I1 = vec_all_lt( UIaux1.v, UIaux2.v );
7459 for ( i=0; i< 4; i++ )
7461 Iaux = Iaux && (UIaux1.e[i]<UIaux2.e[i]);
7463 if (I1 != Iaux) err++;
7467 I1 = vec_all_lt( UIaux1.v, UIaux2.v );
7469 for ( i=0; i< 4; i++ )
7471 Iaux = Iaux && (UIaux1.e[i]<UIaux2.e[i]);
7473 if (I1 != Iaux) err++;
7476 printf("Function vec_all_lt [type unsigned int] ===> Error\n");
7478 printf("Function vec_all_lt [type unsigned int] ===> OK\n");
7482 # if defined (GCC_COMPILER)
7483 Iaux2.v = (vector signed int){4, 10, 10, 4};
7484 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
7485 Iaux2.v = (vector signed int)(4, 10, 10, 4);
7487 I1 = vec_all_lt( Iaux1.v, Iaux2.v );
7489 for ( i=0; i< 4; i++ )
7491 Iaux = Iaux && (Iaux1.e[i]<Iaux2.e[i]);
7493 if (I1 != Iaux) err++;
7497 I1 = vec_all_lt( Iaux1.v, Iaux2.v );
7499 for ( i=0; i< 4; i++ )
7501 Iaux = Iaux && (Iaux1.e[i]<Iaux2.e[i]);
7503 if (I1 != Iaux) err++;
7506 printf("Function vec_all_lt [type int] ===> Error\n");
7508 printf("Function vec_all_lt [type int] ===> OK\n");
7510 #if defined TEST_FLOATS
7513 # if defined (GCC_COMPILER)
7514 Faux2.v = (vector float){100000000000.0, 12.0, 12.0, 1234567890.0};
7515 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
7516 Faux2.v = (vector float)(100000000000.0, 12.0, 12.0, 1234567890.0);
7518 I1 = vec_all_lt( Faux1.v, Faux2.v );
7520 for ( i=0; i< 4; i++ )
7522 Iaux = Iaux && (Faux1.e[i]<Faux2.e[i]);
7524 if (I1 != Iaux) err++;
7528 I1 = vec_all_lt( Faux1.v, Faux2.v );
7530 for ( i=0; i< 4; i++ )
7532 Iaux = Iaux && (Faux1.e[i]<Faux2.e[i]);
7534 if (I1 != Iaux) err++;
7537 printf("Function vec_all_lt [type float] ===> Error\n");
7539 printf("Function vec_all_lt [type float] ===> OK\n");
7542 #if defined TEST_FLOATS
7543 /* Function vec_all_nan */
7544 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
7546 # if defined (GCC_COMPILER)
7547 Faux1.v = (vector float){NAN, NAN, NAN, NAN};
7548 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
7549 Faux1.v = (vector float)(NAN, NAN, NAN, NAN);
7551 I1 = vec_all_nan( Faux1.v );
7553 for ( i=0; i< 4; i++ )
7555 Iaux = Iaux && (isnan(Faux1.e[i]));
7557 if (I1 != Iaux) err++;
7560 I1 = vec_all_nan( Faux1.v );
7562 for ( i=0; i< 4; i++ )
7564 Iaux = Iaux && (isnan(Faux1.e[i]));
7566 if (I1 != Iaux) err++;
7569 printf("Function vec_all_nan [type float] ===> Error\n");
7571 printf("Function vec_all_nan [type float] ===> OK\n");
7574 /* Function vec_all_ne */
7575 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
7577 # if defined (GCC_COMPILER)
7578 Caux1.v = (vector signed char){-8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7};
7579 Caux2.v = (vector signed char){-7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, -8};
7580 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
7581 Caux1.v = (vector signed char)(-8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7);
7582 Caux2.v = (vector signed char)(-7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, -8);
7584 b = vec_all_ne (Caux1.v, Caux2.v);
7586 for (i=0; i<16; i++)
7587 bAux = bAux && (Caux1.e[i]!=Caux2.e[i]);
7588 if (bAux != b) err = 1;
7590 # if defined (GCC_COMPILER)
7591 Caux1.v = (vector signed char){-8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7};
7592 Caux2.v = (vector signed char){-7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 4, 6, 7, -8};
7593 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
7594 Caux1.v = (vector signed char)(-8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7);
7595 Caux2.v = (vector signed char)(-7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 4, 6, 7, -8);
7597 b = vec_all_ne (Caux1.v, Caux2.v);
7599 for (i=0; i<16; i++)
7600 bAux= bAux && (Caux1.e[i]!=Caux2.e[i]);
7601 if (bAux!=b) err= 1;
7603 # if defined (GCC_COMPILER)
7604 Caux1.v = (vector signed char){-8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7};
7605 Caux2.v = (vector signed char){-7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 4, 6, 7, -8};
7606 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
7607 Caux1.v = (vector signed char)(-8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7);
7608 Caux2.v = (vector signed char)(-7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 4, 6, 7, -8);
7610 b = vec_all_ne (Caux1.v, Caux2.v);
7612 for (i=0; i<16; i++)
7613 bAux = bAux && (Caux1.e[i] != Caux2.e[i]);
7614 if (bAux != b) err = 1;
7617 printf("Function vec_all_ne [type char] ===> Error\n");
7619 printf("Function vec_all_ne [type char] ===> OK\n");
7623 # if defined (GCC_COMPILER)
7624 UCaux1.v = (vector unsigned char){200, 201, 206, 205, 204, 203, 202, 201, 200, 101, 102, 13, 14, 15, 16, 17};
7625 UCaux2.v = (vector unsigned char){201, 206, 205, 204, 203, 202, 201, 200, 101, 102, 13, 14, 15, 16, 17,200};
7626 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
7627 UCaux1.v = (vector unsigned char)(200, 201, 206, 205, 204, 203, 202, 201, 200, 101, 102, 13, 14, 15, 16, 17);
7628 UCaux2.v = (vector unsigned char)(201, 206, 205, 204, 203, 202, 201, 200, 101, 102, 13, 14, 15, 16, 17,200);
7631 b = vec_all_ne (UCaux1.v, UCaux2.v);
7633 for (i=0; i<16; i++)
7634 bAux= bAux && (UCaux1.e[i]!=UCaux2.e[i]);
7635 if (bAux!=b) err= 1;
7637 # if defined (GCC_COMPILER)
7638 UCaux1.v = (vector unsigned char){200, 201, 206, 205, 204, 203, 202, 201, 200, 101, 102, 13, 14, 15, 16, 17};
7639 UCaux2.v = (vector unsigned char){201, 206, 205, 204, 203, 202, 201, 200, 101, 102, 13, 14, 15, 16, 17,200};
7640 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
7641 UCaux1.v = (vector unsigned char)(200, 201, 206, 205, 204, 203, 202, 201, 200, 101, 102, 13, 14, 15, 16, 17);
7642 UCaux2.v = (vector unsigned char)(201, 206, 205, 204, 203, 202, 201, 200, 101, 102, 13, 14, 15, 16, 17,200);
7644 b = vec_all_ne (UCaux1.v, UCaux2.v);
7646 for (i=0; i<16; i++)
7647 bAux = bAux && (UCaux1.e[i] != UCaux2.e[i]);
7648 if (bAux != b) err = 1;
7650 # if defined (GCC_COMPILER)
7651 UCaux1.v = (vector unsigned char){200, 201, 206, 205, 204, 203, 202, 201, 200, 101, 102, 13, 14, 15, 16, 17};
7652 UCaux2.v = (vector unsigned char){201, 206, 205, 204, 203, 202, 201, 200, 101, 102, 13, 14, 15, 16, 17,200};
7653 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
7654 UCaux1.v = (vector unsigned char)(200, 201, 206, 205, 204, 203, 202, 201, 200, 101, 102, 13, 14, 15, 16, 17);
7655 UCaux2.v = (vector unsigned char)(201, 206, 205, 204, 203, 202, 201, 200, 101, 102, 13, 14, 15, 16, 17,200);
7657 b = vec_all_ne (UCaux1.v, UCaux2.v);
7659 for (i=0; i<16; i++)
7660 bAux = bAux && (UCaux1.e[i] != UCaux2.e[i]);
7661 if (bAux != b) err = 1;
7664 printf("Function vec_all_ne [type unsigned char] ===> Error\n");
7666 printf("Function vec_all_ne [type unsigned char] ===> OK\n");
7670 # if defined (GCC_COMPILER)
7671 Saux1.v = (vector signed short){-3800, -3700, -3600, -3500, 0, 3300, 3200, 3100};
7672 Saux2.v = (vector signed short){-3700, -3600, -3500, 0, 3300, 3200, 3100,-3800};
7673 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
7674 Saux1.v = (vector signed short)(-3800, -3700, -3600, -3500, 0, 3300, 3200, 3100);
7675 Saux2.v = (vector signed short)(-3700, -3600, -3500, 0, 3300, 3200, 3100,-3800);
7677 b = vec_all_ne (Saux1.v, Saux2.v);
7680 bAux = bAux && (Saux1.e[i] != Saux2.e[i]);
7681 if (bAux != b) err = 1;
7683 # if defined (GCC_COMPILER)
7684 Saux1.v = (vector signed short){-3800, -3700, -3600, -3500, 0, 3300, 3200, 3100};
7685 Saux2.v = (vector signed short){-3700, -3600, -3500, 0, 3300, 3200, 3100,-3800};
7686 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
7687 Saux1.v = (vector signed short)(-3800, -3700, -3600, -3500, 0, 3300, 3200, 3100);
7688 Saux2.v = (vector signed short)(-3700, -3600, -3500, 0, 3300, 3200, 3100,-3800);
7690 b = vec_all_ne (Saux1.v, Saux2.v);
7693 bAux = bAux && (Saux1.e[i] != Saux2.e[i]);
7694 if (bAux != b) err = 1;
7696 # if defined (GCC_COMPILER)
7697 Saux1.v = (vector signed short){-3800, -3700, -3600, -3500, 0, 3300, 3200, 3100};
7698 Saux2.v = (vector signed short){-3700, -3600, -3500, 0, 3300, 3200, 3100,-3800};
7699 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
7700 Saux1.v = (vector signed short)(-3800, -3700, -3600, -3500, 0, 3300, 3200, 3100);
7701 Saux2.v = (vector signed short)(-3700, -3600, -3500, 0, 3300, 3200, 3100,-3800);
7703 b = vec_all_ne (Saux1.v, Saux2.v);
7706 bAux = bAux && (Saux1.e[i] != Saux2.e[i]);
7707 if (bAux != b) err = 1;
7710 printf("Function vec_all_ne [type short] ===> Error\n");
7712 printf("Function vec_all_ne [type short] ===> OK\n");
7716 # if defined (GCC_COMPILER)
7717 USaux1.v = (vector unsigned short){48000, 47000, 46000, 45000, 0, 3300, 3200, 3100};
7718 USaux2.v = (vector unsigned short){47000, 46000, 45000, 0, 3300, 3200, 3100,48000};
7719 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
7720 USaux1.v = (vector unsigned short)(48000, 47000, 46000, 45000, 0, 3300, 3200, 3100);
7721 USaux2.v = (vector unsigned short)(47000, 46000, 45000, 0, 3300, 3200, 3100,48000);
7723 b = vec_all_ne (USaux1.v, USaux2.v);
7726 bAux = bAux && (USaux1.e[i] != USaux2.e[i]);
7727 if (bAux != b) err = 1;
7729 # if defined (GCC_COMPILER)
7730 USaux1.v = (vector unsigned short){48000, 47000, 46000, 45000, 0, 3300, 3200, 3100};
7731 USaux2.v = (vector unsigned short){47000, 46000, 45000, 0, 3300, 3200, 3100,48000};
7732 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
7733 USaux1.v = (vector unsigned short)(48000, 47000, 46000, 45000, 0, 3300, 3200, 3100);
7734 USaux2.v = (vector unsigned short)(47000, 46000, 45000, 0, 3300, 3200, 3100,48000);
7736 b = vec_all_ne (USaux1.v, USaux2.v);
7739 bAux = bAux && (USaux1.e[i] != USaux2.e[i]);
7740 if (bAux != b) err = 1;
7742 # if defined (GCC_COMPILER)
7743 USaux1.v = (vector unsigned short){48000, 47000, 46000, 45000, 0, 3300, 3200, 3100};
7744 USaux2.v = (vector unsigned short){47000, 46000, 45000, 0, 3300, 3200, 3100,48000};
7745 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
7746 USaux1.v = (vector unsigned short)(48000, 47000, 46000, 45000, 0, 3300, 3200, 3100);
7747 USaux2.v = (vector unsigned short)(47000, 46000, 45000, 0, 3300, 3200, 3100,48000);
7749 b = vec_all_ne (USaux1.v, USaux2.v);
7752 bAux = bAux && (USaux1.e[i] != USaux2.e[i]);
7753 if (bAux != b) err = 1;
7756 printf("Function vec_all_ne [type unsigned short] ===> Error\n");
7758 printf("Function vec_all_ne [type unsigned short] ===> OK\n");
7762 # if defined (GCC_COMPILER)
7763 Iaux1.v = (vector signed int){-1003800, -1003700, 0, 1003300};
7764 Iaux2.v = (vector signed int){-1003700, 0, 1003300,-1003800};
7765 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
7766 Iaux1.v = (vector signed int)(-1003800, -1003700, 0, 1003300);
7767 Iaux2.v = (vector signed int)(-1003700, 0, 1003300,-1003800);
7769 b = vec_all_ne (Iaux1.v, Iaux2.v);
7772 bAux = bAux && (Iaux1.e[i] != Iaux2.e[i]);
7773 if (bAux != b) err = 1;
7775 # if defined (GCC_COMPILER)
7776 Iaux1.v = (vector signed int){-1003800, -1003700, 0, 1003300};
7777 Iaux2.v = (vector signed int){-1003700, 0, 1003300,-1003800};
7778 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
7779 Iaux1.v = (vector signed int)(-1003800, -1003700, 0, 1003300);
7780 Iaux2.v = (vector signed int)(-1003700, 0, 1003300,-1003800);
7782 b = vec_all_ne (Iaux1.v, Iaux2.v);
7785 bAux = bAux && (Iaux1.e[i] != Iaux2.e[i]);
7786 if (bAux != b) err = 1;
7788 # if defined (GCC_COMPILER)
7789 Iaux1.v= (vector signed int){-1003800, -1003700, 0, 1003300};
7790 Iaux2.v= (vector signed int){-1003700, 0, 1003300,-1003800};
7791 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
7792 Iaux1.v= (vector signed int)(-1003800, -1003700, 0, 1003300);
7793 Iaux2.v= (vector signed int)(-1003700, 0, 1003300,-1003800);
7795 b = vec_all_ne (Iaux1.v, Iaux2.v);
7798 bAux = bAux && (Iaux1.e[i] != Iaux2.e[i]);
7799 if (bAux != b) err = 1;
7802 printf("Function vec_all_ne [type int] ===> Error\n");
7804 printf("Function vec_all_ne [type int] ===> OK\n");
7808 # if defined (GCC_COMPILER)
7809 UIaux1.v = (vector unsigned int){0xFFFFF000, 12345678, 0, 1};
7810 UIaux2.v = (vector unsigned int){ 12345678, 0, 1,0xFFFFF000};
7811 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
7812 UIaux1.v = (vector unsigned int)(0xFFFFF000, 12345678, 0, 1);
7813 UIaux2.v = (vector unsigned int)( 12345678, 0, 1,0xFFFFF000);
7815 b = vec_all_ne (UIaux1.v, UIaux2.v);
7818 bAux = bAux && (UIaux1.e[i] != UIaux2.e[i]);
7819 if (bAux != b) err = 1;
7821 # if defined (GCC_COMPILER)
7822 UIaux1.v = (vector unsigned int){0xFFFFF000, 12345678, 0, 1};
7823 UIaux2.v = (vector unsigned int){ 12345678, 0, 1,0xFFFFF000};
7824 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
7825 UIaux1.v = (vector unsigned int)(0xFFFFF000, 12345678, 0, 1);
7826 UIaux2.v = (vector unsigned int)( 12345678, 0, 1,0xFFFFF000);
7828 b = vec_all_ne (UIaux1.v, UIaux2.v);
7831 bAux = bAux && (UIaux1.e[i] != UIaux2.e[i]);
7832 if (bAux != b) err = 1;
7834 # if defined (GCC_COMPILER)
7835 UIaux1.v = (vector unsigned int){0xFFFFF000, 12345678, 0, 1};
7836 UIaux2.v = (vector unsigned int){ 12345678, 0, 1,0xFFFFF000};
7837 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
7838 UIaux1.v = (vector unsigned int)(0xFFFFF000, 12345678, 0, 1);
7839 UIaux2.v = (vector unsigned int)( 12345678, 0, 1,0xFFFFF000);
7841 b = vec_all_ne (UIaux1.v, UIaux2.v);
7844 bAux = bAux && (UIaux1.e[i] != UIaux2.e[i]);
7845 if (bAux != b) err = 1;
7848 printf("Function vec_all_ne [type unsigned int] ===> Error\n");
7850 printf("Function vec_all_ne [type unsigned int] ===> OK\n");
7852 #if defined TEST_FLOATS
7854 # if defined (GCC_COMPILER)
7855 Faux1.v = (vector float) {-1.5, 1.0, 0.5, -3.999};
7856 Faux2.v = (vector float) { 1.0, 0.5, -3.999, -1.5};
7857 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
7858 Faux1.v = (vector float) (-1.5, 1.0, 0.5, -3.999);
7859 Faux2.v = (vector float) ( 1.0, 0.5, -3.999, -1.5);
7861 b = vec_all_ne (Faux1.v, Faux2.v);
7864 bAux = bAux && (Faux1.e[i] != Faux2.e[i]);
7865 if (bAux != b) err = 1;
7867 # if defined (GCC_COMPILER)
7868 Faux1.v = (vector float) {-1.5, 1.0, 0.5, -3.999};
7869 Faux2.v = (vector float) { 1.0, 0.5, -3.999, -1.5};
7870 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
7871 Faux1.v = (vector float) (-1.5, 1.0, 0.5, -3.999);
7872 Faux2.v = (vector float) ( 1.0, 0.5, -3.999, -1.5);
7874 b = vec_all_ne (Faux1.v, Faux2.v);
7877 bAux = bAux && (Faux1.e[i] != Faux2.e[i]);
7878 if (bAux != b) err = 1;
7880 # if defined (GCC_COMPILER)
7881 Faux1.v = (vector float) {-1.5, 1.0, 0.5, -3.999};
7882 Faux2.v = (vector float) { 1.0, 0.5, -3.999, -1.5};
7883 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
7884 Faux1.v = (vector float) (-1.5, 1.0, 0.5, -3.999);
7885 Faux2.v = (vector float) ( 1.0, 0.5, -3.999, -1.5);
7887 b = vec_all_ne (Faux1.v, Faux2.v);
7890 bAux = bAux && (Faux1.e[i] != Faux2.e[i]);
7891 if (bAux != b) err = 1;
7894 printf("Function vec_all_ne [type float] ===> Error\n");
7896 printf("Function vec_all_ne [type float] ===> OK\n");
7899 #if defined TEST_FLOATS
7900 /* Function vec_all_nge */
7901 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
7903 # if defined (GCC_COMPILER)
7904 Faux1.v = (vector float) {-1.5, 1.0, 0.5, -3.999};
7905 Faux2.v = (vector float) { 0.0, 3.5, 0.55, -1.5};
7906 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
7907 Faux1.v = (vector float) (-1.5, 1.0, 0.5, -3.999);
7908 Faux2.v = (vector float) ( 0.0, 3.5, 0.55, -1.5);
7910 b = vec_all_nge (Faux1.v, Faux2.v);
7913 bAux = bAux && (isnan(Faux1.e[i]) || isnan(Faux2.e[i]) ||
7914 (Faux1.e[i] < Faux2.e[i]));
7915 if (bAux != b) err = 1;
7917 # if defined (GCC_COMPILER)
7918 Faux1.v = (vector float) {-1.5, 1.0, 0.5, -3.999};
7919 Faux2.v = (vector float) { 0.0, 3.5, 0.55, -1.5};
7920 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
7921 Faux1.v = (vector float) (-1.5, 1.0, 0.5, -3.999);
7922 Faux2.v = (vector float) ( 0.0, 3.5, 0.55, -1.5);
7924 b = vec_all_nge (Faux1.v, Faux2.v);
7927 bAux = bAux && (isnan(Faux1.e[i]) || isnan(Faux2.e[i]) ||
7928 (Faux1.e[i] < Faux2.e[i]));
7929 if (bAux != b) err = 1;
7931 # if defined (GCC_COMPILER)
7932 Faux1.v = (vector float) {-1.5, 1.0, 0.5, -3.999};
7933 Faux2.v = (vector float) { 0.0, 3.5, 0.55, -1.5};
7934 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
7935 Faux1.v = (vector float) (-1.5, 1.0, 0.5, -3.999);
7936 Faux2.v = (vector float) ( 0.0, 3.5, 0.55, -1.5);
7938 b = vec_all_nge (Faux1.v, Faux2.v);
7941 bAux = bAux && (isnan(Faux1.e[i]) || isnan(Faux2.e[i]) ||
7942 (Faux1.e[i] < Faux2.e[i]));
7943 if (bAux != b) err = 1;
7945 # if defined (GCC_COMPILER)
7946 Faux1.v = (vector float) {-1.5, 1.0, 0.5, -3.999};
7947 Faux2.v = (vector float) { 0.0, 3.5, 0.55, -1.5};
7948 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
7949 Faux1.v = (vector float) (-1.5, 1.0, 0.5, -3.999);
7950 Faux2.v = (vector float) ( 0.0, 3.5, 0.55, -1.5);
7952 b = vec_all_nge (Faux1.v, Faux2.v);
7955 bAux = bAux && (isnan(Faux1.e[i]) || isnan(Faux2.e[i]) ||
7956 (Faux1.e[i] < Faux2.e[i]));
7957 if (bAux != b) err = 1;
7960 printf("Function vec_all_nge [type float] ===> Error\n");
7962 printf("Function vec_all_nge [type float] ===> OK\n");
7965 #if defined TEST_FLOATS
7966 /* Function vec_all_ngt */
7967 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
7969 # if defined (GCC_COMPILER)
7970 Faux1.v = (vector float) {-1.5, 1.0, 0.5, -3.999};
7971 Faux2.v = (vector float) { 0.0, 3.5, 0.55, -1.5};
7972 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
7973 Faux1.v = (vector float) (-1.5, 1.0, 0.5, -3.999);
7974 Faux2.v = (vector float) ( 0.0, 3.5, 0.55, -1.5);
7976 b = vec_all_ngt (Faux1.v, Faux2.v);
7980 (isnan(Faux1.e[i]) || isnan(Faux2.e[i]) || !(Faux1.e[i] > Faux2.e[i]));
7981 if (bAux != b) err = 1;
7983 # if defined (GCC_COMPILER)
7984 Faux1.v = (vector float) {-1.5, 1.0, 0.5, -3.999};
7985 Faux2.v = (vector float) { 0.0, 3.5, 0.55, -1.5};
7986 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
7987 Faux1.v = (vector float) (-1.5, 1.0, 0.5, -3.999);
7988 Faux2.v = (vector float) ( 0.0, 3.5, 0.55, -1.5);
7990 b = vec_all_ngt (Faux1.v, Faux2.v);
7994 (isnan(Faux1.e[i]) || isnan(Faux2.e[i]) || !(Faux1.e[i] > Faux2.e[i]));
7995 if (bAux != b) err = 1;
7997 # if defined (GCC_COMPILER)
7998 Faux1.v = (vector float) {-1.5, 1.0, 0.5, -3.999};
7999 Faux2.v = (vector float) { 0.0, 3.5, 0.55, -1.5};
8000 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
8001 Faux1.v = (vector float) (-1.5, 1.0, 0.5, -3.999);
8002 Faux2.v = (vector float) ( 0.0, 3.5, 0.55, -1.5);
8004 b = vec_all_ngt (Faux1.v, Faux2.v);
8008 (isnan(Faux1.e[i]) || isnan(Faux2.e[i]) || !(Faux1.e[i] > Faux2.e[i]));
8009 if (bAux!=b) err= 1;
8011 # if defined (GCC_COMPILER)
8012 Faux1.v = (vector float) {-1.5, 1.0, 0.5, -3.999};
8013 Faux2.v = (vector float) { 0.0, 3.5, 0.55, -1.5};
8014 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
8015 Faux1.v = (vector float) (-1.5, 1.0, 0.5, -3.999);
8016 Faux2.v = (vector float) ( 0.0, 3.5, 0.55, -1.5);
8018 b = vec_all_ngt (Faux1.v, Faux2.v);
8022 (isnan(Faux1.e[i]) || isnan(Faux2.e[i]) || !(Faux1.e[i] > Faux2.e[i]));
8023 if (bAux != b) err = 1;
8026 printf("Function vec_all_ngt [type float] ===> Error\n");
8028 printf("Function vec_all_ngt [type float] ===> OK\n");
8031 #if defined TEST_FLOATS
8032 /* Function vec_all_nle */
8033 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
8035 # if defined (GCC_COMPILER)
8036 Faux1.v = (vector float) { 0.0, 3.5, 0.55, -1.5};
8037 Faux2.v = (vector float) {-1.5, 1.0, 0.5, -3.999};
8038 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
8039 Faux1.v = (vector float) ( 0.0, 3.5, 0.55, -1.5);
8040 Faux2.v = (vector float) (-1.5, 1.0, 0.5, -3.999);
8042 b = vec_all_nle (Faux1.v, Faux2.v);
8046 (isnan(Faux1.e[i]) || isnan(Faux2.e[i]) || !(Faux1.e[i] <= Faux2.e[i]));
8047 if (bAux != b) err = 1;
8049 # if defined (GCC_COMPILER)
8050 Faux1.v = (vector float) { 0.0, 3.5, 0.55, -1.5};
8051 Faux2.v = (vector float) {-1.5, 1.0, 0.5, -3.999};
8052 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
8053 Faux1.v = (vector float) ( 0.0, 3.5, 0.55, -1.5);
8054 Faux2.v = (vector float) (-1.5, 1.0, 0.5, -3.999);
8056 b = vec_all_nle (Faux1.v, Faux2.v);
8060 (isnan(Faux1.e[i]) || isnan(Faux2.e[i]) || !(Faux1.e[i] <= Faux2.e[i]));
8061 if (bAux != b) err = 1;
8063 # if defined (GCC_COMPILER)
8064 Faux1.v = (vector float) { 0.0, 3.5, 0.55, -1.5};
8065 Faux2.v = (vector float) {-1.5, 1.0, 0.5, -3.999};
8066 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
8067 Faux1.v = (vector float) ( 0.0, 3.5, 0.55, -1.5);
8068 Faux2.v = (vector float) (-1.5, 1.0, 0.5, -3.999);
8070 b = vec_all_nle (Faux1.v, Faux2.v);
8074 (isnan(Faux1.e[i]) || isnan(Faux2.e[i]) || !(Faux1.e[i] <=Faux2.e[i]));
8075 if (bAux != b) err = 1;
8077 # if defined (GCC_COMPILER)
8078 Faux1.v = (vector float) { 0.0, 3.5, 0.55, -1.5};
8079 Faux2.v = (vector float) {-1.5, 1.0, NAN, -3.999};
8080 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
8081 Faux1.v = (vector float) ( 0.0, 3.5, 0.55, -1.5);
8082 Faux2.v = (vector float) (-1.5, 1.0, NAN, -3.999);
8084 b = vec_all_nle (Faux1.v, Faux2.v);
8088 (isnan(Faux1.e[i]) || isnan(Faux2.e[i]) || !(Faux1.e[i] <= Faux2.e[i]));
8089 if (bAux != b) err = 1;
8092 printf("Function vec_all_nle [type float] ===> Error\n");
8094 printf("Function vec_all_nle [type float] ===> OK\n");
8098 #if defined TEST_FLOATS
8099 /* Function vec_all_nlt */
8100 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
8102 # if defined (GCC_COMPILER)
8103 Faux1.v = (vector float) { 0.0, 3.5, 0.55, -1.5};
8104 Faux2.v = (vector float) {-1.5, 1.0, 0.5, -3.999};
8105 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
8106 Faux1.v = (vector float) ( 0.0, 3.5, 0.55, -1.5);
8107 Faux2.v = (vector float) (-1.5, 1.0, 0.5, -3.999);
8109 b = vec_all_nlt (Faux1.v, Faux2.v);
8113 (isnan(Faux1.e[i]) || isnan(Faux2.e[i]) || !(Faux1.e[i] < Faux2.e[i]));
8114 if (bAux != b) err = 1;
8116 # if defined (GCC_COMPILER)
8117 Faux1.v = (vector float) { 0.0, 3.5, 0.55, -1.5};
8118 Faux2.v = (vector float) {-1.5, 5.0, 0.5, -3.999};
8119 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
8120 Faux1.v = (vector float) ( 0.0, 3.5, 0.55, -1.5);
8121 Faux2.v = (vector float) (-1.5, 5.0, 0.5, -3.999);
8123 b = vec_all_nlt (Faux1.v, Faux2.v);
8127 (isnan(Faux1.e[i]) || isnan(Faux2.e[i]) || !(Faux1.e[i] < Faux2.e[i]));
8128 if (bAux != b) err = 1;
8130 # if defined (GCC_COMPILER)
8131 Faux1.v = (vector float) { 0.0, 3.5, 0.55, -1.5};
8132 Faux2.v = (vector float) {-1.5, 1.0, 0.55, -3.999};
8133 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
8134 Faux1.v = (vector float) ( 0.0, 3.5, 0.55, -1.5);
8135 Faux2.v = (vector float) (-1.5, 1.0, 0.55, -3.999);
8137 b = vec_all_nlt (Faux1.v, Faux2.v);
8141 (isnan(Faux1.e[i]) || isnan(Faux2.e[i]) || !(Faux1.e[i] < Faux2.e[i]));
8142 if (bAux != b) err = 1;
8144 # if defined (GCC_COMPILER)
8145 Faux1.v = (vector float) { 0.0, 3.5, 0.55, -1.5};
8146 Faux2.v = (vector float) {-1.5, 1.0, NAN, -3.999};
8147 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
8148 Faux1.v = (vector float) ( 0.0, 3.5, 0.55, -1.5);
8149 Faux2.v = (vector float) (-1.5, 1.0, NAN, -3.999);
8151 b = vec_all_nlt (Faux1.v, Faux2.v);
8155 (isnan(Faux1.e[i]) || isnan(Faux2.e[i]) || !(Faux1.e[i] < Faux2.e[i]));
8156 if (bAux != b) err = 1;
8159 printf("Function vec_all_nlt [type float] ===> Error\n");
8161 printf("Function vec_all_nlt [type float] ===> OK\n");
8165 #if defined TEST_FLOATS
8166 /* Function vec_all_numeric */
8167 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
8169 # if defined (GCC_COMPILER)
8170 Faux1.v = (vector float) {0.0, 3.5, 0.55, -1.5};
8171 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
8172 Faux1.v = (vector float) (0.0, 3.5, 0.55, -1.5);
8174 b = vec_all_numeric (Faux1.v);
8177 bAux = bAux && !isnan(Faux1.e[i]);
8178 if (bAux != b) err = 1;
8180 # if defined (GCC_COMPILER)
8181 Faux1.v = (vector float) {0.0, 3.5, 0.5, -1.5};
8182 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
8183 Faux1.v = (vector float) (0.0, 3.5, 0.5, -1.5);
8185 b = vec_all_numeric (Faux1.v);
8188 bAux = bAux && !isnan(Faux1.e[i]);
8189 if (bAux != b) err = 1;
8191 # if defined (GCC_COMPILER)
8192 Faux1.v = (vector float) {0.0, 3.5, NAN, -1.5};
8193 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
8194 Faux1.v = (vector float) (0.0, 3.5, NAN, -1.5);
8196 b = vec_all_numeric (Faux1.v);
8199 bAux = bAux && !isnan(Faux1.e[i]);
8200 if (bAux != b) err = 1;
8202 # if defined (GCC_COMPILER)
8203 Faux1.v = (vector float) {NAN, NAN, NAN, NAN};
8204 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
8205 Faux1.v = (vector float) (NAN, NAN, NAN, NAN);
8207 b = vec_all_numeric (Faux1.v);
8210 bAux = bAux && !isnan(Faux1.e[i]);
8211 if (bAux != b) err = 1;
8214 printf("Function vec_all_numeric [type float] ===> Error\n");
8216 printf("Function vec_all_numeric [type float] ===> OK\n");
8219 /* Function vec_any_eq */
8220 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
8224 b= vec_any_eq (Caux1.v, Caux2.v);
8226 for (i=0; i<16; i++)
8227 bAux= bAux || (Caux1.e[i]==Caux2.e[i]);
8228 if (bAux!=b) err= 1;
8232 b= vec_any_eq (Caux1.v, Caux2.v);
8234 for (i=0; i<16; i++)
8235 bAux= bAux || (Caux1.e[i]==Caux2.e[i]);
8236 if (bAux!=b) err= 1;
8239 printf("Function vec_any_eq [type char] ===> Error\n");
8241 printf("Function vec_any_eq [type char] ===> OK\n");
8247 b= vec_any_eq (UCaux1.v, UCaux2.v);
8249 for (i=0; i<16; i++)
8250 bAux= bAux || (UCaux1.e[i]==UCaux2.e[i]);
8251 if (bAux!=b) err= 1;
8255 b= vec_any_eq (UCaux1.v, UCaux2.v);
8257 for (i=0; i<16; i++)
8258 bAux= bAux || (UCaux1.e[i]==UCaux2.e[i]);
8259 if (bAux!=b) err= 1;
8262 printf("Function vec_any_eq [type unsigned char] ===> Error\n");
8264 printf("Function vec_any_eq [type unsigned char] ===> OK\n");
8270 b= vec_any_eq (Saux1.v, Saux2.v);
8273 bAux= bAux || (Saux1.e[i]==Saux2.e[i]);
8274 if (bAux!=b) err= 1;
8278 b= vec_any_eq (Saux1.v, Saux2.v);
8281 bAux= bAux || (Saux1.e[i]==Saux2.e[i]);
8282 if (bAux!=b) err= 1;
8285 printf("Function vec_any_eq [type short] ===> Error\n");
8287 printf("Function vec_any_eq [type short] ===> OK\n");
8293 b= vec_any_eq (USaux1.v, USaux2.v);
8296 bAux= bAux || (USaux1.e[i]==USaux2.e[i]);
8297 if (bAux!=b) err= 1;
8301 b= vec_any_eq (USaux1.v, USaux2.v);
8304 bAux= bAux || (USaux1.e[i]==USaux2.e[i]);
8305 if (bAux!=b) err= 1;
8308 printf("Function vec_any_eq [type unsigned short] ===> Error\n");
8310 printf("Function vec_any_eq [type unsigned short] ===> OK\n");
8316 b= vec_any_eq (Iaux1.v, Iaux2.v);
8319 bAux= bAux || (Iaux1.e[i]==Iaux2.e[i]);
8320 if (bAux!=b) err= 1;
8324 b= vec_any_eq (Iaux1.v, Iaux2.v);
8327 bAux= bAux || (Iaux1.e[i]==Iaux2.e[i]);
8328 if (bAux!=b) err= 1;
8331 printf("Function vec_any_eq [type int] ===> Error\n");
8333 printf("Function vec_any_eq [type int] ===> OK\n");
8339 b= vec_any_eq (UIaux1.v, UIaux2.v);
8342 bAux= bAux || (UIaux1.e[i]==UIaux2.e[i]);
8343 if (bAux!=b) err= 1;
8347 b= vec_any_eq (UIaux1.v, UIaux2.v);
8350 bAux= bAux || (UIaux1.e[i]==UIaux2.e[i]);
8351 if (bAux!=b) err= 1;
8354 printf("Function vec_any_eq [type unsigned int] ===> Error\n");
8356 printf("Function vec_any_eq [type unsigned int] ===> OK\n");
8359 #if defined TEST_FLOATS
8361 # if defined (GCC_COMPILER)
8362 Faux1.v = (vector float) {-1.5, 1.0, 0.5, -3.999};
8363 Faux2.v = (vector float) { 0.0, 3.5, 0.55, -1.5};
8364 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
8365 Faux1.v = (vector float) (-1.5, 1.0, 0.5, -3.999);
8366 Faux2.v = (vector float) ( 0.0, 3.5, 0.55, -1.5);
8368 b = vec_any_eq (Faux1.v, Faux2.v);
8371 bAux = bAux || (Faux1.e[i] == Faux2.e[i]);
8372 if (bAux != b) err = 1;
8374 # if defined (GCC_COMPILER)
8375 Faux1.v = (vector float) {-1.5, 1.0, 0.5, -3.999};
8376 Faux2.v = (vector float) { 0.0, 3.5, 0.5, -1.5};
8377 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
8378 Faux1.v = (vector float) (-1.5, 1.0, 0.5, -3.999);
8379 Faux2.v = (vector float) ( 0.0, 3.5, 0.5, -1.5);
8381 b= vec_any_eq (Faux1.v, Faux2.v);
8384 bAux= bAux || (Faux1.e[i]==Faux2.e[i]);
8385 if (bAux!=b) err= 1;
8388 printf("Function vec_any_eq [type float] ===> Error\n");
8390 printf("Function vec_any_eq [type float] ===> OK\n");
8393 /* Function vec_any_ge */
8394 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
8396 # if defined (GCC_COMPILER)
8397 Caux1.v= (vector signed char){-8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7};
8398 Caux2.v= (vector signed char){ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9};
8399 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
8400 Caux1.v= (vector signed char)(-8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7);
8401 Caux2.v= (vector signed char)( 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9);
8403 b= vec_any_ge (Caux1.v, Caux2.v);
8405 for (i=0; i<16; i++)
8406 bAux= bAux || (Caux1.e[i]>=Caux2.e[i]);
8407 if (bAux!=b) err= 1;
8409 # if defined (GCC_COMPILER)
8410 Caux1.v= (vector signed char){-8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7};
8411 Caux2.v= (vector signed char){ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9};
8412 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
8413 Caux1.v= (vector signed char)(-8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7);
8414 Caux2.v= (vector signed char)( 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9);
8416 b= vec_any_ge (Caux1.v, Caux2.v);
8418 for (i=0; i<16; i++)
8419 bAux= bAux || (Caux1.e[i]>=Caux2.e[i]);
8420 if (bAux!=b) err= 1;
8422 # if defined (GCC_COMPILER)
8423 Caux1.v= (vector signed char){-8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7};
8424 Caux2.v= (vector signed char){ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9};
8425 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
8426 Caux1.v= (vector signed char)(-8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7);
8427 Caux2.v= (vector signed char)( 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9);
8429 b= vec_any_ge (Caux1.v, Caux2.v);
8431 for (i=0; i<16; i++)
8432 bAux= bAux || (Caux1.e[i]>=Caux2.e[i]);
8433 if (bAux!=b) err= 1;
8436 printf("Function vec_any_ge [type char] ===> Error\n");
8438 printf("Function vec_any_ge [type char] ===> OK\n");
8442 # if defined (GCC_COMPILER)
8443 UCaux1.v= (vector unsigned char){200, 201, 206, 205, 204, 203, 202, 201, 200, 101, 102, 13, 14, 15, 16, 17};
8444 UCaux2.v= (vector unsigned char){250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250};
8445 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
8446 UCaux1.v= (vector unsigned char)(200, 201, 206, 205, 204, 203, 202, 201, 200, 101, 102, 13, 14, 15, 16, 17);
8447 UCaux2.v= (vector unsigned char)(250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250);
8449 b= vec_any_ge (UCaux1.v, UCaux2.v);
8451 for (i=0; i<16; i++)
8452 bAux= bAux || (UCaux1.e[i]>=UCaux2.e[i]);
8453 if (bAux!=b) err= 1;
8455 # if defined (GCC_COMPILER)
8456 UCaux1.v= (vector unsigned char){200, 201, 206, 205, 204, 203, 202, 201, 200, 101, 102, 13, 14, 15, 16, 17};
8457 UCaux2.v= (vector unsigned char){250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250};
8458 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
8459 UCaux1.v= (vector unsigned char)(200, 201, 206, 205, 204, 203, 202, 201, 200, 101, 102, 13, 14, 15, 16, 17);
8460 UCaux2.v= (vector unsigned char)(250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250);
8462 b= vec_any_ge (UCaux1.v, UCaux2.v);
8464 for (i=0; i<16; i++)
8465 bAux= bAux || (UCaux1.e[i]>=UCaux2.e[i]);
8466 if (bAux!=b) err= 1;
8468 # if defined (GCC_COMPILER)
8469 UCaux1.v= (vector unsigned char){200, 201, 206, 205, 204, 203, 202, 201, 200, 101, 102, 13, 14, 15, 16, 17};
8470 UCaux2.v= (vector unsigned char){250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250};
8471 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
8472 UCaux1.v= (vector unsigned char)(200, 201, 206, 205, 204, 203, 202, 201, 200, 101, 102, 13, 14, 15, 16, 17);
8473 UCaux2.v= (vector unsigned char)(250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250);
8475 b= vec_any_ge (UCaux1.v, UCaux2.v);
8477 for (i=0; i<16; i++)
8478 bAux= bAux || (UCaux1.e[i]>=UCaux2.e[i]);
8479 if (bAux!=b) err= 1;
8482 printf("Function vec_any_ge [type unsigned char] ===> Error\n");
8484 printf("Function vec_any_ge [type unsigned char] ===> OK\n");
8488 # if defined (GCC_COMPILER)
8489 Saux1.v= (vector signed short){-3800, -3700, -3600, -3500, 0, 3300, 3200, 3100};
8490 Saux2.v= (vector signed short){ 9000, 9000, 9000, 9000, 9000, 9000, 9000, 9000};
8491 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
8492 Saux1.v= (vector signed short)(-3800, -3700, -3600, -3500, 0, 3300, 3200, 3100);
8493 Saux2.v= (vector signed short)( 9000, 9000, 9000, 9000, 9000, 9000, 9000, 9000);
8495 b= vec_any_ge (Saux1.v, Saux2.v);
8498 bAux= bAux || (Saux1.e[i]>=Saux2.e[i]);
8499 if (bAux!=b) err= 1;
8501 # if defined (GCC_COMPILER)
8502 Saux1.v= (vector signed short){-3800, -3700, -3600, -3500, 0, 3300, 3200, 3100};
8503 Saux2.v= (vector signed short){ 9000, 9000, 9000, 9000, 9000, 9000, 9000, 9000};
8504 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
8505 Saux1.v= (vector signed short)(-3800, -3700, -3600, -3500, 0, 3300, 3200, 3100);
8506 Saux2.v= (vector signed short)( 9000, 9000, 9000, 9000, 9000, 9000, 9000, 9000);
8508 b= vec_any_ge (Saux1.v, Saux2.v);
8511 bAux= bAux || (Saux1.e[i]>=Saux2.e[i]);
8512 if (bAux!=b) err= 1;
8514 # if defined (GCC_COMPILER)
8515 Saux1.v= (vector signed short){-3800, -3700, -3600, -3500, 0, 3300, 3200, 3100};
8516 Saux2.v= (vector signed short){ 9000, 9000, 9000, 9000, 9000, 9000, 9000, 9000};
8517 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
8518 Saux1.v= (vector signed short)(-3800, -3700, -3600, -3500, 0, 3300, 3200, 3100);
8519 Saux2.v= (vector signed short)( 9000, 9000, 9000, 9000, 9000, 9000, 9000, 9000);
8521 b= vec_any_ge (Saux1.v, Saux2.v);
8524 bAux= bAux || (Saux1.e[i]>=Saux2.e[i]);
8525 if (bAux!=b) err= 1;
8528 printf("Function vec_any_ge [type short] ===> Error\n");
8530 printf("Function vec_any_ge [type short] ===> OK\n");
8534 # if defined (GCC_COMPILER)
8535 USaux1.v= (vector unsigned short){48000, 47000, 46000, 45000, 0, 3300, 3200, 3100};
8536 USaux2.v= (vector unsigned short){59000, 59000, 59000, 59000,59000, 9000, 9000, 9000};
8537 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
8538 USaux1.v= (vector unsigned short)(48000, 47000, 46000, 45000, 0, 3300, 3200, 3100);
8539 USaux2.v= (vector unsigned short)(59000, 59000, 59000, 59000,59000, 9000, 9000, 9000);
8541 b= vec_any_ge (USaux1.v, USaux2.v);
8544 bAux= bAux || (USaux1.e[i]>=USaux2.e[i]);
8545 if (bAux!=b) err= 1;
8547 # if defined (GCC_COMPILER)
8548 USaux1.v= (vector unsigned short){48000, 47000, 46000, 45000, 0, 3300, 3200, 3100};
8549 USaux2.v= (vector unsigned short){59000, 59000, 59000, 59000,59000, 9000, 9000, 9000};
8550 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
8551 USaux1.v= (vector unsigned short)(48000, 47000, 46000, 45000, 0, 3300, 3200, 3100);
8552 USaux2.v= (vector unsigned short)(59000, 59000, 59000, 59000,59000, 9000, 9000, 9000);
8554 b= vec_any_ge (USaux1.v, USaux2.v);
8557 bAux= bAux || (USaux1.e[i]>=USaux2.e[i]);
8558 if (bAux!=b) err= 1;
8560 # if defined (GCC_COMPILER)
8561 USaux1.v= (vector unsigned short){48000, 47000, 46000, 45000, 0, 3300, 3200, 3100};
8562 USaux2.v= (vector unsigned short){59000, 59000, 59000, 59000,59000, 9000, 9000, 9000};
8563 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
8564 USaux1.v= (vector unsigned short)(48000, 47000, 46000, 45000, 0, 3300, 3200, 3100);
8565 USaux2.v= (vector unsigned short)(59000, 59000, 59000, 59000,59000, 9000, 9000, 9000);
8567 b= vec_any_ge (USaux1.v, USaux2.v);
8570 bAux= bAux || (USaux1.e[i]>=USaux2.e[i]);
8571 if (bAux!=b) err= 1;
8574 printf("Function vec_any_ge [type unsigned short] ===> Error\n");
8576 printf("Function vec_any_ge [type unsigned short] ===> OK\n");
8580 # if defined (GCC_COMPILER)
8581 Iaux1.v= (vector signed int){-1003800, -1003700, 0,1003300};
8582 Iaux2.v= (vector signed int){ 9000000, 9000000, 9000000,9000000};
8583 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
8584 Iaux1.v= (vector signed int)(-1003800, -1003700, 0,1003300);
8585 Iaux2.v= (vector signed int)( 9000000, 9000000, 9000000,9000000);
8587 b= vec_any_ge (Iaux1.v, Iaux2.v);
8590 bAux= bAux || (Iaux1.e[i]>=Iaux2.e[i]);
8591 if (bAux!=b) err= 1;
8593 # if defined (GCC_COMPILER)
8594 Iaux1.v= (vector signed int){-1003800, -1003700, 0,1003300};
8595 Iaux2.v= (vector signed int){ 9000000, 9000000, 9000000,9000000};
8596 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
8597 Iaux1.v= (vector signed int)(-1003800, -1003700, 0,1003300);
8598 Iaux2.v= (vector signed int)( 9000000, 9000000, 9000000,9000000);
8600 b= vec_any_ge (Iaux1.v, Iaux2.v);
8603 bAux= bAux || (Iaux1.e[i]>=Iaux2.e[i]);
8604 if (bAux!=b) err= 1;
8606 # if defined (GCC_COMPILER)
8607 Iaux1.v= (vector signed int){-1003800, -1003700, 0,1003300};
8608 Iaux2.v= (vector signed int){ 9000000, 9000000, 9000000,9000000};
8609 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
8610 Iaux1.v= (vector signed int)(-1003800, -1003700, 0,1003300);
8611 Iaux2.v= (vector signed int)( 9000000, 9000000, 9000000,9000000);
8613 b= vec_any_ge (Iaux1.v, Iaux2.v);
8616 bAux= bAux || (Iaux1.e[i]>=Iaux2.e[i]);
8617 if (bAux!=b) err= 1;
8620 printf("Function vec_any_ge [type int] ===> Error\n");
8622 printf("Function vec_any_ge [type int] ===> OK\n");
8626 # if defined (GCC_COMPILER)
8627 UIaux1.v= (vector unsigned int){0xFFFFF000, 12345678, 0, 1};
8628 UIaux2.v= (vector unsigned int){0xFFFFFFF0, 20000000, 9, 9};
8629 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
8630 UIaux1.v= (vector unsigned int)(0xFFFFF000, 12345678, 0, 1);
8631 UIaux2.v= (vector unsigned int)(0xFFFFFFF0, 20000000, 9, 9);
8633 b= vec_any_ge (UIaux1.v, UIaux2.v);
8636 bAux= bAux || (UIaux1.e[i]>=UIaux2.e[i]);
8637 if (bAux!=b) err= 1;
8639 # if defined (GCC_COMPILER)
8640 UIaux1.v= (vector unsigned int){0xFFFFF000, 12345678, 0, 1};
8641 UIaux2.v= (vector unsigned int){0xFFFFFFF0, 20000000, 9, 9};
8642 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
8643 UIaux1.v= (vector unsigned int)(0xFFFFF000, 12345678, 0, 1);
8644 UIaux2.v= (vector unsigned int)(0xFFFFFFF0, 20000000, 9, 9);
8646 b= vec_any_ge (UIaux1.v, UIaux2.v);
8649 bAux= bAux || (UIaux1.e[i]>=UIaux2.e[i]);
8650 if (bAux!=b) err= 1;
8652 # if defined (GCC_COMPILER)
8653 UIaux1.v= (vector unsigned int){0xFFFFF000, 12345678, 0, 1};
8654 UIaux2.v= (vector unsigned int){0xFFFFFFF0, 20000000, 9, 9};
8655 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
8656 UIaux1.v= (vector unsigned int)(0xFFFFF000, 12345678, 0, 1);
8657 UIaux2.v= (vector unsigned int)(0xFFFFFFF0, 20000000, 9, 9);
8659 b= vec_any_ge (UIaux1.v, UIaux2.v);
8662 bAux= bAux || (UIaux1.e[i]>=UIaux2.e[i]);
8663 if (bAux!=b) err= 1;
8666 printf("Function vec_any_ge [type unsigned int] ===> Error\n");
8668 printf("Function vec_any_ge [type unsigned int] ===> OK\n");
8670 #if defined TEST_FLOATS
8672 # if defined (GCC_COMPILER)
8673 Faux1.v= (vector float) {-1.5, 1.0, 0.5, -3.999};
8674 Faux2.v= (vector float) { 0.0, 3.5, 0.55, -1.5};
8675 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
8676 Faux1.v= (vector float) (-1.5, 1.0, 0.5, -3.999);
8677 Faux2.v= (vector float) ( 0.0, 3.5, 0.55, -1.5);
8679 b= vec_any_ge (Faux1.v, Faux2.v);
8682 bAux= bAux || (Faux1.e[i]>=Faux2.e[i]);
8683 if (bAux!=b) err= 1;
8685 # if defined (GCC_COMPILER)
8686 Faux1.v= (vector float) {-1.5, 1.0, 0.5, -3.999};
8687 Faux2.v= (vector float) { 0.0, 3.5, 0.5, -1.5};
8688 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
8689 Faux1.v= (vector float) (-1.5, 1.0, 0.5, -3.999);
8690 Faux2.v= (vector float) ( 0.0, 3.5, 0.5, -1.5);
8692 b= vec_any_ge (Faux1.v, Faux2.v);
8695 bAux= bAux || (Faux1.e[i]>=Faux2.e[i]);
8696 if (bAux!=b) err= 1;
8698 # if defined (GCC_COMPILER)
8699 Faux1.v= (vector float) {-1.5, 1.0, 0.5, -3.999};
8700 Faux2.v= (vector float) { 0.0, 3.5,-0.5, -1.5};
8701 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
8702 Faux1.v= (vector float) (-1.5, 1.0, 0.5, -3.999);
8703 Faux2.v= (vector float) ( 0.0, 3.5,-0.5, -1.5);
8705 b= vec_any_ge (Faux1.v, Faux2.v);
8708 bAux= bAux || (Faux1.e[i]>=Faux2.e[i]);
8709 if (bAux!=b) err= 1;
8712 printf("Function vec_any_ge [type float] ===> Error\n");
8714 printf("Function vec_any_ge [type float] ===> OK\n");
8717 /* Function vec_any_gt */
8718 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
8720 # if defined (GCC_COMPILER)
8721 Caux1.v= (vector signed char){-8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7};
8722 Caux2.v= (vector signed char){ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9};
8723 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
8724 Caux1.v= (vector signed char)(-8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7);
8725 Caux2.v= (vector signed char)( 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9);
8727 b= vec_any_gt (Caux1.v, Caux2.v);
8729 for (i=0; i<16; i++)
8730 bAux= bAux || (Caux1.e[i]>Caux2.e[i]);
8731 if (bAux!=b) err= 1;
8733 # if defined (GCC_COMPILER)
8734 Caux1.v= (vector signed char){-8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7};
8735 Caux2.v= (vector signed char){ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9};
8736 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
8737 Caux1.v= (vector signed char)(-8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7);
8738 Caux2.v= (vector signed char)( 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9);
8740 b= vec_any_gt (Caux1.v, Caux2.v);
8742 for (i=0; i<16; i++)
8743 bAux= bAux || (Caux1.e[i]>Caux2.e[i]);
8744 if (bAux!=b) err= 1;
8746 # if defined (GCC_COMPILER)
8747 Caux1.v= (vector signed char){-8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7};
8748 Caux2.v= (vector signed char){ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9};
8749 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
8750 Caux1.v= (vector signed char)(-8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7);
8751 Caux2.v= (vector signed char)( 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9);
8753 b= vec_any_gt (Caux1.v, Caux2.v);
8755 for (i=0; i<16; i++)
8756 bAux= bAux || (Caux1.e[i]>Caux2.e[i]);
8757 if (bAux!=b) err= 1;
8760 printf("Function vec_any_gt [type char] ===> Error\n");
8762 printf("Function vec_any_gt [type char] ===> OK\n");
8766 # if defined (GCC_COMPILER)
8767 UCaux1.v= (vector unsigned char){200, 201, 206, 205, 204, 203, 202, 201, 200, 101, 102, 13, 14, 15, 16, 17};
8768 UCaux2.v= (vector unsigned char){250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250};
8769 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
8770 UCaux1.v= (vector unsigned char)(200, 201, 206, 205, 204, 203, 202, 201, 200, 101, 102, 13, 14, 15, 16, 17);
8771 UCaux2.v= (vector unsigned char)(250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250);
8773 b= vec_any_gt (UCaux1.v, UCaux2.v);
8775 for (i=0; i<16; i++)
8776 bAux= bAux || (UCaux1.e[i]>UCaux2.e[i]);
8777 if (bAux!=b) err= 1;
8779 # if defined (GCC_COMPILER)
8780 UCaux1.v= (vector unsigned char){200, 201, 206, 205, 204, 203, 202, 201, 200, 101, 102, 13, 14, 15, 16, 17};
8781 UCaux2.v= (vector unsigned char){250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250};
8782 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
8783 UCaux1.v= (vector unsigned char)(200, 201, 206, 205, 204, 203, 202, 201, 200, 101, 102, 13, 14, 15, 16, 17);
8784 UCaux2.v= (vector unsigned char)(250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250);
8786 b= vec_any_gt (UCaux1.v, UCaux2.v);
8788 for (i=0; i<16; i++)
8789 bAux= bAux || (UCaux1.e[i]>UCaux2.e[i]);
8790 if (bAux!=b) err= 1;
8792 # if defined (GCC_COMPILER)
8793 UCaux1.v= (vector unsigned char){200, 201, 206, 205, 204, 203, 202, 201, 200, 101, 102, 13, 14, 15, 16, 17};
8794 UCaux2.v= (vector unsigned char){250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250};
8795 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
8796 UCaux1.v= (vector unsigned char)(200, 201, 206, 205, 204, 203, 202, 201, 200, 101, 102, 13, 14, 15, 16, 17);
8797 UCaux2.v= (vector unsigned char)(250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250);
8799 b= vec_any_gt (UCaux1.v, UCaux2.v);
8801 for (i=0; i<16; i++)
8802 bAux= bAux || (UCaux1.e[i]>UCaux2.e[i]);
8803 if (bAux!=b) err= 1;
8806 printf("Function vec_any_gt [type unsigned char] ===> Error\n");
8808 printf("Function vec_any_gt [type unsigned char] ===> OK\n");
8812 # if defined (GCC_COMPILER)
8813 Saux1.v= (vector signed short){-3800, -3700, -3600, -3500, 0, 3300, 3200, 3100};
8814 Saux2.v= (vector signed short){ 9000, 9000, 9000, 9000, 9000, 9000, 9000, 9000};
8815 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
8816 Saux1.v= (vector signed short)(-3800, -3700, -3600, -3500, 0, 3300, 3200, 3100);
8817 Saux2.v= (vector signed short)( 9000, 9000, 9000, 9000, 9000, 9000, 9000, 9000);
8819 b= vec_any_gt (Saux1.v, Saux2.v);
8822 bAux= bAux || (Saux1.e[i]>Saux2.e[i]);
8823 if (bAux!=b) err= 1;
8825 # if defined (GCC_COMPILER)
8826 Saux1.v= (vector signed short){-3800, -3700, -3600, -3500, 0, 3300, 3200, 3100};
8827 Saux2.v= (vector signed short){ 9000, 9000, 9000, 9000, 9000, 9000, 9000, 9000};
8828 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
8829 Saux1.v= (vector signed short)(-3800, -3700, -3600, -3500, 0, 3300, 3200, 3100);
8830 Saux2.v= (vector signed short)( 9000, 9000, 9000, 9000, 9000, 9000, 9000, 9000);
8832 b= vec_any_gt (Saux1.v, Saux2.v);
8835 bAux= bAux || (Saux1.e[i]>Saux2.e[i]);
8836 if (bAux!=b) err= 1;
8838 # if defined (GCC_COMPILER)
8839 Saux1.v= (vector signed short){-3800, -3700, -3600, -3500, 0, 3300, 3200, 3100};
8840 Saux2.v= (vector signed short){ 9000, 9000, 9000, 9000, 9000, 9000, 9000, 9000};
8841 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
8842 Saux1.v= (vector signed short)(-3800, -3700, -3600, -3500, 0, 3300, 3200, 3100);
8843 Saux2.v= (vector signed short)( 9000, 9000, 9000, 9000, 9000, 9000, 9000, 9000);
8845 b= vec_any_gt (Saux1.v, Saux2.v);
8848 bAux= bAux || (Saux1.e[i]>Saux2.e[i]);
8849 if (bAux!=b) err= 1;
8852 printf("Function vec_any_gt [type short] ===> Error\n");
8854 printf("Function vec_any_gt [type short] ===> OK\n");
8858 # if defined (GCC_COMPILER)
8859 USaux1.v= (vector unsigned short){48000, 47000, 46000, 45000, 0, 3300, 3200, 3100};
8860 USaux2.v= (vector unsigned short){59000, 59000, 59000, 59000,59000, 9000, 9000, 9000};
8861 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
8862 USaux1.v= (vector unsigned short)(48000, 47000, 46000, 45000, 0, 3300, 3200, 3100);
8863 USaux2.v= (vector unsigned short)(59000, 59000, 59000, 59000,59000, 9000, 9000, 9000);
8865 b= vec_any_gt (USaux1.v, USaux2.v);
8868 bAux= bAux || (USaux1.e[i]>USaux2.e[i]);
8869 if (bAux!=b) err= 1;
8871 # if defined (GCC_COMPILER)
8872 USaux1.v= (vector unsigned short){48000, 47000, 46000, 45000, 0, 3300, 3200, 3100};
8873 USaux2.v= (vector unsigned short){59000, 59000, 59000, 59000,59000, 9000, 9000, 9000};
8874 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
8875 USaux1.v= (vector unsigned short)(48000, 47000, 46000, 45000, 0, 3300, 3200, 3100);
8876 USaux2.v= (vector unsigned short)(59000, 59000, 59000, 59000,59000, 9000, 9000, 9000);
8878 b= vec_any_gt (USaux1.v, USaux2.v);
8881 bAux= bAux || (USaux1.e[i]>USaux2.e[i]);
8882 if (bAux!=b) err= 1;
8884 # if defined (GCC_COMPILER)
8885 USaux1.v= (vector unsigned short){48000, 47000, 46000, 45000, 0, 3300, 3200, 3100};
8886 USaux2.v= (vector unsigned short){59000, 59000, 59000, 59000,59000, 9000, 9000, 9000};
8887 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
8888 USaux1.v= (vector unsigned short)(48000, 47000, 46000, 45000, 0, 3300, 3200, 3100);
8889 USaux2.v= (vector unsigned short)(59000, 59000, 59000, 59000,59000, 9000, 9000, 9000);
8891 b= vec_any_gt (USaux1.v, USaux2.v);
8894 bAux= bAux || (USaux1.e[i]>USaux2.e[i]);
8895 if (bAux!=b) err= 1;
8898 printf("Function vec_any_gt [type unsigned short] ===> Error\n");
8900 printf("Function vec_any_gt [type unsigned short] ===> OK\n");
8904 # if defined (GCC_COMPILER)
8905 Iaux1.v= (vector signed int){-1003800, -1003700, 0,1003300};
8906 Iaux2.v= (vector signed int){ 9000000, 9000000, 9000000,9000000};
8907 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
8908 Iaux1.v= (vector signed int)(-1003800, -1003700, 0,1003300);
8909 Iaux2.v= (vector signed int)( 9000000, 9000000, 9000000,9000000);
8911 b= vec_any_gt (Iaux1.v, Iaux2.v);
8914 bAux= bAux || (Iaux1.e[i]>Iaux2.e[i]);
8915 if (bAux!=b) err= 1;
8917 # if defined (GCC_COMPILER)
8918 Iaux1.v= (vector signed int){-1003800, -1003700, 0,1003300};
8919 Iaux2.v= (vector signed int){ 9000000, 9000000, 9000000,9000000};
8920 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
8921 Iaux1.v= (vector signed int)(-1003800, -1003700, 0,1003300);
8922 Iaux2.v= (vector signed int)( 9000000, 9000000, 9000000,9000000);
8924 b= vec_any_gt (Iaux1.v, Iaux2.v);
8927 bAux= bAux || (Iaux1.e[i]>Iaux2.e[i]);
8928 if (bAux!=b) err= 1;
8930 # if defined (GCC_COMPILER)
8931 Iaux1.v= (vector signed int){-1003800, -1003700, 0,1003300};
8932 Iaux2.v= (vector signed int){ 9000000, 9000000, 9000000,9000000};
8933 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
8934 Iaux1.v= (vector signed int)(-1003800, -1003700, 0,1003300);
8935 Iaux2.v= (vector signed int)( 9000000, 9000000, 9000000,9000000);
8937 b= vec_any_gt (Iaux1.v, Iaux2.v);
8940 bAux= bAux || (Iaux1.e[i]>Iaux2.e[i]);
8941 if (bAux!=b) err= 1;
8944 printf("Function vec_any_gt [type int] ===> Error\n");
8946 printf("Function vec_any_gt [type int] ===> OK\n");
8950 # if defined (GCC_COMPILER)
8951 UIaux1.v= (vector unsigned int){0xFFFFF000, 12345678, 0, 1};
8952 UIaux2.v= (vector unsigned int){0xFFFFFFF0, 20000000, 9, 9};
8953 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
8954 UIaux1.v= (vector unsigned int)(0xFFFFF000, 12345678, 0, 1);
8955 UIaux2.v= (vector unsigned int)(0xFFFFFFF0, 20000000, 9, 9);
8957 b= vec_any_gt (UIaux1.v, UIaux2.v);
8960 bAux= bAux || (UIaux1.e[i]>UIaux2.e[i]);
8961 if (bAux!=b) err= 1;
8963 # if defined (GCC_COMPILER)
8964 UIaux1.v= (vector unsigned int){0xFFFFF000, 12345678, 0, 1};
8965 UIaux2.v= (vector unsigned int){0xFFFFFFF0, 20000000, 9, 9};
8966 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
8967 UIaux1.v= (vector unsigned int)(0xFFFFF000, 12345678, 0, 1);
8968 UIaux2.v= (vector unsigned int)(0xFFFFFFF0, 20000000, 9, 9);
8970 b= vec_any_gt (UIaux1.v, UIaux2.v);
8973 bAux= bAux || (UIaux1.e[i]>UIaux2.e[i]);
8974 if (bAux!=b) err= 1;
8976 # if defined (GCC_COMPILER)
8977 UIaux1.v= (vector unsigned int){0xFFFFF000, 12345678, 0, 1};
8978 UIaux2.v= (vector unsigned int){0xFFFFFFF0, 20000000, 9, 9};
8979 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
8980 UIaux1.v= (vector unsigned int)(0xFFFFF000, 12345678, 0, 1);
8981 UIaux2.v= (vector unsigned int)(0xFFFFFFF0, 20000000, 9, 9);
8983 b= vec_any_gt (UIaux1.v, UIaux2.v);
8986 bAux= bAux || (UIaux1.e[i]>UIaux2.e[i]);
8987 if (bAux!=b) err= 1;
8990 printf("Function vec_any_gt [type unsigned int] ===> Error\n");
8992 printf("Function vec_any_gt [type unsigned int] ===> OK\n");
8994 #if defined TEST_FLOATS
8996 # if defined (GCC_COMPILER)
8997 Faux1.v= (vector float) {-1.5, 1.0, 0.5, -3.999};
8998 Faux2.v= (vector float) { 0.0, 3.5, 0.55, -1.5};
8999 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
9000 Faux1.v= (vector float) (-1.5, 1.0, 0.5, -3.999);
9001 Faux2.v= (vector float) ( 0.0, 3.5, 0.55, -1.5);
9003 b= vec_any_gt (Faux1.v, Faux2.v);
9006 bAux= bAux || (Faux1.e[i]>Faux2.e[i]);
9007 if (bAux!=b) err= 1;
9009 # if defined (GCC_COMPILER)
9010 Faux1.v= (vector float) {-1.5, 1.0, 0.5, -3.999};
9011 Faux2.v= (vector float) { 0.0, 3.5, 0.5, -1.5};
9012 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
9013 Faux1.v= (vector float) (-1.5, 1.0, 0.5, -3.999);
9014 Faux2.v= (vector float) ( 0.0, 3.5, 0.5, -1.5);
9016 b= vec_any_gt (Faux1.v, Faux2.v);
9019 bAux= bAux || (Faux1.e[i]>Faux2.e[i]);
9020 if (bAux!=b) err= 1;
9022 # if defined (GCC_COMPILER)
9023 Faux1.v= (vector float) {-1.5, 1.0, 0.5, -3.999};
9024 Faux2.v= (vector float) { 0.0, 3.5,-0.5, -1.5};
9025 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
9026 Faux1.v= (vector float) (-1.5, 1.0, 0.5, -3.999);
9027 Faux2.v= (vector float) ( 0.0, 3.5,-0.5, -1.5);
9029 b= vec_any_gt (Faux1.v, Faux2.v);
9032 bAux= bAux || (Faux1.e[i]>Faux2.e[i]);
9033 if (bAux!=b) err= 1;
9036 printf("Function vec_any_gt [type float] ===> Error\n");
9038 printf("Function vec_any_gt [type float] ===> OK\n");
9042 /* Function vec_any_le */
9043 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
9045 # if defined (GCC_COMPILER)
9046 Caux2.v= (vector signed char){-8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7};
9047 Caux1.v= (vector signed char){ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9};
9048 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
9049 Caux2.v= (vector signed char)(-8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7);
9050 Caux1.v= (vector signed char)( 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9);
9052 b= vec_any_le (Caux1.v, Caux2.v);
9054 for (i=0; i<16; i++)
9055 bAux= bAux || (Caux1.e[i]<=Caux2.e[i]);
9056 if (bAux!=b) err= 1;
9058 # if defined (GCC_COMPILER)
9059 Caux2.v= (vector signed char){-8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7};
9060 Caux1.v= (vector signed char){ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9};
9061 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
9062 Caux2.v= (vector signed char)(-8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7);
9063 Caux1.v= (vector signed char)( 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9);
9065 b= vec_any_le (Caux1.v, Caux2.v);
9067 for (i=0; i<16; i++)
9068 bAux= bAux || (Caux1.e[i]<=Caux2.e[i]);
9069 if (bAux!=b) err= 1;
9071 # if defined (GCC_COMPILER)
9072 Caux2.v= (vector signed char){-8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7};
9073 Caux1.v= (vector signed char){ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9};
9074 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
9075 Caux2.v= (vector signed char)(-8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7);
9076 Caux1.v= (vector signed char)( 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9);
9078 b= vec_any_le (Caux1.v, Caux2.v);
9080 for (i=0; i<16; i++)
9081 bAux= bAux || (Caux1.e[i]<=Caux2.e[i]);
9082 if (bAux!=b) err= 1;
9085 printf("Function vec_any_le [type char] ===> Error\n");
9087 printf("Function vec_any_le [type char] ===> OK\n");
9091 # if defined (GCC_COMPILER)
9092 UCaux2.v= (vector unsigned char){200, 201, 206, 205, 204, 203, 202, 201, 200, 101, 102, 13, 14, 15, 16, 17};
9093 UCaux1.v= (vector unsigned char){250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250};
9094 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
9095 UCaux2.v= (vector unsigned char)(200, 201, 206, 205, 204, 203, 202, 201, 200, 101, 102, 13, 14, 15, 16, 17);
9096 UCaux1.v= (vector unsigned char)(250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250);
9098 b= vec_any_le (UCaux1.v, UCaux2.v);
9100 for (i=0; i<16; i++)
9101 bAux= bAux || (UCaux1.e[i]<=UCaux2.e[i]);
9102 if (bAux!=b) err= 1;
9104 # if defined (GCC_COMPILER)
9105 UCaux2.v= (vector unsigned char){200, 201, 206, 205, 204, 203, 202, 201, 200, 101, 102, 13, 14, 15, 16, 17};
9106 UCaux1.v= (vector unsigned char){250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250};
9107 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
9108 UCaux2.v= (vector unsigned char)(200, 201, 206, 205, 204, 203, 202, 201, 200, 101, 102, 13, 14, 15, 16, 17);
9109 UCaux1.v= (vector unsigned char)(250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250);
9111 b= vec_any_le (UCaux1.v, UCaux2.v);
9113 for (i=0; i<16; i++)
9114 bAux= bAux || (UCaux1.e[i]<=UCaux2.e[i]);
9115 if (bAux!=b) err= 1;
9117 # if defined (GCC_COMPILER)
9118 UCaux2.v= (vector unsigned char){200, 201, 206, 205, 204, 203, 202, 201, 200, 101, 102, 13, 14, 15, 16, 17};
9119 UCaux1.v= (vector unsigned char){250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250};
9120 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
9121 UCaux2.v= (vector unsigned char)(200, 201, 206, 205, 204, 203, 202, 201, 200, 101, 102, 13, 14, 15, 16, 17);
9122 UCaux1.v= (vector unsigned char)(250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250);
9124 b= vec_any_le (UCaux1.v, UCaux2.v);
9126 for (i=0; i<16; i++)
9127 bAux= bAux || (UCaux1.e[i]<=UCaux2.e[i]);
9128 if (bAux!=b) err= 1;
9131 printf("Function vec_any_le [type unsigned char] ===> Error\n");
9133 printf("Function vec_any_le [type unsigned char] ===> OK\n");
9137 # if defined (GCC_COMPILER)
9138 Saux2.v= (vector signed short){-3800, -3700, -3600, -3500, 0, 3300, 3200, 3100};
9139 Saux1.v= (vector signed short){ 9000, 9000, 9000, 9000, 9000, 9000, 9000, 9000};
9140 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
9141 Saux2.v= (vector signed short)(-3800, -3700, -3600, -3500, 0, 3300, 3200, 3100);
9142 Saux1.v= (vector signed short)( 9000, 9000, 9000, 9000, 9000, 9000, 9000, 9000);
9144 b= vec_any_le (Saux1.v, Saux2.v);
9147 bAux= bAux || (Saux1.e[i]<=Saux2.e[i]);
9148 if (bAux!=b) err= 1;
9150 # if defined (GCC_COMPILER)
9151 Saux2.v= (vector signed short){-3800, -3700, -3600, -3500, 0, 3300, 3200, 3100};
9152 Saux1.v= (vector signed short){ 9000, 9000, 9000, 9000, 9000, 9000, 9000, 9000};
9153 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
9154 Saux2.v= (vector signed short)(-3800, -3700, -3600, -3500, 0, 3300, 3200, 3100);
9155 Saux1.v= (vector signed short)( 9000, 9000, 9000, 9000, 9000, 9000, 9000, 9000);
9157 b= vec_any_le (Saux1.v, Saux2.v);
9160 bAux= bAux || (Saux1.e[i]<=Saux2.e[i]);
9161 if (bAux!=b) err= 1;
9163 # if defined (GCC_COMPILER)
9164 Saux2.v= (vector signed short){-3800, -3700, -3600, -3500, 0, 3300, 3200, 3100};
9165 Saux1.v= (vector signed short){ 9000, 9000, 9000, 9000, 9000, 9000, 9000, 9000};
9166 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
9167 Saux2.v= (vector signed short)(-3800, -3700, -3600, -3500, 0, 3300, 3200, 3100);
9168 Saux1.v= (vector signed short)( 9000, 9000, 9000, 9000, 9000, 9000, 9000, 9000);
9170 b= vec_any_le (Saux1.v, Saux2.v);
9173 bAux= bAux || (Saux1.e[i]<=Saux2.e[i]);
9174 if (bAux!=b) err= 1;
9177 printf("Function vec_any_le [type short] ===> Error\n");
9179 printf("Function vec_any_le [type short] ===> OK\n");
9183 # if defined (GCC_COMPILER)
9184 USaux2.v= (vector unsigned short){48000, 47000, 46000, 45000, 0, 3300, 3200, 3100};
9185 USaux1.v= (vector unsigned short){59000, 59000, 59000, 59000,59000, 9000, 9000, 9000};
9186 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
9187 USaux2.v= (vector unsigned short)(48000, 47000, 46000, 45000, 0, 3300, 3200, 3100);
9188 USaux1.v= (vector unsigned short)(59000, 59000, 59000, 59000,59000, 9000, 9000, 9000);
9190 b= vec_any_le (USaux1.v, USaux2.v);
9193 bAux= bAux || (USaux1.e[i]<=USaux2.e[i]);
9194 if (bAux!=b) err= 1;
9196 # if defined (GCC_COMPILER)
9197 USaux2.v= (vector unsigned short){48000, 47000, 46000, 45000, 0, 3300, 3200, 3100};
9198 USaux1.v= (vector unsigned short){59000, 59000, 59000, 59000,59000, 9000, 9000, 9000};
9199 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
9200 USaux2.v= (vector unsigned short)(48000, 47000, 46000, 45000, 0, 3300, 3200, 3100);
9201 USaux1.v= (vector unsigned short)(59000, 59000, 59000, 59000,59000, 9000, 9000, 9000);
9203 b= vec_any_le (USaux1.v, USaux2.v);
9206 bAux= bAux || (USaux1.e[i]<=USaux2.e[i]);
9207 if (bAux!=b) err= 1;
9209 # if defined (GCC_COMPILER)
9210 USaux2.v= (vector unsigned short){48000, 47000, 46000, 45000, 0, 3300, 3200, 3100};
9211 USaux1.v= (vector unsigned short){59000, 59000, 59000, 59000,59000, 9000, 9000, 9000};
9212 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
9213 USaux2.v= (vector unsigned short)(48000, 47000, 46000, 45000, 0, 3300, 3200, 3100);
9214 USaux1.v= (vector unsigned short)(59000, 59000, 59000, 59000,59000, 9000, 9000, 9000);
9216 b= vec_any_le (USaux1.v, USaux2.v);
9219 bAux= bAux || (USaux1.e[i]<=USaux2.e[i]);
9220 if (bAux!=b) err= 1;
9223 printf("Function vec_any_le [type unsigned short] ===> Error\n");
9225 printf("Function vec_any_le [type unsigned short] ===> OK\n");
9229 # if defined (GCC_COMPILER)
9230 Iaux2.v= (vector signed int){-1003800, -1003700, 0,1003300};
9231 Iaux1.v= (vector signed int){ 9000000, 9000000, 9000000,9000000};
9232 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
9233 Iaux2.v= (vector signed int)(-1003800, -1003700, 0,1003300);
9234 Iaux1.v= (vector signed int)( 9000000, 9000000, 9000000,9000000);
9236 b= vec_any_le (Iaux1.v, Iaux2.v);
9239 bAux= bAux || (Iaux1.e[i]<=Iaux2.e[i]);
9240 if (bAux!=b) err= 1;
9242 # if defined (GCC_COMPILER)
9243 Iaux2.v= (vector signed int){-1003800, -1003700, 0,1003300};
9244 Iaux1.v= (vector signed int){ 9000000, 9000000, 9000000,9000000};
9245 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
9246 Iaux2.v= (vector signed int)(-1003800, -1003700, 0,1003300);
9247 Iaux1.v= (vector signed int)( 9000000, 9000000, 9000000,9000000);
9249 b= vec_any_le (Iaux1.v, Iaux2.v);
9252 bAux= bAux || (Iaux1.e[i]<=Iaux2.e[i]);
9253 if (bAux!=b) err= 1;
9255 # if defined (GCC_COMPILER)
9256 Iaux2.v= (vector signed int){-1003800, -1003700, 0,1003300};
9257 Iaux1.v= (vector signed int){ 9000000, 9000000, 9000000,9000000};
9258 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
9259 Iaux2.v= (vector signed int)(-1003800, -1003700, 0,1003300);
9260 Iaux1.v= (vector signed int)( 9000000, 9000000, 9000000,9000000);
9262 b= vec_any_le (Iaux1.v, Iaux2.v);
9265 bAux= bAux || (Iaux1.e[i]<=Iaux2.e[i]);
9266 if (bAux!=b) err= 1;
9269 printf("Function vec_any_le [type int] ===> Error\n");
9271 printf("Function vec_any_le [type int] ===> OK\n");
9275 # if defined (GCC_COMPILER)
9276 UIaux2.v= (vector unsigned int){0xFFFFF000, 12345678, 0, 1};
9277 UIaux1.v= (vector unsigned int){0xFFFFFFF0, 20000000, 9, 9};
9278 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
9279 UIaux2.v= (vector unsigned int)(0xFFFFF000, 12345678, 0, 1);
9280 UIaux1.v= (vector unsigned int)(0xFFFFFFF0, 20000000, 9, 9);
9282 b= vec_any_le (UIaux1.v, UIaux2.v);
9285 bAux= bAux || (UIaux1.e[i]<=UIaux2.e[i]);
9286 if (bAux!=b) err= 1;
9288 # if defined (GCC_COMPILER)
9289 UIaux2.v= (vector unsigned int){0xFFFFF000, 12345678, 0, 1};
9290 UIaux1.v= (vector unsigned int){0xFFFFFFF0, 20000000, 9, 9};
9291 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
9292 UIaux2.v= (vector unsigned int)(0xFFFFF000, 12345678, 0, 1);
9293 UIaux1.v= (vector unsigned int)(0xFFFFFFF0, 20000000, 9, 9);
9295 b= vec_any_le (UIaux1.v, UIaux2.v);
9298 bAux= bAux || (UIaux1.e[i]<=UIaux2.e[i]);
9299 if (bAux!=b) err= 1;
9301 # if defined (GCC_COMPILER)
9302 UIaux2.v= (vector unsigned int){0xFFFFF000, 12345678, 0, 1};
9303 UIaux1.v= (vector unsigned int){0xFFFFFFF0, 20000000, 9, 9};
9304 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
9305 UIaux2.v= (vector unsigned int)(0xFFFFF000, 12345678, 0, 1);
9306 UIaux1.v= (vector unsigned int)(0xFFFFFFF0, 20000000, 9, 9);
9308 b= vec_any_le (UIaux1.v, UIaux2.v);
9311 bAux= bAux || (UIaux1.e[i]<=UIaux2.e[i]);
9312 if (bAux!=b) err= 1;
9315 printf("Function vec_any_le [type unsigned int] ===> Error\n");
9317 printf("Function vec_any_le [type unsigned int] ===> OK\n");
9319 #if defined TEST_FLOATS
9321 # if defined (GCC_COMPILER)
9322 Faux2.v= (vector float) {-1.5, 1.0, 0.5, -3.999};
9323 Faux1.v= (vector float) { 0.0, 3.5, 0.55, -1.5};
9324 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
9325 Faux2.v= (vector float) (-1.5, 1.0, 0.5, -3.999);
9326 Faux1.v= (vector float) ( 0.0, 3.5, 0.55, -1.5);
9328 b= vec_any_le (Faux1.v, Faux2.v);
9331 bAux= bAux || (Faux1.e[i]<=Faux2.e[i]);
9332 if (bAux!=b) err= 1;
9334 # if defined (GCC_COMPILER)
9335 Faux2.v= (vector float) {-1.5, 1.0, 0.5, -3.999};
9336 Faux1.v= (vector float) { 0.0, 3.5, 0.5, -1.5};
9337 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
9338 Faux2.v= (vector float) (-1.5, 1.0, 0.5, -3.999);
9339 Faux1.v= (vector float) ( 0.0, 3.5, 0.5, -1.5);
9341 b= vec_any_le (Faux1.v, Faux2.v);
9344 bAux= bAux || (Faux1.e[i]<=Faux2.e[i]);
9345 if (bAux!=b) err= 1;
9347 # if defined (GCC_COMPILER)
9348 Faux2.v= (vector float) {-1.5, 1.0, 0.5, -3.999};
9349 Faux1.v= (vector float) { 0.0, 3.5,-0.5, -1.5};
9350 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
9351 Faux2.v= (vector float) (-1.5, 1.0, 0.5, -3.999);
9352 Faux1.v= (vector float) ( 0.0, 3.5,-0.5, -1.5);
9354 b= vec_any_le (Faux1.v, Faux2.v);
9357 bAux= bAux || (Faux1.e[i]<=Faux2.e[i]);
9358 if (bAux!=b) err= 1;
9361 printf("Function vec_any_le [type float] ===> Error\n");
9363 printf("Function vec_any_le [type float] ===> OK\n");
9367 /* Function vec_any_lt */
9368 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
9370 # if defined (GCC_COMPILER)
9371 Caux2.v= (vector signed char){-8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7};
9372 Caux1.v= (vector signed char){ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9};
9373 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
9374 Caux2.v= (vector signed char)(-8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7);
9375 Caux1.v= (vector signed char)( 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9);
9377 b= vec_any_lt (Caux1.v, Caux2.v);
9379 for (i=0; i<16; i++)
9380 bAux= bAux || (Caux1.e[i]<Caux2.e[i]);
9381 if (bAux!=b) err= 1;
9383 # if defined (GCC_COMPILER)
9384 Caux2.v= (vector signed char){-8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7};
9385 Caux1.v= (vector signed char){ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9};
9386 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
9387 Caux2.v= (vector signed char)(-8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7);
9388 Caux1.v= (vector signed char)( 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9);
9390 b= vec_any_lt (Caux1.v, Caux2.v);
9392 for (i=0; i<16; i++)
9393 bAux= bAux || (Caux1.e[i]<Caux2.e[i]);
9394 if (bAux!=b) err= 1;
9396 # if defined (GCC_COMPILER)
9397 Caux2.v= (vector signed char){-8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7};
9398 Caux1.v= (vector signed char){ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9};
9399 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
9400 Caux2.v= (vector signed char)(-8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7);
9401 Caux1.v= (vector signed char)( 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9);
9403 b= vec_any_lt (Caux1.v, Caux2.v);
9405 for (i=0; i<16; i++)
9406 bAux= bAux || (Caux1.e[i]<Caux2.e[i]);
9407 if (bAux!=b) err= 1;
9410 printf("Function vec_any_lt [type char] ===> Error\n");
9412 printf("Function vec_any_lt [type char] ===> OK\n");
9416 # if defined (GCC_COMPILER)
9417 UCaux2.v= (vector unsigned char){200, 201, 206, 205, 204, 203, 202, 201, 200, 101, 102, 13, 14, 15, 16, 17};
9418 UCaux1.v= (vector unsigned char){250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250};
9419 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
9420 UCaux2.v= (vector unsigned char)(200, 201, 206, 205, 204, 203, 202, 201, 200, 101, 102, 13, 14, 15, 16, 17);
9421 UCaux1.v= (vector unsigned char)(250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250);
9423 b= vec_any_lt (UCaux1.v, UCaux2.v);
9425 for (i=0; i<16; i++)
9426 bAux= bAux || (UCaux1.e[i]<UCaux2.e[i]);
9427 if (bAux!=b) err= 1;
9429 # if defined (GCC_COMPILER)
9430 UCaux2.v= (vector unsigned char){200, 201, 206, 205, 204, 203, 202, 201, 200, 101, 102, 13, 14, 15, 16, 17};
9431 UCaux1.v= (vector unsigned char){250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250};
9432 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
9433 UCaux2.v= (vector unsigned char)(200, 201, 206, 205, 204, 203, 202, 201, 200, 101, 102, 13, 14, 15, 16, 17);
9434 UCaux1.v= (vector unsigned char)(250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250);
9436 b= vec_any_lt (UCaux1.v, UCaux2.v);
9438 for (i=0; i<16; i++)
9439 bAux= bAux || (UCaux1.e[i]<UCaux2.e[i]);
9440 if (bAux!=b) err= 1;
9442 # if defined (GCC_COMPILER)
9443 UCaux2.v= (vector unsigned char){200, 201, 206, 205, 204, 203, 202, 201, 200, 101, 102, 13, 14, 15, 16, 17};
9444 UCaux1.v= (vector unsigned char){250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250};
9445 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
9446 UCaux2.v= (vector unsigned char)(200, 201, 206, 205, 204, 203, 202, 201, 200, 101, 102, 13, 14, 15, 16, 17);
9447 UCaux1.v= (vector unsigned char)(250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250);
9449 b= vec_any_lt (UCaux1.v, UCaux2.v);
9451 for (i=0; i<16; i++)
9452 bAux= bAux || (UCaux1.e[i]<UCaux2.e[i]);
9453 if (bAux!=b) err= 1;
9456 printf("Function vec_any_lt [type unsigned char] ===> Error\n");
9458 printf("Function vec_any_lt [type unsigned char] ===> OK\n");
9462 # if defined (GCC_COMPILER)
9463 Saux2.v= (vector signed short){-3800, -3700, -3600, -3500, 0, 3300, 3200, 3100};
9464 Saux1.v= (vector signed short){ 9000, 9000, 9000, 9000, 9000, 9000, 9000, 9000};
9465 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
9466 Saux2.v= (vector signed short)(-3800, -3700, -3600, -3500, 0, 3300, 3200, 3100);
9467 Saux1.v= (vector signed short)( 9000, 9000, 9000, 9000, 9000, 9000, 9000, 9000);
9469 b= vec_any_lt (Saux1.v, Saux2.v);
9472 bAux= bAux || (Saux1.e[i]<Saux2.e[i]);
9473 if (bAux!=b) err= 1;
9475 # if defined (GCC_COMPILER)
9476 Saux2.v= (vector signed short){-3800, -3700, -3600, -3500, 0, 3300, 3200, 3100};
9477 Saux1.v= (vector signed short){ 9000, 9000, 9000, 9000, 9000, 9000, 9000, 9000};
9478 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
9479 Saux2.v= (vector signed short)(-3800, -3700, -3600, -3500, 0, 3300, 3200, 3100);
9480 Saux1.v= (vector signed short)( 9000, 9000, 9000, 9000, 9000, 9000, 9000, 9000);
9482 b= vec_any_lt (Saux1.v, Saux2.v);
9485 bAux= bAux || (Saux1.e[i]<Saux2.e[i]);
9486 if (bAux!=b) err= 1;
9488 # if defined (GCC_COMPILER)
9489 Saux2.v= (vector signed short){-3800, -3700, -3600, -3500, 0, 3300, 3200, 3100};
9490 Saux1.v= (vector signed short){ 9000, 9000, 9000, 9000, 9000, 9000, 9000, 9000};
9491 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
9492 Saux2.v= (vector signed short)(-3800, -3700, -3600, -3500, 0, 3300, 3200, 3100);
9493 Saux1.v= (vector signed short)( 9000, 9000, 9000, 9000, 9000, 9000, 9000, 9000);
9495 b= vec_any_lt (Saux1.v, Saux2.v);
9498 bAux= bAux || (Saux1.e[i]<Saux2.e[i]);
9499 if (bAux!=b) err= 1;
9502 printf("Function vec_any_lt [type short] ===> Error\n");
9504 printf("Function vec_any_lt [type short] ===> OK\n");
9508 # if defined (GCC_COMPILER)
9509 USaux2.v= (vector unsigned short){48000, 47000, 46000, 45000, 0, 3300, 3200, 3100};
9510 USaux1.v= (vector unsigned short){59000, 59000, 59000, 59000,59000, 9000, 9000, 9000};
9511 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
9512 USaux2.v= (vector unsigned short)(48000, 47000, 46000, 45000, 0, 3300, 3200, 3100);
9513 USaux1.v= (vector unsigned short)(59000, 59000, 59000, 59000,59000, 9000, 9000, 9000);
9515 b= vec_any_lt (USaux1.v, USaux2.v);
9518 bAux= bAux || (USaux1.e[i]<USaux2.e[i]);
9519 if (bAux!=b) err= 1;
9521 # if defined (GCC_COMPILER)
9522 USaux2.v= (vector unsigned short){48000, 47000, 46000, 45000, 0, 3300, 3200, 3100};
9523 USaux1.v= (vector unsigned short){59000, 59000, 59000, 59000,59000, 9000, 9000, 9000};
9524 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
9525 USaux2.v= (vector unsigned short)(48000, 47000, 46000, 45000, 0, 3300, 3200, 3100);
9526 USaux1.v= (vector unsigned short)(59000, 59000, 59000, 59000,59000, 9000, 9000, 9000);
9528 b= vec_any_lt (USaux1.v, USaux2.v);
9531 bAux= bAux || (USaux1.e[i]<USaux2.e[i]);
9532 if (bAux!=b) err= 1;
9534 # if defined (GCC_COMPILER)
9535 USaux2.v= (vector unsigned short){48000, 47000, 46000, 45000, 0, 3300, 3200, 3100};
9536 USaux1.v= (vector unsigned short){59000, 59000, 59000, 59000,59000, 9000, 9000, 9000};
9537 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
9538 USaux2.v= (vector unsigned short)(48000, 47000, 46000, 45000, 0, 3300, 3200, 3100);
9539 USaux1.v= (vector unsigned short)(59000, 59000, 59000, 59000,59000, 9000, 9000, 9000);
9541 b= vec_any_lt (USaux1.v, USaux2.v);
9544 bAux= bAux || (USaux1.e[i]<USaux2.e[i]);
9545 if (bAux!=b) err= 1;
9548 printf("Function vec_any_lt [type unsigned short] ===> Error\n");
9550 printf("Function vec_any_lt [type unsigned short] ===> OK\n");
9554 # if defined (GCC_COMPILER)
9555 Iaux2.v= (vector signed int){-1003800, -1003700, 0,1003300};
9556 Iaux1.v= (vector signed int){ 9000000, 9000000, 9000000,9000000};
9557 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
9558 Iaux2.v= (vector signed int)(-1003800, -1003700, 0,1003300);
9559 Iaux1.v= (vector signed int)( 9000000, 9000000, 9000000,9000000);
9561 b= vec_any_lt (Iaux1.v, Iaux2.v);
9564 bAux= bAux || (Iaux1.e[i]<Iaux2.e[i]);
9565 if (bAux!=b) err= 1;
9567 # if defined (GCC_COMPILER)
9568 Iaux2.v= (vector signed int){-1003800, -1003700, 0,1003300};
9569 Iaux1.v= (vector signed int){ 9000000, 9000000, 9000000,9000000};
9570 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
9571 Iaux2.v= (vector signed int)(-1003800, -1003700, 0,1003300);
9572 Iaux1.v= (vector signed int)( 9000000, 9000000, 9000000,9000000);
9574 b= vec_any_lt (Iaux1.v, Iaux2.v);
9577 bAux= bAux || (Iaux1.e[i]<Iaux2.e[i]);
9578 if (bAux!=b) err= 1;
9580 # if defined (GCC_COMPILER)
9581 Iaux2.v= (vector signed int){-1003800, -1003700, 0,1003300};
9582 Iaux1.v= (vector signed int){ 9000000, 9000000, 9000000,9000000};
9583 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
9584 Iaux2.v= (vector signed int)(-1003800, -1003700, 0,1003300);
9585 Iaux1.v= (vector signed int)( 9000000, 9000000, 9000000,9000000);
9587 b= vec_any_lt (Iaux1.v, Iaux2.v);
9590 bAux= bAux || (Iaux1.e[i]<Iaux2.e[i]);
9591 if (bAux!=b) err= 1;
9594 printf("Function vec_any_lt [type int] ===> Error\n");
9596 printf("Function vec_any_lt [type int] ===> OK\n");
9600 # if defined (GCC_COMPILER)
9601 UIaux2.v= (vector unsigned int){0xFFFFF000, 12345678, 0, 1};
9602 UIaux1.v= (vector unsigned int){0xFFFFFFF0, 20000000, 9, 9};
9603 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
9604 UIaux2.v= (vector unsigned int)(0xFFFFF000, 12345678, 0, 1);
9605 UIaux1.v= (vector unsigned int)(0xFFFFFFF0, 20000000, 9, 9);
9607 b= vec_any_lt (UIaux1.v, UIaux2.v);
9610 bAux= bAux || (UIaux1.e[i]<UIaux2.e[i]);
9611 if (bAux!=b) err= 1;
9613 # if defined (GCC_COMPILER)
9614 UIaux2.v= (vector unsigned int){0xFFFFF000, 12345678, 0, 1};
9615 UIaux1.v= (vector unsigned int){0xFFFFFFF0, 12345678, 9, 9};
9616 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
9617 UIaux2.v= (vector unsigned int)(0xFFFFF000, 12345678, 0, 1);
9618 UIaux1.v= (vector unsigned int)(0xFFFFFFF0, 12345678, 9, 9);
9620 b= vec_any_lt (UIaux1.v, UIaux2.v);
9623 bAux= bAux || (UIaux1.e[i]<UIaux2.e[i]);
9624 if (bAux!=b) err= 1;
9626 # if defined (GCC_COMPILER)
9627 UIaux2.v= (vector unsigned int){0xFFFFF000, 12345678, 0, 1};
9628 UIaux1.v= (vector unsigned int){0xFFFFFFF0, 10000000, 9, 9};
9629 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
9630 UIaux2.v= (vector unsigned int)(0xFFFFF000, 12345678, 0, 1);
9631 UIaux1.v= (vector unsigned int)(0xFFFFFFF0, 10000000, 9, 9);
9633 b= vec_any_lt (UIaux1.v, UIaux2.v);
9636 bAux= bAux || (UIaux1.e[i]<UIaux2.e[i]);
9637 if (bAux!=b) err= 1;
9640 printf("Function vec_any_lt [type unsigned int] ===> Error\n");
9642 printf("Function vec_any_lt [type unsigned int] ===> OK\n");
9644 #if defined TEST_FLOATS
9646 # if defined (GCC_COMPILER)
9647 Faux2.v= (vector float) {-1.5, 1.0, 0.5, -3.999};
9648 Faux1.v= (vector float) { 0.0, 3.5, 0.55, -1.5};
9649 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
9650 Faux2.v= (vector float) (-1.5, 1.0, 0.5, -3.999);
9651 Faux1.v= (vector float) ( 0.0, 3.5, 0.55, -1.5);
9653 b= vec_any_lt (Faux1.v, Faux2.v);
9656 bAux= bAux || (Faux1.e[i]<Faux2.e[i]);
9657 if (bAux!=b) err= 1;
9659 # if defined (GCC_COMPILER)
9660 Faux2.v= (vector float) {-1.5, 1.0, 0.5, -3.999};
9661 Faux1.v= (vector float) { 0.0, 3.5, 0.5, -1.5};
9662 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
9663 Faux2.v= (vector float) (-1.5, 1.0, 0.5, -3.999);
9664 Faux1.v= (vector float) ( 0.0, 3.5, 0.5, -1.5);
9666 b= vec_any_lt (Faux1.v, Faux2.v);
9669 bAux= bAux || (Faux1.e[i]<Faux2.e[i]);
9670 if (bAux!=b) err= 1;
9672 # if defined (GCC_COMPILER)
9673 Faux2.v= (vector float) {-1.5, 1.0, 0.5, -3.999};
9674 Faux1.v= (vector float) { 0.0, 3.5,-0.5, -1.5};
9675 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
9676 Faux2.v= (vector float) (-1.5, 1.0, 0.5, -3.999);
9677 Faux1.v= (vector float) ( 0.0, 3.5,-0.5, -1.5);
9679 b= vec_any_lt (Faux1.v, Faux2.v);
9682 bAux= bAux || (Faux1.e[i]<Faux2.e[i]);
9683 if (bAux!=b) err= 1;
9686 printf("Function vec_any_lt [type float] ===> Error\n");
9688 printf("Function vec_any_lt [type float] ===> OK\n");
9692 #if defined TEST_FLOATS
9693 /* Function vec_any_nan */
9694 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
9696 # if defined (GCC_COMPILER)
9697 Faux1.v= (vector float) { 0.0, 3.5, 0.55, -1.5};
9698 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
9699 Faux1.v= (vector float) ( 0.0, 3.5, 0.55, -1.5);
9701 b= vec_any_nan (Faux1.v);
9704 bAux= bAux || isnan(Faux1.e[i]);
9705 if (bAux!=b) err= 1;
9707 # if defined (GCC_COMPILER)
9708 Faux1.v= (vector float) { 0.0, 3.5, NAN, -1.5};
9709 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
9710 Faux1.v= (vector float) ( 0.0, 3.5, NAN, -1.5);
9712 b= vec_any_nan (Faux1.v);
9715 bAux= bAux || isnan(Faux1.e[i]);
9716 if (bAux!=b) err= 1;
9718 # if defined (GCC_COMPILER)
9719 Faux1.v= (vector float) { NAN, 3.5, NAN, -1.5};
9720 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
9721 Faux1.v= (vector float) ( NAN, 3.5, NAN, -1.5);
9723 b= vec_any_nan (Faux1.v);
9726 bAux= bAux || isnan(Faux1.e[i]);
9727 if (bAux!=b) err= 1;
9730 printf("Function vec_any_nan [type float] ===> Error\n");
9732 printf("Function vec_any_nan [type float] ===> OK\n");
9736 /* Function vec_any_ne */
9737 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
9739 # if defined (GCC_COMPILER)
9740 Caux1.v= (vector signed char){-8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7};
9741 Caux2.v= (vector signed char){-8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7};
9742 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
9743 Caux1.v= (vector signed char)(-8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7);
9744 Caux2.v= (vector signed char)(-8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7);
9746 b= vec_any_ne (Caux1.v, Caux2.v);
9748 for (i=0; i<16; i++)
9749 bAux= bAux || (Caux1.e[i]!=Caux2.e[i]);
9750 if (bAux!=b) err= 1;
9752 # if defined (GCC_COMPILER)
9753 Caux1.v= (vector signed char){-8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7};
9754 Caux2.v= (vector signed char){-8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7};
9755 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
9756 Caux1.v= (vector signed char)(-8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7);
9757 Caux2.v= (vector signed char)(-8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7);
9759 b= vec_any_ne (Caux1.v, Caux2.v);
9761 for (i=0; i<16; i++)
9762 bAux= bAux || (Caux1.e[i]!=Caux2.e[i]);
9763 if (bAux!=b) err= 1;
9765 # if defined (GCC_COMPILER)
9766 Caux1.v= (vector signed char){-8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7};
9767 Caux2.v= (vector signed char){-8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7};
9768 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
9769 Caux1.v= (vector signed char)(-8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7);
9770 Caux2.v= (vector signed char)(-8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7);
9772 b= vec_any_ne (Caux1.v, Caux2.v);
9774 for (i=0; i<16; i++)
9775 bAux= bAux || (Caux1.e[i]!=Caux2.e[i]);
9776 if (bAux!=b) err= 1;
9779 printf("Function vec_any_ne [type char] ===> Error\n");
9781 printf("Function vec_any_ne [type char] ===> OK\n");
9785 # if defined (GCC_COMPILER)
9786 UCaux1.v= (vector unsigned char){200, 201, 206, 205, 204, 203, 202, 201, 200, 101, 102, 13, 14, 15, 16, 17};
9787 UCaux2.v= (vector unsigned char){200, 201, 206, 205, 204, 203, 202, 201, 200, 101, 102, 13, 14, 15, 16, 17};
9788 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
9789 UCaux1.v= (vector unsigned char)(200, 201, 206, 205, 204, 203, 202, 201, 200, 101, 102, 13, 14, 15, 16, 17);
9790 UCaux2.v= (vector unsigned char)(200, 201, 206, 205, 204, 203, 202, 201, 200, 101, 102, 13, 14, 15, 16, 17);
9792 b= vec_any_ne (UCaux1.v, UCaux2.v);
9794 for (i=0; i<16; i++)
9795 bAux= bAux || (UCaux1.e[i]!=UCaux2.e[i]);
9796 if (bAux!=b) err= 1;
9798 # if defined (GCC_COMPILER)
9799 UCaux1.v= (vector unsigned char){200, 201, 206, 205, 204, 203, 202, 201, 200, 101, 102, 13, 14, 15, 16, 17};
9800 UCaux2.v= (vector unsigned char){200, 201, 206, 205, 0, 203, 202, 201, 200, 101, 102, 13, 14, 15, 16, 17};
9801 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
9802 UCaux1.v= (vector unsigned char)(200, 201, 206, 205, 204, 203, 202, 201, 200, 101, 102, 13, 14, 15, 16, 17);
9803 UCaux2.v= (vector unsigned char)(200, 201, 206, 205, 0, 203, 202, 201, 200, 101, 102, 13, 14, 15, 16, 17);
9805 b= vec_any_ne (UCaux1.v, UCaux2.v);
9807 for (i=0; i<16; i++)
9808 bAux= bAux || (UCaux1.e[i]!=UCaux2.e[i]);
9809 if (bAux!=b) err= 1;
9811 # if defined (GCC_COMPILER)
9812 UCaux1.v= (vector unsigned char){200, 201, 206, 205, 204, 203, 202, 201, 200, 101, 102, 13, 14, 15, 16, 17};
9813 UCaux2.v= (vector unsigned char){200, 201, 206, 206, 0, 203, 202, 201, 200, 101, 102, 13, 14, 15, 16, 17};
9814 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
9815 UCaux1.v= (vector unsigned char)(200, 201, 206, 205, 204, 203, 202, 201, 200, 101, 102, 13, 14, 15, 16, 17);
9816 UCaux2.v= (vector unsigned char)(200, 201, 206, 206, 0, 203, 202, 201, 200, 101, 102, 13, 14, 15, 16, 17);
9818 b= vec_any_ne (UCaux1.v, UCaux2.v);
9820 for (i=0; i<16; i++)
9821 bAux= bAux || (UCaux1.e[i]!=UCaux2.e[i]);
9822 if (bAux!=b) err= 1;
9825 printf("Function vec_any_ne [type unsigned char] ===> Error\n");
9827 printf("Function vec_any_ne [type unsigned char] ===> OK\n");
9831 # if defined (GCC_COMPILER)
9832 Saux1.v= (vector signed short){-3800, -3700, -3600, -3500, 0, 3300, 3200, 3100};
9833 Saux2.v= (vector signed short){-3800, -3700, -3600, -3500, 0, 3300, 3200, 3100};
9834 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
9835 Saux1.v= (vector signed short)(-3800, -3700, -3600, -3500, 0, 3300, 3200, 3100);
9836 Saux2.v= (vector signed short)(-3800, -3700, -3600, -3500, 0, 3300, 3200, 3100);
9838 b= vec_any_ne (Saux1.v, Saux2.v);
9841 bAux= bAux || (Saux1.e[i]!=Saux2.e[i]);
9842 if (bAux!=b) err= 1;
9844 # if defined (GCC_COMPILER)
9845 Saux1.v= (vector signed short){-3800, -3700, -3600, -3500, 0, 3300, 3200, 3100};
9846 Saux2.v= (vector signed short){-3800, 3700, -3600, -3500, 0, 3300, 3200, 3100};
9847 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
9848 Saux1.v= (vector signed short)(-3800, -3700, -3600, -3500, 0, 3300, 3200, 3100);
9849 Saux2.v= (vector signed short)(-3800, 3700, -3600, -3500, 0, 3300, 3200, 3100);
9851 b= vec_any_ne (Saux1.v, Saux2.v);
9854 bAux= bAux || (Saux1.e[i]!=Saux2.e[i]);
9855 if (bAux!=b) err= 1;
9857 # if defined (GCC_COMPILER)
9858 Saux1.v= (vector signed short){-3800, -3700, -3600, -3500, 0, 3300, 3200, 3100};
9859 Saux2.v= (vector signed short){-3800, -3700, -3600, -3500, 0, 3300, 3100, 3100};
9860 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
9861 Saux1.v= (vector signed short)(-3800, -3700, -3600, -3500, 0, 3300, 3200, 3100);
9862 Saux2.v= (vector signed short)(-3800, -3700, -3600, -3500, 0, 3300, 3100, 3100);
9864 b= vec_any_ne (Saux1.v, Saux2.v);
9867 bAux= bAux || (Saux1.e[i]!=Saux2.e[i]);
9868 if (bAux!=b) err= 1;
9871 printf("Function vec_any_ne [type short] ===> Error\n");
9873 printf("Function vec_any_ne [type short] ===> OK\n");
9877 # if defined (GCC_COMPILER)
9878 USaux1.v= (vector unsigned short){48000, 47000, 46000, 45000, 0, 3300, 3200, 3100};
9879 USaux2.v= (vector unsigned short){48000, 47000, 46000, 45000, 0, 3300, 3200, 3100};
9880 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
9881 USaux1.v= (vector unsigned short)(48000, 47000, 46000, 45000, 0, 3300, 3200, 3100);
9882 USaux2.v= (vector unsigned short)(48000, 47000, 46000, 45000, 0, 3300, 3200, 3100);
9884 b= vec_any_ne (USaux1.v, USaux2.v);
9887 bAux= bAux || (USaux1.e[i]!=USaux2.e[i]);
9888 if (bAux!=b) err= 1;
9890 # if defined (GCC_COMPILER)
9891 USaux1.v= (vector unsigned short){48000, 47000, 46000, 45000, 0, 3300, 3200, 3100};
9892 USaux2.v= (vector unsigned short){48000, 47000, 46000, 45000, 0, 3300, 3100, 3100};
9893 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
9894 USaux1.v= (vector unsigned short)(48000, 47000, 46000, 45000, 0, 3300, 3200, 3100);
9895 USaux2.v= (vector unsigned short)(48000, 47000, 46000, 45000, 0, 3300, 3100, 3100);
9897 b= vec_any_ne (USaux1.v, USaux2.v);
9900 bAux= bAux || (USaux1.e[i]!=USaux2.e[i]);
9901 if (bAux!=b) err= 1;
9903 # if defined (GCC_COMPILER)
9904 USaux1.v= (vector unsigned short){48000, 47000, 46000, 45000, 0, 3300, 3200, 3100};
9905 USaux2.v= (vector unsigned short){48000, 47000, 46000, 0, 0, 3300, 3100, 3100};
9906 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
9907 USaux1.v= (vector unsigned short)(48000, 47000, 46000, 45000, 0, 3300, 3200, 3100);
9908 USaux2.v= (vector unsigned short)(48000, 47000, 46000, 0, 0, 3300, 3100, 3100);
9910 b= vec_any_ne (USaux1.v, USaux2.v);
9913 bAux= bAux || (USaux1.e[i]!=USaux2.e[i]);
9914 if (bAux!=b) err= 1;
9917 printf("Function vec_any_ne [type unsigned short] ===> Error\n");
9919 printf("Function vec_any_ne [type unsigned short] ===> OK\n");
9923 # if defined (GCC_COMPILER)
9924 Iaux1.v= (vector signed int){-1003800, -1003700, 0,1003300};
9925 Iaux2.v= (vector signed int){-1003800, -1003700, 0,1003300};
9926 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
9927 Iaux1.v= (vector signed int)(-1003800, -1003700, 0,1003300);
9928 Iaux2.v= (vector signed int)(-1003800, -1003700, 0,1003300);
9930 b= vec_any_ne (Iaux1.v, Iaux2.v);
9933 bAux= bAux || (Iaux1.e[i]!=Iaux2.e[i]);
9934 if (bAux!=b) err= 1;
9936 # if defined (GCC_COMPILER)
9937 Iaux1.v= (vector signed int){-1003800, -1003700, 0,1003300};
9938 Iaux2.v= (vector signed int){-1003800, -1003700, 0,1113300};
9939 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
9940 Iaux1.v= (vector signed int)(-1003800, -1003700, 0,1003300);
9941 Iaux2.v= (vector signed int)(-1003800, -1003700, 0,1113300);
9943 b= vec_any_ne (Iaux1.v, Iaux2.v);
9946 bAux= bAux || (Iaux1.e[i]!=Iaux2.e[i]);
9947 if (bAux!=b) err= 1;
9949 # if defined (GCC_COMPILER)
9950 Iaux1.v= (vector signed int){-1003800, -1003700, 0,1003300};
9951 Iaux2.v= (vector signed int){-1003800, 10, 0,1113300};
9952 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
9953 Iaux1.v= (vector signed int)(-1003800, -1003700, 0,1003300);
9954 Iaux2.v= (vector signed int)(-1003800, 10, 0,1113300);
9956 b= vec_any_ne (Iaux1.v, Iaux2.v);
9959 bAux= bAux || (Iaux1.e[i]!=Iaux2.e[i]);
9960 if (bAux!=b) err= 1;
9963 printf("Function vec_any_ne [type int] ===> Error\n");
9965 printf("Function vec_any_ne [type int] ===> OK\n");
9969 # if defined (GCC_COMPILER)
9970 UIaux1.v= (vector unsigned int){0xFFFFF000, 12345678, 0, 1};
9971 UIaux2.v= (vector unsigned int){0xFFFFF000, 12345678, 0, 1};
9972 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
9973 UIaux1.v= (vector unsigned int)(0xFFFFF000, 12345678, 0, 1);
9974 UIaux2.v= (vector unsigned int)(0xFFFFF000, 12345678, 0, 1);
9976 b= vec_any_ne (UIaux1.v, UIaux2.v);
9979 bAux= bAux || (UIaux1.e[i]!=UIaux2.e[i]);
9980 if (bAux!=b) err= 1;
9982 # if defined (GCC_COMPILER)
9983 UIaux1.v= (vector unsigned int){0xFFFFF000, 12345678, 0, 1};
9984 UIaux2.v= (vector unsigned int){0xFFFFF000, 12345678, 5, 1};
9985 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
9986 UIaux1.v= (vector unsigned int)(0xFFFFF000, 12345678, 0, 1);
9987 UIaux2.v= (vector unsigned int)(0xFFFFF000, 12345678, 5, 1);
9989 b= vec_any_ne (UIaux1.v, UIaux2.v);
9992 bAux= bAux || (UIaux1.e[i]!=UIaux2.e[i]);
9993 if (bAux!=b) err= 1;
9995 # if defined (GCC_COMPILER)
9996 UIaux1.v= (vector unsigned int){0xFFFFF000, 12345678, 0, 1};
9997 UIaux2.v= (vector unsigned int){0xFFFFFFF0, 12345678, 5, 1};
9998 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
9999 UIaux1.v= (vector unsigned int)(0xFFFFF000, 12345678, 0, 1);
10000 UIaux2.v= (vector unsigned int)(0xFFFFFFF0, 12345678, 5, 1);
10002 b= vec_any_ne (UIaux1.v, UIaux2.v);
10004 for (i=0; i<4; i++)
10005 bAux= bAux || (UIaux1.e[i]!=UIaux2.e[i]);
10006 if (bAux!=b) err= 1;
10009 printf("Function vec_any_ne [type unsigned int] ===> Error\n");
10011 printf("Function vec_any_ne [type unsigned int] ===> OK\n");
10013 #if defined TEST_FLOATS
10015 # if defined (GCC_COMPILER)
10016 Faux1.v= (vector float) {-1.5, 1.0, 0.5, -3.999};
10017 Faux2.v= (vector float) {-1.5, 1.0, 0.5, -3.999};
10018 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
10019 Faux1.v= (vector float) (-1.5, 1.0, 0.5, -3.999);
10020 Faux2.v= (vector float) (-1.5, 1.0, 0.5, -3.999);
10022 b= vec_any_ne (Faux1.v, Faux2.v);
10024 for (i=0; i<4; i++)
10025 bAux= bAux || (Faux1.e[i]!=Faux2.e[i]);
10026 if (bAux!=b) err= 1;
10028 # if defined (GCC_COMPILER)
10029 Faux1.v= (vector float) {-1.5, 1.0, 0.5, -3.999};
10030 Faux2.v= (vector float) {-1.5, 1.0, 0.5, -3.998};
10031 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
10032 Faux1.v= (vector float) (-1.5, 1.0, 0.5, -3.999);
10033 Faux2.v= (vector float) (-1.5, 1.0, 0.5, -3.998);
10035 b= vec_any_ne (Faux1.v, Faux2.v);
10037 for (i=0; i<4; i++)
10038 bAux= bAux || (Faux1.e[i]!=Faux2.e[i]);
10039 if (bAux!=b) err= 1;
10041 # if defined (GCC_COMPILER)
10042 Faux1.v= (vector float) {-1.5, 1.0, 0.5, -3.999};
10043 Faux2.v= (vector float) {-1.5, 0.0, 0.5, -3.998};
10044 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
10045 Faux1.v= (vector float) (-1.5, 1.0, 0.5, -3.999);
10046 Faux2.v= (vector float) (-1.5, 0.0, 0.5, -3.998);
10048 b= vec_any_ne (Faux1.v, Faux2.v);
10050 for (i=0; i<4; i++)
10051 bAux= bAux || (Faux1.e[i]!=Faux2.e[i]);
10052 if (bAux!=b) err= 1;
10055 printf("Function vec_any_ne [type float] ===> Error\n");
10057 printf("Function vec_any_ne [type float] ===> OK\n");
10061 #if defined TEST_FLOATS
10062 /* Function vec_any_nge */
10063 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
10065 # if defined (GCC_COMPILER)
10066 Faux1.v= (vector float) { 0.0, 3.5, 0.55, -1.5};
10067 Faux2.v= (vector float) {-1.5, 1.0, 0.5, -3.999};
10068 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
10069 Faux1.v= (vector float) ( 0.0, 3.5, 0.55, -1.5);
10070 Faux2.v= (vector float) (-1.5, 1.0, 0.5, -3.999);
10072 b= vec_any_nge (Faux1.v, Faux2.v);
10074 for (i=0; i<4; i++)
10075 bAux= bAux || isnan(Faux1.e[i]) || isnan(Faux2.e[i]) ||
10076 (Faux1.e[i]<Faux2.e[i]);
10077 if (bAux!=b) err= 1;
10079 # if defined (GCC_COMPILER)
10080 Faux1.v= (vector float) { 0.0, 3.5, 0.55, -1.5};
10081 Faux2.v= (vector float) {-1.5, 1.0, 0.55, -3.999};
10082 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
10083 Faux1.v= (vector float) ( 0.0, 3.5, 0.55, -1.5);
10084 Faux2.v= (vector float) (-1.5, 1.0, 0.55, -3.999);
10086 b= vec_any_nge (Faux1.v, Faux2.v);
10088 for (i=0; i<4; i++)
10089 bAux= bAux || isnan(Faux1.e[i]) || isnan(Faux2.e[i]) ||
10090 (Faux1.e[i]<Faux2.e[i]);
10091 if (bAux!=b) err= 1;
10093 # if defined (GCC_COMPILER)
10094 Faux1.v= (vector float) { 0.0, 3.5, 0.55, -1.5};
10095 Faux2.v= (vector float) {-1.5, 5.0, 0.5, -3.999};
10096 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
10097 Faux1.v= (vector float) ( 0.0, 3.5, 0.55, -1.5);
10098 Faux2.v= (vector float) (-1.5, 5.0, 0.5, -3.999);
10100 b= vec_any_nge (Faux1.v, Faux2.v);
10102 for (i=0; i<4; i++)
10103 bAux= bAux || isnan(Faux1.e[i]) || isnan(Faux2.e[i]) ||
10104 (Faux1.e[i]<Faux2.e[i]);
10105 if (bAux!=b) err= 1;
10107 # if defined (GCC_COMPILER)
10108 Faux1.v= (vector float) { 0.0, 3.5, 0.55, -1.5};
10109 Faux2.v= (vector float) {-1.5, 1.0, NAN, -3.999};
10110 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
10111 Faux1.v= (vector float) ( 0.0, 3.5, 0.55, -1.5);
10112 Faux2.v= (vector float) (-1.5, 1.0, NAN, -3.999);
10114 b= vec_any_nge (Faux1.v, Faux2.v);
10116 for (i=0; i<4; i++)
10117 bAux= bAux || isnan(Faux1.e[i]) || isnan(Faux2.e[i]) ||
10118 (Faux1.e[i]<Faux2.e[i]);
10119 if (bAux!=b) err= 1;
10122 printf("Function vec_any_nge [type float] ===> Error\n");
10124 printf("Function vec_any_nge [type float] ===> OK\n");
10128 #if defined TEST_FLOATS
10129 /* Function vec_any_ngt */
10130 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
10132 # if defined (GCC_COMPILER)
10133 Faux1.v= (vector float) { 0.0, 3.5, 0.55, -1.5};
10134 Faux2.v= (vector float) {-1.5, 1.0, 0.5, -3.999};
10135 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
10136 Faux1.v= (vector float) ( 0.0, 3.5, 0.55, -1.5);
10137 Faux2.v= (vector float) (-1.5, 1.0, 0.5, -3.999);
10139 b= vec_any_ngt (Faux1.v, Faux2.v);
10141 for (i=0; i<4; i++)
10142 bAux= bAux || isnan(Faux1.e[i]) || isnan(Faux2.e[i]) ||
10143 !(Faux1.e[i]>Faux2.e[i]);
10144 if (bAux!=b) err= 1;
10146 # if defined (GCC_COMPILER)
10147 Faux1.v= (vector float) { 0.0, 3.5, 0.55, -1.5};
10148 Faux2.v= (vector float) {-1.5, 1.0, 0.55, -3.999};
10149 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
10150 Faux1.v= (vector float) ( 0.0, 3.5, 0.55, -1.5);
10151 Faux2.v= (vector float) (-1.5, 1.0, 0.55, -3.999);
10153 b= vec_any_ngt (Faux1.v, Faux2.v);
10155 for (i=0; i<4; i++)
10156 bAux= bAux || isnan(Faux1.e[i]) || isnan(Faux2.e[i]) ||
10157 !(Faux1.e[i]>Faux2.e[i]);
10158 if (bAux!=b) err= 1;
10160 # if defined (GCC_COMPILER)
10161 Faux1.v= (vector float) { 0.0, 3.5, 0.55, -1.5};
10162 Faux2.v= (vector float) {-1.5, 5.0, 0.5, -3.999};
10163 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
10164 Faux1.v= (vector float) ( 0.0, 3.5, 0.55, -1.5);
10165 Faux2.v= (vector float) (-1.5, 5.0, 0.5, -3.999);
10167 b= vec_any_ngt (Faux1.v, Faux2.v);
10169 for (i=0; i<4; i++)
10170 bAux= bAux || isnan(Faux1.e[i]) || isnan(Faux2.e[i]) ||
10171 !(Faux1.e[i]>Faux2.e[i]);
10172 if (bAux!=b) err= 1;
10174 # if defined (GCC_COMPILER)
10175 Faux1.v= (vector float) { 0.0, 3.5, 0.55, -1.5};
10176 Faux2.v= (vector float) {-1.5, 1.0, NAN, -3.999};
10177 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
10178 Faux1.v= (vector float) ( 0.0, 3.5, 0.55, -1.5);
10179 Faux2.v= (vector float) (-1.5, 1.0, NAN, -3.999);
10181 b= vec_any_ngt (Faux1.v, Faux2.v);
10183 for (i=0; i<4; i++)
10184 bAux= bAux || isnan(Faux1.e[i]) || isnan(Faux2.e[i]) ||
10185 !(Faux1.e[i]>Faux2.e[i]);
10186 if (bAux!=b) err= 1;
10189 printf("Function vec_any_ngt [type float] ===> Error\n");
10191 printf("Function vec_any_ngt [type float] ===> OK\n");
10195 #if defined TEST_FLOATS
10196 /* Function vec_any_nle */
10197 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
10199 # if defined (GCC_COMPILER)
10200 Faux1.v= (vector float) {-1.5, 1.0, 0.5, -3.999};
10201 Faux2.v= (vector float) { 0.0, 3.5, 0.55, -1.5};
10202 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
10203 Faux1.v= (vector float) (-1.5, 1.0, 0.5, -3.999);
10204 Faux2.v= (vector float) ( 0.0, 3.5, 0.55, -1.5);
10206 b= vec_any_nle (Faux1.v, Faux2.v);
10208 for (i=0; i<4; i++)
10210 (isnan(Faux1.e[i]) || isnan(Faux2.e[i]) || !(Faux1.e[i]<=Faux2.e[i]));
10211 if (bAux!=b) err= 1;
10213 # if defined (GCC_COMPILER)
10214 Faux1.v= (vector float) {-1.5, 1.0, 0.55, -3.999};
10215 Faux2.v= (vector float) { 0.0, 3.5, 0.55, -1.5};
10216 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
10217 Faux1.v= (vector float) (-1.5, 1.0, 0.55, -3.999);
10218 Faux2.v= (vector float) ( 0.0, 3.5, 0.55, -1.5);
10220 b= vec_any_nle (Faux1.v, Faux2.v);
10222 for (i=0; i<4; i++)
10224 (isnan(Faux1.e[i]) || isnan(Faux2.e[i]) || !(Faux1.e[i]<=Faux2.e[i]));
10225 if (bAux!=b) err= 1;
10227 # if defined (GCC_COMPILER)
10228 Faux1.v= (vector float) {-1.5, 5.0, 0.5, -3.999};
10229 Faux2.v= (vector float) { 0.0, 3.5, 0.55, -1.5};
10230 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
10231 Faux1.v= (vector float) (-1.5, 5.0, 0.5, -3.999);
10232 Faux2.v= (vector float) ( 0.0, 3.5, 0.55, -1.5);
10234 b= vec_any_nle (Faux1.v, Faux2.v);
10236 for (i=0; i<4; i++)
10238 (isnan(Faux1.e[i]) || isnan(Faux2.e[i]) || !(Faux1.e[i]<=Faux2.e[i]));
10239 if (bAux!=b) err= 1;
10241 # if defined (GCC_COMPILER)
10242 Faux1.v= (vector float) {-1.5, 1.0, NAN, -3.999};
10243 Faux2.v= (vector float) { 0.0, 3.5, 0.55, -1.5};
10244 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
10245 Faux1.v= (vector float) (-1.5, 1.0, NAN, -3.999);
10246 Faux2.v= (vector float) ( 0.0, 3.5, 0.55, -1.5);
10248 b= vec_any_nle (Faux1.v, Faux2.v);
10250 for (i=0; i<4; i++)
10252 (isnan(Faux1.e[i]) || isnan(Faux2.e[i]) || !(Faux1.e[i]<=Faux2.e[i]));
10253 if (bAux!=b) err= 1;
10256 printf("Function vec_any_nle [type float] ===> Error\n");
10258 printf("Function vec_any_nle [type float] ===> OK\n");
10262 #if defined TEST_FLOATS
10263 /* Function vec_any_nlt */
10264 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
10266 # if defined (GCC_COMPILER)
10267 Faux1.v= (vector float) {-1.5, 1.0, 0.5, -3.999};
10268 Faux2.v= (vector float) { 0.0, 3.5, 0.55, -1.5};
10269 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
10270 Faux1.v= (vector float) (-1.5, 1.0, 0.5, -3.999);
10271 Faux2.v= (vector float) ( 0.0, 3.5, 0.55, -1.5);
10273 b= vec_any_nlt (Faux1.v, Faux2.v);
10275 for (i=0; i<4; i++)
10277 (isnan(Faux1.e[i]) || isnan(Faux2.e[i]) || !(Faux1.e[i]<Faux2.e[i]));
10278 if (bAux!=b) err= 1;
10280 # if defined (GCC_COMPILER)
10281 Faux1.v= (vector float) {-1.5, 1.0, 0.55, -3.999};
10282 Faux2.v= (vector float) { 0.0, 3.5, 0.55, -1.5};
10283 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
10284 Faux1.v= (vector float) (-1.5, 1.0, 0.55, -3.999);
10285 Faux2.v= (vector float) ( 0.0, 3.5, 0.55, -1.5);
10287 b= vec_all_nlt (Faux1.v, Faux2.v);
10288 b= vec_any_nlt (Faux1.v, Faux2.v);
10290 for (i=0; i<4; i++)
10292 (isnan(Faux1.e[i]) || isnan(Faux2.e[i]) || !(Faux1.e[i]<Faux2.e[i]));
10293 if (bAux!=b) err= 1;
10295 # if defined (GCC_COMPILER)
10296 Faux1.v= (vector float) {-1.5, 5.0, 0.5, -3.999};
10297 Faux2.v= (vector float) { 0.0, 3.5, 0.55, -1.5};
10298 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
10299 Faux1.v= (vector float) (-1.5, 5.0, 0.5, -3.999);
10300 Faux2.v= (vector float) ( 0.0, 3.5, 0.55, -1.5);
10302 b= vec_any_nlt (Faux1.v, Faux2.v);
10304 for (i=0; i<4; i++)
10306 (isnan(Faux1.e[i]) || isnan(Faux2.e[i]) || !(Faux1.e[i]<Faux2.e[i]));
10307 if (bAux!=b) err= 1;
10309 # if defined (GCC_COMPILER)
10310 Faux1.v= (vector float) {-1.5, 1.0, NAN, -3.999};
10311 Faux2.v= (vector float) { 0.0, 3.5, 0.55, -1.5};
10312 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
10313 Faux1.v= (vector float) (-1.5, 1.0, NAN, -3.999);
10314 Faux2.v= (vector float) ( 0.0, 3.5, 0.55, -1.5);
10316 b= vec_any_nlt (Faux1.v, Faux2.v);
10318 for (i=0; i<4; i++)
10320 (isnan(Faux1.e[i]) || isnan(Faux2.e[i]) || !(Faux1.e[i]<Faux2.e[i]));
10321 if (bAux!=b) err= 1;
10324 printf("Function vec_any_nlt [type float] ===> Error\n");
10326 printf("Function vec_any_nlt [type float] ===> OK\n");
10330 #if defined TEST_FLOATS
10331 /* Function vec_any_numeric */
10332 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
10334 # if defined (GCC_COMPILER)
10335 Faux1.v= (vector float) { NAN, NAN, NAN, NAN};
10336 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
10337 Faux1.v= (vector float) ( NAN, NAN, NAN, NAN);
10339 b= vec_any_numeric (Faux1.v);
10341 for (i=0; i<4; i++)
10342 bAux= bAux || !isnan(Faux1.e[i]);
10343 if (bAux!=b) err= 1;
10345 # if defined (GCC_COMPILER)
10346 Faux1.v= (vector float) { NAN, 3.5, NAN, NAN};
10347 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
10348 Faux1.v= (vector float) ( NAN, 3.5, NAN, NAN);
10350 b= vec_any_numeric (Faux1.v);
10352 for (i=0; i<4; i++)
10353 bAux= bAux || !isnan(Faux1.e[i]);
10354 if (bAux!=b) err= 1;
10356 # if defined (GCC_COMPILER)
10357 Faux1.v= (vector float) { -1.5, 3.5, 0.55, -1.5};
10358 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
10359 Faux1.v= (vector float) ( -1.5, 3.5, 0.55, -1.5);
10361 b= vec_any_numeric (Faux1.v);
10363 for (i=0; i<4; i++)
10364 bAux= bAux || !isnan(Faux1.e[i]);
10365 if (bAux!=b) err= 1;
10368 printf("Function vec_any_numeric [type float] ===> Error\n");
10370 printf("Function vec_any_numeric [type float] ===> OK\n");
10374 #if defined TEST_FLOATS
10375 /* Function vec_any_out */
10376 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
10380 I1 = vec_any_out( Faux1.v, Faux2.v );
10382 for ( i=0; i< 4; i++ )
10384 Iaux = Iaux || ((isnan(Faux1.e[i])) || (isnan(Faux2.e[i])) ||
10385 (Faux1.e[i]>Faux2.e[i]) || (Faux1.e[i]<-Faux2.e[i]));
10387 if (I1 != Iaux) err++;
10389 # if defined (GCC_COMPILER)
10390 Faux1.v = (vector float){-0.5, 1.0, 0, -0.999};
10391 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
10392 Faux1.v = (vector float)(-0.5, 1.0, 0, -0.999);
10395 I1 = vec_any_out( Faux1.v, Faux2.v );
10397 for ( i=0; i< 4; i++ )
10399 Iaux = Iaux || ((isnan(Faux1.e[i])) || (isnan(Faux2.e[i])) ||
10400 (Faux1.e[i]>Faux2.e[i]) || (Faux1.e[i]<-Faux2.e[i]));
10402 if (I1 != Iaux) err++;
10405 printf("Function vec_any_out [type float] ===> Error\n");
10407 printf("Function vec_any_out [type float] ===> OK\n");