Lines Matching refs:s2
26 private static short sadCastedChar2Short(char[] s1, char[] s2) { in sadCastedChar2Short() argument
27 int min_length = Math.min(s1.length, s2.length); in sadCastedChar2Short()
30 sad += Math.abs(((short) s1[i]) - ((short) s2[i])); in sadCastedChar2Short()
35 private static short sadCastedChar2ShortAlt(char[] s1, char[] s2) { in sadCastedChar2ShortAlt() argument
36 int min_length = Math.min(s1.length, s2.length); in sadCastedChar2ShortAlt()
40 short p = (short) s2[i]; in sadCastedChar2ShortAlt()
46 private static short sadCastedChar2ShortAlt2(char[] s1, char[] s2) { in sadCastedChar2ShortAlt2() argument
47 int min_length = Math.min(s1.length, s2.length); in sadCastedChar2ShortAlt2()
51 short p = (short) s2[i]; in sadCastedChar2ShortAlt2()
97 private static int sadCastedChar2Int(char[] s1, char[] s2) { in sadCastedChar2Int() argument
98 int min_length = Math.min(s1.length, s2.length); in sadCastedChar2Int()
101 sad += Math.abs(((short) s1[i]) - ((short) s2[i])); in sadCastedChar2Int()
145 private static int sadCastedChar2IntAlt(char[] s1, char[] s2) { in sadCastedChar2IntAlt() argument
146 int min_length = Math.min(s1.length, s2.length); in sadCastedChar2IntAlt()
150 short p = (short) s2[i]; in sadCastedChar2IntAlt()
195 private static int sadCastedChar2IntAlt2(char[] s1, char[] s2) { in sadCastedChar2IntAlt2() argument
196 int min_length = Math.min(s1.length, s2.length); in sadCastedChar2IntAlt2()
200 short p = (short) s2[i]; in sadCastedChar2IntAlt2()
253 private static long sadCastedChar2Long(char[] s1, char[] s2) { in sadCastedChar2Long() argument
254 int min_length = Math.min(s1.length, s2.length); in sadCastedChar2Long()
258 long y = (short) s2[i]; in sadCastedChar2Long()
309 private static long sadCastedChar2LongAt1(char[] s1, char[] s2) { in sadCastedChar2LongAt1() argument
310 int min_length = Math.min(s1.length, s2.length); in sadCastedChar2LongAt1()
314 long y = (short) s2[i]; in sadCastedChar2LongAt1()
323 char[] s2 = { 0, 0x7fff, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; in main() local
324 expectEquals(-1, sadCastedChar2Short(s1, s2)); in main()
325 expectEquals(-1, sadCastedChar2Short(s2, s1)); in main()
326 expectEquals(-1, sadCastedChar2ShortAlt(s1, s2)); in main()
327 expectEquals(-1, sadCastedChar2ShortAlt(s2, s1)); in main()
328 expectEquals(-1, sadCastedChar2ShortAlt2(s1, s2)); in main()
329 expectEquals(-1, sadCastedChar2ShortAlt2(s2, s1)); in main()
330 expectEquals(65535, sadCastedChar2Int(s1, s2)); in main()
331 expectEquals(65535, sadCastedChar2Int(s2, s1)); in main()
332 expectEquals(65535, sadCastedChar2IntAlt(s1, s2)); in main()
333 expectEquals(65535, sadCastedChar2IntAlt(s2, s1)); in main()
334 expectEquals(65535, sadCastedChar2IntAlt2(s1, s2)); in main()
335 expectEquals(65535, sadCastedChar2IntAlt2(s2, s1)); in main()
336 expectEquals(65535L, sadCastedChar2Long(s1, s2)); in main()
337 expectEquals(65535L, sadCastedChar2Long(s2, s1)); in main()
338 expectEquals(65536L, sadCastedChar2LongAt1(s1, s2)); in main()
339 expectEquals(65536L, sadCastedChar2LongAt1(s2, s1)); in main()
355 s2 = new char[m]; in main()
360 s2[k] = interesting[j]; in main()
365 s2[k] = 2; in main()
366 expectEquals(-18932, sadCastedChar2Short(s1, s2)); in main()
367 expectEquals(-18932, sadCastedChar2ShortAlt(s1, s2)); in main()
368 expectEquals(-18932, sadCastedChar2ShortAlt2(s1, s2)); in main()
369 expectEquals(1291788, sadCastedChar2Int(s1, s2)); in main()
370 expectEquals(1291788, sadCastedChar2IntAlt(s1, s2)); in main()
371 expectEquals(1291788, sadCastedChar2IntAlt2(s1, s2)); in main()
372 expectEquals(1291788L, sadCastedChar2Long(s1, s2)); in main()
373 expectEquals(1291789L, sadCastedChar2LongAt1(s1, s2)); in main()