Lines Matching refs:s1

26   private static short sadCastChar2Short(char[] s1, char[] s2) {  in sadCastChar2Short()  argument
27 int min_length = Math.min(s1.length, s2.length); in sadCastChar2Short()
30 sad += Math.abs(((short) s1[i]) - ((short) s2[i])); in sadCastChar2Short()
35 private static short sadCastChar2ShortAlt(char[] s1, char[] s2) { in sadCastChar2ShortAlt() argument
36 int min_length = Math.min(s1.length, s2.length); in sadCastChar2ShortAlt()
39 short s = (short) s1[i]; in sadCastChar2ShortAlt()
46 private static short sadCastChar2ShortAlt2(char[] s1, char[] s2) { in sadCastChar2ShortAlt2() argument
47 int min_length = Math.min(s1.length, s2.length); in sadCastChar2ShortAlt2()
50 short s = (short) s1[i]; in sadCastChar2ShortAlt2()
107 private static int sadCastChar2Int(char[] s1, char[] s2) { in sadCastChar2Int() argument
108 int min_length = Math.min(s1.length, s2.length); in sadCastChar2Int()
111 sad += Math.abs(((short) s1[i]) - ((short) s2[i])); in sadCastChar2Int()
164 private static int sadCastChar2IntAlt(char[] s1, char[] s2) { in sadCastChar2IntAlt() argument
165 int min_length = Math.min(s1.length, s2.length); in sadCastChar2IntAlt()
168 short s = (short) s1[i]; in sadCastChar2IntAlt()
223 private static int sadCastChar2IntAlt2(char[] s1, char[] s2) { in sadCastChar2IntAlt2() argument
224 int min_length = Math.min(s1.length, s2.length); in sadCastChar2IntAlt2()
227 short s = (short) s1[i]; in sadCastChar2IntAlt2()
291 private static long sadCastChar2Long(char[] s1, char[] s2) { in sadCastChar2Long() argument
292 int min_length = Math.min(s1.length, s2.length); in sadCastChar2Long()
295 long x = (short) s1[i]; in sadCastChar2Long()
356 private static long sadCastChar2LongAt1(char[] s1, char[] s2) { in sadCastChar2LongAt1() argument
357 int min_length = Math.min(s1.length, s2.length); in sadCastChar2LongAt1()
360 long x = (short) s1[i]; in sadCastChar2LongAt1()
369 char[] s1 = { 0, 0x8000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; in main() local
371 expectEquals(-1, sadCastChar2Short(s1, s2)); in main()
372 expectEquals(-1, sadCastChar2Short(s2, s1)); in main()
373 expectEquals(-1, sadCastChar2ShortAlt(s1, s2)); in main()
374 expectEquals(-1, sadCastChar2ShortAlt(s2, s1)); in main()
375 expectEquals(-1, sadCastChar2ShortAlt2(s1, s2)); in main()
376 expectEquals(-1, sadCastChar2ShortAlt2(s2, s1)); in main()
377 expectEquals(65535, sadCastChar2Int(s1, s2)); in main()
378 expectEquals(65535, sadCastChar2Int(s2, s1)); in main()
379 expectEquals(65535, sadCastChar2IntAlt(s1, s2)); in main()
380 expectEquals(65535, sadCastChar2IntAlt(s2, s1)); in main()
381 expectEquals(65535, sadCastChar2IntAlt2(s1, s2)); in main()
382 expectEquals(65535, sadCastChar2IntAlt2(s2, s1)); in main()
383 expectEquals(65535L, sadCastChar2Long(s1, s2)); in main()
384 expectEquals(65535L, sadCastChar2Long(s2, s1)); in main()
385 expectEquals(65536L, sadCastChar2LongAt1(s1, s2)); in main()
386 expectEquals(65536L, sadCastChar2LongAt1(s2, s1)); in main()
401 s1 = new char[m]; in main()
406 s1[k] = interesting[i]; in main()
411 s1[k] = 10; in main()
413 expectEquals(-18932, sadCastChar2Short(s1, s2)); in main()
414 expectEquals(-18932, sadCastChar2ShortAlt(s1, s2)); in main()
415 expectEquals(-18932, sadCastChar2ShortAlt2(s1, s2)); in main()
416 expectEquals(1291788, sadCastChar2Int(s1, s2)); in main()
417 expectEquals(1291788, sadCastChar2IntAlt(s1, s2)); in main()
418 expectEquals(1291788, sadCastChar2IntAlt2(s1, s2)); in main()
419 expectEquals(1291788L, sadCastChar2Long(s1, s2)); in main()
420 expectEquals(1291789L, sadCastChar2LongAt1(s1, s2)); in main()