OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 // VMOptions=--optimization-counter-threshold=10 | 4 // VMOptions=--optimization-counter-threshold=10 --no-background-compilation |
5 | 5 |
6 // Library tag to be able to run in html test framework. | 6 // Library tag to be able to run in html test framework. |
7 library float32x4_cross_test; | 7 library float32x4_cross_test; |
8 | 8 |
9 import 'dart:typed_data'; | 9 import 'dart:typed_data'; |
10 import 'package:expect/expect.dart'; | 10 import 'package:expect/expect.dart'; |
11 | 11 |
12 Float32x4 cross(Float32x4 a, Float32x4 b) { | 12 Float32x4 cross(Float32x4 a, Float32x4 b) { |
13 var t0 = a.shuffle(Float32x4.YZXW); | 13 var t0 = a.shuffle(Float32x4.YZXW); |
14 var t1 = b.shuffle(Float32x4.ZXYW); | 14 var t1 = b.shuffle(Float32x4.ZXYW); |
(...skipping 26 matching lines...) Expand all Loading... |
41 testCross(x, z, -y); | 41 testCross(x, z, -y); |
42 testCross(y, x, -z); | 42 testCross(y, x, -z); |
43 testCross(x, x, zero); | 43 testCross(x, x, zero); |
44 testCross(y, y, zero); | 44 testCross(y, y, zero); |
45 testCross(z, z, zero); | 45 testCross(z, z, zero); |
46 testCross(x, y, cross(-y, x)); | 46 testCross(x, y, cross(-y, x)); |
47 testCross(x, y+z, cross(x, y) + cross(x, z)); | 47 testCross(x, y+z, cross(x, y) + cross(x, z)); |
48 } | 48 } |
49 } | 49 } |
50 | 50 |
OLD | NEW |