< prev index next >
src/jdk.incubator.vector/share/classes/jdk/incubator/vector/package-info.java
Print this page
rev 55891 : 8222897: [vector] Renaming of shift, rotate operations. Few other api changes.
Summary: Renaming of shift, rotate operations. Few other api changes.
Reviewed-by: jrose, briangoetz
rev 55894 : 8222897: [vector] Renaming of shift, rotate operations. Few other api changes.
Summary: Renaming of shift, rotate operations. Few other api changes.
Reviewed-by: jrose, briangoetz
*** 102,112 ****
* }
* }
* }</pre>
*
* The scalar computation after the vector computation is required to process the tail of
! * elements, the length of which is smaller than the species length.
*
* The example above uses vectors hardcoded to a concrete shape (512-bit). Instead, we could use preferred
* species as shown below, to make the code dynamically adapt to optimal shape for the platform on which it runs.
*
* <pre>{@code
--- 102,114 ----
* }
* }
* }</pre>
*
* The scalar computation after the vector computation is required to process the tail of
! * elements, the length of which is smaller than the species length. {@code VectorSpecies} also defines a
! * {@link jdk.incubator.vector.VectorSpecies#loopBound(int) loopBound()} helper method which can be used in place of
! * {@code (a.length & ~(SPECIES.length() - 1))} in the above code to determine the terminating condition.
*
* The example above uses vectors hardcoded to a concrete shape (512-bit). Instead, we could use preferred
* species as shown below, to make the code dynamically adapt to optimal shape for the platform on which it runs.
*
* <pre>{@code
*** 132,142 ****
*
* <pre>{@code
* EVector a = ...;
* e[] ar = new e[a.length()];
* for (int i = 0; i < a.length(); i++) {
! * ar[i] = scalar_unary_op(a.get(i));
* }
* EVector r = EVector.fromArray(a.species(), ar, 0);
* }</pre>
*
* Unless otherwise specified the input and result vectors will have the same
--- 134,144 ----
*
* <pre>{@code
* EVector a = ...;
* e[] ar = new e[a.length()];
* for (int i = 0; i < a.length(); i++) {
! * ar[i] = scalar_unary_op(a.lane(i));
* }
* EVector r = EVector.fromArray(a.species(), ar, 0);
* }</pre>
*
* Unless otherwise specified the input and result vectors will have the same
*** 154,164 ****
* <pre>{@code
* EVector a = ...;
* EVector b = ...;
* e[] ar = new e[a.length()];
* for (int i = 0; i < a.length(); i++) {
! * ar[i] = scalar_binary_op(a.get(i), b.get(i));
* }
* EVector r = EVector.fromArray(a.species(), ar, 0);
* }</pre>
*
* Unless otherwise specified the two input and result vectors will have the
--- 156,166 ----
* <pre>{@code
* EVector a = ...;
* EVector b = ...;
* e[] ar = new e[a.length()];
* for (int i = 0; i < a.length(); i++) {
! * ar[i] = scalar_binary_op(a.lane(i), b.lane(i));
* }
* EVector r = EVector.fromArray(a.species(), ar, 0);
* }</pre>
*
* Unless otherwise specified the two input and result vectors will have the
*** 187,197 ****
* if it is associative:
* <pre>{@code
* EVector a = ...;
* e r = <identity value>;
* for (int i = 0; i < a.length(); i++) {
! * r = assoc_scalar_binary_op(r, a.get(i));
* }
* }</pre>
*
* Unless otherwise specified the scalar result type and element type will be
* the same.
--- 189,199 ----
* if it is associative:
* <pre>{@code
* EVector a = ...;
* e r = <identity value>;
* for (int i = 0; i < a.length(); i++) {
! * r = assoc_scalar_binary_op(r, a.lane(i));
* }
* }</pre>
*
* Unless otherwise specified the scalar result type and element type will be
* the same.
*** 206,216 ****
* <pre>{@code
* EVector a = ...;
* EVector b = ...;
* boolean[] ar = new boolean[a.length()];
* for (int i = 0; i < a.length(); i++) {
! * ar[i] = scalar_binary_test_op(a.get(i), b.get(i));
* }
* VectorMask<E> r = VectorMask.fromArray(a.species(), ar, 0);
* }</pre>
*
* Unless otherwise specified the two input vectors and result mask will have
--- 208,218 ----
* <pre>{@code
* EVector a = ...;
* EVector b = ...;
* boolean[] ar = new boolean[a.length()];
* for (int i = 0; i < a.length(); i++) {
! * ar[i] = scalar_binary_test_op(a.lane(i), b.lane(i));
* }
* VectorMask<E> r = VectorMask.fromArray(a.species(), ar, 0);
* }</pre>
*
* Unless otherwise specified the two input vectors and result mask will have
< prev index next >