Lines Matching refs:y
34 static int sad1(int x, int y) { in sad1() argument
35 return x >= y ? x - y : y - x; in sad1()
45 static int sad2(int x, int y) { in sad2() argument
46 int diff = x - y; in sad2()
58 static int sad3(int x, int y) { in sad3() argument
59 int diff = x - y; in sad3()
70 static int sad3Alt(int x, int y) { in sad3Alt() argument
71 int diff = x - y; in sad3Alt()
82 static long sadL1(int x, int y) { in sadL1() argument
84 long yl = y; in sadL1()
95 static long sadL2(int x, int y) { in sadL2() argument
96 long diff = x - y; in sadL2()
108 static long sadL3(int x, int y) { in sadL3() argument
109 long diff = x - y; in sadL3()
120 static long sadL3Alt(int x, int y) { in sadL3Alt() argument
121 long diff = x - y; in sadL3Alt()
138 int y = interesting[j]; in main() local
139 int e1 = x >= y ? x - y : y - x; // still select in main()
140 expectEquals(e1, sad1(x, y)); in main()
141 int e2 = Math.abs(x - y); // pure abs in main()
142 expectEquals(e2, sad2(x, y)); in main()
143 expectEquals(e2, sad3(x, y)); in main()
144 expectEquals(e2, sad3Alt(x, y)); in main()
145 long eL1 = Math.abs(((long)x) - ((long)y)); // now, different, but abs in main()
146 expectEquals(eL1, sadL1(x, y)); in main()
147 long eL2 = Math.abs((long)(x - y)); // also, different, but abs in main()
148 expectEquals(eL2, sadL2(x, y)); in main()
149 expectEquals(eL2, sadL3(x, y)); in main()
150 expectEquals(eL2, sadL3Alt(x, y)); in main()