#include <stdio.h>
#endif
+#ifdef DEBUG2
+#include <stdio.h>
+#endif
+
+
void abort (void);
+#ifdef DEBUG2
+void print_signed_char (char *name, vector signed char src)
+{
+ int i;
+
+ for (i = 0; i < 8; i++)
+ printf("%s[%d] = %d, ", name, i, src[i]);
+
+ printf("\n");
+
+ for (i = 8; i < 15; i++)
+ printf("%s[%d] = %d, ", name, i, src[i]);
+
+ printf("%s[%d] = %d\n", name, 15, src[i]);
+}
+
+void print_unsigned_char (char *name, vector unsigned char src)
+{
+ int i;
+
+ for (i = 0; i < 8; i++)
+ printf("%s[%d] = %d, ", name, i, src[i]);
+
+ printf("\n");
+
+ for (i = 8; i < 15; i++)
+ printf("%s[%d] = %d, ", name, i, src[i]);
+
+ printf("%s[%d] = %d\n", name, 15, src[i]);
+}
+
+void print_signed_short_int (char *name, vector signed short int src)
+{
+ int i;
+
+ for (i = 0; i < 7; i++)
+ printf("%s[%d] = %d, ", name, i, src[i]);
+
+ printf("%s[%d] = %d\n", name, 7, src[i]);
+}
+
+void print_unsigned_short_int (char *name, vector unsigned short int src)
+{
+ int i;
+
+ for (i = 0; i < 7; i++)
+ printf("%s[%d] = %d, ", name, i, src[i]);
+
+ printf("%s[%d] = %d\n", name, 7, src[i]);
+}
+
+void print_signed_int (char *name, vector signed int src)
+{
+ int i;
+
+ for (i = 0; i < 3; i++)
+ printf("%s[%d] = %d, ", name, i, src[i]);
+
+ printf("%s[%d] = %d\n", name, 3, src[i]);
+}
+
+void print_unsigned_int (char *name, vector unsigned int src)
+{
+ int i;
+
+ for (i = 0; i < 3; i++)
+ printf("%s[%d] = %d, ", name, i, src[i]);
+
+ printf("%s[%d] = %d\n", name, 3, src[i]);
+}
+#endif
int main() {
unsigned int result, expected_result;
- /* Tests for: vec_first_match_index() */
+ /* Tests for: vec_first_match_index()
+ The element index in natural element order is returned for the
+ first match or the number of elements if there is no match. */
/* char */
char_src1 = (vector signed char) {-1, 2, 3, 4, -5, 6, 7, 8,
9, 10, 11, 12, 13, 14, 15, 16};
result = vec_first_match_index (char_src1, char_src2);
+#ifdef DEBUG2
+ print_signed_char("src1", char_src1);
+ print_signed_char("src2", char_src2);
+ printf(" vec_first_match_index = %d\n\n", result);
+#endif
+
if (result != expected_result)
#ifdef DEBUG
printf("Error: char first match result (%d) does not match expected result (%d)\n",
result = vec_first_match_index (char_src1, char_src2);
+#ifdef DEBUG2
+ print_signed_char("src1", char_src1);
+ print_signed_char("src2", char_src2);
+ printf("vec_first_match_index = %d\n\n", result);
+#endif
+
if (result != expected_result)
#ifdef DEBUG
printf("Error: char first match result (%d) does not match expected result (%d)\n",
result = vec_first_match_index (uchar_src1, uchar_src2);
+#ifdef DEBUG2
+ print_unsigned_char("src1", uchar_src1);
+ print_unsigned_char("src2", uchar_src2);
+ printf("vec_first_match_index = %d\n\n", result);
+#endif
+
if (result != expected_result)
#ifdef DEBUG
printf("Error: uchar first match result (%d) does not match expected result (%d)\n",
result = vec_first_match_index (uchar_src1, uchar_src2);
+#ifdef DEBUG2
+ print_unsigned_char("src1", uchar_src1);
+ print_unsigned_char("src2", uchar_src2);
+ printf("vec_first_match_index = %d\n\n", result);
+#endif
+
if (result != expected_result)
#ifdef DEBUG
printf("Error: uchar first match result (%d) does not match expected result (%d)\n",
result = vec_first_match_index (short_src1, short_src2);
+#ifdef DEBUG2
+ print_signed_short_int("src1", short_src1);
+ print_signed_short_int("src2", short_src2);
+ printf("vec_first_match_index = %d\n\n", result);
+#endif
+
if (result != expected_result)
#ifdef DEBUG
printf("Error: short int first match result (%d) does not match expected result (%d)\n",
result = vec_first_match_index (short_src1, short_src2);
+#ifdef DEBUG2
+ print_signed_short_int("src1", short_src1);
+ print_signed_short_int("src2", short_src2);
+ printf("vec_first_match_index = %d\n\n", result);
+#endif
+
if (result != expected_result)
#ifdef DEBUG
printf("Error: short int first match result (%d) does not match expected result (%d)\n",
result = vec_first_match_index (ushort_src1, ushort_src2);
+#ifdef DEBUG2
+ print_unsigned_short_int("src1", ushort_src1);
+ print_unsigned_short_int("src2", ushort_src2);
+ printf("vec_first_match_index = %d\n\n", result);
+#endif
+
if (result != expected_result)
#ifdef DEBUG
printf("Error: ushort int first match result (%d) does not match expected result (%d)\n",
result = vec_first_match_index (ushort_src1, ushort_src2);
+#ifdef DEBUG2
+ print_unsigned_short_int("src1", ushort_src1);
+ print_unsigned_short_int("src2", ushort_src2);
+ printf("vec_first_match_index = %d\n\n", result);
+#endif
+
if (result != expected_result)
#ifdef DEBUG
printf("Error: ushort int first match result (%d) does not match expected result (%d)\n",
result = vec_first_match_index (int_src1, int_src2);
+#ifdef DEBUG2
+ print_signed_int("src1", int_src1);
+ print_signed_int("src2", int_src2);
+ printf("vec_first_match_index = %d\n\n", result);
+#endif
+
if (result != expected_result)
#ifdef DEBUG
printf("Error: int first match result (%d) does not match expected result (%d)\n",
result = vec_first_match_index (int_src1, int_src2);
+#ifdef DEBUG2
+ print_signed_int("src1", int_src1);
+ print_signed_int("src2", int_src2);
+ printf("vec_first_match_index = %d\n\n", result);
+#endif
+
if (result != expected_result)
#ifdef DEBUG
printf("Error: int first match result (%d) does not match expected result (%d)\n",
result = vec_first_match_index (uint_src1, uint_src2);
+#ifdef DEBUG2
+ print_unsigned_int("src1", uint_src1);
+ print_unsigned_int("src2", uint_src2);
+ printf("vec_first_match_index = %d\n\n", result);
+#endif
+
if (result != expected_result)
#ifdef DEBUG
printf("Error: uint first match result (%d) does not match expected result (%d)\n",
result = vec_first_match_index (uint_src1, uint_src2);
+#ifdef DEBUG2
+ print_unsigned_int("src1", uint_src1);
+ print_unsigned_int("src2", uint_src2);
+ printf("vec_first_match_index = %d\n\n", result);
+#endif
+
if (result != expected_result)
#ifdef DEBUG
printf("Error: uint first match result (%d) does not match expected result (%d)\n",
abort();
#endif
- /* Tests for: vec_first_mismatch_index() */
+ /* Tests for: vec_first_mismatch_index()
+ The element index in BE order is returned for the first mismatch
+ or the number of elements if there is no match. */
/* char */
char_src1 = (vector signed char) {-1, 2, 3, 4, -5, 6, 7, 8,
9, 10, 11, 12, 13, 14, 15, 16};
result = vec_first_mismatch_index (char_src1, char_src2);
+#ifdef DEBUG2
+ print_signed_char("src1", char_src1);
+ print_signed_char("src2", char_src2);
+ printf("vec_first_mismatch_index = %d\n\n", result);
+#endif
+
if (result != expected_result)
#ifdef DEBUG
printf("Error: char first mismatch result (%d) does not match expected result (%d)\n",
result = vec_first_mismatch_index (char_src1, char_src2);
+#ifdef DEBUG2
+ print_signed_char("src1", char_src1);
+ print_signed_char("src2", char_src2);
+ printf("vec_first_mismatch_index = %d\n\n", result);
+#endif
+
if (result != expected_result)
#ifdef DEBUG
printf("Error: char first mismatch result (%d) does not match expected result (%d)\n",
result = vec_first_mismatch_index (uchar_src1, uchar_src2);
+#ifdef DEBUG2
+ print_unsigned_char("src1", uchar_src1);
+ print_unsigned_char("src2", uchar_src2);
+ printf("vec_first_mismatch_index = %d\n\n", result);
+#endif
+
if (result != expected_result)
#ifdef DEBUG
printf("Error: uchar first mismatch result (%d) does not match expected result (%d)\n",
result = vec_first_mismatch_index (uchar_src1, uchar_src2);
+#ifdef DEBUG2
+ print_unsigned_char("src1", uchar_src1);
+ print_unsigned_char("src2", uchar_src2);
+ printf("vec_first_mismatch_index = %d\n\n", result);
+#endif
+
if (result != expected_result)
#ifdef DEBUG
printf("Error: uchar first mismatch result (%d) does not match expected result (%d)\n",
- result, expected_result);
+ result, expected_result);
#else
abort();
#endif
result = vec_first_mismatch_index (uchar_src1, uchar_src2);
+#ifdef DEBUG2
+ print_unsigned_char("src1", uchar_src1);
+ print_unsigned_char("src2", uchar_src2);
+ printf("vec_first_mismatch_index = %d\n\n", result);
+#endif
+
if (result != expected_result)
#ifdef DEBUG
printf("Error: uchar first mismatch result (%d) does not match expected result (%d)\n",
result = vec_first_mismatch_index (short_src1, short_src2);
+#ifdef DEBUG2
+ print_signed_short_int("src1", short_src1);
+ print_signed_short_int("src2", short_src2);
+ printf("vec_first_mismatch_index = %d\n\n", result);
+#endif
+
if (result != expected_result)
#ifdef DEBUG
printf("Error: short int first mismatch result (%d) does not match expected result (%d)\n",
result = vec_first_mismatch_index (short_src1, short_src2);
+#ifdef DEBUG2
+ print_signed_short_int("src1", short_src1);
+ print_signed_short_int("src2", short_src2);
+ printf("vec_first_mismatch_index = %d\n\n", result);
+#endif
+
if (result != expected_result)
#ifdef DEBUG
printf("Error: short int first mismatch result (%d) does not match expected result (%d)\n",
result = vec_first_mismatch_index (ushort_src1, ushort_src2);
+#ifdef DEBUG2
+ print_unsigned_short_int("src1", ushort_src1);
+ print_unsigned_short_int("src2", ushort_src2);
+ printf("vec_first_mismatch_index = %d\n\n", result);
+#endif
+
if (result != expected_result)
#ifdef DEBUG
printf("Error: ushort int first mismatch result (%d) does not match expected result (%d)\n",
result = vec_first_mismatch_index (ushort_src1, ushort_src2);
+#ifdef DEBUG2
+ print_unsigned_short_int("src1", ushort_src1);
+ print_unsigned_short_int("src2", ushort_src2);
+ printf("vec_first_mismatch_index = %d\n\n", result);
+#endif
+
if (result != expected_result)
#ifdef DEBUG
printf("Error: ushort int first mismatch result (%d) does not match expected result (%d)\n",
result = vec_first_mismatch_index (int_src1, int_src2);
+#ifdef DEBUG2
+ print_signed_int("src1", int_src1);
+ print_signed_int("src2", int_src2);
+ printf("vec_first_mismatch_index = %d\n\n", result);
+#endif
+
if (result != expected_result)
#ifdef DEBUG
printf("Error: int first mismatch result (%d) does not match expected result (%d)\n",
result = vec_first_mismatch_index (int_src1, int_src2);
+#ifdef DEBUG2
+ print_signed_int("src1", int_src1);
+ print_signed_int("src2", int_src2);
+ printf("vec_first_mismatch_index = %d\n\n", result);
+#endif
+
if (result != expected_result)
#ifdef DEBUG
printf("Error: int first mismatch result (%d) does not match expected result (%d)\n",
result = vec_first_mismatch_index (int_src1, int_src2);
+#ifdef DEBUG2
+ print_signed_int("src1", int_src1);
+ print_signed_int("src2", int_src2);
+ printf("vec_first_mismatch_index = %d\n\n", result);
+#endif
+
if (result != expected_result)
#ifdef DEBUG
printf("Error: int first mismatch result (%d) does not match expected result (%d)\n",
result = vec_first_mismatch_index (uint_src1, uint_src2);
+#ifdef DEBUG2
+ print_unsigned_int("src1", uint_src1);
+ print_unsigned_int("src2", uint_src2);
+ printf("vec_first_mismatch_index = %d\n\n", result);
+#endif
+
if (result != expected_result)
#ifdef DEBUG
printf("Error: uint first mismatch result (%d) does not match expected result (%d)\n",
result = vec_first_mismatch_index (uint_src1, uint_src2);
+#ifdef DEBUG2
+ print_unsigned_int("src1", uint_src1);
+ print_unsigned_int("src2", uint_src2);
+ printf("vec_first_mismatch_index = %d\n\n", result);
+#endif
+
if (result != expected_result)
+
#ifdef DEBUG
printf("Error: uint first mismatch result (%d) does not match expected result (%d)\n",
result, expected_result);
abort();
#endif
- /* Tests for: vec_first_match_or_eos_index() */
+ /* Tests for: vec_first_match_or_eos_index()
+ The element index in BE order is returned for the first match
+ or the number of elements if there is no match. */
/* char */
char_src1 = (vector signed char) {-1, 2, 3, 4, -5, 6, 7, 8,
9, 10, 11, 12, 13, 14, 15, 16};
result = vec_first_match_or_eos_index (char_src1, char_src2);
+#ifdef DEBUG2
+ print_signed_char("src1", char_src1);
+ print_signed_char("src2", char_src2);
+ printf("vec_first_match_or_eos_index = %d\n\n", result);
+#endif
+
if (result != expected_result)
#ifdef DEBUG
printf("Error: char first match result (%d) does not match expected result (%d)\n",
result = vec_first_match_or_eos_index (char_src1, char_src2);
+#ifdef DEBUG2
+ print_signed_char("src1", char_src1);
+ print_signed_char("src2", char_src2);
+ printf("vec_first_mismatch_or_eos_index = %d\n\n", result);
+#endif
+
if (result != expected_result)
#ifdef DEBUG
printf("Error: char first match or EOS result (%d) does not match expected result (%d)\n",
result = vec_first_match_or_eos_index (char_src1, char_src2);
+#ifdef DEBUG2
+ print_signed_char("src1", char_src1);
+ print_signed_char("src2", char_src2);
+ printf("vec_first_match_or_eos_index = %d\n\n", result);
+#endif
+
if (result != expected_result)
#ifdef DEBUG
printf("Error: char first match or EOS result (%d) does not match expected result (%d)\n",
result, expected_result);
#else
- abort();
+ abort();
#endif
uchar_src1 = (vector unsigned char) {1, 2, 3, 4, 5, 6, 7, 8,
result = vec_first_match_or_eos_index (uchar_src1, uchar_src2);
+#ifdef DEBUG2
+ print_unsigned_char("src1", uchar_src1);
+ print_unsigned_char("src2", uchar_src2);
+ printf("vec_first_match_or_eos_index = %d\n\n", result);
+#endif
+
if (result != expected_result)
#ifdef DEBUG
printf("Error: uchar first match or EOS result (%d) does not match expected result (%d)\n",
result = vec_first_match_or_eos_index (uchar_src1, uchar_src2);
+#ifdef DEBUG2
+ print_unsigned_char("src1", uchar_src1);
+ print_unsigned_char("src2", uchar_src2);
+ printf("vec_first_match_or_eos_index = %d\n\n", result);
+#endif
+
if (result != expected_result)
#ifdef DEBUG
printf("Error: uchar first match or EOS result (%d) does not match expected result (%d)\n",
result = vec_first_match_or_eos_index (short_src1, short_src2);
+#ifdef DEBUG2
+ print_signed_short_int("src1", short_src1);
+ print_signed_short_int("src2", short_src2);
+ printf("vec_first_match_or_eos_index = %d\n\n", result);
+#endif
+
if (result != expected_result)
#ifdef DEBUG
printf("Error: short int first match or EOS result (%d) does not match expected result (%d)\n",
result = vec_first_match_or_eos_index (short_src1, short_src2);
+#ifdef DEBUG2
+ print_signed_short_int("src1", short_src1);
+ print_signed_short_int("src2", short_src2);
+ printf("vec_first_match_or_eos_index = %d\n\n", result);
+#endif
+
if (result != expected_result)
#ifdef DEBUG
printf("Error: short int first match or EOS result (%d) does not match expected result (%d)\n",
result = vec_first_match_or_eos_index (short_src1, short_src2);
+#ifdef DEBUG2
+ print_signed_short_int("src1", short_src1);
+ print_signed_short_int("src2", short_src2);
+ printf("vec_first_match_or_eos_index = %d\n\n", result);
+#endif
+
if (result != expected_result)
#ifdef DEBUG
printf("Error: short int first match or EOS result (%d) does not match expected result (%d)\n",
result = vec_first_match_or_eos_index (short_src1, short_src2);
+#ifdef DEBUG2
+ print_signed_short_int("src1", short_src1);
+ print_signed_short_int("src2", short_src2);
+ printf("vec_first_match_or_eos_index = %d\n\n", result);
+#endif
+
if (result != expected_result)
#ifdef DEBUG
printf("Error: short int first match or EOS result (%d) does not match expected result (%d)\n",
result = vec_first_match_or_eos_index (ushort_src1, ushort_src2);
+#ifdef DEBUG2
+ print_unsigned_short_int("src1", ushort_src1);
+ print_unsigned_short_int("src2", ushort_src2);
+ printf("vec_first_match_or_eos_index = %d\n\n", result);
+#endif
+
if (result != expected_result)
#ifdef DEBUG
printf("Error: ushort int first match or EOS result (%d) does not match expected result (%d)\n",
result = vec_first_match_or_eos_index (ushort_src1, ushort_src2);
+#ifdef DEBUG2
+ print_unsigned_short_int("src1", ushort_src1);
+ print_unsigned_short_int("src2", ushort_src2);
+ printf("vec_first_match_or_eos_index = %d\n\n", result);
+#endif
+
if (result != expected_result)
#ifdef DEBUG
printf("Error: ushort int first match or EOS result (%d) does not match expected result (%d)\n",
result = vec_first_match_or_eos_index (ushort_src1, ushort_src2);
+#ifdef DEBUG2
+ print_unsigned_short_int("src1", ushort_src1);
+ print_unsigned_short_int("src2", ushort_src2);
+ printf("vec_first_match_or_eos_index = %d\n\n", result);
+#endif
+
if (result != expected_result)
#ifdef DEBUG
- printf("Error: ushort int first match or EOS result (%d) does not match expected result (%d)\n",
- result, expected_result);
+ printf("Error: ushort int first match or EOS result (%d) does not match expected result (%d)\n",
+ result, expected_result);
#else
abort();
#endif
result = vec_first_match_or_eos_index (int_src1, int_src2);
+#ifdef DEBUG2
+ print_signed_int("src1", int_src1);
+ print_signed_int("src2", int_src2);
+ printf("vec_first_match_or_eos_index = %d\n\n", result);
+#endif
+
if (result != expected_result)
#ifdef DEBUG
printf("Error: int first match or EOS result (%d) does not match expected result (%d)\n",
result = vec_first_match_or_eos_index (int_src1, int_src2);
+#ifdef DEBUG2
+ print_signed_int("src1", int_src1);
+ print_signed_int("src2", int_src2);
+ printf("vec_first_match_or_eos_index = %d\n\n", result);
+#endif
+
if (result != expected_result)
#ifdef DEBUG
printf("Error: int first match or EOS result (%d) does not match expected result (%d)\n",
result = vec_first_match_or_eos_index (int_src1, int_src2);
+#ifdef DEBUG2
+ print_signed_int("src1", int_src1);
+ print_signed_int("src2", int_src2);
+ printf("vec_first_match_or_eos_index = %d\n\n", result);
+#endif
+
if (result != expected_result)
#ifdef DEBUG
- printf("Error: int first match or EOS result (%d) does not match expected result (%d)\n",
- result, expected_result);
+ printf("Error: int first match or EOS result (%d) does not match expected result (%d)\n",
+ result, expected_result);
#else
abort();
#endif
result = vec_first_match_or_eos_index (uint_src1, uint_src2);
+#ifdef DEBUG2
+ print_unsigned_int("src1", uint_src1);
+ print_unsigned_int("src2", uint_src2);
+ printf("vec_first_match_or_eos_index = %d\n\n", result);
+#endif
+
if (result != expected_result)
#ifdef DEBUG
printf("Error: uint first match or EOS result (%d) does not match expected result (%d)\n",
result = vec_first_match_or_eos_index (uint_src1, uint_src2);
+#ifdef DEBUG2
+ print_unsigned_int("src1", uint_src1);
+ print_unsigned_int("src2", uint_src2);
+ printf("vec_first_match_or_eos_index = %d\n\n", result);
+#endif
+
if (result != expected_result)
#ifdef DEBUG
printf("Error: uint first match or EOS result (%d) does not match expected result (%d)\n",
result = vec_first_match_or_eos_index (uint_src1, uint_src2);
+#ifdef DEBUG2
+ print_unsigned_int("src1", uint_src1);
+ print_unsigned_int("src2", uint_src2);
+ printf("vec_first_match_or_eos_index = %d\n\n", result);
+#endif
+
if (result != expected_result)
#ifdef DEBUG
printf("Error: uint first match or EOS result (%d) does not match expected result (%d)\n",
abort();
#endif
- /* Tests for: vec_first_mismatch_or_eos_index() */
+ /* Tests for: vec_first_mismatch_or_eos_index()
+ The element index in BE order is returned for the first mismatch
+ or the number of elements if there is no match. */
/* char */
char_src1 = (vector signed char) {-1, 2, 3, 4, -5, 6, 7, 8,
9, 10, 11, 12, 13, 14, 15, 16};
result = vec_first_mismatch_or_eos_index (char_src1, char_src2);
+#ifdef DEBUG2
+ print_signed_char("src1", char_src1);
+ print_signed_char("src2", char_src2);
+ printf("vec_first_mismatch_or_eos_index = %d\n\n", result);
+#endif
+
if (result != expected_result)
#ifdef DEBUG
printf("Error: char first mismatch or EOS result (%d) does not match expected result (%d)\n",
result = vec_first_mismatch_or_eos_index (char_src1, char_src2);
+#ifdef DEBUG2
+ print_signed_char("src1", char_src1);
+ print_signed_char("src2", char_src2);
+ printf("vec_first_mismatch_or_eos_index = %d\n\n", result);
+#endif
+
if (result != expected_result)
#ifdef DEBUG
printf("Error: char first mismatch or EOS result (%d) does not match expected result (%d)\n",
result = vec_first_mismatch_or_eos_index (char_src1, char_src2);
+#ifdef DEBUG2
+ print_signed_char("src1", char_src1);
+ print_signed_char("src2", char_src2);
+ printf("vec_first_mismatch_or_eos_index = %d\n\n", result);
+#endif
+
if (result != expected_result)
#ifdef DEBUG
printf("Error: char first mismatch or EOS result (%d) does not match expected result (%d)\n",
result = vec_first_mismatch_or_eos_index (uchar_src1, uchar_src2);
+#ifdef DEBUG2
+ print_unsigned_char("src1", uchar_src1);
+ print_unsigned_char("src2", uchar_src2);
+ printf("vec_first_mismatch_or_eos_index = %d\n\n", result);
+#endif
+
if (result != expected_result)
#ifdef DEBUG
printf("Error: uchar first mismatch or EOS result (%d) does not match expected result (%d)\n",
result, expected_result);
#else
- abort();
+ abort();
#endif
uchar_src1 = (vector unsigned char) {2, 3, 4, 5, 6, 7, 8, 9,
result = vec_first_mismatch_or_eos_index (uchar_src1, uchar_src2);
+#ifdef DEBUG2
+ print_unsigned_char("src1", uchar_src1);
+ print_unsigned_char("src2", uchar_src2);
+ printf("vec_first_mismatch_or_eos_index = %d\n\n", result);
+#endif
+
if (result != expected_result)
#ifdef DEBUG
printf("Error: uchar first mismatch or EOS result (%d) does not match expected result (%d)\n",
result = vec_first_mismatch_or_eos_index (uchar_src1, uchar_src2);
+#ifdef DEBUG2
+ print_unsigned_char("src1", uchar_src1);
+ print_unsigned_char("src2", uchar_src2);
+ printf("vec_first_mismatch_or_eos_index = %d\n\n", result);
+#endif
+
if (result != expected_result)
#ifdef DEBUG
printf("Error: uchar first mismatch or EOS result (%d) does not match expected result (%d)\n",
result = vec_first_mismatch_or_eos_index (uchar_src1, uchar_src2);
+#ifdef DEBUG2
+ print_unsigned_char("src1", uchar_src1);
+ print_unsigned_char("src2", uchar_src2);
+ printf("vec_first_mismatch_or_eos_index = %d\n\n", result);
+#endif
+
if (result != expected_result)
#ifdef DEBUG
printf("Error: uchar first mismatch or EOS result (%d) does not match expected result (%d)\n",
result = vec_first_mismatch_or_eos_index (short_src1, short_src2);
+#ifdef DEBUG2
+ print_signed_short_int("src1", short_src1);
+ print_signed_short_int("src2", short_src2);
+ printf("vec_first_mismatch_or_eos_index = %d\n\n", result);
+#endif
+
if (result != expected_result)
#ifdef DEBUG
printf("Error: short int first mismatch or EOS result (%d) does not match expected result (%d)\n",
result = vec_first_mismatch_or_eos_index (short_src1, short_src2);
+#ifdef DEBUG2
+ print_signed_short_int("src1", short_src1);
+ print_signed_short_int("src2", short_src2);
+ printf("vec_first_mismatch_or_eos_index = %d\n\n", result);
+#endif
+
if (result != expected_result)
#ifdef DEBUG
printf("Error: short int first mismatch or EOS result (%d) does not match expected result (%d)\n",
result = vec_first_mismatch_or_eos_index (short_src1, short_src2);
+#ifdef DEBUG2
+ print_signed_short_int("src1", short_src1);
+ print_signed_short_int("src2", short_src2);
+ printf("vec_first_mismatch_or_eos_index = %d\n\n", result);
+#endif
+
if (result != expected_result)
#ifdef DEBUG
printf("Error: short int first mismatch or EOS result (%d) does not match expected result (%d)\n",
result = vec_first_mismatch_or_eos_index (short_src1, short_src2);
+#ifdef DEBUG2
+ print_signed_short_int("src1", short_src1);
+ print_signed_short_int("src2", short_src2);
+ printf("vec_first_mismatch_or_eos_index = %d\n\n", result);
+#endif
+
if (result != expected_result)
#ifdef DEBUG
printf("Error: short int first mismatch or EOS result (%d) does not match expected result (%d)\n",
result = vec_first_mismatch_or_eos_index (ushort_src1, ushort_src2);
+#ifdef DEBUG2
+ print_unsigned_short_int("src1", ushort_src1);
+ print_unsigned_short_int("src2", ushort_src2);
+ printf("vec_first_mismatch_or_eos_index = %d\n\n", result);
+#endif
+
if (result != expected_result)
#ifdef DEBUG
printf("Error: ushort int first mismatch or EOS result (%d) does not match expected result (%d)\n",
result = vec_first_mismatch_or_eos_index (ushort_src1, ushort_src2);
- if (result != expected_result)
+#ifdef DEBUG2
+ print_unsigned_short_int("src1", ushort_src1);
+ print_unsigned_short_int("src2", ushort_src2);
+ printf("vec_first_mismatch_or_eos_index = %d\n\n", result);
+#endif
+
+ if (result != expected_result)
#ifdef DEBUG
printf("Error: ushort int first mismatch or EOS result (%d) does not match expected result (%d)\n",
result, expected_result);
result = vec_first_mismatch_or_eos_index (ushort_src1, ushort_src2);
+#ifdef DEBUG2
+ print_unsigned_short_int("src1", ushort_src1);
+ print_unsigned_short_int("src2", ushort_src2);
+ printf("vec_first_mismatch_or_eos_index = %d\n\n", result);
+#endif
+
if (result != expected_result)
#ifdef DEBUG
printf("Error: ushort int first mismatch or EOS result (%d) does not match expected result (%d)\n",
result = vec_first_mismatch_or_eos_index (int_src1, int_src2);
+#ifdef DEBUG2
+ print_signed_int("src1", int_src1);
+ print_signed_int("src2", int_src2);
+ printf("vec_first_mismatch_or_eos_index = %d\n\n", result);
+#endif
+
if (result != expected_result)
#ifdef DEBUG
printf("Error: int first mismatch or EOS result (%d) does not match expected result (%d)\n",
result = vec_first_mismatch_or_eos_index (int_src1, int_src2);
+#ifdef DEBUG2
+ print_signed_int("src1", int_src1);
+ print_signed_int("src2", int_src2);
+ printf("vec_first_mismatch_or_eos_index = %d\n\n", result);
+#endif
+
if (result != expected_result)
#ifdef DEBUG
printf("Error: int first mismatch result (%d) does not match expected result (%d)\n",
result = vec_first_mismatch_or_eos_index (int_src1, int_src2);
+#ifdef DEBUG2
+ print_signed_int("src1", int_src1);
+ print_signed_int("src2", int_src2);
+ printf("vec_first_mismatch_or_eos_index = %d\n\n", result);
+#endif
+
if (result != expected_result)
#ifdef DEBUG
printf("Error: int first mismatch result (%d) does not match expected result (%d)\n",
result = vec_first_mismatch_or_eos_index (int_src1, int_src2);
+#ifdef DEBUG2
+ print_signed_int("src1", int_src1);
+ print_signed_int("src2", int_src2);
+ printf("vec_first_mismatch_or_eos_index = %d\n\n", result);
+#endif
if (result != expected_result)
#ifdef DEBUG
printf("Error: int first mismatch result (%d) does not match expected result (%d)\n",
result = vec_first_mismatch_or_eos_index (uint_src1, uint_src2);
+#ifdef DEBUG2
+ print_unsigned_int("src1", uint_src1);
+ print_unsigned_int("src2", uint_src2);
+ printf("vec_first_mismatch_or_eos_index = %d\n\n", result);
+#endif
if (result != expected_result)
#ifdef DEBUG
- printf("Error: uint first mismatch result (%d) does not match expected result (%d)\n",
+ printf("Error: uint first mismatch or eos index result (%d) does not match expected result (%d)\n",
result, expected_result);
#else
abort();
result = vec_first_mismatch_or_eos_index (uint_src1, uint_src2);
+#ifdef DEBUG2
+ print_unsigned_int("src1", uint_src1);
+ print_unsigned_int("src2", uint_src2);
+ printf("vec_first_mismatch_or_eos_index = %d\n\n", result);
+#endif
+
if (result != expected_result)
#ifdef DEBUG
- printf("Error: uint first mismatch result (%d) does not match expected result (%d)\n",
+ printf("Error: uint first mismatch or eos index result (%d) does not match expected result (%d)\n",
result, expected_result);
#else
abort();
result = vec_first_mismatch_or_eos_index (uint_src1, uint_src2);
+#ifdef DEBUG2
+ print_unsigned_int("src1", uint_src1);
+ print_unsigned_int("src2", uint_src2);
+ printf("vec_first_mismatch_or_eos_index = %d\n\n", result);
+#endif
+
if (result != expected_result)
#ifdef DEBUG
- printf("Error: uint first mismatch result (%d) does not match expected result (%d)\n",
+ printf("Error: uint first mismatch or eos index result (%d) does not match expected result (%d)\n",
result, expected_result);
#else
abort();