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, see <http://www.gnu.org/licenses/>.
36 * Version 0.2.2 2004/09/02
37 * Removed some not useful flags for compilation and changed the GPL license
38 * header updating the contact email and adding the web page URL
40 * Version 0.2.1 2004/07/07
41 * Some flags added in Makefile for XLC compilation (-qalias, -qinline)
43 * Version 0.2 2004/07/02
44 * Makefile and testVMX.c patched to compile with SLES 9 (Linux - GCC 3.3.3),
45 * IBM XLC Enterprise Edition and MacOS X 10.3 (Darwin - GCC 3.3)
47 * Version 0.1 2004/03/05
48 * First public version release
58 /* Calloc for align data to 16 bytes boundaries */
60 /* ----------- BEGIN #include "memoryVector.h" ----------- */
63 * testVMX - A test program to check the correctness of VMX instructions
65 * Copyright (C) 2004 CEPBA-IBM Research Institute
67 * Authors: Jose Maria Cela, Raul de la Cruz,
68 * Rogeli Grima, Xavier Saez <blade_support@ciri.upc.es>
70 * Web page: http://www.ciri.upc.es/cela_pblade/
72 * This file is part of testVMX.
74 * testVMX is free software; you can redistribute it and/or modify
75 * it under the terms of the GNU General Public License as published by
76 * the Free Software Foundation; either version 2 of the License, or
77 * (at your option) any later version.
79 * testVMX is distributed in the hope that it will be useful,
80 * but WITHOUT ANY WARRANTY; without even the implied warranty of
81 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
82 * GNU General Public License for more details.
84 * You should have received a copy of the GNU General Public License
85 * along with testVMX; if not, see <http://www.gnu.org/licenses/>.
88 #ifndef MEMORY_VECTOR_H
89 # define MEMORY_VECTOR_H
93 void *calloc_vec( size_t nmemb
, size_t size
);
94 void free_vec( void *ptr
);
98 /* ----------- END #include "memoryVector.h" ----------- */
100 /* ----------- BEGIN #include "memoryVector.c" ----------- */
103 * testVMX - A test program to check the correctness of VMX instructions
105 * Copyright (C) 2004 CEPBA-IBM Research Institute
107 * Authors: Jose Maria Cela, Raul de la Cruz,
108 * Rogeli Grima, Xavier Saez <blade_support@ciri.upc.es>
110 * Web page: http://www.ciri.upc.es/cela_pblade/
112 * This file is part of testVMX.
114 * testVMX is free software; you can redistribute it and/or modify
115 * it under the terms of the GNU General Public License as published by
116 * the Free Software Foundation; either version 2 of the License, or
117 * (at your option) any later version.
119 * testVMX is distributed in the hope that it will be useful,
120 * but WITHOUT ANY WARRANTY; without even the implied warranty of
121 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
122 * GNU General Public License for more details.
124 * You should have received a copy of the GNU General Public License
125 * along with testVMX; if not, see <http://www.gnu.org/licenses/>.
130 /* #include "memoryVector.h"*/
139 static Tmemtab
*memTab
= NULL
;
140 static size_t nadd
= 0;
141 static size_t MAX_N_ADD
= 100;
144 void *calloc_vec( size_t nmemb
, size_t size
)
146 /* ---------------------------------------------------------- Local Variables */
149 size_t nbytes
, cc
, rr
;
151 /* -------------------------------------------------------------------- BEGIN */
152 if (memTab
== (Tmemtab
*)NULL
)
154 memTab
= (Tmemtab
*) malloc( MAX_N_ADD
*sizeof(Tmemtab
) );
155 if (memTab
== (Tmemtab
*)NULL
)
157 fprintf(stderr
, "\n------------ FATAL ERRROR ------------------\n");
158 fprintf(stderr
, "Memory table out of memory\n");
163 /* 16 extra bytes are allocated for adjust alignement */
164 nbytes
= (size
*nmemb
)+16;
166 /* Alloc a block of 'nbytes' */
167 realadd
= (char *) malloc( nbytes
);
168 if (realadd
== (char *)NULL
)
170 fprintf(stderr
, "\n------------ FATAL ERRROR ------------------\n");
171 fprintf(stderr
, "Out of memory\n");
175 memset( realadd
, 0, nbytes
);
177 cc
= ((size_t)realadd
)/16;
178 rr
= ((size_t)realadd
)%16;
182 retadd
= (char *)((cc
+1)*16);
184 if (nadd
== MAX_N_ADD
)
187 memTab
= (Tmemtab
*) realloc( memTab
, MAX_N_ADD
*sizeof(Tmemtab
) );
188 if (memTab
== (Tmemtab
*)NULL
)
191 fprintf(stderr
, "\n------------ FATAL ERRROR ------------------\n");
192 fprintf(stderr
, "Memory table out of memory\n");
197 memTab
[nadd
].realAdd
= realadd
;
198 memTab
[nadd
].returnAdd
= retadd
;;
201 return (void*)retadd
;
202 /* ---------------------------------------------------------------------- END */
206 void free_vec( void *ptr
)
208 /* ---------------------------------------------------------- Local Variables */
211 /* -------------------------------------------------------------------- BEGIN */
213 for (ii
= 0; ii
< nadd
; ii
++)
214 if (memTab
[ii
].returnAdd
== ptr
)
222 fprintf(stderr
, "\n------------ WARNING ------------------------\n");
223 fprintf(stderr
, "Pointer not found in memory table\n\n");
227 free( memTab
[ii
].realAdd
);
229 for (ii
= pos
+1; ii
< nadd
; ii
++)
230 memTab
[ii
-1] = memTab
[ii
];
240 /* ---------------------------------------------------------------------- END */
244 /* ----------- END #include "memoryVector.c" ----------- */
249 # include <altivec.h>
254 //#define TEST_FLOATS
258 /* Redefinition for undefined NAN and xlC compiling C++ code */
259 # if !defined(NAN) || ( defined(__IBMCPP__) && defined(XLC_COMPILER) )
261 # define NAN 0x7FC00000
262 /* # define NAN 0xFFFA5A5A
263 * # define NAN 0x80000000
264 * # define NAN 0x00008000
278 vector
signed char v
;
284 vector
unsigned char v
;
296 vector
signed short v
;
302 vector
unsigned short v
;
320 vector
unsigned int v
;
330 #if defined TEST_FLOATS
339 /* Scalar bool types declaration */
340 typedef unsigned char TboolChar
;
341 typedef unsigned short TboolShort
;
342 typedef unsigned int TboolInt
;
351 /**********************************************************************
353 **********************************************************************/
359 TvecChar Caux1
, Caux2
, Caux3
;//, Caux4;
360 TvecUChar UCaux1
, UCaux2
, UCaux3
;//, UCaux4;
361 TvecBChar BCaux1
;//, BCaux2, BCaux3, BCaux4;
362 TvecShort Saux1
, Saux2
, Saux3
;//, Saux4;
363 TvecUShort USaux1
, USaux2
, USaux3
;//, USaux4;
364 TvecBShort BSaux1
;//, BSaux2, BSaux3, BSaux4;
365 TvecInt Iaux1
, Iaux2
, Iaux3
;//, Iaux4;
366 TvecUInt UIaux1
, UIaux2
, UIaux3
;//, UIaux4;
367 TvecBInt BIaux1
;//, BIaux2, BIaux3, BIaux4;
368 #if defined TEST_FLOATS
369 TvecFloat Faux1
, Faux2
, Faux3
;//, Faux4;
372 int i
, err
, j
;//, b, bAux;
373 #if defined TEST_FLOATS
375 signed int Ivec1
, Ivec2
, Ivec3
;
378 // unsigned char *UCvec1;
379 // signed short *Svec1;
380 // unsigned short *USvec1;
381 // unsigned int *UIvec1;
382 #if defined TEST_FLOATS
386 /* For saturated rutines */
387 // long long int LLaux;
392 unsigned short USaux
;
393 signed int Iaux
;//, I1, I2;
394 unsigned int UIaux
;//, UI1, UI2;
395 #if defined TEST_FLOATS
399 /* Scalar bool types definition */
411 unsigned short us[2];
414 } INTunion1, INTunion2;
422 } SHOunion1, SHOunion2;
425 #if defined (GCC_COMPILER)
426 vector
signed char Ccons1
= (vector
signed char){-8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7};
427 vector
signed char Ccons2
= (vector
signed char){1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1};
428 vector
signed char Ccons3
= (vector
signed char){-128, 127, -128, 127, -128, 127, -128, 127, -128, 127, -128, 127, -128, 127, -128, 127};
429 vector
unsigned char UCcons1
= (vector
unsigned char){248, 249, 250, 251, 252, 253, 254, 255, 0, 1, 2, 3, 4, 5, 6, 7};
430 vector
unsigned char UCcons2
= (vector
unsigned char){2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2};
431 vector
unsigned char UCcons3
= (vector
unsigned char){1, 2, 3, 4, 5, 6, 7, 8, 1, 2, 3, 4, 5, 6, 7, 8};
432 vector
signed short Scons1
= (vector
signed short){-4, -3, -2, -1, 0, 1, 2, 3};
433 vector
signed short Scons2
= (vector
signed short){-32768, 10000, 1, 1, 1, 1, -10000, -10000};
434 vector
signed short Scons3
= (vector
signed short){-32768, 32767, -32768, 32767, -32768, 32767, -32768, 32767};
435 vector
unsigned short UScons1
= (vector
unsigned short){65532, 65533, 65534, 65535, 0, 1, 2, 3};
436 vector
unsigned short UScons2
= (vector
unsigned short){1, 1, 1, 1, 1, 1, 1, 1};
437 vector
unsigned short UScons3
= (vector
unsigned short){1, 2, 3, 4, 1, 2, 3, 4};
438 vector
signed int Icons1
= (vector
signed int){-4, -1, 1, 4};
439 vector
signed int Icons2
= (vector
signed int){1, 1, 1, 1};
440 vector
signed int Icons3
= (vector
signed int){0x80000000, 0x7FFFFFFF, 0x80000000, 0x7FFFFFFF};
441 vector
unsigned int UIcons1
= (vector
unsigned int){0xFFFFFFFE, 0xFFFFFFFF, 0, 1};
442 vector
unsigned int UIcons2
= (vector
unsigned int){1, 1, 1, 1};
443 vector
unsigned int UIcons3
= (vector
unsigned int){1, 2, 1, 2};
445 #if defined TEST_FLOATS
446 vector
float Fcons1
= (vector
float){-1.5, 1.0, 0.5, -3.999};
447 vector
float Fcons2
= (vector
float){1.0, 1.0, 1.0, 1.0};
448 vector
float Fcons3
= (vector
float){100000000000.0, 1.0, -1.0, -1234567890.0};
451 #elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
452 vector
signed char Ccons1
= (vector
signed char)(-8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7);
453 vector
signed char Ccons2
= (vector
signed char)(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1);
454 vector
signed char Ccons3
= (vector
signed char)(-128, 127, -128, 127, -128, 127, -128, 127, -128, 127, -128, 127, -128, 127, -128, 127);
455 vector
unsigned char UCcons1
= (vector
unsigned char)(248, 249, 250, 251, 252, 253, 254, 255, 0, 1, 2, 3, 4, 5, 6, 7);
456 vector
unsigned char UCcons2
= (vector
unsigned char)(2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2);
457 vector
unsigned char UCcons3
= (vector
unsigned char)(1, 2, 3, 4, 5, 6, 7, 8, 1, 2, 3, 4, 5, 6, 7, 8);
458 vector
signed short Scons1
= (vector
signed short)(-4, -3, -2, -1, 0, 1, 2, 3);
459 vector
signed short Scons2
= (vector
signed short)(-32768, 10000, 1, 1, 1, 1, -10000, -10000);
460 vector
signed short Scons3
= (vector
signed short)(-32768, 32767, -32768, 32767, -32768, 32767, -32768, 32767);
461 vector
unsigned short UScons1
= (vector
unsigned short)(65532, 65533, 65534, 65535, 0, 1, 2, 3);
462 vector
unsigned short UScons2
= (vector
unsigned short)(1, 1, 1, 1, 1, 1, 1, 1);
463 vector
unsigned short UScons3
= (vector
unsigned short)(1, 2, 3, 4, 1, 2, 3, 4);
464 vector
signed int Icons1
= (vector
signed int)(-4, -1, 1, 4);
465 vector
signed int Icons2
= (vector
signed int)(1, 1, 1, 1);
466 vector
signed int Icons3
= (vector
signed int)(0x80000000, 0x7FFFFFFF, 0x80000000, 0x7FFFFFFF);
467 vector
unsigned int UIcons1
= (vector
unsigned int)(0xFFFFFFFE, 0xFFFFFFFF, 0, 1);
468 vector
unsigned int UIcons2
= (vector
unsigned int)(1, 1, 1, 1);
469 vector
unsigned int UIcons3
= (vector
unsigned int)(1, 2, 1, 2);
471 #if defined TEST_FLOATS
472 vector
float Fcons1
= (vector
float)(-1.5, 1.0, 0.5, -3.999);
473 vector
float Fcons2
= (vector
float)(1.0, 1.0, 1.0, 1.0);
474 vector
float Fcons3
= (vector
float)(100000000000.0, 1.0, -1.0, -1234567890.0);
480 /* Function vec_abs */
481 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
483 Caux1
.v
= vec_abs( Ccons1
);
485 for( i
=0; i
< 16; i
++ )
486 if (Caux1
.e
[i
] != abs( Caux2
.e
[i
] ))
489 printf("Function vec_abs [type char] ===> Error\n");
491 printf("Function vec_abs [type char] ===> OK\n");
494 Saux1
.v
= vec_abs( Scons1
);
496 for( i
=0; i
< 8; i
++ )
497 if (Saux1
.e
[i
] != abs( Saux2
.e
[i
] ))
500 printf("Function vec_abs [type short] ===> Error\n");
502 printf("Function vec_abs [type short] ===> OK\n");
505 Iaux1
.v
= vec_abs( Icons1
);
507 for( i
=0; i
< 4; i
++ )
508 if (Iaux1
.e
[i
] != abs( Iaux2
.e
[i
] ))
511 printf("Function vec_abs [type integer] ===> Error\n");
513 printf("Function vec_abs [type integer] ===> OK\n");
515 #if defined TEST_FLOATS
517 Faux1
.v
= vec_abs( Fcons1
);
519 for( i
=0; i
< 4; i
++ )
520 if (Faux1
.e
[i
] != fabs( Faux2
.e
[i
] ))
523 printf("Function vec_abs [type float] ===> Error\n");
525 printf("Function vec_abs [type float] ===> OK\n");
528 /* Function vec_abss */
529 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
531 Caux1
.v
= vec_abss( Ccons1
);
533 for( i
=0; i
< 16; i
++ )
534 if (Caux1
.e
[i
] != abs( Caux2
.e
[i
] ))
537 printf("Function vec_abss [type char] ===> Error\n");
539 printf("Function vec_abss [type char] ===> OK\n");
542 Saux1
.v
= vec_abss( Scons1
);
544 for( i
=0; i
< 8; i
++ )
545 if (Saux1
.e
[i
] != abs( Saux2
.e
[i
] ))
548 printf("Function vec_abss [type short] ===> Error\n");
550 printf("Function vec_abss [type short] ===> OK\n");
553 Iaux1
.v
= vec_abss( Icons1
);
555 for( i
=0; i
< 4; i
++ )
556 if (Iaux1
.e
[i
] != abs( Iaux2
.e
[i
] ))
559 printf("Function vec_abss [type integer] ===> Error\n");
561 printf("Function vec_abss [type integer] ===> OK\n");
563 /* Function vec_add */
564 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
566 Caux1
.v
= vec_add( Ccons1
, Ccons2
);
569 for( i
=0; i
< 16; i
++ )
571 Caux
= Caux2
.e
[i
]+Caux3
.e
[i
];
572 if (Caux1
.e
[i
] != Caux
)
576 printf("Function vec_add [type char] ===> Error\n");
578 printf("Function vec_add [type char] ===> OK\n");
581 UCaux1
.v
= vec_add( UCcons1
, UCcons2
);
584 for( i
=0; i
< 16; i
++ )
586 UCaux
= UCaux2
.e
[i
]+UCaux3
.e
[i
];
587 if (UCaux1
.e
[i
] != UCaux
)
591 printf("Function vec_add [type unsigned char] ===> Error\n");
593 printf("Function vec_add [type unsigned char] ===> OK\n");
596 Saux1
.v
= vec_add( Scons1
, Scons2
);
599 for( i
=0; i
< 8; i
++ )
601 Saux
= Saux2
.e
[i
]+Saux3
.e
[i
];
602 if (Saux1
.e
[i
] != Saux
)
606 printf("Function vec_add [type short] ===> Error\n");
608 printf("Function vec_add [type short] ===> OK\n");
611 USaux1
.v
= vec_add( UScons1
, UScons2
);
614 for( i
=0; i
< 8; i
++ )
616 USaux
= USaux2
.e
[i
]+USaux3
.e
[i
];
617 if (USaux1
.e
[i
] != USaux
)
621 printf("Function vec_add [type unsigned short] ===> Error\n");
623 printf("Function vec_add [type unsigned short] ===> OK\n");
626 Iaux1
.v
= vec_add( Icons1
, Icons2
);
629 for( i
=0; i
< 4; i
++ )
631 Iaux
= Iaux2
.e
[i
]+Iaux3
.e
[i
];
632 if (Iaux1
.e
[i
] != Iaux
)
636 printf("Function vec_add [type integer] ===> Error\n");
638 printf("Function vec_add [type integer] ===> OK\n");
641 UIaux1
.v
= vec_add( UIcons1
, UIcons3
);
644 for( i
=0; i
< 4; i
++ )
646 UIaux
= UIaux2
.e
[i
]+UIaux3
.e
[i
];
647 if (UIaux1
.e
[i
] != UIaux
)
651 printf("Function vec_add [type unsigned int] ===> Error\n");
653 printf("Function vec_add [type unsigned int] ===> OK\n");
655 #if defined TEST_FLOATS
657 Faux1
.v
= vec_add( Fcons1
, Fcons2
);
660 for( i
=0; i
< 4; i
++ )
662 Faux
= Faux2
.e
[i
]+Faux3
.e
[i
];
663 if (Faux1
.e
[i
] != Faux
)
667 printf("Function vec_add [type float] ===> Error\n");
669 printf("Function vec_add [type float] ===> OK\n");
673 /* Function vec_addc */
674 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
676 UIaux1
.v
= vec_addc( UIcons1
, UIcons3
);
679 for( i
=0; i
< 4; i
++ )
681 UIaux
= (unsigned int)(UIaux2
.e
[i
]+UIaux3
.e
[i
]);
682 if ((UIaux
< UIaux2
.e
[i
]) || (UIaux
< UIaux3
.e
[i
]))
686 if (UIaux1
.e
[i
] != UIaux
)
690 printf("Function vec_addc [type unsigned int] ===> Error\n");
692 printf("Function vec_addc [type unsigned int] ===> OK\n");
694 /* Function vec_adds */
695 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
697 Caux1
.v
= vec_adds( Ccons1
, Ccons3
);
700 for( i
=0; i
< 16; i
++ )
702 Caux
= Caux2
.e
[i
]+Caux3
.e
[i
];
703 if ((Caux2
.e
[i
]>0)&&(Caux3
.e
[i
]>0))
708 else if ((Caux2
.e
[i
]<0)&&(Caux3
.e
[i
]<0))
713 if (Caux1
.e
[i
] != Caux
)
717 printf("Function vec_adds [type char] ===> Error\n");
719 printf("Function vec_adds [type char] ===> OK\n");
722 UCaux1
.v
= vec_adds( UCcons1
, UCcons3
);
725 for( i
=0; i
< 16; i
++ )
727 UCaux
= (unsigned char)(UCaux2
.e
[i
]+UCaux3
.e
[i
]);
728 if ((UCaux
< UCaux2
.e
[i
]) || (UCaux
< UCaux3
.e
[i
]))
730 if (UCaux1
.e
[i
] != UCaux
)
734 printf("Function vec_adds [type unsigned char] ===> Error\n");
736 printf("Function vec_adds [type unsigned char] ===> OK\n");
739 Saux1
.v
= vec_adds( Scons1
, Scons3
);
742 for( i
=0; i
< 8; i
++ )
744 Saux
= Saux2
.e
[i
]+Saux3
.e
[i
];
745 if ((Saux2
.e
[i
]>0)&&(Saux3
.e
[i
]>0))
750 else if ((Saux2
.e
[i
]<0)&&(Saux3
.e
[i
]<0))
755 if (Saux1
.e
[i
] != Saux
)
759 printf("Function vec_adds [type short] ===> Error\n");
761 printf("Function vec_adds [type short] ===> OK\n");
764 USaux1
.v
= vec_adds( UScons1
, UScons3
);
767 for( i
=0; i
< 8; i
++ )
769 USaux
= (unsigned short)(USaux2
.e
[i
]+USaux3
.e
[i
]);
770 if ((USaux
< USaux2
.e
[i
]) || (USaux
< USaux3
.e
[i
]))
772 if (USaux1
.e
[i
] != USaux
)
776 printf("Function vec_adds [type unsigned short] ===> Error\n");
778 printf("Function vec_adds [type unsigned short] ===> OK\n");
782 Iaux1
.v
= vec_adds( Icons1
, Icons3
);
785 for( i
=0; i
< 4; i
++ )
787 Iaux
= Iaux2
.e
[i
]+Iaux3
.e
[i
];
788 if ((Iaux2
.e
[i
]>0)&&(Iaux3
.e
[i
]>0))
793 else if ((Iaux2
.e
[i
]<0)&&(Iaux3
.e
[i
]<0))
798 if (Iaux1
.e
[i
] != Iaux
)
802 printf("Function vec_adds [type integer] ===> Error\n");
804 printf("Function vec_adds [type integer] ===> OK\n");
807 UIaux1
.v
= vec_adds( UIcons1
, UIcons3
);
810 for( i
=0; i
< 4; i
++ )
812 UIaux
= (unsigned int)(UIaux2
.e
[i
]+UIaux3
.e
[i
]);
813 if ((UIaux
< UIaux2
.e
[i
]) || (UIaux
< UIaux3
.e
[i
]))
815 if (UIaux1
.e
[i
] != UIaux
)
819 printf("Function vec_adds [type unsigned int] ===> Error\n");
821 printf("Function vec_adds [type unsigned int] ===> OK\n");
823 /* Function vec_and */
824 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
826 Caux1
.v
= vec_and( Ccons1
, Ccons2
);
829 for( i
=0; i
< 16; i
++ )
830 if (Caux1
.e
[i
] != (Caux2
.e
[i
] & Caux3
.e
[i
]))
833 printf("Function vec_and [type char] ===> Error\n");
835 printf("Function vec_and [type char] ===> OK\n");
838 UCaux1
.v
= vec_and( UCcons1
, UCcons2
);
841 for( i
=0; i
< 16; i
++ )
842 if (UCaux1
.e
[i
] != (UCaux2
.e
[i
] & UCaux3
.e
[i
]))
845 printf("Function vec_and [type unsigned char] ===> Error\n");
847 printf("Function vec_and [type unsigned char] ===> OK\n");
850 Saux1
.v
= vec_and( Scons1
, Scons2
);
853 for( i
=0; i
< 8; i
++ )
854 if (Saux1
.e
[i
] != (Saux2
.e
[i
] & Saux3
.e
[i
]))
857 printf("Function vec_and [type short] ===> Error\n");
859 printf("Function vec_and [type short] ===> OK\n");
862 USaux1
.v
= vec_and( UScons1
, UScons2
);
865 for( i
=0; i
< 8; i
++ )
866 if (USaux1
.e
[i
] != (USaux2
.e
[i
] & USaux3
.e
[i
]))
869 printf("Function vec_and [type unsigned short] ===> Error\n");
871 printf("Function vec_and [type unsigned short] ===> OK\n");
874 Iaux1
.v
= vec_and( Icons1
, Icons2
);
877 for( i
=0; i
< 4; i
++ )
878 if (Iaux1
.e
[i
] != (Iaux2
.e
[i
] & Iaux3
.e
[i
]))
881 printf("Function vec_and [type integer] ===> Error\n");
883 printf("Function vec_and [type integer] ===> OK\n");
886 UIaux1
.v
= vec_and( UIcons1
, UIcons2
);
889 for( i
=0; i
< 4; i
++ )
890 if (UIaux1
.e
[i
] != (UIaux2
.e
[i
] & UIaux3
.e
[i
]))
893 printf("Function vec_and [type unsigned int] ===> Error\n");
895 printf("Function vec_and [type unsigned int] ===> OK\n");
897 #if defined TEST_FLOATS
899 Faux1
.v
= vec_and( Fcons1
, Fcons2
);
902 for( i
=0; i
< 4; i
++ )
907 if ((Ivec1
) != ((Ivec2
) & (Ivec3
)))
911 printf("Function vec_and [type float] ===> Error\n");
913 printf("Function vec_and [type float] ===> OK\n");
916 /* Function vec_andc */
917 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
919 Caux1
.v
= vec_andc( Ccons1
, Ccons2
);
922 for( i
=0; i
< 16; i
++ )
923 if (Caux1
.e
[i
] != (Caux2
.e
[i
] & ~Caux3
.e
[i
]))
926 printf("Function vec_andc [type char] ===> Error\n");
928 printf("Function vec_andc [type char] ===> OK\n");
931 UCaux1
.v
= vec_andc( UCcons1
, UCcons2
);
934 for( i
=0; i
< 16; i
++ )
935 if (UCaux1
.e
[i
] != (UCaux2
.e
[i
] & ~UCaux3
.e
[i
]))
938 printf("Function vec_andc [type unsigned char] ===> Error\n");
940 printf("Function vec_andc [type unsigned char] ===> OK\n");
943 Saux1
.v
= vec_andc( Scons1
, Scons2
);
946 for( i
=0; i
< 8; i
++ )
947 if (Saux1
.e
[i
] != (Saux2
.e
[i
] & ~Saux3
.e
[i
]))
950 printf("Function vec_andc [type short] ===> Error\n");
952 printf("Function vec_andc [type short] ===> OK\n");
955 USaux1
.v
= vec_andc( UScons1
, UScons2
);
958 for( i
=0; i
< 8; i
++ )
959 if (USaux1
.e
[i
] != (USaux2
.e
[i
] & ~USaux3
.e
[i
]))
962 printf("Function vec_andc [type unsigned short] ===> Error\n");
964 printf("Function vec_andc [type unsigned short] ===> OK\n");
967 Iaux1
.v
= vec_andc( Icons1
, Icons2
);
970 for( i
=0; i
< 4; i
++ )
971 if (Iaux1
.e
[i
] != (Iaux2
.e
[i
] & ~Iaux3
.e
[i
]))
974 printf("Function vec_andc [type integer] ===> Error\n");
976 printf("Function vec_andc [type integer] ===> OK\n");
979 UIaux1
.v
= vec_andc( UIcons1
, UIcons2
);
982 for( i
=0; i
< 4; i
++ )
983 if (UIaux1
.e
[i
] != (UIaux2
.e
[i
] & ~UIaux3
.e
[i
]))
986 printf("Function vec_andc [type unsigned int] ===> Error\n");
988 printf("Function vec_andc [type unsigned int] ===> OK\n");
990 #if defined TEST_FLOATS
992 Faux1
.v
= vec_andc( Fcons1
, Fcons2
);
995 for( i
=0; i
< 4; i
++ )
1000 if ((Ivec1
) != ((Ivec2
) & ~(Ivec3
)))
1004 printf("Function vec_andc [type float] ===> Error\n");
1006 printf("Function vec_andc [type float] ===> OK\n");
1009 /* Function vec_avg */
1010 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
1012 Caux1
.v
= vec_avg( Ccons1
, Ccons2
);
1015 for( i
=0; i
< 16; i
++ )
1017 j
= (Caux2
.e
[i
]+Caux3
.e
[i
]+1) >> 1;
1018 if (Caux1
.e
[i
] != j
)
1022 printf("Function vec_avg [type char] ===> Error\n");
1024 printf("Function vec_avg [type char] ===> OK\n");
1027 UCaux1
.v
= vec_avg( UCcons1
, UCcons2
);
1030 for( i
=0; i
< 16; i
++ )
1032 j
= (UCaux2
.e
[i
]+UCaux3
.e
[i
]+1) >> 1;
1033 if (UCaux1
.e
[i
] != j
)
1037 printf("Function vec_avg [type unsigned char] ===> Error\n");
1039 printf("Function vec_avg [type unsigned char] ===> OK\n");
1042 Saux1
.v
= vec_avg( Scons1
, Scons2
);
1045 for( i
=0; i
< 8; i
++ )
1047 j
= (Saux2
.e
[i
]+Saux3
.e
[i
]+1) >> 1;
1048 if (Saux1
.e
[i
] != j
)
1052 printf("Function vec_avg [type short] ===> Error\n");
1054 printf("Function vec_avg [type short] ===> OK\n");
1057 USaux1
.v
= vec_avg( UScons1
, UScons2
);
1060 for( i
=0; i
< 8; i
++ )
1062 j
= (USaux2
.e
[i
]+USaux3
.e
[i
]+1) >> 1;
1063 if (USaux1
.e
[i
] != j
)
1067 printf("Function vec_avg [type unsigned short] ===> Error\n");
1069 printf("Function vec_avg [type unsigned short] ===> OK\n");
1072 Iaux1
.v
= vec_avg( Icons1
, Icons2
);
1075 for( i
=0; i
< 4; i
++ )
1077 Iaux
= Iaux2
.e
[i
]%2;
1082 Iaux
= (Iaux
- Iaux3
.e
[i
]%2 + 1)>>1;
1084 Iaux
= (Iaux
+ Iaux3
.e
[i
]%2 + 1)>>1;
1085 Iaux
= (Iaux2
.e
[i
] >> 1) + (Iaux3
.e
[i
] >> 1) + Iaux
;
1086 if (Iaux1
.e
[i
] != Iaux
)
1090 printf("Function vec_avg [type integer] ===> Error\n");
1092 printf("Function vec_avg [type integer] ===> OK\n");
1095 UIaux1
.v
= vec_avg( UIcons1
, UIcons2
);
1098 for( i
=0; i
< 4; i
++ )
1100 UIaux
= (UIaux2
.e
[i
] >> 1) + (UIaux3
.e
[i
] >> 1) +
1101 ((UIaux2
.e
[i
]%2 + UIaux3
.e
[i
]%2 + 1 )>>1);
1102 if (UIaux1
.e
[i
] != UIaux
)
1106 printf("Function vec_avg [type unsigned int] ===> Error\n");
1108 printf("Function vec_avg [type unsigned int] ===> OK\n");
1110 #if defined TEST_FLOATS
1111 /* Function vec_ceil */
1112 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
1114 Faux1
.v
= vec_ceil( Fcons1
);
1116 for( i
=0; i
< 4; i
++ )
1117 if (Faux1
.e
[i
] != ceil(Faux2
.e
[i
]))
1120 printf("Function vec_ceil [type float] ===> Error\n");
1122 printf("Function vec_ceil [type float] ===> OK\n");
1125 #if defined TEST_FLOATS
1126 /* Function vec_cmpb */
1127 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
1129 Iaux1
.v
= vec_cmpb( Fcons1
, Fcons2
);
1132 for( i
=0; i
< 4; i
++ )
1135 if (Faux2
.e
[i
]>Faux3
.e
[i
])
1137 if (Faux2
.e
[i
]<-Faux3
.e
[i
])
1139 if (Iaux1
.e
[i
] != j
)
1144 printf("Function vec_cmpb [type float] ===> Error\n");
1146 printf("Function vec_cmpb [type float] ===> OK\n");
1149 /* Function vec_cmpeq */
1150 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
1152 BCaux1
.v
= vec_cmpeq( Ccons1
, Ccons2
);
1155 for( i
=0; i
< 16; i
++ )
1157 if (Caux2
.e
[i
] == Caux3
.e
[i
])
1161 if (BCaux1
.e
[i
] != BCaux
)
1165 printf("Function vec_cmpeq [type char] ===> Error\n");
1167 printf("Function vec_cmpeq [type char] ===> OK\n");
1170 BCaux1
.v
= vec_cmpeq( UCcons1
, UCcons2
);
1173 for( i
=0; i
< 16; i
++ )
1175 if (UCaux2
.e
[i
] == UCaux3
.e
[i
])
1179 if (BCaux1
.e
[i
] != BCaux
)
1183 printf("Function vec_cmpeq [type unsigned char] ===> Error\n");
1185 printf("Function vec_cmpeq [type unsigned char] ===> OK\n");
1188 BSaux1
.v
= vec_cmpeq( Scons1
, Scons2
);
1191 for( i
=0; i
< 8; i
++ )
1193 if (Saux2
.e
[i
] == Saux3
.e
[i
])
1197 if (BSaux1
.e
[i
] != BSaux
)
1201 printf("Function vec_cmpeq [type short] ===> Error\n");
1203 printf("Function vec_cmpeq [type short] ===> OK\n");
1206 BSaux1
.v
= vec_cmpeq( UScons1
, UScons2
);
1209 for( i
=0; i
< 8; i
++ )
1211 if (USaux2
.e
[i
] == USaux3
.e
[i
])
1215 if (BSaux1
.e
[i
] != BSaux
)
1219 printf("Function vec_cmpeq [type unsigned short] ===> Error\n");
1221 printf("Function vec_cmpeq [type unsigned short] ===> OK\n");
1224 BIaux1
.v
= vec_cmpeq( Icons1
, Icons2
);
1227 for( i
=0; i
< 4; i
++ )
1229 if (Iaux2
.e
[i
] == Iaux3
.e
[i
])
1233 if (BIaux1
.e
[i
] != BIaux
)
1237 printf("Function vec_cmpeq [type integer] ===> Error\n");
1239 printf("Function vec_cmpeq [type integer] ===> OK\n");
1242 BIaux1
.v
= vec_cmpeq( UIcons1
, UIcons2
);
1245 for( i
=0; i
< 4; i
++ )
1247 if (UIaux2
.e
[i
] == UIaux3
.e
[i
])
1251 if (BIaux1
.e
[i
] != BIaux
)
1255 printf("Function vec_cmpeq [type unsigned int] ===> Error\n");
1257 printf("Function vec_cmpeq [type unsigned int] ===> OK\n");
1259 #if defined TEST_FLOATS
1261 BIaux1
.v
= vec_cmpeq( Fcons1
, Fcons2
);
1264 for( i
=0; i
< 4; i
++ )
1266 if (Faux2
.e
[i
] == Faux3
.e
[i
])
1270 if (BIaux1
.e
[i
] != BIaux
)
1274 printf("Function vec_cmpeq [type float] ===> Error\n");
1276 printf("Function vec_cmpeq [type float] ===> OK\n");
1279 #if defined TEST_FLOATS
1280 /* Function vec_cmpge */
1281 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
1283 BIaux1
.v
= vec_cmpge( Fcons1
, Fcons2
);
1286 for( i
=0; i
< 4; i
++ )
1288 if (Faux2
.e
[i
] >= Faux3
.e
[i
])
1292 if (BIaux1
.e
[i
] != BIaux
)
1296 printf("Function vec_cmpge [type float] ===> Error\n");
1298 printf("Function vec_cmpge [type float] ===> OK\n");
1301 /* Function vec_cmpgt */
1302 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
1304 BCaux1
.v
= vec_cmpgt( Ccons1
, Ccons2
);
1307 for( i
=0; i
< 16; i
++ )
1309 if (Caux2
.e
[i
] > Caux3
.e
[i
])
1313 if (BCaux1
.e
[i
] != BCaux
)
1317 printf("Function vec_cmpgt [type char] ===> Error\n");
1319 printf("Function vec_cmpgt [type char] ===> OK\n");
1322 BCaux1
.v
= vec_cmpgt( UCcons1
, UCcons2
);
1325 for( i
=0; i
< 16; i
++ )
1327 if (UCaux2
.e
[i
] > UCaux3
.e
[i
])
1331 if (BCaux1
.e
[i
] != BCaux
)
1335 printf("Function vec_cmpgt [type unsigned char] ===> Error\n");
1337 printf("Function vec_cmpgt [type unsigned char] ===> OK\n");
1340 BSaux1
.v
= vec_cmpgt( Scons1
, Scons2
);
1343 for( i
=0; i
< 8; i
++ )
1345 if (Saux2
.e
[i
] > Saux3
.e
[i
])
1349 if (BSaux1
.e
[i
] != BSaux
)
1353 printf("Function vec_cmpgt [type short] ===> Error\n");
1355 printf("Function vec_cmpgt [type short] ===> OK\n");
1358 BSaux1
.v
= vec_cmpgt( UScons1
, UScons2
);
1361 for( i
=0; i
< 8; i
++ )
1363 if (USaux2
.e
[i
] > USaux3
.e
[i
])
1367 if (BSaux1
.e
[i
] != BSaux
)
1371 printf("Function vec_cmpgt [type unsigned short] ===> Error\n");
1373 printf("Function vec_cmpgt [type unsigned short] ===> OK\n");
1376 BIaux1
.v
= vec_cmpgt( Icons1
, Icons2
);
1379 for( i
=0; i
< 4; i
++ )
1381 if (Iaux2
.e
[i
] > Iaux3
.e
[i
])
1385 if (BIaux1
.e
[i
] != BIaux
)
1389 printf("Function vec_cmpgt [type integer] ===> Error\n");
1391 printf("Function vec_cmpgt [type integer] ===> OK\n");
1394 BIaux1
.v
= vec_cmpgt( UIcons1
, UIcons2
);
1397 for( i
=0; i
< 4; i
++ )
1399 if (UIaux2
.e
[i
] > UIaux3
.e
[i
])
1403 if (BIaux1
.e
[i
] != BIaux
)
1407 printf("Function vec_cmpgt [type unsigned int] ===> Error\n");
1409 printf("Function vec_cmpgt [type unsigned int] ===> OK\n");
1411 #if defined TEST_FLOATS
1413 BIaux1
.v
= vec_cmpgt( Fcons1
, Fcons2
);
1416 for( i
=0; i
< 4; i
++ )
1418 if (Faux2
.e
[i
] > Faux3
.e
[i
])
1422 if (BIaux1
.e
[i
] != BIaux
)
1426 printf("Function vec_cmpgt [type float] ===> Error\n");
1428 printf("Function vec_cmpgt [type float] ===> OK\n");
1431 #if defined TEST_FLOATS
1432 /* Function vec_cmple */
1433 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
1435 BIaux1
.v
= vec_cmple( Fcons1
, Fcons2
);
1438 for( i
=0; i
< 4; i
++ )
1440 if (Faux2
.e
[i
] <= Faux3
.e
[i
])
1444 if (BIaux1
.e
[i
] != BIaux
)
1448 printf("Function vec_cmple [type float] ===> Error\n");
1450 printf("Function vec_cmple [type float] ===> OK\n");
1453 /* Function vec_cmplt */
1454 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
1456 BCaux1
.v
= vec_cmplt( Ccons1
, Ccons2
);
1459 for( i
=0; i
< 16; i
++ )
1461 if (Caux2
.e
[i
] < Caux3
.e
[i
])
1465 if (BCaux1
.e
[i
] != BCaux
)
1469 printf("Function vec_cmplt [type char] ===> Error\n");
1471 printf("Function vec_cmplt [type char] ===> OK\n");
1474 BCaux1
.v
= vec_cmplt( UCcons1
, UCcons2
);
1477 for( i
=0; i
< 16; i
++ )
1479 if (UCaux2
.e
[i
] < UCaux3
.e
[i
])
1483 if (BCaux1
.e
[i
] != BCaux
)
1487 printf("Function vec_cmplt [type unsigned char] ===> Error\n");
1489 printf("Function vec_cmplt [type unsigned char] ===> OK\n");
1492 BSaux1
.v
= vec_cmplt( Scons1
, Scons2
);
1495 for( i
=0; i
< 8; i
++ )
1497 if (Saux2
.e
[i
] < Saux3
.e
[i
])
1501 if (BSaux1
.e
[i
] != BSaux
)
1505 printf("Function vec_cmplt [type short] ===> Error\n");
1507 printf("Function vec_cmplt [type short] ===> OK\n");
1510 BSaux1
.v
= vec_cmplt( UScons1
, UScons2
);
1513 for( i
=0; i
< 8; i
++ )
1515 if (USaux2
.e
[i
] < USaux3
.e
[i
])
1519 if (BSaux1
.e
[i
] != BSaux
)
1523 printf("Function vec_cmplt [type unsigned short] ===> Error\n");
1525 printf("Function vec_cmplt [type unsigned short] ===> OK\n");
1528 BIaux1
.v
= vec_cmplt( Icons1
, Icons2
);
1531 for( i
=0; i
< 4; i
++ )
1533 if (Iaux2
.e
[i
] < Iaux3
.e
[i
])
1537 if (BIaux1
.e
[i
] != BIaux
)
1541 printf("Function vec_cmplt [type integer] ===> Error\n");
1543 printf("Function vec_cmplt [type integer] ===> OK\n");
1546 BIaux1
.v
= vec_cmplt( UIcons1
, UIcons2
);
1549 for( i
=0; i
< 4; i
++ )
1551 if (UIaux2
.e
[i
] < UIaux3
.e
[i
])
1555 if (BIaux1
.e
[i
] != BIaux
)
1559 printf("Function vec_cmplt [type unsigned int] ===> Error\n");
1561 printf("Function vec_cmplt [type unsigned int] ===> OK\n");
1563 #if defined TEST_FLOATS
1565 BIaux1
.v
= vec_cmplt( Fcons1
, Fcons2
);
1568 for( i
=0; i
< 4; i
++ )
1570 if (Faux2
.e
[i
] < Faux3
.e
[i
])
1574 if (BIaux1
.e
[i
] != BIaux
)
1578 printf("Function vec_cmplt [type float] ===> Error\n");
1580 printf("Function vec_cmplt [type float] ===> OK\n");
1583 #if defined TEST_FLOATS
1584 /* Function vec_ctf */
1585 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
1588 Faux1
.v
= vec_ctf( Icons1
, 2 );
1590 for( i
=0; i
< 4; i
++ )
1591 if (Faux1
.e
[i
] != (((float)Iaux1
.e
[i
])/(1<<b
)))
1594 printf("Function vec_ctf [type integer] ===> Error\n");
1596 printf("Function vec_ctf [type integer] ===> OK\n");
1600 Faux1
.v
= vec_ctf( UIcons1
, 2 );
1602 for( i
=0; i
< 4; i
++ )
1603 if (Faux1
.e
[i
] != (((float)UIaux1
.e
[i
])/(1<<b
)))
1606 printf("Function vec_ctf [type unsigned int] ===> Error\n");
1608 printf("Function vec_ctf [type unsigned int] ===> OK\n");
1611 #if defined TEST_FLOATS
1612 /* Function vec_cts */
1613 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
1616 Iaux1
.v
= vec_cts( Fcons3
, 2 );
1618 for( i
=0; i
< 4; i
++ )
1619 if (Iaux1
.e
[i
] != (int)(Faux1
.e
[i
]*(1<<b
)))
1622 printf("Function vec_cts [type float] ===> Error\n");
1624 printf("Function vec_cts [type float] ===> OK\n");
1627 #if defined TEST_FLOATS
1628 /* Function vec_ctu */
1629 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
1632 UIaux1
.v
= vec_ctu( Fcons3
, 2 );
1634 for( i
=0; i
< 4; i
++ )
1636 double d
= Faux1
.e
[i
]*(1<<b
);
1641 if (UIaux1
.e
[i
] != (unsigned int)(d
))
1645 printf("Function vec_ctu [type float] ===> Error\n");
1647 printf("Function vec_ctu [type float] ===> OK\n");
1668 TvecChar Caux1
;//, Caux2, Caux3, Caux4;
1669 TvecUChar UCaux1
;//, UCaux2, UCaux3, UCaux4;
1670 TvecShort Saux1
;//, Saux2, Saux3, Saux4;
1671 TvecUShort USaux1
;//, USaux2, USaux3, USaux4;
1672 TvecInt Iaux1
;//, Iaux2, Iaux3, Iaux4;
1673 TvecUInt UIaux1
;//, UIaux2, UIaux3, UIaux4;
1674 #if defined TEST_FLOATS
1675 TvecFloat Faux1
, Faux2
;//, Faux3, Faux4;
1678 int i
, err
, j
;//, b, bAux;
1679 // signed int Ivec1, Ivec2, Ivec3;
1680 // signed short *Svec1;
1681 // unsigned int *UIvec1;
1682 // unsigned short *USvec1;
1683 // unsigned char *UCvec1;
1684 #if defined TEST_FLOATS
1688 /* For saturated rutines */
1689 // long long int LLaux;
1691 #if defined TEST_FLOATS
1694 signed int Iaux
;//, I1, I2;
1695 // unsigned int UIaux, UI1, UI2;
1696 // signed short Saux;
1697 // unsigned short USaux;
1698 // signed char Caux;
1699 // unsigned char UCaux;
1708 unsigned short us[2];
1710 unsigned char uc[4];
1711 } INTunion1, INTunion2;
1718 unsigned char uc[2];
1719 } SHOunion1, SHOunion2;
1722 #if defined (GCC_COMPILER)
1723 vector
signed char Ccons1
= (vector
signed char){-8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7};
1724 // vector signed char Ccons2 = (vector signed char){1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1};
1725 // vector signed char Ccons3 = (vector signed char){-128, 127, -128, 127, -128, 127, -128, 127, -128, 127, -128, 127, -128, 127, -128, 127};
1726 vector
unsigned char UCcons1
= (vector
unsigned char){248, 249, 250, 251, 252, 253, 254, 255, 0, 1, 2, 3, 4, 5, 6, 7};
1727 // vector unsigned char UCcons2 = (vector unsigned char){2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2};
1728 // vector unsigned char UCcons3 = (vector unsigned char){1, 2, 3, 4, 5, 6, 7, 8, 1, 2, 3, 4, 5, 6, 7, 8};
1729 vector
signed short Scons1
= (vector
signed short){-4, -3, -2, -1, 0, 1, 2, 3};
1730 // vector signed short Scons2 = (vector signed short){-32768, 10000, 1, 1, 1, 1, -10000, -10000};
1731 // vector signed short Scons3 = (vector signed short){-32768, 32767, -32768, 32767, -32768, 32767, -32768, 32767};
1732 // vector unsigned short UScons1 = (vector unsigned short){65532, 65533, 65534, 65535, 0, 1, 2, 3};
1733 // vector unsigned short UScons2 = (vector unsigned short){1, 1, 1, 1, 1, 1, 1, 1};
1734 vector
unsigned short UScons3
= (vector
unsigned short){1, 2, 3, 4, 1, 2, 3, 4};
1735 vector
signed int Icons1
= (vector
signed int){-4, -1, 1, 4};
1736 // vector signed int Icons2 = (vector signed int){1, 1, 1, 1};
1737 // vector signed int Icons3 = (vector signed int){0x80000000, 0x7FFFFFFF, 0x80000000, 0x7FFFFFFF};
1738 vector
unsigned int UIcons1
= (vector
unsigned int){0xFFFFFFFE, 0xFFFFFFFF, 0, 1};
1739 // vector unsigned int UIcons2 = (vector unsigned int){1, 1, 1, 1};
1740 // vector unsigned int UIcons3 = (vector unsigned int){1, 2, 1, 2};
1742 #if defined TEST_FLOATS
1743 vector
float Fcons1
= (vector
float){-1.5, 1.0, 0.5, -3.999};
1744 // vector float Fcons2 = (vector float){1.0, 1.0, 1.0, 1.0};
1745 vector
float Fcons3
= (vector
float){100000000000.0, 1.0, -1.0, -1234567890.0};
1748 #elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
1749 vector
signed char Ccons1
= (vector
signed char)(-8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7);
1750 vector
signed char Ccons2
= (vector
signed char)(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1);
1751 vector
signed char Ccons3
= (vector
signed char)(-128, 127, -128, 127, -128, 127, -128, 127, -128, 127, -128, 127, -128, 127, -128, 127);
1752 vector
unsigned char UCcons1
= (vector
unsigned char)(248, 249, 250, 251, 252, 253, 254, 255, 0, 1, 2, 3, 4, 5, 6, 7);
1753 vector
unsigned char UCcons2
= (vector
unsigned char)(2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2);
1754 vector
unsigned char UCcons3
= (vector
unsigned char)(1, 2, 3, 4, 5, 6, 7, 8, 1, 2, 3, 4, 5, 6, 7, 8);
1755 vector
signed short Scons1
= (vector
signed short)(-4, -3, -2, -1, 0, 1, 2, 3);
1756 vector
signed short Scons2
= (vector
signed short)(-32768, 10000, 1, 1, 1, 1, -10000, -10000);
1757 vector
signed short Scons3
= (vector
signed short)(-32768, 32767, -32768, 32767, -32768, 32767, -32768, 32767);
1758 vector
unsigned short UScons1
= (vector
unsigned short)(65532, 65533, 65534, 65535, 0, 1, 2, 3);
1759 vector
unsigned short UScons2
= (vector
unsigned short)(1, 1, 1, 1, 1, 1, 1, 1);
1760 vector
unsigned short UScons3
= (vector
unsigned short)(1, 2, 3, 4, 1, 2, 3, 4);
1761 vector
signed int Icons1
= (vector
signed int)(-4, -1, 1, 4);
1762 vector
signed int Icons2
= (vector
signed int)(1, 1, 1, 1);
1763 vector
signed int Icons3
= (vector
signed int)(0x80000000, 0x7FFFFFFF, 0x80000000, 0x7FFFFFFF);
1764 vector
unsigned int UIcons1
= (vector
unsigned int)(0xFFFFFFFE, 0xFFFFFFFF, 0, 1);
1765 vector
unsigned int UIcons2
= (vector
unsigned int)(1, 1, 1, 1);
1766 vector
unsigned int UIcons3
= (vector
unsigned int)(1, 2, 1, 2);
1768 #if defined TEST_FLOATS
1769 vector
float Fcons1
= (vector
float)(-1.5, 1.0, 0.5, -3.999);
1770 vector
float Fcons2
= (vector
float)(1.0, 1.0, 1.0, 1.0);
1771 vector
float Fcons3
= (vector
float)(100000000000.0, 1.0, -1.0, -1234567890.0);
1777 /* Variables to be allocated with calloc_vec (16 bytes aligned) */
1778 unsigned char *UCmem
= (unsigned char*)calloc_vec( 1, sizeof(vector
unsigned char) );
1779 signed char *Cmem
= (signed char*)calloc_vec( 1, sizeof(vector
signed char) );
1780 unsigned short *USmem
= (unsigned short*)calloc_vec( 1, sizeof(vector
unsigned short) );
1781 signed short *Smem
= (signed short*)calloc_vec( 1, sizeof(vector
signed short) );
1782 unsigned int *UImem
= (unsigned int*)calloc_vec( 1, sizeof(vector
unsigned int) );
1783 signed int *Imem
= (signed int*)calloc_vec( 1, sizeof(vector
signed int) );
1784 #if defined TEST_FLOATS
1785 float *Fmem
= (float*)calloc_vec( 1, sizeof(vector
float) );
1788 /* Function vec_dss */
1789 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
1790 printf("Function vec_dss [Vector data Stream Stop] not checked\n");
1792 /* Function vec_dssall */
1793 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
1794 printf("Function vec_dssall [Vector Stream Stop all] not checked\n");
1796 /* Function vec_dst */
1797 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
1798 printf("Function vec_dst [Vector Data Stream Touch] not checked\n");
1800 /* Function vec_dstst */
1801 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
1802 printf("Function vec_dstst [Vector Data Stream Touch for Store] not checked\n");
1804 /* Function vec_dststt */
1805 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
1806 printf("Function vec_dststt [Vector Data Stream Touch for Store Transient] not checked\n");
1808 /* Function vec_dstt */
1809 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
1810 printf("Function vec_dstt [Vector Data Stream Touch Transient] not checked\n");
1812 #if defined TEST_FLOATS
1813 /* Function vec_expte */
1814 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
1816 Faux1
.v
= vec_expte( Fcons1
);
1818 for( i
=0; i
< 4; i
++ )
1820 Faux
= pow(2,Faux2
.e
[i
]);
1822 Ivec1 = (signed int*)(&Faux1.e[i]);
1823 Ivec2 = (signed int*)(&Faux);
1824 *Ivec1 = (*Ivec1) & 0xFFF00000;
1825 *Ivec2 = (*Ivec2) & 0xFFF00000;
1826 if (Faux1.e[i] != Faux)
1829 Faux
= (Faux
- Faux1
.e
[i
])/Faux
;
1834 printf("Function vec_expte [type float] ===> Error\n");
1836 printf("Function vec_expte [type float] ===> OK\n");
1839 #if defined TEST_FLOATS
1840 /* Function vec_floor */
1841 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
1843 Faux1
.v
= vec_floor( Fcons1
);
1845 for( i
=0; i
< 4; i
++ )
1846 if (Faux1
.e
[i
] != floor(Faux2
.e
[i
]))
1849 printf("Function vec_floor [type float] ===> Error\n");
1851 printf("Function vec_floor [type float] ===> OK\n");
1854 /* Function vec_ld */
1855 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
1857 memcpy( UCmem
, &UCcons1
, sizeof(vector
unsigned char) );
1858 UCaux1
.v
= vec_ld( 0, UCmem
);
1860 for ( i
=0; i
< 16; i
++ )
1862 Iaux
= Iaux
&& (UCaux1
.e
[i
]==UCmem
[i
]);
1867 printf("Function vec_ld [type unsigned char] ===> Error\n");
1869 printf("Function vec_ld [type unsigned char] ===> OK\n");
1872 memcpy( Cmem
, &Ccons1
, sizeof(vector
signed char) );
1873 Caux1
.v
= vec_ld( 0, Cmem
);
1875 for ( i
=0; i
< 16; i
++ )
1877 Iaux
= Iaux
&& (Caux1
.e
[i
]==Cmem
[i
]);
1882 printf("Function vec_ld [type char] ===> Error\n");
1884 printf("Function vec_ld [type char] ===> OK\n");
1887 memcpy( USmem
, &UScons3
, sizeof(vector
unsigned short) );
1888 USaux1
.v
= vec_ld( 0, USmem
);
1890 for ( i
=0; i
< 8; i
++ )
1892 Iaux
= Iaux
&& (USaux1
.e
[i
]==USmem
[i
]);
1897 printf("Function vec_ld [type unsigned short] ===> Error\n");
1899 printf("Function vec_ld [type unsigned short] ===> OK\n");
1902 memcpy( Smem
, &Scons1
, sizeof(vector
signed short) );
1903 Saux1
.v
= vec_ld( 0, Smem
);
1905 for ( i
=0; i
< 8; i
++ )
1907 Iaux
= Iaux
&& (Saux1
.e
[i
]==Smem
[i
]);
1912 printf("Function vec_ld [type short] ===> Error\n");
1914 printf("Function vec_ld [type short] ===> OK\n");
1917 memcpy( UImem
, &UIcons1
, sizeof(vector
unsigned int) );
1918 UIaux1
.v
= vec_ld( 0, UImem
);
1920 for ( i
=0; i
< 4; i
++ )
1922 Iaux
= Iaux
&& (UIaux1
.e
[i
]==UImem
[i
]);
1927 printf("Function vec_ld [type unsigned int] ===> Error\n");
1929 printf("Function vec_ld [type unsigned int] ===> OK\n");
1932 memcpy( Imem
, &Icons1
, sizeof(vector
signed int) );
1933 Iaux1
.v
= vec_ld( 0, Imem
);
1935 for ( i
=0; i
< 4; i
++ )
1937 Iaux
= Iaux
&& (Iaux1
.e
[i
]==Imem
[i
]);
1942 printf("Function vec_ld [type int] ===> Error\n");
1944 printf("Function vec_ld [type int] ===> OK\n");
1946 #if defined TEST_FLOATS
1948 memcpy( Fmem
, &Fcons1
, sizeof(vector
float) );
1949 Faux1
.v
= vec_ld( 0, Fmem
);
1951 for ( i
=0; i
< 4; i
++ )
1953 Iaux
= Iaux
&& (Faux1
.e
[i
]==Fmem
[i
]);
1958 printf("Function vec_ld [type float] ===> Error\n");
1960 printf("Function vec_ld [type float] ===> OK\n");
1963 /* Function vec_lde */
1964 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
1967 for (i
= 0; i
< 16; i
++)
1968 UCmem
[i
] = (unsigned char)i
;
1970 i
= j
*sizeof(unsigned char);
1971 UCaux1
.v
= vec_lde( i
, UCmem
);
1973 if (UCaux1
.e
[j
] != UCmem
[j
]) err
++;
1976 printf("Function vec_lde [type unsigned char] ===> Error\n");
1978 printf("Function vec_lde [type unsigned char] ===> OK\n");
1981 for (i
= 0; i
< 16; i
++)
1982 Cmem
[i
] = (char)(-i
);
1985 Caux1
.v
= vec_lde( i
, Cmem
);
1987 if (Caux1
.e
[j
] != Cmem
[j
]) err
++;
1990 printf("Function vec_lde [type char] ===> Error\n");
1992 printf("Function vec_lde [type char] ===> OK\n");
1995 for (i
= 0; i
< 8; i
++)
1996 USmem
[i
] = (unsigned short)(i
);
1998 i
= j
*sizeof(unsigned short);
1999 USaux1
.v
= vec_lde( i
, USmem
);
2001 if (USaux1
.e
[j
] != USmem
[j
]) err
++;
2004 printf("Function vec_lde [type unsigned short] ===> Error\n");
2006 printf("Function vec_lde [type unsigned short] ===> OK\n");
2009 for (i
= 0; i
< 8; i
++)
2010 Smem
[i
] = (short)(-i
);
2012 i
= j
*sizeof(short);
2013 Saux1
.v
= vec_lde( i
, Smem
);
2015 if (Saux1
.e
[j
] != Smem
[j
]) err
++;
2018 printf("Function vec_lde [type short] ===> Error\n");
2020 printf("Function vec_lde [type short] ===> OK\n");
2023 for (i
= 0; i
< 4; i
++)
2024 UImem
[i
] = (unsigned int)(i
);
2026 i
= j
*sizeof(unsigned int);
2027 UIaux1
.v
= vec_lde( i
, UImem
);
2029 if (UIaux1
.e
[j
] != UImem
[j
]) err
++;
2032 printf("Function vec_lde [type unsigned int] ===> Error\n");
2034 printf("Function vec_lde [type unsigned int] ===> OK\n");
2037 for (i
= 0; i
< 4; i
++)
2038 Imem
[i
] = (int)(-i
);
2041 Iaux1
.v
= vec_lde( i
, Imem
);
2043 if (Iaux1
.e
[j
] != Imem
[j
]) err
++;
2046 printf("Function vec_lde [type int] ===> Error\n");
2048 printf("Function vec_lde [type int] ===> OK\n");
2050 #if defined TEST_FLOATS
2052 for (i
= 0; i
< 4; i
++)
2053 Fmem
[i
] = ((float)(-i
)) - 0.5;
2055 i
= j
*sizeof(float);
2056 Faux1
.v
= vec_lde( i
, Fmem
);
2058 if (Faux1
.e
[j
] != Fmem
[j
]) err
++;
2061 printf("Function vec_lde [type float] ===> Error\n");
2063 printf("Function vec_lde [type float] ===> OK\n");
2067 /* Function vec_ldl */
2068 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
2070 memcpy( UCmem
, &UCcons1
, sizeof(vector
unsigned char) );
2071 UCaux1
.v
= vec_ldl( 0, UCmem
);
2073 for ( i
=0; i
< 16; i
++ )
2075 Iaux
= Iaux
&& (UCaux1
.e
[i
]==UCmem
[i
]);
2080 printf("Function vec_ldl [type unsigned char] ===> Error\n");
2082 printf("Function vec_ldl [type unsigned char] ===> OK\n");
2085 memcpy( Cmem
, &Ccons1
, sizeof(vector
signed char) );
2086 Caux1
.v
= vec_ldl( 0, Cmem
);
2088 for ( i
=0; i
< 16; i
++ )
2090 Iaux
= Iaux
&& (Caux1
.e
[i
]==Cmem
[i
]);
2095 printf("Function vec_ldl [type char] ===> Error\n");
2097 printf("Function vec_ldl [type char] ===> OK\n");
2100 memcpy( USmem
, &UScons3
, sizeof(vector
unsigned short) );
2101 USaux1
.v
= vec_ldl( 0, USmem
);
2103 for ( i
=0; i
< 8; i
++ )
2105 Iaux
= Iaux
&& (USaux1
.e
[i
]==USmem
[i
]);
2110 printf("Function vec_ldl [type unsigned short] ===> Error\n");
2112 printf("Function vec_ldl [type unsigned short] ===> OK\n");
2115 memcpy( Smem
, &Scons1
, sizeof(vector
signed short) );
2116 Saux1
.v
= vec_ldl( 0, Smem
);
2118 for ( i
=0; i
< 8; i
++ )
2120 Iaux
= Iaux
&& (Saux1
.e
[i
]==Smem
[i
]);
2125 printf("Function vec_ldl [type short] ===> Error\n");
2127 printf("Function vec_ldl [type short] ===> OK\n");
2130 memcpy( UImem
, &UIcons1
, sizeof(vector
unsigned int) );
2131 UIaux1
.v
= vec_ldl( 0, UImem
);
2133 for ( i
=0; i
< 4; i
++ )
2135 Iaux
= Iaux
&& (UIaux1
.e
[i
]==UImem
[i
]);
2140 printf("Function vec_ldl [type unsigned int] ===> Error\n");
2142 printf("Function vec_ldl [type unsigned int] ===> OK\n");
2145 memcpy( Imem
, &Icons1
, sizeof(vector
signed int) );
2146 Iaux1
.v
= vec_ldl( 0, Imem
);
2148 for ( i
=0; i
< 4; i
++ )
2150 Iaux
= Iaux
&& (Iaux1
.e
[i
]==Imem
[i
]);
2155 printf("Function vec_ldl [type int] ===> Error\n");
2157 printf("Function vec_ldl [type int] ===> OK\n");
2159 #if defined TEST_FLOATS
2161 memcpy( Fmem
, &Fcons1
, sizeof(vector
float) );
2162 Faux1
.v
= vec_ldl( 0, Fmem
);
2164 for ( i
=0; i
< 4; i
++ )
2166 Iaux
= Iaux
&& (Faux1
.e
[i
]==Fmem
[i
]);
2171 printf("Function vec_ldl [type float] ===> Error\n");
2173 printf("Function vec_ldl [type float] ===> OK\n");
2177 /* Free dynamic vector variables */
2184 #if defined TEST_FLOATS
2188 #if defined TEST_FLOATS
2189 /* Function vec_loge */
2190 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
2192 Faux1
.v
= vec_loge( Fcons3
);
2194 for( i
=0; i
< 4; i
++ )
2196 Faux
= log2(Faux2
.e
[i
]);
2198 Faux
= (Faux
- Faux1
.e
[i
])/Faux
;
2200 Faux
= Faux
- Faux1
.e
[i
];
2205 printf("Function vec_loge [type float] ===> Error\n");
2207 printf("Function vec_loge [type float] ===> OK\n");
2218 TvecChar Caux1
, Caux2
, Caux3
;//, Caux4;
2219 TvecUChar UCaux1
, UCaux2
, UCaux3
;//, UCaux4;
2220 TvecShort Saux1
, Saux2
, Saux3
, Saux4
;
2221 TvecUShort USaux1
, USaux2
, USaux3
, USaux4
;
2222 TvecInt Iaux1
, Iaux2
, Iaux3
;//, Iaux4;
2223 TvecUInt UIaux1
, UIaux2
, UIaux3
;//, UIaux4;
2224 #if defined TEST_FLOATS
2225 TvecFloat Faux1
, Faux2
, Faux3
, Faux4
;
2228 int i
, err
, j
, b
, bAux
;
2229 #if defined TEST_FLOATS
2230 signed int Ivec1
, Ivec2
, Ivec3
;
2232 // signed short *Svec1;
2233 // unsigned int *UIvec1;
2234 // unsigned short *USvec1;
2235 // unsigned char *UCvec1;
2236 #if defined TEST_FLOATS
2240 /* For saturated rutines */
2241 // long long int LLaux;
2243 #if defined TEST_FLOATS
2246 signed int Iaux
, I1
, I2
;
2247 unsigned int UIaux
, UI1
, UI2
;
2249 unsigned short USaux
;
2251 unsigned char UCaux
;
2259 unsigned short us
[2];
2261 unsigned char uc
[4];
2262 } INTunion1
;//, INTunion2;
2270 unsigned char uc[2];
2271 } SHOunion1, SHOunion2;
2274 #if defined (GCC_COMPILER)
2275 vector
signed char Ccons1
= (vector
signed char){-8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7};
2276 vector
signed char Ccons2
= (vector
signed char){1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1};
2277 // vector signed char Ccons3 = (vector signed char){-128, 127, -128, 127, -128, 127, -128, 127, -128, 127, -128, 127, -128, 127, -128, 127};
2278 vector
unsigned char UCcons1
= (vector
unsigned char){248, 249, 250, 251, 252, 253, 254, 255, 0, 1, 2, 3, 4, 5, 6, 7};
2279 vector
unsigned char UCcons2
= (vector
unsigned char){2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2};
2280 // vector unsigned char UCcons3 = (vector unsigned char){1, 2, 3, 4, 5, 6, 7, 8, 1, 2, 3, 4, 5, 6, 7, 8};
2281 vector
signed short Scons1
= (vector
signed short){256, 320, 340, -1, 0, 1, 2, 3};
2282 vector
signed short Scons2
= (vector
signed short){256, 320, 340, 1, 1, 1, -10000, -10000};
2283 vector
signed short Scons3
= (vector
signed short){256, 320, 340, 32767, -32768, 32767, -32768, 32767};
2284 vector
unsigned short UScons1
= (vector
unsigned short){65532, 65533, 65534, 65535, 0, 1, 2, 3};
2285 vector
unsigned short UScons2
= (vector
unsigned short){1, 1, 1, 1, 1, 1, 1, 1};
2286 vector
unsigned short UScons3
= (vector
unsigned short){1, 2, 3, 4, 1, 2, 3, 4};
2287 vector
signed int Icons1
= (vector
signed int){-4, -1, 1, 4};
2288 vector
signed int Icons2
= (vector
signed int){1, 1, 1, 1};
2289 vector
signed int Icons3
= (vector
signed int){0x80000000, 0x7FFFFFFF, 0x80000000, 0x7FFFFFFF};
2290 vector
unsigned int UIcons1
= (vector
unsigned int){0xFFFFFFFE, 0xFFFFFFFF, 0, 1};
2291 vector
unsigned int UIcons2
= (vector
unsigned int){1, 1, 1, 1};
2292 vector
unsigned int UIcons3
= (vector
unsigned int){1, 2, 1, 2};
2294 #if defined TEST_FLOATS
2295 vector
float Fcons1
= (vector
float){-1.5, 1.0, 0.5, -3.999};
2296 vector
float Fcons2
= (vector
float){1.0, 1.0, 1.0, 1.0};
2297 vector
float Fcons3
= (vector
float){100000000000.0, 1.0, -1.0, -1234567890.0};
2300 #elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
2301 vector
signed char Ccons1
= (vector
signed char)(-8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7);
2302 vector
signed char Ccons2
= (vector
signed char)(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1);
2303 vector
signed char Ccons3
= (vector
signed char)(-128, 127, -128, 127, -128, 127, -128, 127, -128, 127, -128, 127, -128, 127, -128, 127);
2304 vector
unsigned char UCcons1
= (vector
unsigned char)(248, 249, 250, 251, 252, 253, 254, 255, 0, 1, 2, 3, 4, 5, 6, 7);
2305 vector
unsigned char UCcons2
= (vector
unsigned char)(2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2);
2306 // vector unsigned char UCcons3 = (vector unsigned char)(1, 2, 3, 4, 5, 6, 7, 8, 1, 2, 3, 4, 5, 6, 7, 8);
2307 vector
signed short Scons1
= (vector
signed short)(-4, -3, -2, -1, 0, 1, 2, 3);
2308 vector
signed short Scons2
= (vector
signed short)(-32768, 10000, 1, 1, 1, 1, -10000, -10000);
2309 vector
signed short Scons3
= (vector
signed short)(-32768, 32767, -32768, 32767, -32768, 32767, -32768, 32767);
2310 vector
unsigned short UScons1
= (vector
unsigned short)(65532, 65533, 65534, 65535, 0, 1, 2, 3);
2311 vector
unsigned short UScons2
= (vector
unsigned short)(1, 1, 1, 1, 1, 1, 1, 1);
2312 vector
unsigned short UScons3
= (vector
unsigned short)(1, 2, 3, 4, 1, 2, 3, 4);
2313 vector
signed int Icons1
= (vector
signed int)(-4, -1, 1, 4);
2314 vector
signed int Icons2
= (vector
signed int)(1, 1, 1, 1);
2315 vector
signed int Icons3
= (vector
signed int)(0x80000000, 0x7FFFFFFF, 0x80000000, 0x7FFFFFFF);
2316 vector
unsigned int UIcons1
= (vector
unsigned int)(0xFFFFFFFE, 0xFFFFFFFF, 0, 1);
2317 vector
unsigned int UIcons2
= (vector
unsigned int)(1, 1, 1, 1);
2318 vector
unsigned int UIcons3
= (vector
unsigned int)(1, 2, 1, 2);
2320 #if defined TEST_FLOATS
2321 vector
float Fcons1
= (vector
float)(-1.5, 1.0, 0.5, -3.999);
2322 vector
float Fcons2
= (vector
float)(1.0, 1.0, 1.0, 1.0);
2323 vector
float Fcons3
= (vector
float)(100000000000.0, 1.0, -1.0, -1234567890.0);
2329 /* Function vec_lvsl */
2330 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
2333 UCaux1
.v
= vec_lvsl( b
, &b
);
2334 bAux
= b
+ (size_t)(&b
);
2336 # if defined(GCC_COMPILER)
2337 UCaux2
.v
=(vector
unsigned char){0x0,0x1,0x2,0x3,0x4,0x5,0x6,0x7,0x8,0x9,0xA,0xB,0xC,0xD,0xE,0xF};
2338 # elif defined(MAC_COMPILER) || defined (XLC_COMPILER)
2339 UCaux2
.v
=(vector
unsigned char)(0x0,0x1,0x2,0x3,0x4,0x5,0x6,0x7,0x8,0x9,0xA,0xB,0xC,0xD,0xE,0xF);
2341 for( i
=0; i
< 16; i
++ )
2343 UCaux
= UCaux2
.e
[i
]+b
;
2344 if (UCaux1
.e
[i
] != UCaux
)
2348 printf("Function vec_lvsl [type unsigned char] ===> Error\n");
2350 printf("Function vec_lvsl [type unsigned char] ===> OK\n");
2352 /* Function vec_lvsr */
2353 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
2356 UCaux1
.v
= vec_lvsr( b
, &b
);
2357 bAux
= b
+ (size_t)(&b
);
2359 # if defined (GCC_COMPILER)
2360 UCaux2
.v
=(vector
unsigned char){0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F};
2361 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
2362 UCaux2
.v
=(vector
unsigned char)(0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F);
2364 for( i
=0; i
< 16; i
++ )
2366 UCaux
= UCaux2
.e
[i
]-b
;
2367 if (UCaux1
.e
[i
] != UCaux
)
2371 printf("Function vec_lvsr [type unsigned char] ===> Error\n");
2373 printf("Function vec_lvsr [type unsigned char] ===> OK\n");
2375 #if defined TEST_FLOATS
2376 /* Function vec_madd */
2377 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
2379 Faux1
.v
= vec_madd( Fcons1
, Fcons2
, Fcons3
);
2383 for( i
=0; i
< 4; i
++ )
2384 if (Faux1
.e
[i
] != (Faux2
.e
[i
]*Faux3
.e
[i
]+Faux4
.e
[i
]))
2387 printf("Function vec_madd [type float] ===> Error\n");
2389 printf("Function vec_madd [type float] ===> OK\n");
2392 /* Function vec_madds */
2393 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
2395 Saux1
.v
= vec_madds( Scons1
, Scons3
, Scons2
);
2399 for( i
=0; i
< 8; i
++ )
2401 INTunion1
.si
= Saux2
.e
[i
]*Saux3
.e
[i
];
2402 INTunion1
.si
= INTunion1
.si
>> 15;
2403 INTunion1
.si
= INTunion1
.si
+ Saux4
.e
[i
];
2404 if (INTunion1
.si
>32767)
2406 else if (INTunion1
.si
<(-32768))
2409 Saux
= INTunion1
.ss
[1];
2410 if (Saux1
.e
[i
] != Saux
)
2414 printf("Function vec_madds [type short] ===> Error\n");
2416 printf("Function vec_madds [type short] ===> OK\n");
2418 /* Function vec_max */
2419 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
2421 Caux1
.v
= vec_max( Ccons1
, Ccons2
);
2424 for( i
=0; i
< 16; i
++ )
2426 if (Caux2
.e
[i
]>Caux3
.e
[i
])
2430 if (Caux1
.e
[i
] != Caux
)
2434 printf("Function vec_max [type char] ===> Error\n");
2436 printf("Function vec_max [type char] ===> OK\n");
2439 UCaux1
.v
= vec_max( UCcons1
, UCcons2
);
2442 for( i
=0; i
< 16; i
++ )
2444 if (UCaux2
.e
[i
]>UCaux3
.e
[i
])
2445 UCaux
= UCaux2
.e
[i
];
2447 UCaux
= UCaux3
.e
[i
];
2448 if (UCaux1
.e
[i
] != UCaux
)
2452 printf("Function vec_max [type unsigned char] ===> Error\n");
2454 printf("Function vec_max [type unsigned char] ===> OK\n");
2457 Saux1
.v
= vec_max( Scons1
, Scons3
);
2460 for( i
=0; i
< 8; i
++ )
2462 if (Saux2
.e
[i
]>Saux3
.e
[i
])
2466 if (Saux1
.e
[i
] != Saux
)
2470 printf("Function vec_max [type short] ===> Error\n");
2472 printf("Function vec_max [type short] ===> OK\n");
2475 USaux1
.v
= vec_max( UScons1
, UScons2
);
2478 for( i
=0; i
< 8; i
++ )
2480 if (USaux2
.e
[i
]>USaux3
.e
[i
])
2481 USaux
= USaux2
.e
[i
];
2483 USaux
= USaux3
.e
[i
];
2484 if (USaux1
.e
[i
] != USaux
)
2488 printf("Function vec_max [type unsigned short] ===> Error\n");
2490 printf("Function vec_max [type unsigned short] ===> OK\n");
2493 Iaux1
.v
= vec_max( Icons1
, Icons2
);
2496 for( i
=0; i
< 4; i
++ )
2498 if (Iaux2
.e
[i
]>Iaux3
.e
[i
])
2502 if (Iaux1
.e
[i
] != Iaux
)
2506 printf("Function vec_max [type integer] ===> Error\n");
2508 printf("Function vec_max [type integer] ===> OK\n");
2511 UIaux1
.v
= vec_max( UIcons1
, UIcons2
);
2514 for( i
=0; i
< 4; i
++ )
2516 if (UIaux2
.e
[i
]>UIaux3
.e
[i
])
2517 UIaux
= UIaux2
.e
[i
];
2519 UIaux
= UIaux3
.e
[i
];
2520 if (UIaux1
.e
[i
] != UIaux
)
2524 printf("Function vec_max [type unsigned int] ===> Error\n");
2526 printf("Function vec_max [type unsigned int] ===> OK\n");
2528 #if defined TEST_FLOATS
2530 Faux1
.v
= vec_max( Fcons1
, Fcons2
);
2533 for( i
=0; i
< 4; i
++ )
2535 if (Faux2
.e
[i
]>Faux3
.e
[i
])
2539 if (Faux1
.e
[i
] != Faux
)
2543 printf("Function vec_max [type float] ===> Error\n");
2545 printf("Function vec_max [type float] ===> OK\n");
2548 /* Function vec_mergeh */
2549 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
2551 Caux1
.v
= vec_mergeh( Ccons1
, Ccons2
);
2554 for( i
=0; i
< 8; i
++ )
2555 if ((Caux1
.e
[2*i
] != Caux2
.e
[i
])||(Caux1
.e
[2*i
+1]!=Caux3
.e
[i
]))
2558 printf("Function vec_mergeh [type char] ===> Error\n");
2560 printf("Function vec_mergeh [type char] ===> OK\n");
2563 UCaux1
.v
= vec_mergeh( UCcons1
, UCcons2
);
2566 for( i
=0; i
< 8; i
++ )
2567 if ((UCaux1
.e
[2*i
] != UCaux2
.e
[i
])||(UCaux1
.e
[2*i
+1]!=UCaux3
.e
[i
]))
2570 printf("Function vec_mergeh [type unsigned char] ===> Error\n");
2572 printf("Function vec_mergeh [type unsigned char] ===> OK\n");
2575 Saux1
.v
= vec_mergeh( Scons1
, Scons2
);
2578 for( i
=0; i
< 4; i
++ )
2579 if ((Saux1
.e
[2*i
] != Saux2
.e
[i
])||(Saux1
.e
[2*i
+1]!=Saux3
.e
[i
]))
2582 printf("Function vec_mergeh [type short] ===> Error\n");
2584 printf("Function vec_mergeh [type short] ===> OK\n");
2587 USaux1
.v
= vec_mergeh( UScons1
, UScons2
);
2590 for( i
=0; i
< 4; i
++ )
2591 if ((USaux1
.e
[2*i
] != USaux2
.e
[i
])||(USaux1
.e
[2*i
+1]!=USaux3
.e
[i
]))
2594 printf("Function vec_mergeh [type unsigned short] ===> Error\n");
2596 printf("Function vec_mergeh [type unsigned short] ===> OK\n");
2599 Iaux1
.v
= vec_mergeh( Icons1
, Icons2
);
2602 for( i
=0; i
< 2; i
++ )
2603 if ((Iaux1
.e
[2*i
] != Iaux2
.e
[i
])||(Iaux1
.e
[2*i
+1]!=Iaux3
.e
[i
]))
2606 printf("Function vec_mergeh [type integer] ===> Error\n");
2608 printf("Function vec_mergeh [type integer] ===> OK\n");
2611 UIaux1
.v
= vec_mergeh( UIcons1
, UIcons2
);
2614 for( i
=0; i
< 2; i
++ )
2615 if ((UIaux1
.e
[2*i
] != UIaux2
.e
[i
])||(UIaux1
.e
[2*i
+1]!=UIaux3
.e
[i
]))
2618 printf("Function vec_mergeh [type unsigned int] ===> Error\n");
2620 printf("Function vec_mergeh [type unsigned int] ===> OK\n");
2622 #if defined TEST_FLOATS
2624 Faux1
.v
= vec_mergeh( Fcons1
, Fcons2
);
2627 for( i
=0; i
< 2; i
++ )
2628 if ((Faux1
.e
[2*i
] != Faux2
.e
[i
])||(Faux1
.e
[2*i
+1]!=Faux3
.e
[i
]))
2631 printf("Function vec_mergeh [type float] ===> Error\n");
2633 printf("Function vec_mergeh [type float] ===> OK\n");
2636 /* Function vec_mergel */
2637 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
2639 Caux1
.v
= vec_mergel( Ccons1
, Ccons2
);
2642 for( i
=0; i
< 8; i
++ )
2643 if ((Caux1
.e
[2*i
] != Caux2
.e
[i
+8])||(Caux1
.e
[2*i
+1]!=Caux3
.e
[i
+8]))
2646 printf("Function vec_mergel [type char] ===> Error\n");
2648 printf("Function vec_mergel [type char] ===> OK\n");
2651 UCaux1
.v
= vec_mergel( UCcons1
, UCcons2
);
2654 for( i
=0; i
< 8; i
++ )
2655 if ((UCaux1
.e
[2*i
] != UCaux2
.e
[i
+8])||(UCaux1
.e
[2*i
+1]!=UCaux3
.e
[i
+8]))
2658 printf("Function vec_mergel [type unsigned char] ===> Error\n");
2660 printf("Function vec_mergel [type unsigned char] ===> OK\n");
2663 Saux1
.v
= vec_mergel( Scons1
, Scons2
);
2666 for( i
=0; i
< 4; i
++ )
2667 if ((Saux1
.e
[2*i
] != Saux2
.e
[i
+4])||(Saux1
.e
[2*i
+1]!=Saux3
.e
[i
+4]))
2670 printf("Function vec_mergel [type short] ===> Error\n");
2672 printf("Function vec_mergel [type short] ===> OK\n");
2675 USaux1
.v
= vec_mergel( UScons1
, UScons2
);
2678 for( i
=0; i
< 4; i
++ )
2679 if ((USaux1
.e
[2*i
] != USaux2
.e
[i
+4])||(USaux1
.e
[2*i
+1]!=USaux3
.e
[i
+4]))
2682 printf("Function vec_mergel [type unsigned short] ===> Error\n");
2684 printf("Function vec_mergel [type unsigned short] ===> OK\n");
2687 Iaux1
.v
= vec_mergel( Icons1
, Icons2
);
2690 for( i
=0; i
< 2; i
++ )
2691 if ((Iaux1
.e
[2*i
] != Iaux2
.e
[i
+2])||(Iaux1
.e
[2*i
+1]!=Iaux3
.e
[i
+2]))
2694 printf("Function vec_mergel [type integer] ===> Error\n");
2696 printf("Function vec_mergel [type integer] ===> OK\n");
2699 UIaux1
.v
= vec_mergel( UIcons1
, UIcons2
);
2702 for( i
=0; i
< 2; i
++ )
2703 if ((UIaux1
.e
[2*i
] != UIaux2
.e
[i
+2])||(UIaux1
.e
[2*i
+1]!=UIaux3
.e
[i
+2]))
2706 printf("Function vec_mergel [type unsigned int] ===> Error\n");
2708 printf("Function vec_mergel [type unsigned int] ===> OK\n");
2710 #if defined TEST_FLOATS
2712 Faux1
.v
= vec_mergel( Fcons1
, Fcons2
);
2715 for( i
=0; i
< 2; i
++ )
2716 if ((Faux1
.e
[2*i
] != Faux2
.e
[i
+2])||(Faux1
.e
[2*i
+1]!=Faux3
.e
[i
+2]))
2719 printf("Function vec_mergel [type float] ===> Error\n");
2721 printf("Function vec_mergel [type float] ===> OK\n");
2724 /* Function vec_mfvscr */
2725 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
2726 printf("Function vec_mfvscr [Vector Move from Vector Status and Control Register] not checked\n");
2728 /* Function vec_min */
2729 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
2730 #ifndef XLC_COMPILER
2732 Caux1
.v
= vec_min( Ccons1
, Ccons2
);
2735 for( i
=0; i
< 8; i
++ )
2737 if (Caux2
.e
[i
]<Caux3
.e
[i
])
2741 if (Caux1
.e
[i
] != Caux
)
2745 printf("Function vec_min [type char] ===> Error\n");
2747 printf("Function vec_min [type char] ===> OK\n");
2751 UCaux1
.v
= vec_min( UCcons1
, UCcons2
);
2754 for( i
=0; i
< 8; i
++ )
2756 if (UCaux2
.e
[i
]<UCaux3
.e
[i
])
2757 UCaux
= UCaux2
.e
[i
];
2759 UCaux
= UCaux3
.e
[i
];
2760 if (UCaux1
.e
[i
] != UCaux
)
2764 printf("Function vec_min [type unsigned char] ===> Error\n");
2766 printf("Function vec_min [type unsigned char] ===> OK\n");
2768 #ifndef XLC_COMPILER
2770 Saux1
.v
= vec_min( Scons1
, Scons2
);
2773 for( i
=0; i
< 8; i
++ )
2775 if (Saux2
.e
[i
]<Saux3
.e
[i
])
2779 if (Saux1
.e
[i
] != Saux
)
2783 printf("Function vec_min [type short] ===> Error\n");
2785 printf("Function vec_min [type short] ===> OK\n");
2788 USaux1
.v
= vec_min( UScons1
, UScons2
);
2791 for( i
=0; i
< 8; i
++ )
2793 if (USaux2
.e
[i
]<USaux3
.e
[i
])
2794 USaux
= USaux2
.e
[i
];
2796 USaux
= USaux3
.e
[i
];
2797 if (USaux1
.e
[i
] != USaux
)
2801 printf("Function vec_min [type unsigned short] ===> Error\n");
2803 printf("Function vec_min [type unsigned short] ===> OK\n");
2806 Iaux1
.v
= vec_min( Icons1
, Icons2
);
2809 for( i
=0; i
< 4; i
++ )
2811 if (Iaux2
.e
[i
]<Iaux3
.e
[i
])
2815 if (Iaux1
.e
[i
] != Iaux
)
2819 printf("Function vec_min [type integer] ===> Error\n");
2821 printf("Function vec_min [type integer] ===> OK\n");
2824 UIaux1
.v
= vec_min( UIcons1
, UIcons2
);
2827 for( i
=0; i
< 4; i
++ )
2829 if (UIaux2
.e
[i
]<UIaux3
.e
[i
])
2830 UIaux
= UIaux2
.e
[i
];
2832 UIaux
= UIaux3
.e
[i
];
2833 if (UIaux1
.e
[i
] != UIaux
)
2837 printf("Function vec_min [type unsigned int] ===> Error\n");
2839 printf("Function vec_min [type unsigned int] ===> OK\n");
2841 #if defined TEST_FLOATS
2843 Faux1
.v
= vec_min( Fcons1
, Fcons2
);
2846 for( i
=0; i
< 4; i
++ )
2848 if (Faux2
.e
[i
]<Faux3
.e
[i
])
2852 if (Faux1
.e
[i
] != Faux
)
2856 printf("Function vec_min [type float] ===> Error\n");
2858 printf("Function vec_min [type float] ===> OK\n");
2863 /* Function vec_mladd */
2864 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
2865 #ifndef XLC_COMPILER
2867 Saux1
.v
= vec_mladd( Scons1
, Scons2
, Scons3
);
2871 for( i
=0; i
< 8; i
++ )
2873 INTunion1
.si
= Saux2
.e
[i
]*Saux3
.e
[i
];
2874 INTunion1
.si
= INTunion1
.si
+ Saux4
.e
[i
];
2875 if (Saux1
.e
[i
] != INTunion1
.ss
[1])
2879 printf("Function vec_mladd [type short] ===> Error\n");
2881 printf("Function vec_mladd [type short] ===> OK\n");
2885 USaux1
.v
= vec_mladd( UScons1
, UScons2
, UScons3
);
2889 for( i
=0; i
< 8; i
++ )
2891 INTunion1
.ui
= USaux2
.e
[i
]*USaux3
.e
[i
];
2892 INTunion1
.ui
= INTunion1
.ui
+ USaux4
.e
[i
];
2893 if (USaux1
.e
[i
] != INTunion1
.us
[1])
2897 printf("Function vec_mladd [type unsigned short] ===> Error\n");
2899 printf("Function vec_mladd [type unsigned short] ===> OK\n");
2901 /* Function vec_mradds */
2902 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
2904 Saux1
.v
= vec_mradds( Scons1
, Scons2
, Scons3
);
2908 for( i
=0; i
< 8; i
++ )
2910 INTunion1
.si
= Saux2
.e
[i
]*Saux3
.e
[i
]+0x4000;
2911 INTunion1
.si
= INTunion1
.si
>> 15;
2912 INTunion1
.si
= INTunion1
.si
+ Saux4
.e
[i
];
2913 if (INTunion1
.si
>32767)
2915 else if (INTunion1
.si
<(-32768))
2918 Saux
= INTunion1
.ss
[1];
2919 if (Saux1
.e
[i
] != Saux
)
2922 printf("vector: %d \n", Saux1
.e
[i
]);
2923 printf("scalar: %d \n", Saux
);
2927 printf("Function vec_mradds [type short] ===> Error\n");
2929 printf("Function vec_mradds [type short] ===> OK\n");
2931 /* Function vec_msum */
2932 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
2933 #ifndef XLC_COMPILER
2935 Iaux1
.v
= vec_msum( Ccons1
, UCcons2
, Icons1
);
2939 for( i
=0; i
< 4; i
++ )
2942 for (j
=0; j
< 4; j
++)
2943 Iaux
= Iaux
+ Caux1
.e
[4*i
+j
]*UCaux1
.e
[4*i
+j
];
2944 if (Iaux1
.e
[i
] != Iaux
)
2948 printf("Function vec_msum [type char] ===> Error\n");
2950 printf("Function vec_msum [type char] ===> OK\n");
2954 UIaux1
.v
= vec_msum( UCcons1
, UCcons2
, UIcons1
);
2958 for( i
=0; i
< 4; i
++ )
2960 UIaux
= UIaux2
.e
[i
];
2961 for (j
=0; j
< 4; j
++)
2962 UIaux
= UIaux
+ UCaux1
.e
[4*i
+j
]*UCaux2
.e
[4*i
+j
];
2963 if (UIaux1
.e
[i
] != UIaux
)
2967 printf("Function vec_msum [type unsigned char] ===> Error\n");
2969 printf("Function vec_msum [type unsigned char] ===> OK\n");
2971 #ifndef XLC_COMPILER
2973 Iaux1
.v
= vec_msum( Scons1
, Scons2
, Icons1
);
2977 for( i
=0; i
< 4; i
++ )
2980 for (j
=0; j
< 2; j
++)
2981 Iaux
= Iaux
+ Saux1
.e
[2*i
+j
]*Saux2
.e
[2*i
+j
];
2982 if (Iaux1
.e
[i
] != Iaux
)
2986 printf("Function vec_msum [type short] ===> Error\n");
2988 printf("Function vec_msum [type short] ===> OK\n");
2991 UIaux1
.v
= vec_msum( UScons1
, UScons2
, UIcons1
);
2995 for( i
=0; i
< 4; i
++ )
2997 UIaux
= UIaux2
.e
[i
];
2998 for (j
=0; j
< 2; j
++)
2999 UIaux
= UIaux
+ USaux1
.e
[2*i
+j
]*USaux2
.e
[2*i
+j
];
3000 if (UIaux1
.e
[i
] != UIaux
)
3004 printf("Function vec_msum [type unsigned short] ===> Error\n");
3006 printf("Function vec_msum [type unsigned short] ===> OK\n");
3009 /* Function vec_msums */
3010 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
3012 Iaux1
.v
= vec_msums( Scons2
, Scons3
, Icons3
);
3016 for( i
=0; i
< 4; i
++ )
3018 I1
= Saux1
.e
[2*i
]*Saux2
.e
[2*i
];
3019 I2
= Saux1
.e
[2*i
+1]*Saux2
.e
[2*i
+1];
3021 if ((I1
>0)&&(I2
>0)&&(Iaux
<0))
3023 else if ((I1
<0)&&(I2
<0)&&(Iaux
>0))
3028 if ((I1
>0)&&(I2
>0)&&(Iaux
<0))
3030 else if ((I1
<0)&&(I2
<0)&&(Iaux
>0))
3032 if (Iaux1
.e
[i
] != Iaux
)
3036 printf("Function vec_msums [type short] ===> Error\n");
3038 printf("Function vec_msums [type short] ===> OK\n");
3041 UIaux1
.v
= vec_msums( UScons2
, UScons3
, UIcons3
);
3045 for( i
=0; i
< 4; i
++ )
3047 UI1
= USaux1
.e
[2*i
]*USaux2
.e
[2*i
];
3048 UI2
= USaux1
.e
[2*i
+1]*USaux2
.e
[2*i
+1];
3050 if ((UIaux
<UI1
)||(UIaux
<UI2
))
3055 if ((UIaux
<UI1
)||(UIaux
<UI2
))
3057 if (UIaux1
.e
[i
] != UIaux
)
3061 printf("Function vec_msums [type unsigned short] ===> Error\n");
3063 printf("Function vec_msums [type unsigned short] ===> OK\n");
3065 /* Function vec_mtvscr */
3066 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
3067 printf("Function vec_mtvscr [Vector Move to Vector Status and Control Register] not checked\n");
3069 /* Function vec_mule */
3070 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
3072 Saux1
.v
= vec_mule( Ccons1
, Ccons2
);
3075 for( i
=0; i
< 4; i
++ )
3076 if (Saux1
.e
[i
] != (Caux1
.e
[2*i
]*Caux2
.e
[2*i
]))
3079 printf("Function vec_mule [type char] ===> Error\n");
3081 printf("Function vec_mule [type char] ===> OK\n");
3084 USaux1
.v
= vec_mule( UCcons1
, UCcons2
);
3087 for( i
=0; i
< 4; i
++ )
3088 if (USaux1
.e
[i
] != (UCaux1
.e
[2*i
]*UCaux2
.e
[2*i
]))
3091 printf("Function vec_mule [type unsigned char] ===> Error\n");
3093 printf("Function vec_mule [type unsigned char] ===> OK\n");
3096 Iaux1
.v
= vec_mule( Scons1
, Scons2
);
3099 for( i
=0; i
< 4; i
++ )
3100 if (Iaux1
.e
[i
] != (Saux1
.e
[2*i
]*Saux2
.e
[2*i
]))
3103 printf("Function vec_mule [type short] ===> Error\n");
3105 printf("Function vec_mule [type short] ===> OK\n");
3108 UIaux1
.v
= vec_mule( UScons1
, UScons2
);
3111 for( i
=0; i
< 4; i
++ )
3112 if (UIaux1
.e
[i
] != (USaux1
.e
[2*i
] * USaux2
.e
[2*i
]))
3115 printf("Function vec_mule [type unsigned short] ===> Error\n");
3117 printf("Function vec_mule [type unsigned short] ===> OK\n");
3119 /* Function vec_mulo */
3120 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
3122 Saux1
.v
= vec_mulo( Ccons1
, Ccons2
);
3125 for( i
=0; i
< 4; i
++ )
3126 if (Saux1
.e
[i
] != (Caux1
.e
[2*i
+1]*Caux2
.e
[2*i
+1]))
3129 printf("Function vec_mulo [type char] ===> Error\n");
3131 printf("Function vec_mulo [type char] ===> OK\n");
3134 USaux1
.v
= vec_mulo( UCcons1
, UCcons2
);
3137 for( i
=0; i
< 4; i
++ )
3138 if (USaux1
.e
[i
] != (UCaux1
.e
[2*i
+1]*UCaux2
.e
[2*i
+1]))
3141 printf("Function vec_mulo [type unsigned char] ===> Error\n");
3143 printf("Function vec_mulo [type unsigned char] ===> OK\n");
3146 Iaux1
.v
= vec_mulo( Scons1
, Scons2
);
3149 for( i
=0; i
< 4; i
++ )
3150 if (Iaux1
.e
[i
] != (Saux1
.e
[2*i
+1]*Saux2
.e
[2*i
+1]))
3153 printf("Function vec_mulo [type short] ===> Error\n");
3155 printf("Function vec_mulo [type short] ===> OK\n");
3158 UIaux1
.v
= vec_mulo( UScons1
, UScons2
);
3161 for( i
=0; i
< 4; i
++ )
3162 if (UIaux1
.e
[i
] != (USaux1
.e
[2*i
+1]*USaux2
.e
[2*i
+1]))
3165 printf("Function vec_mulo [type unsigned short] ===> Error\n");
3167 printf("Function vec_mulo [type unsigned short] ===> OK\n");
3169 #if defined TEST_FLOATS
3170 /* Function vec_nmsub */
3171 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
3173 Faux1
.v
= vec_nmsub( Fcons1
, Fcons2
, Fcons3
);
3177 for( i
=0; i
< 4; i
++ )
3179 if (Faux1
.e
[i
] != (-Faux2
.e
[i
]*Faux3
.e
[i
]+Faux4
.e
[i
]))
3183 printf("Function vec_nmsub [type float] ===> Error\n");
3185 printf("Function vec_nmsub [type float] ===> OK\n");
3188 /* Function vec_nor */
3189 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
3191 Caux1
.v
= vec_nor( Ccons1
, Ccons2
);
3194 for( i
=0; i
< 16; i
++ )
3195 if (Caux1
.e
[i
] != ~(Caux2
.e
[i
] | Caux3
.e
[i
]))
3198 printf("Function vec_nor [type char] ===> Error\n");
3200 printf("Function vec_nor [type char] ===> OK\n");
3203 UCaux1
.v
= vec_nor( UCcons1
, UCcons2
);
3206 for( i
=0; i
< 16; i
++ )
3208 UCaux
= UCaux2
.e
[i
] | UCaux3
.e
[i
];
3210 if (UCaux1
.e
[i
] != UCaux
)
3214 printf("Function vec_nor [type unsigened char] ===> Error\n");
3216 printf("Function vec_nor [type unsigened char] ===> OK\n");
3219 Saux1
.v
= vec_nor( Scons1
, Scons2
);
3222 for( i
=0; i
< 8; i
++ )
3223 if (Saux1
.e
[i
] != ~(Saux2
.e
[i
] | Saux3
.e
[i
]))
3226 printf("Function vec_nor [type short] ===> Error\n");
3228 printf("Function vec_nor [type short] ===> OK\n");
3231 USaux1
.v
= vec_nor( UScons1
, UScons2
);
3234 for( i
=0; i
< 8; i
++ )
3236 USaux
= USaux2
.e
[i
] | USaux3
.e
[i
];
3238 if (USaux1
.e
[i
] != USaux
)
3242 printf("Function vec_nor [type unsigned short] ===> Error\n");
3244 printf("Function vec_nor [type unsigned short] ===> OK\n");
3247 Iaux1
.v
= vec_nor( Icons1
, Icons2
);
3250 for( i
=0; i
< 4; i
++ )
3251 if (Iaux1
.e
[i
] != ~(Iaux2
.e
[i
] | Iaux3
.e
[i
]))
3254 printf("Function vec_nor [type integer] ===> Error\n");
3256 printf("Function vec_nor [type integer] ===> OK\n");
3259 UIaux1
.v
= vec_nor( UIcons1
, UIcons2
);
3262 for( i
=0; i
< 4; i
++ )
3263 if (UIaux1
.e
[i
] != ~(UIaux2
.e
[i
] | UIaux3
.e
[i
]))
3266 printf("Function vec_nor [type unsigened int] ===> Error\n");
3268 printf("Function vec_nor [type unsigened int] ===> OK\n");
3270 #if defined TEST_FLOATS
3272 Faux1
.v
= vec_nor( Fcons1
, Fcons2
);
3275 for( i
=0; i
< 4; i
++ )
3280 if ((Ivec1
) != ~((Ivec2
) | (Ivec3
)))
3284 printf("Function vec_nor [type float] ===> Error\n");
3286 printf("Function vec_nor [type float] ===> OK\n");
3289 /* Function vec_or */
3290 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
3292 Caux1
.v
= vec_or( Ccons1
, Ccons2
);
3295 for( i
=0; i
< 16; i
++ )
3296 if (Caux1
.e
[i
] != (Caux2
.e
[i
] | Caux3
.e
[i
]))
3299 printf("Function vec_or [type char] ===> Error\n");
3301 printf("Function vec_or [type char] ===> OK\n");
3304 UCaux1
.v
= vec_or( UCcons1
, UCcons2
);
3307 for( i
=0; i
< 16; i
++ )
3309 UCaux
= UCaux2
.e
[i
] | UCaux3
.e
[i
];
3310 if (UCaux1
.e
[i
] != UCaux
)
3314 printf("Function vec_or [type unsigened char] ===> Error\n");
3316 printf("Function vec_or [type unsigened char] ===> OK\n");
3319 Saux1
.v
= vec_or( Scons1
, Scons2
);
3322 for( i
=0; i
< 8; i
++ )
3323 if (Saux1
.e
[i
] != (Saux2
.e
[i
] | Saux3
.e
[i
]))
3326 printf("Function vec_or [type short] ===> Error\n");
3328 printf("Function vec_or [type short] ===> OK\n");
3331 USaux1
.v
= vec_or( UScons1
, UScons2
);
3334 for( i
=0; i
< 8; i
++ )
3336 USaux
= USaux2
.e
[i
] | USaux3
.e
[i
];
3337 if (USaux1
.e
[i
] != USaux
)
3341 printf("Function vec_or [type unsigned short] ===> Error\n");
3343 printf("Function vec_or [type unsigned short] ===> OK\n");
3346 Iaux1
.v
= vec_or( Icons1
, Icons2
);
3349 for( i
=0; i
< 4; i
++ )
3350 if (Iaux1
.e
[i
] != (Iaux2
.e
[i
] | Iaux3
.e
[i
]))
3353 printf("Function vec_or [type integer] ===> Error\n");
3355 printf("Function vec_or [type integer] ===> OK\n");
3358 UIaux1
.v
= vec_or( UIcons1
, UIcons2
);
3361 for( i
=0; i
< 4; i
++ )
3362 if (UIaux1
.e
[i
] != (UIaux2
.e
[i
] | UIaux3
.e
[i
]))
3365 printf("Function vec_or [type unsigened int] ===> Error\n");
3367 printf("Function vec_or [type unsigened int] ===> OK\n");
3369 #if defined TEST_FLOATS
3371 Faux1
.v
= vec_or( Fcons1
, Fcons2
);
3374 for( i
=0; i
< 4; i
++ )
3379 if ((Ivec1
) != ((Ivec2
) | (Ivec3
)))
3383 printf("Function vec_or [type float] ===> Error\n");
3385 printf("Function vec_or [type float] ===> OK\n");
3396 TvecChar Caux1
, Caux2
, Caux3
;//, Caux4;
3397 TvecUChar UCaux1
, UCaux2
, UCaux3
, UCaux4
;
3398 TvecShort Saux1
, Saux2
, Saux3
;//, Saux4;
3399 TvecUShort USaux1
, USaux2
, USaux3
, USaux4
;
3400 TvecInt Iaux1
, Iaux2
, Iaux3
;//, Iaux4;
3401 TvecUInt UIaux1
, UIaux2
, UIaux3
, UIaux4
;
3402 #if defined TEST_FLOATS
3403 TvecFloat Faux1
, Faux2
, Faux3
;//, Faux4;
3406 int i
, err
, /*j,*/ b
;//, bAux;
3407 #if defined TEST_FLOATS
3408 signed int Ivec1
, Ivec2
;//, Ivec3;
3410 // signed short *Svec1;
3411 unsigned int *UIvec1
;
3412 unsigned short *USvec1
;
3413 unsigned char *UCvec1
;
3414 #if defined TEST_FLOATS
3418 /* For saturated rutines */
3419 // long long int LLaux;
3421 #if defined TEST_FLOATS
3424 signed int Iaux
;//, I1, I2;
3425 unsigned int UIaux
;//, UI1, UI2;
3427 unsigned short USaux
;
3429 unsigned char UCaux
;
3437 unsigned short us
[2];
3439 unsigned char uc
[4];
3440 } INTunion1
, INTunion2
;
3447 unsigned char uc
[2];
3448 } SHOunion1
, SHOunion2
;
3451 #if defined (GCC_COMPILER)
3452 vector
signed char Ccons1
= (vector
signed char){-8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7};
3453 vector
signed char Ccons2
= (vector
signed char){1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1};
3454 vector
signed char Ccons3
= (vector
signed char){-128, 127, -128, 127, -128, 127, -128, 127, -128, 127, -128, 127, -128, 127, -128, 127};
3455 vector
unsigned char UCcons1
= (vector
unsigned char){248, 249, 250, 251, 252, 253, 254, 255, 0, 1, 2, 3, 4, 5, 6, 7};
3456 vector
unsigned char UCcons2
= (vector
unsigned char){2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2};
3457 vector
unsigned char UCcons3
= (vector
unsigned char){1, 2, 3, 4, 5, 6, 7, 8, 1, 2, 3, 4, 5, 6, 7, 8};
3458 vector
signed short Scons1
= (vector
signed short){-4, -3, -2, -1, 0, 1, 2, 3};
3459 vector
signed short Scons2
= (vector
signed short){-32768, 10000, 1, 1, 1, 1, -10000, -10000};
3460 vector
signed short Scons3
= (vector
signed short){-32768, 32767, -32768, 32767, -32768, 32767, -32768, 32767};
3461 vector
unsigned short UScons1
= (vector
unsigned short){65532, 65533, 65534, 65535, 0, 1, 2, 3};
3462 vector
unsigned short UScons2
= (vector
unsigned short){1, 1, 1, 1, 1, 1, 1, 1};
3463 vector
unsigned short UScons3
= (vector
unsigned short){1, 2, 3, 4, 1, 2, 3, 4};
3464 vector
signed int Icons1
= (vector
signed int){-4, -1, 1, 4};
3465 vector
signed int Icons2
= (vector
signed int){1, 1, 1, 1};
3466 vector
signed int Icons3
= (vector
signed int){0x80000000, 0x7FFFFFFF, 0x80000000, 0x7FFFFFFF};
3467 vector
unsigned int UIcons1
= (vector
unsigned int){0xFFFFFFFE, 0xFFFFFFFF, 0, 1};
3468 vector
unsigned int UIcons2
= (vector
unsigned int){1, 1, 1, 1};
3469 vector
unsigned int UIcons3
= (vector
unsigned int){1, 2, 1, 2};
3471 #if defined TEST_FLOATS
3472 vector
float Fcons1
= (vector
float){-1.5, 1.0, 0.5, -3.999};
3473 vector
float Fcons2
= (vector
float){1.0, 1.0, 1.0, 1.0};
3474 vector
float Fcons3
= (vector
float){100000000000.0, 1.0, -1.0, -1234567890.0};
3477 #elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
3478 vector
signed char Ccons1
= (vector
signed char)(-8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7);
3479 vector
signed char Ccons2
= (vector
signed char)(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1);
3480 vector
signed char Ccons3
= (vector
signed char)(-128, 127, -128, 127, -128, 127, -128, 127, -128, 127, -128, 127, -128, 127, -128, 127);
3481 vector
unsigned char UCcons1
= (vector
unsigned char)(248, 249, 250, 251, 252, 253, 254, 255, 0, 1, 2, 3, 4, 5, 6, 7);
3482 vector
unsigned char UCcons2
= (vector
unsigned char)(2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2);
3483 vector
unsigned char UCcons3
= (vector
unsigned char)(1, 2, 3, 4, 5, 6, 7, 8, 1, 2, 3, 4, 5, 6, 7, 8);
3484 vector
signed short Scons1
= (vector
signed short)(-4, -3, -2, -1, 0, 1, 2, 3);
3485 vector
signed short Scons2
= (vector
signed short)(-32768, 10000, 1, 1, 1, 1, -10000, -10000);
3486 vector
signed short Scons3
= (vector
signed short)(-32768, 32767, -32768, 32767, -32768, 32767, -32768, 32767);
3487 vector
unsigned short UScons1
= (vector
unsigned short)(65532, 65533, 65534, 65535, 0, 1, 2, 3);
3488 vector
unsigned short UScons2
= (vector
unsigned short)(1, 1, 1, 1, 1, 1, 1, 1);
3489 vector
unsigned short UScons3
= (vector
unsigned short)(1, 2, 3, 4, 1, 2, 3, 4);
3490 vector
signed int Icons1
= (vector
signed int)(-4, -1, 1, 4);
3491 vector
signed int Icons2
= (vector
signed int)(1, 1, 1, 1);
3492 vector
signed int Icons3
= (vector
signed int)(0x80000000, 0x7FFFFFFF, 0x80000000, 0x7FFFFFFF);
3493 vector
unsigned int UIcons1
= (vector
unsigned int)(0xFFFFFFFE, 0xFFFFFFFF, 0, 1);
3494 vector
unsigned int UIcons2
= (vector
unsigned int)(1, 1, 1, 1);
3495 vector
unsigned int UIcons3
= (vector
unsigned int)(1, 2, 1, 2);
3497 #if defined TEST_FLOATS
3498 vector
float Fcons1
= (vector
float)(-1.5, 1.0, 0.5, -3.999);
3499 vector
float Fcons2
= (vector
float)(1.0, 1.0, 1.0, 1.0);
3500 vector
float Fcons3
= (vector
float)(100000000000.0, 1.0, -1.0, -1234567890.0);
3506 /* Variables to be allocated with calloc_vec (16 bytes aligned) */
3507 unsigned char *UCmem
= (unsigned char*)calloc_vec( 1, sizeof(vector
unsigned char) );
3508 signed char *Cmem
= (signed char*)calloc_vec( 1, sizeof(vector
signed char) );
3509 unsigned short *USmem
= (unsigned short*)calloc_vec( 1, sizeof(vector
unsigned short) );
3510 signed short *Smem
= (signed short*)calloc_vec( 1, sizeof(vector
signed short) );
3511 unsigned int *UImem
= (unsigned int*)calloc_vec( 1, sizeof(vector
unsigned int) );
3512 signed int *Imem
= (signed int*)calloc_vec( 1, sizeof(vector
signed int) );
3513 #if defined TEST_FLOATS
3514 float *Fmem
= (float*)calloc_vec( 1, sizeof(vector
float) );
3517 /* Function vec_pack */
3518 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
3520 Caux1
.v
= vec_pack( Scons1
, Scons2
);
3523 for( i
=0; i
< 8; i
++ )
3525 SHOunion1
.ss
= Saux1
.e
[i
];
3526 if (Caux1
.e
[i
] != SHOunion1
.sc
[1])
3528 SHOunion1
.ss
= Saux2
.e
[i
];
3529 if (Caux1
.e
[i
+8] != SHOunion1
.sc
[1])
3533 printf("Function vec_pack [type char] ===> Error\n");
3535 printf("Function vec_pack [type char] ===> OK\n");
3538 UCaux1
.v
= vec_pack( UScons1
, UScons2
);
3541 for( i
=0; i
< 8; i
++ )
3543 SHOunion1
.ss
= USaux1
.e
[i
];
3544 if (UCaux1
.e
[i
] != SHOunion1
.uc
[1])
3546 SHOunion1
.ss
= USaux2
.e
[i
];
3547 if (UCaux1
.e
[i
+8] != SHOunion1
.uc
[1])
3551 printf("Function vec_pack [type unsigned char] ===> Error\n");
3553 printf("Function vec_pack [type unsigned char] ===> OK\n");
3556 Saux1
.v
= vec_pack( Icons1
, Icons2
);
3559 for( i
=0; i
< 4; i
++ )
3561 INTunion1
.si
= Iaux1
.e
[i
];
3562 if (Saux1
.e
[i
] != INTunion1
.ss
[1])
3564 INTunion1
.si
= Iaux2
.e
[i
];
3565 if (Saux1
.e
[i
+4] != INTunion1
.ss
[1])
3569 printf("Function vec_pack [type short] ===> Error\n");
3571 printf("Function vec_pack [type short] ===> OK\n");
3574 USaux1
.v
= vec_pack( UIcons1
, UIcons2
);
3577 for( i
=0; i
< 4; i
++ )
3579 INTunion1
.ui
= UIaux1
.e
[i
];
3580 if (USaux1
.e
[i
] != INTunion1
.us
[1])
3582 INTunion1
.ui
= UIaux2
.e
[i
];
3583 if (USaux1
.e
[i
+4] != INTunion1
.us
[1])
3587 printf("Function vec_pack [type unsigned short] ===> Error\n");
3589 printf("Function vec_pack [type unsigned short] ===> OK\n");
3591 /* Function vec_packpx */
3592 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
3593 printf("Function vec_packpx [Vector Pack Pixel] not checked\n");
3595 /* Function vec_packs */
3596 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
3598 Caux1
.v
= vec_packs( Scons1
, Scons2
);
3601 for( i
=0; i
< 8; i
++ )
3605 else if (Saux1
.e
[i
]<(-128))
3608 Caux
= (signed char)Saux1
.e
[i
];
3609 if (Caux1
.e
[i
] != Caux
)
3613 else if (Saux2
.e
[i
]<(-128))
3616 Caux
= (signed char)Saux2
.e
[i
];
3617 if (Caux1
.e
[i
+8] != Caux
)
3621 printf("Function vec_packs [type char] ===> Error\n");
3623 printf("Function vec_packs [type char] ===> OK\n");
3626 UCaux1
.v
= vec_packs( UScons1
, UScons2
);
3629 for( i
=0; i
< 8; i
++ )
3631 if (USaux1
.e
[i
]>255)
3634 UCaux
= (unsigned char)USaux1
.e
[i
];
3635 if (UCaux1
.e
[i
] != UCaux
)
3637 if (USaux2
.e
[i
]>255)
3640 UCaux
= (unsigned char)USaux2
.e
[i
];
3641 if (UCaux1
.e
[i
+8] != UCaux
)
3645 printf("Function vec_packs [type unsigned char] ===> Error\n");
3647 printf("Function vec_packs [type unsigned char] ===> OK\n");
3650 Saux1
.v
= vec_packs( Icons1
, Icons2
);
3653 for( i
=0; i
< 4; i
++ )
3655 if (Iaux1
.e
[i
]>32767)
3657 else if (Iaux1
.e
[i
]<(-32768))
3660 Saux
= (signed char)Iaux1
.e
[i
];
3661 if (Saux1
.e
[i
] != Saux
)
3663 if (Iaux2
.e
[i
]>32767)
3665 else if (Iaux2
.e
[i
]<(-32768))
3668 Saux
= (signed char)Iaux2
.e
[i
];
3669 if (Saux1
.e
[i
+4] != Saux
)
3673 printf("Function vec_packs [type short] ===> Error\n");
3675 printf("Function vec_packs [type short] ===> OK\n");
3678 USaux1
.v
= vec_packs( UIcons1
, UIcons2
);
3681 for( i
=0; i
< 4; i
++ )
3683 if (UIaux1
.e
[i
]>65535)
3686 USaux
= (unsigned char)UIaux1
.e
[i
];
3687 if (USaux1
.e
[i
] != USaux
)
3689 if (UIaux2
.e
[i
]>65535)
3692 USaux
= (unsigned char)UIaux2
.e
[i
];
3693 if (USaux1
.e
[i
+4] != USaux
)
3697 printf("Function vec_packs [type unsigned short] ===> Error\n");
3699 printf("Function vec_packs [type unsigned short] ===> OK\n");
3701 /* Function vec_packsu */
3702 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
3704 UCaux1
.v
= vec_packsu( Scons1
, Scons2
);
3707 for( i
=0; i
< 8; i
++ )
3711 else if (Saux1
.e
[i
]<0)
3714 UCaux
= (unsigned char)Saux1
.e
[i
];
3715 if (UCaux1
.e
[i
] != UCaux
)
3719 else if (Saux2
.e
[i
]<0)
3722 UCaux
= (unsigned char)Saux2
.e
[i
];
3723 if (UCaux1
.e
[i
+8] != UCaux
)
3727 printf("Function vec_packsu [type char] ===> Error\n");
3729 printf("Function vec_packsu [type char] ===> OK\n");
3732 UCaux1
.v
= vec_packsu( UScons1
, UScons2
);
3735 for( i
=0; i
< 8; i
++ )
3737 if (USaux1
.e
[i
]>255)
3740 UCaux
= (unsigned char)USaux1
.e
[i
];
3741 if (UCaux1
.e
[i
] != UCaux
)
3743 if (USaux2
.e
[i
]>255)
3746 UCaux
= (unsigned char)USaux2
.e
[i
];
3747 if (UCaux1
.e
[i
+8] != UCaux
)
3751 printf("Function vec_packsu [type unsigned char] ===> Error\n");
3753 printf("Function vec_packsu [type unsigned char] ===> OK\n");
3756 USaux1
.v
= vec_packsu( Icons1
, Icons2
);
3759 for( i
=0; i
< 4; i
++ )
3761 if (Iaux1
.e
[i
]>65535)
3763 else if (Iaux1
.e
[i
]<0)
3766 USaux
= (unsigned short)Iaux1
.e
[i
];
3767 if (USaux1
.e
[i
] != USaux
)
3769 if (Iaux2
.e
[i
]>65535)
3771 else if (Iaux2
.e
[i
]<0)
3774 USaux
= (unsigned short)Iaux2
.e
[i
];
3775 if (USaux1
.e
[i
+4] != USaux
)
3779 printf("Function vec_packsu [type short] ===> Error\n");
3781 printf("Function vec_packsu [type short] ===> OK\n");
3784 USaux1
.v
= vec_packsu( UIcons1
, UIcons2
);
3787 for( i
=0; i
< 4; i
++ )
3789 if (UIaux1
.e
[i
]>65535)
3792 USaux
= (unsigned char)UIaux1
.e
[i
];
3793 if (USaux1
.e
[i
] != USaux
)
3795 if (UIaux2
.e
[i
]>65535)
3798 USaux
= (unsigned char)UIaux2
.e
[i
];
3799 if (USaux1
.e
[i
+4] != USaux
)
3803 printf("Function vec_packsu [type unsigned short] ===> Error\n");
3805 printf("Function vec_packsu [type unsigned short] ===> OK\n");
3807 /* Function vec_perm */
3808 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
3809 printf("Function vec_perm [Vector Permute] not checked\n");
3811 #if defined TEST_FLOATS
3812 /* Function vec_re */
3813 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
3815 Faux1
.v
= vec_re( Fcons1
);
3817 for( i
=0; i
< 4; i
++ )
3819 Faux
= 1/Faux2
.e
[i
];
3821 Faux
= (Faux
- Faux1
.e
[i
])/Faux
;
3823 Faux
= Faux
- Faux1
.e
[i
];
3824 if (Faux
>(1.0/4096.0))
3828 printf("Function vec_re [type float] ===> Error\n");
3830 printf("Function vec_re [type float] ===> OK\n");
3833 /* Function vec_rl */
3834 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
3836 Caux1
.v
= vec_rl( Ccons1
, UCcons3
);
3839 for( i
=0; i
< 16; i
++ )
3842 UCvec1
= (unsigned char *)(&Caux2
.e
[i
]);
3843 Caux
= ((*UCvec1
)>>(8-b
)) | ((*UCvec1
)<<b
);
3844 if (Caux1
.e
[i
] != Caux
)
3848 printf("Function vec_rl [type char] ===> Error\n");
3850 printf("Function vec_rl [type char] ===> OK\n");
3853 UCaux1
.v
= vec_rl( UCcons1
, UCcons3
);
3856 for( i
=0; i
< 16; i
++ )
3859 UCaux
= (UCaux2
.e
[i
]>>(8-b
)) | (UCaux2
.e
[i
]<<b
);
3860 if (UCaux1
.e
[i
] != UCaux
)
3864 printf("Function vec_rl [type unsigned char] ===> Error\n");
3866 printf("Function vec_rl [type unsigned char] ===> OK\n");
3869 Saux1
.v
= vec_rl( Scons1
, UScons3
);
3872 for( i
=0; i
< 8; i
++ )
3875 USvec1
= (unsigned short *)(&Saux2
.e
[i
]);
3876 Saux
= ((*USvec1
)>>(16-b
)) | ((*USvec1
)<<b
);
3877 if (Saux1
.e
[i
] != Saux
)
3881 printf("Function vec_rl [type short] ===> Error\n");
3883 printf("Function vec_rl [type short] ===> OK\n");
3886 USaux1
.v
= vec_rl( UScons1
, UScons3
);
3889 for( i
=0; i
< 8; i
++ )
3892 USaux
= (USaux2
.e
[i
]>>(16-b
)) | (USaux2
.e
[i
]<<b
);
3893 if (USaux1
.e
[i
] != USaux
)
3897 printf("Function vec_rl [type unsigned short] ===> Error\n");
3899 printf("Function vec_rl [type unsigned short] ===> OK\n");
3902 Iaux1
.v
= vec_rl( Icons1
, UIcons3
);
3905 for( i
=0; i
< 4; i
++ )
3908 UIvec1
= (unsigned int *)(&Iaux2
.e
[i
]);
3909 Iaux
= ((*UIvec1
)>>(32-b
)) | ((*UIvec1
)<<b
);
3910 if (Iaux1
.e
[i
] != Iaux
)
3914 printf("Function vec_rl [type integer] ===> Error\n");
3916 printf("Function vec_rl [type integer] ===> OK\n");
3919 UIaux1
.v
= vec_rl( UIcons1
, UIcons3
);
3922 for( i
=0; i
< 4; i
++ )
3925 UIaux
= (UIaux2
.e
[i
]>>(32-b
)) | (UIaux2
.e
[i
]<<b
);
3926 if (UIaux1
.e
[i
] != UIaux
)
3930 printf("Function vec_rl [type unsigned int] ===> Error\n");
3932 printf("Function vec_rl [type unsigned int] ===> OK\n");
3934 #if defined TEST_FLOATS
3935 /* Function vec_round */
3936 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
3938 Faux1
.v
= vec_round( Fcons1
);
3940 for( i
=0; i
< 4; i
++ )
3942 Faux
= floor(Faux2
.e
[i
]);
3943 if ((Faux2
.e
[i
]-Faux
)>0.5)
3945 else if (((Faux2
.e
[i
]-Faux
)==0.5)&&(Iaux
%2))
3947 if (Faux1
.e
[i
] != Faux
)
3951 printf("Function vec_round [type float] ===> Error\n");
3953 printf("Function vec_round [type float] ===> OK\n");
3956 #if defined TEST_FLOATS
3957 /* Function vec_rsqrte */
3958 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
3960 Faux1
.v
= vec_rsqrte( Fcons1
);
3962 for( i
=0; i
< 4; i
++ )
3964 Faux
= sqrtf(Faux2
.e
[i
]);
3966 Faux
= (Faux
- Faux1
.e
[i
])/Faux
;
3968 Faux
= Faux
- Faux1
.e
[i
];
3969 if (Faux
>(1.0/4096.0))
3973 printf("Function vec_rsqrte [type float] ===> Error\n");
3975 printf("Function vec_rsqrte [type float] ===> OK\n");
3978 /* Function vec_sel */
3979 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
3981 Caux1
.v
= vec_sel( Ccons1
, Ccons2
, UCcons1
);
3985 for( i
=0; i
< 16; i
++ )
3987 Caux
= (Caux2
.e
[i
] & (~UCaux1
.e
[i
])) | (Caux3
.e
[i
] & UCaux1
.e
[i
]);
3988 if (Caux1
.e
[i
] != Caux
)
3992 printf("Function vec_sel [type char] ===> Error\n");
3994 printf("Function vec_sel [type char] ===> OK\n");
3997 UCaux1
.v
= vec_sel( UCcons1
, UCcons2
, UCcons3
);
4001 for( i
=0; i
< 16; i
++ )
4003 UCaux
= (UCaux2
.e
[i
] & (~UCaux4
.e
[i
])) | (UCaux3
.e
[i
] & UCaux4
.e
[i
]);
4004 if (UCaux1
.e
[i
] != UCaux
)
4008 printf("Function vec_sel [type unsigned char] ===> Error\n");
4010 printf("Function vec_sel [type unsigned char] ===> OK\n");
4013 Saux1
.v
= vec_sel( Scons1
, Scons2
, UScons1
);
4017 for( i
=0; i
< 8; i
++ )
4019 Saux
= (Saux2
.e
[i
] & (~USaux1
.e
[i
])) | (Saux3
.e
[i
] & USaux1
.e
[i
]);
4020 if (Saux1
.e
[i
] != Saux
)
4024 printf("Function vec_sel [type short] ===> Error\n");
4026 printf("Function vec_sel [type short] ===> OK\n");
4029 USaux1
.v
= vec_sel( UScons1
, UScons2
, UScons3
);
4033 for( i
=0; i
< 8; i
++ )
4035 USaux
= (USaux2
.e
[i
] & (~USaux4
.e
[i
])) | (USaux3
.e
[i
] & USaux4
.e
[i
]);
4036 if (USaux1
.e
[i
] != USaux
)
4040 printf("Function vec_sel [type unsigned short] ===> Error\n");
4042 printf("Function vec_sel [type unsigned short] ===> OK\n");
4045 Iaux1
.v
= vec_sel( Icons1
, Icons2
, UIcons1
);
4049 for( i
=0; i
< 4; i
++ )
4051 Iaux
= (Iaux2
.e
[i
] & (~UIaux1
.e
[i
])) | (Iaux3
.e
[i
] & UIaux1
.e
[i
]);
4052 if (Iaux1
.e
[i
] != Iaux
)
4056 printf("Function vec_sel [type integer] ===> Error\n");
4058 printf("Function vec_sel [type integer] ===> OK\n");
4061 UIaux1
.v
= vec_sel( UIcons1
, UIcons2
, UIcons3
);
4065 for( i
=0; i
< 4; i
++ )
4067 UIaux
= (UIaux2
.e
[i
] & (~UIaux4
.e
[i
])) | (UIaux3
.e
[i
] & UIaux4
.e
[i
]);
4068 if (UIaux1
.e
[i
] != UIaux
)
4072 printf("Function vec_sel [type unsigned int] ===> Error\n");
4074 printf("Function vec_sel [type unsigned int] ===> OK\n");
4076 #if defined TEST_FLOATS
4078 Faux1
.v
= vec_sel( Fcons1
, Fcons2
, UIcons1
);
4082 for( i
=0; i
< 4; i
++ )
4086 Iaux
= (Ivec1
& (~UIaux1
.e
[i
])) | (Ivec2
& UIaux1
.e
[i
]);
4088 if ((Ivec1
) != Iaux
)
4092 printf("Function vec_sel [type float] ===> Error\n");
4094 printf("Function vec_sel [type float] ===> OK\n");
4097 /* Function vec_sl */
4098 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
4100 Caux1
.v
= vec_sl( Ccons1
, UCcons3
);
4103 for( i
=0; i
< 16; i
++ )
4105 b
= UCaux1
.e
[i
]%(128/16);
4106 Caux
= Caux2
.e
[i
] << b
;
4107 if (Caux1
.e
[i
] != Caux
)
4111 printf("Function vec_sl [type char] ===> Error\n");
4113 printf("Function vec_sl [type char] ===> OK\n");
4116 UCaux1
.v
= vec_sl( UCcons1
, UCcons3
);
4119 for( i
=0; i
< 16; i
++ )
4121 b
= UCaux3
.e
[i
]%(128/16);
4122 UCaux
= UCaux2
.e
[i
] << b
;
4123 if (UCaux1
.e
[i
] != UCaux
)
4127 printf("Function vec_sl [type unsigned char] ===> Error\n");
4129 printf("Function vec_sl [type unsigned char] ===> OK\n");
4132 Saux1
.v
= vec_sl( Scons1
, UScons3
);
4135 for( i
=0; i
< 8; i
++ )
4137 b
= USaux1
.e
[i
]%(128/8);
4138 Saux
= Saux2
.e
[i
] << b
;
4139 if (Saux1
.e
[i
] != Saux
)
4143 printf("Function vec_sl [type short] ===> Error\n");
4145 printf("Function vec_sl [type short] ===> OK\n");
4148 USaux1
.v
= vec_sl( UScons1
, UScons3
);
4151 for( i
=0; i
< 8; i
++ )
4153 b
= USaux3
.e
[i
]%(128/8);
4154 USaux
= USaux2
.e
[i
] << b
;
4155 if (USaux1
.e
[i
] != USaux
)
4159 printf("Function vec_sl [type unsigned short] ===> Error\n");
4161 printf("Function vec_sl [type unsigned short] ===> OK\n");
4164 Iaux1
.v
= vec_sl( Icons1
, UIcons3
);
4167 for( i
=0; i
< 4; i
++ )
4169 b
= UIaux1
.e
[i
]%(128/4);
4170 Iaux
= Iaux2
.e
[i
] << b
;
4171 if (Iaux1
.e
[i
] != Iaux
)
4175 printf("Function vec_sl [type int] ===> Error\n");
4177 printf("Function vec_sl [type int] ===> OK\n");
4180 UIaux1
.v
= vec_sl( UIcons1
, UIcons3
);
4183 for( i
=0; i
< 4; i
++ )
4185 b
= UIaux3
.e
[i
]%(128/4);
4186 UIaux
= UIaux2
.e
[i
] << b
;
4187 if (UIaux1
.e
[i
] != UIaux
)
4191 printf("Function vec_sl [type unsigned integer] ===> Error\n");
4193 printf("Function vec_sl [type unsigned integer] ===> OK\n");
4195 /* Function vec_sld */
4196 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
4199 Caux1
.v
= vec_sld( Ccons1
, Ccons2
, 3 );
4202 for( i
=0; i
< 16; i
++ )
4206 if (Caux1
.e
[i
] != Caux2
.e
[i
+b
])
4211 if (Caux1
.e
[i
] != Caux3
.e
[i
+b
-16])
4216 printf("Function vec_sld [type char] ===> Error\n");
4218 printf("Function vec_sld [type char] ===> OK\n");
4222 UCaux1
.v
= vec_sld( UCcons1
, UCcons2
, 3 );
4225 for( i
=0; i
< 16; i
++ )
4229 if (UCaux1
.e
[i
] != UCaux2
.e
[i
+b
])
4234 if (UCaux1
.e
[i
] != UCaux3
.e
[i
+b
-16])
4239 printf("Function vec_sld [type unsigned char] ===> Error\n");
4241 printf("Function vec_sld [type unsigned char] ===> OK\n");
4245 Saux1
.v
= vec_sld( Scons1
, Scons2
, 3 );
4248 for( i
=0; i
< 16; i
++ )
4250 SHOunion1
.ss
= Saux1
.e
[i
/2];
4252 SHOunion2
.ss
= Saux2
.e
[(i
+b
)/2];
4254 SHOunion2
.ss
= Saux3
.e
[(i
+b
-16)/2];
4255 if (SHOunion1
.sc
[i
%2] != SHOunion2
.sc
[(i
+b
)%2])
4259 printf("Function vec_sld [type short] ===> Error\n");
4261 printf("Function vec_sld [type short] ===> OK\n");
4265 USaux1
.v
= vec_sld( UScons1
, UScons2
, 3 );
4268 for( i
=0; i
< 16; i
++ )
4270 SHOunion1
.us
= USaux1
.e
[i
/2];
4272 SHOunion2
.us
= USaux2
.e
[(i
+b
)/2];
4274 SHOunion2
.us
= USaux3
.e
[(i
+b
-16)/2];
4275 if (SHOunion1
.uc
[i
%2] != SHOunion2
.uc
[(i
+b
)%2])
4279 printf("Function vec_sld [type unsigned short] ===> Error\n");
4281 printf("Function vec_sld [type unsigned short] ===> OK\n");
4285 Iaux1
.v
= vec_sld( Icons1
, Icons2
, 3 );
4288 for( i
=0; i
< 16; i
++ )
4290 INTunion1
.si
= Iaux1
.e
[i
/4];
4292 INTunion2
.si
= Iaux2
.e
[(i
+b
)/4];
4294 INTunion2
.si
= Iaux3
.e
[(i
+b
-16)/4];
4295 if (INTunion1
.sc
[i
%4] != INTunion2
.sc
[(i
+b
)%4])
4299 printf("Function vec_sld [type integer] ===> Error\n");
4301 printf("Function vec_sld [type integer] ===> OK\n");
4305 UIaux1
.v
= vec_sld( UIcons1
, UIcons2
, 3 );
4308 for( i
=0; i
< 16; i
++ )
4310 INTunion1
.ui
= UIaux1
.e
[i
/4];
4312 INTunion2
.ui
= UIaux2
.e
[(i
+b
)/4];
4314 INTunion2
.ui
= UIaux3
.e
[(i
+b
-16)/4];
4315 if (INTunion1
.uc
[i
%4] != INTunion2
.uc
[(i
+b
)%4])
4319 printf("Function vec_sld [type unsigned int] ===> Error\n");
4321 printf("Function vec_sld [type unsigned int] ===> OK\n");
4323 #if defined TEST_FLOATS
4326 Faux1
.v
= vec_sld( Fcons1
, Fcons2
, 3 );
4329 for( i
=0; i
< 16; i
++ )
4331 INTunion1
.f
= Faux1
.e
[i
/4];
4333 INTunion2
.f
= Faux2
.e
[(i
+b
)/4];
4335 INTunion2
.f
= Faux3
.e
[(i
+b
-16)/4];
4336 if (INTunion1
.sc
[i
%4] != INTunion2
.sc
[(i
+b
)%4])
4340 printf("Function vec_sld [type float] ===> Error\n");
4342 printf("Function vec_sld [type float] ===> OK\n");
4345 /* Function vec_sll */
4346 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
4348 Caux1
.v
= vec_sll( Ccons1
, UCcons2
);
4351 b
= UCaux1
.e
[15] & 0x7;
4352 for( i
=0; i
< 15; i
++ )
4353 if ((UCaux1
.e
[i
] & 0x7)!=b
)
4357 printf("The three low-order bits of all byte elements in b must be the same\n");
4358 printf("otherwise the value into d is undefined\n");
4362 for( i
=0; i
< 16; i
++ )
4364 UCvec1
= (unsigned char *)(&Caux2
.e
[i
]);
4365 Caux
= UCvec1
[0]<<b
;
4367 Caux
= Caux
| (UCvec1
[1]>>(8-b
));
4368 if (Caux
!= Caux1
.e
[i
])
4372 printf("Function vec_sll [type char] ===> Error\n");
4374 printf("Function vec_sll [type char] ===> OK\n");
4377 UCaux1
.v
= vec_sll( UCcons1
, UCcons2
);
4380 b
= UCaux3
.e
[15] & 0x7;
4381 for( i
=0; i
< 15; i
++ )
4382 if ((UCaux3
.e
[i
] & 0x7)!=b
)
4386 printf("The three low-order bits of all byte elements in b must be the same\n");
4387 printf("otherwise the value into d is undefined\n");
4391 for( i
=0; i
< 16; i
++ )
4393 UCvec1
= (unsigned char *)(&UCaux2
.e
[i
]);
4394 UCaux
= UCvec1
[0]<<b
;
4396 UCaux
= UCaux
| (UCvec1
[1]>>(8-b
));
4397 if (UCaux
!= UCaux1
.e
[i
])
4401 printf("Function vec_sll [type unsigned char] ===> Error\n");
4403 printf("Function vec_sll [type unsigned char] ===> OK\n");
4407 Saux1
.v
= vec_sll( Scons1
, UCcons2
);
4410 b
= UCaux1
.e
[15] & 0x7;
4411 for( i
=0; i
< 15; i
++ )
4412 if ((UCaux1
.e
[i
] & 0x7)!=b
)
4416 printf("The three low-order bits of all byte elements in b must be the same\n");
4417 printf("otherwise the value into d is undefined\n");
4421 for( i
=0; i
< 8; i
++ )
4423 USvec1
= (unsigned short *)(&Saux2
.e
[i
]);
4424 Saux
= USvec1
[0]<<b
;
4426 Saux
= Saux
| (USvec1
[1]>>(16-b
));
4427 if (Saux
!= Saux1
.e
[i
])
4431 printf("Function vec_sll [type short] ===> Error\n");
4433 printf("Function vec_sll [type short] ===> OK\n");
4436 USaux1
.v
= vec_sll( UScons1
, UCcons2
);
4439 b
= UCaux1
.e
[15] & 0x7;
4440 for( i
=0; i
< 15; i
++ )
4441 if ((UCaux1
.e
[i
] & 0x7)!=b
)
4445 printf("The three low-order bits of all byte elements in b must be the same\n");
4446 printf("otherwise the value into d is undefined\n");
4450 for( i
=0; i
< 8; i
++ )
4452 USvec1
= (unsigned short *)(&USaux2
.e
[i
]);
4453 USaux
= USvec1
[0]<<b
;
4455 USaux
= USaux
| (USvec1
[1]>>(16-b
));
4456 if (USaux
!= USaux1
.e
[i
])
4460 printf("Function vec_sll [type unsigned char] ===> Error\n");
4462 printf("Function vec_sll [type unsigned char] ===> OK\n");
4466 Iaux1
.v
= vec_sll( Icons1
, UCcons2
);
4469 b
= UCaux1
.e
[15] & 0x7;
4470 for( i
=0; i
< 15; i
++ )
4471 if ((UCaux1
.e
[i
] & 0x7)!=b
)
4475 printf("The three low-order bits of all byte elements in b must be the same\n");
4476 printf("otherwise the value into d is undefined\n");
4480 for( i
=0; i
< 4; i
++ )
4482 UIvec1
= (unsigned int *)(&Iaux2
.e
[i
]);
4483 Iaux
= UIvec1
[0]<<b
;
4485 Iaux
= Iaux
| (UIvec1
[1]>>(32-b
));
4486 if (Iaux
!= Iaux1
.e
[i
])
4490 printf("Function vec_sll [type integer] ===> Error\n");
4492 printf("Function vec_sll [type integer] ===> OK\n");
4495 UIaux1
.v
= vec_sll( UIcons1
, UCcons2
);
4498 b
= UCaux1
.e
[15] & 0x7;
4499 for( i
=0; i
< 15; i
++ )
4500 if ((UCaux1
.e
[i
] & 0x7)!=b
)
4504 printf("The three low-order bits of all byte elements in b must be the same\n");
4505 printf("otherwise the value into d is undefined\n");
4509 for( i
=0; i
< 4; i
++ )
4511 UIvec1
= (unsigned int *)(&UIaux2
.e
[i
]);
4512 UIaux
= UIvec1
[0]<<b
;
4514 UIaux
= UIaux
| (UIvec1
[1]>>(32-b
));
4515 if (UIaux
!= UIaux1
.e
[i
])
4519 printf("Function vec_sll [type unsigned int] ===> Error\n");
4521 printf("Function vec_sll [type unsigned int] ===> OK\n");
4524 /* Function vec_slo */
4525 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
4527 Caux1
.v
= vec_slo( Ccons3
, Ccons1
);
4530 b
= (Caux3
.e
[15] & 0x78) >> 3;
4531 for( i
=0; i
< 16; i
++ )
4535 if (Caux1
.e
[i
] != Caux2
.e
[i
+b
])
4540 if (Caux1
.e
[i
] != 0)
4545 printf("Function vec_slo [type char] ===> Error\n");
4547 printf("Function vec_slo [type char] ===> OK\n");
4550 UCaux1
.v
= vec_slo( UCcons3
, UCcons1
);
4553 b
= (UCaux3
.e
[15] & 0x78) >> 3;
4554 for( i
=0; i
< 16; i
++ )
4558 if (UCaux1
.e
[i
] != UCaux2
.e
[i
+b
])
4563 if (UCaux1
.e
[i
] != 0)
4568 printf("Function vec_slo [type unsigned char] ===> Error\n");
4570 printf("Function vec_slo [type unsigned char] ===> OK\n");
4573 Saux1
.v
= vec_slo( Scons3
, UCcons1
);
4576 b
= (UCaux3
.e
[15] & 0x78) >> 3;
4577 for( i
=0; i
< 16; i
++ )
4579 SHOunion1
.ss
= Saux1
.e
[i
/2];
4581 SHOunion2
.ss
= Saux2
.e
[(i
+b
)/2];
4584 if (SHOunion1
.sc
[i
%2] != SHOunion2
.sc
[(i
+b
)%2])
4588 printf("Function vec_slo [type short] ===> Error\n");
4590 printf("Function vec_slo [type short] ===> OK\n");
4593 USaux1
.v
= vec_slo( UScons3
, UCcons1
);
4596 b
= (UCaux3
.e
[15] & 0x78) >> 3;
4597 for( i
=0; i
< 16; i
++ )
4599 SHOunion1
.us
= USaux1
.e
[i
/2];
4601 SHOunion2
.us
= USaux2
.e
[(i
+b
)/2];
4604 if (SHOunion1
.uc
[i
%2] != SHOunion2
.uc
[(i
+b
)%2])
4608 printf("Function vec_slo [type unsigned short] ===> Error\n");
4610 printf("Function vec_slo [type unsigned short] ===> OK\n");
4613 Iaux1
.v
= vec_slo( Icons3
, UCcons1
);
4616 b
= (UCaux3
.e
[15] & 0x78) >> 3;
4617 for( i
=0; i
< 16; i
++ )
4619 INTunion1
.si
= Iaux1
.e
[i
/4];
4621 INTunion2
.si
= Iaux2
.e
[(i
+b
)/4];
4624 if (INTunion1
.sc
[i
%4] != INTunion2
.sc
[(i
+b
)%4])
4628 printf("Function vec_slo [type integer] ===> Error\n");
4630 printf("Function vec_slo [type integer] ===> OK\n");
4633 UIaux1
.v
= vec_slo( UIcons3
, UCcons1
);
4636 b
= (UCaux3
.e
[15] & 0x78) >> 3;
4637 for( i
=0; i
< 16; i
++ )
4639 INTunion1
.ui
= UIaux1
.e
[i
/4];
4641 INTunion2
.ui
= UIaux2
.e
[(i
+b
)/4];
4644 if (INTunion1
.uc
[i
%4] != INTunion2
.uc
[(i
+b
)%4])
4648 printf("Function vec_slo [type unsigned int] ===> Error\n");
4650 printf("Function vec_slo [type unsigned int] ===> OK\n");
4652 #if defined TEST_FLOATS
4654 Faux1
.v
= vec_slo( Fcons3
, UCcons1
);
4657 b
= (UCaux3
.e
[15] & 0x78) >> 3;
4658 for( i
=0; i
< 16; i
++ )
4660 INTunion1
.f
= Faux1
.e
[i
/4];
4662 INTunion2
.f
= Faux2
.e
[(i
+b
)/4];
4665 if (INTunion1
.sc
[i
%4] != INTunion2
.sc
[(i
+b
)%4])
4669 printf("Function vec_slo [type float] ===> Error\n");
4671 printf("Function vec_slo [type float] ===> OK\n");
4674 /* Function vec_splat */
4675 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
4678 Caux1
.v
= vec_splat( Ccons1
, 3 );
4680 for( i
=0; i
< 16; i
++ )
4681 if (Caux1
.e
[i
] != Caux2
.e
[b
])
4684 printf("Function vec_splat [type char] ===> Error\n");
4686 printf("Function vec_splat [type char] ===> OK\n");
4690 UCaux1
.v
= vec_splat( UCcons1
, 3 );
4692 for( i
=0; i
< 16; i
++ )
4693 if (UCaux1
.e
[i
] != UCaux2
.e
[b
])
4696 printf("Function vec_splat [type unsigned char] ===> Error\n");
4698 printf("Function vec_splat [type unsigned char] ===> OK\n");
4702 Saux1
.v
= vec_splat( Scons1
, 3 );
4704 for( i
=0; i
< 8; i
++ )
4705 if (Saux1
.e
[i
] != Saux2
.e
[b
])
4708 printf("Function vec_splat [type short] ===> Error\n");
4710 printf("Function vec_splat [type short] ===> OK\n");
4714 USaux1
.v
= vec_splat( UScons1
, 3 );
4716 for( i
=0; i
< 8; i
++ )
4717 if (USaux1
.e
[i
] != USaux2
.e
[b
])
4720 printf("Function vec_splat [type unsigned short] ===> Error\n");
4722 printf("Function vec_splat [type unsigned short] ===> OK\n");
4726 Iaux1
.v
= vec_splat( Icons1
, 3 );
4728 for( i
=0; i
< 4; i
++ )
4729 if (Iaux1
.e
[i
] != Iaux2
.e
[b
])
4732 printf("Function vec_splat [type integer] ===> Error\n");
4734 printf("Function vec_splat [type integer] ===> OK\n");
4738 UIaux1
.v
= vec_splat( UIcons1
, 3 );
4740 for( i
=0; i
< 4; i
++ )
4741 if (UIaux1
.e
[i
] != UIaux2
.e
[b
])
4744 printf("Function vec_splat [type unsigned int] ===> Error\n");
4746 printf("Function vec_splat [type unsigned int] ===> OK\n");
4748 #if defined TEST_FLOATS
4751 Faux1
.v
= vec_splat( Fcons1
, 3 );
4753 for( i
=0; i
< 4; i
++ )
4754 if (Faux1
.e
[i
] != Faux2
.e
[b
])
4757 printf("Function vec_splat [type float] ===> Error\n");
4759 printf("Function vec_splat [type float] ===> OK\n");
4762 /* Function vec_splat_s8 */
4763 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
4766 Caux1
.v
= vec_splat_s8( 15 );
4767 for( i
=0; i
< 16; i
++ )
4768 if (Caux1
.e
[i
] != Caux
)
4771 printf("Function vec_splat_s8 [type char] ===> Error\n");
4773 printf("Function vec_splat_s8 [type char] ===> OK\n");
4775 /* Function vec_splat_s16 */
4776 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
4779 Saux1
.v
= vec_splat_s16( 15 );
4780 for( i
=0; i
< 8; i
++ )
4781 if (Saux1
.e
[i
] != Saux
)
4784 printf("Function vec_splat_s16 [type short] ===> Error\n");
4786 printf("Function vec_splat_s16 [type short] ===> OK\n");
4788 /* Function vec_splat_s32 */
4789 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
4792 Iaux1
.v
= vec_splat_s32( 15 );
4793 for( i
=0; i
< 4; i
++ )
4794 if (Iaux1
.e
[i
] != Iaux
)
4797 printf("Function vec_splat_s32 [type integer] ===> Error\n");
4799 printf("Function vec_splat_s32 [type integer] ===> OK\n");
4801 /* Function vec_splat_u8 */
4802 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
4805 UCaux1
.v
= vec_splat_u8( 15 );
4806 for( i
=0; i
< 16; i
++ )
4807 if (UCaux1
.e
[i
] != UCaux
)
4810 printf("Function vec_splat_u8 [type unsig. char] ===> Error\n");
4812 printf("Function vec_splat_u8 [type unsig. char] ===> OK\n");
4814 /* Function vec_splat_u16 */
4815 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
4818 USaux1
.v
= vec_splat_u16( 15 );
4819 for( i
=0; i
< 8; i
++ )
4820 if (USaux1
.e
[i
] != Saux
)
4823 printf("Function vec_splat_u16 [type unsg. short] ===> Error\n");
4825 printf("Function vec_splat_u16 [type unsg. short] ===> OK\n");
4827 /* Function vec_splat_u32 */
4828 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
4831 UIaux1
.v
= vec_splat_u32( 15 );
4832 for( i
=0; i
< 4; i
++ )
4833 if (UIaux1
.e
[i
] != UIaux
)
4836 printf("Function vec_splat_u32 [type unsig. int] ===> Error\n");
4838 printf("Function vec_splat_u32 [type unsig. int] ===> OK\n");
4840 /* Function vec_sr */
4841 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
4843 Caux1
.v
= vec_sr( Ccons3
, UCcons3
);
4846 for( i
=0; i
< 16; i
++ )
4848 SHOunion1
.sc
[0] = Caux2
.e
[i
];
4849 SHOunion1
.uc
[0] = SHOunion1
.uc
[0] >> (UCaux3
.e
[i
]%8);
4850 if (Caux1
.e
[i
] != SHOunion1
.sc
[0])
4854 printf("Function vec_sr [type char] ===> Error\n");
4856 printf("Function vec_sr [type char] ===> OK\n");
4859 UCaux1
.v
= vec_sr( UCcons1
, UCcons3
);
4862 for( i
=0; i
< 16; i
++ )
4864 UCaux
= UCaux2
.e
[i
] >> (UCaux3
.e
[i
]%8);
4865 if (UCaux1
.e
[i
] != UCaux
)
4869 printf("Function vec_sr [type unsigned char] ===> Error\n");
4871 printf("Function vec_sr [type unsigned char] ===> OK\n");
4874 Saux1
.v
= vec_sr( Scons3
, UScons3
);
4877 for( i
=0; i
< 8; i
++ )
4879 SHOunion1
.ss
= Saux2
.e
[i
];
4880 SHOunion1
.us
= SHOunion1
.us
>> (USaux3
.e
[i
]%16);
4881 if (Saux1
.e
[i
] != SHOunion1
.ss
)
4885 printf("Function vec_sr [type short] ===> Error\n");
4887 printf("Function vec_sr [type short] ===> OK\n");
4890 USaux1
.v
= vec_sr( UScons1
, UScons3
);
4893 for( i
=0; i
< 8; i
++ )
4895 USaux
= USaux2
.e
[i
] >> (USaux3
.e
[i
]%16);
4896 if (USaux1
.e
[i
] != USaux
)
4900 printf("Function vec_sr [type unsigned short] ===> Error\n");
4902 printf("Function vec_sr [type unsigned short] ===> OK\n");
4905 Iaux1
.v
= vec_sr( Icons3
, UIcons3
);
4908 for( i
=0; i
< 4; i
++ )
4910 INTunion1
.si
= Iaux2
.e
[i
];
4911 INTunion1
.ui
= INTunion1
.ui
>> (UIaux3
.e
[i
]%32);
4912 if (Iaux1
.e
[i
] != INTunion1
.si
)
4916 printf("Function vec_sr [type integer] ===> Error\n");
4918 printf("Function vec_sr [type integer] ===> OK\n");
4921 UIaux1
.v
= vec_sr( UIcons1
, UIcons3
);
4924 for( i
=0; i
< 4; i
++ )
4926 UIaux
= UIaux2
.e
[i
] >> (UIaux3
.e
[i
]%32);
4927 if (UIaux1
.e
[i
] != UIaux
)
4931 printf("Function vec_sr [type unsigned int] ===> Error\n");
4933 printf("Function vec_sr [type unsigned int] ===> OK\n");
4935 /* Function vec_sra */
4936 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
4938 Caux1
.v
= vec_sra( Ccons3
, UCcons3
);
4941 for( i
=0; i
< 16; i
++ )
4943 Caux
= Caux2
.e
[i
] >> (UCaux3
.e
[i
]%8);
4944 if (Caux1
.e
[i
] != Caux
)
4948 printf("Function vec_sra [type char] ===> Error\n");
4950 printf("Function vec_sra [type char] ===> OK\n");
4953 UCaux1
.v
= vec_sra( UCcons1
, UCcons3
);
4956 for( i
=0; i
< 16; i
++ )
4958 INTunion1
.uc
[0] = UCaux2
.e
[i
];
4959 INTunion1
.sc
[0] = INTunion1
.sc
[0] >> (UCaux3
.e
[i
]%8);
4960 if (UCaux1
.e
[i
] != INTunion1
.uc
[0])
4964 printf("Function vec_sra [type unsigned char] ===> Error\n");
4966 printf("Function vec_sra [type unsigned char] ===> OK\n");
4969 Saux1
.v
= vec_sra( Scons3
, UScons3
);
4972 for( i
=0; i
< 8; i
++ )
4974 Saux
= Saux2
.e
[i
] >> (USaux3
.e
[i
]%16);
4975 if (Saux1
.e
[i
] != Saux
)
4979 printf("Function vec_sra [type short] ===> Error\n");
4981 printf("Function vec_sra [type short] ===> OK\n");
4984 USaux1
.v
= vec_sra( UScons1
, UScons3
);
4987 for( i
=0; i
< 8; i
++ )
4989 INTunion1
.us
[0] = USaux2
.e
[i
];
4990 INTunion1
.ss
[0] = INTunion1
.ss
[0] >> (USaux3
.e
[i
]%16);
4991 if (USaux1
.e
[i
] != INTunion1
.us
[0])
4995 printf("Function vec_sra [type unsigned short] ===> Error\n");
4997 printf("Function vec_sra [type unsigned short] ===> OK\n");
5000 Iaux1
.v
= vec_sra( Icons3
, UIcons3
);
5003 for( i
=0; i
< 4; i
++ )
5005 Iaux
= Iaux2
.e
[i
] >> (UIaux3
.e
[i
]%32);
5006 if (Iaux1
.e
[i
] != Iaux
)
5010 printf("Function vec_sra [type integer] ===> Error\n");
5012 printf("Function vec_sra [type integer] ===> OK\n");
5015 UIaux1
.v
= vec_sra( UIcons1
, UIcons3
);
5018 for( i
=0; i
< 4; i
++ )
5020 INTunion1
.ui
= UIaux2
.e
[i
];
5021 INTunion1
.si
= INTunion1
.si
>> (UIaux3
.e
[i
]%32);
5022 if (UIaux1
.e
[i
] != INTunion1
.ui
)
5026 printf("Function vec_sra [type unsigned int] ===> Error\n");
5028 printf("Function vec_sra [type unsigned int] ===> OK\n");
5030 /* Function vec_srl */
5031 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
5033 Caux1
.v
= vec_srl( Ccons1
, UCcons2
);
5036 b
= UCaux3
.e
[15] & 0x7;
5037 for( i
=0; i
< 15; i
++ )
5038 if ((UCaux3
.e
[i
] & 0x7)!=b
)
5042 printf("The three low-order bits of all byte elements in b must be the same\n");
5043 printf("otherwise the value into d is undefined\n");
5048 for( i
=0; i
< 16; i
++ )
5050 INTunion1
.sc
[0] = Caux2
.e
[i
];
5051 Caux
= Caux
| (INTunion1
.uc
[0]>>b
);
5052 if (Caux
!= Caux1
.e
[i
])
5054 Caux
= INTunion1
.uc
[0]<<(8-b
);
5057 printf("Function vec_srl [type char] ===> Error\n");
5059 printf("Function vec_srl [type char] ===> OK\n");
5063 UCaux1
.v
= vec_srl( UCcons1
, UCcons2
);
5066 b
= UCaux3
.e
[15] & 0x7;
5067 for( i
=0; i
< 15; i
++ )
5068 if ((UCaux3
.e
[i
] & 0x7)!=b
)
5072 printf("The three low-order bits of all byte elements in b must be the same\n");
5073 printf("otherwise the value into d is undefined\n");
5078 for( i
=0; i
< 16; i
++ )
5080 UCaux
= UCaux
| (UCaux2
.e
[i
]>>b
);
5081 if (UCaux
!= UCaux1
.e
[i
])
5083 UCaux
= UCaux2
.e
[i
]<<(8-b
);
5086 printf("Function vec_srl [type unsigned char] ===> Error\n");
5088 printf("Function vec_srl [type unsigned char] ===> OK\n");
5092 Saux1
.v
= vec_srl( Scons1
, UCcons2
);
5095 b
= UCaux3
.e
[15] & 0x7;
5096 for( i
=0; i
< 15; i
++ )
5097 if ((UCaux3
.e
[i
] & 0x7)!=b
)
5101 printf("The three low-order bits of all byte elements in b must be the same\n");
5102 printf("otherwise the value into d is undefined\n");
5107 for( i
=0; i
< 8; i
++ )
5109 INTunion1
.ss
[0] = Saux2
.e
[i
];
5110 Saux
= Saux
| (INTunion1
.us
[0]>>b
);
5111 if (Saux
!= Saux1
.e
[i
])
5113 Saux
= INTunion1
.us
[0]<<(16-b
);
5116 printf("Function vec_srl [type short] ===> Error\n");
5118 printf("Function vec_srl [type short] ===> OK\n");
5122 USaux1
.v
= vec_srl( UScons1
, UCcons2
);
5125 b
= UCaux3
.e
[15] & 0x7;
5126 for( i
=0; i
< 15; i
++ )
5127 if ((UCaux3
.e
[i
] & 0x7)!=b
)
5131 printf("The three low-order bits of all byte elements in b must be the same\n");
5132 printf("otherwise the value into d is undefined\n");
5137 for( i
=0; i
< 8; i
++ )
5139 USaux
= USaux
| (USaux2
.e
[i
]>>b
);
5140 if (USaux
!= USaux1
.e
[i
])
5142 USaux
= USaux2
.e
[i
]<<(16-b
);
5145 printf("Function vec_srl [type unsigned short] ===> Error\n");
5147 printf("Function vec_srl [type unsigned short] ===> OK\n");
5151 Iaux1
.v
= vec_srl( Icons1
, UCcons2
);
5154 b
= UCaux3
.e
[15] & 0x7;
5155 for( i
=0; i
< 15; i
++ )
5156 if ((UCaux3
.e
[i
] & 0x7)!=b
)
5160 printf("The three low-order bits of all byte elements in b must be the same\n");
5161 printf("otherwise the value into d is undefined\n");
5166 for( i
=0; i
< 4; i
++ )
5168 INTunion1
.si
= Iaux2
.e
[i
];
5169 Iaux
= Iaux
| (INTunion1
.ui
>>b
);
5170 if (Iaux
!= Iaux1
.e
[i
])
5172 Iaux
= INTunion1
.ui
<<(32-b
);
5175 printf("Function vec_srl [type integer] ===> Error\n");
5177 printf("Function vec_srl [type integer] ===> OK\n");
5181 UIaux1
.v
= vec_srl( UIcons1
, UCcons2
);
5184 b
= UCaux3
.e
[15] & 0x7;
5185 for( i
=0; i
< 15; i
++ )
5186 if ((UCaux3
.e
[i
] & 0x7)!=b
)
5190 printf("The three low-order bits of all byte elements in b must be the same\n");
5191 printf("otherwise the value into d is undefined\n");
5196 for( i
=0; i
< 4; i
++ )
5198 UIaux
= UIaux
| (UIaux2
.e
[i
]>>b
);
5199 if (UIaux
!= UIaux1
.e
[i
])
5201 UIaux
= UIaux2
.e
[i
]<<(32-b
);
5204 printf("Function vec_srl [type unsigned int] ===> Error\n");
5206 printf("Function vec_srl [type unsigned int] ===> OK\n");
5209 /* Function vec_sro */
5210 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
5212 Caux1
.v
= vec_sro( Ccons3
, Ccons1
);
5215 b
= (Caux3
.e
[15] & 0x78) >>3;
5216 for( i
=0; i
< 16; i
++ )
5220 if (Caux1
.e
[i
] != Caux2
.e
[i
-b
])
5225 if (Caux1
.e
[i
] != 0)
5230 printf("Function vec_sro [type char] ===> Error\n");
5232 printf("Function vec_sro [type char] ===> OK\n");
5235 UCaux1
.v
= vec_sro( UCcons3
, UCcons1
);
5238 b
= (UCaux3
.e
[15] & 0x78) >>3;
5239 for( i
=0; i
< 16; i
++ )
5243 if (UCaux1
.e
[i
] != UCaux2
.e
[i
-b
])
5248 if (UCaux1
.e
[i
] != 0)
5253 printf("Function vec_sro [type unsigned char] ===> Error\n");
5255 printf("Function vec_sro [type unsigned char] ===> OK\n");
5258 Saux1
.v
= vec_sro( Scons3
, Ccons1
);
5261 b
= (Caux3
.e
[15] & 0x78) >>3;
5262 for( i
=0; i
< 16; i
++ )
5264 SHOunion1
.ss
= Saux1
.e
[i
/2];
5267 SHOunion2
.ss
= Saux2
.e
[(i
-b
)/2];
5268 if (SHOunion1
.sc
[i
%2] != SHOunion2
.sc
[(i
-b
)%2])
5273 if (SHOunion1
.sc
[i
%2] != 0)
5278 printf("Function vec_sro [type short] ===> Error\n");
5280 printf("Function vec_sro [type short] ===> OK\n");
5283 USaux1
.v
= vec_sro( UScons3
, UCcons1
);
5286 b
= (UCaux3
.e
[15] & 0x78) >>3;
5287 for( i
=0; i
< 16; i
++ )
5289 SHOunion1
.us
= USaux1
.e
[i
/2];
5292 SHOunion2
.us
= USaux2
.e
[(i
-b
)/2];
5293 if (SHOunion1
.uc
[i
%2] != SHOunion2
.uc
[(i
-b
)%2])
5298 if (SHOunion1
.uc
[i
%2] != 0)
5303 printf("Function vec_sro [type unsigned short] ===> Error\n");
5305 printf("Function vec_sro [type unsigned short] ===> OK\n");
5308 Iaux1
.v
= vec_sro( Icons3
, Ccons1
);
5311 b
= (Caux3
.e
[15] & 0x78) >>3;
5312 for( i
=0; i
< 16; i
++ )
5314 INTunion1
.si
= Iaux1
.e
[i
/4];
5317 INTunion2
.si
= Iaux2
.e
[(i
-b
)/4];
5318 if (INTunion1
.sc
[i
%4] != INTunion2
.sc
[(i
-b
)%4])
5323 if (INTunion1
.sc
[i
%4] != 0)
5328 printf("Function vec_sro [type integer] ===> Error\n");
5330 printf("Function vec_sro [type integer] ===> OK\n");
5333 UIaux1
.v
= vec_sro( UIcons3
, UCcons1
);
5336 b
= (UCaux3
.e
[15] & 0x78) >>3;
5337 for( i
=0; i
< 16; i
++ )
5339 INTunion1
.ui
= UIaux1
.e
[i
/4];
5342 INTunion2
.ui
= UIaux2
.e
[(i
-b
)/4];
5343 if (INTunion1
.uc
[i
%4] != INTunion2
.sc
[(i
-b
)%4])
5348 if (INTunion1
.uc
[i
%4] != 0)
5353 printf("Function vec_sro [type unsigned int] ===> Error\n");
5355 printf("Function vec_sro [type unsigned int] ===> OK\n");
5357 #if defined TEST_FLOATS
5359 Faux1
.v
= vec_sro( Fcons3
, Ccons1
);
5362 b
= (Caux3
.e
[15] & 0x78) >>3;
5363 for( i
=0; i
< 16; i
++ )
5365 INTunion1
.f
= Faux1
.e
[i
/4];
5368 INTunion2
.f
= Faux2
.e
[(i
-b
)/4];
5369 if (INTunion1
.sc
[i
%4] != INTunion2
.sc
[(i
-b
)%4])
5374 if (INTunion1
.sc
[i
%4] != 0)
5379 printf("Function vec_sro [type float] ===> Error\n");
5381 printf("Function vec_sro [type float] ===> OK\n");
5384 /* Function vec_st */
5385 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
5388 vec_st( UCaux1
.v
, 0, UCmem
);
5390 for ( i
=0; i
< 16; i
++ )
5392 Iaux
= Iaux
&& (UCaux1
.e
[i
]==UCmem
[i
]);
5397 printf("Function vec_st [type unsigned char] ===> Error\n");
5399 printf("Function vec_st [type unsigned char] ===> OK\n");
5403 vec_st( Caux1
.v
, 0, Cmem
);
5405 for ( i
=0; i
< 16; i
++ )
5407 Iaux
= Iaux
&& (Caux1
.e
[i
]==Cmem
[i
]);
5412 printf("Function vec_st [type char] ===> Error\n");
5414 printf("Function vec_st [type char] ===> OK\n");
5418 vec_st( USaux1
.v
, 0, USmem
);
5420 for ( i
=0; i
< 8; i
++ )
5422 Iaux
= Iaux
&& (USaux1
.e
[i
]==USmem
[i
]);
5427 printf("Function vec_st [type unsigned short] ===> Error\n");
5429 printf("Function vec_st [type unsigned short] ===> OK\n");
5433 vec_st( Saux1
.v
, 0, Smem
);
5435 for ( i
=0; i
< 8; i
++ )
5437 Iaux
= Iaux
&& (Saux1
.e
[i
]==Smem
[i
]);
5442 printf("Function vec_st [type short] ===> Error\n");
5444 printf("Function vec_st [type short] ===> OK\n");
5448 vec_st( UIaux1
.v
, 0, UImem
);
5450 for ( i
=0; i
< 4; i
++ )
5452 Iaux
= Iaux
&& (UIaux1
.e
[i
]==UImem
[i
]);
5457 printf("Function vec_st [type unsigned int] ===> Error\n");
5459 printf("Function vec_st [type unsigned int] ===> OK\n");
5463 vec_st( Iaux1
.v
, 0, Imem
);
5465 for ( i
=0; i
< 4; i
++ )
5467 Iaux
= Iaux
&& (Iaux1
.e
[i
]==Imem
[i
]);
5472 printf("Function vec_st [type int] ===> Error\n");
5474 printf("Function vec_st [type int] ===> OK\n");
5476 #if defined TEST_FLOATS
5479 vec_st( Faux1
.v
, 0, Fmem
);
5481 for ( i
=0; i
< 4; i
++ )
5483 Iaux
= Iaux
&& (Faux1
.e
[i
]==Fmem
[i
]);
5488 printf("Function vec_st [type float] ===> Error\n");
5490 printf("Function vec_st [type float] ===> OK\n");
5493 /* Function vec_ste */
5494 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
5498 vec_ste( UCaux1
.v
, b
, UCmem
);
5500 if (UCaux1
.e
[i
]!=UCmem
[i
]) err
++;
5503 printf("Function vec_ste [type unsigned char] ===> Error\n");
5505 printf("Function vec_ste [type unsigned char] ===> OK\n");
5510 vec_ste( Caux1
.v
, b
, Cmem
);
5512 if (Caux1
.e
[i
]!=Cmem
[i
]) err
++;
5515 printf("Function vec_ste [type char] ===> Error\n");
5517 printf("Function vec_ste [type char] ===> OK\n");
5522 vec_ste( USaux1
.v
, b
, USmem
);
5524 if (USaux1
.e
[i
]!=USmem
[i
]) err
++;
5526 printf("Function vec_ste [type unsigned short] ===> Error\n");
5528 printf("Function vec_ste [type unsigned short] ===> OK\n");
5533 vec_ste( Saux1
.v
, b
, Smem
);
5535 if (Saux1
.e
[i
]!=Smem
[i
]) err
++;
5537 printf("Function vec_ste [type short] ===> Error\n");
5539 printf("Function vec_ste [type short] ===> OK\n");
5544 vec_ste( UIaux1
.v
, b
, UImem
);
5546 if (UIaux1
.e
[i
]!=UImem
[i
]) err
++;
5548 printf("Function vec_ste [type unsigned int] ===> Error\n");
5550 printf("Function vec_ste [type unsigned int] ===> OK\n");
5555 vec_ste( Iaux1
.v
, b
, Imem
);
5557 if (Iaux1
.e
[i
]!=Imem
[i
]) err
++;
5559 printf("Function vec_ste [type int] ===> Error\n");
5561 printf("Function vec_ste [type int] ===> OK\n");
5563 #if defined TEST_FLOATS
5567 vec_ste( Faux1
.v
, b
, Fmem
);
5569 if (Faux1
.e
[i
]!=Fmem
[i
]) err
++;
5571 printf("Function vec_ste [type float] ===> Error\n");
5573 printf("Function vec_ste [type float] ===> OK\n");
5577 /* Function vec_stl */
5578 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
5581 vec_stl( UCaux1
.v
, 0, UCmem
);
5583 for ( i
=0; i
< 16; i
++ )
5585 Iaux
= Iaux
&& (UCaux1
.e
[i
]==UCmem
[i
]);
5590 printf("Function vec_stl [type unsigned char] ===> Error\n");
5592 printf("Function vec_stl [type unsigned char] ===> OK\n");
5596 vec_stl( Caux1
.v
, 0, Cmem
);
5598 for ( i
=0; i
< 16; i
++ )
5600 Iaux
= Iaux
&& (Caux1
.e
[i
]==Cmem
[i
]);
5605 printf("Function vec_stl [type char] ===> Error\n");
5607 printf("Function vec_stl [type char] ===> OK\n");
5611 vec_stl( USaux1
.v
, 0, USmem
);
5613 for ( i
=0; i
< 8; i
++ )
5615 Iaux
= Iaux
&& (USaux1
.e
[i
]==USmem
[i
]);
5620 printf("Function vec_stl [type unsigned short] ===> Error\n");
5622 printf("Function vec_stl [type unsigned short] ===> OK\n");
5626 vec_stl( Saux1
.v
, 0, Smem
);
5628 for ( i
=0; i
< 8; i
++ )
5630 Iaux
= Iaux
&& (Saux1
.e
[i
]==Smem
[i
]);
5635 printf("Function vec_stl [type short] ===> Error\n");
5637 printf("Function vec_stl [type short] ===> OK\n");
5641 vec_stl( UIaux1
.v
, 0, UImem
);
5643 for ( i
=0; i
< 4; i
++ )
5645 Iaux
= Iaux
&& (UIaux1
.e
[i
]==UImem
[i
]);
5650 printf("Function vec_stl [type unsigned int] ===> Error\n");
5652 printf("Function vec_stl [type unsigned int] ===> OK\n");
5656 vec_stl( Iaux1
.v
, 0, Imem
);
5658 for ( i
=0; i
< 4; i
++ )
5660 Iaux
= Iaux
&& (Iaux1
.e
[i
]==Imem
[i
]);
5665 printf("Function vec_stl [type int] ===> Error\n");
5667 printf("Function vec_stl [type int] ===> OK\n");
5669 #if defined TEST_FLOATS
5672 vec_stl( Faux1
.v
, 0, Fmem
);
5674 for ( i
=0; i
< 4; i
++ )
5676 Iaux
= Iaux
&& (Faux1
.e
[i
]==Fmem
[i
]);
5681 printf("Function vec_stl [type float] ===> Error\n");
5683 printf("Function vec_stl [type float] ===> OK\n");
5687 /* Free dynamic vector variables */
5694 #if defined TEST_FLOATS
5706 TvecChar Caux1
, Caux2
, Caux3
;//, Caux4;
5707 TvecUChar UCaux1
, UCaux2
, UCaux3
;//, UCaux4;
5708 TvecShort Saux1
, Saux2
, Saux3
;//, Saux4;
5709 TvecUShort USaux1
, USaux2
, USaux3
;//, USaux4;
5710 TvecInt Iaux1
, Iaux2
, Iaux3
;//, Iaux4;
5711 TvecUInt UIaux1
, UIaux2
, UIaux3
;//, UIaux4;
5712 #if defined TEST_FLOATS
5713 TvecFloat Faux1
, Faux2
, Faux3
;//, Faux4;
5716 int i
, err
, j
;//, b, bAux;
5717 // signed int Ivec1, Ivec2, Ivec3;
5718 // signed short *Svec1;
5719 // unsigned int *UIvec1;
5720 // unsigned short *USvec1;
5721 // unsigned char *UCvec1;
5722 #if defined TEST_FLOATS
5726 /* For saturated rutines */
5727 long long int LLaux
;
5729 #if defined TEST_FLOATS
5732 signed int Iaux
;//, I1, I2;
5733 unsigned int UIaux
;//, UI1, UI2;
5735 unsigned short USaux
;
5737 unsigned char UCaux
;
5746 unsigned short us[2];
5748 unsigned char uc[4];
5749 } INTunion1, INTunion2;
5756 unsigned char uc[2];
5757 } SHOunion1, SHOunion2;
5760 #if defined (GCC_COMPILER)
5761 vector
signed char Ccons1
= (vector
signed char){-8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7};
5762 vector
signed char Ccons2
= (vector
signed char){1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1};
5763 vector
signed char Ccons3
= (vector
signed char){-128, 127, -128, 127, -128, 127, -128, 127, -128, 127, -128, 127, -128, 127, -128, 127};
5764 vector
unsigned char UCcons1
= (vector
unsigned char){248, 249, 250, 251, 252, 253, 254, 255, 0, 1, 2, 3, 4, 5, 6, 7};
5765 vector
unsigned char UCcons2
= (vector
unsigned char){2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2};
5766 vector
unsigned char UCcons3
= (vector
unsigned char){1, 2, 3, 4, 5, 6, 7, 8, 1, 2, 3, 4, 5, 6, 7, 8};
5767 vector
signed short Scons1
= (vector
signed short){-4, -3, -2, -1, 0, 1, 2, 3};
5768 vector
signed short Scons2
= (vector
signed short){-32768, 10000, 1, 1, 1, 1, -10000, -10000};
5769 vector
signed short Scons3
= (vector
signed short){-32768, 32767, -32768, 32767, -32768, 32767, -32768, 32767};
5770 vector
unsigned short UScons1
= (vector
unsigned short){65532, 65533, 65534, 65535, 0, 1, 2, 3};
5771 vector
unsigned short UScons2
= (vector
unsigned short){1, 1, 1, 1, 1, 1, 1, 1};
5772 vector
unsigned short UScons3
= (vector
unsigned short){1, 2, 3, 4, 1, 2, 3, 4};
5773 vector
signed int Icons1
= (vector
signed int){-4, -1, 1, 4};
5774 vector
signed int Icons2
= (vector
signed int){1, 1, 1, 1};
5775 vector
signed int Icons3
= (vector
signed int){0x80000000, 0x7FFFFFFF, 0x80000000, 0x7FFFFFFF};
5776 vector
unsigned int UIcons1
= (vector
unsigned int){0xFFFFFFFE, 0xFFFFFFFF, 0, 1};
5777 vector
unsigned int UIcons2
= (vector
unsigned int){1, 1, 1, 1};
5778 vector
unsigned int UIcons3
= (vector
unsigned int){1, 2, 1, 2};
5780 #if defined TEST_FLOATS
5781 vector
float Fcons1
= (vector
float){-1.5, 1.0, 0.5, -3.999};
5782 vector
float Fcons2
= (vector
float){1.0, 1.0, 1.0, 1.0};
5783 vector
float Fcons3
= (vector
float){100000000000.0, 1.0, -1.0, -1234567890.0};
5786 #elif defined (MAC_COMPILER) || defined(XLC_COMPILER)
5787 vector
signed char Ccons1
= (vector
signed char)(-8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7);
5788 vector
signed char Ccons2
= (vector
signed char)(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1);
5789 vector
signed char Ccons3
= (vector
signed char)(-128, 127, -128, 127, -128, 127, -128, 127, -128, 127, -128, 127, -128, 127, -128, 127);
5790 vector
unsigned char UCcons1
= (vector
unsigned char)(248, 249, 250, 251, 252, 253, 254, 255, 0, 1, 2, 3, 4, 5, 6, 7);
5791 vector
unsigned char UCcons2
= (vector
unsigned char)(2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2);
5792 vector
unsigned char UCcons3
= (vector
unsigned char)(1, 2, 3, 4, 5, 6, 7, 8, 1, 2, 3, 4, 5, 6, 7, 8);
5793 vector
signed short Scons1
= (vector
signed short)(-4, -3, -2, -1, 0, 1, 2, 3);
5794 vector
signed short Scons2
= (vector
signed short)(-32768, 10000, 1, 1, 1, 1, -10000, -10000);
5795 vector
signed short Scons3
= (vector
signed short)(-32768, 32767, -32768, 32767, -32768, 32767, -32768, 32767);
5796 vector
unsigned short UScons1
= (vector
unsigned short)(65532, 65533, 65534, 65535, 0, 1, 2, 3);
5797 vector
unsigned short UScons2
= (vector
unsigned short)(1, 1, 1, 1, 1, 1, 1, 1);
5798 vector
unsigned short UScons3
= (vector
unsigned short)(1, 2, 3, 4, 1, 2, 3, 4);
5799 vector
signed int Icons1
= (vector
signed int)(-4, -1, 1, 4);
5800 vector
signed int Icons2
= (vector
signed int)(1, 1, 1, 1);
5801 vector
signed int Icons3
= (vector
signed int)(0x80000000, 0x7FFFFFFF, 0x80000000, 0x7FFFFFFF);
5802 vector
unsigned int UIcons1
= (vector
unsigned int)(0xFFFFFFFE, 0xFFFFFFFF, 0, 1);
5803 vector
unsigned int UIcons2
= (vector
unsigned int)(1, 1, 1, 1);
5804 vector
unsigned int UIcons3
= (vector
unsigned int)(1, 2, 1, 2);
5806 #if defined TEST_FLOATS
5807 vector
float Fcons1
= (vector
float)(-1.5, 1.0, 0.5, -3.999);
5808 vector
float Fcons2
= (vector
float)(1.0, 1.0, 1.0, 1.0);
5809 vector
float Fcons3
= (vector
float)(100000000000.0, 1.0, -1.0, -1234567890.0);
5815 /* Function vec_sub */
5816 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
5818 Caux1
.v
= vec_sub( Ccons1
, Ccons2
);
5821 for( i
=0; i
< 16; i
++ )
5823 Caux
= Caux2
.e
[i
] - Caux3
.e
[i
];
5824 if (Caux1
.e
[i
] != Caux
)
5828 printf("Function vec_sub [type char] ===> Error\n");
5830 printf("Function vec_sub [type char] ===> OK\n");
5833 UCaux1
.v
= vec_sub( UCcons1
, UCcons2
);
5836 for( i
=0; i
< 16; i
++ )
5838 UCaux
= UCaux2
.e
[i
] - UCaux3
.e
[i
];
5839 if (UCaux1
.e
[i
] != UCaux
)
5843 printf("Function vec_sub [type unsigned char] ===> Error\n");
5845 printf("Function vec_sub [type unsigned char] ===> OK\n");
5848 Saux1
.v
= vec_sub( Scons1
, Scons2
);
5851 for( i
=0; i
< 8; i
++ )
5853 Saux
= Saux2
.e
[i
] - Saux3
.e
[i
];
5854 if (Saux1
.e
[i
] != Saux
)
5858 printf("Function vec_sub [type short] ===> Error\n");
5860 printf("Function vec_sub [type short] ===> OK\n");
5863 USaux1
.v
= vec_sub( UScons1
, UScons2
);
5866 for( i
=0; i
< 8; i
++ )
5868 USaux
= USaux2
.e
[i
] - USaux3
.e
[i
];
5869 if (USaux1
.e
[i
] != USaux
)
5873 printf("Function vec_sub [type unsigned short] ===> Error\n");
5875 printf("Function vec_sub [type unsigned short] ===> OK\n");
5878 Iaux1
.v
= vec_sub( Icons1
, Icons2
);
5881 for( i
=0; i
< 4; i
++ )
5883 Iaux
= Iaux2
.e
[i
] - Iaux3
.e
[i
];
5884 if (Iaux1
.e
[i
] != Iaux
)
5888 printf("Function vec_sub [type integer] ===> Error\n");
5890 printf("Function vec_sub [type integer] ===> OK\n");
5893 UIaux1
.v
= vec_sub( UIcons1
, UIcons2
);
5896 for( i
=0; i
< 4; i
++ )
5898 UIaux
= UIaux2
.e
[i
] - UIaux3
.e
[i
];
5899 if (UIaux1
.e
[i
] != UIaux
)
5903 printf("Function vec_sub [type unsigned int] ===> Error\n");
5905 printf("Function vec_sub [type unsigned int] ===> OK\n");
5907 #if defined TEST_FLOATS
5909 Faux1
.v
= vec_sub( Fcons1
, Fcons2
);
5912 for( i
=0; i
< 4; i
++ )
5914 Faux
= Faux2
.e
[i
] - Faux3
.e
[i
];
5915 if (Faux1
.e
[i
] != Faux
)
5919 printf("Function vec_sub [type float] ===> Error\n");
5921 printf("Function vec_sub [type float] ===> OK\n");
5924 /* Function vec_subc */
5925 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
5927 UIaux1
.v
= vec_subc( UIcons2
, UIcons3
);
5930 for( i
=0; i
< 4; i
++ )
5932 if (UIaux3
.e
[i
]>UIaux2
.e
[i
])
5934 if (UIaux1
.e
[i
] != 0)
5939 if (UIaux1
.e
[i
] != 1)
5944 printf("Function vec_subc [type unsigned int] ===> Error\n");
5946 printf("Function vec_subc [type unsigned int] ===> OK\n");
5948 /* Function vec_subs */
5949 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
5951 Caux1
.v
= vec_subs( Ccons1
, Ccons3
);
5954 for( i
=0; i
< 16; i
++ )
5956 Caux
= (signed char)Caux2
.e
[i
]-Caux3
.e
[i
];
5957 if ((Caux2
.e
[i
]>=0)&&(Caux3
.e
[i
]<0))
5959 if (Caux
< Caux2
.e
[i
])
5962 else if ((Caux2
.e
[i
]<0)&&(Caux3
.e
[i
]>0))
5964 if (Caux
> Caux2
.e
[i
])
5967 if (Caux1
.e
[i
] != Caux
)
5971 printf("Function vec_subs [type char] ===> Error\n");
5973 printf("Function vec_subs [type char] ===> OK\n");
5976 UCaux1
.v
= vec_subs( UCcons1
, UCcons3
);
5979 for( i
=0; i
< 16; i
++ )
5981 UCaux
= (unsigned char)(UCaux2
.e
[i
]-UCaux3
.e
[i
]);
5982 if (UCaux
> UCaux2
.e
[i
])
5984 if (UCaux1
.e
[i
] != UCaux
)
5988 printf("Function vec_subs [type unsigned char] ===> Error\n");
5990 printf("Function vec_subs [type unsigned char] ===> OK\n");
5993 Saux1
.v
= vec_subs( Scons1
, Scons3
);
5996 for( i
=0; i
< 8; i
++ )
5998 Saux
= (signed short)(Saux2
.e
[i
] - Saux3
.e
[i
]);
5999 if ((Saux2
.e
[i
]>=0)&&(Saux3
.e
[i
]<0))
6001 if (Saux
< Saux2
.e
[i
])
6004 else if ((Saux2
.e
[i
]<0)&&(Saux3
.e
[i
]>0))
6006 if (Saux
> Saux2
.e
[i
])
6009 if (Saux1
.e
[i
] != Saux
)
6013 printf("Function vec_subs [type short] ===> Error\n");
6015 printf("Function vec_subs [type short] ===> OK\n");
6018 USaux1
.v
= vec_subs( UScons1
, UScons3
);
6021 for( i
=0; i
< 8; i
++ )
6023 USaux
= (unsigned short)(USaux2
.e
[i
] - USaux3
.e
[i
]);
6024 if (USaux
> USaux2
.e
[i
])
6026 if (USaux1
.e
[i
] != USaux
)
6030 printf("Function vec_subs [type unsigned short] ===> Error\n");
6032 printf("Function vec_subs [type unsigned short] ===> OK\n");
6036 Iaux1
.v
= vec_subs( Icons1
, Icons3
);
6039 for( i
=0; i
< 4; i
++ )
6041 Iaux
= (signed int)(Iaux2
.e
[i
] - Iaux3
.e
[i
]);
6042 if ((Iaux2
.e
[i
]>=0)&&(Iaux3
.e
[i
]<0))
6044 if (Iaux
< Iaux2
.e
[i
])
6047 else if ((Iaux2
.e
[i
]<0)&&(Iaux3
.e
[i
]>0))
6049 if (Iaux
> Iaux2
.e
[i
])
6051 printf("%d > %d\n", Iaux
, Iaux2
.e
[i
]);
6055 if (Iaux1
.e
[i
] != Iaux
)
6059 printf("Function vec_subs [type integer] ===> Error\n");
6061 printf("Function vec_subs [type integer] ===> OK\n");
6064 UIaux1
.v
= vec_subs( UIcons1
, UIcons3
);
6067 for( i
=0; i
< 4; i
++ )
6069 UIaux
= (unsigned int)(UIaux2
.e
[i
] - UIaux3
.e
[i
]);
6070 if (UIaux
> UIaux2
.e
[i
])
6072 if (UIaux1
.e
[i
] != UIaux
)
6076 printf("Function vec_subs [type unsigned int] ===> Error\n");
6078 printf("Function vec_subs [type unsigned int] ===> OK\n");
6080 /* Function vec_sum4s */
6081 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
6083 Iaux1
.v
= vec_sum4s( Ccons2
, Icons2
);
6086 for( i
=0; i
< 4; i
++ )
6089 for( j
=0; j
< 4; j
++ )
6090 Iaux
= Iaux
+ Caux1
.e
[4*i
+j
];
6091 if (Iaux1
.e
[i
] != Iaux
)
6095 printf("Function vec_sum4s [type char] ===> Error\n");
6097 printf("Function vec_sum4s [type char] ===> OK\n");
6100 UIaux1
.v
= vec_sum4s( UCcons2
, UIcons2
);
6103 for( i
=0; i
< 4; i
++ )
6105 UIaux
= UIaux2
.e
[i
];
6106 for( j
=0; j
< 4; j
++ )
6107 UIaux
= UIaux
+ UCaux1
.e
[4*i
+j
];
6108 if (UIaux1
.e
[i
] != UIaux
)
6112 printf("Function vec_sum4s [type unsigned char] ===> Error\n");
6114 printf("Function vec_sum4s [type unsigned char] ===> OK\n");
6117 Iaux1
.v
= vec_sum4s( Scons2
, Icons2
);
6120 for( i
=0; i
< 4; i
++ )
6123 for( j
=0; j
< 2; j
++ )
6124 Iaux
= Iaux
+ Saux1
.e
[2*i
+j
];
6125 if (Iaux1
.e
[i
] != Iaux
)
6129 printf("Function vec_sum4s [type short] ===> Error\n");
6131 printf("Function vec_sum4s [type short] ===> OK\n");
6133 /* Function vec_sum2s */
6134 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
6138 Iaux3
.v
= vec_sum2s( Iaux1
.v
, Iaux2
.v
);
6139 for( i
=0; i
< 2; i
++ )
6141 LLaux
= (long long int) Iaux1
.e
[2*i
] + Iaux1
.e
[(2*i
)+1] + Iaux2
.e
[(2*i
)+1];
6142 if (LLaux
> INT_MAX
)
6144 Iaux
=0x7FFFFFFF; /* INT_MAX */
6146 else if (LLaux
< INT_MIN
)
6148 Iaux
=0x80000000; /* INT_MIN */
6150 else Iaux
= (signed int) LLaux
;
6152 if ((Iaux3
.e
[2*i
] != 0) || (Iaux3
.e
[(2*i
)+1] != Iaux
))
6156 printf("Function vec_sum2s [type integer] ===> Error\n");
6158 printf("Function vec_sum2s [type integer] ===> OK\n");
6160 /* Function vec_sums */
6161 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
6164 /* Not saturated test */
6167 Iaux3
.v
= vec_sums( Iaux1
.v
, Iaux2
.v
);
6169 LLaux
= (long long int) Iaux1
.e
[0] + Iaux1
.e
[1] + Iaux1
.e
[2] + Iaux1
.e
[3] + Iaux2
.e
[3];
6170 if (LLaux
> INT_MAX
)
6172 Iaux
=0x7FFFFFFF; /* INT_MAX */
6174 else if (LLaux
< INT_MIN
)
6176 Iaux
=0x80000000; /* INT_MIN */
6178 else Iaux
= (signed int) LLaux
;
6180 if ((Iaux3
.e
[0] != 0) || (Iaux3
.e
[1] != 0) || (Iaux3
.e
[2] != 0) ||
6181 (Iaux3
.e
[3] != Iaux
))
6184 /* Saturated test */
6187 Iaux3
.v
= vec_sums( Iaux1
.v
, Iaux2
.v
);
6189 LLaux
= (long long int) Iaux1
.e
[0] + Iaux1
.e
[1] + Iaux1
.e
[2] + Iaux1
.e
[3] + Iaux2
.e
[3];
6190 if (LLaux
> INT_MAX
)
6192 Iaux
=0x7FFFFFFF; /* INT_MAX */
6194 else if (LLaux
< INT_MIN
)
6196 Iaux
=0x80000000; /* INT_MIN */
6198 else Iaux
= (signed int) LLaux
;
6200 if ((Iaux3
.e
[0] != 0) || (Iaux3
.e
[1] != 0) || (Iaux3
.e
[2] != 0) ||
6201 (Iaux3
.e
[3] != Iaux
))
6205 printf("Function vec_sums [type integer] ===> Error\n");
6207 printf("Function vec_sums [type integer] ===> OK\n");
6209 #if defined TEST_FLOATS
6210 /* Function vec_trunc */
6211 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
6214 Faux2
.v
= vec_trunc( Faux1
.v
);
6215 for( i
=0; i
< 4; i
++ )
6217 Faux
= truncf(Faux1
.e
[i
]);
6218 if (Faux2
.e
[i
] != Faux
)
6222 printf("Function vec_trunc [type float] ===> Error\n");
6224 printf("Function vec_trunc [type float] ===> OK\n");
6227 /* Function vec_unpackh */
6228 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
6231 Saux1
.v
= vec_unpackh( Caux1
.v
);
6232 for ( i
=0; i
< 8; i
++ )
6234 Saux
= (signed short)Caux1
.e
[i
];
6235 if (Saux1
.e
[i
] != Saux
)
6240 printf("Function vec_unpackh [type short-char] ===> Error\n");
6242 printf("Function vec_unpackh [type short-char] ===> OK\n");
6246 Iaux1
.v
= vec_unpackh( Saux1
.v
);
6247 for ( i
=0; i
< 4; i
++ )
6249 Iaux
= (signed int)Saux1
.e
[i
];
6250 if (Iaux1
.e
[i
] != Iaux
)
6255 printf("Function vec_unpackh [type int-short] ===> Error\n");
6257 printf("Function vec_unpackh [type int-short] ===> OK\n");
6259 /* Function vec_unpackl */
6260 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
6263 Saux1
.v
= vec_unpackl( Caux1
.v
);
6264 for ( i
=0; i
< 8; i
++ )
6266 Saux
= (signed short)Caux1
.e
[i
+8];
6267 if (Saux1
.e
[i
] != Saux
)
6272 printf("Function vec_unpackl [type short-char] ===> Error\n");
6274 printf("Function vec_unpackl [type short-char] ===> OK\n");
6278 Iaux1
.v
= vec_unpackl( Saux1
.v
);
6279 for ( i
=0; i
< 4; i
++ )
6281 Iaux
= (signed int)Saux1
.e
[i
+4];
6282 if (Iaux1
.e
[i
] != Iaux
)
6287 printf("Function vec_unpackl [type int-short] ===> Error\n");
6289 printf("Function vec_unpackl [type int-short] ===> OK\n");
6291 /* Function vec_xor */
6292 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
6296 UCaux3
.v
= vec_xor( UCaux1
.v
, UCaux2
.v
);
6297 for( i
=0; i
< 16; i
++ )
6299 UCaux
= UCaux1
.e
[i
] ^ UCaux2
.e
[i
];
6300 if (UCaux3
.e
[i
] != UCaux
)
6304 printf("Function vec_xor [type unsigned char] ===> Error\n");
6306 printf("Function vec_xor [type unsigned char] ===> OK\n");
6311 Caux3
.v
= vec_xor( Caux1
.v
, Caux2
.v
);
6312 for( i
=0; i
< 16; i
++ )
6314 Caux
= Caux1
.e
[i
] ^ Caux2
.e
[i
];
6315 if (Caux3
.e
[i
] != Caux
)
6319 printf("Function vec_xor [type char] ===> Error\n");
6321 printf("Function vec_xor [type char] ===> OK\n");
6326 USaux3
.v
= vec_xor( USaux1
.v
, USaux2
.v
);
6327 for( i
=0; i
< 8; i
++ )
6329 USaux
= USaux1
.e
[i
] ^ USaux2
.e
[i
];
6330 if (USaux3
.e
[i
] != USaux
)
6334 printf("Function vec_xor [type unsigned short] ===> Error\n");
6336 printf("Function vec_xor [type unsigned short] ===> OK\n");
6341 Saux3
.v
= vec_xor( Saux1
.v
, Saux2
.v
);
6342 for( i
=0; i
< 8; i
++ )
6344 Saux
= Saux1
.e
[i
] ^ Saux2
.e
[i
];
6345 if (Saux3
.e
[i
] != Saux
)
6349 printf("Function vec_xor [type short] ===> Error\n");
6351 printf("Function vec_xor [type short] ===> OK\n");
6356 UIaux3
.v
= vec_xor( UIaux1
.v
, UIaux2
.v
);
6357 for( i
=0; i
< 4; i
++ )
6359 UIaux
= UIaux1
.e
[i
] ^ UIaux2
.e
[i
];
6360 if (UIaux3
.e
[i
] != UIaux
)
6364 printf("Function vec_xor [type unsigned int] ===> Error\n");
6366 printf("Function vec_xor [type unsigned int] ===> OK\n");
6371 Iaux3
.v
= vec_xor( Iaux1
.v
, Iaux2
.v
);
6372 for( i
=0; i
< 4; i
++ )
6374 Iaux
= Iaux1
.e
[i
] ^ Iaux2
.e
[i
];
6375 if (Iaux3
.e
[i
] != Iaux
)
6379 printf("Function vec_xor [type int] ===> Error\n");
6381 printf("Function vec_xor [type int] ===> OK\n");
6383 #if defined TEST_FLOATS
6387 Faux3
.v
= vec_xor( Faux1
.v
, Faux2
.v
);
6388 for( i
=0; i
< 4; i
++ )
6390 Iaux
= Faux1
.i
[i
] ^ Faux2
.i
[i
];
6392 if (Faux3
.i
[i
] != Iaux
)
6396 printf("Function vec_xor [type float] ===> Error\n");
6398 printf("Function vec_xor [type float] ===> OK\n");
6409 TvecChar Caux1
, Caux2
;//, Caux3, Caux4;
6410 TvecUChar UCaux1
, UCaux2
;//, UCaux3, UCaux4;
6411 TvecShort Saux1
, Saux2
;//, Saux3, Saux4;
6412 TvecUShort USaux1
, USaux2
;//, USaux3, USaux4;
6413 TvecInt Iaux1
, Iaux2
;//, Iaux3, Iaux4;
6414 TvecUInt UIaux1
, UIaux2
;//, UIaux3, UIaux4;
6415 #if defined TEST_FLOATS
6416 TvecFloat Faux1
, Faux2
;//, Faux3, Faux4;
6419 int i
, err
, /*j,*/ b
, bAux
;
6420 // signed int Ivec1, Ivec2, Ivec3;
6421 // signed short *Svec1;
6422 // unsigned int *UIvec1;
6423 // unsigned short *USvec1;
6424 // unsigned char *UCvec1;
6425 #if defined TEST_FLOATS
6429 /* For saturated rutines */
6430 // long long int LLaux;
6432 #if defined TEST_FLOATS
6435 signed int Iaux
, I1
;//, I2;
6436 // unsigned int UIaux, UI1, UI2;
6437 // signed short Saux;
6438 // unsigned short USaux;
6439 // signed char Caux;
6440 // unsigned char UCaux;
6449 unsigned short us[2];
6451 unsigned char uc[4];
6452 } INTunion1, INTunion2;
6459 unsigned char uc[2];
6460 } SHOunion1, SHOunion2;
6464 #if defined (GCC_COMPILER)
6465 vector
signed char Ccons1
= (vector
signed char){-8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7};
6466 vector
signed char Ccons2
= (vector
signed char){1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1};
6467 vector
signed char Ccons3
= (vector
signed char){-128, 127, -128, 127, -128, 127, -128, 127, -128, 127, -128, 127, -128, 127, -128, 127};
6468 vector
unsigned char UCcons1
= (vector
unsigned char){248, 249, 250, 251, 252, 253, 254, 255, 0, 1, 2, 3, 4, 5, 6, 7};
6469 vector
unsigned char UCcons2
= (vector
unsigned char){2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2};
6470 vector
unsigned char UCcons3
= (vector
unsigned char){1, 2, 3, 4, 5, 6, 7, 8, 1, 2, 3, 4, 5, 6, 7, 8};
6471 vector
signed short Scons1
= (vector
signed short){-4, -3, -2, -1, 0, 1, 2, 3};
6472 vector
signed short Scons2
= (vector
signed short){-32768, 10000, 1, 1, 1, 1, -10000, -10000};
6473 vector
signed short Scons3
= (vector
signed short){-32768, 32767, -32768, 32767, -32768, 32767, -32768, 32767};
6474 vector
unsigned short UScons1
= (vector
unsigned short){65532, 65533, 65534, 65535, 0, 1, 2, 3};
6475 vector
unsigned short UScons2
= (vector
unsigned short){1, 1, 1, 1, 1, 1, 1, 1};
6476 vector
unsigned short UScons3
= (vector
unsigned short){1, 2, 3, 4, 1, 2, 3, 4};
6477 vector
signed int Icons1
= (vector
signed int){-4, -1, 1, 4};
6478 vector
signed int Icons2
= (vector
signed int){1, 1, 1, 1};
6479 vector
signed int Icons3
= (vector
signed int){0x80000000, 0x7FFFFFFF, 0x80000000, 0x7FFFFFFF};
6480 vector
unsigned int UIcons1
= (vector
unsigned int){0xFFFFFFFE, 0xFFFFFFFF, 0, 1};
6481 vector
unsigned int UIcons2
= (vector
unsigned int){1, 1, 1, 1};
6482 vector
unsigned int UIcons3
= (vector
unsigned int){1, 2, 1, 2};
6484 #if defined TEST_FLOATS
6485 vector
float Fcons1
= (vector
float){-1.5, 1.0, 0.5, -3.999};
6486 vector
float Fcons2
= (vector
float){1.0, 1.0, 1.0, 1.0};
6487 vector
float Fcons3
= (vector
float){100000000000.0, 1.0, -1.0, -1234567890.0};
6490 #elif defined (MAC_COMPILER) || defined(XLC_COMPILER)
6491 vector
signed char Ccons1
= (vector
signed char)(-8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7);
6492 vector
signed char Ccons2
= (vector
signed char)(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1);
6493 vector
signed char Ccons3
= (vector
signed char)(-128, 127, -128, 127, -128, 127, -128, 127, -128, 127, -128, 127, -128, 127, -128, 127);
6494 vector
unsigned char UCcons1
= (vector
unsigned char)(248, 249, 250, 251, 252, 253, 254, 255, 0, 1, 2, 3, 4, 5, 6, 7);
6495 vector
unsigned char UCcons2
= (vector
unsigned char)(2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2);
6496 vector
unsigned char UCcons3
= (vector
unsigned char)(1, 2, 3, 4, 5, 6, 7, 8, 1, 2, 3, 4, 5, 6, 7, 8);
6497 vector
signed short Scons1
= (vector
signed short)(-4, -3, -2, -1, 0, 1, 2, 3);
6498 vector
signed short Scons2
= (vector
signed short)(-32768, 10000, 1, 1, 1, 1, -10000, -10000);
6499 vector
signed short Scons3
= (vector
signed short)(-32768, 32767, -32768, 32767, -32768, 32767, -32768, 32767);
6500 vector
unsigned short UScons1
= (vector
unsigned short)(65532, 65533, 65534, 65535, 0, 1, 2, 3);
6501 vector
unsigned short UScons2
= (vector
unsigned short)(1, 1, 1, 1, 1, 1, 1, 1);
6502 vector
unsigned short UScons3
= (vector
unsigned short)(1, 2, 3, 4, 1, 2, 3, 4);
6503 vector
signed int Icons1
= (vector
signed int)(-4, -1, 1, 4);
6504 vector
signed int Icons2
= (vector
signed int)(1, 1, 1, 1);
6505 vector
signed int Icons3
= (vector
signed int)(0x80000000, 0x7FFFFFFF, 0x80000000, 0x7FFFFFFF);
6506 vector
unsigned int UIcons1
= (vector
unsigned int)(0xFFFFFFFE, 0xFFFFFFFF, 0, 1);
6507 vector
unsigned int UIcons2
= (vector
unsigned int)(1, 1, 1, 1);
6508 vector
unsigned int UIcons3
= (vector
unsigned int)(1, 2, 1, 2);
6510 #if defined TEST_FLOATS
6511 vector
float Fcons1
= (vector
float)(-1.5, 1.0, 0.5, -3.999);
6512 vector
float Fcons2
= (vector
float)(1.0, 1.0, 1.0, 1.0);
6513 vector
float Fcons3
= (vector
float)(100000000000.0, 1.0, -1.0, -1234567890.0);
6519 /* Function vec_all_eq */
6520 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
6524 I1
= vec_all_eq( UCaux1
.v
, UCaux2
.v
);
6526 for ( i
=0; i
< 16; i
++ )
6528 Iaux
= Iaux
&& (UCaux1
.e
[i
]==UCaux2
.e
[i
]);
6530 if (I1
!= Iaux
) err
++;
6534 I1
= vec_all_eq( UCaux1
.v
, UCaux2
.v
);
6536 for ( i
=0; i
< 16; i
++ )
6538 Iaux
= Iaux
&& (UCaux1
.e
[i
]==UCaux2
.e
[i
]);
6540 if (I1
!= Iaux
) err
++;
6543 printf("Function vec_all_eq [type unsigned char] ===> Error\n");
6545 printf("Function vec_all_eq [type unsigned char] ===> OK\n");
6550 I1
= vec_all_eq( Caux1
.v
, Caux2
.v
);
6552 for ( i
=0; i
< 16; i
++ )
6554 Iaux
= Iaux
&& (Caux1
.e
[i
]==Caux2
.e
[i
]);
6556 if (I1
!= Iaux
) err
++;
6560 I1
= vec_all_eq( Caux1
.v
, Caux2
.v
);
6562 for ( i
=0; i
< 16; i
++ )
6564 Iaux
= Iaux
&& (Caux1
.e
[i
]==Caux2
.e
[i
]);
6566 if (I1
!= Iaux
) err
++;
6569 printf("Function vec_all_eq [type char] ===> Error\n");
6571 printf("Function vec_all_eq [type char] ===> OK\n");
6576 I1
= vec_all_eq( USaux1
.v
, USaux2
.v
);
6578 for ( i
=0; i
< 8; i
++ )
6580 Iaux
= Iaux
&& (USaux1
.e
[i
]==USaux2
.e
[i
]);
6582 if (I1
!= Iaux
) err
++;
6586 I1
= vec_all_eq( USaux1
.v
, USaux2
.v
);
6588 for ( i
=0; i
< 8; i
++ )
6590 Iaux
= Iaux
&& (USaux1
.e
[i
]==USaux2
.e
[i
]);
6592 if (I1
!= Iaux
) err
++;
6595 printf("Function vec_all_eq [type unsigned short] ===> Error\n");
6597 printf("Function vec_all_eq [type unsigned short] ===> OK\n");
6602 I1
= vec_all_eq( Saux1
.v
, Saux2
.v
);
6604 for ( i
=0; i
< 8; i
++ )
6606 Iaux
= Iaux
&& (Saux1
.e
[i
]==Saux2
.e
[i
]);
6608 if (I1
!= Iaux
) err
++;
6612 I1
= vec_all_eq( Saux1
.v
, Saux2
.v
);
6614 for ( i
=0; i
< 8; i
++ )
6616 Iaux
= Iaux
&& (Saux1
.e
[i
]==Saux2
.e
[i
]);
6618 if (I1
!= Iaux
) err
++;
6621 printf("Function vec_all_eq [type short] ===> Error\n");
6623 printf("Function vec_all_eq [type short] ===> OK\n");
6628 I1
= vec_all_eq( UIaux1
.v
, UIaux2
.v
);
6630 for ( i
=0; i
< 4; i
++ )
6632 Iaux
= Iaux
&& (UIaux1
.e
[i
]==UIaux2
.e
[i
]);
6634 if (I1
!= Iaux
) err
++;
6638 I1
= vec_all_eq( UIaux1
.v
, UIaux2
.v
);
6640 for ( i
=0; i
< 4; i
++ )
6642 Iaux
= Iaux
&& (UIaux1
.e
[i
]==UIaux2
.e
[i
]);
6644 if (I1
!= Iaux
) err
++;
6647 printf("Function vec_all_eq [type unsigned int] ===> Error\n");
6649 printf("Function vec_all_eq [type unsigned int] ===> OK\n");
6654 I1
= vec_all_eq( Iaux1
.v
, Iaux2
.v
);
6656 for ( i
=0; i
< 4; i
++ )
6658 Iaux
= Iaux
&& (Iaux1
.e
[i
]==Iaux2
.e
[i
]);
6660 if (I1
!= Iaux
) err
++;
6664 I1
= vec_all_eq( Iaux1
.v
, Iaux2
.v
);
6666 for ( i
=0; i
< 4; i
++ )
6668 Iaux
= Iaux
&& (Iaux1
.e
[i
]==Iaux2
.e
[i
]);
6670 if (I1
!= Iaux
) err
++;
6673 printf("Function vec_all_eq [type int] ===> Error\n");
6675 printf("Function vec_all_eq [type int] ===> OK\n");
6677 #if defined TEST_FLOATS
6681 I1
= vec_all_eq( Faux1
.v
, Faux2
.v
);
6683 for ( i
=0; i
< 4; i
++ )
6685 Iaux
= Iaux
&& (Faux1
.e
[i
]==Faux2
.e
[i
]);
6687 if (I1
!= Iaux
) err
++;
6691 I1
= vec_all_eq( Faux1
.v
, Faux2
.v
);
6693 for ( i
=0; i
< 4; i
++ )
6695 Iaux
= Iaux
&& (Faux1
.e
[i
]==Faux2
.e
[i
]);
6697 if (I1
!= Iaux
) err
++;
6700 printf("Function vec_all_eq [type float] ===> Error\n");
6702 printf("Function vec_all_eq [type float] ===> OK\n");
6705 /* Function vec_all_ge */
6706 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
6710 I1
= vec_all_ge( UCaux1
.v
, UCaux2
.v
);
6712 for ( i
=0; i
< 16; i
++ )
6714 Iaux
= Iaux
&& (UCaux1
.e
[i
]>=UCaux2
.e
[i
]);
6716 if (I1
!= Iaux
) err
++;
6720 I1
= vec_all_ge( UCaux1
.v
, UCaux2
.v
);
6722 for ( i
=0; i
< 16; i
++ )
6724 Iaux
= Iaux
&& (UCaux1
.e
[i
]>=UCaux2
.e
[i
]);
6726 if (I1
!= Iaux
) err
++;
6729 printf("Function vec_all_ge [type unsigned char] ===> Error\n");
6731 printf("Function vec_all_ge [type unsigned char] ===> OK\n");
6736 I1
= vec_all_ge( Caux1
.v
, Caux2
.v
);
6738 for ( i
=0; i
< 16; i
++ )
6740 Iaux
= Iaux
&& (Caux1
.e
[i
]>=Caux2
.e
[i
]);
6742 if (I1
!= Iaux
) err
++;
6746 I1
= vec_all_ge( Caux1
.v
, Caux2
.v
);
6748 for ( i
=0; i
< 16; i
++ )
6750 Iaux
= Iaux
&& (Caux1
.e
[i
]>=Caux2
.e
[i
]);
6752 if (I1
!= Iaux
) err
++;
6755 printf("Function vec_all_ge [type char] ===> Error\n");
6757 printf("Function vec_all_ge [type char] ===> OK\n");
6762 I1
= vec_all_ge( USaux1
.v
, USaux2
.v
);
6764 for ( i
=0; i
< 8; i
++ )
6766 Iaux
= Iaux
&& (USaux1
.e
[i
]>=USaux2
.e
[i
]);
6768 if (I1
!= Iaux
) err
++;
6772 I1
= vec_all_ge( USaux1
.v
, USaux2
.v
);
6774 for ( i
=0; i
< 8; i
++ )
6776 Iaux
= Iaux
&& (USaux1
.e
[i
]>=USaux2
.e
[i
]);
6778 if (I1
!= Iaux
) err
++;
6781 printf("Function vec_all_ge [type unsigned short] ===> Error\n");
6783 printf("Function vec_all_ge [type unsigned short] ===> OK\n");
6788 I1
= vec_all_ge( Saux1
.v
, Saux2
.v
);
6790 for ( i
=0; i
< 8; i
++ )
6792 Iaux
= Iaux
&& (Saux1
.e
[i
]>=Saux2
.e
[i
]);
6794 if (I1
!= Iaux
) err
++;
6798 I1
= vec_all_ge( Saux1
.v
, Saux2
.v
);
6800 for ( i
=0; i
< 8; i
++ )
6802 Iaux
= Iaux
&& (Saux1
.e
[i
]>=Saux2
.e
[i
]);
6804 if (I1
!= Iaux
) err
++;
6807 printf("Function vec_all_ge [type short] ===> Error\n");
6809 printf("Function vec_all_ge [type short] ===> OK\n");
6814 I1
= vec_all_ge( UIaux1
.v
, UIaux2
.v
);
6816 for ( i
=0; i
< 4; i
++ )
6818 Iaux
= Iaux
&& (UIaux1
.e
[i
]>=UIaux2
.e
[i
]);
6820 if (I1
!= Iaux
) err
++;
6824 I1
= vec_all_ge( UIaux1
.v
, UIaux2
.v
);
6826 for ( i
=0; i
< 4; i
++ )
6828 Iaux
= Iaux
&& (UIaux1
.e
[i
]>=UIaux2
.e
[i
]);
6830 if (I1
!= Iaux
) err
++;
6833 printf("Function vec_all_ge [type unsigned int] ===> Error\n");
6835 printf("Function vec_all_ge [type unsigned int] ===> OK\n");
6840 I1
= vec_all_ge( Iaux1
.v
, Iaux2
.v
);
6842 for ( i
=0; i
< 4; i
++ )
6844 Iaux
= Iaux
&& (Iaux1
.e
[i
]>=Iaux2
.e
[i
]);
6846 if (I1
!= Iaux
) err
++;
6850 I1
= vec_all_ge( Iaux1
.v
, Iaux2
.v
);
6852 for ( i
=0; i
< 4; i
++ )
6854 Iaux
= Iaux
&& (Iaux1
.e
[i
]>=Iaux2
.e
[i
]);
6856 if (I1
!= Iaux
) err
++;
6859 printf("Function vec_all_ge [type int] ===> Error\n");
6861 printf("Function vec_all_ge [type int] ===> OK\n");
6863 #if defined TEST_FLOATS
6867 I1
= vec_all_ge( Faux1
.v
, Faux2
.v
);
6869 for ( i
=0; i
< 4; i
++ )
6871 Iaux
= Iaux
&& (Faux1
.e
[i
]>=Faux2
.e
[i
]);
6873 if (I1
!= Iaux
) err
++;
6877 I1
= vec_all_ge( Faux1
.v
, Faux2
.v
);
6879 for ( i
=0; i
< 4; i
++ )
6881 Iaux
= Iaux
&& (Faux1
.e
[i
]>=Faux2
.e
[i
]);
6883 if (I1
!= Iaux
) err
++;
6886 printf("Function vec_all_ge [type float] ===> Error\n");
6888 printf("Function vec_all_ge [type float] ===> OK\n");
6891 /* Function vec_all_gt */
6892 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
6894 # if defined (GCC_COMPILER)
6895 UCaux1
.v
= (vector
unsigned char){248, 249, 250, 251, 252, 253, 254, 255, 2, 3, 4, 5, 6, 7, 8, 9};
6896 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
6897 UCaux1
.v
= (vector
unsigned char)(248, 249, 250, 251, 252, 253, 254, 255, 2, 3, 4, 5, 6, 7, 8, 9);
6900 I1
= vec_all_gt( UCaux1
.v
, UCaux2
.v
);
6902 for ( i
=0; i
< 16; i
++ )
6904 Iaux
= Iaux
&& (UCaux1
.e
[i
]>UCaux2
.e
[i
]);
6906 if (I1
!= Iaux
) err
++;
6910 I1
= vec_all_gt( UCaux1
.v
, UCaux2
.v
);
6912 for ( i
=0; i
< 16; i
++ )
6914 Iaux
= Iaux
&& (UCaux1
.e
[i
]>UCaux2
.e
[i
]);
6916 if (I1
!= Iaux
) err
++;
6919 printf("Function vec_all_gt [type unsigned char] ===> Error\n");
6921 printf("Function vec_all_gt [type unsigned char] ===> OK\n");
6924 # if defined (GCC_COMPILER)
6925 Caux1
.v
= (vector
signed char){9, 8, 7, 6, 5, 4, 3, 2, 3, 4, 5, 6, 7, 8, 9, 10};
6926 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
6927 Caux1
.v
= (vector
signed char)(9, 8, 7, 6, 5, 4, 3, 2, 3, 4, 5, 6, 7, 8, 9, 10);
6930 I1
= vec_all_gt( Caux1
.v
, Caux2
.v
);
6932 for ( i
=0; i
< 16; i
++ )
6934 Iaux
= Iaux
&& (Caux1
.e
[i
]>Caux2
.e
[i
]);
6936 if (I1
!= Iaux
) err
++;
6940 I1
= vec_all_gt( Caux1
.v
, Caux2
.v
);
6942 for ( i
=0; i
< 16; i
++ )
6944 Iaux
= Iaux
&& (Caux1
.e
[i
]>Caux2
.e
[i
]);
6946 if (I1
!= Iaux
) err
++;
6949 printf("Function vec_all_gt [type char] ===> Error\n");
6951 printf("Function vec_all_gt [type char] ===> OK\n");
6954 # if defined (GCC_COMPILER)
6955 USaux1
.v
= (vector
unsigned short){65532, 65533, 65534, 65535, 2, 3, 4, 5};
6956 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
6957 USaux1
.v
= (vector
unsigned short)(65532, 65533, 65534, 65535, 2, 3, 4, 5);
6960 I1
= vec_all_gt( USaux1
.v
, USaux2
.v
);
6962 for ( i
=0; i
< 8; i
++ )
6964 Iaux
= Iaux
&& (USaux1
.e
[i
]>USaux2
.e
[i
]);
6966 if (I1
!= Iaux
) err
++;
6970 I1
= vec_all_gt( USaux1
.v
, USaux2
.v
);
6972 for ( i
=0; i
< 8; i
++ )
6974 Iaux
= Iaux
&& (USaux1
.e
[i
]>USaux2
.e
[i
]);
6976 if (I1
!= Iaux
) err
++;
6979 printf("Function vec_all_gt [type unsigned short] ===> Error\n");
6981 printf("Function vec_all_gt [type unsigned short] ===> OK\n");
6984 # if defined (GCC_COMPILER)
6985 Saux1
.v
= (vector
signed short){4, 3, 2, 1, 2, 3, 4, 5};
6986 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
6987 Saux1
.v
= (vector
signed short)(4, 3, 2, 1, 2, 3, 4, 5);
6990 I1
= vec_all_gt( Saux1
.v
, Saux2
.v
);
6992 for ( i
=0; i
< 8; i
++ )
6994 Iaux
= Iaux
&& (Saux1
.e
[i
]>Saux2
.e
[i
]);
6996 if (I1
!= Iaux
) err
++;
7000 I1
= vec_all_gt( Saux1
.v
, Saux2
.v
);
7002 for ( i
=0; i
< 8; i
++ )
7004 Iaux
= Iaux
&& (Saux1
.e
[i
]>Saux2
.e
[i
]);
7006 if (I1
!= Iaux
) err
++;
7009 printf("Function vec_all_gt [type short] ===> Error\n");
7011 printf("Function vec_all_gt [type short] ===> OK\n");
7014 # if defined (GCC_COMPILER)
7015 UIaux1
.v
= (vector
unsigned int){3, 2, 3, 2};
7016 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
7017 UIaux1
.v
= (vector
unsigned int)(3, 2, 3, 2);
7020 I1
= vec_all_gt( UIaux1
.v
, UIaux2
.v
);
7022 for ( i
=0; i
< 4; i
++ )
7024 Iaux
= Iaux
&& (UIaux1
.e
[i
]>UIaux2
.e
[i
]);
7026 if (I1
!= Iaux
) err
++;
7030 I1
= vec_all_gt( UIaux1
.v
, UIaux2
.v
);
7032 for ( i
=0; i
< 4; i
++ )
7034 Iaux
= Iaux
&& (UIaux1
.e
[i
]>UIaux2
.e
[i
]);
7036 if (I1
!= Iaux
) err
++;
7039 printf("Function vec_all_gt [type unsigned int] ===> Error\n");
7041 printf("Function vec_all_gt [type unsigned int] ===> OK\n");
7044 # if defined (GCC_COMPILER)
7045 Iaux1
.v
= (vector
signed int){4, 10, 10, 4};
7046 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
7047 Iaux1
.v
= (vector
signed int)(4, 10, 10, 4);
7050 I1
= vec_all_gt( Iaux1
.v
, Iaux2
.v
);
7052 for ( i
=0; i
< 4; i
++ )
7054 Iaux
= Iaux
&& (Iaux1
.e
[i
]>Iaux2
.e
[i
]);
7056 if (I1
!= Iaux
) err
++;
7060 I1
= vec_all_gt( Iaux1
.v
, Iaux2
.v
);
7062 for ( i
=0; i
< 4; i
++ )
7064 Iaux
= Iaux
&& (Iaux1
.e
[i
]>Iaux2
.e
[i
]);
7066 if (I1
!= Iaux
) err
++;
7069 printf("Function vec_all_gt [type int] ===> Error\n");
7071 printf("Function vec_all_gt [type int] ===> OK\n");
7073 #if defined TEST_FLOATS
7075 # if defined (GCC_COMPILER)
7076 Faux1
.v
= (vector
float){100000000000.0, 12.0, 12.0, 1234567890.0};
7077 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
7078 Faux1
.v
= (vector
float)(100000000000.0, 12.0, 12.0, 1234567890.0);
7081 I1
= vec_all_gt( Faux1
.v
, Faux2
.v
);
7083 for ( i
=0; i
< 4; i
++ )
7085 Iaux
= Iaux
&& (Faux1
.e
[i
]>Faux2
.e
[i
]);
7087 if (I1
!= Iaux
) err
++;
7091 I1
= vec_all_gt( Faux1
.v
, Faux2
.v
);
7093 for ( i
=0; i
< 4; i
++ )
7095 Iaux
= Iaux
&& (Faux1
.e
[i
]>Faux2
.e
[i
]);
7097 if (I1
!= Iaux
) err
++;
7100 printf("Function vec_all_gt [type float] ===> Error\n");
7102 printf("Function vec_all_gt [type float] ===> OK\n");
7105 #if defined TEST_FLOATS
7106 /* Function vec_all_in */
7107 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
7111 I1
= vec_all_in( Faux1
.v
, Faux2
.v
);
7113 for ( i
=0; i
< 4; i
++ )
7115 Iaux
= Iaux
&& ((Faux1
.e
[i
]<=Faux2
.e
[i
]) && (Faux1
.e
[i
]>=-Faux2
.e
[i
]));
7117 if (I1
!= Iaux
) err
++;
7120 # if defined (GCC_COMPILER)
7121 Faux2
.v
= (vector
float){100000000000.0, 1.0, 1.0, 1234567890.0};
7122 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
7123 Faux2
.v
= (vector
float)(100000000000.0, 1.0, 1.0, 1234567890.0);
7125 I1
= vec_all_in( Faux1
.v
, Faux2
.v
);
7127 for ( i
=0; i
< 4; i
++ )
7129 Iaux
= Iaux
&& ((Faux1
.e
[i
]<=Faux2
.e
[i
]) && (Faux1
.e
[i
]>=-Faux2
.e
[i
]));
7131 if (I1
!= Iaux
) err
++;
7134 printf("Function vec_all_in [type float] ===> Error\n");
7136 printf("Function vec_all_in [type float] ===> OK\n");
7139 /* Function vec_all_le */
7140 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
7144 I1
= vec_all_le( UCaux1
.v
, UCaux2
.v
);
7146 for ( i
=0; i
< 16; i
++ )
7148 Iaux
= Iaux
&& (UCaux1
.e
[i
]<=UCaux2
.e
[i
]);
7150 if (I1
!= Iaux
) err
++;
7154 I1
= vec_all_le( UCaux1
.v
, UCaux2
.v
);
7156 for ( i
=0; i
< 16; i
++ )
7158 Iaux
= Iaux
&& (UCaux1
.e
[i
]<=UCaux2
.e
[i
]);
7160 if (I1
!= Iaux
) err
++;
7163 printf("Function vec_all_le [type unsigned char] ===> Error\n");
7165 printf("Function vec_all_le [type unsigned char] ===> OK\n");
7170 I1
= vec_all_le( Caux1
.v
, Caux2
.v
);
7172 for ( i
=0; i
< 16; i
++ )
7174 Iaux
= Iaux
&& (Caux1
.e
[i
]<=Caux2
.e
[i
]);
7176 if (I1
!= Iaux
) err
++;
7180 I1
= vec_all_le( Caux1
.v
, Caux2
.v
);
7182 for ( i
=0; i
< 16; i
++ )
7184 Iaux
= Iaux
&& (Caux1
.e
[i
]<=Caux2
.e
[i
]);
7186 if (I1
!= Iaux
) err
++;
7189 printf("Function vec_all_le [type char] ===> Error\n");
7191 printf("Function vec_all_le [type char] ===> OK\n");
7196 I1
= vec_all_le( USaux1
.v
, USaux2
.v
);
7198 for ( i
=0; i
< 8; i
++ )
7200 Iaux
= Iaux
&& (USaux1
.e
[i
]<=USaux2
.e
[i
]);
7202 if (I1
!= Iaux
) err
++;
7206 I1
= vec_all_le( USaux1
.v
, USaux2
.v
);
7208 for ( i
=0; i
< 8; i
++ )
7210 Iaux
= Iaux
&& (USaux1
.e
[i
]<=USaux2
.e
[i
]);
7212 if (I1
!= Iaux
) err
++;
7215 printf("Function vec_all_le [type unsigned short] ===> Error\n");
7217 printf("Function vec_all_le [type unsigned short] ===> OK\n");
7222 I1
= vec_all_le( Saux1
.v
, Saux2
.v
);
7224 for ( i
=0; i
< 8; i
++ )
7226 Iaux
= Iaux
&& (Saux1
.e
[i
]<=Saux2
.e
[i
]);
7228 if (I1
!= Iaux
) err
++;
7232 I1
= vec_all_le( Saux1
.v
, Saux2
.v
);
7234 for ( i
=0; i
< 8; i
++ )
7236 Iaux
= Iaux
&& (Saux1
.e
[i
]<=Saux2
.e
[i
]);
7238 if (I1
!= Iaux
) err
++;
7241 printf("Function vec_all_le [type short] ===> Error\n");
7243 printf("Function vec_all_le [type short] ===> OK\n");
7248 I1
= vec_all_le( UIaux1
.v
, UIaux2
.v
);
7250 for ( i
=0; i
< 4; i
++ )
7252 Iaux
= Iaux
&& (UIaux1
.e
[i
]<=UIaux2
.e
[i
]);
7254 if (I1
!= Iaux
) err
++;
7258 I1
= vec_all_le( UIaux1
.v
, UIaux2
.v
);
7260 for ( i
=0; i
< 4; i
++ )
7262 Iaux
= Iaux
&& (UIaux1
.e
[i
]<=UIaux2
.e
[i
]);
7264 if (I1
!= Iaux
) err
++;
7267 printf("Function vec_all_le [type unsigned int] ===> Error\n");
7269 printf("Function vec_all_le [type unsigned int] ===> OK\n");
7274 I1
= vec_all_le( Iaux1
.v
, Iaux2
.v
);
7276 for ( i
=0; i
< 4; i
++ )
7278 Iaux
= Iaux
&& (Iaux1
.e
[i
]<=Iaux2
.e
[i
]);
7280 if (I1
!= Iaux
) err
++;
7284 I1
= vec_all_le( Iaux1
.v
, Iaux2
.v
);
7286 for ( i
=0; i
< 4; i
++ )
7288 Iaux
= Iaux
&& (Iaux1
.e
[i
]<=Iaux2
.e
[i
]);
7290 if (I1
!= Iaux
) err
++;
7293 printf("Function vec_all_le [type int] ===> Error\n");
7295 printf("Function vec_all_le [type int] ===> OK\n");
7297 #if defined TEST_FLOATS
7301 I1
= vec_all_le( Faux1
.v
, Faux2
.v
);
7303 for ( i
=0; i
< 4; i
++ )
7305 Iaux
= Iaux
&& (Faux1
.e
[i
]<=Faux2
.e
[i
]);
7307 if (I1
!= Iaux
) err
++;
7311 I1
= vec_all_le( Faux1
.v
, Faux2
.v
);
7313 for ( i
=0; i
< 4; i
++ )
7315 Iaux
= Iaux
&& (Faux1
.e
[i
]<=Faux2
.e
[i
]);
7317 if (I1
!= Iaux
) err
++;
7320 printf("Function vec_all_le [type float] ===> Error\n");
7322 printf("Function vec_all_le [type float] ===> OK\n");
7325 /* Function vec_all_lt */
7326 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
7329 # if defined (GCC_COMPILER)
7330 UCaux2
.v
= (vector
unsigned char){248, 249, 250, 251, 252, 253, 254, 255, 2, 3, 4, 5, 6, 7, 8, 9};
7331 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
7332 UCaux2
.v
= (vector
unsigned char)(248, 249, 250, 251, 252, 253, 254, 255, 2, 3, 4, 5, 6, 7, 8, 9);
7334 I1
= vec_all_lt( UCaux1
.v
, UCaux2
.v
);
7336 for ( i
=0; i
< 16; i
++ )
7338 Iaux
= Iaux
&& (UCaux1
.e
[i
]<UCaux2
.e
[i
]);
7340 if (I1
!= Iaux
) err
++;
7344 I1
= vec_all_lt( UCaux1
.v
, UCaux2
.v
);
7346 for ( i
=0; i
< 16; i
++ )
7348 Iaux
= Iaux
&& (UCaux1
.e
[i
]<UCaux2
.e
[i
]);
7350 if (I1
!= Iaux
) err
++;
7353 printf("Function vec_all_lt [type unsigned char] ===> Error\n");
7355 printf("Function vec_all_lt [type unsigned char] ===> OK\n");
7359 # if defined (GCC_COMPILER)
7360 Caux2
.v
= (vector
signed char){9, 8, 7, 6, 5, 4, 3, 2, 3, 4, 5, 6, 7, 8, 9, 10};
7361 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
7362 Caux2
.v
= (vector
signed char)(9, 8, 7, 6, 5, 4, 3, 2, 3, 4, 5, 6, 7, 8, 9, 10);
7364 I1
= vec_all_lt( Caux1
.v
, Caux2
.v
);
7366 for ( i
=0; i
< 16; i
++ )
7368 Iaux
= Iaux
&& (Caux1
.e
[i
]<Caux2
.e
[i
]);
7370 if (I1
!= Iaux
) err
++;
7374 I1
= vec_all_lt( Caux1
.v
, Caux2
.v
);
7376 for ( i
=0; i
< 16; i
++ )
7378 Iaux
= Iaux
&& (Caux1
.e
[i
]<Caux2
.e
[i
]);
7380 if (I1
!= Iaux
) err
++;
7383 printf("Function vec_all_lt [type char] ===> Error\n");
7385 printf("Function vec_all_lt [type char] ===> OK\n");
7389 # if defined (GCC_COMPILER)
7390 USaux2
.v
= (vector
unsigned short){65532, 65533, 65534, 65535, 2, 3, 4, 5};
7391 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
7392 USaux2
.v
= (vector
unsigned short)(65532, 65533, 65534, 65535, 2, 3, 4, 5);
7394 I1
= vec_all_lt( USaux1
.v
, USaux2
.v
);
7396 for ( i
=0; i
< 8; i
++ )
7398 Iaux
= Iaux
&& (USaux1
.e
[i
]<USaux2
.e
[i
]);
7400 if (I1
!= Iaux
) err
++;
7404 I1
= vec_all_lt( USaux1
.v
, USaux2
.v
);
7406 for ( i
=0; i
< 8; i
++ )
7408 Iaux
= Iaux
&& (USaux1
.e
[i
]<USaux2
.e
[i
]);
7410 if (I1
!= Iaux
) err
++;
7413 printf("Function vec_all_lt [type unsigned short] ===> Error\n");
7415 printf("Function vec_all_lt [type unsigned short] ===> OK\n");
7419 # if defined (GCC_COMPILER)
7420 Saux2
.v
= (vector
signed short){4, 3, 2, 1, 2, 3, 4, 5};
7421 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
7422 Saux2
.v
= (vector
signed short)(4, 3, 2, 1, 2, 3, 4, 5);
7424 I1
= vec_all_lt( Saux1
.v
, Saux2
.v
);
7426 for ( i
=0; i
< 8; i
++ )
7428 Iaux
= Iaux
&& (Saux1
.e
[i
]<Saux2
.e
[i
]);
7430 if (I1
!= Iaux
) err
++;
7434 I1
= vec_all_lt( Saux1
.v
, Saux2
.v
);
7436 for ( i
=0; i
< 8; i
++ )
7438 Iaux
= Iaux
&& (Saux1
.e
[i
]<Saux2
.e
[i
]);
7440 if (I1
!= Iaux
) err
++;
7443 printf("Function vec_all_lt [type short] ===> Error\n");
7445 printf("Function vec_all_lt [type short] ===> OK\n");
7449 # if defined (GCC_COMPILER)
7450 UIaux2
.v
= (vector
unsigned int){3, 2, 3, 2};
7451 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
7452 UIaux2
.v
= (vector
unsigned int)(3, 2, 3, 2);
7454 I1
= vec_all_lt( UIaux1
.v
, UIaux2
.v
);
7456 for ( i
=0; i
< 4; i
++ )
7458 Iaux
= Iaux
&& (UIaux1
.e
[i
]<UIaux2
.e
[i
]);
7460 if (I1
!= Iaux
) err
++;
7464 I1
= vec_all_lt( UIaux1
.v
, UIaux2
.v
);
7466 for ( i
=0; i
< 4; i
++ )
7468 Iaux
= Iaux
&& (UIaux1
.e
[i
]<UIaux2
.e
[i
]);
7470 if (I1
!= Iaux
) err
++;
7473 printf("Function vec_all_lt [type unsigned int] ===> Error\n");
7475 printf("Function vec_all_lt [type unsigned int] ===> OK\n");
7479 # if defined (GCC_COMPILER)
7480 Iaux2
.v
= (vector
signed int){4, 10, 10, 4};
7481 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
7482 Iaux2
.v
= (vector
signed int)(4, 10, 10, 4);
7484 I1
= vec_all_lt( Iaux1
.v
, Iaux2
.v
);
7486 for ( i
=0; i
< 4; i
++ )
7488 Iaux
= Iaux
&& (Iaux1
.e
[i
]<Iaux2
.e
[i
]);
7490 if (I1
!= Iaux
) err
++;
7494 I1
= vec_all_lt( Iaux1
.v
, Iaux2
.v
);
7496 for ( i
=0; i
< 4; i
++ )
7498 Iaux
= Iaux
&& (Iaux1
.e
[i
]<Iaux2
.e
[i
]);
7500 if (I1
!= Iaux
) err
++;
7503 printf("Function vec_all_lt [type int] ===> Error\n");
7505 printf("Function vec_all_lt [type int] ===> OK\n");
7507 #if defined TEST_FLOATS
7510 # if defined (GCC_COMPILER)
7511 Faux2
.v
= (vector
float){100000000000.0, 12.0, 12.0, 1234567890.0};
7512 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
7513 Faux2
.v
= (vector
float)(100000000000.0, 12.0, 12.0, 1234567890.0);
7515 I1
= vec_all_lt( Faux1
.v
, Faux2
.v
);
7517 for ( i
=0; i
< 4; i
++ )
7519 Iaux
= Iaux
&& (Faux1
.e
[i
]<Faux2
.e
[i
]);
7521 if (I1
!= Iaux
) err
++;
7525 I1
= vec_all_lt( Faux1
.v
, Faux2
.v
);
7527 for ( i
=0; i
< 4; i
++ )
7529 Iaux
= Iaux
&& (Faux1
.e
[i
]<Faux2
.e
[i
]);
7531 if (I1
!= Iaux
) err
++;
7534 printf("Function vec_all_lt [type float] ===> Error\n");
7536 printf("Function vec_all_lt [type float] ===> OK\n");
7539 #if defined TEST_FLOATS
7540 /* Function vec_all_nan */
7541 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
7543 # if defined (GCC_COMPILER)
7544 Faux1
.v
= (vector
float){NAN
, NAN
, NAN
, NAN
};
7545 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
7546 Faux1
.v
= (vector
float)(NAN
, NAN
, NAN
, NAN
);
7548 I1
= vec_all_nan( Faux1
.v
);
7550 for ( i
=0; i
< 4; i
++ )
7552 Iaux
= Iaux
&& (isnan(Faux1
.e
[i
]));
7554 if (I1
!= Iaux
) err
++;
7557 I1
= vec_all_nan( Faux1
.v
);
7559 for ( i
=0; i
< 4; i
++ )
7561 Iaux
= Iaux
&& (isnan(Faux1
.e
[i
]));
7563 if (I1
!= Iaux
) err
++;
7566 printf("Function vec_all_nan [type float] ===> Error\n");
7568 printf("Function vec_all_nan [type float] ===> OK\n");
7571 /* Function vec_all_ne */
7572 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
7574 # if defined (GCC_COMPILER)
7575 Caux1
.v
= (vector
signed char){-8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7};
7576 Caux2
.v
= (vector
signed char){-7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, -8};
7577 # elif defined (MAC_COMPILER) || defined (XLC_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);
7581 b
= vec_all_ne (Caux1
.v
, Caux2
.v
);
7583 for (i
=0; i
<16; i
++)
7584 bAux
= bAux
&& (Caux1
.e
[i
]!=Caux2
.e
[i
]);
7585 if (bAux
!= b
) err
= 1;
7587 # if defined (GCC_COMPILER)
7588 Caux1
.v
= (vector
signed char){-8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7};
7589 Caux2
.v
= (vector
signed char){-7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 4, 6, 7, -8};
7590 # elif defined (MAC_COMPILER) || defined (XLC_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);
7594 b
= vec_all_ne (Caux1
.v
, Caux2
.v
);
7596 for (i
=0; i
<16; i
++)
7597 bAux
= bAux
&& (Caux1
.e
[i
]!=Caux2
.e
[i
]);
7598 if (bAux
!=b
) err
= 1;
7600 # if defined (GCC_COMPILER)
7601 Caux1
.v
= (vector
signed char){-8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7};
7602 Caux2
.v
= (vector
signed char){-7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 4, 6, 7, -8};
7603 # elif defined (MAC_COMPILER) || defined (XLC_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);
7607 b
= vec_all_ne (Caux1
.v
, Caux2
.v
);
7609 for (i
=0; i
<16; i
++)
7610 bAux
= bAux
&& (Caux1
.e
[i
] != Caux2
.e
[i
]);
7611 if (bAux
!= b
) err
= 1;
7614 printf("Function vec_all_ne [type char] ===> Error\n");
7616 printf("Function vec_all_ne [type char] ===> OK\n");
7620 # if defined (GCC_COMPILER)
7621 UCaux1
.v
= (vector
unsigned char){200, 201, 206, 205, 204, 203, 202, 201, 200, 101, 102, 13, 14, 15, 16, 17};
7622 UCaux2
.v
= (vector
unsigned char){201, 206, 205, 204, 203, 202, 201, 200, 101, 102, 13, 14, 15, 16, 17,200};
7623 # elif defined (MAC_COMPILER) || defined (XLC_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);
7628 b
= vec_all_ne (UCaux1
.v
, UCaux2
.v
);
7630 for (i
=0; i
<16; i
++)
7631 bAux
= bAux
&& (UCaux1
.e
[i
]!=UCaux2
.e
[i
]);
7632 if (bAux
!=b
) err
= 1;
7634 # if defined (GCC_COMPILER)
7635 UCaux1
.v
= (vector
unsigned char){200, 201, 206, 205, 204, 203, 202, 201, 200, 101, 102, 13, 14, 15, 16, 17};
7636 UCaux2
.v
= (vector
unsigned char){201, 206, 205, 204, 203, 202, 201, 200, 101, 102, 13, 14, 15, 16, 17,200};
7637 # elif defined (MAC_COMPILER) || defined (XLC_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);
7641 b
= vec_all_ne (UCaux1
.v
, UCaux2
.v
);
7643 for (i
=0; i
<16; i
++)
7644 bAux
= bAux
&& (UCaux1
.e
[i
] != UCaux2
.e
[i
]);
7645 if (bAux
!= b
) err
= 1;
7647 # if defined (GCC_COMPILER)
7648 UCaux1
.v
= (vector
unsigned char){200, 201, 206, 205, 204, 203, 202, 201, 200, 101, 102, 13, 14, 15, 16, 17};
7649 UCaux2
.v
= (vector
unsigned char){201, 206, 205, 204, 203, 202, 201, 200, 101, 102, 13, 14, 15, 16, 17,200};
7650 # elif defined (MAC_COMPILER) || defined (XLC_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);
7654 b
= vec_all_ne (UCaux1
.v
, UCaux2
.v
);
7656 for (i
=0; i
<16; i
++)
7657 bAux
= bAux
&& (UCaux1
.e
[i
] != UCaux2
.e
[i
]);
7658 if (bAux
!= b
) err
= 1;
7661 printf("Function vec_all_ne [type unsigned char] ===> Error\n");
7663 printf("Function vec_all_ne [type unsigned char] ===> OK\n");
7667 # if defined (GCC_COMPILER)
7668 Saux1
.v
= (vector
signed short){-3800, -3700, -3600, -3500, 0, 3300, 3200, 3100};
7669 Saux2
.v
= (vector
signed short){-3700, -3600, -3500, 0, 3300, 3200, 3100,-3800};
7670 # elif defined (MAC_COMPILER) || defined (XLC_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);
7674 b
= vec_all_ne (Saux1
.v
, Saux2
.v
);
7677 bAux
= bAux
&& (Saux1
.e
[i
] != Saux2
.e
[i
]);
7678 if (bAux
!= b
) err
= 1;
7680 # if defined (GCC_COMPILER)
7681 Saux1
.v
= (vector
signed short){-3800, -3700, -3600, -3500, 0, 3300, 3200, 3100};
7682 Saux2
.v
= (vector
signed short){-3700, -3600, -3500, 0, 3300, 3200, 3100,-3800};
7683 # elif defined (MAC_COMPILER) || defined (XLC_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);
7687 b
= vec_all_ne (Saux1
.v
, Saux2
.v
);
7690 bAux
= bAux
&& (Saux1
.e
[i
] != Saux2
.e
[i
]);
7691 if (bAux
!= b
) err
= 1;
7693 # if defined (GCC_COMPILER)
7694 Saux1
.v
= (vector
signed short){-3800, -3700, -3600, -3500, 0, 3300, 3200, 3100};
7695 Saux2
.v
= (vector
signed short){-3700, -3600, -3500, 0, 3300, 3200, 3100,-3800};
7696 # elif defined (MAC_COMPILER) || defined (XLC_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);
7700 b
= vec_all_ne (Saux1
.v
, Saux2
.v
);
7703 bAux
= bAux
&& (Saux1
.e
[i
] != Saux2
.e
[i
]);
7704 if (bAux
!= b
) err
= 1;
7707 printf("Function vec_all_ne [type short] ===> Error\n");
7709 printf("Function vec_all_ne [type short] ===> OK\n");
7713 # if defined (GCC_COMPILER)
7714 USaux1
.v
= (vector
unsigned short){48000, 47000, 46000, 45000, 0, 3300, 3200, 3100};
7715 USaux2
.v
= (vector
unsigned short){47000, 46000, 45000, 0, 3300, 3200, 3100,48000};
7716 # elif defined (MAC_COMPILER) || defined (XLC_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);
7720 b
= vec_all_ne (USaux1
.v
, USaux2
.v
);
7723 bAux
= bAux
&& (USaux1
.e
[i
] != USaux2
.e
[i
]);
7724 if (bAux
!= b
) err
= 1;
7726 # if defined (GCC_COMPILER)
7727 USaux1
.v
= (vector
unsigned short){48000, 47000, 46000, 45000, 0, 3300, 3200, 3100};
7728 USaux2
.v
= (vector
unsigned short){47000, 46000, 45000, 0, 3300, 3200, 3100,48000};
7729 # elif defined (MAC_COMPILER) || defined (XLC_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);
7733 b
= vec_all_ne (USaux1
.v
, USaux2
.v
);
7736 bAux
= bAux
&& (USaux1
.e
[i
] != USaux2
.e
[i
]);
7737 if (bAux
!= b
) err
= 1;
7739 # if defined (GCC_COMPILER)
7740 USaux1
.v
= (vector
unsigned short){48000, 47000, 46000, 45000, 0, 3300, 3200, 3100};
7741 USaux2
.v
= (vector
unsigned short){47000, 46000, 45000, 0, 3300, 3200, 3100,48000};
7742 # elif defined (MAC_COMPILER) || defined (XLC_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);
7746 b
= vec_all_ne (USaux1
.v
, USaux2
.v
);
7749 bAux
= bAux
&& (USaux1
.e
[i
] != USaux2
.e
[i
]);
7750 if (bAux
!= b
) err
= 1;
7753 printf("Function vec_all_ne [type unsigned short] ===> Error\n");
7755 printf("Function vec_all_ne [type unsigned short] ===> OK\n");
7759 # if defined (GCC_COMPILER)
7760 Iaux1
.v
= (vector
signed int){-1003800, -1003700, 0, 1003300};
7761 Iaux2
.v
= (vector
signed int){-1003700, 0, 1003300,-1003800};
7762 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
7763 Iaux1
.v
= (vector
signed int)(-1003800, -1003700, 0, 1003300);
7764 Iaux2
.v
= (vector
signed int)(-1003700, 0, 1003300,-1003800);
7766 b
= vec_all_ne (Iaux1
.v
, Iaux2
.v
);
7769 bAux
= bAux
&& (Iaux1
.e
[i
] != Iaux2
.e
[i
]);
7770 if (bAux
!= b
) err
= 1;
7772 # if defined (GCC_COMPILER)
7773 Iaux1
.v
= (vector
signed int){-1003800, -1003700, 0, 1003300};
7774 Iaux2
.v
= (vector
signed int){-1003700, 0, 1003300,-1003800};
7775 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
7776 Iaux1
.v
= (vector
signed int)(-1003800, -1003700, 0, 1003300);
7777 Iaux2
.v
= (vector
signed int)(-1003700, 0, 1003300,-1003800);
7779 b
= vec_all_ne (Iaux1
.v
, Iaux2
.v
);
7782 bAux
= bAux
&& (Iaux1
.e
[i
] != Iaux2
.e
[i
]);
7783 if (bAux
!= b
) err
= 1;
7785 # if defined (GCC_COMPILER)
7786 Iaux1
.v
= (vector
signed int){-1003800, -1003700, 0, 1003300};
7787 Iaux2
.v
= (vector
signed int){-1003700, 0, 1003300,-1003800};
7788 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
7789 Iaux1
.v
= (vector
signed int)(-1003800, -1003700, 0, 1003300);
7790 Iaux2
.v
= (vector
signed int)(-1003700, 0, 1003300,-1003800);
7792 b
= vec_all_ne (Iaux1
.v
, Iaux2
.v
);
7795 bAux
= bAux
&& (Iaux1
.e
[i
] != Iaux2
.e
[i
]);
7796 if (bAux
!= b
) err
= 1;
7799 printf("Function vec_all_ne [type int] ===> Error\n");
7801 printf("Function vec_all_ne [type int] ===> OK\n");
7805 # if defined (GCC_COMPILER)
7806 UIaux1
.v
= (vector
unsigned int){0xFFFFF000, 12345678, 0, 1};
7807 UIaux2
.v
= (vector
unsigned int){ 12345678, 0, 1,0xFFFFF000};
7808 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
7809 UIaux1
.v
= (vector
unsigned int)(0xFFFFF000, 12345678, 0, 1);
7810 UIaux2
.v
= (vector
unsigned int)( 12345678, 0, 1,0xFFFFF000);
7812 b
= vec_all_ne (UIaux1
.v
, UIaux2
.v
);
7815 bAux
= bAux
&& (UIaux1
.e
[i
] != UIaux2
.e
[i
]);
7816 if (bAux
!= b
) err
= 1;
7818 # if defined (GCC_COMPILER)
7819 UIaux1
.v
= (vector
unsigned int){0xFFFFF000, 12345678, 0, 1};
7820 UIaux2
.v
= (vector
unsigned int){ 12345678, 0, 1,0xFFFFF000};
7821 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
7822 UIaux1
.v
= (vector
unsigned int)(0xFFFFF000, 12345678, 0, 1);
7823 UIaux2
.v
= (vector
unsigned int)( 12345678, 0, 1,0xFFFFF000);
7825 b
= vec_all_ne (UIaux1
.v
, UIaux2
.v
);
7828 bAux
= bAux
&& (UIaux1
.e
[i
] != UIaux2
.e
[i
]);
7829 if (bAux
!= b
) err
= 1;
7831 # if defined (GCC_COMPILER)
7832 UIaux1
.v
= (vector
unsigned int){0xFFFFF000, 12345678, 0, 1};
7833 UIaux2
.v
= (vector
unsigned int){ 12345678, 0, 1,0xFFFFF000};
7834 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
7835 UIaux1
.v
= (vector
unsigned int)(0xFFFFF000, 12345678, 0, 1);
7836 UIaux2
.v
= (vector
unsigned int)( 12345678, 0, 1,0xFFFFF000);
7838 b
= vec_all_ne (UIaux1
.v
, UIaux2
.v
);
7841 bAux
= bAux
&& (UIaux1
.e
[i
] != UIaux2
.e
[i
]);
7842 if (bAux
!= b
) err
= 1;
7845 printf("Function vec_all_ne [type unsigned int] ===> Error\n");
7847 printf("Function vec_all_ne [type unsigned int] ===> OK\n");
7849 #if defined TEST_FLOATS
7851 # if defined (GCC_COMPILER)
7852 Faux1
.v
= (vector
float) {-1.5, 1.0, 0.5, -3.999};
7853 Faux2
.v
= (vector
float) { 1.0, 0.5, -3.999, -1.5};
7854 # elif defined (MAC_COMPILER) || defined (XLC_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);
7858 b
= vec_all_ne (Faux1
.v
, Faux2
.v
);
7861 bAux
= bAux
&& (Faux1
.e
[i
] != Faux2
.e
[i
]);
7862 if (bAux
!= b
) err
= 1;
7864 # if defined (GCC_COMPILER)
7865 Faux1
.v
= (vector
float) {-1.5, 1.0, 0.5, -3.999};
7866 Faux2
.v
= (vector
float) { 1.0, 0.5, -3.999, -1.5};
7867 # elif defined (MAC_COMPILER) || defined (XLC_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);
7871 b
= vec_all_ne (Faux1
.v
, Faux2
.v
);
7874 bAux
= bAux
&& (Faux1
.e
[i
] != Faux2
.e
[i
]);
7875 if (bAux
!= b
) err
= 1;
7877 # if defined (GCC_COMPILER)
7878 Faux1
.v
= (vector
float) {-1.5, 1.0, 0.5, -3.999};
7879 Faux2
.v
= (vector
float) { 1.0, 0.5, -3.999, -1.5};
7880 # elif defined (MAC_COMPILER) || defined (XLC_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);
7884 b
= vec_all_ne (Faux1
.v
, Faux2
.v
);
7887 bAux
= bAux
&& (Faux1
.e
[i
] != Faux2
.e
[i
]);
7888 if (bAux
!= b
) err
= 1;
7891 printf("Function vec_all_ne [type float] ===> Error\n");
7893 printf("Function vec_all_ne [type float] ===> OK\n");
7896 #if defined TEST_FLOATS
7897 /* Function vec_all_nge */
7898 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
7900 # if defined (GCC_COMPILER)
7901 Faux1
.v
= (vector
float) {-1.5, 1.0, 0.5, -3.999};
7902 Faux2
.v
= (vector
float) { 0.0, 3.5, 0.55, -1.5};
7903 # elif defined (MAC_COMPILER) || defined (XLC_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);
7907 b
= vec_all_nge (Faux1
.v
, Faux2
.v
);
7910 bAux
= bAux
&& (isnan(Faux1
.e
[i
]) || isnan(Faux2
.e
[i
]) ||
7911 (Faux1
.e
[i
] < Faux2
.e
[i
]));
7912 if (bAux
!= b
) err
= 1;
7914 # if defined (GCC_COMPILER)
7915 Faux1
.v
= (vector
float) {-1.5, 1.0, 0.5, -3.999};
7916 Faux2
.v
= (vector
float) { 0.0, 3.5, 0.55, -1.5};
7917 # elif defined (MAC_COMPILER) || defined (XLC_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);
7921 b
= vec_all_nge (Faux1
.v
, Faux2
.v
);
7924 bAux
= bAux
&& (isnan(Faux1
.e
[i
]) || isnan(Faux2
.e
[i
]) ||
7925 (Faux1
.e
[i
] < Faux2
.e
[i
]));
7926 if (bAux
!= b
) err
= 1;
7928 # if defined (GCC_COMPILER)
7929 Faux1
.v
= (vector
float) {-1.5, 1.0, 0.5, -3.999};
7930 Faux2
.v
= (vector
float) { 0.0, 3.5, 0.55, -1.5};
7931 # elif defined (MAC_COMPILER) || defined (XLC_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);
7935 b
= vec_all_nge (Faux1
.v
, Faux2
.v
);
7938 bAux
= bAux
&& (isnan(Faux1
.e
[i
]) || isnan(Faux2
.e
[i
]) ||
7939 (Faux1
.e
[i
] < Faux2
.e
[i
]));
7940 if (bAux
!= b
) err
= 1;
7942 # if defined (GCC_COMPILER)
7943 Faux1
.v
= (vector
float) {-1.5, 1.0, 0.5, -3.999};
7944 Faux2
.v
= (vector
float) { 0.0, 3.5, 0.55, -1.5};
7945 # elif defined (MAC_COMPILER) || defined (XLC_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);
7949 b
= vec_all_nge (Faux1
.v
, Faux2
.v
);
7952 bAux
= bAux
&& (isnan(Faux1
.e
[i
]) || isnan(Faux2
.e
[i
]) ||
7953 (Faux1
.e
[i
] < Faux2
.e
[i
]));
7954 if (bAux
!= b
) err
= 1;
7957 printf("Function vec_all_nge [type float] ===> Error\n");
7959 printf("Function vec_all_nge [type float] ===> OK\n");
7962 #if defined TEST_FLOATS
7963 /* Function vec_all_ngt */
7964 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
7966 # if defined (GCC_COMPILER)
7967 Faux1
.v
= (vector
float) {-1.5, 1.0, 0.5, -3.999};
7968 Faux2
.v
= (vector
float) { 0.0, 3.5, 0.55, -1.5};
7969 # elif defined (MAC_COMPILER) || defined (XLC_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);
7973 b
= vec_all_ngt (Faux1
.v
, Faux2
.v
);
7977 (isnan(Faux1
.e
[i
]) || isnan(Faux2
.e
[i
]) || !(Faux1
.e
[i
] > Faux2
.e
[i
]));
7978 if (bAux
!= b
) err
= 1;
7980 # if defined (GCC_COMPILER)
7981 Faux1
.v
= (vector
float) {-1.5, 1.0, 0.5, -3.999};
7982 Faux2
.v
= (vector
float) { 0.0, 3.5, 0.55, -1.5};
7983 # elif defined (MAC_COMPILER) || defined (XLC_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);
7987 b
= vec_all_ngt (Faux1
.v
, Faux2
.v
);
7991 (isnan(Faux1
.e
[i
]) || isnan(Faux2
.e
[i
]) || !(Faux1
.e
[i
] > Faux2
.e
[i
]));
7992 if (bAux
!= b
) err
= 1;
7994 # if defined (GCC_COMPILER)
7995 Faux1
.v
= (vector
float) {-1.5, 1.0, 0.5, -3.999};
7996 Faux2
.v
= (vector
float) { 0.0, 3.5, 0.55, -1.5};
7997 # elif defined (MAC_COMPILER) || defined (XLC_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);
8001 b
= vec_all_ngt (Faux1
.v
, Faux2
.v
);
8005 (isnan(Faux1
.e
[i
]) || isnan(Faux2
.e
[i
]) || !(Faux1
.e
[i
] > Faux2
.e
[i
]));
8006 if (bAux
!=b
) err
= 1;
8008 # if defined (GCC_COMPILER)
8009 Faux1
.v
= (vector
float) {-1.5, 1.0, 0.5, -3.999};
8010 Faux2
.v
= (vector
float) { 0.0, 3.5, 0.55, -1.5};
8011 # elif defined (MAC_COMPILER) || defined (XLC_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);
8015 b
= vec_all_ngt (Faux1
.v
, Faux2
.v
);
8019 (isnan(Faux1
.e
[i
]) || isnan(Faux2
.e
[i
]) || !(Faux1
.e
[i
] > Faux2
.e
[i
]));
8020 if (bAux
!= b
) err
= 1;
8023 printf("Function vec_all_ngt [type float] ===> Error\n");
8025 printf("Function vec_all_ngt [type float] ===> OK\n");
8028 #if defined TEST_FLOATS
8029 /* Function vec_all_nle */
8030 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
8032 # if defined (GCC_COMPILER)
8033 Faux1
.v
= (vector
float) { 0.0, 3.5, 0.55, -1.5};
8034 Faux2
.v
= (vector
float) {-1.5, 1.0, 0.5, -3.999};
8035 # elif defined (MAC_COMPILER) || defined (XLC_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);
8039 b
= vec_all_nle (Faux1
.v
, Faux2
.v
);
8043 (isnan(Faux1
.e
[i
]) || isnan(Faux2
.e
[i
]) || !(Faux1
.e
[i
] <= Faux2
.e
[i
]));
8044 if (bAux
!= b
) err
= 1;
8046 # if defined (GCC_COMPILER)
8047 Faux1
.v
= (vector
float) { 0.0, 3.5, 0.55, -1.5};
8048 Faux2
.v
= (vector
float) {-1.5, 1.0, 0.5, -3.999};
8049 # elif defined (MAC_COMPILER) || defined (XLC_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);
8053 b
= vec_all_nle (Faux1
.v
, Faux2
.v
);
8057 (isnan(Faux1
.e
[i
]) || isnan(Faux2
.e
[i
]) || !(Faux1
.e
[i
] <= Faux2
.e
[i
]));
8058 if (bAux
!= b
) err
= 1;
8060 # if defined (GCC_COMPILER)
8061 Faux1
.v
= (vector
float) { 0.0, 3.5, 0.55, -1.5};
8062 Faux2
.v
= (vector
float) {-1.5, 1.0, 0.5, -3.999};
8063 # elif defined (MAC_COMPILER) || defined (XLC_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);
8067 b
= vec_all_nle (Faux1
.v
, Faux2
.v
);
8071 (isnan(Faux1
.e
[i
]) || isnan(Faux2
.e
[i
]) || !(Faux1
.e
[i
] <=Faux2
.e
[i
]));
8072 if (bAux
!= b
) err
= 1;
8074 # if defined (GCC_COMPILER)
8075 Faux1
.v
= (vector
float) { 0.0, 3.5, 0.55, -1.5};
8076 Faux2
.v
= (vector
float) {-1.5, 1.0, NAN
, -3.999};
8077 # elif defined (MAC_COMPILER) || defined (XLC_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);
8081 b
= vec_all_nle (Faux1
.v
, Faux2
.v
);
8085 (isnan(Faux1
.e
[i
]) || isnan(Faux2
.e
[i
]) || !(Faux1
.e
[i
] <= Faux2
.e
[i
]));
8086 if (bAux
!= b
) err
= 1;
8089 printf("Function vec_all_nle [type float] ===> Error\n");
8091 printf("Function vec_all_nle [type float] ===> OK\n");
8095 #if defined TEST_FLOATS
8096 /* Function vec_all_nlt */
8097 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
8099 # if defined (GCC_COMPILER)
8100 Faux1
.v
= (vector
float) { 0.0, 3.5, 0.55, -1.5};
8101 Faux2
.v
= (vector
float) {-1.5, 1.0, 0.5, -3.999};
8102 # elif defined (MAC_COMPILER) || defined (XLC_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);
8106 b
= vec_all_nlt (Faux1
.v
, Faux2
.v
);
8110 (isnan(Faux1
.e
[i
]) || isnan(Faux2
.e
[i
]) || !(Faux1
.e
[i
] < Faux2
.e
[i
]));
8111 if (bAux
!= b
) err
= 1;
8113 # if defined (GCC_COMPILER)
8114 Faux1
.v
= (vector
float) { 0.0, 3.5, 0.55, -1.5};
8115 Faux2
.v
= (vector
float) {-1.5, 5.0, 0.5, -3.999};
8116 # elif defined (MAC_COMPILER) || defined (XLC_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);
8120 b
= vec_all_nlt (Faux1
.v
, Faux2
.v
);
8124 (isnan(Faux1
.e
[i
]) || isnan(Faux2
.e
[i
]) || !(Faux1
.e
[i
] < Faux2
.e
[i
]));
8125 if (bAux
!= b
) err
= 1;
8127 # if defined (GCC_COMPILER)
8128 Faux1
.v
= (vector
float) { 0.0, 3.5, 0.55, -1.5};
8129 Faux2
.v
= (vector
float) {-1.5, 1.0, 0.55, -3.999};
8130 # elif defined (MAC_COMPILER) || defined (XLC_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);
8134 b
= vec_all_nlt (Faux1
.v
, Faux2
.v
);
8138 (isnan(Faux1
.e
[i
]) || isnan(Faux2
.e
[i
]) || !(Faux1
.e
[i
] < Faux2
.e
[i
]));
8139 if (bAux
!= b
) err
= 1;
8141 # if defined (GCC_COMPILER)
8142 Faux1
.v
= (vector
float) { 0.0, 3.5, 0.55, -1.5};
8143 Faux2
.v
= (vector
float) {-1.5, 1.0, NAN
, -3.999};
8144 # elif defined (MAC_COMPILER) || defined (XLC_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);
8148 b
= vec_all_nlt (Faux1
.v
, Faux2
.v
);
8152 (isnan(Faux1
.e
[i
]) || isnan(Faux2
.e
[i
]) || !(Faux1
.e
[i
] < Faux2
.e
[i
]));
8153 if (bAux
!= b
) err
= 1;
8156 printf("Function vec_all_nlt [type float] ===> Error\n");
8158 printf("Function vec_all_nlt [type float] ===> OK\n");
8162 #if defined TEST_FLOATS
8163 /* Function vec_all_numeric */
8164 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
8166 # if defined (GCC_COMPILER)
8167 Faux1
.v
= (vector
float) {0.0, 3.5, 0.55, -1.5};
8168 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
8169 Faux1
.v
= (vector
float) (0.0, 3.5, 0.55, -1.5);
8171 b
= vec_all_numeric (Faux1
.v
);
8174 bAux
= bAux
&& !isnan(Faux1
.e
[i
]);
8175 if (bAux
!= b
) err
= 1;
8177 # if defined (GCC_COMPILER)
8178 Faux1
.v
= (vector
float) {0.0, 3.5, 0.5, -1.5};
8179 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
8180 Faux1
.v
= (vector
float) (0.0, 3.5, 0.5, -1.5);
8182 b
= vec_all_numeric (Faux1
.v
);
8185 bAux
= bAux
&& !isnan(Faux1
.e
[i
]);
8186 if (bAux
!= b
) err
= 1;
8188 # if defined (GCC_COMPILER)
8189 Faux1
.v
= (vector
float) {0.0, 3.5, NAN
, -1.5};
8190 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
8191 Faux1
.v
= (vector
float) (0.0, 3.5, NAN
, -1.5);
8193 b
= vec_all_numeric (Faux1
.v
);
8196 bAux
= bAux
&& !isnan(Faux1
.e
[i
]);
8197 if (bAux
!= b
) err
= 1;
8199 # if defined (GCC_COMPILER)
8200 Faux1
.v
= (vector
float) {NAN
, NAN
, NAN
, NAN
};
8201 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
8202 Faux1
.v
= (vector
float) (NAN
, NAN
, NAN
, NAN
);
8204 b
= vec_all_numeric (Faux1
.v
);
8207 bAux
= bAux
&& !isnan(Faux1
.e
[i
]);
8208 if (bAux
!= b
) err
= 1;
8211 printf("Function vec_all_numeric [type float] ===> Error\n");
8213 printf("Function vec_all_numeric [type float] ===> OK\n");
8216 /* Function vec_any_eq */
8217 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
8221 b
= vec_any_eq (Caux1
.v
, Caux2
.v
);
8223 for (i
=0; i
<16; i
++)
8224 bAux
= bAux
|| (Caux1
.e
[i
]==Caux2
.e
[i
]);
8225 if (bAux
!=b
) err
= 1;
8229 b
= vec_any_eq (Caux1
.v
, Caux2
.v
);
8231 for (i
=0; i
<16; i
++)
8232 bAux
= bAux
|| (Caux1
.e
[i
]==Caux2
.e
[i
]);
8233 if (bAux
!=b
) err
= 1;
8236 printf("Function vec_any_eq [type char] ===> Error\n");
8238 printf("Function vec_any_eq [type char] ===> OK\n");
8244 b
= vec_any_eq (UCaux1
.v
, UCaux2
.v
);
8246 for (i
=0; i
<16; i
++)
8247 bAux
= bAux
|| (UCaux1
.e
[i
]==UCaux2
.e
[i
]);
8248 if (bAux
!=b
) err
= 1;
8252 b
= vec_any_eq (UCaux1
.v
, UCaux2
.v
);
8254 for (i
=0; i
<16; i
++)
8255 bAux
= bAux
|| (UCaux1
.e
[i
]==UCaux2
.e
[i
]);
8256 if (bAux
!=b
) err
= 1;
8259 printf("Function vec_any_eq [type unsigned char] ===> Error\n");
8261 printf("Function vec_any_eq [type unsigned char] ===> OK\n");
8267 b
= vec_any_eq (Saux1
.v
, Saux2
.v
);
8270 bAux
= bAux
|| (Saux1
.e
[i
]==Saux2
.e
[i
]);
8271 if (bAux
!=b
) err
= 1;
8275 b
= vec_any_eq (Saux1
.v
, Saux2
.v
);
8278 bAux
= bAux
|| (Saux1
.e
[i
]==Saux2
.e
[i
]);
8279 if (bAux
!=b
) err
= 1;
8282 printf("Function vec_any_eq [type short] ===> Error\n");
8284 printf("Function vec_any_eq [type short] ===> OK\n");
8290 b
= vec_any_eq (USaux1
.v
, USaux2
.v
);
8293 bAux
= bAux
|| (USaux1
.e
[i
]==USaux2
.e
[i
]);
8294 if (bAux
!=b
) err
= 1;
8298 b
= vec_any_eq (USaux1
.v
, USaux2
.v
);
8301 bAux
= bAux
|| (USaux1
.e
[i
]==USaux2
.e
[i
]);
8302 if (bAux
!=b
) err
= 1;
8305 printf("Function vec_any_eq [type unsigned short] ===> Error\n");
8307 printf("Function vec_any_eq [type unsigned short] ===> OK\n");
8313 b
= vec_any_eq (Iaux1
.v
, Iaux2
.v
);
8316 bAux
= bAux
|| (Iaux1
.e
[i
]==Iaux2
.e
[i
]);
8317 if (bAux
!=b
) err
= 1;
8321 b
= vec_any_eq (Iaux1
.v
, Iaux2
.v
);
8324 bAux
= bAux
|| (Iaux1
.e
[i
]==Iaux2
.e
[i
]);
8325 if (bAux
!=b
) err
= 1;
8328 printf("Function vec_any_eq [type int] ===> Error\n");
8330 printf("Function vec_any_eq [type int] ===> OK\n");
8336 b
= vec_any_eq (UIaux1
.v
, UIaux2
.v
);
8339 bAux
= bAux
|| (UIaux1
.e
[i
]==UIaux2
.e
[i
]);
8340 if (bAux
!=b
) err
= 1;
8344 b
= vec_any_eq (UIaux1
.v
, UIaux2
.v
);
8347 bAux
= bAux
|| (UIaux1
.e
[i
]==UIaux2
.e
[i
]);
8348 if (bAux
!=b
) err
= 1;
8351 printf("Function vec_any_eq [type unsigned int] ===> Error\n");
8353 printf("Function vec_any_eq [type unsigned int] ===> OK\n");
8356 #if defined TEST_FLOATS
8358 # if defined (GCC_COMPILER)
8359 Faux1
.v
= (vector
float) {-1.5, 1.0, 0.5, -3.999};
8360 Faux2
.v
= (vector
float) { 0.0, 3.5, 0.55, -1.5};
8361 # elif defined (MAC_COMPILER) || defined (XLC_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);
8365 b
= vec_any_eq (Faux1
.v
, Faux2
.v
);
8368 bAux
= bAux
|| (Faux1
.e
[i
] == Faux2
.e
[i
]);
8369 if (bAux
!= b
) err
= 1;
8371 # if defined (GCC_COMPILER)
8372 Faux1
.v
= (vector
float) {-1.5, 1.0, 0.5, -3.999};
8373 Faux2
.v
= (vector
float) { 0.0, 3.5, 0.5, -1.5};
8374 # elif defined (MAC_COMPILER) || defined (XLC_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);
8378 b
= vec_any_eq (Faux1
.v
, Faux2
.v
);
8381 bAux
= bAux
|| (Faux1
.e
[i
]==Faux2
.e
[i
]);
8382 if (bAux
!=b
) err
= 1;
8385 printf("Function vec_any_eq [type float] ===> Error\n");
8387 printf("Function vec_any_eq [type float] ===> OK\n");
8390 /* Function vec_any_ge */
8391 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
8393 # if defined (GCC_COMPILER)
8394 Caux1
.v
= (vector
signed char){-8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7};
8395 Caux2
.v
= (vector
signed char){ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9};
8396 # elif defined (MAC_COMPILER) || defined (XLC_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);
8400 b
= vec_any_ge (Caux1
.v
, Caux2
.v
);
8402 for (i
=0; i
<16; i
++)
8403 bAux
= bAux
|| (Caux1
.e
[i
]>=Caux2
.e
[i
]);
8404 if (bAux
!=b
) err
= 1;
8406 # if defined (GCC_COMPILER)
8407 Caux1
.v
= (vector
signed char){-8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7};
8408 Caux2
.v
= (vector
signed char){ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9};
8409 # elif defined (MAC_COMPILER) || defined (XLC_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);
8413 b
= vec_any_ge (Caux1
.v
, Caux2
.v
);
8415 for (i
=0; i
<16; i
++)
8416 bAux
= bAux
|| (Caux1
.e
[i
]>=Caux2
.e
[i
]);
8417 if (bAux
!=b
) err
= 1;
8419 # if defined (GCC_COMPILER)
8420 Caux1
.v
= (vector
signed char){-8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7};
8421 Caux2
.v
= (vector
signed char){ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9};
8422 # elif defined (MAC_COMPILER) || defined (XLC_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);
8426 b
= vec_any_ge (Caux1
.v
, Caux2
.v
);
8428 for (i
=0; i
<16; i
++)
8429 bAux
= bAux
|| (Caux1
.e
[i
]>=Caux2
.e
[i
]);
8430 if (bAux
!=b
) err
= 1;
8433 printf("Function vec_any_ge [type char] ===> Error\n");
8435 printf("Function vec_any_ge [type char] ===> OK\n");
8439 # if defined (GCC_COMPILER)
8440 UCaux1
.v
= (vector
unsigned char){200, 201, 206, 205, 204, 203, 202, 201, 200, 101, 102, 13, 14, 15, 16, 17};
8441 UCaux2
.v
= (vector
unsigned char){250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250};
8442 # elif defined (MAC_COMPILER) || defined (XLC_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);
8446 b
= vec_any_ge (UCaux1
.v
, UCaux2
.v
);
8448 for (i
=0; i
<16; i
++)
8449 bAux
= bAux
|| (UCaux1
.e
[i
]>=UCaux2
.e
[i
]);
8450 if (bAux
!=b
) err
= 1;
8452 # if defined (GCC_COMPILER)
8453 UCaux1
.v
= (vector
unsigned char){200, 201, 206, 205, 204, 203, 202, 201, 200, 101, 102, 13, 14, 15, 16, 17};
8454 UCaux2
.v
= (vector
unsigned char){250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250};
8455 # elif defined (MAC_COMPILER) || defined (XLC_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);
8459 b
= vec_any_ge (UCaux1
.v
, UCaux2
.v
);
8461 for (i
=0; i
<16; i
++)
8462 bAux
= bAux
|| (UCaux1
.e
[i
]>=UCaux2
.e
[i
]);
8463 if (bAux
!=b
) err
= 1;
8465 # if defined (GCC_COMPILER)
8466 UCaux1
.v
= (vector
unsigned char){200, 201, 206, 205, 204, 203, 202, 201, 200, 101, 102, 13, 14, 15, 16, 17};
8467 UCaux2
.v
= (vector
unsigned char){250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250};
8468 # elif defined (MAC_COMPILER) || defined (XLC_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);
8472 b
= vec_any_ge (UCaux1
.v
, UCaux2
.v
);
8474 for (i
=0; i
<16; i
++)
8475 bAux
= bAux
|| (UCaux1
.e
[i
]>=UCaux2
.e
[i
]);
8476 if (bAux
!=b
) err
= 1;
8479 printf("Function vec_any_ge [type unsigned char] ===> Error\n");
8481 printf("Function vec_any_ge [type unsigned char] ===> OK\n");
8485 # if defined (GCC_COMPILER)
8486 Saux1
.v
= (vector
signed short){-3800, -3700, -3600, -3500, 0, 3300, 3200, 3100};
8487 Saux2
.v
= (vector
signed short){ 9000, 9000, 9000, 9000, 9000, 9000, 9000, 9000};
8488 # elif defined (MAC_COMPILER) || defined (XLC_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);
8492 b
= vec_any_ge (Saux1
.v
, Saux2
.v
);
8495 bAux
= bAux
|| (Saux1
.e
[i
]>=Saux2
.e
[i
]);
8496 if (bAux
!=b
) err
= 1;
8498 # if defined (GCC_COMPILER)
8499 Saux1
.v
= (vector
signed short){-3800, -3700, -3600, -3500, 0, 3300, 3200, 3100};
8500 Saux2
.v
= (vector
signed short){ 9000, 9000, 9000, 9000, 9000, 9000, 9000, 9000};
8501 # elif defined (MAC_COMPILER) || defined (XLC_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);
8505 b
= vec_any_ge (Saux1
.v
, Saux2
.v
);
8508 bAux
= bAux
|| (Saux1
.e
[i
]>=Saux2
.e
[i
]);
8509 if (bAux
!=b
) err
= 1;
8511 # if defined (GCC_COMPILER)
8512 Saux1
.v
= (vector
signed short){-3800, -3700, -3600, -3500, 0, 3300, 3200, 3100};
8513 Saux2
.v
= (vector
signed short){ 9000, 9000, 9000, 9000, 9000, 9000, 9000, 9000};
8514 # elif defined (MAC_COMPILER) || defined (XLC_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);
8518 b
= vec_any_ge (Saux1
.v
, Saux2
.v
);
8521 bAux
= bAux
|| (Saux1
.e
[i
]>=Saux2
.e
[i
]);
8522 if (bAux
!=b
) err
= 1;
8525 printf("Function vec_any_ge [type short] ===> Error\n");
8527 printf("Function vec_any_ge [type short] ===> OK\n");
8531 # if defined (GCC_COMPILER)
8532 USaux1
.v
= (vector
unsigned short){48000, 47000, 46000, 45000, 0, 3300, 3200, 3100};
8533 USaux2
.v
= (vector
unsigned short){59000, 59000, 59000, 59000,59000, 9000, 9000, 9000};
8534 # elif defined (MAC_COMPILER) || defined (XLC_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);
8538 b
= vec_any_ge (USaux1
.v
, USaux2
.v
);
8541 bAux
= bAux
|| (USaux1
.e
[i
]>=USaux2
.e
[i
]);
8542 if (bAux
!=b
) err
= 1;
8544 # if defined (GCC_COMPILER)
8545 USaux1
.v
= (vector
unsigned short){48000, 47000, 46000, 45000, 0, 3300, 3200, 3100};
8546 USaux2
.v
= (vector
unsigned short){59000, 59000, 59000, 59000,59000, 9000, 9000, 9000};
8547 # elif defined (MAC_COMPILER) || defined (XLC_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);
8551 b
= vec_any_ge (USaux1
.v
, USaux2
.v
);
8554 bAux
= bAux
|| (USaux1
.e
[i
]>=USaux2
.e
[i
]);
8555 if (bAux
!=b
) err
= 1;
8557 # if defined (GCC_COMPILER)
8558 USaux1
.v
= (vector
unsigned short){48000, 47000, 46000, 45000, 0, 3300, 3200, 3100};
8559 USaux2
.v
= (vector
unsigned short){59000, 59000, 59000, 59000,59000, 9000, 9000, 9000};
8560 # elif defined (MAC_COMPILER) || defined (XLC_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);
8564 b
= vec_any_ge (USaux1
.v
, USaux2
.v
);
8567 bAux
= bAux
|| (USaux1
.e
[i
]>=USaux2
.e
[i
]);
8568 if (bAux
!=b
) err
= 1;
8571 printf("Function vec_any_ge [type unsigned short] ===> Error\n");
8573 printf("Function vec_any_ge [type unsigned short] ===> OK\n");
8577 # if defined (GCC_COMPILER)
8578 Iaux1
.v
= (vector
signed int){-1003800, -1003700, 0,1003300};
8579 Iaux2
.v
= (vector
signed int){ 9000000, 9000000, 9000000,9000000};
8580 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
8581 Iaux1
.v
= (vector
signed int)(-1003800, -1003700, 0,1003300);
8582 Iaux2
.v
= (vector
signed int)( 9000000, 9000000, 9000000,9000000);
8584 b
= vec_any_ge (Iaux1
.v
, Iaux2
.v
);
8587 bAux
= bAux
|| (Iaux1
.e
[i
]>=Iaux2
.e
[i
]);
8588 if (bAux
!=b
) err
= 1;
8590 # if defined (GCC_COMPILER)
8591 Iaux1
.v
= (vector
signed int){-1003800, -1003700, 0,1003300};
8592 Iaux2
.v
= (vector
signed int){ 9000000, 9000000, 9000000,9000000};
8593 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
8594 Iaux1
.v
= (vector
signed int)(-1003800, -1003700, 0,1003300);
8595 Iaux2
.v
= (vector
signed int)( 9000000, 9000000, 9000000,9000000);
8597 b
= vec_any_ge (Iaux1
.v
, Iaux2
.v
);
8600 bAux
= bAux
|| (Iaux1
.e
[i
]>=Iaux2
.e
[i
]);
8601 if (bAux
!=b
) err
= 1;
8603 # if defined (GCC_COMPILER)
8604 Iaux1
.v
= (vector
signed int){-1003800, -1003700, 0,1003300};
8605 Iaux2
.v
= (vector
signed int){ 9000000, 9000000, 9000000,9000000};
8606 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
8607 Iaux1
.v
= (vector
signed int)(-1003800, -1003700, 0,1003300);
8608 Iaux2
.v
= (vector
signed int)( 9000000, 9000000, 9000000,9000000);
8610 b
= vec_any_ge (Iaux1
.v
, Iaux2
.v
);
8613 bAux
= bAux
|| (Iaux1
.e
[i
]>=Iaux2
.e
[i
]);
8614 if (bAux
!=b
) err
= 1;
8617 printf("Function vec_any_ge [type int] ===> Error\n");
8619 printf("Function vec_any_ge [type int] ===> OK\n");
8623 # if defined (GCC_COMPILER)
8624 UIaux1
.v
= (vector
unsigned int){0xFFFFF000, 12345678, 0, 1};
8625 UIaux2
.v
= (vector
unsigned int){0xFFFFFFF0, 20000000, 9, 9};
8626 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
8627 UIaux1
.v
= (vector
unsigned int)(0xFFFFF000, 12345678, 0, 1);
8628 UIaux2
.v
= (vector
unsigned int)(0xFFFFFFF0, 20000000, 9, 9);
8630 b
= vec_any_ge (UIaux1
.v
, UIaux2
.v
);
8633 bAux
= bAux
|| (UIaux1
.e
[i
]>=UIaux2
.e
[i
]);
8634 if (bAux
!=b
) err
= 1;
8636 # if defined (GCC_COMPILER)
8637 UIaux1
.v
= (vector
unsigned int){0xFFFFF000, 12345678, 0, 1};
8638 UIaux2
.v
= (vector
unsigned int){0xFFFFFFF0, 20000000, 9, 9};
8639 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
8640 UIaux1
.v
= (vector
unsigned int)(0xFFFFF000, 12345678, 0, 1);
8641 UIaux2
.v
= (vector
unsigned int)(0xFFFFFFF0, 20000000, 9, 9);
8643 b
= vec_any_ge (UIaux1
.v
, UIaux2
.v
);
8646 bAux
= bAux
|| (UIaux1
.e
[i
]>=UIaux2
.e
[i
]);
8647 if (bAux
!=b
) err
= 1;
8649 # if defined (GCC_COMPILER)
8650 UIaux1
.v
= (vector
unsigned int){0xFFFFF000, 12345678, 0, 1};
8651 UIaux2
.v
= (vector
unsigned int){0xFFFFFFF0, 20000000, 9, 9};
8652 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
8653 UIaux1
.v
= (vector
unsigned int)(0xFFFFF000, 12345678, 0, 1);
8654 UIaux2
.v
= (vector
unsigned int)(0xFFFFFFF0, 20000000, 9, 9);
8656 b
= vec_any_ge (UIaux1
.v
, UIaux2
.v
);
8659 bAux
= bAux
|| (UIaux1
.e
[i
]>=UIaux2
.e
[i
]);
8660 if (bAux
!=b
) err
= 1;
8663 printf("Function vec_any_ge [type unsigned int] ===> Error\n");
8665 printf("Function vec_any_ge [type unsigned int] ===> OK\n");
8667 #if defined TEST_FLOATS
8669 # if defined (GCC_COMPILER)
8670 Faux1
.v
= (vector
float) {-1.5, 1.0, 0.5, -3.999};
8671 Faux2
.v
= (vector
float) { 0.0, 3.5, 0.55, -1.5};
8672 # elif defined (MAC_COMPILER) || defined (XLC_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);
8676 b
= vec_any_ge (Faux1
.v
, Faux2
.v
);
8679 bAux
= bAux
|| (Faux1
.e
[i
]>=Faux2
.e
[i
]);
8680 if (bAux
!=b
) err
= 1;
8682 # if defined (GCC_COMPILER)
8683 Faux1
.v
= (vector
float) {-1.5, 1.0, 0.5, -3.999};
8684 Faux2
.v
= (vector
float) { 0.0, 3.5, 0.5, -1.5};
8685 # elif defined (MAC_COMPILER) || defined (XLC_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);
8689 b
= vec_any_ge (Faux1
.v
, Faux2
.v
);
8692 bAux
= bAux
|| (Faux1
.e
[i
]>=Faux2
.e
[i
]);
8693 if (bAux
!=b
) err
= 1;
8695 # if defined (GCC_COMPILER)
8696 Faux1
.v
= (vector
float) {-1.5, 1.0, 0.5, -3.999};
8697 Faux2
.v
= (vector
float) { 0.0, 3.5,-0.5, -1.5};
8698 # elif defined (MAC_COMPILER) || defined (XLC_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);
8702 b
= vec_any_ge (Faux1
.v
, Faux2
.v
);
8705 bAux
= bAux
|| (Faux1
.e
[i
]>=Faux2
.e
[i
]);
8706 if (bAux
!=b
) err
= 1;
8709 printf("Function vec_any_ge [type float] ===> Error\n");
8711 printf("Function vec_any_ge [type float] ===> OK\n");
8714 /* Function vec_any_gt */
8715 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
8717 # if defined (GCC_COMPILER)
8718 Caux1
.v
= (vector
signed char){-8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7};
8719 Caux2
.v
= (vector
signed char){ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9};
8720 # elif defined (MAC_COMPILER) || defined (XLC_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);
8724 b
= vec_any_gt (Caux1
.v
, Caux2
.v
);
8726 for (i
=0; i
<16; i
++)
8727 bAux
= bAux
|| (Caux1
.e
[i
]>Caux2
.e
[i
]);
8728 if (bAux
!=b
) err
= 1;
8730 # if defined (GCC_COMPILER)
8731 Caux1
.v
= (vector
signed char){-8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7};
8732 Caux2
.v
= (vector
signed char){ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9};
8733 # elif defined (MAC_COMPILER) || defined (XLC_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);
8737 b
= vec_any_gt (Caux1
.v
, Caux2
.v
);
8739 for (i
=0; i
<16; i
++)
8740 bAux
= bAux
|| (Caux1
.e
[i
]>Caux2
.e
[i
]);
8741 if (bAux
!=b
) err
= 1;
8743 # if defined (GCC_COMPILER)
8744 Caux1
.v
= (vector
signed char){-8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7};
8745 Caux2
.v
= (vector
signed char){ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9};
8746 # elif defined (MAC_COMPILER) || defined (XLC_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);
8750 b
= vec_any_gt (Caux1
.v
, Caux2
.v
);
8752 for (i
=0; i
<16; i
++)
8753 bAux
= bAux
|| (Caux1
.e
[i
]>Caux2
.e
[i
]);
8754 if (bAux
!=b
) err
= 1;
8757 printf("Function vec_any_gt [type char] ===> Error\n");
8759 printf("Function vec_any_gt [type char] ===> OK\n");
8763 # if defined (GCC_COMPILER)
8764 UCaux1
.v
= (vector
unsigned char){200, 201, 206, 205, 204, 203, 202, 201, 200, 101, 102, 13, 14, 15, 16, 17};
8765 UCaux2
.v
= (vector
unsigned char){250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250};
8766 # elif defined (MAC_COMPILER) || defined (XLC_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);
8770 b
= vec_any_gt (UCaux1
.v
, UCaux2
.v
);
8772 for (i
=0; i
<16; i
++)
8773 bAux
= bAux
|| (UCaux1
.e
[i
]>UCaux2
.e
[i
]);
8774 if (bAux
!=b
) err
= 1;
8776 # if defined (GCC_COMPILER)
8777 UCaux1
.v
= (vector
unsigned char){200, 201, 206, 205, 204, 203, 202, 201, 200, 101, 102, 13, 14, 15, 16, 17};
8778 UCaux2
.v
= (vector
unsigned char){250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250};
8779 # elif defined (MAC_COMPILER) || defined (XLC_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);
8783 b
= vec_any_gt (UCaux1
.v
, UCaux2
.v
);
8785 for (i
=0; i
<16; i
++)
8786 bAux
= bAux
|| (UCaux1
.e
[i
]>UCaux2
.e
[i
]);
8787 if (bAux
!=b
) err
= 1;
8789 # if defined (GCC_COMPILER)
8790 UCaux1
.v
= (vector
unsigned char){200, 201, 206, 205, 204, 203, 202, 201, 200, 101, 102, 13, 14, 15, 16, 17};
8791 UCaux2
.v
= (vector
unsigned char){250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250};
8792 # elif defined (MAC_COMPILER) || defined (XLC_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);
8796 b
= vec_any_gt (UCaux1
.v
, UCaux2
.v
);
8798 for (i
=0; i
<16; i
++)
8799 bAux
= bAux
|| (UCaux1
.e
[i
]>UCaux2
.e
[i
]);
8800 if (bAux
!=b
) err
= 1;
8803 printf("Function vec_any_gt [type unsigned char] ===> Error\n");
8805 printf("Function vec_any_gt [type unsigned char] ===> OK\n");
8809 # if defined (GCC_COMPILER)
8810 Saux1
.v
= (vector
signed short){-3800, -3700, -3600, -3500, 0, 3300, 3200, 3100};
8811 Saux2
.v
= (vector
signed short){ 9000, 9000, 9000, 9000, 9000, 9000, 9000, 9000};
8812 # elif defined (MAC_COMPILER) || defined (XLC_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);
8816 b
= vec_any_gt (Saux1
.v
, Saux2
.v
);
8819 bAux
= bAux
|| (Saux1
.e
[i
]>Saux2
.e
[i
]);
8820 if (bAux
!=b
) err
= 1;
8822 # if defined (GCC_COMPILER)
8823 Saux1
.v
= (vector
signed short){-3800, -3700, -3600, -3500, 0, 3300, 3200, 3100};
8824 Saux2
.v
= (vector
signed short){ 9000, 9000, 9000, 9000, 9000, 9000, 9000, 9000};
8825 # elif defined (MAC_COMPILER) || defined (XLC_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);
8829 b
= vec_any_gt (Saux1
.v
, Saux2
.v
);
8832 bAux
= bAux
|| (Saux1
.e
[i
]>Saux2
.e
[i
]);
8833 if (bAux
!=b
) err
= 1;
8835 # if defined (GCC_COMPILER)
8836 Saux1
.v
= (vector
signed short){-3800, -3700, -3600, -3500, 0, 3300, 3200, 3100};
8837 Saux2
.v
= (vector
signed short){ 9000, 9000, 9000, 9000, 9000, 9000, 9000, 9000};
8838 # elif defined (MAC_COMPILER) || defined (XLC_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);
8842 b
= vec_any_gt (Saux1
.v
, Saux2
.v
);
8845 bAux
= bAux
|| (Saux1
.e
[i
]>Saux2
.e
[i
]);
8846 if (bAux
!=b
) err
= 1;
8849 printf("Function vec_any_gt [type short] ===> Error\n");
8851 printf("Function vec_any_gt [type short] ===> OK\n");
8855 # if defined (GCC_COMPILER)
8856 USaux1
.v
= (vector
unsigned short){48000, 47000, 46000, 45000, 0, 3300, 3200, 3100};
8857 USaux2
.v
= (vector
unsigned short){59000, 59000, 59000, 59000,59000, 9000, 9000, 9000};
8858 # elif defined (MAC_COMPILER) || defined (XLC_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);
8862 b
= vec_any_gt (USaux1
.v
, USaux2
.v
);
8865 bAux
= bAux
|| (USaux1
.e
[i
]>USaux2
.e
[i
]);
8866 if (bAux
!=b
) err
= 1;
8868 # if defined (GCC_COMPILER)
8869 USaux1
.v
= (vector
unsigned short){48000, 47000, 46000, 45000, 0, 3300, 3200, 3100};
8870 USaux2
.v
= (vector
unsigned short){59000, 59000, 59000, 59000,59000, 9000, 9000, 9000};
8871 # elif defined (MAC_COMPILER) || defined (XLC_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);
8875 b
= vec_any_gt (USaux1
.v
, USaux2
.v
);
8878 bAux
= bAux
|| (USaux1
.e
[i
]>USaux2
.e
[i
]);
8879 if (bAux
!=b
) err
= 1;
8881 # if defined (GCC_COMPILER)
8882 USaux1
.v
= (vector
unsigned short){48000, 47000, 46000, 45000, 0, 3300, 3200, 3100};
8883 USaux2
.v
= (vector
unsigned short){59000, 59000, 59000, 59000,59000, 9000, 9000, 9000};
8884 # elif defined (MAC_COMPILER) || defined (XLC_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);
8888 b
= vec_any_gt (USaux1
.v
, USaux2
.v
);
8891 bAux
= bAux
|| (USaux1
.e
[i
]>USaux2
.e
[i
]);
8892 if (bAux
!=b
) err
= 1;
8895 printf("Function vec_any_gt [type unsigned short] ===> Error\n");
8897 printf("Function vec_any_gt [type unsigned short] ===> OK\n");
8901 # if defined (GCC_COMPILER)
8902 Iaux1
.v
= (vector
signed int){-1003800, -1003700, 0,1003300};
8903 Iaux2
.v
= (vector
signed int){ 9000000, 9000000, 9000000,9000000};
8904 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
8905 Iaux1
.v
= (vector
signed int)(-1003800, -1003700, 0,1003300);
8906 Iaux2
.v
= (vector
signed int)( 9000000, 9000000, 9000000,9000000);
8908 b
= vec_any_gt (Iaux1
.v
, Iaux2
.v
);
8911 bAux
= bAux
|| (Iaux1
.e
[i
]>Iaux2
.e
[i
]);
8912 if (bAux
!=b
) err
= 1;
8914 # if defined (GCC_COMPILER)
8915 Iaux1
.v
= (vector
signed int){-1003800, -1003700, 0,1003300};
8916 Iaux2
.v
= (vector
signed int){ 9000000, 9000000, 9000000,9000000};
8917 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
8918 Iaux1
.v
= (vector
signed int)(-1003800, -1003700, 0,1003300);
8919 Iaux2
.v
= (vector
signed int)( 9000000, 9000000, 9000000,9000000);
8921 b
= vec_any_gt (Iaux1
.v
, Iaux2
.v
);
8924 bAux
= bAux
|| (Iaux1
.e
[i
]>Iaux2
.e
[i
]);
8925 if (bAux
!=b
) err
= 1;
8927 # if defined (GCC_COMPILER)
8928 Iaux1
.v
= (vector
signed int){-1003800, -1003700, 0,1003300};
8929 Iaux2
.v
= (vector
signed int){ 9000000, 9000000, 9000000,9000000};
8930 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
8931 Iaux1
.v
= (vector
signed int)(-1003800, -1003700, 0,1003300);
8932 Iaux2
.v
= (vector
signed int)( 9000000, 9000000, 9000000,9000000);
8934 b
= vec_any_gt (Iaux1
.v
, Iaux2
.v
);
8937 bAux
= bAux
|| (Iaux1
.e
[i
]>Iaux2
.e
[i
]);
8938 if (bAux
!=b
) err
= 1;
8941 printf("Function vec_any_gt [type int] ===> Error\n");
8943 printf("Function vec_any_gt [type int] ===> OK\n");
8947 # if defined (GCC_COMPILER)
8948 UIaux1
.v
= (vector
unsigned int){0xFFFFF000, 12345678, 0, 1};
8949 UIaux2
.v
= (vector
unsigned int){0xFFFFFFF0, 20000000, 9, 9};
8950 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
8951 UIaux1
.v
= (vector
unsigned int)(0xFFFFF000, 12345678, 0, 1);
8952 UIaux2
.v
= (vector
unsigned int)(0xFFFFFFF0, 20000000, 9, 9);
8954 b
= vec_any_gt (UIaux1
.v
, UIaux2
.v
);
8957 bAux
= bAux
|| (UIaux1
.e
[i
]>UIaux2
.e
[i
]);
8958 if (bAux
!=b
) err
= 1;
8960 # if defined (GCC_COMPILER)
8961 UIaux1
.v
= (vector
unsigned int){0xFFFFF000, 12345678, 0, 1};
8962 UIaux2
.v
= (vector
unsigned int){0xFFFFFFF0, 20000000, 9, 9};
8963 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
8964 UIaux1
.v
= (vector
unsigned int)(0xFFFFF000, 12345678, 0, 1);
8965 UIaux2
.v
= (vector
unsigned int)(0xFFFFFFF0, 20000000, 9, 9);
8967 b
= vec_any_gt (UIaux1
.v
, UIaux2
.v
);
8970 bAux
= bAux
|| (UIaux1
.e
[i
]>UIaux2
.e
[i
]);
8971 if (bAux
!=b
) err
= 1;
8973 # if defined (GCC_COMPILER)
8974 UIaux1
.v
= (vector
unsigned int){0xFFFFF000, 12345678, 0, 1};
8975 UIaux2
.v
= (vector
unsigned int){0xFFFFFFF0, 20000000, 9, 9};
8976 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
8977 UIaux1
.v
= (vector
unsigned int)(0xFFFFF000, 12345678, 0, 1);
8978 UIaux2
.v
= (vector
unsigned int)(0xFFFFFFF0, 20000000, 9, 9);
8980 b
= vec_any_gt (UIaux1
.v
, UIaux2
.v
);
8983 bAux
= bAux
|| (UIaux1
.e
[i
]>UIaux2
.e
[i
]);
8984 if (bAux
!=b
) err
= 1;
8987 printf("Function vec_any_gt [type unsigned int] ===> Error\n");
8989 printf("Function vec_any_gt [type unsigned int] ===> OK\n");
8991 #if defined TEST_FLOATS
8993 # if defined (GCC_COMPILER)
8994 Faux1
.v
= (vector
float) {-1.5, 1.0, 0.5, -3.999};
8995 Faux2
.v
= (vector
float) { 0.0, 3.5, 0.55, -1.5};
8996 # elif defined (MAC_COMPILER) || defined (XLC_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);
9000 b
= vec_any_gt (Faux1
.v
, Faux2
.v
);
9003 bAux
= bAux
|| (Faux1
.e
[i
]>Faux2
.e
[i
]);
9004 if (bAux
!=b
) err
= 1;
9006 # if defined (GCC_COMPILER)
9007 Faux1
.v
= (vector
float) {-1.5, 1.0, 0.5, -3.999};
9008 Faux2
.v
= (vector
float) { 0.0, 3.5, 0.5, -1.5};
9009 # elif defined (MAC_COMPILER) || defined (XLC_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);
9013 b
= vec_any_gt (Faux1
.v
, Faux2
.v
);
9016 bAux
= bAux
|| (Faux1
.e
[i
]>Faux2
.e
[i
]);
9017 if (bAux
!=b
) err
= 1;
9019 # if defined (GCC_COMPILER)
9020 Faux1
.v
= (vector
float) {-1.5, 1.0, 0.5, -3.999};
9021 Faux2
.v
= (vector
float) { 0.0, 3.5,-0.5, -1.5};
9022 # elif defined (MAC_COMPILER) || defined (XLC_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);
9026 b
= vec_any_gt (Faux1
.v
, Faux2
.v
);
9029 bAux
= bAux
|| (Faux1
.e
[i
]>Faux2
.e
[i
]);
9030 if (bAux
!=b
) err
= 1;
9033 printf("Function vec_any_gt [type float] ===> Error\n");
9035 printf("Function vec_any_gt [type float] ===> OK\n");
9039 /* Function vec_any_le */
9040 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
9042 # if defined (GCC_COMPILER)
9043 Caux2
.v
= (vector
signed char){-8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7};
9044 Caux1
.v
= (vector
signed char){ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9};
9045 # elif defined (MAC_COMPILER) || defined (XLC_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);
9049 b
= vec_any_le (Caux1
.v
, Caux2
.v
);
9051 for (i
=0; i
<16; i
++)
9052 bAux
= bAux
|| (Caux1
.e
[i
]<=Caux2
.e
[i
]);
9053 if (bAux
!=b
) err
= 1;
9055 # if defined (GCC_COMPILER)
9056 Caux2
.v
= (vector
signed char){-8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7};
9057 Caux1
.v
= (vector
signed char){ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9};
9058 # elif defined (MAC_COMPILER) || defined (XLC_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);
9062 b
= vec_any_le (Caux1
.v
, Caux2
.v
);
9064 for (i
=0; i
<16; i
++)
9065 bAux
= bAux
|| (Caux1
.e
[i
]<=Caux2
.e
[i
]);
9066 if (bAux
!=b
) err
= 1;
9068 # if defined (GCC_COMPILER)
9069 Caux2
.v
= (vector
signed char){-8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7};
9070 Caux1
.v
= (vector
signed char){ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9};
9071 # elif defined (MAC_COMPILER) || defined (XLC_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);
9075 b
= vec_any_le (Caux1
.v
, Caux2
.v
);
9077 for (i
=0; i
<16; i
++)
9078 bAux
= bAux
|| (Caux1
.e
[i
]<=Caux2
.e
[i
]);
9079 if (bAux
!=b
) err
= 1;
9082 printf("Function vec_any_le [type char] ===> Error\n");
9084 printf("Function vec_any_le [type char] ===> OK\n");
9088 # if defined (GCC_COMPILER)
9089 UCaux2
.v
= (vector
unsigned char){200, 201, 206, 205, 204, 203, 202, 201, 200, 101, 102, 13, 14, 15, 16, 17};
9090 UCaux1
.v
= (vector
unsigned char){250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250};
9091 # elif defined (MAC_COMPILER) || defined (XLC_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);
9095 b
= vec_any_le (UCaux1
.v
, UCaux2
.v
);
9097 for (i
=0; i
<16; i
++)
9098 bAux
= bAux
|| (UCaux1
.e
[i
]<=UCaux2
.e
[i
]);
9099 if (bAux
!=b
) err
= 1;
9101 # if defined (GCC_COMPILER)
9102 UCaux2
.v
= (vector
unsigned char){200, 201, 206, 205, 204, 203, 202, 201, 200, 101, 102, 13, 14, 15, 16, 17};
9103 UCaux1
.v
= (vector
unsigned char){250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250};
9104 # elif defined (MAC_COMPILER) || defined (XLC_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);
9108 b
= vec_any_le (UCaux1
.v
, UCaux2
.v
);
9110 for (i
=0; i
<16; i
++)
9111 bAux
= bAux
|| (UCaux1
.e
[i
]<=UCaux2
.e
[i
]);
9112 if (bAux
!=b
) err
= 1;
9114 # if defined (GCC_COMPILER)
9115 UCaux2
.v
= (vector
unsigned char){200, 201, 206, 205, 204, 203, 202, 201, 200, 101, 102, 13, 14, 15, 16, 17};
9116 UCaux1
.v
= (vector
unsigned char){250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250};
9117 # elif defined (MAC_COMPILER) || defined (XLC_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);
9121 b
= vec_any_le (UCaux1
.v
, UCaux2
.v
);
9123 for (i
=0; i
<16; i
++)
9124 bAux
= bAux
|| (UCaux1
.e
[i
]<=UCaux2
.e
[i
]);
9125 if (bAux
!=b
) err
= 1;
9128 printf("Function vec_any_le [type unsigned char] ===> Error\n");
9130 printf("Function vec_any_le [type unsigned char] ===> OK\n");
9134 # if defined (GCC_COMPILER)
9135 Saux2
.v
= (vector
signed short){-3800, -3700, -3600, -3500, 0, 3300, 3200, 3100};
9136 Saux1
.v
= (vector
signed short){ 9000, 9000, 9000, 9000, 9000, 9000, 9000, 9000};
9137 # elif defined (MAC_COMPILER) || defined (XLC_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);
9141 b
= vec_any_le (Saux1
.v
, Saux2
.v
);
9144 bAux
= bAux
|| (Saux1
.e
[i
]<=Saux2
.e
[i
]);
9145 if (bAux
!=b
) err
= 1;
9147 # if defined (GCC_COMPILER)
9148 Saux2
.v
= (vector
signed short){-3800, -3700, -3600, -3500, 0, 3300, 3200, 3100};
9149 Saux1
.v
= (vector
signed short){ 9000, 9000, 9000, 9000, 9000, 9000, 9000, 9000};
9150 # elif defined (MAC_COMPILER) || defined (XLC_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);
9154 b
= vec_any_le (Saux1
.v
, Saux2
.v
);
9157 bAux
= bAux
|| (Saux1
.e
[i
]<=Saux2
.e
[i
]);
9158 if (bAux
!=b
) err
= 1;
9160 # if defined (GCC_COMPILER)
9161 Saux2
.v
= (vector
signed short){-3800, -3700, -3600, -3500, 0, 3300, 3200, 3100};
9162 Saux1
.v
= (vector
signed short){ 9000, 9000, 9000, 9000, 9000, 9000, 9000, 9000};
9163 # elif defined (MAC_COMPILER) || defined (XLC_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);
9167 b
= vec_any_le (Saux1
.v
, Saux2
.v
);
9170 bAux
= bAux
|| (Saux1
.e
[i
]<=Saux2
.e
[i
]);
9171 if (bAux
!=b
) err
= 1;
9174 printf("Function vec_any_le [type short] ===> Error\n");
9176 printf("Function vec_any_le [type short] ===> OK\n");
9180 # if defined (GCC_COMPILER)
9181 USaux2
.v
= (vector
unsigned short){48000, 47000, 46000, 45000, 0, 3300, 3200, 3100};
9182 USaux1
.v
= (vector
unsigned short){59000, 59000, 59000, 59000,59000, 9000, 9000, 9000};
9183 # elif defined (MAC_COMPILER) || defined (XLC_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);
9187 b
= vec_any_le (USaux1
.v
, USaux2
.v
);
9190 bAux
= bAux
|| (USaux1
.e
[i
]<=USaux2
.e
[i
]);
9191 if (bAux
!=b
) err
= 1;
9193 # if defined (GCC_COMPILER)
9194 USaux2
.v
= (vector
unsigned short){48000, 47000, 46000, 45000, 0, 3300, 3200, 3100};
9195 USaux1
.v
= (vector
unsigned short){59000, 59000, 59000, 59000,59000, 9000, 9000, 9000};
9196 # elif defined (MAC_COMPILER) || defined (XLC_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);
9200 b
= vec_any_le (USaux1
.v
, USaux2
.v
);
9203 bAux
= bAux
|| (USaux1
.e
[i
]<=USaux2
.e
[i
]);
9204 if (bAux
!=b
) err
= 1;
9206 # if defined (GCC_COMPILER)
9207 USaux2
.v
= (vector
unsigned short){48000, 47000, 46000, 45000, 0, 3300, 3200, 3100};
9208 USaux1
.v
= (vector
unsigned short){59000, 59000, 59000, 59000,59000, 9000, 9000, 9000};
9209 # elif defined (MAC_COMPILER) || defined (XLC_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);
9213 b
= vec_any_le (USaux1
.v
, USaux2
.v
);
9216 bAux
= bAux
|| (USaux1
.e
[i
]<=USaux2
.e
[i
]);
9217 if (bAux
!=b
) err
= 1;
9220 printf("Function vec_any_le [type unsigned short] ===> Error\n");
9222 printf("Function vec_any_le [type unsigned short] ===> OK\n");
9226 # if defined (GCC_COMPILER)
9227 Iaux2
.v
= (vector
signed int){-1003800, -1003700, 0,1003300};
9228 Iaux1
.v
= (vector
signed int){ 9000000, 9000000, 9000000,9000000};
9229 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
9230 Iaux2
.v
= (vector
signed int)(-1003800, -1003700, 0,1003300);
9231 Iaux1
.v
= (vector
signed int)( 9000000, 9000000, 9000000,9000000);
9233 b
= vec_any_le (Iaux1
.v
, Iaux2
.v
);
9236 bAux
= bAux
|| (Iaux1
.e
[i
]<=Iaux2
.e
[i
]);
9237 if (bAux
!=b
) err
= 1;
9239 # if defined (GCC_COMPILER)
9240 Iaux2
.v
= (vector
signed int){-1003800, -1003700, 0,1003300};
9241 Iaux1
.v
= (vector
signed int){ 9000000, 9000000, 9000000,9000000};
9242 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
9243 Iaux2
.v
= (vector
signed int)(-1003800, -1003700, 0,1003300);
9244 Iaux1
.v
= (vector
signed int)( 9000000, 9000000, 9000000,9000000);
9246 b
= vec_any_le (Iaux1
.v
, Iaux2
.v
);
9249 bAux
= bAux
|| (Iaux1
.e
[i
]<=Iaux2
.e
[i
]);
9250 if (bAux
!=b
) err
= 1;
9252 # if defined (GCC_COMPILER)
9253 Iaux2
.v
= (vector
signed int){-1003800, -1003700, 0,1003300};
9254 Iaux1
.v
= (vector
signed int){ 9000000, 9000000, 9000000,9000000};
9255 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
9256 Iaux2
.v
= (vector
signed int)(-1003800, -1003700, 0,1003300);
9257 Iaux1
.v
= (vector
signed int)( 9000000, 9000000, 9000000,9000000);
9259 b
= vec_any_le (Iaux1
.v
, Iaux2
.v
);
9262 bAux
= bAux
|| (Iaux1
.e
[i
]<=Iaux2
.e
[i
]);
9263 if (bAux
!=b
) err
= 1;
9266 printf("Function vec_any_le [type int] ===> Error\n");
9268 printf("Function vec_any_le [type int] ===> OK\n");
9272 # if defined (GCC_COMPILER)
9273 UIaux2
.v
= (vector
unsigned int){0xFFFFF000, 12345678, 0, 1};
9274 UIaux1
.v
= (vector
unsigned int){0xFFFFFFF0, 20000000, 9, 9};
9275 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
9276 UIaux2
.v
= (vector
unsigned int)(0xFFFFF000, 12345678, 0, 1);
9277 UIaux1
.v
= (vector
unsigned int)(0xFFFFFFF0, 20000000, 9, 9);
9279 b
= vec_any_le (UIaux1
.v
, UIaux2
.v
);
9282 bAux
= bAux
|| (UIaux1
.e
[i
]<=UIaux2
.e
[i
]);
9283 if (bAux
!=b
) err
= 1;
9285 # if defined (GCC_COMPILER)
9286 UIaux2
.v
= (vector
unsigned int){0xFFFFF000, 12345678, 0, 1};
9287 UIaux1
.v
= (vector
unsigned int){0xFFFFFFF0, 20000000, 9, 9};
9288 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
9289 UIaux2
.v
= (vector
unsigned int)(0xFFFFF000, 12345678, 0, 1);
9290 UIaux1
.v
= (vector
unsigned int)(0xFFFFFFF0, 20000000, 9, 9);
9292 b
= vec_any_le (UIaux1
.v
, UIaux2
.v
);
9295 bAux
= bAux
|| (UIaux1
.e
[i
]<=UIaux2
.e
[i
]);
9296 if (bAux
!=b
) err
= 1;
9298 # if defined (GCC_COMPILER)
9299 UIaux2
.v
= (vector
unsigned int){0xFFFFF000, 12345678, 0, 1};
9300 UIaux1
.v
= (vector
unsigned int){0xFFFFFFF0, 20000000, 9, 9};
9301 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
9302 UIaux2
.v
= (vector
unsigned int)(0xFFFFF000, 12345678, 0, 1);
9303 UIaux1
.v
= (vector
unsigned int)(0xFFFFFFF0, 20000000, 9, 9);
9305 b
= vec_any_le (UIaux1
.v
, UIaux2
.v
);
9308 bAux
= bAux
|| (UIaux1
.e
[i
]<=UIaux2
.e
[i
]);
9309 if (bAux
!=b
) err
= 1;
9312 printf("Function vec_any_le [type unsigned int] ===> Error\n");
9314 printf("Function vec_any_le [type unsigned int] ===> OK\n");
9316 #if defined TEST_FLOATS
9318 # if defined (GCC_COMPILER)
9319 Faux2
.v
= (vector
float) {-1.5, 1.0, 0.5, -3.999};
9320 Faux1
.v
= (vector
float) { 0.0, 3.5, 0.55, -1.5};
9321 # elif defined (MAC_COMPILER) || defined (XLC_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);
9325 b
= vec_any_le (Faux1
.v
, Faux2
.v
);
9328 bAux
= bAux
|| (Faux1
.e
[i
]<=Faux2
.e
[i
]);
9329 if (bAux
!=b
) err
= 1;
9331 # if defined (GCC_COMPILER)
9332 Faux2
.v
= (vector
float) {-1.5, 1.0, 0.5, -3.999};
9333 Faux1
.v
= (vector
float) { 0.0, 3.5, 0.5, -1.5};
9334 # elif defined (MAC_COMPILER) || defined (XLC_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);
9338 b
= vec_any_le (Faux1
.v
, Faux2
.v
);
9341 bAux
= bAux
|| (Faux1
.e
[i
]<=Faux2
.e
[i
]);
9342 if (bAux
!=b
) err
= 1;
9344 # if defined (GCC_COMPILER)
9345 Faux2
.v
= (vector
float) {-1.5, 1.0, 0.5, -3.999};
9346 Faux1
.v
= (vector
float) { 0.0, 3.5,-0.5, -1.5};
9347 # elif defined (MAC_COMPILER) || defined (XLC_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);
9351 b
= vec_any_le (Faux1
.v
, Faux2
.v
);
9354 bAux
= bAux
|| (Faux1
.e
[i
]<=Faux2
.e
[i
]);
9355 if (bAux
!=b
) err
= 1;
9358 printf("Function vec_any_le [type float] ===> Error\n");
9360 printf("Function vec_any_le [type float] ===> OK\n");
9364 /* Function vec_any_lt */
9365 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
9367 # if defined (GCC_COMPILER)
9368 Caux2
.v
= (vector
signed char){-8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7};
9369 Caux1
.v
= (vector
signed char){ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9};
9370 # elif defined (MAC_COMPILER) || defined (XLC_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);
9374 b
= vec_any_lt (Caux1
.v
, Caux2
.v
);
9376 for (i
=0; i
<16; i
++)
9377 bAux
= bAux
|| (Caux1
.e
[i
]<Caux2
.e
[i
]);
9378 if (bAux
!=b
) err
= 1;
9380 # if defined (GCC_COMPILER)
9381 Caux2
.v
= (vector
signed char){-8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7};
9382 Caux1
.v
= (vector
signed char){ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9};
9383 # elif defined (MAC_COMPILER) || defined (XLC_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);
9387 b
= vec_any_lt (Caux1
.v
, Caux2
.v
);
9389 for (i
=0; i
<16; i
++)
9390 bAux
= bAux
|| (Caux1
.e
[i
]<Caux2
.e
[i
]);
9391 if (bAux
!=b
) err
= 1;
9393 # if defined (GCC_COMPILER)
9394 Caux2
.v
= (vector
signed char){-8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7};
9395 Caux1
.v
= (vector
signed char){ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9};
9396 # elif defined (MAC_COMPILER) || defined (XLC_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);
9400 b
= vec_any_lt (Caux1
.v
, Caux2
.v
);
9402 for (i
=0; i
<16; i
++)
9403 bAux
= bAux
|| (Caux1
.e
[i
]<Caux2
.e
[i
]);
9404 if (bAux
!=b
) err
= 1;
9407 printf("Function vec_any_lt [type char] ===> Error\n");
9409 printf("Function vec_any_lt [type char] ===> OK\n");
9413 # if defined (GCC_COMPILER)
9414 UCaux2
.v
= (vector
unsigned char){200, 201, 206, 205, 204, 203, 202, 201, 200, 101, 102, 13, 14, 15, 16, 17};
9415 UCaux1
.v
= (vector
unsigned char){250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250};
9416 # elif defined (MAC_COMPILER) || defined (XLC_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);
9420 b
= vec_any_lt (UCaux1
.v
, UCaux2
.v
);
9422 for (i
=0; i
<16; i
++)
9423 bAux
= bAux
|| (UCaux1
.e
[i
]<UCaux2
.e
[i
]);
9424 if (bAux
!=b
) err
= 1;
9426 # if defined (GCC_COMPILER)
9427 UCaux2
.v
= (vector
unsigned char){200, 201, 206, 205, 204, 203, 202, 201, 200, 101, 102, 13, 14, 15, 16, 17};
9428 UCaux1
.v
= (vector
unsigned char){250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250};
9429 # elif defined (MAC_COMPILER) || defined (XLC_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);
9433 b
= vec_any_lt (UCaux1
.v
, UCaux2
.v
);
9435 for (i
=0; i
<16; i
++)
9436 bAux
= bAux
|| (UCaux1
.e
[i
]<UCaux2
.e
[i
]);
9437 if (bAux
!=b
) err
= 1;
9439 # if defined (GCC_COMPILER)
9440 UCaux2
.v
= (vector
unsigned char){200, 201, 206, 205, 204, 203, 202, 201, 200, 101, 102, 13, 14, 15, 16, 17};
9441 UCaux1
.v
= (vector
unsigned char){250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250};
9442 # elif defined (MAC_COMPILER) || defined (XLC_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);
9446 b
= vec_any_lt (UCaux1
.v
, UCaux2
.v
);
9448 for (i
=0; i
<16; i
++)
9449 bAux
= bAux
|| (UCaux1
.e
[i
]<UCaux2
.e
[i
]);
9450 if (bAux
!=b
) err
= 1;
9453 printf("Function vec_any_lt [type unsigned char] ===> Error\n");
9455 printf("Function vec_any_lt [type unsigned char] ===> OK\n");
9459 # if defined (GCC_COMPILER)
9460 Saux2
.v
= (vector
signed short){-3800, -3700, -3600, -3500, 0, 3300, 3200, 3100};
9461 Saux1
.v
= (vector
signed short){ 9000, 9000, 9000, 9000, 9000, 9000, 9000, 9000};
9462 # elif defined (MAC_COMPILER) || defined (XLC_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);
9466 b
= vec_any_lt (Saux1
.v
, Saux2
.v
);
9469 bAux
= bAux
|| (Saux1
.e
[i
]<Saux2
.e
[i
]);
9470 if (bAux
!=b
) err
= 1;
9472 # if defined (GCC_COMPILER)
9473 Saux2
.v
= (vector
signed short){-3800, -3700, -3600, -3500, 0, 3300, 3200, 3100};
9474 Saux1
.v
= (vector
signed short){ 9000, 9000, 9000, 9000, 9000, 9000, 9000, 9000};
9475 # elif defined (MAC_COMPILER) || defined (XLC_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);
9479 b
= vec_any_lt (Saux1
.v
, Saux2
.v
);
9482 bAux
= bAux
|| (Saux1
.e
[i
]<Saux2
.e
[i
]);
9483 if (bAux
!=b
) err
= 1;
9485 # if defined (GCC_COMPILER)
9486 Saux2
.v
= (vector
signed short){-3800, -3700, -3600, -3500, 0, 3300, 3200, 3100};
9487 Saux1
.v
= (vector
signed short){ 9000, 9000, 9000, 9000, 9000, 9000, 9000, 9000};
9488 # elif defined (MAC_COMPILER) || defined (XLC_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);
9492 b
= vec_any_lt (Saux1
.v
, Saux2
.v
);
9495 bAux
= bAux
|| (Saux1
.e
[i
]<Saux2
.e
[i
]);
9496 if (bAux
!=b
) err
= 1;
9499 printf("Function vec_any_lt [type short] ===> Error\n");
9501 printf("Function vec_any_lt [type short] ===> OK\n");
9505 # if defined (GCC_COMPILER)
9506 USaux2
.v
= (vector
unsigned short){48000, 47000, 46000, 45000, 0, 3300, 3200, 3100};
9507 USaux1
.v
= (vector
unsigned short){59000, 59000, 59000, 59000,59000, 9000, 9000, 9000};
9508 # elif defined (MAC_COMPILER) || defined (XLC_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);
9512 b
= vec_any_lt (USaux1
.v
, USaux2
.v
);
9515 bAux
= bAux
|| (USaux1
.e
[i
]<USaux2
.e
[i
]);
9516 if (bAux
!=b
) err
= 1;
9518 # if defined (GCC_COMPILER)
9519 USaux2
.v
= (vector
unsigned short){48000, 47000, 46000, 45000, 0, 3300, 3200, 3100};
9520 USaux1
.v
= (vector
unsigned short){59000, 59000, 59000, 59000,59000, 9000, 9000, 9000};
9521 # elif defined (MAC_COMPILER) || defined (XLC_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);
9525 b
= vec_any_lt (USaux1
.v
, USaux2
.v
);
9528 bAux
= bAux
|| (USaux1
.e
[i
]<USaux2
.e
[i
]);
9529 if (bAux
!=b
) err
= 1;
9531 # if defined (GCC_COMPILER)
9532 USaux2
.v
= (vector
unsigned short){48000, 47000, 46000, 45000, 0, 3300, 3200, 3100};
9533 USaux1
.v
= (vector
unsigned short){59000, 59000, 59000, 59000,59000, 9000, 9000, 9000};
9534 # elif defined (MAC_COMPILER) || defined (XLC_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);
9538 b
= vec_any_lt (USaux1
.v
, USaux2
.v
);
9541 bAux
= bAux
|| (USaux1
.e
[i
]<USaux2
.e
[i
]);
9542 if (bAux
!=b
) err
= 1;
9545 printf("Function vec_any_lt [type unsigned short] ===> Error\n");
9547 printf("Function vec_any_lt [type unsigned short] ===> OK\n");
9551 # if defined (GCC_COMPILER)
9552 Iaux2
.v
= (vector
signed int){-1003800, -1003700, 0,1003300};
9553 Iaux1
.v
= (vector
signed int){ 9000000, 9000000, 9000000,9000000};
9554 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
9555 Iaux2
.v
= (vector
signed int)(-1003800, -1003700, 0,1003300);
9556 Iaux1
.v
= (vector
signed int)( 9000000, 9000000, 9000000,9000000);
9558 b
= vec_any_lt (Iaux1
.v
, Iaux2
.v
);
9561 bAux
= bAux
|| (Iaux1
.e
[i
]<Iaux2
.e
[i
]);
9562 if (bAux
!=b
) err
= 1;
9564 # if defined (GCC_COMPILER)
9565 Iaux2
.v
= (vector
signed int){-1003800, -1003700, 0,1003300};
9566 Iaux1
.v
= (vector
signed int){ 9000000, 9000000, 9000000,9000000};
9567 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
9568 Iaux2
.v
= (vector
signed int)(-1003800, -1003700, 0,1003300);
9569 Iaux1
.v
= (vector
signed int)( 9000000, 9000000, 9000000,9000000);
9571 b
= vec_any_lt (Iaux1
.v
, Iaux2
.v
);
9574 bAux
= bAux
|| (Iaux1
.e
[i
]<Iaux2
.e
[i
]);
9575 if (bAux
!=b
) err
= 1;
9577 # if defined (GCC_COMPILER)
9578 Iaux2
.v
= (vector
signed int){-1003800, -1003700, 0,1003300};
9579 Iaux1
.v
= (vector
signed int){ 9000000, 9000000, 9000000,9000000};
9580 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
9581 Iaux2
.v
= (vector
signed int)(-1003800, -1003700, 0,1003300);
9582 Iaux1
.v
= (vector
signed int)( 9000000, 9000000, 9000000,9000000);
9584 b
= vec_any_lt (Iaux1
.v
, Iaux2
.v
);
9587 bAux
= bAux
|| (Iaux1
.e
[i
]<Iaux2
.e
[i
]);
9588 if (bAux
!=b
) err
= 1;
9591 printf("Function vec_any_lt [type int] ===> Error\n");
9593 printf("Function vec_any_lt [type int] ===> OK\n");
9597 # if defined (GCC_COMPILER)
9598 UIaux2
.v
= (vector
unsigned int){0xFFFFF000, 12345678, 0, 1};
9599 UIaux1
.v
= (vector
unsigned int){0xFFFFFFF0, 20000000, 9, 9};
9600 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
9601 UIaux2
.v
= (vector
unsigned int)(0xFFFFF000, 12345678, 0, 1);
9602 UIaux1
.v
= (vector
unsigned int)(0xFFFFFFF0, 20000000, 9, 9);
9604 b
= vec_any_lt (UIaux1
.v
, UIaux2
.v
);
9607 bAux
= bAux
|| (UIaux1
.e
[i
]<UIaux2
.e
[i
]);
9608 if (bAux
!=b
) err
= 1;
9610 # if defined (GCC_COMPILER)
9611 UIaux2
.v
= (vector
unsigned int){0xFFFFF000, 12345678, 0, 1};
9612 UIaux1
.v
= (vector
unsigned int){0xFFFFFFF0, 12345678, 9, 9};
9613 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
9614 UIaux2
.v
= (vector
unsigned int)(0xFFFFF000, 12345678, 0, 1);
9615 UIaux1
.v
= (vector
unsigned int)(0xFFFFFFF0, 12345678, 9, 9);
9617 b
= vec_any_lt (UIaux1
.v
, UIaux2
.v
);
9620 bAux
= bAux
|| (UIaux1
.e
[i
]<UIaux2
.e
[i
]);
9621 if (bAux
!=b
) err
= 1;
9623 # if defined (GCC_COMPILER)
9624 UIaux2
.v
= (vector
unsigned int){0xFFFFF000, 12345678, 0, 1};
9625 UIaux1
.v
= (vector
unsigned int){0xFFFFFFF0, 10000000, 9, 9};
9626 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
9627 UIaux2
.v
= (vector
unsigned int)(0xFFFFF000, 12345678, 0, 1);
9628 UIaux1
.v
= (vector
unsigned int)(0xFFFFFFF0, 10000000, 9, 9);
9630 b
= vec_any_lt (UIaux1
.v
, UIaux2
.v
);
9633 bAux
= bAux
|| (UIaux1
.e
[i
]<UIaux2
.e
[i
]);
9634 if (bAux
!=b
) err
= 1;
9637 printf("Function vec_any_lt [type unsigned int] ===> Error\n");
9639 printf("Function vec_any_lt [type unsigned int] ===> OK\n");
9641 #if defined TEST_FLOATS
9643 # if defined (GCC_COMPILER)
9644 Faux2
.v
= (vector
float) {-1.5, 1.0, 0.5, -3.999};
9645 Faux1
.v
= (vector
float) { 0.0, 3.5, 0.55, -1.5};
9646 # elif defined (MAC_COMPILER) || defined (XLC_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);
9650 b
= vec_any_lt (Faux1
.v
, Faux2
.v
);
9653 bAux
= bAux
|| (Faux1
.e
[i
]<Faux2
.e
[i
]);
9654 if (bAux
!=b
) err
= 1;
9656 # if defined (GCC_COMPILER)
9657 Faux2
.v
= (vector
float) {-1.5, 1.0, 0.5, -3.999};
9658 Faux1
.v
= (vector
float) { 0.0, 3.5, 0.5, -1.5};
9659 # elif defined (MAC_COMPILER) || defined (XLC_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);
9663 b
= vec_any_lt (Faux1
.v
, Faux2
.v
);
9666 bAux
= bAux
|| (Faux1
.e
[i
]<Faux2
.e
[i
]);
9667 if (bAux
!=b
) err
= 1;
9669 # if defined (GCC_COMPILER)
9670 Faux2
.v
= (vector
float) {-1.5, 1.0, 0.5, -3.999};
9671 Faux1
.v
= (vector
float) { 0.0, 3.5,-0.5, -1.5};
9672 # elif defined (MAC_COMPILER) || defined (XLC_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);
9676 b
= vec_any_lt (Faux1
.v
, Faux2
.v
);
9679 bAux
= bAux
|| (Faux1
.e
[i
]<Faux2
.e
[i
]);
9680 if (bAux
!=b
) err
= 1;
9683 printf("Function vec_any_lt [type float] ===> Error\n");
9685 printf("Function vec_any_lt [type float] ===> OK\n");
9689 #if defined TEST_FLOATS
9690 /* Function vec_any_nan */
9691 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
9693 # if defined (GCC_COMPILER)
9694 Faux1
.v
= (vector
float) { 0.0, 3.5, 0.55, -1.5};
9695 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
9696 Faux1
.v
= (vector
float) ( 0.0, 3.5, 0.55, -1.5);
9698 b
= vec_any_nan (Faux1
.v
);
9701 bAux
= bAux
|| isnan(Faux1
.e
[i
]);
9702 if (bAux
!=b
) err
= 1;
9704 # if defined (GCC_COMPILER)
9705 Faux1
.v
= (vector
float) { 0.0, 3.5, NAN
, -1.5};
9706 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
9707 Faux1
.v
= (vector
float) ( 0.0, 3.5, NAN
, -1.5);
9709 b
= vec_any_nan (Faux1
.v
);
9712 bAux
= bAux
|| isnan(Faux1
.e
[i
]);
9713 if (bAux
!=b
) err
= 1;
9715 # if defined (GCC_COMPILER)
9716 Faux1
.v
= (vector
float) { NAN
, 3.5, NAN
, -1.5};
9717 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
9718 Faux1
.v
= (vector
float) ( NAN
, 3.5, NAN
, -1.5);
9720 b
= vec_any_nan (Faux1
.v
);
9723 bAux
= bAux
|| isnan(Faux1
.e
[i
]);
9724 if (bAux
!=b
) err
= 1;
9727 printf("Function vec_any_nan [type float] ===> Error\n");
9729 printf("Function vec_any_nan [type float] ===> OK\n");
9733 /* Function vec_any_ne */
9734 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
9736 # if defined (GCC_COMPILER)
9737 Caux1
.v
= (vector
signed char){-8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7};
9738 Caux2
.v
= (vector
signed char){-8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7};
9739 # elif defined (MAC_COMPILER) || defined (XLC_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);
9743 b
= vec_any_ne (Caux1
.v
, Caux2
.v
);
9745 for (i
=0; i
<16; i
++)
9746 bAux
= bAux
|| (Caux1
.e
[i
]!=Caux2
.e
[i
]);
9747 if (bAux
!=b
) err
= 1;
9749 # if defined (GCC_COMPILER)
9750 Caux1
.v
= (vector
signed char){-8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7};
9751 Caux2
.v
= (vector
signed char){-8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7};
9752 # elif defined (MAC_COMPILER) || defined (XLC_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);
9756 b
= vec_any_ne (Caux1
.v
, Caux2
.v
);
9758 for (i
=0; i
<16; i
++)
9759 bAux
= bAux
|| (Caux1
.e
[i
]!=Caux2
.e
[i
]);
9760 if (bAux
!=b
) err
= 1;
9762 # if defined (GCC_COMPILER)
9763 Caux1
.v
= (vector
signed char){-8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7};
9764 Caux2
.v
= (vector
signed char){-8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7};
9765 # elif defined (MAC_COMPILER) || defined (XLC_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);
9769 b
= vec_any_ne (Caux1
.v
, Caux2
.v
);
9771 for (i
=0; i
<16; i
++)
9772 bAux
= bAux
|| (Caux1
.e
[i
]!=Caux2
.e
[i
]);
9773 if (bAux
!=b
) err
= 1;
9776 printf("Function vec_any_ne [type char] ===> Error\n");
9778 printf("Function vec_any_ne [type char] ===> OK\n");
9782 # if defined (GCC_COMPILER)
9783 UCaux1
.v
= (vector
unsigned char){200, 201, 206, 205, 204, 203, 202, 201, 200, 101, 102, 13, 14, 15, 16, 17};
9784 UCaux2
.v
= (vector
unsigned char){200, 201, 206, 205, 204, 203, 202, 201, 200, 101, 102, 13, 14, 15, 16, 17};
9785 # elif defined (MAC_COMPILER) || defined (XLC_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);
9789 b
= vec_any_ne (UCaux1
.v
, UCaux2
.v
);
9791 for (i
=0; i
<16; i
++)
9792 bAux
= bAux
|| (UCaux1
.e
[i
]!=UCaux2
.e
[i
]);
9793 if (bAux
!=b
) err
= 1;
9795 # if defined (GCC_COMPILER)
9796 UCaux1
.v
= (vector
unsigned char){200, 201, 206, 205, 204, 203, 202, 201, 200, 101, 102, 13, 14, 15, 16, 17};
9797 UCaux2
.v
= (vector
unsigned char){200, 201, 206, 205, 0, 203, 202, 201, 200, 101, 102, 13, 14, 15, 16, 17};
9798 # elif defined (MAC_COMPILER) || defined (XLC_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);
9802 b
= vec_any_ne (UCaux1
.v
, UCaux2
.v
);
9804 for (i
=0; i
<16; i
++)
9805 bAux
= bAux
|| (UCaux1
.e
[i
]!=UCaux2
.e
[i
]);
9806 if (bAux
!=b
) err
= 1;
9808 # if defined (GCC_COMPILER)
9809 UCaux1
.v
= (vector
unsigned char){200, 201, 206, 205, 204, 203, 202, 201, 200, 101, 102, 13, 14, 15, 16, 17};
9810 UCaux2
.v
= (vector
unsigned char){200, 201, 206, 206, 0, 203, 202, 201, 200, 101, 102, 13, 14, 15, 16, 17};
9811 # elif defined (MAC_COMPILER) || defined (XLC_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);
9815 b
= vec_any_ne (UCaux1
.v
, UCaux2
.v
);
9817 for (i
=0; i
<16; i
++)
9818 bAux
= bAux
|| (UCaux1
.e
[i
]!=UCaux2
.e
[i
]);
9819 if (bAux
!=b
) err
= 1;
9822 printf("Function vec_any_ne [type unsigned char] ===> Error\n");
9824 printf("Function vec_any_ne [type unsigned char] ===> OK\n");
9828 # if defined (GCC_COMPILER)
9829 Saux1
.v
= (vector
signed short){-3800, -3700, -3600, -3500, 0, 3300, 3200, 3100};
9830 Saux2
.v
= (vector
signed short){-3800, -3700, -3600, -3500, 0, 3300, 3200, 3100};
9831 # elif defined (MAC_COMPILER) || defined (XLC_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);
9835 b
= vec_any_ne (Saux1
.v
, Saux2
.v
);
9838 bAux
= bAux
|| (Saux1
.e
[i
]!=Saux2
.e
[i
]);
9839 if (bAux
!=b
) err
= 1;
9841 # if defined (GCC_COMPILER)
9842 Saux1
.v
= (vector
signed short){-3800, -3700, -3600, -3500, 0, 3300, 3200, 3100};
9843 Saux2
.v
= (vector
signed short){-3800, 3700, -3600, -3500, 0, 3300, 3200, 3100};
9844 # elif defined (MAC_COMPILER) || defined (XLC_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);
9848 b
= vec_any_ne (Saux1
.v
, Saux2
.v
);
9851 bAux
= bAux
|| (Saux1
.e
[i
]!=Saux2
.e
[i
]);
9852 if (bAux
!=b
) err
= 1;
9854 # if defined (GCC_COMPILER)
9855 Saux1
.v
= (vector
signed short){-3800, -3700, -3600, -3500, 0, 3300, 3200, 3100};
9856 Saux2
.v
= (vector
signed short){-3800, -3700, -3600, -3500, 0, 3300, 3100, 3100};
9857 # elif defined (MAC_COMPILER) || defined (XLC_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);
9861 b
= vec_any_ne (Saux1
.v
, Saux2
.v
);
9864 bAux
= bAux
|| (Saux1
.e
[i
]!=Saux2
.e
[i
]);
9865 if (bAux
!=b
) err
= 1;
9868 printf("Function vec_any_ne [type short] ===> Error\n");
9870 printf("Function vec_any_ne [type short] ===> OK\n");
9874 # if defined (GCC_COMPILER)
9875 USaux1
.v
= (vector
unsigned short){48000, 47000, 46000, 45000, 0, 3300, 3200, 3100};
9876 USaux2
.v
= (vector
unsigned short){48000, 47000, 46000, 45000, 0, 3300, 3200, 3100};
9877 # elif defined (MAC_COMPILER) || defined (XLC_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);
9881 b
= vec_any_ne (USaux1
.v
, USaux2
.v
);
9884 bAux
= bAux
|| (USaux1
.e
[i
]!=USaux2
.e
[i
]);
9885 if (bAux
!=b
) err
= 1;
9887 # if defined (GCC_COMPILER)
9888 USaux1
.v
= (vector
unsigned short){48000, 47000, 46000, 45000, 0, 3300, 3200, 3100};
9889 USaux2
.v
= (vector
unsigned short){48000, 47000, 46000, 45000, 0, 3300, 3100, 3100};
9890 # elif defined (MAC_COMPILER) || defined (XLC_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);
9894 b
= vec_any_ne (USaux1
.v
, USaux2
.v
);
9897 bAux
= bAux
|| (USaux1
.e
[i
]!=USaux2
.e
[i
]);
9898 if (bAux
!=b
) err
= 1;
9900 # if defined (GCC_COMPILER)
9901 USaux1
.v
= (vector
unsigned short){48000, 47000, 46000, 45000, 0, 3300, 3200, 3100};
9902 USaux2
.v
= (vector
unsigned short){48000, 47000, 46000, 0, 0, 3300, 3100, 3100};
9903 # elif defined (MAC_COMPILER) || defined (XLC_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);
9907 b
= vec_any_ne (USaux1
.v
, USaux2
.v
);
9910 bAux
= bAux
|| (USaux1
.e
[i
]!=USaux2
.e
[i
]);
9911 if (bAux
!=b
) err
= 1;
9914 printf("Function vec_any_ne [type unsigned short] ===> Error\n");
9916 printf("Function vec_any_ne [type unsigned short] ===> OK\n");
9920 # if defined (GCC_COMPILER)
9921 Iaux1
.v
= (vector
signed int){-1003800, -1003700, 0,1003300};
9922 Iaux2
.v
= (vector
signed int){-1003800, -1003700, 0,1003300};
9923 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
9924 Iaux1
.v
= (vector
signed int)(-1003800, -1003700, 0,1003300);
9925 Iaux2
.v
= (vector
signed int)(-1003800, -1003700, 0,1003300);
9927 b
= vec_any_ne (Iaux1
.v
, Iaux2
.v
);
9930 bAux
= bAux
|| (Iaux1
.e
[i
]!=Iaux2
.e
[i
]);
9931 if (bAux
!=b
) err
= 1;
9933 # if defined (GCC_COMPILER)
9934 Iaux1
.v
= (vector
signed int){-1003800, -1003700, 0,1003300};
9935 Iaux2
.v
= (vector
signed int){-1003800, -1003700, 0,1113300};
9936 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
9937 Iaux1
.v
= (vector
signed int)(-1003800, -1003700, 0,1003300);
9938 Iaux2
.v
= (vector
signed int)(-1003800, -1003700, 0,1113300);
9940 b
= vec_any_ne (Iaux1
.v
, Iaux2
.v
);
9943 bAux
= bAux
|| (Iaux1
.e
[i
]!=Iaux2
.e
[i
]);
9944 if (bAux
!=b
) err
= 1;
9946 # if defined (GCC_COMPILER)
9947 Iaux1
.v
= (vector
signed int){-1003800, -1003700, 0,1003300};
9948 Iaux2
.v
= (vector
signed int){-1003800, 10, 0,1113300};
9949 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
9950 Iaux1
.v
= (vector
signed int)(-1003800, -1003700, 0,1003300);
9951 Iaux2
.v
= (vector
signed int)(-1003800, 10, 0,1113300);
9953 b
= vec_any_ne (Iaux1
.v
, Iaux2
.v
);
9956 bAux
= bAux
|| (Iaux1
.e
[i
]!=Iaux2
.e
[i
]);
9957 if (bAux
!=b
) err
= 1;
9960 printf("Function vec_any_ne [type int] ===> Error\n");
9962 printf("Function vec_any_ne [type int] ===> OK\n");
9966 # if defined (GCC_COMPILER)
9967 UIaux1
.v
= (vector
unsigned int){0xFFFFF000, 12345678, 0, 1};
9968 UIaux2
.v
= (vector
unsigned int){0xFFFFF000, 12345678, 0, 1};
9969 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
9970 UIaux1
.v
= (vector
unsigned int)(0xFFFFF000, 12345678, 0, 1);
9971 UIaux2
.v
= (vector
unsigned int)(0xFFFFF000, 12345678, 0, 1);
9973 b
= vec_any_ne (UIaux1
.v
, UIaux2
.v
);
9976 bAux
= bAux
|| (UIaux1
.e
[i
]!=UIaux2
.e
[i
]);
9977 if (bAux
!=b
) err
= 1;
9979 # if defined (GCC_COMPILER)
9980 UIaux1
.v
= (vector
unsigned int){0xFFFFF000, 12345678, 0, 1};
9981 UIaux2
.v
= (vector
unsigned int){0xFFFFF000, 12345678, 5, 1};
9982 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
9983 UIaux1
.v
= (vector
unsigned int)(0xFFFFF000, 12345678, 0, 1);
9984 UIaux2
.v
= (vector
unsigned int)(0xFFFFF000, 12345678, 5, 1);
9986 b
= vec_any_ne (UIaux1
.v
, UIaux2
.v
);
9989 bAux
= bAux
|| (UIaux1
.e
[i
]!=UIaux2
.e
[i
]);
9990 if (bAux
!=b
) err
= 1;
9992 # if defined (GCC_COMPILER)
9993 UIaux1
.v
= (vector
unsigned int){0xFFFFF000, 12345678, 0, 1};
9994 UIaux2
.v
= (vector
unsigned int){0xFFFFFFF0, 12345678, 5, 1};
9995 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
9996 UIaux1
.v
= (vector
unsigned int)(0xFFFFF000, 12345678, 0, 1);
9997 UIaux2
.v
= (vector
unsigned int)(0xFFFFFFF0, 12345678, 5, 1);
9999 b
= vec_any_ne (UIaux1
.v
, UIaux2
.v
);
10001 for (i
=0; i
<4; i
++)
10002 bAux
= bAux
|| (UIaux1
.e
[i
]!=UIaux2
.e
[i
]);
10003 if (bAux
!=b
) err
= 1;
10006 printf("Function vec_any_ne [type unsigned int] ===> Error\n");
10008 printf("Function vec_any_ne [type unsigned int] ===> OK\n");
10010 #if defined TEST_FLOATS
10012 # if defined (GCC_COMPILER)
10013 Faux1
.v
= (vector
float) {-1.5, 1.0, 0.5, -3.999};
10014 Faux2
.v
= (vector
float) {-1.5, 1.0, 0.5, -3.999};
10015 # elif defined (MAC_COMPILER) || defined (XLC_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);
10019 b
= vec_any_ne (Faux1
.v
, Faux2
.v
);
10021 for (i
=0; i
<4; i
++)
10022 bAux
= bAux
|| (Faux1
.e
[i
]!=Faux2
.e
[i
]);
10023 if (bAux
!=b
) err
= 1;
10025 # if defined (GCC_COMPILER)
10026 Faux1
.v
= (vector
float) {-1.5, 1.0, 0.5, -3.999};
10027 Faux2
.v
= (vector
float) {-1.5, 1.0, 0.5, -3.998};
10028 # elif defined (MAC_COMPILER) || defined (XLC_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);
10032 b
= vec_any_ne (Faux1
.v
, Faux2
.v
);
10034 for (i
=0; i
<4; i
++)
10035 bAux
= bAux
|| (Faux1
.e
[i
]!=Faux2
.e
[i
]);
10036 if (bAux
!=b
) err
= 1;
10038 # if defined (GCC_COMPILER)
10039 Faux1
.v
= (vector
float) {-1.5, 1.0, 0.5, -3.999};
10040 Faux2
.v
= (vector
float) {-1.5, 0.0, 0.5, -3.998};
10041 # elif defined (MAC_COMPILER) || defined (XLC_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);
10045 b
= vec_any_ne (Faux1
.v
, Faux2
.v
);
10047 for (i
=0; i
<4; i
++)
10048 bAux
= bAux
|| (Faux1
.e
[i
]!=Faux2
.e
[i
]);
10049 if (bAux
!=b
) err
= 1;
10052 printf("Function vec_any_ne [type float] ===> Error\n");
10054 printf("Function vec_any_ne [type float] ===> OK\n");
10058 #if defined TEST_FLOATS
10059 /* Function vec_any_nge */
10060 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
10062 # if defined (GCC_COMPILER)
10063 Faux1
.v
= (vector
float) { 0.0, 3.5, 0.55, -1.5};
10064 Faux2
.v
= (vector
float) {-1.5, 1.0, 0.5, -3.999};
10065 # elif defined (MAC_COMPILER) || defined (XLC_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);
10069 b
= vec_any_nge (Faux1
.v
, Faux2
.v
);
10071 for (i
=0; i
<4; i
++)
10072 bAux
= bAux
|| isnan(Faux1
.e
[i
]) || isnan(Faux2
.e
[i
]) ||
10073 (Faux1
.e
[i
]<Faux2
.e
[i
]);
10074 if (bAux
!=b
) err
= 1;
10076 # if defined (GCC_COMPILER)
10077 Faux1
.v
= (vector
float) { 0.0, 3.5, 0.55, -1.5};
10078 Faux2
.v
= (vector
float) {-1.5, 1.0, 0.55, -3.999};
10079 # elif defined (MAC_COMPILER) || defined (XLC_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);
10083 b
= vec_any_nge (Faux1
.v
, Faux2
.v
);
10085 for (i
=0; i
<4; i
++)
10086 bAux
= bAux
|| isnan(Faux1
.e
[i
]) || isnan(Faux2
.e
[i
]) ||
10087 (Faux1
.e
[i
]<Faux2
.e
[i
]);
10088 if (bAux
!=b
) err
= 1;
10090 # if defined (GCC_COMPILER)
10091 Faux1
.v
= (vector
float) { 0.0, 3.5, 0.55, -1.5};
10092 Faux2
.v
= (vector
float) {-1.5, 5.0, 0.5, -3.999};
10093 # elif defined (MAC_COMPILER) || defined (XLC_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);
10097 b
= vec_any_nge (Faux1
.v
, Faux2
.v
);
10099 for (i
=0; i
<4; i
++)
10100 bAux
= bAux
|| isnan(Faux1
.e
[i
]) || isnan(Faux2
.e
[i
]) ||
10101 (Faux1
.e
[i
]<Faux2
.e
[i
]);
10102 if (bAux
!=b
) err
= 1;
10104 # if defined (GCC_COMPILER)
10105 Faux1
.v
= (vector
float) { 0.0, 3.5, 0.55, -1.5};
10106 Faux2
.v
= (vector
float) {-1.5, 1.0, NAN
, -3.999};
10107 # elif defined (MAC_COMPILER) || defined (XLC_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);
10111 b
= vec_any_nge (Faux1
.v
, Faux2
.v
);
10113 for (i
=0; i
<4; i
++)
10114 bAux
= bAux
|| isnan(Faux1
.e
[i
]) || isnan(Faux2
.e
[i
]) ||
10115 (Faux1
.e
[i
]<Faux2
.e
[i
]);
10116 if (bAux
!=b
) err
= 1;
10119 printf("Function vec_any_nge [type float] ===> Error\n");
10121 printf("Function vec_any_nge [type float] ===> OK\n");
10125 #if defined TEST_FLOATS
10126 /* Function vec_any_ngt */
10127 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
10129 # if defined (GCC_COMPILER)
10130 Faux1
.v
= (vector
float) { 0.0, 3.5, 0.55, -1.5};
10131 Faux2
.v
= (vector
float) {-1.5, 1.0, 0.5, -3.999};
10132 # elif defined (MAC_COMPILER) || defined (XLC_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);
10136 b
= vec_any_ngt (Faux1
.v
, Faux2
.v
);
10138 for (i
=0; i
<4; i
++)
10139 bAux
= bAux
|| isnan(Faux1
.e
[i
]) || isnan(Faux2
.e
[i
]) ||
10140 !(Faux1
.e
[i
]>Faux2
.e
[i
]);
10141 if (bAux
!=b
) err
= 1;
10143 # if defined (GCC_COMPILER)
10144 Faux1
.v
= (vector
float) { 0.0, 3.5, 0.55, -1.5};
10145 Faux2
.v
= (vector
float) {-1.5, 1.0, 0.55, -3.999};
10146 # elif defined (MAC_COMPILER) || defined (XLC_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);
10150 b
= vec_any_ngt (Faux1
.v
, Faux2
.v
);
10152 for (i
=0; i
<4; i
++)
10153 bAux
= bAux
|| isnan(Faux1
.e
[i
]) || isnan(Faux2
.e
[i
]) ||
10154 !(Faux1
.e
[i
]>Faux2
.e
[i
]);
10155 if (bAux
!=b
) err
= 1;
10157 # if defined (GCC_COMPILER)
10158 Faux1
.v
= (vector
float) { 0.0, 3.5, 0.55, -1.5};
10159 Faux2
.v
= (vector
float) {-1.5, 5.0, 0.5, -3.999};
10160 # elif defined (MAC_COMPILER) || defined (XLC_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);
10164 b
= vec_any_ngt (Faux1
.v
, Faux2
.v
);
10166 for (i
=0; i
<4; i
++)
10167 bAux
= bAux
|| isnan(Faux1
.e
[i
]) || isnan(Faux2
.e
[i
]) ||
10168 !(Faux1
.e
[i
]>Faux2
.e
[i
]);
10169 if (bAux
!=b
) err
= 1;
10171 # if defined (GCC_COMPILER)
10172 Faux1
.v
= (vector
float) { 0.0, 3.5, 0.55, -1.5};
10173 Faux2
.v
= (vector
float) {-1.5, 1.0, NAN
, -3.999};
10174 # elif defined (MAC_COMPILER) || defined (XLC_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);
10178 b
= vec_any_ngt (Faux1
.v
, Faux2
.v
);
10180 for (i
=0; i
<4; i
++)
10181 bAux
= bAux
|| isnan(Faux1
.e
[i
]) || isnan(Faux2
.e
[i
]) ||
10182 !(Faux1
.e
[i
]>Faux2
.e
[i
]);
10183 if (bAux
!=b
) err
= 1;
10186 printf("Function vec_any_ngt [type float] ===> Error\n");
10188 printf("Function vec_any_ngt [type float] ===> OK\n");
10192 #if defined TEST_FLOATS
10193 /* Function vec_any_nle */
10194 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
10196 # if defined (GCC_COMPILER)
10197 Faux1
.v
= (vector
float) {-1.5, 1.0, 0.5, -3.999};
10198 Faux2
.v
= (vector
float) { 0.0, 3.5, 0.55, -1.5};
10199 # elif defined (MAC_COMPILER) || defined (XLC_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);
10203 b
= vec_any_nle (Faux1
.v
, Faux2
.v
);
10205 for (i
=0; i
<4; i
++)
10207 (isnan(Faux1
.e
[i
]) || isnan(Faux2
.e
[i
]) || !(Faux1
.e
[i
]<=Faux2
.e
[i
]));
10208 if (bAux
!=b
) err
= 1;
10210 # if defined (GCC_COMPILER)
10211 Faux1
.v
= (vector
float) {-1.5, 1.0, 0.55, -3.999};
10212 Faux2
.v
= (vector
float) { 0.0, 3.5, 0.55, -1.5};
10213 # elif defined (MAC_COMPILER) || defined (XLC_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);
10217 b
= vec_any_nle (Faux1
.v
, Faux2
.v
);
10219 for (i
=0; i
<4; i
++)
10221 (isnan(Faux1
.e
[i
]) || isnan(Faux2
.e
[i
]) || !(Faux1
.e
[i
]<=Faux2
.e
[i
]));
10222 if (bAux
!=b
) err
= 1;
10224 # if defined (GCC_COMPILER)
10225 Faux1
.v
= (vector
float) {-1.5, 5.0, 0.5, -3.999};
10226 Faux2
.v
= (vector
float) { 0.0, 3.5, 0.55, -1.5};
10227 # elif defined (MAC_COMPILER) || defined (XLC_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);
10231 b
= vec_any_nle (Faux1
.v
, Faux2
.v
);
10233 for (i
=0; i
<4; i
++)
10235 (isnan(Faux1
.e
[i
]) || isnan(Faux2
.e
[i
]) || !(Faux1
.e
[i
]<=Faux2
.e
[i
]));
10236 if (bAux
!=b
) err
= 1;
10238 # if defined (GCC_COMPILER)
10239 Faux1
.v
= (vector
float) {-1.5, 1.0, NAN
, -3.999};
10240 Faux2
.v
= (vector
float) { 0.0, 3.5, 0.55, -1.5};
10241 # elif defined (MAC_COMPILER) || defined (XLC_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);
10245 b
= vec_any_nle (Faux1
.v
, Faux2
.v
);
10247 for (i
=0; i
<4; i
++)
10249 (isnan(Faux1
.e
[i
]) || isnan(Faux2
.e
[i
]) || !(Faux1
.e
[i
]<=Faux2
.e
[i
]));
10250 if (bAux
!=b
) err
= 1;
10253 printf("Function vec_any_nle [type float] ===> Error\n");
10255 printf("Function vec_any_nle [type float] ===> OK\n");
10259 #if defined TEST_FLOATS
10260 /* Function vec_any_nlt */
10261 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
10263 # if defined (GCC_COMPILER)
10264 Faux1
.v
= (vector
float) {-1.5, 1.0, 0.5, -3.999};
10265 Faux2
.v
= (vector
float) { 0.0, 3.5, 0.55, -1.5};
10266 # elif defined (MAC_COMPILER) || defined (XLC_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);
10270 b
= vec_any_nlt (Faux1
.v
, Faux2
.v
);
10272 for (i
=0; i
<4; i
++)
10274 (isnan(Faux1
.e
[i
]) || isnan(Faux2
.e
[i
]) || !(Faux1
.e
[i
]<Faux2
.e
[i
]));
10275 if (bAux
!=b
) err
= 1;
10277 # if defined (GCC_COMPILER)
10278 Faux1
.v
= (vector
float) {-1.5, 1.0, 0.55, -3.999};
10279 Faux2
.v
= (vector
float) { 0.0, 3.5, 0.55, -1.5};
10280 # elif defined (MAC_COMPILER) || defined (XLC_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);
10284 b
= vec_all_nlt (Faux1
.v
, Faux2
.v
);
10285 b
= vec_any_nlt (Faux1
.v
, Faux2
.v
);
10287 for (i
=0; i
<4; i
++)
10289 (isnan(Faux1
.e
[i
]) || isnan(Faux2
.e
[i
]) || !(Faux1
.e
[i
]<Faux2
.e
[i
]));
10290 if (bAux
!=b
) err
= 1;
10292 # if defined (GCC_COMPILER)
10293 Faux1
.v
= (vector
float) {-1.5, 5.0, 0.5, -3.999};
10294 Faux2
.v
= (vector
float) { 0.0, 3.5, 0.55, -1.5};
10295 # elif defined (MAC_COMPILER) || defined (XLC_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);
10299 b
= vec_any_nlt (Faux1
.v
, Faux2
.v
);
10301 for (i
=0; i
<4; i
++)
10303 (isnan(Faux1
.e
[i
]) || isnan(Faux2
.e
[i
]) || !(Faux1
.e
[i
]<Faux2
.e
[i
]));
10304 if (bAux
!=b
) err
= 1;
10306 # if defined (GCC_COMPILER)
10307 Faux1
.v
= (vector
float) {-1.5, 1.0, NAN
, -3.999};
10308 Faux2
.v
= (vector
float) { 0.0, 3.5, 0.55, -1.5};
10309 # elif defined (MAC_COMPILER) || defined (XLC_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);
10313 b
= vec_any_nlt (Faux1
.v
, Faux2
.v
);
10315 for (i
=0; i
<4; i
++)
10317 (isnan(Faux1
.e
[i
]) || isnan(Faux2
.e
[i
]) || !(Faux1
.e
[i
]<Faux2
.e
[i
]));
10318 if (bAux
!=b
) err
= 1;
10321 printf("Function vec_any_nlt [type float] ===> Error\n");
10323 printf("Function vec_any_nlt [type float] ===> OK\n");
10327 #if defined TEST_FLOATS
10328 /* Function vec_any_numeric */
10329 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
10331 # if defined (GCC_COMPILER)
10332 Faux1
.v
= (vector
float) { NAN
, NAN
, NAN
, NAN
};
10333 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
10334 Faux1
.v
= (vector
float) ( NAN
, NAN
, NAN
, NAN
);
10336 b
= vec_any_numeric (Faux1
.v
);
10338 for (i
=0; i
<4; i
++)
10339 bAux
= bAux
|| !isnan(Faux1
.e
[i
]);
10340 if (bAux
!=b
) err
= 1;
10342 # if defined (GCC_COMPILER)
10343 Faux1
.v
= (vector
float) { NAN
, 3.5, NAN
, NAN
};
10344 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
10345 Faux1
.v
= (vector
float) ( NAN
, 3.5, NAN
, NAN
);
10347 b
= vec_any_numeric (Faux1
.v
);
10349 for (i
=0; i
<4; i
++)
10350 bAux
= bAux
|| !isnan(Faux1
.e
[i
]);
10351 if (bAux
!=b
) err
= 1;
10353 # if defined (GCC_COMPILER)
10354 Faux1
.v
= (vector
float) { -1.5, 3.5, 0.55, -1.5};
10355 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
10356 Faux1
.v
= (vector
float) ( -1.5, 3.5, 0.55, -1.5);
10358 b
= vec_any_numeric (Faux1
.v
);
10360 for (i
=0; i
<4; i
++)
10361 bAux
= bAux
|| !isnan(Faux1
.e
[i
]);
10362 if (bAux
!=b
) err
= 1;
10365 printf("Function vec_any_numeric [type float] ===> Error\n");
10367 printf("Function vec_any_numeric [type float] ===> OK\n");
10371 #if defined TEST_FLOATS
10372 /* Function vec_any_out */
10373 printf("\n:::::::::::::::::::::::::::::::::::::::\n");
10377 I1
= vec_any_out( Faux1
.v
, Faux2
.v
);
10379 for ( i
=0; i
< 4; i
++ )
10381 Iaux
= Iaux
|| ((isnan(Faux1
.e
[i
])) || (isnan(Faux2
.e
[i
])) ||
10382 (Faux1
.e
[i
]>Faux2
.e
[i
]) || (Faux1
.e
[i
]<-Faux2
.e
[i
]));
10384 if (I1
!= Iaux
) err
++;
10386 # if defined (GCC_COMPILER)
10387 Faux1
.v
= (vector
float){-0.5, 1.0, 0, -0.999};
10388 # elif defined (MAC_COMPILER) || defined (XLC_COMPILER)
10389 Faux1
.v
= (vector
float)(-0.5, 1.0, 0, -0.999);
10392 I1
= vec_any_out( Faux1
.v
, Faux2
.v
);
10394 for ( i
=0; i
< 4; i
++ )
10396 Iaux
= Iaux
|| ((isnan(Faux1
.e
[i
])) || (isnan(Faux2
.e
[i
])) ||
10397 (Faux1
.e
[i
]>Faux2
.e
[i
]) || (Faux1
.e
[i
]<-Faux2
.e
[i
]));
10399 if (I1
!= Iaux
) err
++;
10402 printf("Function vec_any_out [type float] ===> Error\n");
10404 printf("Function vec_any_out [type float] ===> OK\n");