< prev index next >

test/hotspot/jtreg/compiler/vectorapi/reshape/TestVectorReinterpret.java

Print this page

19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20  * or visit www.oracle.com if you need additional information or have any
21  * questions.
22  */
23 
24 package compiler.vectorapi.reshape;
25 
26 import compiler.vectorapi.reshape.tests.TestVectorDoubleExpandShrink;
27 import compiler.vectorapi.reshape.tests.TestVectorExpandShrink;
28 import compiler.vectorapi.reshape.tests.TestVectorRebracket;
29 import compiler.vectorapi.reshape.utils.VectorReshapeHelper;
30 import compiler.vectorapi.reshape.utils.VectorSpeciesPair;
31 import java.util.List;
32 import jdk.incubator.vector.VectorShape;
33 import jdk.incubator.vector.VectorSpecies;
34 
35 /*
36  * @test
37  * @bug 8259610
38  * @key randomness
39  * @enablePreview
40  * @modules jdk.incubator.vector
41  * @modules java.base/jdk.internal.misc
42  * @summary Test that vector reinterpret intrinsics work as intended.
43  * @library /test/lib /
44  * @run main compiler.vectorapi.reshape.TestVectorReinterpret
45  */
46 public class TestVectorReinterpret {
47     private static final List<VectorShape> SHAPE_LIST = List.of(VectorShape.values());
48     private static final List<Class<?>> ETYPE_LIST = List.of(
49             byte.class, short.class, int.class, long.class, float.class, double.class
50     );
51 
52     public static void main(String[] args) {
53         VectorReshapeHelper.runMainHelper(
54                 TestVectorExpandShrink.class,
55                 SHAPE_LIST.stream()
56                         .flatMap(s -> SHAPE_LIST.stream()
57                                 .filter(t -> t.vectorBitSize() != s.vectorBitSize())
58                                 .map(t -> VectorSpeciesPair.makePair(VectorSpecies.of(byte.class, s),
59                                         VectorSpecies.of(byte.class, t))))

19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20  * or visit www.oracle.com if you need additional information or have any
21  * questions.
22  */
23 
24 package compiler.vectorapi.reshape;
25 
26 import compiler.vectorapi.reshape.tests.TestVectorDoubleExpandShrink;
27 import compiler.vectorapi.reshape.tests.TestVectorExpandShrink;
28 import compiler.vectorapi.reshape.tests.TestVectorRebracket;
29 import compiler.vectorapi.reshape.utils.VectorReshapeHelper;
30 import compiler.vectorapi.reshape.utils.VectorSpeciesPair;
31 import java.util.List;
32 import jdk.incubator.vector.VectorShape;
33 import jdk.incubator.vector.VectorSpecies;
34 
35 /*
36  * @test
37  * @bug 8259610
38  * @key randomness

39  * @modules jdk.incubator.vector
40  * @modules java.base/jdk.internal.misc
41  * @summary Test that vector reinterpret intrinsics work as intended.
42  * @library /test/lib /
43  * @run main compiler.vectorapi.reshape.TestVectorReinterpret
44  */
45 public class TestVectorReinterpret {
46     private static final List<VectorShape> SHAPE_LIST = List.of(VectorShape.values());
47     private static final List<Class<?>> ETYPE_LIST = List.of(
48             byte.class, short.class, int.class, long.class, float.class, double.class
49     );
50 
51     public static void main(String[] args) {
52         VectorReshapeHelper.runMainHelper(
53                 TestVectorExpandShrink.class,
54                 SHAPE_LIST.stream()
55                         .flatMap(s -> SHAPE_LIST.stream()
56                                 .filter(t -> t.vectorBitSize() != s.vectorBitSize())
57                                 .map(t -> VectorSpeciesPair.makePair(VectorSpecies.of(byte.class, s),
58                                         VectorSpecies.of(byte.class, t))))
< prev index next >