< prev index next >

src/jdk.incubator.vector/share/classes/jdk/incubator/vector/Byte64Vector.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


1442                     (s, v) -> (Byte64Vector) s.reshape(v)
1443                 );
1444             } else if (o.bitSize() == 256) {
1445                 Byte256Vector so = (Byte256Vector)o;
1446                 return VectorIntrinsics.reinterpret(
1447                     Byte256Vector.class,
1448                     byte.class, so.length(),
1449                     byte.class, LENGTH,
1450                     so, this,
1451                     (s, v) -> (Byte64Vector) s.reshape(v)
1452                 );
1453             } else if (o.bitSize() == 512) {
1454                 Byte512Vector so = (Byte512Vector)o;
1455                 return VectorIntrinsics.reinterpret(
1456                     Byte512Vector.class,
1457                     byte.class, so.length(),
1458                     byte.class, LENGTH,
1459                     so, this,
1460                     (s, v) -> (Byte64Vector) s.reshape(v)
1461                 );


1462             } else {
1463                 throw new InternalError("Unimplemented size");
1464             }
1465         }
1466     }
1467 }


1442                     (s, v) -> (Byte64Vector) s.reshape(v)
1443                 );
1444             } else if (o.bitSize() == 256) {
1445                 Byte256Vector so = (Byte256Vector)o;
1446                 return VectorIntrinsics.reinterpret(
1447                     Byte256Vector.class,
1448                     byte.class, so.length(),
1449                     byte.class, LENGTH,
1450                     so, this,
1451                     (s, v) -> (Byte64Vector) s.reshape(v)
1452                 );
1453             } else if (o.bitSize() == 512) {
1454                 Byte512Vector so = (Byte512Vector)o;
1455                 return VectorIntrinsics.reinterpret(
1456                     Byte512Vector.class,
1457                     byte.class, so.length(),
1458                     byte.class, LENGTH,
1459                     so, this,
1460                     (s, v) -> (Byte64Vector) s.reshape(v)
1461                 );
1462             } else if ((o.bitSize() <= 2048) && (o.bitSize() % 128 == 0)) {
1463                 throw new InternalError("Resize to scalable shape unimplemented.");
1464             } else {
1465                 throw new InternalError("Unimplemented size");
1466             }
1467         }
1468     }
1469 }
< prev index next >