< prev index next >

src/jdk.incubator.vector/share/classes/jdk/incubator/vector/Float512Vector.java

Print this page
rev 52233 : Add scalable shapes for Arm Scalable Vector Extension.
Summary: Add scalable vector shapes to support Arm SVE better.
Reviewed-by: duke


1596                     (s, v) -> (Float512Vector) s.reshape(v)
1597                 );
1598             } else if (o.bitSize() == 256) {
1599                 Float256Vector so = (Float256Vector)o;
1600                 return VectorIntrinsics.reinterpret(
1601                     Float256Vector.class,
1602                     float.class, so.length(),
1603                     float.class, LENGTH,
1604                     so, this,
1605                     (s, v) -> (Float512Vector) s.reshape(v)
1606                 );
1607             } else if (o.bitSize() == 512) {
1608                 Float512Vector so = (Float512Vector)o;
1609                 return VectorIntrinsics.reinterpret(
1610                     Float512Vector.class,
1611                     float.class, so.length(),
1612                     float.class, LENGTH,
1613                     so, this,
1614                     (s, v) -> (Float512Vector) s.reshape(v)
1615                 );


1616             } else {
1617                 throw new InternalError("Unimplemented size");
1618             }
1619         }
1620     }
1621 }


1596                     (s, v) -> (Float512Vector) s.reshape(v)
1597                 );
1598             } else if (o.bitSize() == 256) {
1599                 Float256Vector so = (Float256Vector)o;
1600                 return VectorIntrinsics.reinterpret(
1601                     Float256Vector.class,
1602                     float.class, so.length(),
1603                     float.class, LENGTH,
1604                     so, this,
1605                     (s, v) -> (Float512Vector) s.reshape(v)
1606                 );
1607             } else if (o.bitSize() == 512) {
1608                 Float512Vector so = (Float512Vector)o;
1609                 return VectorIntrinsics.reinterpret(
1610                     Float512Vector.class,
1611                     float.class, so.length(),
1612                     float.class, LENGTH,
1613                     so, this,
1614                     (s, v) -> (Float512Vector) s.reshape(v)
1615                 );
1616             } else if ((o.bitSize() <= 2048) && (o.bitSize() % 128 == 0)) {
1617                 throw new InternalError("Resize to scalable shape unimplemented.");
1618             } else {
1619                 throw new InternalError("Unimplemented size");
1620             }
1621         }
1622     }
1623 }
< prev index next >