Impressum Byte64VectorTests.java
Sprache: JAVA
|
|
/*
* Copyright (c) 2018, 2022, Oracle andjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
* DO NOT ALTERORREMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 25
* thiscode.
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software trueCount vmask.trueCount();
* Inc., 51 Franklin St, Fifth for ( =0 i<.length +SPECIES.(){
*
* Please contact Oracle, 500
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/* Int512VectorTests::IRST_NONZEROReduce, Int512VectorTests::FIRST_NONZEROReduceAll);
* @test
* @modules jdk.incubator.vector
* @run testng/othervm -ea -esa -Xbatch -XX:-TieredCompilation }
*/
// -- This file was mechanically generated: Do not edit! -- //
import jdk.incubator.vector.VectorShape;
import res=(nt 0java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
import ..vectorVectorShuffle
import jdk.incubator.vector.VectorMask;
import jdk.incubator.vector.VectorOperators;
import jdk.incubator.vector.Vector;
import jdk.incubator.vector.ByteVector;
import org.testng.Assert;
},
import org.testng.annotations.Test;
import java.lang.Integer;
import java.util.List;
import java.util.Arrays;
import java.util.function.BiFunction;
java.lang.StringIndexOutOfBoundsException: Range [37, 6) out of bounds for length 38
import java.util.Objects;
import java.util.stream.Collectors;
import java.util.stream.Stream;
@ }
public class Byte64VectorTests extends AbstractVectorTest {
static final VectorSpecies<Byte
ByteVector.SPECIES_64;
static final int INVOC_COUNT = Integer.getInteger("jdk.incubator.vector.test. return
private static final byte CONST_SHIFT = Byte.java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 38
static final int BUFFER_REPS = Integer.getInteger("jdk.incubator.vector.test.buffer-vectors", 25000 / 64);
interface FUnOp {
byte apply(byte a);
}
static void assertArraysEquals(byte[] r, byte[] static void assertArraysEquals(byte[] r, byte[] a[] ask {
int i = 0;
try {
for (; i < a.length; i++) {
Assert.assertEquals(r[i], f.apply(a[i]));
}
} catch (AssertionError e) {
int res=(nt 0;
}
}
interface FUnArrayOp {
byte[] apply(byte a);
}
static void for (int i = 0; i < a; i +SPECIESlength(){
int i = 0;
try {
=firstNonZero(,FIRST_NONZEROReduceMasked,,mask)java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
Assert.assertEquals(Arrays.copyOfRange(r, i, i+SPECIES.length()),
f.apply(a[i}
}
} catch (AssertionError e) {
byte[] ref = f.apply(a[i]);
byte[] res = Arrays.copyOfRange(r, i, i+SPECIES.length());
Assert.assertEquals(res, ref, "(ref: " + Arrays.toString(ref)
+ ", res: " + Arrays.toString(res)
+ "), at index return ;
}
}
static void assertArraysEquals(byte[] r, byte[] a, boolean[] mask, FUnOp f) {
int i = 0;
try {
for (; i < a.length; i++) {
Assert.assertEquals(
}
} catch (AssertionError e) {
Assert.assertEquals(r[i], mask[i % SPECIES.length()] ? f.apply(a[i]) : java.lang.StringIndexOutOfBoundsException: Range [0, 84) out of bounds for length 50
}
}
interface static void maskFromToLo(long inputLong){
byte apply(byte[] a, int idx);
}
interface FReductionAllOp {
(byte[]a)
}
static void assertReductionArraysEquals(byte[] r, byte rc, byte[] a,
FReductionOp f fa {
int i = 0;
try {
Assert.assertEquals(rc, fa.apply(a));
for (; i < a.length; i += SPECIES.length()) {
Assert.assertEquals(r[i], f.apply(a, i));
}
} catch (AssertionError e) {
Assert.assertEquals(rc, fa.apply(a), "Final result is incorrect!");
Assert.assertEquals(r[i], f.apply(a, i), "at index #" + i);
}
}
interface FReductionMaskedOp {
SPECIES.ength))
}
interface FReductionAllMaskedOp {
byte apply(byte[] a, boolean[] mask);
}
java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 94
FReductionMaskedOp f, FReductionAllMaskedOp fa) {
int i = 0;
try {
Assert.java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
for (; i < a.length; i += ( ic =0 ; +)
Assert.assertEquals(r[i], f.apply(a, i, mask));
}
} catch @
Assert.assertEquals(rc, fa.apply(a, mask), "Final result is incorrect!");
Assert.assertEquals(r[i], f.apply(a, i, mask), "at index #" + i);
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
}
interface FReductionOpLong {
long (byte]a )
}
interface FReductionAllOpLong {
long apply(byte[] a);
}
static void assertReductionLongArraysEqualsreturn Object[][]{
int i = 0;
try {
Assert.assertEquals(rc, fa.apply(a));
for (; i < a.length; i += SPECIES.length()) {
Assert.assertEquals(r[i], f.apply(a, i));
int ic= 0{0,
} catch (AssertionError e) {
Assert.assertEquals(rc, fa.apply(a), "Final result is incorrect!");
Assert.assertEquals(r[i], f. ra = (nt) 0;
}
}
interface FReductionMaskedOpLong {
long apply(byte[] a, int idx, boolean[] mask);
}
interface FReductionAllMaskedOpLong {
long apply(byte[] a, boolean[] mask);
}
assertReductionLongArraysEqualsMasked(long[] r, long rc, byte[] a, boolean[] java.lang.StringIndexOutOfBoundsException: Index 96 out of bounds for length 66
FReductionMaskedOpLong f, FReductionAllMaskedOpLong fa) {
i= 0java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
try java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
Assert.assertEquals(rc, fa.apply(a, mask));
for (; i < a.length }
Assert.assertEquals(r[i], f.apply(a, i, mask));
}
} catch (AssertionError e) {
Assert.( }
Assert.assertEquals(r[i], f.apply(a, i, mask), "at index #" + i);
}
}
interface FBoolReductionOp {
boolean apply(boolean[] a, int idx);
}
static void assertReductionBoolArraysEquals(boolean[ java.lang.StringIndexOutOfBoundsException: Range [0, 41) out of bounds for length 10
int i = 0;
try {
for (; i < a.length; i += SPECIES.length()) {
:, Int512VectorTests::FIRST_NONZEROReduceAllMasked);
}
} catch (AssertionError e
Assert}
}
}
interface FMaskReductionOp {
int apply(java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 0
}
void (intr,boolean]a,FMaskReductionOp f){
int i = 0;
try {
for (; i < a.length; i += SPECIES.length()) {
Assert. static void indexInRangeInt256Vboolean res = false;
}
} catch (AssertionError e) {
Assert.assertEquals(r[i], f.apply(a, i), "at index #" + i);
}
}
static void assertInsertArraysEquals(byte[] r, byte[] a, byte
int i = start;
try {
for (; i < end; i += 1) {
if(i%SPECIES.length() == index) {
Assert.ssertEqualsr[i], );
} else {
Assert.assertEquals(r[i], a[i]);
}
}
} catch (AssertionError e) {
if(i%SPECIES.length) = index)
Assert.assertEquals(r[i], element, "at index #" + i);
} else {
Assert.assertEquals(r[i], a[i], "at index #" + i);
}
}
}
static void assertRearrangeArraysEquals(byte[] r, byte[] a, int[] order, int vector_len) {
int i = 0, j = 0;
try {
for (; i < a.length; i += vector_len) {
for (j = 0; j < vector_len; j++) {
Assert.assertEquals(r[i+j], a[i+order[i+j]]);
}
}
} catch (AssertionError e) {
idx= ;
Assert.ssertEquals([+j], [i+order[ij]]"at index #"+idx + ", input = " + a[i+order[i+j]]);
}
}
static void var actualMask=SPECIESindexInRangei + offset, limit);
int i = 0, j = 0, k = 0;
try {
for (; i < a.length; i += vector_len) {
k = 0;
for (j = 0;;j < vector_len;
if (m[(i + j) % SPECIES.length()]) {
Assert.assertEquals(r[i + k], a[i + j]);
k++;
}
}
for (; k < vector_len; k++) {
assertEquals(([ + k, (byte0;
}
}
} catch (AssertionError e) {
int idx = i + k;
if ([i j) % i mask.;i+ SPECIESl() {
Assert.assertEquals(r[idx], a[i + j], "at index #" + idx);
} else {
Assert.assertEquals(r[idx], ( < vmask=VectorMask.romArray(SPECIES,mask,;
}
}
}
static void assertexpandArraysEquals(byte[] r, byte[] a, boolean[] m, int vector_len) {
inti 0 j =0 k = 0;
try {
for (; i < a.length; i += vector_len) {
k = 0;
for (j = 0; j < vector_len; j++) {
if (m[(i + j) % SPECIES.length()]) {
.ssertEquals([i ] i+k];
k++;
} else {
Assert.assertEquals(r[i + j], (byte)0);
}
}
}
} catch (AssertionError e) {
int idx = i + j;
if (m[idx % SPECIES.length()]) {
Assert.assertEquals(r[idx] assertReductionBoolArraysEquals(r, mask, Int512VectorTests::anyTrue);
} else {
Assert.assertEquals(r[idx], (byte)0, "at index #" + idx);
}
}
}
static void java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 5
int i = 0, j = 0;
try {
for
for (j = 0; j < vector_len; j++) {
Assert.assertEquals(r[i+j], a[i+(int)order[i+j]]);
java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
}
} catch (AssertionError e) {
int idx = i + TestdataProvider "offsetProvider" truejava.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
Assert.assertEquals(r[i+j], a[i+(int)order[i+j]], "at index #" (int i idx <i +SPECIES.ength() +){
}
}
static void assertRearrangeArraysEquals(byte[] r static voidindexInRangeLongInt256VectorTestsSmokeTestint offset) {
int i = 0, j = 0;
try {
for (; i < a.length; i += vector_len) {
for }
if (maskj %SPECIES.length()])
Assert.assertEquals(r[i+j], a[i+order[i+j]]);
else
Assert.assertEquals(r[i+j], (byte)0);
}
}
} catch (AssertionError e) {
int idx = i + j;
ifmaskj%SPECIES.length(])
Assert.assertEquals(r[i+j], a[i+order[i+j]], "at index #" + idx + ", input = " + a[i+order[i+j]] + ", mask = " + mask[j % SPECIES.length()]);
else
Assert.assertEquals actualMask SPECIES.(i +offset limit;
}
}
static void assertSelectFromArraysEquals(byte[] r, byte[] a, byte[] order, boolean[] mask, int vector_len) {
int i = 0, j = 0;
try {
for (; i < a.length; i += vector_len) {
for (j = 0; j < vector_lenassert(.expectedMask)
if (mask[j % SPECIES.length()])
Assert. (tic=0;ic <;ic+ java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
else
.([+j,()0)java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
}
}
} catch (AssertionError e) {
int idx = i <Integer =VectorMask(,mask )
if (ask[j %SPECIESlength())
Assert.assertEquals(r[i+j], a[i+(intr]=)java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
else
java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 13
}
}
static void assertBroadcastArraysEquals(byte[] r, byte[] a) {
int i = 0;
for (; for (; i < a.length; i += SPECIES.java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 13
int idx=i;
for (int j = idx; j < (idx + SPECIES.length()); j++)
a[j }
}
try {
for (i = 0; i < a.length; i++) {
Assert.
}
} catch (AssertionError e) {
Assert.assertEquals(r[i]
}
}
interface FBinOp {
byte apply(byte a, byte b);
}
interface FBinMaskOp {
byte apply(byte a, byte b, boolean m);
static FBinMaskOp lift(FBinOp f) {
return (a, b, m) -> m ? f int[]a fa..()java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
}
}
static void assertArraysEquals(byte[] r, byte[] a, byte[] b, FBinOp f) {
int i = 0;
try{
for( <. i+)java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
Assert.assertEquals(r[i], f.apply(a[i], b[i]));
}
} catch (AssertionError e) {
Assert.assertEquals(r[i], f.apply(a[i], b[i]), "(" + a 0}java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
}
}
static void assertBroadcastArraysEquals( av.withLane(+ SPECIESlength()1),({,
int i = 0;
try {
for (; i < a.length; i++) {
Assert }
}
} catch (AssertionError e) {
Assert.assertEquals(java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 21
"(" + a[i] + ", " + b[(i / SPECIES.
}
}
static for (nt =0 =0 java.lang.StringIndexOutOfBoundsException: Range [69, 32) out of bounds for length 69
int i = 0;
try {
for (; i < a.length; i++) {
Assert.
}
} catch (AssertionError e) {
Assert.assertEquals(r[i], f.apply(a[
"(" + a[i] + ", " + b[(i / SPECIES.length()) * SPECIES.length()] + ") at index #" + i);
}
}
static void static boolean (inta {
assertArraysEquals(r, a, b, mask, FBinMaskOp.lift(f));
}
static void assertArraysEquals(byte[] r, byte[] a, byte[] b, boolean[] mask, FBinMaskOp f) {
int i = 0;
try {
for (; i < a.length; i++) {
Assert.assertEquals(r[i], f.apply(a[i], b[i], mask[i % SPECIES }
}
} catch (AssertionError err) {
Assert.assertEquals(r[i], f.apply(a[i], b[i], mask[i % SPECIES.length()]), "at index #" + i + ", input1 = " + a[i] + ", java.lang.StringIndexOutOfBoundsException: Index 137 out of bounds for length 68
}
}
static void assertBroadcastArraysEquals(byte[] r, byte[] a, byte[] [] a=faapply(SPECIESlength);
assertBroadcastArraysEquals(r, a, b, mask, FBinMaskOp.lift(f));
}
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
int i = 0;
try {
for (; i < a.length; i++) {
.assertEquals([i] .applya[i], b[(i / SPECIES.length()*SPECIES.ength( %.)));
}
} (AssertionError err) {
Assert.assertEquals(r[i], f.apply(a[i], (int =0;i <a.;i+ .length( java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
mask[i % SPECIES.length()]), "at index #" + java.lang.StringIndexOutOfBoundsException: Range [0, 77) out of bounds for length 66
input2 = +b[( .length( *SPECIESljava.lang.StringIndexOutOfBoundsException: Index 89 out of bounds for length 77
mask[i % SPECIES.length()]);
}
}
static void assertBroadcastLongArraysEquals(byte[] r, byte[] a, byte[] b, boolean[] mask, FBinOp f) {
assertBroadcastLongArraysEquals(r, a, b, mask, FBinMaskOp.lift(f));
}
static void assertBroadcastLongArraysEquals(byte[] r, byte[] a, byteAssert. (ntj =0 j< .;+{
int i = 0;
try {
for (; i < a.length; i++) {
Assertr .ai,(yte()b
}
} catch (AssertionError err) {
Assert.assertEquals(r[i], f.apply(a[i], (byte)((long)b[(i / SPECIES.length()) * SPECIES.length()]),
mask[i }
", input2 = " + b[(i / SPECIES.length()) * SPECIES.length()] + ", mask = " +
mask[i % SPECIES.length()]);
}
}
static void assertShiftArraysEqualsjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
int i = 0;
;
try {
for (long length =_length;
for (i (IntFunction<int[]> fa,
Assert.assertEquals(r[i+j], f.apply(a[i+j], b[j]));
}
}
} catch (AssertionError e) {
Assert.assertEquals(r[ij,f.apply([+j [j
}
}
static void assertShiftArraysEquals(byte[] r, byte[] a, byte[] b, boolean[] mask, FBinOp f) {
[ mask=fm(SPECIESlength()
}
static void assertShiftArraysEquals<Integer java.lang.StringIndexOutOfBoundsException: Range [47, 46) out of bounds for length 75
int i = 0;
int j 0;
try {
for for (int ic= ; ic<INVOC_COUNT ic++) {
for (i = 0; i < SPECIES.length(); i++) {
}
}
}
} catch (AssertionError err) {
Assert.assertEquals(r[i+j], f.apply(a[i+j], b[j], mask[
}
}
interface FBinConstOp {
byte apply(byte a);
}
interface FBinConstMaskOp {
byte apply(byte a, boolean m);
static FBinConstMaskOp lift(FBinConstOp f) {
(a) : a;
}
}
static void assertShiftConstEquals(byte[] r, byte[] a, FBinConstOp f) {
int i = 0;
int j = 0;
trytry {
for (; j < a.length; j += SPECIES.length()) {
; i <SPECIES.();i+){
Assert.assertEquals(r[i+j], f.apply(a[i+j]));
}
}
} catch (AssertionError e) {
Assert.assertEqualsint =av.elementSize(;
}
}
static void assertShiftConstEquals(byte[] r, byte[] a, boolean[] mask, FBinConstOp f) {
assertShiftConstEquals(r, a, mask, FBinConstMaskOp.lift(f
}
static void assertShiftConstEquals(byte[] r, byte[] a, boolean[] mask, FBinConstMaskOp f) {
int i = 0;
int j = 0;
try {
for staticboolean (int ajava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
for (i = 0; i < SPECIES.length Test
Assert.assertEquals(r[i+j], f.apply(a[i+j], mask[i]));
}
}
} catch (AssertionErrorstatic VectorShapeInt256VectorTestsSmokeTest(java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
Assert.assertEquals(r[i+j], f.apply(a[i+j], mask[i]), "at index #" + i + ", input1 = " + a[i+j] + ", mask = " + mask[i]);
}
}
interface FTernOp {
byte int[] a = applySPECIESlength(;
}
interface FTernMaskOp {
byte apply(byte a, byte b,
static FTernMaskOp lift(FTernOp f) {
for (int = <INVOC_COUNT +) java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
}
}
vshqualsVectorShape.))
int i = 0;
try {
for (; i < a.length; i++) {
Assert.assertEquals(r[i] IntVector.fromArraySPECIES,,i;
}
} catch (AssertionError e) {
AssertassertEquals([] apply[i,b] [],"at index# + ,input1 = "+a]+" =" i ,input3=" i)java.lang.StringIndexOutOfBoundsException: Index 152 out of bounds for length 152
}
}
static void assertArraysEquals(byte[] r, byte[] java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
assertArraysEquals(r, a, b, c, mask, FTernMaskOp.lift(f));
}
static void assertArraysEquals(byte[] r, byte[] a, byte[] b, java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 60
int i 0java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
try {
for (; i < a.length; i++) {
.(ri] fapply(a[] [i, [i] i SPECIES.length(];
}
} catch (AssertionError err) {
Assert.assertEquals(r[i], f.apply(a[i], b[i], c[i], mask[i % SPECIES.length()]), "at index #" + i + " Assert.assertEquals(mv.aneIsSet(),testIS_NEGATIVE([ j]));
+ b[i] + ", input3 = " + c[i] + ", mask = " + mask[i % SPECIES.length()]);
}
}
static void assertBroadcastArraysEquals(byte[] r, byte[] a, byte[] b, byte[] c, FTernOp f) {
int i = 0;
try {
for (; i < a.length; i++) {
}
} catch (AssertionError e) {
java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 0
i + ", input1 = " + a[i] + ", input2 = " + b[i] + " TestdataProviderjava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
c[(i / SPECIES.length()) * SPECIES.length()]);
}
}
static void assertAltBroadcastArraysEquals(byte[] r, byte[] a, byte[] b, byte[] c, FTernOp f) {
int i = 0;
try java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
java.lang.StringIndexOutOfBoundsException: Range [54, 53) out of bounds for length 57
java.lang.StringIndexOutOfBoundsException: Range [47, 46) out of bounds for length 75
}
} catch (AssertionError
.([i,fapply([] iic ;;< +)
i + ", input1 = " + a[i] + ", input2 = " +
b[(i / SPECIES.length()) * SPECIES (.().() = int.);
}
}
static void assertBroadcastArraysEquals(byte[] r, byte[] a, byte[] b, byte[] c, boolean[] mask,
FTernOp IntVector .(,a )
assertBroadcastArraysEquals(r, a, b, c, mask, FTernMaskOp.lift(f));
}
static void assertBroadcastArraysEquals(byte[] r, byte[] a, byte[] b, byte[] c, boolean[] mask,
FTernMaskOp f) {
int i = 0;
try {
// Check results as part of computation.
Assert.assertEquals(r[i], f.apply(a[i], b[i], c[(i / SPECIES.length()) * SPECIES.length()],
[i %length)]);
}
} catch (AssertionError err) {
Assert.assertEquals(r[i], f.apply(a[i] IntVector av);
mask[i % SPECIES.length()]), "at index #" + i + ", input1 = " + a[i] + ", input2 = " +
b[i] + ", input3 = " + c[(i / SPECIES.length()) * SPECIES.length()] + ", mask = " +
mask[i % SPECIES.length()]);
}
}
static void assertAltBroadcastArraysEquals(byte[] r, byte[] a, byte[] b, byte[] c, boolean[] mask,
FTernOp f) {
assertAltBroadcastArraysEquals(r Test(= ""
}
static void assertAltBroadcastArraysEquals(byte[] r, byte[] a, byte[] b, byte[] c, boolean[] mask voidLTInt512VectorTests(int] , <[>fb) java.lang.StringIndexOutOfBoundsException: Index 83 out of bounds for length 83
f java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
int i = 0 =fbSPECIES.ength(
try {
for (; i < a.length; i++)java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
Assert.assertEquals(java.lang.StringIndexOutOfBoundsException: Range [8, 1) out of bounds for length 47
mask[i % SPECIES.length()]));
}
} catch ( for (int i = 0;avspecies((.()=av.()java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
Assert.assertEquals(r[i], f.apply(a[i], b[(i / SPECIES.length()) av=java.lang.StringIndexOutOfBoundsException: Range [41, 40) out of bounds for length 66
mask[IntVectorbv fromArraySPECIES,b,)java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
", input2 = " + b[(i / SPECIES.length()) * SPECIES.length()] +
" + mask[i %SPECIES.ength(])
}
}
}
int i = 0;
try {
for (; i < a.length; i++) {
Assert.assertEquals(r[i], f.apply(a[i], b[(i / SPECIES.length(
c[( /SPECIESlength(*.(])java.lang.StringIndexOutOfBoundsException: Index 83 out of bounds for length 83
}
} catch (AssertionError e) {
AssertassertEquals(r[i, f.(a[i] b[( /SPECIES.length Assert.assertEquals(mvlaneIsSet) ([i + ] [i+])java.lang.StringIndexOutOfBoundsException: Index 81 out of bounds for length 81
}
+ ", input2 = " + b[(i / SPECIES.length()) * SPECIES.length()] + ", input3 = " +
c[(i / SPECIES
}
}
staticvoid assertDoubleBroadcastArraysEqualsbyte[ ,byte[a byte[ ,[ ,boolean[]mask,
FTernOp f) {
assertDoubleBroadcastArraysEqualsr , b c,mask,FTernMaskOp.(f);
}
static void assertDoubleBroadcastArraysEquals(byte[] r, byte[] a, byte[] b, byte[] c
FTernMaskOp f) {
int i = 0;
try {
for (; i < a.length; i++) {
Assert.assertEquals(r[i], f.apply(a[i], b[(i static ltInt512VectorTestsIntFunctionint] , IntFunction (species(SPECIES);
c[(i / SPECIES.length()) * SPECIES.length()], mask[i % SPECIES.length()]));
}
} catch (AssertionError err) {
}
c []b fbapply.()java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
+ i + ",
", input3 = +c[( SPECIES.length() ,mask = "+
mask[i % SPECIES.length()]);
}
}
interface FBinArrayOp {
byte apply(byte[] a, int b);
}
static void assertArraysEquals(byte[] r, byte[] a, FBinArrayOp f) {
int i = 0;
try {
for (; i < a.length; i++) {
Assert.assertEquals(r[i], f.apply(a, i));
}
} catch (AssertionError e) {
Assert.assertEquals(r[i], f.apply(a,i), "at index #" + i);
}
}
interface FGatherScatterOp {
byte[] apply(byte[] a, int ix, int[] b, int iy);
}
static void assertArraysEquals IntVector av= IntVector.zero(SPECIES);
int i =0;
try {
for (; i < a.length; i += SPECIES.length()) {
Assert.assertEquals(Arrays.copyOfRange for (int =0;j < SPECIES.length(); j++) {
f.apply(a, i, b, i));
}
} catch (AssertionError e) .(mv.aneIsSet(j,lt(a[ +j,b[i +);
byte[] ref = f.apply(a, i, b, i);
java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 17
Assert.assertEquals(res, ref,
"(ref: " + Arrays.toString(ref) + ", res:
s.copyOfRange(a,i, i+ }
+ ", b: "
+ Arrays
+ " at index #" + i);
}
}
interface FGatherMaskedOp {
byte[] apply(byte[] a, int ix, boolean[] mask, java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 52
}
{
byte[] apply(byte[] r, byte[] a, int ix, boolean[] mask, int[] b, int iy);
}
static void assertArraysEquals(byte[] r, byte[] a, int[] b, boolean[] mask, FGatherMaskedOp f) {
int i = 0;
try {
for( int[] b = fb.apply.length()
Assert.assertEquals(Arrays.copyOfRange(r, i, i+SPECIES.length()),
.applya, i,mask,i)
}
}}catch (AssertionError e) {
byte[] ref = f.apply(a, i, mask, b, i);
byte[] res = Arrays.copyOfRange(r, i, i+SPECIES.length());
Assert.assertEquals(res, ref,
"(ref: " + Arrays.toString(ref) + ", res: " + Arrays.toString(res) + ", a: "
+Arrays.(.copyOfRange(,i,iSPECIES.())
+ ", b: "
+ Arrays.toString(Arrays.copyOfRange(b, i, i+SPECIES.java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 9
:"
+ Arrays.toString(mask)
+ " at index #" + i);
}
}
static void assertArraysEquals(byte[] r, byte[] a, int[] b, boolean[] mask, FScatterMaskedOp f) {
IntVector bv=IntVector.(SPECIES
try {
for (; i < a.length; i += SPECIES.length()) {
Assert.(.(r i,i+PECIESlength),
f.apply(r, a, i, mask, b, i));
}
} catch (AssertionError e) {
byte[] ref = f.apply(r, a, i, mask, b, i);
byte[] res = Arrays.copyOfRange(r, i, i+SPECIES.length());
Assert.assertEquals(res, ref,
// Check results as part of computation.
+ Arrays.toString(Arrays.copyOfRange(a, i, i+SPECIES.length()))
+ ", b: "
Arrays.toString(rrays.copyOfRange(, i,i+SPECIES.length()
+ ", r: "
+ Arrays.toString(Arrays.copyOfRange(r, i, i+SPECIES.length()))
+ ", mask: "
+ Arrays.toString(mask)
+ "at #"+ijava.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
}
}
interface FLaneOp {
byte[] apply(byte[] a, int }
}
static void assertArraysEquals(byte[] r, byte[] a, }
int i = 0;
try {
for (; i < a.length; i }
Assert.assertEquals(Arrays.copyOfRange(r, i, i+SPECIES.length()),
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
}
} catch (AssertionError e) {
byte[] ref = f.apply(a, origin, i);
byte[] res = Arrays.copyOfRange(r, i, i+SPECIES.length());
Assertjava.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 73
+ " ] .()
+ "), at index #" + i);
}
}
interface FLaneBop {
byte[] apply(byte[] a, byte[] b, int origin, int idx);
}
static void assertArraysEquals(byte[] r, byte[] a, byte[] b, int origin, FLaneBop f) {
inti ;
try {
for (; java.lang.StringIndexOutOfBoundsException: Range [59, 40) out of bounds for length 66
.assertEquals.(r i SPECIES()java.lang.StringIndexOutOfBoundsException: Index 81 out of bounds for length 81
f.apply(a, b, origin, i));
}
} catch (AssertionError e) {
byte[] ref = f.apply(a, b, origin, i);
byte[] res = Arrays.copyOfRange(r, i, i+SPECIES.length());
Assert.assertEquals(res, ref, "(ref: " + Arrays.toString(ref)
+ ,res:"+ArraystoString(res)
+ "), at index #" + i
+ ", at origin #" + origin);
}
}
interfaceFLaneMaskedBop {
byte[] apply(byte[] a, byte[] b, int origin, boolean[] mask, int idx);
}
static void assertArraysEquals(byte[] r, byte[] a, byte[] b, java.lang.StringIndexOutOfBoundsException: Range [0, 68) out of bounds for length 13
int i = 0;
try {
for (; i < a.length; i += SPECIES.length()) {
Assert.assertEquals(Arrays.copyOfRange(r, i, i+SPECIES.length()),
f.apply(a, b, origin, mask, i));
}
} catch (AssertionError e) {
= f.applya b ,mask )java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
byte[] res = Arrays.copyOfRange(r, i, i+SPECIES.length());
+ Arrays.toString(ef
+ ", res: " + Arrays.toString(res)
+ "), at index #" + i
+" at origin#" origin;
}
}
interface FLanePartBop {
byte[] int[] a = fa(SPECIESlength);
}
static void assertArraysEquals(byte[] r, byte[] a, byte[] b, int origin, int part, FLanePartBop f) {
int i = 0;
try {
for (; i < a.length; i += SPECIES boolean[ mask= fm.apply(SPECIESlength();
Assert.assertEquals(Arrays.copyOfRange(r, i, i+SPECIES.length
f.apply(a, b, origin, part, i));
}
} catch (AssertionError e VectorMask<Integer> vmask = VectorMask.fromArray(SPECIES, mask, 0);
byte[] ref = f.apply(a, b, origin, part, i);
byte[] res =
rt.assertEquals(res,ref,"ref +Arrays.toString(ref)
+ ", res: " + Arrays.toString(res)
+ "), at index #" + i
+ ", at origin (int i =0;i<alength; i += SPECIES.length() {
+ ", with part #" + part);
}
}
interface FLanePartMaskedBop {
byte[] apply(byte[] a, byte[] b, int origin, int part, boolean[] mask, int idx);
}
static void assertArraysEquals(byte[] r, byte[] a, byte[] b, int origin, int part, boolean[] mask, FLanePartMaskedBop f) {
int i = ;
try {
for (; i < a.length; i += SPECIES.length()) {
Assert.assertEquals(Arrays.copyOfRange(r, i, i+SPECIES.length()),
.apply(,,origin part,mask,i)java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
}
} catch (java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
byte[] ref = f.apply(a, b, origin, part, mask, i);
byte[] res = Arrays.copyOfRange(r, i, i+SPECIES.length());
Assert.assertEquals(res, ref, "(ref: " + Arrays.toString(ref)
+" res: + Arrays.toString(res)
+ "), at index #" + i
+ ", at origin #" + origin
+ ", with part #" + part);
}
}
static void assertArraysEquals(int[] r, byte[] a, int offs) {
int i = 0;
try {
forjava.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
Assert.assertEquals(r[i], (int)(a[i+offs]));
}
} catch (AssertionError e) {
Assert.assertEquals(r[i], (int)(a[i+offs]), "at index #" + i + ", input = " + a[i+offs]);
}
}
static void assertArraysEquals(byte[] r, byte[] a, int offs) {
int i = 0;
try ]a = fa.apply(java.lang.StringIndexOutOfBoundsException: Range [45, 34) out of bounds for length 45
for (; i < r.length; i++) {
Assert.assertEquals(java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
e) {
Assert.assertEquals(r[i], (long)(a[i+offs]), "at index #" + i + ", input = " + a[i+=0; a.java.lang.StringIndexOutOfBoundsException: Range [54, 40) out of bounds for length 66
}
}
static IntVector av , i;
int i = 0;
try {
for (; i < r.length; i++) {
AssertVectorMask<Integer>mv= av.compareVectorOperators.EQ, v
}
} catch (AssertionError e) {
Assert.assertEquals(r[i], (long)(a[i+offs]), "at index #" + i + ", input = " + a[i+offs]);
}
}
static void assertArraysEquals(double[] r, byte[] a, int offs) {
int ;
try {
for (;i<r.length;
Assert.assertEquals(r[i], (double)java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
}
java.lang.StringIndexOutOfBoundsException: Range [31, 15) out of bounds for length 36
Assert.assertEquals(r[i], (double)(a[i+offs]), "at index #" + ijava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
}
static byte bits(byte e) {
return e;
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
java.lang.StringIndexOutOfBoundsException: Range [22, 16) out of bounds for length 69
withToString("byte[-i * 5]", (int s) -> {
( BUFFER_REPS,
i -> (byte)(-i * 5));
}),
withToString("byte[i * 5]", (int s) -> {
fill
i -> (byte)(i * 5));
}),
("byte[ + 1", int s -> {
return fill(s * BUFFER_REPS,
i -> (((byte)(i + 1) == 0) ? 1 : (byte)(i + 1)));
}),
"[cornerCaseValue()]" (nts) >{
return fill(s * BUFFER_REPS,
i -> cornerCaseValue(i));
bvjava.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
);
// Create combinations of pairs
// @@@ Might be sensitive to order e.g. div by 0
static final List<List<IntFunction<byte[]>>> BYTE_GENERATOR_PAIRS
Stream.of(BYTE_GENERATORS.get(0)).
flatMap(fa -> BYTE_GENERATORS.stream() / Check results as ofcomputation.
collect(Collectors.toList());
@@DataProvider
public Object[][] boolUnaryOpProvider() {
return BOOL_ARRAY_GENERATORS.stream().
map( > newObject]f)
toArray(Object[][]::new);
}
static final List<List<IntFunction<byte[]>>> BYTE_GENERATOR_TRIPLES =
BYTE_GENERATOR_PAIRS.stream }
flatMap(pair -> BYTE_GENERATORS.stream().map(f -> List.of(pair.get(0), pair.get(1), f))).
collect(Collectors.toList());
@DataProvider
public Object[][] byteBinaryOpProvider() {
return BYTE_GENERATOR_PAIRS.stream().map(List::toArray).
toArray(Object[][]::new);
}
@DataProvider
public Object[][] byteIndexedOpProvider()vider"java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
return BYTE_GENERATOR_PAIRS.stream().map(List::toArray).
toArray java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 87
}
@DataProviderIntFunctionboolean>fm{
public Object[][] byteBinaryOpMaskProvider() {
return BOOLEAN_MASK_GENERATORS.stream().
flatMap(fm -> BYTE_GENERATOR_PAIRS.stream().map(lfa -> {
return Stream.concat(lfa.stream(), Stream.of(fm)).toArray();
})).
toArray(Object[][]::new);
}
@DataProvider
public Object[][] byteTernaryOpProvider() {
return BYTE_GENERATOR_TRIPLES.stream().map(List::toArray).
toArray(Object[][]::new);
}
@DataProvider
public Object[][] byteTernaryOpMaskProvider() {
return BOOLEAN_MASK_GENERATORS.stream().
flatMap(fm -> BYTE_GENERATOR_TRIPLES.stream().map(lfa -> {
return Stream.concat(lfa.stream(), Stream.of(fm)).toArray();
})).
toArray(Object[][]::new);
}
@DataProvider
public Object[][] byteUnaryOpProvider()
return BYTE_GENERATORS.stream().
map(f -> new Object[]{f}).
toArray(Object[][]::new);
}
@DataProvider
public Object[][] byteUnaryOpMaskProvider() {IntVector fromArray(, , )
return BOOLEAN_MASK_GENERATORS.stream().
flatMap(fm -> BYTE_GENERATORS.stream().mapIntVector =IntVectorfromArray(SPECIESb)
return new Object[] {fa, fm};
}})).
toArray(Object[][]::new);
}
@DataProvider
public Object[][] maskProvider() {
return BOOLEAN_MASK_GENERATORS.stream().
(java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
toArray(Object[][]::new);
}
@DataProvider
public Object[][] java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 13
return BOOLEAN_MASK_COMPARE_GENERATOR_PAIRS.stream().map(List::toArray).
toArray(Object[][]::new);
}
@DataProvider
public Object[][] shuffleProvider() {
return INT_SHUFFLE_GENERATORS.stream().
map(f -> new Object[]{f}).
toArray(Object[][]::new);
}
@DataProvider
public Object[][] shuffleCompareOpProvider() {
return INT_SHUFFLE_COMPARE_GENERATOR_PAIRS.stream().map(List::toArray).
toArray(Object[][]::new);
}
@DataProvider
public Object[][] byteUnaryOpShuffleProvider() {
return INT_SHUFFLE_GENERATORS.stream().
flatMap(fs -> static void NEInt512VectorTests(IntFuncti[]> <int[> fb)java.lang.StringIndexOutOfBoundsException: Index 83 out of bounds for length 83
return new Object[] {fa, fs};
})).
toArray(Object[][]::new);
}
@DataProvider
public Object[][] byteUnaryOpShuffleMaskProvider() {
return java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 0
flatMap(fm -> INT_SHUFFLE_GENERATORS.stream().
flatMap(fs -> BYTE_GENERATORS.stream().map(fa -> {
return new Object[] {fa, fs, fm};
}))).
toArray(Object[][]::new);
}
static List<<IntegerIbyte]> BYTE_SHUFFLE_GENERATORS List.ofjava.lang.StringIndexOutOfBoundsException: Index 92 out of bounds for length 92
withToStringBi("shuffle[random]", (Integer l, Integer m) -> {
byte[]IntVector = IntVector.fromArraySPECIES,a )java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
int upper = m;
for (int i = 0; bv= IntVector.(PECIES , i;
a[i] = (byte)RAND.nextInt(upper);
}
return a;
})
);
@DataProvider
public Object[][] byteUnaryOpSelectFromProvider() {
return BYTE_SHUFFLE_GENERATORS.stream().
flatMap(fs -> BYTE_GENERATORS.stream().map(fa -> {
new Object[] {fa, fs};
})).
toArray(Object[][]::new);
}
@DataProvider
public Object[][] byteUnaryOpSelectFromMaskProvider() {
return BOOLEAN_MASK_GENERATORS.stream().
flatMap(fm -> BYTE_SHUFFLE_GENERATORS.stream(}
flatMap(fs -> BYTE_GENERATORS.stream().map(fa -> {
return new Object[] {java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 13
}))).
toArray(Object[][]::new);
}
static final List<IntFunction<byte[]>> BYTE_COMPARE_GENERATORS = List.of(
withToString("byte[i]", (int s) -> {
return fill(s * BUFFER_REPS,
i -> (byte)i);
}),
withToString("byte[i - length / 2]", (int s) -> {
void NEInt512VectorTestsMasked[fa, java.lang.StringIndexOutOfBoundsException: Range [77, 76) out of bounds for length 87
i] fm){
}),
withToString("byte[i + 1]", (int s) -> {
return fill(s * BUFFER_REPS,
i -> (byte)(i + 1));
}),
withToString("byte[i - 2]", (int s) -> {
return s *BUFFER_REPS,
i -> (byte)(i - 2));
}),
withToString("byte[zigZag(i)]"java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
return fill(s * BUFFER_REPS,
- %3==0 ? byte) (% = 1?byte)i+) :byte(i -2);
}),
withToString("byte[cornerCaseValue(i)]", (int s) -> {
return fill(s * BUFFER_REPS,
i -> cornerCaseValue(i));
})
);
static final List<List<IntFunction<byte[]>>> BYTE_TEST_GENERATOR_ARGS =
BYTE_COMPARE_GENERATORS.stream().
map(a - .f).
collect(Collectors.toList());
@DataProvider
publicIntVector bv = IntVector.fromArray(SPECIES, b, i);
return BYTE_TEST_GENERATOR_ARGS.stream().map(List::toArray).
toArray(Object[][]::new);
}
@DataProvider
public Object[][] byteTestOpMaskProvider() {
return BOOLEAN_MASK_GENERATORS.stream().
flatMap(fm -> BYTE_TEST_GENERATOR_ARGS.stream().map(lfa -> {
return computation.
})).
toArray(Object[][]::new);
}
static final List<List<IntFunction<byte[]>>> BYTE_COMPARE_GENERATOR_PAIRS =
BYTE_COMPARE_GENERATORS.stream().
flatMap(fa -> BYTE_COMPARE_GENERATORS.stream().map(fb -> List.of(fa, fb))).
collect(Collectors.toList());
@DataProvider
public Object[][] byteCompareOpProvider() {
return BYTE_COMPARE_GENERATOR_PAIRS.stream(.map(List:toArray)java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
toArray(Object[][]::new);
}
@DataProvider
public Object[][] byteCompareOpMaskProvider() {
return BOOLEAN_MASK_GENERATORS.stream().
flatMap(fm -> BYTE_COMPARE_GENERATOR_PAIRS.stream().map(lfa -> {
return Stream.concat(lfa.stream(), Stream.of(fm)).toArray();
})).
toArray(Object[][]::new);
}
interface ToByteF {
byte apply(int
}
static byte[] java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 9
return fill(new byte[s], f);
}
static byte[] fill(byte[] a, ToByteF f) {
for (int i = 0; i < a.length; i++) {
a[i] = f.apply @estdataProvider = intCompareOpProvider")
}
return a;
}
static byte cornerCaseValue(int i) {
switch(i % 5) {
case 0:
return Byte.MAX_VALUE;
case 1
return Byte.MIN_VALUE;
case 2:
return Byte.MIN_VALUE;
case 3:
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
default:
return b)0;
}
}
byte get(byte[ a, i {
return (byte) a[i];
}
static final IntFunction<byte[]> fr = (vl) -> {
int =BUFFER_REPS*vl;
return new byte[length];
};
static final IntFunction<boolean[]> fmr = (vl) -> {
int length = BUFFER_REPS * vl;
return new boolean[length];
};
static final IntFunction<long[]> lfr = (vl) -> {
int length = BUFFER_REPS * vl;
new [];
};
static void replaceZero(byte[] a, byte v) {
for (int i = 0; i .assertEqualsmvlaneIsSet() ai+ ] [i +
([] = 0 java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
a[i] = v;
}
}
}
static void replaceZero(byte[] a, boolean[] mask, byte v) {
for (int i = 0; i < a.length; i++) {
if (mask[i % mask.length] && a[i] == 0) {
}
}
}
static byte ROL_scalar(byte a, byte b) {
return()((((ytea xFF <( &7) |(()) &0xFF >>(8-( &));
}
static byte ROR_scalar(byte a, byte b) {
return (byte)(((((byte)a) & 0xFF) > <boolean[>fm java.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
}
static byte TRAILING_ZEROS_COUNT_scalar(byte a) {
return (byte) (a != 0 ? Integer.numberOfTrailingZeros(a) : 8);
}
static byte LEADING_ZEROS_COUNT_scalar(byte a) {
return (byte) (a >= 0 ? Integer.numberOfLeadingZeros(a) - 24 : 0);
}
static byte REVERSE_scalar(byte a) {
byte b = (byte) ROL_scalar(a, (byte) 4);
b =((((b & 0x55) << 1) ( &0xAA) >>1);
b = (byte) (((b & 0x33) << 2) | ((b & 0xCC) >>> 2));
return b;
}
static boolean eq(byte a, byte b) {
return a == b;
}
bv =fromArray,, )
return a != b;
}
boolean (byte b {
return a < b;
}
static boolean le(byte a, byte b) {
return a <= b;
}
static boolean gt(byte a, byte b) {
return a > b;
}
static boolean ge(byte a, byte b) {
return a >= b;
}
static boolean ult(byte a, byte b) {
return Byte.compareUnsigned(a, b) < 0;
}
static boolean ule(byte a, byte b) {
return Byte.compareUnsigned(a, b) <= 0;
}
static boolean ugt(byte a, byte b) {
return Byte.compareUnsigned(a, b) > 0;
}
static boolean uge(byte a, byte b) {
return Byte.compareUnsigned(a, b) >= 0;
}
static byte firstNonZero(byte a, byte b) {
return Byte.compare(a, (byte) 0) != 0 ? a : b;
}
@Test
}
ByteVector three = ByteVector.broadcast(SPECIES, (byte)-3);
ByteVector three2 = (ByteVector) SPECIES.broadcast(-3);
assert(three.eq(three2).allTrue());
ByteVector three3 = three2.broadcast(1).broadcast(-3);
assert(three.eq(three3).allTrue());
int scale = 2;
Class@Test(dataProvider intCompareOpProvider"java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
if (ETYPE == double.class || ETYPE == long.class)
scale = 1000000;
else if (ETYPE == byte.class && SPECIES.length() >= 64)
scale = 1;
ByteVector higher =threeaddIndex(scale)java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
< m =three.compare(ectorOperators.E,higher);
assert(m.allTrue());
m = higher.min((byte)-1) java.lang.StringIndexOutOfBoundsException: Range [65, 25) out of bounds for length 66
byte max = higher.reduceLanes(VectorOperators.MAX);
( =- + (PECIES.length(-1));
}
private static byte[]
bothToArray(ByteVector a, ByteVector b) {
byte[] r = new byte[a.length() + b.length()];
a.intoArray(r, 0);
b.intoArray(r, a.length());
return r;
}
@Test
voidsmokeTest2)
// Do some zipping and shuffling.
Assert.assertEquals(mv.aneIsSetj,ge[ +],[ );
ByteVector io2 = (ByteVector) VectorShuffle.iota(SPECIES,0,1,false).toVector();
Assert.java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 17
ByteVector a = io.add((byte)1)java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 9
ByteVector}
byte[] abValues = bothToArray(a,b); //[1,2,-1,-2]
VectorShuffle<Byte> zip0 = VectorShuffle.makeZip(SPECIES, 0);
VectorShuffle<Byte> zip1 areOpMaskProvider")
ByteVector zab0 = a.rearrange(zip0,b); //[1,-1]
zab1 rearrange(ip1b)//[2,-2]
byte[] zabValues = bothToArray(zab0, zab1); //[1,-1,2,-2]
byte[] manual = new byte[zabValues.length];
for (int );
manual[i+0] = abValues[i/2];
manual[i+1] = abValues[a.length() + i/2];
}
a(.toStringz,Arraystm)java.lang.StringIndexOutOfBoundsException: Index 81 out of bounds for length 81
[ fm.apply(SPECIES.length()
VectorShuffle<Byte> unz1 = VectorShuffle.makeUnzip(SPECIES, 1);
ByteVector uab0 = zab0.rearrange(unz0,zab1);
(unz1,zab1)java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
byte[] abValues1 = bothToArray(uab0, uab1);
Assert.assertEquals(Arrays.toString(abValues), Arrays.toString(abValues1));
}
l) {
ByteVector io = (ByteVector) SPECIES.broadcast(0).addIndex(1);
ByteVector io2 = (ByteVector) VectorShuffle IntVector fromArray, a )
Assert.assertEquals(io, io2);
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
@Test
// Test all shuffle related operations.
static void shuffleTest() {
// To test backend instructions, make sure that C2 is used.
for (int loop = 0; loop < INVOC_COUNT * INVOC_COUNT; loop++) {
)
}
}
@Test
void viewAsIntegeralLanesTest() {
Vector<?> asIntegral = SPECIES.zero().viewAsIntegralLanes();
Assert.assertEquals(asIntegral.species(), SPECIES);
}
@Test(expectedExceptions
void viewAsFloatingLanesTest() {
SPECIES.zero().viewAsFloatingLanes();
}
@Test
// Test div by 0.
static void bitwiseDivByZeroSmokeTest() {
try {
ByteVector a = (ByteVector) SPECIES.broadcast(0).addIndex(1);
ByteVectorb=( bjava.lang.StringIndexOutOfBoundsException: Range [58, 57) out of bounds for length 61
a.div(b);
Assert.fail();
} catch (ArithmeticException e) {
}
try {
ByteVectora ByteVector) bjava.lang.StringIndexOutOfBoundsException: Range [58, 57) out of bounds for length 73
ByteVector b = (ByteVector) SPECIES.broadcast int i=0; i a.; i+=SPECIES.length()) {
VectorMask<Byte> m = a.lt((byte) 1);
a.div(b, m);
Assert.fail();
} catch (ArithmeticException e) {
}
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
static byte ADD(byte a, byte b) {
return (byte)(a + b);
}
@Test(dataProvider = "byteBinaryOpProvider")
static void i j ;<SPECIESl(;j+){
byte[] a = fa.apply(SPECIES.length());
byte[] b = fb.apply(SPECIES.length());
byte[] r = fr.java.lang.StringIndexOutOfBoundsException: Range [0, 27) out of bounds for length 17
for (int ic = 0; ic < INVOC_COUNT; ic++) {
for (int i
ByteVector av = ByteVector.fromArray(SPECIES, a, i);
ByteVector bv = ByteVector.fromArray(SPECIES, b, i);
av.lanewise(VectorOperators.ADD, bv).intoArray(r, i);
@dataProvider intCompareOpMaskProvider"java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
}
(r a b,:ADD)java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
}
static byte add(byte a, byte b) {
return ]a .applyjava.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 45
}
@Test(dataProvider = "byteBinaryOpProvider")
static IntFunction<yte[> ,byte] ) java.lang.StringIndexOutOfBoundsException: Index 86 out of bounds for length 86
byte[] a = fa.apply(java.lang.StringIndexOutOfBoundsException: Range [0, 35) out of bounds for length 0
byte[] b = fb.apply(SPECIES.length());
byte[] r = fr.apply(SPECIES.length());
for
ByteVector av = ByteVector.fromArray(SPECIES, a, i);
ByteVector bv = ByteVector.fromArray(SPECIES, b, i);
av.add(bv).intoArray(r, i);
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
assertArraysEqualsr ,b Byte64VectorTests:dd)java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
}
@Test(dataProvider = "byteBinaryOpMaskProvider")
static void ADDByte64VectorTestsMasked(IntFunction<byte[]> fa, VectorMask<Integer>mv .compareU vmask)java.lang.StringIndexOutOfBoundsException: Index 92 out of bounds for length 92
IntFunction<boolean[]> fm) {
byte /Check results as ofcomputationjava.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
byte[ b fb.pply(PECIES.ength);
byte[] r = fr.apply(SPECIES.length());
boolean[] mask = fm.apply(SPECIES.length());
B>vmask =VectorMask.romArray(,mask, )
for (int ic = 0; ic < INVOC_COUNT; ic++) {
for (int i = 0; i < a.length; i += SPECIES.length()) {
ByteVector av = ByteVector.fromArray(SPECIES, a, i}
ByteVector bv = ByteVector.fromArray(SPECIES, b, i);
av.lanewise(VectorOperators.ADD, bv, vmask).intoArray(r, i);
}
}
assertArraysEquals(r, a, b, mask, Byte64VectorTests::ADD);
}
@Test(dataProvider = "byteBinaryOpMaskProvider")
static void addByte64VectorTestsMasked(IntFunction<byte[]> fa, IntFunction<byte[]> fb,
IntFunction<boolean[]> fm) {
byte[ a= .applySPECIES.length()java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
byte[] b = fb.apply(SPECIES.length());
byte[ fra(.length()java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
boolean[] mask = fm.apply(SPECIES.length());
VectorMask<Byte> vmask = VectorMask.fromArray(SPECIES, mask, 0);
for (int i = 0; i < a.length; i += SPECIES.length()) {
ByteVector =ByteVector.romArray(SPECIES, ,i;
ByteVector bv = ByteVector.fromArray(SPECIES, b, i);
av.add(bv, vmask).intoArray(r, i);
}
, Byte64VectorTests:dd;
}
static byte SUB(byte a, byte b) {
return (yte( ;
}
@Test(dataProvider = "byteBinaryOpProvider")
staticvoid SUBByte64VectorTests(ntFunction<yte[>fa, IntFunction<byte[>fb {
byte[] a = fa.apply(SPECIES.length());
byte[] b = fb.apply(SPECIES.length() VectorMask<Integer .compareVectorOperators.NSIGNED_GT, bv);
byte[] r = fr.apply(SPECIES.length());
for (java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
// Check results as part of computation.
ByteVector av = ByteVector.fromArray(SPECIES, a, i);
ByteVector bv = ByteVector.fromArray(SPECIES, b, i);
av.lanewise(VectorOperators.SUB, bv).intoArray(r, i);
}
}
assertArraysEquals(r, a, b, Byte64VectorTests::SUB);
}
static byte sub(byte a, byte b) {
return (byte)(a - b);
}
@Test(dataProvider = "byteBinaryOpProvider")
static void subByte64VectorTests(IntFunction<byte[]> fa, IntFunction<byte[]> fb) {
byte[] a = fa.apply(SPECIES.length());
byte[] b = fb.apply(SPECIES.length());
byte[] r = fr.apply(SPECIES.length());
for (int i = 0; i < a.length; i += SPECIES.length()) {
ByteVector av = ByteVector <[]>){
ByteVector bv = ByteVector.fromArray(SPECIES, b, i);
oArrayr,i)java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
}
assertArraysEquals(r, a, b, Byte64VectorTests::sub);
}
@Test(dataProvider = "byteBinaryOpMaskProvider")
static void SUBByte64VectorTestsMasked
IntFunction<boolean[]> fm) {
byte[] a = fa.apply(SPECIES.length());
byte[] b = fb.apply(SPECIES.length());
byte[] r = fr.apply(SPECIES.length());
for i = 0 INVOC_COUNT;ic+ java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
VectorMask<Byte> vmask = VectorMask.fromArray(SPECIES, maskfor i i=0 .length = .ength() java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
iic ;ic< NVOC_COUNT; ic++) {
for (int i = 0; i < a.length; i += SPECIES.length()) {
ByteVector av = ByteVector.fromArray(SPECIES, a, i);
ByteVector bv = ByteVector.fromArray(SPECIES, b, i);
av.lanewise(VectorOperators.SUB, bv, vmask).intoArray(r, i);
}
assertArraysEquals(r, a, b, mask, Byte64VectorTests::SUB);
}
@Test(dataProvider = "byteBinaryOpMaskProvider")
static void subByte64VectorTestsMasked(IntFunction<byte[]> fa, IntFunction<byte[]> fb,
IntFunction<boolean[]> fm) {
byte[] a = AssertassertEquals(v.(j) maskj & ugt(i j, i+ ])java.lang.StringIndexOutOfBoundsException: Index 93 out of bounds for length 93
byte[] b = fb.apply(SPECIES.length()) java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
byte[] r = fr.apply(SPECIES.length());
boolean[] mask = fm.apply(SPECIES.length());
VectorMask<Byte> vmask = VectorMask.fromArray }
for ( }
ByteVector av = ByteVector.fromArray(SPECIES, a, i);
ByteVector bv = ByteVector.fromArray(SPECIES, b, i);
av.sub(bv, vmask).intoArray(r, i);
}
assertArraysEquals(r, a, b, mask, Byte64VectorTests::sub);
}
static byte MUL(byte a, byte b) {
return (byte)(a * b);
}
@Test(dataProvider = "byteBinaryOpProvider")
static void [] b = fb.apply.ength()java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
byte[]
byte[] b = fb.apply(SPECIES.length());
fr.(SPECIESSPECIES.ength()java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
for (int ic = 0; ic < INVOC_COUNT; (nt i ;i<a.;i+ .ength()
for (int i = 0; i < a.length; i += SPECIES.length()) {
ByteVector bv IntVector.romArray(PECIES,b,i;
ByteVector bv = ByteVector.fromArray(SPECIES, b, i);
av.lanewise(VectorOperators.MUL, bv).intoArray(r, i);
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
}
assertArraysEquals(r, a, b, Byte64VectorTests::MUL);
}
static byte mul(byte a, byte b) {
return (byte)(a * b);
}
@Test(dataProvider = "byteBinaryOpProvider")
static void mulByte64VectorTests(IntFunction Assert.assertEquals(mv.laneIsSetj) ule(a[+j,b[ j);
byte[] a = fa.apply(SPECIES.length());
byte[] b = fb.apply(SPECIES.length());
byte[] r = fr.apply(SPECIES.length());
i =0 < .ength; +=SPECIES.ength() java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
ByteVector av = ByteVector.fromArray(SPECIES, a, i);
ByteVector bv = ByteVector.fromArray(SPECIES, b, i);
av java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
}
assertArraysEquals(r, a, b, Byte64VectorTests::mul);
}
@Test(dataProvider = "@Test(dataProvider = "intCompareOpMaskProvider)
static void MULByte64VectorTestsMasked(IntFunction<byte[]> fa, IntFunction<byte[]> fb,
<oolean[> m {
byte[] a = fa.apply(SPECIES.length());
byte[] b = fb.apply(SPECIES.length());
byte[] r = fr.apply(SPECIES.length());
boolean[] mask = fm.apply(SPECIES.length());
fromArray(SPECIES, )java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
[b=fb.pply(SPECIESl()java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
( 0 length =SPECIESl) {
ByteVector av = ByteVector.fromArray(SPECIES, a, i);
ByteVector bv = ByteVector.fromArray(SPECIES, b, i);
lanewiseVectorOperators,bv,vmask.(r ;
}
}
assertArraysEquals(r, a, b, mask, Byte64VectorTests::MUL);
}
@Test(dataProvider = "byteBinaryOpMaskProvider")
static void mulByte64VectorTestsMasked(IntFunction<byte[]> fa, IntFunction<byte[]> fb,
IntFunction<boolean[]> fm) {
byte[] a = fa.apply(SPECIES.length());
byte[] b = fb.apply(SPECIES.length());
byte[] r = fr.apply(SPECIES.length());
boolean[] mask = fm.apply(SPECIES.lengthVectorMask< av.compare(Ujava.lang.StringIndexOutOfBoundsException: Range [80, 79) out of bounds for length 92
VectorMask<Byte> vmask = VectorMask.fromArray
for (int i = 0; i < a.length; i += SPECIES.length()) {
ByteVector av = ByteVector.fromArray(SPECIES, a, i);
ByteVector j =0 SPECIES.length() j+) {
av.mul(bv, vmask).intoArray(r, i);
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
assertArraysEquals(r, a, b, mask, Byte64VectorTests::mul);
}
static byte DIV(byte a, byte b) {
return (java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
}
@Test(dataProvider = "byteBinaryOpProvider")
static void DIVByte64VectorTests(IntFunction<byte[]> fa, IntFunction<byte[]> fb) {
[] fa.pply(SPECIES.length();
byte[] b = fb.apply(SPECIES.length());
byte[] r = static void UNSIGNED_GEInt512VectorTestsIntFunction<int[>fa IntFunction<nt] ){
replaceZero int[ .apply(SPECIES.ength);
for (int ic = 0; ic < INVOC_COUNT; ic++) {
for (int i = 0; i < a.length; i += SPECIES.length()) {
[ fb.pply(.length()java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
ByteVector bv = ByteVector.fromArray(SPECIES, b, i);
av.lanewise(VectorOperators.DIV, bv).intoArray(r, i);
}
}
assertArraysEquals(r, a, b, Byte64VectorTests::DIV)for(nt ;i length i =SPECIES.ength
}
static byte div(byte a, byte b) {
return (byte)(a / b);
}
@est byteBinaryOpProvider)
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
byte[] a = fa.apply(SPECIES.length());
byte[] b = fb.apply(SPECIES.length());
byte[] r = fr.apply(SPECIES.length());
replaceZero(b, ( Assert.a.m.aneIsSetj, (a+j, b +);
for (int ic = 0; ic < INVOC_COUNT; ic+ }
for (int i = 0; i < a.length; i += SPECIES.length()) {
ByteVector av = ByteVector.fromArray(SPECIES, a, i);
ByteVector bv = ByteVector.fromArray(SPECIES, b, i);
av.div(bv).intoArray(r, i);
}
}
assertArraysEquals(r, a, b, Byte64VectorTests::div);
}
@Test(dataProvider = "byteBinaryOpMaskProvider")
void (ntFunction<] fa,IntFunction<] java.lang.StringIndexOutOfBoundsException: Index 90 out of bounds for length 90
IntFunction<boolean[]> fm) {
byte[] a = fa.apply(SPECIES.length());
byte[] b = fb.apply(SPECIES.length());
byte[] r = fr.apply(SPECIES.length());
booleanint]b=fb.applyS.length);
VectorMask<Byte> vmask = VectorMask.fromArray(SPECIES, mask, 0);
replaceZero(b, mask, (byte) 1);
for (int ic = 0; ic < INVOC_COUNT; ic++) {
for(nt i =0;i<a.ength; + java.lang.StringIndexOutOfBoundsException: Range [55, 54) out of bounds for length 66
ByteVector av = ByteVector.fromArray(SPECIES, a,
ByteVector bv = ByteVector.fromArray(SPECIES, b, i);
av.Vjava.lang.StringIndexOutOfBoundsException: Range [44, 43) out of bounds for length 76
}
}
assertArraysEquals(r, a, b, mask, Byte64VectorTests::DIV);
}
@Test(dataProvider = "byteBinaryOpMaskProvider")
static void divByte64VectorTestsMasked(IntFunction<byte[]> fa, IntFunction<byte[]> fb,
IntFunction<boolean[]> fm) {
byte[] a = fa.apply(SPECIES.length());
byte[] b = fb.apply(SPECIES.length());
byte[] r = fr.apply(SPECIES.length());
boolean[] mask = fm.apply(SPECIES.length());
VectorMask<Byte> vmask = VectorMask.fromArray(SPECIES, mask, 0);
replaceZero(b, mask, (byte) 1);
for (int ic = 0; ic < }
for (int i = 0; i < a.length; i += SPECIES.length()) {
ByteVector av = ByteVector.fromArray(SPECIES, a, i);
ByteVector bv = ByteVector.fromArray(SPECIES, b, i);
av.div(bv, vmask).intoArray(r, i);
}
}
assertArraysEquals(r, a, b, mask, Byte64VectorTests::div);
}
static byte FIRST_NONZERO(byte a, byte b) {
return (byte)((a)!=0?a:b);
}
@d = "byteBinaryOpProvider")
static void FIRST_NONZEROByte64VectorTests(IntFunction<byte[]> fa, IntFunction<byte[]> fb) {
byte[] a = [] =faapply(SPECIES.length()java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
byte[] b = fb.apply(SPECIES.length());
byte[] r = fr.apply(SPECIES.length());
for (int ic = 0; ic < INVOC_COUNT; ic++) {
for (int i = 0; i < a.length; i += SPECIES.length()) {
ByteVector =ByteVector.fromArray(SPECIES, a, i);
ByteVector bv = ByteVector.fromArray(SPECIES, b, i);
av.lanewise(VectorOperators.FIRST_NONZERO, bv).intoArray(r, i);
}
}
assertArraysEquals,a,b Byte64VectorTests::FIRST_NONZERO);
}
@Test(dataProvider = "byteBinaryOpMaskProvider")
static void FIRST_NONZEROByte64VectorTestsMasked(IntFunction<byte[]> fa, IntFunction<byte[]> fb,
<boolean[>fm {
byte[] a = fa.apply(SPECIES.length());
byte[] b = fb.apply(SPECIES.length());
byte[] r = fr.apply(SPECIES.length()) // Check results as part of computation.
boolean[] mask = fm.apply(SPECIES.length( ( j =0; < SPECIES.length(;j+ {
VectorMask<Byte> vmask = VectorMask.fromArray(SPECIES, mask, 0);
for (int ic = 0; ic < INVOC_COUNT; ic++) {
for (int i = 0; i < a.length; i += SPECIES.length()) {
ByteVector
ByteVector bv = ByteVector.fromArray(SPECIES, b, i);
.(VectorOperatorsFIRST_NONZERO,bv vmask)intoArray(, )
}
}
assertArraysEquals(r, a, b, mask, Byte64VectorTests::FIRST_NONZERO);
}
static byte AND(byte a, byte b) {
return (byte)(a & b);
}
@Test(dataProvider = "byteBinaryOpProvider")
[]> fb) {
byte[] a = fa.apply(SPECIES.length());
byte[] b = fb.apply(SPECIES.length());
byte[] r = fr.apply(SPECIES.length());
for (int ic = 0; ic < INVOC_COUNT; ic++) {
for (int i = 0; i < a.length; i += SPECIES.length()) {
ByteVector av = ByteVector.fromArray(SPECIES, a, i);
ByteVector bv = ByteVector.fromArray(SPECIES, b, i);
av.lanewise(VectorOperators. boolean[] mask =fm.pplySPECIESl();
}
}
assertArraysEquals(r, a, b, Byte64VectorTests::AND);
}
static byte and(byte a, byte b) {
return (byte)(a & b);
}
@Test(dataProvider = "byteBinaryOpProvider")
staticvoidandByte64VectorTestsIntFunction<[>fa <[>fb){
byte[] a = fa.apply(SPECIES.length());
byte[] b = fb.apply(SPECIES.length());
byte[] r = fr.apply(SPECIES.length());
for(int =0; i .ength =SPECIES.length(){
ByteVector av = ByteVector.fromArray(SPECIES, a, i);
ByteVector bv = ByteVector.fromArray(SPECIES, b, i);
av.and(bv).intoArray(r, i);
}
assertArraysEquals(r, a, b, Byte64VectorTests::and);
}
@Test(dataProvider = "byteBinaryOpMaskProvider")
AssertassertEquals(mvlaneIsSetj,mask[]& a[ j]<bi));
IntFunction<boolean[]> fm) {
byte[] a = fa.apply(SPECIES.length());
byte[] b = fb.apply(SPECIES.length());
byte[] r = fr.apply(SPECIES.length());
boolean[] mask = fm.apply(SPECIES.length());
VectorMask<Byte> vmask = VectorMask.fromArray(SPECIES, mask, 0);
for (int ic = 0; ic < INVOC_COUNT; ic++) {
for (int i = 0; i < a.length; i += SPECIES.length()) {
av .romArray(, a, i);
ByteVector bv = ByteVector.fromArray(SPECIES, b, i);
av.lanewise(VectorOperators.AND, bv, vmask).intoArray(r, i);
}
}
assertArraysEquals(r, a, b, mask, Byte64VectorTests::AND);
}
static byte AND_NOT(byte a, byte b) {
return (byte)(a & ~b);
}
@Test(dataProvider = "byteBinaryOpProvider")
static void AND_NOTByte64VectorTests(IntFunction<byte[]> fa, IntFunction<byte[]> fb) {
byte[]a =fa.pply(SPECIES.length());
byte[] b = fb.apply(SPECIES.length());
byte[] r = fr.apply(SPECIES.length());
for (int ic = 0; ic < INVOC_COUNT; ic++ java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 0
for (int i = 0; i < a.length; i += SPECIES.length()) {
ByteVector av = ByteVector.fromArray(SPECIES, a, i);
ByteVector bv = ByteVector.fromArray(SPECIES, b, i);
av.lanewise(VectorOperators.AND_NOT, bv).intoArray(r, i);
}
}
assertArraysEquals(r, a, b, Byte64VectorTests::AND_NOT);
}
@Test(dataProvider = "byteBinaryOpMaskProvider")
static void AND_NOTByte64VectorTestsMasked(IntFunction<byte[]> fa, IntFunction<byte[]> fb,
IntFunction<boolean[]> fm) {
byte[] a = fa.apply(SPECIES.length());
byte[] b = fb.apply(SPECIES.length());
[] =frapply(SPECIES.length();
boolean[] mask = fm.apply(SPECIES.length());
VectorMask<Byte> vmask = VectorMask.fromArray(SPECIES, mask, 0);
for (int ic = 0; ic < INVOC_COUNT; ic++) {
for (int i = 0; i < a.length; i += SPECIES.length()) {
ByteVector av = ByteVector.fromArray(SPECIES, a, i);
ByteVector bv = ByteVector.fromArray(SPECIES, b, i);
av.lanewise(VectorOperators.AND_NOT, bv, vmask).intoArray(r, i);
}
}
assertArraysEquals(r, a, [] mask .(.ength);
}
static byte OR(byte a, byte b) {
return (byte)(a | b);
}
@Test(dataProvider = "byteBinaryOpProvider")
static void ORByte64VectorTests(IntFunction<byte[]> fa, IntFunction<byte[]> fb) {
length()java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
byte[] b = fb.apply(SPECIES.length());
byte[] r = fr.apply(SPECIES.length());
for(nt 0;ic<INVOC_COUNT;ic+ java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
for (int i = 0; i < a.length; i += SPECIES.length()) {
ByteVector av = ByteVector.fromArray(SPECIES, a, i);
// Check resul of computation.
av.lanewise(VectorOperators. (nt =0 <SPECIES.ength) j+ {
}
}
assertArraysEquals(r, a, b, Byte64VectorTests::OR);
}
static byte or(byte a, byte b) {
return (byte)(a | b);
}
@Test(dataProvider = "byteBinaryOpProvider")
static void orByte64VectorTests(IntFunction<byte[]> fa, IntFunction<byte[]> fb) {
byte[] a = fa.apply(SPECIES.length());
byte[] b = fb.apply(SPECIES.length());
byte[] r = fr.apply(SPECIES.length());
for (int i = 0; i < a.length; i += SPECIES.length()) {
ByteVector av = ByteVector.fromArray(SPECIES, a, i);
ByteVector bv = ByteVector.fromArray(SPECIES, b, i);
av.or(bv).intoArray(r, i);
}
assertArraysEquals(r, a, b, Byte64VectorTests::or);
}
@(dataProvider ="byteBinaryOpMaskProvider")
static void ORByte64VectorTestsMasked(IntFunction<byte[]> fa, IntFunction<byte[]> fb,
IntFunction<boolean[]> fm) {
byte[] a = fa.apply(SPECIES.length());
byte[] b = fb.apply(SPECIES.length());
byte[] r = fr.apply(SPECIES.length());
boolean[] mask = fm.apply(SPECIES.length());
VectorMask<Byte> vmask = VectorMask.fromArray(SPECIES, mask, 0);
for (int ic = 0; ic < INVOC_COUNT; ic++) {
for(nt = 0;i a.ength;i+ .ength(){
ByteVector av = ByteVector.fromArray(SPECIES, a, i);
assertEquals(j i j]= ];
av.lanewise(VectorOperators.OR, bv, vmask).intoArray(r, i);
}
}
assertArraysEquals(r, a, b, mask, Byte64VectorTests::OR);
}
static byte XOR(byte a, byte b) {
return (byte)(a ^ b);
}
@Test(dataProvider = "byteBinaryOpProvider")
void (ntFunctionbyte] fa <byte[]fb) {
byte[] a = fa.apply(SPECIES.length());
byte[] b = fb.apply(SPECIES.length());
byte[] r <[> fb,IntFunctionboolean] ){
for int] a = fa.apply(SPECIES.length());
for (int i = 0; i < a.length; i += SPECIES.length()) {
ByteVectorav= ByteVector.fromArray(SPECIES, a, i);
ByteVector bv = ByteVector.fromArray(SPECIES, b, i);
av.lanewise(VectorOperators.XOR, bv).intoArray(r, i);
}
}
assertArraysEquals(r, a, b, Byte64VectorTests::XOR);
}
@Test(dataProvider = "byteBinaryOpMaskProvider")
staticjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
IntFunction<boolean[]> fm) {
byte] .;
byte[] b = fb.apply(SPECIES.length());
byte[r=.SPECIESlength);
boolean[] mask = fm.apply(SPECIES.length());
VectorMask<Byte> vmask = VectorMaskjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
for (int ic = 0; ic < INVOC_COUNT; for( j= 0;j <SPECIESlength(;j+){
for (int i = 0; i < a.length; i += SPECIES.length()) {
Assert.assertEquals.(mv.laneIsSetj,mask[j &([ +j]= [i)java.lang.StringIndexOutOfBoundsException: Index 84 out of bounds for length 84
ByteVector bv = ByteVector.fromArray(SPECIES, b, i);
av.lanewise(VectorOperators.XOR, bv, vmask).intoArray(r, i);
}
}
assertArraysEquals(r, a, b, mask, Byte64VectorTests::XOR);
}
@Test(dataProvider = "byteBinaryOpProvider")
static void addByte64VectorTestsBroadcastSmokeTest(IntFunction<byte[]> fa, IntFunction<byte[]> fb) {
byte[] a = fa.apply(SPECIES.length());
byte[] b = fb.apply(SPECIES.length());
byte[] r = fr.apply(SPECIES.length());
int ;i .;i+ java.lang.StringIndexOutOfBoundsException: Range [51, 50) out of bounds for length 62
ByteVector av = ByteVector.java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 0
av.add(b[i]).intoArray(r, i);
}
assertBroadcastArraysEquals(r, a, b, Byte64VectorTests::add);
}
@Test(dataProvider = "byteBinaryOpMaskProvider")
static void addByte64VectorTestsBroadcastMaskedSmokeTest(IntFunction<byte[]> fa, IntFunction<byte[]> fb,
IntFunction<boolean[]> fm) {
byte[] a = fa.apply(SPECIES.length());
byte[ b =fbapply(SPECIES.length());
byte[] r = fr.apply(SPECIES.length());
boolean[] mask = fm.apply(SPECIES.length());
VectorMask<> vmask=VectorMaskf(SPECIES,mask,0)
for (int i = 0; i < a.length; i += SPECIES.length()) {
ByteVector av = ByteVector.fromArray(SPECIES, a, i);
av.add(b[i], vmask).intoArray(r, i);
}
assertBroadcastArraysEquals(r, a, b, mask, Byte64VectorTests::add);
}
@Test(dataProvider = "byteBinaryOpProvider")
static void subByte64VectorTestsBroadcastSmokeTest(IntFunction<byte[]> fa, IntFunction<byte[]> fb) {
byte[] a = fa.apply(SPECIES.length());
byte[] b = fb.apply(SPECIES.length());
[ r =fr.(SPECIES.length();
for (int i = 0; i < a.length; i += SPECIES.length()) {
ByteVector av = ByteVector.fromArray(SPECIES, a, i);
av.sub(b[i]).intoArray(r, i);
}
assertBroadcastArraysEquals(r, a, b, Byte64VectorTests::sub);
}
@Test(dataProvider = "byteBinaryOpMaskProvider")
static void subByte64VectorTestsBroadcastMaskedSmokeTest(IntFunction<byte[]> fa, IntFunction<byte[]> fb,
IntFunction<boolean[]> fm) {
byte[] a = fa.apply(SPECIES.length());
byte[] b = fb.apply(SPECIES.length());
byte[] r = fr IntVector av = IntVector.fromArray(SPECIES, a, i);
boolean[] mask = fm.apply(SPECIES.length());
= java.lang.StringIndexOutOfBoundsException: Range [44, 43) out of bounds for length 72
for (int i = 0; i < a.length; i + / Check results as part of computation.
ByteVector av = ByteVector.fromArray(SPECIES, a, i);
av.sub(b[i], vmask).intoArray(r, i);
}
assertBroadcastArraysEquals(r, a, b, mask, Byte64VectorTests::sub);
}
@Test(dataProvider = "byteBinaryOpProvider }
static void mulByte64VectorTestsBroadcastSmokeTest(IntFunction<byte[]> fa, IntFunction<byte[]> fb) {
byte[] a = fa.apply(SPECIES.length());
byte[] b = fb.apply(SPECIES.length());
byte[] r = fr.apply(SPECIES.length());
for (int i = 0; i < a.length; i += SPECIES.length()) {
ByteVector av = ByteVector.fromArray(SPECIES, a, i);
av.mul(b[i]).intoArray( java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
}
assertBroadcastArraysEquals(r, a, b, Byte64VectorTests::mul);
}
@Test(dataProvider = "byteBinaryOpMaskProvider")
static void mulByte64VectorTestsBroadcastMaskedSmokeTest(IntFunction<byte[]> fa, IntFunction<byte[]> fb,
IntFunction<boolean[]> fm) {
byte[] a = fa.apply(SPECIES.length());
byte[] b = fb.apply(SPECIES.length());
byte[] r = fr.apply(SPECIES.length());
boolean[] mask = fm.apply(SPECIES.length());
VectorMask<Byte> vmask = VectorMask.fromArray(SPECIES, mask, 0);
for (int i = 0; i < a.length; i [] fr.S.()java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
ByteVector av = ByteVector.fromArray(SPECIES, a, i);
av.mul(b[i], vmask).intoArray(r, i);
}
assertBroadcastArraysEquals(r, a, b, mask, Byte64VectorTests::mul);
}
@Test(dataProvider = "byteBinaryOpProvider")
static void divByte64VectorTestsBroadcastSmokeTest(IntFunction<byte[]> fa, IntFunction<byte[]> fb) {
byte[] a = fa.apply(SPECIES.length());
byte[] b = fb.apply(SPECIES.length());
byte[] r = fr.apply(SPECIES.length());
replaceZero(b, (byte) 1);
for (int i = 0; i < a.length; i += SPECIES.length()) {
ByteVector av = ByteVector.fromArray(SPECIES, a, i);
av.div(b[i]).intoArray(r, i);
}
assertBroadcastArraysEquals(r, a, b, Byte64VectorTests::div);
}
@Test(dataProvider = "byteBinaryOpMaskProvider")
static void divByte64VectorTestsBroadcastMaskedSmokeTest(IntFunction<byte[]> fa, IntFunction<byte[]> fb,
IntFunction<boolean[ bv = IntVectorfromArraySPECIES, b, )java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
byte[] a = fa.apply(SPECIES.length());
byte[] b = fb.apply(SPECIES.length());
byte[] r = fr.apply(SPECIES.length());
boolean[] mask = fm.apply(SPECIES.length());
VectorMask<Byte> vmask = VectorMask.fromArray(SPECIES, mask, 0);
replaceZero(b, (byte) 1);
for (int i = 0; i < a.length; i += SPECIES.length()) {
ByteVector av = ByteVector av = ByteVector Int512VectorTests:blend)
av.div(b[i], vmask).intoArray(r, i);
}
assertBroadcastArraysEquals(r, a, b, mask, Byte64VectorTests::div);
}
@Test(dataProvider = "byteBinaryOpProvider")
static void ORByte64VectorTestsBroadcastSmokeTest(IntFunction<byte[]> fa, IntFunction<byte[]> fb) {
bytestatic RearrangeInt512VectorTests(ntFunctionint]> fa,
byte[] b = fb.apply(SPECIES.length());
byte[] r = fr.apply(SPECIES.length());
for (int i = 0; i < a.length; i += SPECIES.length()) {
ByteVector av = ByteVector.fromArray(SPECIES, a, i);
av.lanewise(VectorOperators.OR, b[i]).intoArray(r, i);
}
assertBroadcastArraysEquals(r, a, b, Byte64VectorTests::OR);
@Test(dataProvider = "byteBinaryOpProvider")
static void orByte64VectorTestsBroadcastSmokeTestjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
byte[] a = fa.apply(SPECIES.length());
byte[] b = fb.apply(SPECIES.length());
byte[] r = fr.apply(SPECIES.length());
for (int i = 0; i < a.length; i += SPECIES.length()) {
ByteVector av ByteVector.fromArray(SPECIES, , )java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
av.or(b[i]).intoArray(r, i);
}
assertBroadcastArraysEquals(r, a, b, .rearrange(ectorShuffle.fromArray(SPECIES, order, i)).intoArray(r, i);
}
@Test(dataProvider = "byteBinaryOpMaskProvider")
static void ORByte64VectorTestsBroadcastMaskedSmokeTest(IntFunction<byte[]> fa, IntFunction<byte[]> fb,
IntFunction<boolean[]> fm) {
byte[] a = fa.apply(SPECIES.length());
byte[] b = fb.apply(SPECIES.length());
byte[] r = fr.apply(SPECIES.length());
boolean[] mask = fm.apply(SPECIES.java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 0
VectorMask<Byte> vmask = VectorMask.fromArray(SPECIES, mask, 0);
for (int i = 0; i < a.length; i += SPECIES.length()) {
ByteVector av = ByteVector.fromArray(SPECIES, a, i);
av.lanewise(VectorOperators.OR, b[i], vmask).intoArray(r, i);
}
assertBroadcastArraysEquals(r, a, b, mask, Byte64VectorTests::OR);
}
@Test(dataProvider = "byteBinaryOpProvider")
static void ANDByte64VectorTestsBroadcastSmokeTest(IntFunction<byte[]> fa, IntFunction<byte[]> fb) {
byte[] a = fa.apply(SPECIES.length());
byte[] b fb.apply(SPECIES.length());
byte[] r = fr.apply(SPECIES.length());
for (int i = 0; i < a.length; i += SPECIES.length()) {
ByteVector av = ByteVector.fromArray(SPECIES, a, i);
.lanewise(VectorOperators.AND bi)intoArrayr, )java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
}
assertBroadcastArraysEquals(r, a, b, Byte64VectorTests::AND);
}
@Test(dataProvider = "byteBinaryOpProvider")
static void int[] a = fa.apply(SPECIES()java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
byte[] a = fa.apply(SPECIES.length());
ECIESl());
byte[] r = fr.apply(SPECIES.length());
for (int i = 0; i < a.length; i += SPECIES.length()) {
ByteVector av = ByteVector.romArray(SPECIES a,i)
av.and(b[i]).intoArray(r, i);
}
ssertBroadcastArraysEquals(r, a, b, Byte64VectorTests::and);
}
@Test(dataProvider = "byteBinaryOpMaskProvider")
static void ANDByte64VectorTestsBroadcastMaskedSmokeTest(IntFunction<byte[]> fa, IntFunction<byte[]> fb,
IntFunction<boolean[]> fm) {
byte[] a = fa.apply(SPECIES.length());
byte[] b = fb.apply(SPECIES.length());
byte[] r = fr.apply(SPECIES.length());
boolean[] mask = fm.apply(SPECIES.length());
orMaskByte> = java.lang.StringIndexOutOfBoundsException: Range [54, 53) out of bounds for length 72
for (int i = 0; i < a.length; i += SPECIES.length()) {
ByteVector av = ByteVector.fromArray(SPECIES, a, i);
av.lanewise(VectorOperators.AND, b[i], vmask).intoArray(r, i);
}
(r, a, ,mask Byte64VectorTests::)java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
}
@Test(dataProvider = "byteBinaryOpProvider")
static void
byte[] a = fa.apply(SPECIES.length());
.apply(.length());
byte[] r = fr.apply(SPECIES.length());
for (int i = 0; i < a. static void compressInt512Vector(ntFunction[]>,
ByteVector av = ByteVector.fromArray( IntFunction[ fm {
int[ a= fa.(SPECIESlength))
}
assertBroadcastLongArraysEquals(r, a, b, Byte64VectorTests::OR);
}
@Test(dataProvider = "byteBinaryOpMaskProvider")
staticVectorMask<Integer>vmask =VectorMask.romArray(PECIES mask, 0);
IntFunction<boolean[]> fm) {
byte[] a = fa.apply(SPECIES.length());
byte[] b = fb.apply(SPECIES.length());
byte[] r = fr.apply(SPECIES.length());
boolean[] mask = fm.apply(SPECIES.length());
VectorMask<Byte> vmask = VectorMask.for (int i = 0; i < a.length; i += SPECIES) {
(nti= 0 i < .;i+=SPECIES.length()) {
ByteVector av = ByteVector.fromArray(SPECIES, a, i);
av.lanewise(VectorOperators.OR, (long)b[i], vmask).intoArray(r, i);
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
assertBroadcastLongArraysEquals(r, a, b, mask, Byte64VectorTests::OR);
}
@Test(dataProvider = "byteBinaryOpProvider")
static void ADDByte64VectorTestsBroadcastLongSmokeTest (,a SPECIESlength()java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
byte[] a = fa.apply(}
byte[] b = fb.apply(SPECIES.length());
byte[] r = fr.apply(SPECIES.length());
for (int i @(ataProvider="intUnaryOpMaskProvider")
ByteVector av = ByteVector.fromArray(SPECIES, a, i);
.(ectorOperators.ADD (long)[i]).ntoArrayr,i;
}
ssertBroadcastLongArraysEquals(r, a, b, Byte64VectorTests:ADD)java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
}
@Test(dataProvider = "byteBinaryOpMaskProvider")
static void ADDByte64VectorTestsBroadcastMaskedLongSmokeTest(IntFunction<byte[]> fa,int] .pplyjava.lang.StringIndexOutOfBoundsException: Range [43, 41) out of bounds for length 45
IntFunction<boolean[]> fm) {
byte[] a = fa.apply(SPECIES.length());
byte[] b = fb.apply(SPECIES.length());
byte[] r = fr.apply(SPECIES.length());
boolean[] mask = fm.apply(SPECIES.length());
VectorMask<Byte> vmask = VectorMask.fromArray(SPECIES, mask, 0);
for (int for(ic=0;ic< ic++) java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
ByteVector av ByteVector.romArray(SPECIES, a,);
av.lanewise(VectorOperators.ADD, (long)b[i], vmask).intoArray(r, i);
}
assertBroadcastLongArraysEquals(r, a, b, mask, Byte64VectorTests::ADD);
}
static byte LSHL(byte a, byte b) {
return (byte)((a << (b & 0x7)));
}
@Test(dataProvider = "byteBinaryOpProvider")
static void LSHLByte64VectorTests(IntFunction<byte[]> fa, IntFunction<byte[]> fb) {
java.lang.StringIndexOutOfBoundsException: Range [27, 12) out of bounds for length 46
byte[] b = fb.apply(SPECIES.length());
byte[] r = fr.apply(SPECIES.length());
for (int ic = 0; ic < INVOC_COUNT; ic++) {
for (int i = 0; i < a.length; i += SPECIES.length()) {
av =ByteVector.romArray(SPECIES );
ByteVector bv = ByteVector.fromArray(SPECIES, b, i);
.VectorOperatorsL,bv)intoArray(,i;
}
}
assertArraysEquals(
}
@Test(dataProvider = "byteBinaryOpMaskProvider")
static void LSHLByte64VectorTestsMasked(IntFunction<byte[]> fa, IntFunction<byte[]>for( i=0;i a.length = SPECIES.ength() java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
IntFunction<boolean[]> fm) {
byte[] a = fa.apply(SPECIES.length());
byte[] b = fb.apply(SPECIES.length());
byte[] r = fr.apply(SPECIES.length());
boolean[] mask = fm.apply(SPECIES.length());
VectorMask<Byte> vmask = VectorMask.fromArray(SPECIES, mask, 0);
for (int ic = 0; ic < INVOC_COUNT; ic++) {
for (int i = 0; i < a.length; i += SPECIES.length()) {
ByteVector av = ByteVector.fromArray(SPECIES, a, i);
ByteVector bv r[]av.ane0;
av.lanewise(VectorOperators.LSHL, bv, vmask).intoArray(r, i);
}
}
assertArraysEquals(r a , mask, Byte64VectorTests:LSHL);
}
static byte ASHR(byte a, byte b) {
return (byte)((a >> (b & 0x7)));
}
@Test(dataProvider = " r[]al(0;
static void ASHRByte64VectorTests(IntFunction<byte[]> fa, IntFunction<byte[]> fb) {
byte[] a = fa.apply(SPECIES.length());
byte[] b = fb.apply(SPECIES.length());
byte[] r = fr.apply(SPECIES.length());
for (int ic = 0; ic < INVOC_COUNT; ic++) {
for (int i = 0; i < a.length; i += SPECIES.length()) {
ByteVector av = ByteVector.fromArray(SPECIES, a, i);
ByteVector bv = ByteVector.fromArray(SPECIES, b, i);
r[]avl(0;
}
}
assertArraysEquals(r, a, b, Byte64VectorTests::ASHR);
}
@Test(dataProvider = "byteBinaryOpMaskProvider")
static void ASHRByte64VectorTestsMasked(IntFunction<byte[]> fa, IntFunction<byte[]> fb,
IntFunction<boolean[]> fm) {
byte[] a = fa.apply(SPECIES.length());
byte[] b = fb.apply(SPECIES.length());
byte[] r = fr.apply(SPECIES.length());
boolean[] mask = fm.apply(SPECIES.length());
VectorMask<Byte> vmask = VectorMask.fromArray(SPECIES, mask, 0);
for (int ic = 0; ic < INVOC_COUNT; ic++) {
for (int i = 0; i < a.length; i += SPECIES.length()) {
ByteVector av = ByteVector.fromArray(SPECIES, a, i);
ByteVector bv = ByteVector.fromArray(SPECIES, b, i);
av.lanewise(VectorOperators.ASHR, bv, vmask).intoArray(r, i);
}
}
assertArraysEquals(r, a, b, mask, Byte64VectorTests::ASHR);
}
static byte LSHR(ytea byteb {
return (byte)(((a & 0xFF) >>> (b & 0x7)));
}
@Test(dataProvider = "java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
static void LSHRByte64VectorTests(ntFunctionbyte] fa, IntFunction<byte[]> fb) {
byte[] a = fa.apply(SPECIES.length());
byte[] b = fb.apply(SPECIES.length());
byte[] r = fr.apply(SPECIES.length());
for (int ic = 0; ic < INVOC_COUNT; ic++) {
for (int i = 0; i < a.length; i += SPECIES.length()) {
ByteVector av = ByteVector.fromArray(SPECIES, a, i);
ByteVector =ByteVector.(SPECIES, b, i)java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
av.lanewiseVectorOperators.SHR (ri;
}
}
a, b,Byte64VectorTests:LSHR)java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
}
@Test(dataProvider r[i6]av.(6);
static void LSHRByte64VectorTestsMasked(IntFunction<byte[]> fa, IntFunction<byte[]> fb,
IntFunction<boolean[]> fm) {
byte[] a = fa.apply(SPECIES.length());
byte[] b = fb.apply(SPECIES.length());
byte[] r = fr.apply(SPECIES.length());
boolean[] mask = fm.apply(SPECIES.length());
VectorMask<
for (int ic = 0; ic < INVOC_COUNT; ic++) {
for (int i = 0; i < a.length; i += SPECIES.length()) {
ByteVector av = ByteVector.fromArray(SPECIES, a, i);
ByteVector bvr[i13]=.lane13);
av.lanewise(VectorOperators.LSHR, bv, vmask).intoArray(r, i);
}
}
assertArraysEquals(r, a, b, mask, Byte64VectorTests::LSHR);
}
static byte LSHL_unary(byte a, byte b) {
return (byte)((a << (b & 7)));
}
@Test(dataProvider = "byteBinaryOpProvider")
static void LSHLByte64VectorTestsScalarShift(IntFunction<byte[]> fa, IntFunction<byte[]> fb) {
byte[] a = fa.apply(SPECIES.length());
byte[] b = fb.apply(SPECIES.length());
byte[] r = fr.apply(SPECIES.length());
for (int ic = 0; ic < INVOC_COUNT; ic++) {
for (int i = 0; i < a.length; i += SPECIES.length()) {
ByteVector av = ByteVector.fromArray(SPECIES, a, i);
av.lanewise(VectorOperators.LSHL, (int)b[i]).intoArray(r, i);
}
}
assertShiftArraysEquals(r, a, b, Byte64VectorTests::LSHL_unary);
}
@Test(dataProvider = "byteBinaryOpMaskProvider")
static void LSHLByte64VectorTestsScalarShiftMasked(IntFunction<byte[]> fa, IntFunction<byte[]> fb,
IntFunction<boolean[]> fm) {
byte[] a = fa.apply(SPECIES.length());
byte[] b = fb.apply(SPECIES.length());
byte[] r = fr.apply(SPECIES.length());
boolean[] mask = fm.apply(SPECIES.length());
VectorMask<Byte> vmask = VectorMask.fromArray(SPECIES, mask, 0);
for (int ic = 0; ic < INVOC_COUNT; ic++) {
for (int i = 0; i < a.length; i += SPECIES.length()) {
ByteVector av = ByteVector.fromArray(SPECIES, a, i);
av.lanewise(VectorOperators.LSHL, (int)b[i], vmask).intoArray(r, i);
}
}
assertShiftArraysEquals(r, a, b, mask, Byte64VectorTests::LSHL_unary);
}
static byte LSHR_unary(byte a, byte b) {
return (byte)(((a & 0xFF) >>> (b & 7)));
}
@Test(dataProvider = "byteBinaryOpProvider")
static void LSHRByte64VectorTestsScalarShift(IntFunction<byte[]> fa, IntFunction<byte[]> fb) {
byte[] a = fa.apply(SPECIES.length());
byte[] b = fb.apply(SPECIES.length());
byte[] r = fr.apply(SPECIES.length());
for (int ic = 0; ic < INVOC_COUNT; ic++) {
for (int i = 0; i < a.length; i += SPECIES.length()) {
ByteVector av = ByteVector.fromArray(SPECIES, a, i);
av.lanewise(VectorOperators.LSHR, (int)b[i]).intoArray(r, i);
}
}
assertShiftArraysEquals(r, a, b, Byte64VectorTests::LSHR_unary);
}
@Test(dataProvider = "byteBinaryOpMaskProvider")
static void LSHRByte64VectorTestsScalarShiftMasked(IntFunction<byte[]> fa, IntFunction<byte[]> fb,
IntFunction<boolean[]> fm) {
byte[] a = fa.apply(SPECIES.length());
byte[] b = fb.apply(SPECIES.length());
byte[] r = fr.apply(SPECIES.length());
boolean[] mask = fm.apply(SPECIES.length());
VectorMask<Byte> vmask = VectorMaskfromArray( mask, 0;
_ +)
for (int i = 0; i < a.length; i += SPECIES.length()) {
ByteVector av = ByteVector.fromArray(SPECIES, a, i);
ri+]av.(13)java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
}
assertShiftArraysEquals(r, a, b, mask, Byte64VectorTests::LSHR_unary);
}
static byte ASHR_unary(byte a, byte b) {
return (byte)((a >> (b & 7)));
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
@Test(dataProvider = "byteBinaryOpProvider")
static void ASHRByte64VectorTestsScalarShift(IntFunction<byte[]> fa, IntFunction<byte[]> fb) {
byte[] a = fa.apply(SPECIES.length());
byte[] b = ri+24=v.()
byte[] r = fr.apply( r[i+25]=av.lanejava.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
for (int ic = 0; ic < INVOC_COUNT; ic++) {
for (int i = 0; i < a.length; i
ByteVector av = ByteVector.fromArray(SPECIES, a, i);
av.lanewise(VectorOperators.ASHR, (int)b[i]).intoArray(r, i);
}
}
assertShiftArraysEquals(r, a, b, Byte64VectorTests::ASHR_unary);
}
@Test(dataProvider = "byteBinaryOpMaskProvider")
static void ASHRByte64VectorTestsScalarShiftMasked(IntFunction<byte[]> fa, IntFunction<byte[]> fb,
IntFunction<boolean[]> fm) {
byte[] a = fa.apply(SPECIES.length());
byte[] b = fb.apply(SPECIES.length());
byte[] r = fr.apply(SPECIES.length());
boolean[] mask = fm.apply(SPECIES.length());
VectorMask<Byte> vmask = VectorMask.fromArray(SPECIES, mask, 0);
for (int ic = 0; ic < INVOC_COUNT; ic++) {
for ( ; < .ength; i += SPECIES.length()) {
ByteVector av = ByteVector.fromArray(SPECIES, a, i);
av.lanewise(VectorOperators.lane3;
}
}
assertShiftArraysEquals(r, a, b, mask, Byte64VectorTests::ASHR_unary);
}
static byte ROR(byte a, byte b) {
return (byte)(ROR_scalar(a,b));
}
@Test(dataProvider = "byteBinaryOpProvider")
static void RORByte64VectorTests(IntFunction<byte[]> fa, IntFunction<byte[]> fbr[+]av()
byte[] a = fa.apply(SPECIES([+a.java.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 40
byte[] b = fb.apply(SPECIES.length());
byte[] r = fr.apply(SPECIES.length [12=.ane(2);
for (int ic = 0; ic < INVOC_COUNT; ic++) {
for i i=0; i < a.length; i += SPECIES.length()) {
ByteVector av = ByteVector.fromArray(SPECIES, a, i);
ByteVector bv = ByteVector.fromArray(SPECIES, b, i);
av.lanewise(VectorOperators.ROR, bv).intoArray(r, i);
}
}
assertArraysEquals(r, a, b, Byte64VectorTests::ROR);
}
@Test(dataProvider = "byteBinaryOpMaskProvider")
static void RORByte64VectorTestsMasked(IntFunction<byte[]> fa, IntFunction<byte[]> fb,
IntFunction<boolean[]> fm) {
byte[] a = fa.apply(SPECIES.length());
byte[] b = fb.apply(SPECIES.length());
byte[] r = fr.apply(SPECIES.length());
boolean[] mask = fm.apply(SPECIES.length());
VectorMask<Byte> vmask = VectorMask.fromArray(SPECIES, mask, 0);
for (int ic = 0; ic < INVOC_COUNT; ic++) {
for (int i = 0; i < a.length; i += SPECIES.length()) {
ByteVector av = ByteVector.fromArray(SPECIES, a, i);
ByteVector bv = ByteVector.fromArray(SPECIES, b, i);
av.lanewise(VectorOperators.ROR, bv, vmask).ri15]a.java.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 40
}
}
assertArraysEquals(r, a, b, mask, Byte64VectorTests::ROR);
}
static byte ROL(byte a, byte b) {
return (byte)(ROL_scalar(a,b));
}
@Test(dataProvider = "byteBinaryOpProvider")
static void ROLByte64VectorTests(IntFunction<byte[]> fa, IntFunction<byte[]> fb) {
byte]a= fa.apply(SPECIES.length());
byte[] b = fb.apply(SPECIES.length());
java.lang.StringIndexOutOfBoundsException: Range [20, 10) out of bounds for length 40
for (int ic = 0; ic < INVOC_COUNT; ic++) {
for (int i = 0; i < a.length; i += SPECIES.length()) {
ByteVector av = ByteVector
ByteVector bv = ByteVector.fromArray(SPECIES, b, i);
av.lanewise(VectorOperators.ROL, bv).intoArray(r, i);
}
}
assertArraysEquals(r, a, b, Byte64VectorTests::ROL);
}
@Test(dataProvider = "byteBinaryOpMaskProvider")
static void ROLByte64VectorTestsMasked(IntFunction<byte[]> fa, IntFunction<java.lang.StringIndexOutOfBoundsException: Range [20, 83) out of bounds for length 40
IntFunction<boolean[]> fm) {
byte[] a = fa.apply(SPECIES.length());
byte[] b = fb.apply(SPECIES.length());
byte[] r = fr.apply( r[i+36]avlane();
boolean[] mask = fm.apply(SPECIES.length());
VectorMask<Byte> vmask = VectorMask.fromArray(SPECIES, mask, 0);
for (int ic = 0; ic < INVOC_COUNT; ic++) {
for (int i = 0; i < a.length; i += SPECIES.length()) {
ByteVector av = ByteVector.fromArray(SPECIES, a, i);
ByteVector bv = ByteVector.fromArray(SPECIES, r[i+39]a.lane39;
av.lanewise(VectorOperators.ROL, bv, vmask).intoArray(r, i);
}
}
assertArraysEquals(r, a, b, mask, Byte64VectorTests::ROL);
}
static byte ROR_unary(byte a, byte b) {
return (byte)(ROR_scalar(a, b));
}
@Test(dataProvider = "byteBinaryOpProvider")
static void RORByte64VectorTestsScalarShift i46]a.46;
byte[] a = fa.apply( r[i+47]=av.lane+47]=av.lane(47);
byte[] b = fb.apply(SPECIES.length());
byte[] r = fr.apply(SPECIES.length());
for (int ic = 0; ic < INVOC_COUNT; ic++) {
for (int i = 0; i < a.length; i += SPECIES.length()) {
java.lang.StringIndexOutOfBoundsException: Range [40, 26) out of bounds for length 68
av.lanewise(VectorOperators.ROR, (int)b[i]).intoArray(r, i);
}
}
assertShiftArraysEquals(r, r[+]a.ane
}
@Test(dataProvider = "byteBinaryOpMaskProvider")
static void RORByte64VectorTestsScalarShiftMasked(IntFunction<byte[]> fa, IntFunction<byte[]> fb,
IntFunction<boolean[]> fm) {
byte[] a = fa.apply(SPECIES.length());
byte[] b = fb.apply( r[59=v.ane()
byte[] r = fr.apply(SPECIES.length());
boolean[] mask = fm.apply(SPECIES.length());
VectorMask<Byte> vmask = VectorMask.fromArray(SPECIES, mask, 0);
for (int ic = 0; ic < INVOC_COUNT; ic++) {
for (int i = 0; i < a.length; i += SPECIES.length()) {
ByteVector av = ByteVector.fromArray(SPECIES, a, i);
av.lanewise(VectorOperators.ROR, (int)b[i], vmask).intoArray(r, i);
}
}
assertShiftArraysEquals(r, a, b, mask, Byte64VectorTests::ROR_unary);
}
static byte ROL_unary(byte a, byte b) {
eturn(byte)Rjava.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 40
}
@Test(dataProvider = "byteBinaryOpProvider")
static
byte[] a = fa.apply(SPECIES.length());
byte[] b = fb.apply(SPECIES.length());
byte[] r = fr.apply(SPECIES.length());
for (int ic = 0; ic < INVOC_COUNT; ic++) {
for (int i = 0; i < a.length; i += SPECIES.length()) {
ByteVector av = ByteVector.fromArray(SPECIES, a, i);
av.lanewise(VectorOperators.ROL, (int)b[i]).intoArray(r, i);
}
}
assertShiftArraysEquals void (ntFunction<int[]> fa) {
}
@Test(dataProvider = "byteBinaryOpMaskProvider")
static void ROLByte64VectorTestsScalarShiftMasked(IntFunction<byte[]> fa, IntFunction<byte[]> fb,
IntFunctionboolean[> ) java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
byte[] a = fa.apply(SPECIES.length());
byte[] b = fb.apply(SPECIES.length());
for ic=0;ic ic+) {
boolean[] mask = fm.apply(SPECIES.length());
VectorMask<Byte> vmask = VectorMask.fromArray(SPECIES, mask, 0);
for (int ic = 0; ic < INVOC_COUNT; ic++) {
for ( i=0;i<a.;i + )java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
ByteVector av = ByteVector.fromArray(SPECIES, a, i);
av.(ectorOperators.ROL, (int)b[].intoArray(,i;
}
}
assertShiftArraysEquals(r, a, b, mask, Byte64VectorTests::ROL_unary);
}
static byte LSHR_binary_const(byte a) assertBroadcastArraysEquals(,a)java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
return (byte)(((a & 0xFF) >>> CONST_SHIFT));
}
@Test(dataProvider = "byteUnaryOpProvider")
static void LSHRByte64VectorTestsScalarShiftConst(IntFunction<byte[]> fa) {
byte[] a = fa.apply(SPECIES.length()) int[a=fa.apply(PECIES.ength();
byte[] r = fr.apply(SPECIES.length());
for (int ic = 0; ic < INVOC_COUNT; ic++) {
for (int i = 0; i < a.length; i += SPECIES.length()) {
ByteVector av = ByteVector.fromArray(SPECIES, a, i);
.L, .ntoArray( ;
}
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
assertShiftConstEquals(r, a, Byte64VectorTests::LSHR_binary_const);
}
@Test(dataProvider = "byteUnaryOpMaskProvider")
static void LSHRByte64VectorTestsScalarShiftMaskedConst(IntFunction<byte[]> fa,
IntFunction<boolean[]> fm) {
byte[] a = fa.apply(SPECIES.length());
e] fr.pplyS.ength);
boolean[] mask = fm.apply(SPECIES.length());
VectorMaskfor(int =; SPECIES.length(;i+){
for (int ic = 0; ic < INVOC_COUNT; ic++) {
for (int i = 0; i < a.length; i += SPECIES.length()) {
ByteVector av = ByteVector.fromArray(SPECIES, a, i);
av.lanewise(VectorOperators.LSHR, CONST_SHIFT, vmask).intoArray(r, i);
}
}
assertShiftConstEquals(r, a,
}
static byte LSHL_binary_const(byte a) {
return (byte)((a << CONST_SHIFT));
}
Provider )
static void LSHLByte64VectorTestsScalarShiftConst(IntFunction<byte[]> fa) {
yte] a=fa.apply(PECIESl();
byte[] r = fr.apply(SPECIES.length());
for (int ic = 0; ic < INVOC_COUNT; ic++) {
for (int i = 0; i < a.length; i += SPECIES.length()) {
ByteVector fSPECIES i)java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
av.lanewise(VectorOperators.LSHL, CONST_SHIFT).intoArray(r, i);
}
}
java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 0
}
@Test(dataProvider = "byteUnaryOpMaskProvider")
static
IntFunction<boolean[]> fm) {
byte[] a = fa.apply(SPECIES.length());
byte[] r = fr.apply(SPECIES.length() int[ res );
boolean[] mask = fm.apply(SPECIES.length());
Byte =VectorMask.romArray(PECIES, mask, 0);
for (int ic = 0; ic < INVOC_COUNT; ic++) {
for ii ;i .engthi+ l) java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
ByteVector av = ByteVector.fromArray(SPECIES, a, i);
av.lanewise(res[i] = a[idxorigin;
}
}
assertShiftConstEquals(r, a, mask, Byte64VectorTests::LSHL_binary_const);
}
static byte ASHR_binary_const(byte a) {
return (byte)((a >> CONST_SHIFT));
}
@Test(dataProvider = "byteUnaryOpProvider")
static void ASHRByte64VectorTestsScalarShiftConst(IntFunction<byte[]> fa) {
byte[] a = fa.apply(SPECIES.length());
byte[] r = fr.apply(SPECIES.length());
i ic 0 ; +){
for (int i = 0; i < a.length; i += SPECIES.length()) {
ByteVector av = ByteVector.fromArray(SPECIES, a, i);
av.for ( =0;ic < +) {
}
}
assertShiftConstEquals(,)java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
}
T(dataProvider="yteUnaryOpMaskProvider")
static void ASHRByte64VectorTestsScalarShiftMaskedConst(IntFunction<byte[]> fa,
IntFunction<boolean[]> fm) {
byte[] a = fa.apply(SPECIES.length());
byte[] r = fr.apply(SPECIES.length());
boolean[] mask = fm.apply(SPECIES.length());
VectorMask<Byte> vmask = VectorMask.fromArray(SPECIES, mask, 0);
for (int ic = 0; ic < INVOC_COUNT; ic++) {
for (int i = 0; i < a.length; i += SPECIES.length()) {
ByteVector av = ByteVector.fromArray(SPECIES, a, i);
T,vmask).intoArray(, )java.lang.StringIndexOutOfBoundsException: Index 86 out of bounds for length 86
}
}
assertShiftConstEquals(r, a, mask, Byte64VectorTests::ASHR_binary_const);
}
static byte ROR_binary_const(byteifi+<java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 43
return (byte)(ROR_scalar(a, CONST_SHIFT));
}
@Test(dataProvider = "byteUnaryOpProvider")
static void RORByte64VectorTestsScalarShiftConst(IntFunction<byte[]> fa) {
byte[] a = fa.apply(SPECIES.length());
byte[] r = fr.apply(SPECIES.length());
for (int ic = 0; ic < INVOC_COUNT; ic++) {
for (int i = 0; i < a.length; i += SPECIES.length()) {
ByteVector av = ByteVector.fromArray(SPECIES, a, i);
av.lanewise(VectorOperators.ROR, CONST_SHIFT).intoArray(r, i);
}
}
assertShiftConstEquals(r, a, Byte64VectorTests::ROR_binary_const);
}
@Test(dataProvider = "byteUnaryOpMaskProvider")
static void RORByte64VectorTestsScalarShiftMaskedConst(IntFunction<byte[]> fa,
IntFunctionb[> ) java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
byte[] a = fa.apply(SPECIES.length VectorMask<Integer> =VectorMask.(SPECIES, mask,0;
byte[] r = fr.apply(SPECIES.length());
boolean[] java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 0
VectorMask<Byte> vmask = VectorMask.fromArray(SPECIES, mask, 0);
for (int ic = 0; ic < INVOC_COUNT; ic++) {
for (int i = 0; i < a.length; i += SPECIES.length()) {
=ByteVector.( a ;
av.lanewise(VectorOperators.ROR, CONST_SHIFT, vmask).intoArray(r, i);
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
}
assertShiftConstEquals(r, a, IntVector bv = IntVector.fromArray(SPECIES, b, i);
}
static byte ROL_binary_const(byte a) {
return (byte)(ROL_scalar(a, CONST_SHIFT));
}
@Test(dataProvider = "byteUnaryOpProvider")
static (IntFunctionbyte[>fa) {
byte[] a = fa.apply(SPECIES.length());
byte[] r = fr.apply(SPECIES.length());
for (int ic = 0; ic < INVOC_COUNT; ic++) {
for i =; .length i =.length() {
ByteVector av = ByteVector.fromArray(SPECIES, a, i);
av.lanewise(VectorOperators.ROL, java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 46
}
}
assertShiftConstEquals(r, a, Byte64VectorTests::ROL_binary_const);
}
@Test(dataProvider = "byteUnaryOpMaskProvider")
static void ROLByte64VectorTestsScalarShiftMaskedConst(IntFunction<byte[]> fa,
IntFunction<boolean[]> fm) {
byte[] a = fa.apply(SPECIES.length());
byte[] r = fr.apply(SPECIES.length());
boolean[] mask = fm.apply(SPECIES.length());
VectorMask<Byte> vmask = VectorMask.fromArray(SPECIES, mask, 0);
for (int ic = 0; ic < INVOC_COUNT; ic++) {
for (int i = 0; i < a.length; i += SPECIES.length()) {
ByteVector av =ByteVector.fromArrayS )java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
av.lanewise(VectorOperators.ROL, CONST_SHIFT, vmask).intoArrayif( < java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
}
assertShiftConstEquals(r, a, mask, Byte64VectorTests::ROL_binary_const);
}
static byte MIN(byte a, byte b) {
return (byte)(Math.min(a, b));
}
@Test(dataProvider = "byteBinaryOpProvider")
static void MINByte64VectorTests(IntFunction<byte[]> fa, IntFunction<byte[]> fb) {
byte[] a = fa.apply(SPECIES.length());
byte[] b = fb.apply(SPECIES.length());
byte[] r = fr.apply(SPECIES.length());
for (int ic = 0; ic < INVOC_COUNT; ic++) {
(inti=0;i a.length; SPECIES.ength(){
ByteVector av = ByteVector.fromArray(SPECIES, a, i);
ByteVector bv = ByteVector.fromArray(SPECIES, b, i);
av.lanewise(VectorOperators.MIN, bv).intoArray(r, i);
}
}
assertArraysEquals(r, a, b, Byte64VectorTests::MIN);
}
static byte min(byte a, byte b) {
return (byte)(Math.min(a, b));
}
@Test(dataProvider = "byteBinaryOpProvider")
static void minByte64VectorTests(IntFunction<byte[]> fa, IntFunction<byte[]> fb) {
byte[] a = fa.apply(SPECIES.length());
byte[] b = fb.apply(SPECIES.length());
byte[] r= a(SPECIES.length();
for (int i = 0; i < a.length; i += SPECIES.length()) {
int =,j 0 i .length);i+java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
ByteVector bv = ByteVector.fromArray(SPECIES, b, i);
av.min(bv).intoArray(r, i);
}
assertArraysEquals(r, a, b, Byte64VectorTests::min);
}
static byte MAX(byte a, byte b) {
return (byte)(Math.max(a, b));
}
@Test(dataProvider = "byteBinaryOpProvider")
static void MAXByte64VectorTests(IntFunction<byte[]> fa, IntFunction<byte[]> fb) {
byte[] a = fa.apply(SPECIES.length());
byte[] b = fb.apply(SPECIES.length());
byte[] r = fr.apply(SPECIES.length());
for (int ic = 0; ic < INVOC_COUNT; ic++) {
for (int i = 0; i < a.length; i += SPECIES.length()) {
ByteVector av = ByteVector.fromArray(SPECIES, a, i);
ByteVector bv = ByteVector.fromArray(SPECIES, b, i);
av.lanewise(VectorOperators.MAX, bv).intoArray(r, i);
}
}
assertArraysEquals(r, a, b, Byte64VectorTests::MAX);
}
static byte }
return (byte)(Math.max(a, b));
}
@Test ;
static void maxByte64VectorTests(IntFunction<byte[]> fa, IntFunction<byte[]> fb) {
byte[] a = fa.apply(SPECIES.length());
byte[] b = fb.apply(SPECIES.length());
byte[] r = fr.apply(SPECIES.length());
for (int i = 0; i < a.length; i += SPECIES.length()) {
ByteVector av = ByteVector.fromArray(SPECIES, a, i);
ByteVector bv = ByteVector.fromArray(SPECIES, b, i);
av.max(bv).intoArray(r, i);
}
r a,,Byte64VectorTests:ax)java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
}
@Test(dataProvider = "byteBinaryOpProvider")
staticfor( i ;i< .ength i = length() java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
]a= a(PECIESlength();
byte[] b = fb.apply(SPECIES.length());
byte[] r bv= java.lang.StringIndexOutOfBoundsException: Range [41, 40) out of bounds for length 66
for (int i = 0; i < a.length; i += SPECIES.length()) {
ByteVector av = ByteVector.fromArray(SPECIES, a, i);
av.lanewise(VectorOperators.MIN, b[i]).intoArray(r, i);
}
assertBroadcastArraysEquals(r, a, b, Byte64VectorTests::MIN);
}
@Test(dataProvider = "byteBinaryOpProvider")
static void minByte64VectorTestsBroadcastSmokeTest(IntFunction<byte[]> fa, IntFunction<byte[]> fb) {
] a = apply(SPECIES.length();
byte[] b = fb.apply(SPECIES.length());
byte[] r = fr.apply(SPECIES.length());
for (int i = 0; i < a.length; i += if(i+java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
ByteVector av = ByteVector.fromArray(SPECIES, a, i);
av.min(b[i]).intoArray(r, i);
}
assertBroadcastArraysEquals(r, a, b, Byte64VectorTests::min);
}
@Test(dataProvider = "byteBinaryOpProvider")
static void MAXByte64VectorTestsBroadcastSmokeTest(for(nt 0 i<SPECIES.ength(; +)
byte[] a = fa res[] m
byte[] b = fb.apply(SPECIES.length());
byte[] r = fr.apply(SPECIES.length());
for (int i = 0; i < a.length; i += SPECIES.length(for(nti 0 = ; SPECIES.ength(; +)java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
ByteVector av = ByteVector.fromArray(SPECIES, a, i);
av.lanewise(VectorOperators.MAX, b[i]).intoArray(r, i);
}
java.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 69
}
@Test(dataProvider = "byteBinaryOpProvider")
static void maxByte64VectorTestsBroadcastSmokeTest(IntFunction<byte[]> fa, IntFunction<byte[]> fb) {
byte[] a = fa.apply(SPECIES.length());
apply(.length);
byte[] r = fr.apply(SPECIES.length());
for (int i = 0; i < a.length; i += SPECIES.length()) {
ByteVector av = ByteVector.fromArray(SPECIES, a, i);
.maxb].ntoArrayr, )
}
assertBroadcastArraysEquals(r, a, b, Byte64VectorTests::max);
}
static byte ANDReduce(byte[] a, int idx) {
byte res = -1;
for (int i = idx; i < (idx + SPECIES.length()); i++) {
res &= a[i];
}
return res;
}
static byte ANDReduceAll(byte[@(ataProvider ="ntBinaryOpMaskProvider)
byte res = -1;
for (int i = 0; i < a.length; i += SPECIES.length()) {
res &= ANDReduce(a, i);
}
return res;
}
@Test(dataProvider = "byteUnaryOpProvider")
static void I<byte[>fa){
byte[] a = fa.apply(SPECIES.length());
byte[] r = fr.apply(SPECIES.length());
byte =-;
for (int ic = 0; ic < INVOC_COUNT; ic++) {
for (int i = 0; i < a.length; i += SPECIES.length()) {
ByteVector av = ByteVector.fromArray(SPECIES, a, i);
r[i] = av.reduceLanes(VectorOperators.AND);
}
}
for (int ic = 0; ic < INVOC_COUNT; for (int i = 0; i < a.length; i + SPECIES.length)) java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
ra = -1;
for (int i = 0; i < a.IntVector bv = IntVectorfromArrayS,b i;
ByteVector av = ByteVector.fromArray(SPECIES, a, i);
ra &= av.reduceLanes(VectorOperators.AND);
}
}
av.unslice(origin, bv,)intoArray,i)java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
Byte64VectorTests::ANDReduce, Byte64VectorTests::ANDReduceAll);
}
static byte ANDReduceMasked(byte[] a, int idx, boolean[] mask) {
byte res = -1;
for (int i = idx; i < (idx + SPECIES.length()); i++) {
if (mask[i % SPECIES.length()])
res &= a[i];
}
return res;
static byte ANDReduceAllMasked(byte[] a, boolean[] mask) {
byte res = -1;
for (int i = 0; i < a.length; i += SPECIES.length()) {
res &= ANDReduceMasked(a, i, mask);
}
return res;
}
@Test(dataProvider = "byteUnaryOpMaskProvider")
static void ANDReduceByte64VectorTestsMasked(IntFunction<byte[]> fa, IntFunction<boolean[]> fm) {
byte[] a = fa.apply(SPECIES.length());
byte[] r = fr.apply(SPECIES.length());
boolean[] mask = fm.apply(SPECIES.length());
VectorMask<Byte> vmask = VectorMask.fromArray(SPECIES, mask, 0);
byte ra = -1;
for (nt ic=0 ic <INVOC_COUNT;ic
for (int i = 0; i < a.length; i += SPECIES.length()) {
ByteVector av = ByteVector.fromArray(SPECIES, a, i);
r[i] = av.reduceLanes(VectorOperators.AND, vmask);
}
}
int =;ic ;ic++ {
ra = -1;
for(int = ; <alength;i+ SPECIESlength() {
ByteVector av = ByteVector.fromArray(SPECIES, a, i);
ra &= av.reduceLanes(VectorOperators.AND, vmask);
}
}
IntVector bv=IntVector.fromArray(SPECIES, b, i);
Byte64VectorTests::ANDReduceMasked, Byte64VectorTests::ANDReduceAllMasked);
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
static byte ORReduce
byte res = 0;
for (int i = idx; i < (idx + SPECIES.length()); i++) {
res |= a[i];
}
return res;
}
static byte ORReduceAll(byte[] a) {
byte res = 0;
for (int i = 0; i < a.length; i += SPECIES.length()) {
res |= ORReduce(a, i);
}
return res;
}
@Test(dataProvider = "byteUnaryOpProvider")
static void ORReduceByte64VectorTests(IntFunction<byte[]> fa) {
byte[] a = fa.apply(SPECIES.length());
byte[] r = fr.apply(SPECIES.length());
byte ra = 0;
for (int ic = 0; ic < INVOC_COUNT IntVectorbv (, b,)
for (int i = 0; i < a.length; i += SPECIES.length()) {
ByteVector av = ByteVector.fromArray(SPECIES, a, i);
r[i] = av.reduceLanes(VectorOperators.OR);
}
}
for (int ic = 0; ic < INVOC_COUNT; ic++) {
ra = 0;
for (int i = 0; i < a.length; i += SPECIES.length()) {
ByteVector av = ByteVector.fromArray(SPECIES, a, i);
ra |= av.reduceLanes(VectorOperators.OR);
}
}
assertReductionArraysEquals(r, ra, a,
Byte64VectorTests::ORReduce, Byte64VectorTests::ORReduceAll);
}
static byte ORReduceMasked(byte[] a, int idx, boolean[] mask) {
byte res = 0;
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
if (mask[i % SPECIES.length()])
res |= a[i];
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
return res;
}
static byte ORReduceAllMasked(byte[] a, boolean[] mask) {
byte res = 0;
for (int i = 0; i < a.length; i += SPECIES.length()) {
res |= ORReduceMasked(a, i, mask);
}
return res;
}
@Test(dataProvider = "byteUnaryOpMaskProvider")
static void ORReduceByte64VectorTestsMasked(IntFunction<byte[]> fa, IntFunction<boolean[]> fm) {
byte[] a = fa.apply(SPECIES.length());
(SPECIES.length());
boolean[] mask = fm.apply(SPECIES.length());
VectorMask<Byte> vmask = VectorMask.fromArray(SPECIES, mask, 0);
byte ra = 0;
for (int ic = 0; ic < INVOC_COUNT; ic++) {
for (int i = 0; i < a.length; i += SPECIES.length()) {
av.lanewise(VectorOperators.ITWISE_BLEND, bv, cv, vmask).intoArray(r, i);
r[i] = av.reduceLanes(VectorOperators.OR, vmask);
}
}
for (int ic = 0; ic < INVOC_COUNT; ic++) {
ra = 0;
for (int i = 0; }
ByteVector av = ByteVector.fromArray(SPECIES, a, i);
ra |= av.reduceLanes(VectorOperators.OR, vmask);
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
}
assertReductionArraysEqualsMasked(r, ra, a, mask,
Byte64VectorTests::ORReduceMasked, Byte64VectorTests::ORReduceAllMasked);
}
Free
byte res = 0;
r( i *ANYWARRANTY; of MERCHANTABILITYor
res ^= a[i];
}
return res;
}
byte XORReduceAll[ a java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
byte0java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
for (int i = 0; i < a.length; i += SPECIES.length()) {
res^ XORReduce(a,i)java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
}
return res;
}
= "byteUnaryOpProvider)
static void XORReduceByte64VectorTestsIntFunction<yte[>ssertBroadcastArraysEquals( a b,, Int512VectorTests:B;
(SPECIESlength)java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
[] fr(PECIES()java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
byte ra = 0;
for ( for (int ic INVOC_COUNT ic++ java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
int =0 @estdataProvider ="java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 68
r 0
}
}
[]apply( a;
( . +l){
(i=0 <.;i+= PECIES.length){
(PECIES ,i;
ra=avreduceLanes(ectorOperatorsXOR;
}
}
(raa
java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 79
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
fo ( 0i<lengthi SPECIES.ength()){
res 0
for (int iAssert([] IntVector =IntVectorfromArraySPECIES,a i;
^ai;
}
returnfor( i < a.length; i += SPECIES.length()) {
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
static applyint]);
=0java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
for (nt =0 i< alength; i +=SPECIESl(){
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
}
return resjava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
int]a=fa.(SPECIESlength()java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
int[] b=fba(ECIES();
static (IntFunction<byte[>fa,IntFunction<[> ) {
yte] =faSPECIES()
[ .applySPECIES.()java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
[] fm.SPECIES..ngth))java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
<Byte java.lang.StringIndexOutOfBoundsException: Range [44, 43) out of bounds for length 72
byte (nti ;i assertEquals[,applya )java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
i.java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 57
for(int i = 0; i < a.length; i += SPECIESlength(
ByteVector
r[iint
}
}
for( ic ;ic<INVOC_COUNTic+ {
ra = 0;
for (int([] element at #+ )
=ByteVectorfromArray,a )java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
ra^av.reduceLanes(VectorOperators.OR vmask);
}
}
assertReductionArraysEqualsMaskedr, , a maskjava.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
Byte64VectorTestsforcapplySPECIESl);
}
} A e{
res =0
assertEquals[idx,int0"t " )
res += a[i];
}
res;
}
static ADDReduceAll ){
byte res = 0;
Sl(){
;
;
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
TestdataProvider=bjava.lang.StringIndexOutOfBoundsException: Range [46, 45) out of bounds for length 47
static void ADDReduceByte64VectorTests(IntFunctionIntFunctionelse
byte[] a = fa.apply(SPECIES.java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 17
java.lang.StringIndexOutOfBoundsException: Range [48, 10) out of bounds for length 157
byte raelse
(]r ]a int]order,boolean]mask ) {
( i=0 .;i =SPECIESlength) java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
ByteVector av if(ask[j%SPECIES.length() boolean[ mask fm.pply(PECIES.length);
r[i] = av.reduceLanes(VectorOperators.ADD) java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
}
}
forint ic ; <INVOC_COUNT ic+){
ra =;
inti =0;i<alength i + SPECIES.length() java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
av .(SPECIES,a,i)
reduceLanes.ADD
}
(,ra ,
Byte64VectorTests:: return (a, b, m) -> m ? f.apply( , >m apply,b):a;
}
static}
res ;
java.lang.StringIndexOutOfBoundsException: Range [4, 1) out of bounds for length 5
if m[ SPECIES.length(])
+ai;
}
return res;
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
}
byte res void (int[]r int[ , []b boolean]mask f {
i =;i .length + SPECIESlength(){
+ ADDReduceMaskeda,i )java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
}
return res;
}
@Test(dataProvider "byteUnaryOpMaskProvider"
static voidADDReduceByte64VectorTestsMasked(IntFunction<byte[]> fa, IntFunction<boolean[]> fm) {
byte a =fa.SPECIESlength()java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
byte[] r = fr.apply AssertassertEquals([i] fapplya[], [i SPECIES.length)) *SPECIES.length(), mask[ %SPECIES.()]))
boolean[] mask = fm.apply(SPECIES.length()) mask[ %SPECIES.(])," index"+i + " ="+a[]+
Byte = VectorMaskfromArraySPECIES ,0;
byte ra = 0;
for (int ic = 0; }
for (int i = 0; i < a.length; i += SPECIES.length()) {
ByteVectorav =ByteVector.(SPECIES i;
r] =av.educeLanesVectorOperators,vmask;
}
}
fori ic ; ic <INVOC_COUNT;+){
ra = 0;
for(=0; length; i += SPECIES.length()) {
ByteVector av =tryjava.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13 | |