• Home
  • Raw
  • Download

Lines Matching refs:s

47   private static int sadShort2IntParamRight(short[] s, short param) {  in sadShort2IntParamRight()  argument
49 for (int i = 0; i < s.length; i++) { in sadShort2IntParamRight()
50 sad += Math.abs(s[i] - param); in sadShort2IntParamRight()
78 private static int sadShort2IntParamLeft(short[] s, short param) { in sadShort2IntParamLeft() argument
80 for (int i = 0; i < s.length; i++) { in sadShort2IntParamLeft()
81 sad += Math.abs(param - s[i]); in sadShort2IntParamLeft()
109 private static int sadShort2IntConstRight(short[] s) { in sadShort2IntConstRight() argument
111 for (int i = 0; i < s.length; i++) { in sadShort2IntConstRight()
112 sad += Math.abs(s[i] - 32767); in sadShort2IntConstRight()
140 private static int sadShort2IntConstLeft(short[] s) { in sadShort2IntConstLeft() argument
142 for (int i = 0; i < s.length; i++) { in sadShort2IntConstLeft()
143 sad += Math.abs(32767 - s[i]); in sadShort2IntConstLeft()
171 private static int sadShort2IntInvariantRight(short[] s, int val) { in sadShort2IntInvariantRight() argument
174 for (int i = 0; i < s.length; i++) { in sadShort2IntInvariantRight()
175 sad += Math.abs(s[i] - x); in sadShort2IntInvariantRight()
203 private static int sadShort2IntInvariantLeft(short[] s, int val) { in sadShort2IntInvariantLeft() argument
206 for (int i = 0; i < s.length; i++) { in sadShort2IntInvariantLeft()
207 sad += Math.abs(x - s[i]); in sadShort2IntInvariantLeft()
238 private static int sadShort2IntCastedExprRight(short[] s) { in sadShort2IntCastedExprRight() argument
240 for (int i = 0; i < s.length; i++) { in sadShort2IntCastedExprRight()
241 short x = (short) (s[i] + 110); // narrower part sign extends in sadShort2IntCastedExprRight()
242 sad += Math.abs(s[i] - x); in sadShort2IntCastedExprRight()
273 private static int sadShort2IntCastedExprLeft(short[] s) { in sadShort2IntCastedExprLeft() argument
275 for (int i = 0; i < s.length; i++) { in sadShort2IntCastedExprLeft()
276 short x = (short) (s[i] + 110); // narrower part sign extends in sadShort2IntCastedExprLeft()
277 sad += Math.abs(x - s[i]); in sadShort2IntCastedExprLeft()
301 short[] s = new short[64]; in main() local
303 s[i] = interesting[i % interesting.length]; in main()
306 expectEquals(1067200, sadShort2IntParamRight(s, (short)-1)); in main()
307 expectEquals(1067200, sadShort2IntParamRight(s, (short) 0)); in main()
308 expectEquals(1067208, sadShort2IntParamRight(s, (short) 1)); in main()
309 expectEquals(1067224, sadShort2IntParamRight(s, (short) 2)); in main()
310 expectEquals(2635416, sadShort2IntParamRight(s, (short) 0x7fff)); in main()
311 expectEquals(1558824, sadShort2IntParamRight(s, (short) 0x8000)); in main()
313 expectEquals(1067200, sadShort2IntParamLeft(s, (short)-1)); in main()
314 expectEquals(1067200, sadShort2IntParamLeft(s, (short) 0)); in main()
315 expectEquals(1067208, sadShort2IntParamLeft(s, (short) 1)); in main()
316 expectEquals(1067224, sadShort2IntParamLeft(s, (short) 2)); in main()
317 expectEquals(2635416, sadShort2IntParamLeft(s, (short) 0x7fff)); in main()
318 expectEquals(1558824, sadShort2IntParamLeft(s, (short) 0x8000)); in main()
320 expectEquals(2635416, sadShort2IntConstRight(s)); in main()
321 expectEquals(2635416, sadShort2IntConstLeft(s)); in main()
323 expectEquals(1067200, sadShort2IntInvariantRight(s, -2)); in main()
324 expectEquals(1067200, sadShort2IntInvariantRight(s, -1)); in main()
325 expectEquals(1067208, sadShort2IntInvariantRight(s, 0)); in main()
326 expectEquals(1067224, sadShort2IntInvariantRight(s, 1)); in main()
327 expectEquals(2635416, sadShort2IntInvariantRight(s, 0x7ffe)); in main()
328 expectEquals(1558824, sadShort2IntInvariantRight(s, 0x7fff)); in main()
330 expectEquals(1067200, sadShort2IntInvariantLeft(s, -2)); in main()
331 expectEquals(1067200, sadShort2IntInvariantLeft(s, -1)); in main()
332 expectEquals(1067208, sadShort2IntInvariantLeft(s, 0)); in main()
333 expectEquals(1067224, sadShort2IntInvariantLeft(s, 1)); in main()
334 expectEquals(2635416, sadShort2IntInvariantLeft(s, 0x7ffe)); in main()
335 expectEquals(1558824, sadShort2IntInvariantLeft(s, 0x7fff)); in main()
337 expectEquals(268304, sadShort2IntCastedExprLeft(s)); in main()
338 expectEquals(268304, sadShort2IntCastedExprRight(s)); in main()