Lines Matching refs:s1
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()
39 short s = (short) s1[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()
50 short s = (short) s1[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()
149 short s = (short) s1[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()
199 short s = (short) s1[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()
257 long x = (short) s1[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()
313 long x = (short) s1[i]; in sadCastedChar2LongAt1()
322 char[] s1 = { 0, 0x8000, 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()
354 s1 = new char[m]; in main()
359 s1[k] = interesting[i]; in main()
364 s1[k] = 10; 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()