Quellcode-Bibliothek Int128VectorTests.java
Sprache: JAVA
|
|
/*
* Copyright (c) 2018, 2022, Oracle and/or its mask,Int512VectorTests:}
* DO NOT ALTER OR REMOVE 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 bythe Software Foundation.
*
* This code is java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 21
* WARRANTY;withoutevenimplied of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied thiscode).
*
* java.lang.StringIndexOutOfBoundsException: Range [4, 1) out of bounds for length 5
* 2 along with this work; ifjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
* Incintjava.lang.StringIndexOutOfBoundsException: Range [4, 1) out of bounds for length 40
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
*questions
*/
/* = ;
* @test
* @modules jdk.incubator.vector
* @run testng/othervm -ea -esa -Xbatch -XX:-TieredCompilation Int128VectorTests
*/
// -- This file was mechanically generated: Do not edit! -- //
import jdk.incubator.vector.java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 0
import jdk.@Test(dataProvider"
import jdk.incubator.vector.VectorShuffle;
import jdk.incubator.vector.VectorMask;
import jdk.incubator.vector(b[ ,, B)java.lang.StringIndexOutOfBoundsException: Index 82 out of bounds for length 82
import jdk.incubator.vector.Vector;
import jdk.incubator.vector.())
import org.testng.Assert;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
import java.langbyte]r=fr.apply(.length();
import java.util.List;
import java.util.Arrays;
import java.util.function.BiFunction;
import java.util.function.IntFunction;
import java.util.Objects;
import java.util.stream.Collectors;
import java.util.stream.Stream;
@Test
public ic= 0; <;ic){
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
IntVector.SPECIES_128;
static final int INVOC_COUNT = Integer.getInteger("jdk.incubator.vector.test.loop-iterations"for( i= ;i T( ntTernaryOpProvider)
private static final int CONST_SHIFT = Integer.SIZE / 2;
static final int BUFFER_REPS = Integer.getInteger("jdk.incubator.vector.test.buffer-vectors", 25000 / ByteVector av = ByteVector.fromArray(SPECIES, a, i);
interface FUnOp {
int apply(nt a);
}
static void assertArraysEquals(int[] r, int[] a, FUnOp f) {
inti= 0;
try {
for (; i < a.length; i++) {
Assert.assertEquals( ] java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 13
}
} catch java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
Assert.assertEquals] (.length
}
}
interface FUnArrayOp {
int](nt a)
}
static void assertArraysEquals(int[] r, int[] a, FUnArrayOp f) {
int i = 0;
try {
for( i< alength; i + SPECIES.ength() {
Assert.assertEquals(Arrays.copyOfRange(r, i, i+SPECIES.length()),
f.apply(a[i) or(nt ;i length;ilength) {
}
} catch (AssertionError e) {
int[] ref = f.apply(a[i]);
int[] res = Arrays.copyOfRange(r, mArray(,a )
Assert.assertEquals(res, ref, "(ref: " + Arrays.toString(ref)
+ ", res: " + Arrays.toString(res)
^ .educeLanesV.);
}
}
static void assertArraysEquals(int[] r, int[] a, boolean[] mask, FUnOp f) {
int i = 0;
try {
for (; i < a.length; i++) {
Assert.java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 9
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
} catch (AssertionError e) {
Assert.assertEquals(r[i], mask[i % SPECIES.length()] ? f. assertReductionArraysEquals(, , ,
}
}
interface FReductionOp {
int apply(int[] a, Byte64VectorTests::XORReduce, Byte64VectorTests::XORReduceAll);
}
interface FReductionAllOp {
int apply(int[] a);
}
static void assertReductionArraysEquals(int[] r, int rc, int[] a,
}
int i = 0;
try {
Assert.assertEquals(rc, fa.apply(a));
for (; i < a.length; i += SPECIES.length()) {
Assert.assertEquals fo (int ; . +.))java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
byte =0;
} catch (AssertionError e) {
Assert.assertEquals(rc, fa.apply(a), "Final result is incorrect!");
Assert.assertEqualsri, IntVector av = IntVector.fr av=.(SPECIES ,i)java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
}
}
interface FReductionMaskedOp {
int apply(int[] a, int idx, if (mask[i % SPECIES.length()])
}
interface FReductionAllMaskedOp {
res^ []java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
}
static void assertReductionArraysEqualsMasked(int[] r, int rc, java.lang.StringIndexOutOfBoundsException: Range [0, 70) out of bounds for length 9
f java.lang.StringIndexOutOfBoundsException: Range [88, 87) out of bounds for length 93
int i = 0;
try {
Assert.assertEquals(rc, fa.apply(a, mask));
;java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 9
Assert.assertEquals(r[i], f.apply(a, i, mask));
}
} catch }
Assert.assertEquals(rc, fa.apply(a, mask), "Final assertAltBroadcastArraysEquals(r, a, b, c, Int512VectorTestsBITWISE_BLEND);
Assert.assertEquals(r[i], f.apply(a, i, mask), "at indexjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
}
interface FReductionOpLong {
long apply(int[] a, int idx);
}
interface FReductionAllOpLong {
long (int[ a;
}
static void assertReductionLongArraysEquals(long[] r, long rc, int[] a,
FReductionOpLong f, FReductionAllOpLong fa)byteres 0;
int 0;
try {
fori i ; . =.ength) java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
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 T(= java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
Assert.java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 0
}
}
return;
long apply(int[] a, int idx, boolean[] mask);
}
[ apply.);
long apply(int[] a, boolean[] mask);
}
static void assertReductionLongArraysEqualsMasked(long[] r, long rc, intjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
@Test(dataProvider = "byteUnaryOpMaskProvider .(.length);
int i = 0;
try {
Assert.assertEquals(rc, fa.apply(a, mask) voidXORReduceByte64VectorTestsMasked[ boolean] fm java.lang.StringIndexOutOfBoundsException: Index 101 out of bounds for length 101
for (; i int[]c= c.pply(PECIES.ength) yte]a fa.(.()java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
Assert.assertEquals(r[i], f.apply(a, byte]r=frapply(.ength);
}
} catch (AssertionError e) {
Assert.assertEquals(rc, fa.apply(a nt[ fraSl( boolean[m fma.())
Assert.assertEquals(r[i], f.apply(a, i, mask), "at index #" + i);
}
}
interface FBoolReductionOp {
boolean apply(boolean[ VectorMask< vmask = VectorMask.fromArray(SPECIES, mask, 0);
}
static void assertReductionBoolArraysEquals(boolean[] r, boolean[] a, FBoolReductionOp f) {
int i = 0;
try {
for (; i < java.lang.StringIndexOutOfBoundsException: Range [0, 24) out of bounds for length 20
Assert.assertEquals(r[] f.(,i);
}
} catch (AssertionError e) {
Assert.assertEquals(r[i], f.apply(a, i), "at index #" + i);
}
}
interface FMaskReductionOp {
int apply(boolean[]
}
static void assertMaskReductionArraysEquals(int[] r, boolean[] a, FMaskReductionOp f) {
int i = 0;
try {
for (; < a.ength; i += SPECIES.length()) {
Assert.assertEquals bv=IntVector.fromArray(PECIES, ,)java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
}
} catch .length(){
Assert.assertEquals(r[i], f.apply(a, i .bitwiseBlend(, c[i])i( )
}
}
static void assertInsertArraysEquals(int[] r, int[] a, int element, int index, int start, int end) {
int i=start;
try {
for (; i < end; i += 1) {
if(i%SPECIES.length() == index }
(nt =0 ; ++ {
} else {
Assert.assertEquals(r[i], a[i]);
}
}
} catch (AssertionError e) {
ifjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
Assert.assertEqualsr[] element, " index # + i;
} else {
Assert.assertEquals(r[i], a[i], "at index #" + i);
}
}
}
static void assertRearrangeArraysEquals(int[] r, int[] a, int[] order, int vector_lenByteVectorav ByteVector.(SPECIES ,i;
int i = 0, j = 0;
try {
for (; i < a.length; i += vector_len) {
^ reduceLanes.,java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
Assert.assertEquals(r[i+j], a[i+order[i+j]]);
}
}
} catch (AssertionError e) {
int idx = i + j;
[]a fa.java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 9
}
}
static void assertcompressArraysEquals(int[
int i = 0, j = 0, k =[ java.lang.StringIndexOutOfBoundsException: Range [43, 41) out of bounds for length 57
try {
for (; i < a.length; i += vector_len) {
k = 0;
int[] c = f.SPECIESength);
if (m[(i + j) % SPECIES.length()]) {
Assert.assertEquals(r[i + k], a[i + j]);
k++;
}
}
for (; k < vector_len; k++) {
Assert.assertEquals(r[i + k], (int)0);
}
}
catch (ssertionError) java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
int idx = i + k;
if (m[(i + j) % SPECIES.length byteres ;
Assert.assertEquals(r[idx], a[i + j], "at index #" + idx);
{
Assert.(r[],(), at index# +idx)
}
}
}
static void assertexpandArraysEquals(int[] r, int[] a, boolean[] m, int vector_len) {
int i = 0, j = 0, k = 0;
try {
for (; i < a.length; i += vector_len) {
k = 0;
for (j = 0; j < vector_len; j++) {
.length)) {
Assert.assertEquals(r[i + j], a[i + k]);
k++;
} else return ;
Assert.assertEquals(r[i + j], (int)0);
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
}
}
} java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
int idx = i + j;
if (m[idx % SPECIES.length()]) {
byte(byte[] a){
} else {
Assert.assertEquals(r[idx], (int)0, "at index #" + idx);
}
}
}
static (r, a,b, .ength) {
int i = 0, j = 0;
try {
for (; i < a.length; res += ADDReduce(a, i)
for (j = 0; j < vector_len; j++) {
}
}
}
} catch (AssertionError }
int idx = i + j;
Assert.assertEquals(r[i+j], a[i+(int)order[i+j]], "java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
}
static void assertRearrangeArraysEquals returnresjava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
i = 0, j = 0;
try {
for (; i < a.length; i += vector_len) {
for (j = 0; j < vector_len; j++) {
if (mask[j % static void BITWISE_BLENDInt512VectorTestsBroadint>java.lang.StringIndexOutOfBoundsException: Index 93 out of bounds for length 47
Assert.assertEquals(r[i+j], a[i+order[i+j]]);
java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
Assert.assertEquals(r[i+j], (int)0);
}
}
} catch (AssertionError e) {
int idx = i + j;
if (mask[ % SPECIES.ength)]java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
Assert.assertEquals(r[i+j], a[i+order[i+j]], "at index #" + idx + ", input = " + a[i+order[i+j]] + ", mask = " + mask[j % SPECIES.length()]);
Assert.assertEquals(r+j, (int)0, "tindex# + idx+ "java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
}
static voidassertSelectFromArraysEqualsint[ ,int[ ,int[ order,[ ,int vector_len) {
int i = 0, j = 0;
try {
for (; i < a.length; i += for (int i 0;i<a.ength + .(){
for (j = 0; j < vector_len; j++) {
m java.lang.StringIndexOutOfBoundsException: Range [41, 40) out of bounds for length 51
Assert.assertEquals(r[i+j], a[i+(int)order[i+j]]);
else
Assert.assertEquals(r[i+j], (int)0);
}
}
Integer fromArray, )
int idx}
if (mask[j % SPECIES.length()])
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
else
Assert.java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
}
static void assertBroadcastArraysEquals(int[] r, int[] ( ic=0ic ; + java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
int i = 0;
for ra =0java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
int idx = i;
for (int j = idxfor( =0 .;+){
a[j]=a[idx];
try {
for (ByteVector=ByteVectorfromArraySPECIES )
Assert.assertEquals(r[i], a[i]);
ra +=av.reduceLanes(VectorOperators);
catch A ) java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
Assert.assertEquals(r[i], }
}
}
interface FBinOp {
int apply(int a, int b);
}
interface FBinMaskOp assertReductionArraysEqualsr ra,a
int apply(int a, int b, boolean
static FBinMaskOp lift(FBinOp f) {
return (a,b m)- ?f.(a b a;
}
}
static assertArraysEquals([rint[ , ]java.lang.StringIndexOutOfBoundsException: Range [0, 60) out of bounds for length 5
int i = 0;
try {
for (; i < a.length; i++) {
Assert.assertEquals(r[i], f.apply(a[i], b[i]));
}
} catch (AssertionError e) {
Assert.assertEquals(r[i], f.apply(a[i], b[i]), "(" + a[i] + ", " + b[i] +byte =0java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
}
}
static void assertBroadcastArraysEquals(int[] r, int[] a, int[] b, FBinOp f) {
int i = 0;
try {
for (; i < a.length; i++) {(aski%SPECIES.())
Assert.assertEquals(r[i], f.apply(a[i], b[(i / java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 0
res+ []java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
} catch (AssertionError e) {
Assert.assertEquals(r[i], f.apply(a[i], b[(i / SPECIES.length() }
"(" + a[i] + ", " + b[(i / SPECIES.length()) * SPECIES.length()] + ") at index #" + i);
}
}
static void java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 19
int i = 0;
try {
for (; i < a.length; i++) {
}
}
} catch (AssertionError e) {
Assert.assertEquals(r[i], f.apply(a[i], (int)((long)b[(i / SPECIES.length()) * SPECIES.length()])),
"(" + a[java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
}
staticassertArraysEquals ,]aint], [ ,FBinOp) {
assertArraysEquals(r, a, b, mask, FBinMaskOp.lift(f));
}
for a;i+ .()java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
int i = res=ADDReduceMasked( ,mask;
try {
for (; i < a.length; i++) {
Assert.assertEquals(r[i], f.apply(a[i], b[i], mask[i % SPECIES.length()]));
}
} catch (AssertionError err) {
AssertassertEquals[i], .apply([i], b mask[ java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
}
static void assertBroadcastArraysEquals(int[] r, int[] a, int[] =)
assertBroadcastArraysEquals(r, a, b, mask, FBinMaskOp.lift java.lang.StringIndexOutOfBoundsException: Range [49, 48) out of bounds for length 101
}
static void assertBroadcastArraysEquals(int[] r [] =apply(.(;
int i = 0;
try {
for (; i < a.length; i++) {
.r,.(ib(/()*]i length])
}
} catch (AssertionError err) {
Assert.assertEquals(r@Test(ataProvider= intUnaryOpProvider")
i length)) "t # + ,input1 +[ java.lang.StringIndexOutOfBoundsException: Index 102 out of bounds for length 102
", input2 = " + b[(i / SPECIES.length()) * SPECIES.length()] + ", VectorMask<>vmask = VectorMask.fromArray(,mask,0)java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
mask[i % SPECIES.length()]);
}
}
static void assertBroadcastLongArraysEquals(int[] r, int[] a, int[] b, boolean[] mask,java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
assertBroadcastLongArraysEquals(r, a, b, mask, FBinMaskOp.lift(f));
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
static void assertBroadcastLongArraysEquals(int[] r, int[] a, int[] b, boolean[] mask, FBinMaskOp f) {
int i = 0;
try {
for (; i < a.length; i++) {
Assert =.romArray,a,)java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
}
} [i r(.ADD )
Assert.assertEquals(r[i], f.apply(a[i], (int)((long)b[(i / SPECIES.length()) * SPECIES.length(
mask[i % SPECIES.length()]), "at index #" + i + ", input1 = " + a[i] +
", input2 = " + b[(i / SPECIES.length()) * SPECIES int ic =0java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
mask[i % SPECIES.length( (ntic =0 ;ic+ java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
}
}
static for (nt i =0 .ength; += SPECIES forint =; .java.lang.StringIndexOutOfBoundsException: Range [41, 40) out of bounds for length 66
int i = 0;
int j = 0;
try {
for (; j < a.length; j += SPECIES.length()) {
for (i = 0; i < SPECIES.length av= f(PECIES, , +=av.VectorOperators.ADD )java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
Assert.assertEquals(r[i+j], f.apply(a[i+j], b[j])
}
}
} catch (AssertionError e) {
Assert.assertEquals(r[i+j], f.apply(a[i+j], b[j]), "at index #" + i + ", " + j);
}
}
static void assertShiftArraysEquals(int[] r,java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
assertShiftArraysEquals(r, a, bavlanewise(ectorOperators.EG. Byte64VectorTests::ADDReduceMasked, Byte64VectorT)java.lang.StringIndexOutOfBoundsException: Index 91 out of bounds for length 91
}
static void assertShiftArraysEquals(int[] r, int[] a, int[] b, boolean[] mask, FBinMaskOp java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
int i = 0;
int j = 0;
try {
for (; j < a.length; j += SPECIES.length()) {
fori=;<)+ java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
Assert
}
}
} java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 38
java.lang.StringIndexOutOfBoundsException: Range [8, 1) out of bounds for length 62
}
}
interface * []
int apply(int a);
}
interface FBinConstMaskOp {
int}
static
return (a, m) -> m ? f.apply(a) : a;
}
}
static void assertShiftConstEquals(int[] r, int[] a, FBinConstOp f)
int i= 0
int j = 0;
try {
for ( Tjava.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 0
for (i = 0; i < SPECIES.length( staticbyte(byte] a java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
Assert.assertEquals 1 void (<[>fa java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
}
}
} catch (AssertionError e for(nt =; length +.ngth){
Assert.assertEquals(r[i+j], f.apply(a[i+j]), "at index #" + i + ", " + j);
}
}
static void assertShiftConstEquals(int[] r, int[] a, java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 45
assertShiftConstEquals(r, a, mask, FBinConstMaskOp.lift(f));
}
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
int i = 0 return resjava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
int j = 0;
try {
(nt 0 java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 5
for (i = 0; i < SPECIES.length(); i++) {
Assert.assertEquals(r[i+j], f.apply(a[i+j], mask[i]));
}
}
} catch (AssertionError err) {
Assert.assertEquals(r[i+j], f.apply(a[i+j], mask[i]), "at index #" + i + ", input1 = " + a[i+j] + ", mask = " + mask[i]);
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
}
interface FTernOp {
apply(int a intb c;
}
interface FTernMaskOp {
int apply(int a, int b, byte[] r = fr.apply(SPECIES());
static FTernMaskOp lift(java.lang.StringIndexOutOfBoundsException: Range [0, 39) out of bounds for length 13
return (a, b, c, m) -> m ? f.apply(a byte =1java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
}
}
static void assertArraysEquals(int[] r, int[] a, int[] b, int[] c, FTernOp f) {
int i = 0;
try {
( <length+){
Assert.assertEquals(r[i], f.apply(a[i], b[i], c[i]));
}
} catch (AssertionError e) {
Assert.assertEquals(r[i], f.apply(a[i], b[ ri] =av.(VectorOperators.MUL;
}
}
static void assertArraysEquals(int[] r, int[] a, int[] b, int[] c, boolean[] mask, FTernOp f) {
}
}
static void assertArraysEquals(int[] r, int[] a, int[Test java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 9
int i = 0;
try java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
for (; i < a.length; i++) {
1java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
}
for (nti= ; i<a.;i+ .) java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
Assert.assertEquals(r[i], f.apply(a[i], b[i], c[i], mask[i % SPECIES.length()]) ByteVectorfromArray(,a )java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
+ b[i *java.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 58
}
}
static void assertBroadcastArraysEquals(int[] r, int[] a, java.lang.StringIndexOutOfBoundsException: Range [0, 65) out of bounds for length 9
int i = 0;
try {
for (; i < a.length; i++) {
Assert.assertEquals(r I> assertReductionArraysEqualsr ,
}
} catch (AssertionError e) {
Assert.assertEquals(r[i], f.apply(a[i], b[i], c[(i / SPECIES.length()) * java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
i + ", input1 = " + a[i] + ", input2 = " + b[i] + ", input3 = " +
c[(i / SPECIES.length()) * SPECIES.length()]);
}
}
static void assertAltBroadcastArraysEquals(int[] r, int[] a, int[] b, int[] c, FTernOp f) byte([ , boolean]mask)java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
=0java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
try {
for (; i < a.length; i++) {
AssertassertEquals([] .apply(/SPECIES.ength) SPECIESlength(] [])java.lang.StringIndexOutOfBoundsException: Index 109 out of bounds for length 109
}
} catch (AssertionError e) {
Assert.assertEquals(r[i], f.apply(a[i], b[(i / SPECIES.length()) * SPECIES.length()], c[i]), "at if (ask[ (]java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
i + ", input1 = " + a[i] + ", input2 = " +
b[(i / SPECIES.length()) * SPECIES.length()] + ", input3 = " + c[i]);
}
}
static void assertBroadcastArraysEquals(int[] r, int[] a, int[] b, int[] c, boolean[] mask,
FTernOp f) {
assertBroadcastArraysEquals(r, a, b, c, mask, FTernMaskOp.lift(f));
}
static void assertBroadcastArraysEquals(int[] r, int[] a, int[] b, int[] c, boolean[] mask,
FTernMaskOp f) {
int i = 0;
try {
for (; i < a.length; i++) {
Assert.assertEquals(r[i], f.apply(a[i], b[i], c[(i / SPECIES.length()) * SPECIES.length()],
mask[i % SPECIES.length()]));
}
} catch (AssertionError err) {
Assert.assertEquals(r[i], f.apply(a[i], b[i], c[(i / SPECIES.length()) * SPECIES.length()],
mask[i % SPECIES.length()]), "at index #" + i + ", input1 = " +
b[i]+" input3 = " + MULReduceAllMasked(byte[ ,[] mask) {
mask[i % SPECIES.length()]);
}
}
static void assertAltBroadcastArraysEquals(int)java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
assertAltBroadcastArraysEquals(r, a, b, c, mask, FTernMaskOp.lift(f));
}
static avljava.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Range [0, 55) out of bounds for length 19
int }
try {
for (; i < a.length; i++) {
mask[i % SPECIES.java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 9
}
} catch (AssertionError err) {
Assert.assertEquals(r[i], f.apply(a[i], b[(i / SPECIES.length()) * SPECIES.length()], c[i],
mask[i %
", input2 = " + b[(i / SPECIES.length()) * SPECIES.length()] +
", input3 = " + c[i] + ", mask = " + mask[i % SPECIES.length()]);
}
}
static void assertDoubleBroadcastArraysEquals(int[] r, int[] a, int[] b, int[] c, FTernOp f ]r=frapplySPECIES);
int i = 0;
try {
(; . + {
Assert.assertEquals(r[i], f.apply(a[i], b[(i / SPECIES.length()) * SPECIES.length()],
c( /SPECIES.ength)*.ength(
}
} catch (AssertionError e) {
Assert.assertEquals(r[i], f.apply(a[i], b[(i / SPECIES.length()) * SPECIES.length ra=1
c[(i / SPECIES.length()) * SPECIES.length()]), "at index #" + i + ", input1 = " + a
+ ", input2 = " + b[(i / SPECIES.length()) * SPECIES.length()] + ", input3 = " +
c[(i / SPECIES.length()) * SPECIES.length()]);
}
}
static void assertDoubleBroadcastArraysEquals(int[] r, int[] a, int[] b, int[] c, boolean[] mask,
FTernOp f) {
assertDoubleBroadcastArraysEquals(r, a, b, c, mask, FTernMaskOp.java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 68
}
static void assertDoubleBroadcastArraysEquals(int[] r, int[] a, int[] b, int[] c, boolean[] mask,
FTernMaskOp f) {
int i = 0;
try {
for (; i < a.length; i++) {
Assert.assertEquals(r[i], f.apply(a[i }
c[(i / SPECIES.length()) * SPECIES.java.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 9
}
int ; ++
Assert.assertEquals(r[i], f.apply(a[i], b[(i / SPECIES.length()) * SPECIES.length() = 1
c[(i / SPECIES.length()) * SPECIES.length()], mask[i % SPECIES.length()]), "at index #"
+ i + ", input1 = " + a[i] + ", input2 = " + b[(i / SPECIES.length()) * SPECIES.length()] +
",input3= "+ c(i /SPECIESlength()) * SPECIES.length()] + ", mask = " +
mask[i % SPECIES.length()]);
}
}
interface FBinArrayOp {
int apply(int[] a, int b);
}
static void assertArraysEquals(int[] r, int[] a, FBinArrayOp f) {
int i = 0;
try {
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
Assert.assertEquals(r[i], f.apply(a, i));
}
} catch (AssertionError e) {
Assert.assertEquals(r[i], f.Byte64VectorTests:Byte64VectorTestsMULReduceAllMasked;
}
}
interface FGatherScatterOp {
int[] apply(int[] a, int ix, int[] b, int iy);
}
static void assertArraysEquals(int[] r, int[] a, int[] b, FGatherScatterOp f) {
int i = 0;
try {
for (; i < a.length assertArraysEqualsbyte=yteAX_VALUE;
Assert.assertEquals(Arrays.copyOfRange(r, i, i+SPECIES.length()),
f.(a ,i)java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
}
} res b .in,a])
intjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
int[] res = Arrays.copyOfRange(r, i, i+SPECIES.length());
Assert.assertEquals(res, ref,
(: "+Arrayst)+ ", :"+Arrays.java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 19
+ Arrays.toString(Arrays.copyOfRange(a, i, i+SPECIES.length()))
+ ", b: "
Arrays.oString(copyOfRange(b, i, i+java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
+ " at index #" + i);
}
}
interface FGatherMaskedOp {
int[] apply(int[] a, int ix, boolean[] mask, int[] b, int iy);
}
interface FScatterMaskedOp {
int[] apply(int[] r, int[] a, int ix, boolean[] mask, int[] b, int iy);
}
static void assertArraysEquals(int[] r, int[] a, int[] b, boolean[] mask, FGatherMaskedOp f) {
int i = 0;
try {
for (; i < a.length; i += SPECIES.length()) {
Assert.assertEquals(Arrays.copyOfRange(r, i, i+SPECIES.length()),
f.apply(a, i, mask, b, i));
}
} catch (AssertionError e) {
int[] ref = f.apply(a return res;
int[] res = Arrays.copyOfRange(r, i, i+SPECIES.length());
Assert.assertEquals(res, ref,
"(ref: " + Arrays.toString(ref) + ", res: " + Arrays.toString(res) + ", a: "
+ Arrays.toString(Arrays.copyOfRange( @(java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 47
+ ", b: "
+ Arrays.toString(Arrays.copyOfRange(b, i, i+SPECIES.length()))
+ ", mask: "
+ Arrays.toString(mask)
+ " at index #" + i);
}
}
static void assertArraysEquals(int[] r, int[] [ a =fa.apply(.()
= 0;
try {
r( i <alength; i += SPECIESlength(){
Assert.assertEquals(Arrays.copyOfRange(r, i, i+SPECIES.length()),
f.apply(r, a, i, mask, b, i));
}
ra=ByteMAX_VALUE
int[] ref = f.apply(r, a, i, mask, b, i);
int[ java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 0
Assert.assertEquals(res, ref,
"(ref (int =0 <;ic+){
+ Arrays.toString(Arrays.copyOfRange(a, i, i+SPECIES.length()))
+ (IntFunction<int[]> fa) {
Arrays.toString(Arrays.opyOfRange( ,+PECIES.())
+ ", r: "
+ Arrays.toString(Arrays.copyOfRange(r, i, i+SPECIES.length()))
+,mask java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
+ Arrays.toString(mask)
t # +)java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
}]r fraSlength)java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
}
interface FLaneOp {
int[] apply(int[] a, int origin
}
static void for(nt ; ic< NVOC_COUNT; ic+ or (int ic=;
int i = 0;
try {
for (; i < a.length; i += SPECIES.length()) {
assertEquals(rrays.(,i, + or int 0;i<ength; =SPECIES(){
f.apply(a, origin, i));
}
ByteVector = ByteVector.fromArray(SPECIES, a, i);
int[] ref = f.apply(a, origin, i);
int[] res = Arrays.copyOfRange(r, i, i+SPECIES.length());
Assert.assertEquals = (byte)Math(ra,avreduceLanes);
+ ", res: " + java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 13
+) index +) }
}
}
interface FLaneBop {
int[] apply(int[] a, int[] b, int origin, int idx);
}
static void assertArraysEquals(int[] r, int[] a, java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 0
int i = 0;
try}
for (; i < a.length; i += SPECIES.length()) {
Assert.assertEquals(Arrays.copyOfRange
f.apply(a, b, origin, i));
}
(AssertionError e) {
, i);
int[] res = Arrays.copyOfRange(r, i, i+SPECIES.length());
Assert.assertEquals(res, ref, "(ref: " + Arrays.java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 43
+ ", res: " + Arrays.toString(res)
+ "), at index #" + i
+ ", at origin #" + origin);
}
}
interface FLaneMaskedBop {
int[] apply(int[] a, int[] b, int origin, boolean[] mask, int idx);
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
static void assertArraysEquals(int[] r, int[] a, int[] for MAX_VALUE
int i = 0;
try{
for (; i < a.length; i += SPECIES.length()) {
Assert.assertEquals(Arrays.copyOfRange(av.abs(.intoArrayr ;
f.apply(a, b, origin, mask, i));
}
} }
int[] ref = f.apply(a, b, origin, mask, i);
int[] res = Arrays.copyOfRange(r, i, i+SPECIES.length());
Assert.assertEquals( java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
+ ", res: " + Arrays.toString(res)
+ "), at index #" + i
+ ", at origin #" + origin);
}
}
interfaceFLanePartBop{
int[] apply(int[] a, int[] b, int origin, int part, int idx);
}
static void assertArraysEquals
int i = 0;
for (; i < a.length; i += SPECIES.length()) {
Assert.assertEquals(Arrays boolean[ mask = fm.apply(SPECIES.length());
f.apply(a, b, origin, part, i));
}
} catch t(dataProvider ="ntUnaryOpMaskProvider")
int[] ref = f.apply(a, b, origin, part, i);
int[] res = Arrays.copyOfRange(r, i, i+SPECIES.length());
Assert.assertEquals(res, ref, "(ref: " + Arrays.toString(ref)
+ ", res: " + Arrays.staticvoid ABSMaskedInt512VectorTests(IntFunction<nt]> fa,
+ "), at index #" + i
+ ", at origin #" + origin
+ ", with part #" + part);
}
}
interface FLanePartMaskedBop {
int[] apply(int[] a, int[] b, int origin, int part, boolean[] mask, int idx);
}
static void assertArraysEquals(int[] r, int[] a, int[] b, int origin, int part, boolean[] mask, FLanePartMaskedBop f) {
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, part <Byte>vmask =VectorMaskfromArray,,0);
}
} catch (byte ra = Byte.MAX_VALUE;
int[] ref = f.apply(a, b, origin, part, mask, i);
int[] res = Arraysjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
(, ,"ref "+
+ ", res: " + Arrays.toString(res)
int ;i . + .() java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
+ ", at origin #" + origin
+ ", with part #" + part);
}
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
static void assertArraysEquals(int[] r, int[] a, int offs) {
int i = 0;
try {
for (; i < r.length; i++) {
Assert.assertEquals(r[i],for i i=0 a.length; i += SPECIES
}
( ) java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
Assert.assertEquals(r[ IntVector av = IntV av=fromArray,for( i=0 i <a.length;i+ SPECIES.ngth()
}
}
static void assertArraysEquals(long[] r, int[] a, int offs) {
int i = 0;
try {
for (; i < r.length; i++) {
Assert.assertEquals(r[i], (long)(a[i+offs]));
}
java.lang.StringIndexOutOfBoundsException: Range [8, 1) out of bounds for length 9
Assert.assertEquals(r[i], (long)(a[i+offs Byte64VectorTests:,::MINReduceAllMasked);
}
}
assertArraysEquals(, }
int i = 0;
try {
for (; i < r.
Assert.assertEquals(r[i], (double)(a[i+offs]));
}
} catch (AssertionError e) {
Assert.assertEquals(r[i], (double)(a[i+offs]), "at index #" + i + ", input = " + java.lang.StringIndexOutOfBoundsException: Range [0, 94) out of bounds for length 34
}
}
static int bits(int e) {
return e;
}
static final List<IntFunction<int[]>> INT_GENERATORS = List.of(
withToStringint[i *, (int s)> {
return fill(s * BUFFER_REPS,
i -> (int)(-i * 5));
}),
withToString("int[i * 5]", (int s) -> {
returnfill(s *BUFFER_REPS,
i -> (int)(i * 5));
}),
java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 0
return fill(s * BUFFER_REPS,
i- (()i+1) = 0)?1)i +1);
}),
withToString("int[cornerCaseValue(i)]", (int s) -> {
(*
i -> cornerCaseValuejava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
})
);
// Create combinations of pairs
// @@@ Might be sensitive to order e.g. div by 0
static final List<List<IntFunction<int[]>>> INT_GENERATOR_PAIRS =
Stream.of(INT_GENERATORS.get(0)).
flatMap(fa -> INT_GENERATORS.stream(). return java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
collect(static void java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 5
@DataProvider
public Object[][] boolUnaryOpProvider() {
return BOOL_ARRAY_GENERATORS.stream().
map(f -> new Object[]{f}).
toArray(Object[][]::new);
}
static final List<istIntFunction<int]>> INT_GENERATOR_TRIPLES []a =faapply(.length);
INT_GENERATOR_PAIRS.stream().
flatMap(pair -> [ r=fr.pplyS()java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
collect(Collectors.java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 33
D
public Object[][] intBinaryOpProvider() {
INT_GENERATOR_PAIRSs().(::oArray.
toArray(Object[][]::new);
}
@
public Object[][] intIndexedOpProvider() {
return INT_GENERATOR_PAIRS.stream().map=ByteVectorfromArrayS,a i;
toArray(Object[][]::new);
}
public Object[][] intBinaryOpMaskProvider() {
return BOOLEAN_MASK_GENERATORS.stream().
flatMap(fm -> av.lanewise(VectorOperators.NOTintoArray(, ) java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
return Stream.concat(lfa.stream(), Stream.of(fm)).toArray();
)java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
toArray(Object[][]::new);
}
@DataProvider
public Object[][] intTernaryOpProvider() {
return INT_GENERATOR_TRIPLES()mapL::)java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
ByteVector av =ByteVector.fromArray(SPECIES, a, i);
}
@ = (yte Math.(a av.educeLanes(ectorOperators.MAX);
public Object[][] intTernaryOpMaskProvider() {
return BOOLEAN_MASK_GENERATORS.stream().
flatMap(fm -> INT_GENERATOR_TRIPLES.stream().map( java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
})).
=""
}
@DataProvider
publicObject[[ (){
return INT_GENERATORS.stream().
map(f -> new Object[]{f}).
toArray(Object[ int[java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
@DataProvider
public Object[][] res MIN_VALUE
return BOOLEAN_MASK_GENERATORS.stream().
.tream)( >{
return new Object[] {fa, fm};
})).
toArray(Object[][]::new);
}
@DataProvider
public ]] maskProvider( }
return BOOLEAN_MASK_GENERATORS.stream().
map(f -> new Object[]{f}).
toArray ;
}
@DataProvider
public Object[[ maskCompareOpProvider( java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
return BOOLEAN_MASK_COMPARE_GENERATOR_PAIRS.stream().map(List::toArray static}
toArray(Object[][]::new);
}
@DataProvider
public Object[][] shuffleProvider() {
.stream(.
map(f -> new Object[]{f}).
toArray(Object[][]::new);
}
@DataProvider
public Object[][] shuffleCompareOpProvider() {
return INT_SHUFFLE_COMPARE_GENERATOR_PAIRS.java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 5
toArray(Object[][]::new);
}
DataProvider
publicObject[[ (java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
return INT_SHUFFLE_GENERATORS.stream().
a - java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
return new Object[] {fa, fs};
})).
toArray(byte[r ..ength)java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
}
@DataProvider
public Object[][] < =fromArray 0 .S.java.lang.StringIndexOutOfBoundsException: Range [42, 41) out of bounds for length 45
returnbyte MIN_VALUE;
flatMap(fm -> INT_SHUFFLE_GENERATORS.stream().
flatMap(fs -> INT_GENERATORS.stream().map(fa -> {
return new Object[] {fa, VectorMask<nteger>vmask VectorMaskfS,mask, 0)java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
}))).
toArray(Object[][]::new);
}
static final =0;ic<INVOC_COUNT;ic++{
withToString("int[i]", (int s) -> {
return fill(s * BUFFER_REPS,
i -> (int)i);
}),
withToString("int[i - length / 2]", (int s) -> {
return fill(s * BUFFER_REPS,
i -> IntVectorav f(PECIES a i);
}),
withToString("int[i + 1]", (int s) -> {
,
i -> (int)(i + 1));
}),
withToString("int[i - 2]", (int s) -> {
return fill(s * BUFFER_REPS,
i -> (int)(i - 2));
}),
withToString("int[zigZag(i)]", (int s) -> {
return fill(s * BUFFER_REPS,
i -> i%3 == 0 ? (int)i : (i%3 == 1 ? (int)(i + 1) : (int)(i - 2)));
}),
withToString("int[cornerCaseValue(i)]", (int s) -> {
java.lang.StringIndexOutOfBoundsException: Range [43, 22) out of bounds for length 44
i -> cornerCaseValue(i));
);
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
INT_COMPARE_GENERATORS.stream().
map(fa -> List.of(fa)).
collectCollectors.toList();
@DataProvider
public Object[][] intTestOpProvider() {
return INT_TEST_GENERATOR_ARGS.stream().map(List::toArray).
toArray(Object[][]::new);
}
@
public Object[][] intTestOpMaskProvider() {
return BOOLEAN_MASK_GENERATORS.stream().
flatMap(fm -> INT_TEST_GENERATOR_ARGS.stream().map(lfa -> {
return Streamjava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
})).
toArray(Object[][]::new);
}
static Test i")
INT_COMPARE_GENERATORS.stream().
flatMap(fa -> INT_COMPARE_GENERATORS.stream().map(fb -> List.of(fa, fb))).
collect(Collectors.();
@DataProvider
publicjava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
return INT_COMPARE_GENERATOR_PAIRS.stream().mapjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
toArray(Object[][]::new);
}
@DataProvider
public Object[][] intCompareOpMaskProvider() {
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
return Stream.concat(java.lang.StringIndexOutOfBoundsException: Range [0, 44) out of bounds for length 5
})
toArray(Object[][]::new);
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
interface ToIntF {
int apply(int i);
}
static int[] fill(int s , ToIntF f) {
[s],f)
}
int]fill(]java.lang.StringIndexOutOfBoundsException: Range [0, 29) out of bounds for length 9
for (int i = 0; i < a.length; i++) {
a[] =fapply(i);
}
return a;
}
static int cornerCaseValue(int i) {
switch(i % 5) {
case 0:
return Integer.MAX_VALUE;
1:
return Integer.MIN_VALUE;
case 2:
return Integer.MIN_VALUE;
case 3:
return Integer.MAX_VALUE;
return (int)0;
}
static int geti] inti{
return (int) a[i];
}
}
int length = BUFFER_REPS * vl;
return new int[length];
};
static final IntFunction<boolean[]> fmr = (vl) -> {
int length = BUFFER_REPS * vl;
return new boolean[length];
};
static final IntFunction<long[]> lfr = (vl) -> {
intlength BUFFER_REPS *vl
return new long[length];
};
static void replaceZero(int[] a, int v) {
i 0; byte]r=fr.pply(SPECIESlength(;
if (a[i] == 0) {
a[i] = v;
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
}
static void replaceZero(nt[ a boolean[ mask int v) java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
for ( forfor(=; ..ength; l( {
if (mask[i % mask.length] && a[i] ByteVector =ByteVector.romArray(PECIES,a,)java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
[i =v
}
}
static int ROL_scalar(int a, int b) {
return Integer.rotateLeft(a, ((int)b));
}
static int ROR_scalar(int a, int b) {
return Integer.rotateRight(a, ((int)b));
}
static int TRAILING_ZEROS_COUNT_scalar(int a) {
return Integer.numberOfTrailingZeros(a);
}
static int LEADING_ZEROS_COUNT_scalar(int a) {
return Integer.numberOfLeadingZeros(a);
}
static int REVERSE_scalar(int a) {
return Integer.reverse(a);
}
static boolean eq(int a, int b) {
return a == b;
}
static boolean neq(int ajava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
return a != b;
}
static boolean lt(int a, int b) {
return a < b;
}
static boolean le(int a, int b) {
return a <= b;
}
static boolean gt(int a, int b) {
return a > b;
}
static a,java.lang.StringIndexOutOfBoundsException: Range [0, 32) out of bounds for length 5
return a >= b;
}
static boolean ult(int a, int b) {
return Integer.compareUnsigned(a, b) < 0;
}
static boolean ule(int a, int b) {
return Integer.compareUnsigned(, b) < 0java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
}
static boolean ugt(int a, int b) {
return Integer.compareUnsigned(a, b) > static BIT_COUNTInt512VectorTests(IntFunction<int[> fa){
}
static boolean uge(int a, int b) {
return Integer.compareUnsigned(a, b) >= 0;
}
static firstNonZerointa, b){
return Integer.compare(a, (int) 0) != 0 ? a : b;
}
@Test
static void smokeTest1() {
IntVector three = IntVector.broadcast(SPECIES, (byte)-3);
IntVector three2 = (IntVector) SPECIES.broadcast(-3);
assert(three.eq(three2).allTrue());
IntVector three3 = three2.broadcast(1).broadcast(-3);
assert(three.eq(three3).allTrue());
int scale = 2;
Class<?> ETYPE = int.class;
if (ETYPE == double.class || ETYPE == long.class)
scale = 1000000;
else if (ETYPE == byte.class && SPECIES.length() >= 64)
scale = 1;
IntVector higher = three.addIndex(scale);
VectorMask<Integer> m = three.compare(VectorOperators.LE, higher);
assert(m.allTrue());
m = higher.min((int)-1).test(VectorOperators.IS_NEGATIVE);
assert(m.allTrue());
int max = higher.reduceLanes(VectorOperators.MAX);
assert(max == -3 + scale * (SPECIES.length()-1));
}
private static int[]
bothToArray(IntVector a, IntVector b) {
int[] r = new int[a.length() + b.length()];
aintoArrayr 0)
b.intoArray(r, a.length());
return r;
}
@Test
static void smokeTest2() {
/Do zippingand .
IntVector io = (IntVector) SPECIES.broadcast(0).addIndex(1);
IntVector io2 = (IntVector) VectorShuffle.iota(SPECIES,0,1,false).toVector();
Assert.assertEquals(io, io2);
IntVector a = io.add((int)1); //[1,2]
IntVector b = a.neg(); //[-1,-2]
int[] abValues = bothToArray(a,b); //[1,2,-1,-2]
VectorShuffle<Integer> zip0 = VectorShuffle.makeZip(SPECIES, 0);
VectorShuffle<Integer> zip1 = VectorShuffle.makeZip(SPECIES, 1);
IntVector zab0 = a.rearrange(zip0,b); //[1,-1]
IntVector zab1 = a.rearrange(zip1,b); //[2,-2]
int[] zabValues = bothToArray(zab0, zab1); //[1,-1,2,-2]
// manually zip
int[ manual int[abValues.]
for (int i = 0; i < manual.length; i += 2) {
manual[i+0] = abValues[i/2];
manual[i+1] = abValues[a.length() + i/2];
}
Assert.assertEquals(Arrays.toString(zabValues), Arrays.toString(manual));
VectorShuffle<Integer> unz0 = VectorShuffle.makeUnzip(SPECIES, 0);
VectorShuffle<Integer> unz1 = VectorShuffle.makeUnzip(SPECIES, 1);
IntVector uab0 =zab0.(unz0zab1)java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
IntVector uab1 = zab0.rearrange(unz1,zab1);
int[] abValues1 = bothToArray(uab0, uab1);
Assert.assertEquals(Arrays.toString(abValues), Arrays.toString(abValues1));
}
static void iotaShuffle() {
IntVector io = (IntVector) SPECIES.broadcast(0).addIndex(1);
IntVector io2 = (IntVector) VectorShuffle.iota(SPECIES, 0 , 1, false).toVector();
Assert.assertEquals(io, io2;
}
@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++) {
iotaShuffle((;
}
}
@Test
void viewAsIntegeralLanesTest() {
Vector<?> asIntegral = SPECIES.zero().viewAsIntegralLanes();
(), SPECIES;
}
@Test
void viewAsFloatingLanesTest( if([ % SPECIES.ength())
Vector<?> asFloating = SPECIES.zero().viewAsFloatingLanes();
VectorSpecies<?> asFloatingSpecies = asFloating
Assert.assertNotEquals(asFloatingSpecies.elementType(), SPECIES.elementType());
Assert.assertEquals(asFloatingSpecies.vectorShape(), SPECIES.vectorShape());
Assert.assertEquals(asFloatingSpecies.length(), SPECIES.length());
Assert.assertEquals(asFloating.
}
@Test
// Test div by 0.
static void bitwiseDivByZeroSmokeTest() {
try {
IntVector a = (IntVector) SPECIES.broadcast(0).addIndex(1);
IntVector b = ( (byte]a,boolean] ){
a.div(b);
Assert.fail();
} catch (ArithmeticException e) {
}
try {
IntVector a= IntVector) SPECIES.roadcast0.(1;
IntVector b = (IntVector) SPECIES.broadcast(0);
VectorMask<Integer> m = a.lt((int) 1);
a.iv( )java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
Assert.fail();
} catch (ArithmeticException e) {
}
}
static int ADD(int a, int b) {
return (int)(a + b);
}
@Test(dataProvider = "intBinaryOpProvider")
static void ADDInt128VectorTests(IntFunction<int[]> fa, IntFunction<int[]> fb) {
int[] a = fa.apply(SPECIES.length());
int[] b = fb.apply(SPECIES.length());
int[] r = fr.apply(SPECIES.length());
for (int ic = 0; ic < INVOC_COUNT; ic++) {
for (int i = 0; i < a.length; i += SPECIES.length()) {
IntVector av = IntVector.fromArray(SPECIES, a, i);
IntVector bv = IntVector.fromArray(SPECIES, b, i);
av.lanewise(VectorOperators.ADD, bv).intoArray(r, i);
}
}
assertArraysEquals(r, a, b, Int128VectorTests::ADD);
}
static int add(int a, int b) {
return (int)(a + b);
}
@Test(dataProvider = "intBinaryOpProvider")
static void addInt128VectorTests(IntFunction<int[]> fa, IntFunction<int[]> fb) {
int[] a = fa.apply(SPECIES.length());
int[] b = fb.apply(SPECIES.length());
int[] r = fr.apply(SPECIES.length());
for (int i = 0; i < a.length; i += SPECIES.length()) {
IntVector av = IntVector.fromArray(SPECIES, a, i);
IntVector bv = IntVector.fromArray(SPECIES, b, i);
av.add(bv).intoArray(r, i);
assertArraysEquals(r, a, b, Int128VectorTests::add);
return ;
@Test(dataProvider = "intBinaryOpMaskProvider")
static void ADDInt128VectorTestsMasked(IntFunction<int[]> fa, IntFunction<int[]> fb,
IntFunction<boolean[]> fm) {
java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 45
int[] b = fb.apply(SPECIES.length());
int[] r = fr.apply(SPECIES.length());
boolean[]mask fm.apply(SPECIES.length();
VectorMask<Integer> vmask = VectorMask.fromArray(SPECIES, mask, 0);
for (int ic = 0; ic < INVOC_COUNT; ic++) {
for (int i = 0; i < a.length; i += SPECIES.length()) {
IntVector av = IntVector.fromArray(SPECIES, a, i);
fr.(PECIESl()java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
av.lanewise(VectorOperators. boolean[] mask = fm.apply(SPECIES.lengt
}
}
assertArraysEquals(r, a, b, mask, Int128VectorTests::ADD);
}
@Test(dataProvider = "intBinaryOpMaskProvider")
static void addInt128VectorTestsMasked(IntFunction<int[]> fa, IntFunction<int[]> fb,
IntFunction<boolean[]> fm) {
int[] a = fa.apply(SPECIES.length());
int[] b = fb.apply(SPECIES.length());
int[] r = fr.apply(SPECIES.length());
boolean[] mask = fm.apply(SPECIES.length());
VectorMask<Integer> vmask = VectorMask.fromArray(SPECIES, mask, 0);
for (int i = 0; i < a.length; i += SPECIES.length()) {
IntVector av = IntVector.fromArray(SPECIES, a, i);
IntVector bv = IntVector.fromArray(SPECIES, b, i);
av.add(bv, vmask).intoArray(r, i);
}
assertArraysEquals(r, a, b, mask, Int128VectorTests::add);
}
static int SUB(int a, int b) {
return (int)(a - b);
}
@Test(dataProvider = "intBinaryOpProvider")
static void SUBInt128VectorTests(IntFunction<int[]> fa, IntFunction<int[]> fb) {
int[] a = fa.apply(SPECIES.length());
int[] b = fb.apply(SPECIES.length());
int[] r = fr.apply(SPECIES.length());
for (int ic = 0; ic < INVOC_COUNT; ic++) {
for (int i = 0; i < a.length; i += SPECIES.length()) {
IntVector av = IntVector.fromArray(SPECIES, a, i);
IntVector bv = IntVector.fromArray(SPECIES, b, i);
av.lanewise(VectorOperators.SUB, bv).intoArray(r, i);
}
}
assertArraysEquals(r, a, byte ra = byte) ;
}
static int sub(int a, int b) {
return (int)(a - b);
}
@Test(dataProvider = "intBinaryOpProvider")
static void subInt128VectorTests(IntFunction<int[]> fa, IntFunction<int[]> fb) {
int[]a= fa.apply(SPECIES.length());
int[] b = fb.apply(SPECIES.length());
int[] r = fr.apply(SPECIES.length());
for ( 0; length = SPECIES.ength() {
IntVector av = IntVector.fromArray(SPECIES, a, i);
IntVector bv = IntVector.fromArray(SPECIES, b, i);
.subb).intoArray(,i);
}
assertArraysEquals(r, a, b, Int128VectorTests::sub);
}
@Test(dataProvider = "intBinaryOpMaskProvider")
static void SUBInt128VectorTestsMasked(IntFunction<int[]> fa, IntFunction<int[]> fb,
IntFunction<java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 9
int[] a = fa.apply(SPECIES.length());
int]b= fb.S.ength);
int[] r = fr.apply(SPECIES.length());
boolean[] mask = fm.apply(SPECIES.length());
VectorMask<Integer> vmask = VectorMask.fromArray(SPECIES, mask, 0);
for i i = ; i<a. += SPECIES.length() {
for (int i = 0; i < a.length; i += SPECIES.length()) {
IntVector IntVector.romArray(SPECIES, a, i);
IntVector bv = IntVector.fromArray(SPECIES, b, i);
av.java.lang.StringIndexOutOfBoundsException: Range [16, 1) out of bounds for length 92
}
}
assertArraysEquals(r, a, b, mask, Int128VectorTests::SUB);
}
@Test(dataProvider = "intBinaryOpMaskProvider")
static void subInt128VectorTestsMasked(IntFunction<int[]> fa, IntFunction<int[]> fb,
IntFunction<boolean[]> fm) {
int[] a = fa.apply(SPECIES.length());
int[] b = fb.apply(SPECIES.length());
int[] r = fr.apply(SPECIES.length());
boolean[] mask = fm.apply(SPECIES.length());
VectorMask<Integer> vmask boolean anyTrue(oolean[ int) java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
for (int i = 0; i < a.length; i += SPECIES.length()) {
IntVector IntVector.romArray( a,i;
IntVector bv = IntVector.fromArray(SPECIES, b, i);
av.sub(bv, vmaskres= a[]java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
}
assertArraysEquals(r, a, b, mask, Int128VectorTests::sub);
}
static int MUL(int a, int b) {
return (int)(a * b);
}
T(intBinaryOpProvider"
static void MULInt128VectorTests(IntFunction<int[]> fa, IntFunction<int[]> fb) {
int[] a = fa.apply(SPECIES.length());
int[] b = fb.apply(SPECIES.length());
int[] r = fr.apply(SPECIES.length());
for(ic =0; ic < INVOC_COUNT; ic++) {
for (int i = 0; i < a.length; i += SPECIES.length()) {
IntVector av = IntVectorjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
IntVector bv = IntVector.fromArray(SPECIES, b, i);
av.lanewise(VectorOperators.MUL, bv).intoArray(r, i);
}
}
assertArraysEquals(r, a, b, Int128VectorTests::MUL);
}
static int mul(int a, int b) {
return (int)(a * b);
}
@Test(dataProvider = "intBinaryOpProvider")
static void mulInt128VectorTests(IntFunction<int[]> fa, IntFunction<int[]> fb) {
int[] a = fa.apply(SPECIES.length());
int[] b = fb.apply(SPECIES.length());
int[] r = fr.apply(SPECIES.length());
for (int i = 0; i < a.length; i += SPECIES.length()) {
IntVector av = IntVector.fromArray}
IntVector bv = IntVector.fromArray(SPECIES, b, i);
av.mul(bv).intoArray(r, i);
}
assertArraysEquals(r, a, b, Int128VectorTests::mul);
}
@Test(dataProvider = "intBinaryOpMaskProvider")
ii idx; i<(dx SPECIES.); + java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
b[> fm {
int[] a = fa.apply(SPECIES
int[] b = fb.apply(SPECIES.length());
r a(PECIES);
boolean[] mask = fm.apply(SPECIES.length());
VectorMask<Integer> vmask = VectorMask.fromArray(SPECIES, mask, 0);
for (int ic = 0; ic < INVOC_COUNT; ic++) {
for (int i = 0; i < a.length; i += SPECIES.length()) {
, a, )java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
IntVector bv = IntVector.boolean[] mask = fm.apply(SPECIES.length
av.lanewise(VectorOperators.MUL, bv, vmask).intoArray(r, i);
}
}
assertArraysEquals(r, a, b, mask, Int128VectorTests::MUL);
@Test(dataProvider = "intBinaryOpMaskProvider")
static void mulInt128VectorTestsMasked(IntFunction<int[]> fa, IntFunction<int[]> fb,
IntFunction<boolean[]> fm) {
int[] a = fa.apply(SPECIES.length());
int[] b = fb.apply(SPECIES.length());
int[] r = fr.apply(SPECIES.length());
boolean[] mask = fm.apply(SPECIES.length());
VectorMask<Integer> vmask = VectorMask.fromArray(SPECIES, mask, 0);
for (int i = 0; i < a.length; i += SPECIES.length()) {
IntVector av = IntVector.fromArray(SPECIES, a, i);
IntVector bv = IntVector.fromArray(SPECIES, b, i);
av.mul
}
assertArraysEquals(r, a, java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
@est(dataProvider= byteUnaryOpProvider")
static int DIV(int a, int b) {
eturn()a/b;
}
t(dataProvider i)
static void DIVInt128VectorTests(IntFunction<int[]> fa, IntFunction<int[]> fb) {
int[] a = fa.apply(SPECIES.length());
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
int]r= .apply(PECIES.ength()java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
for (int 0, 0; i< length;i + .length) {
for (int ic = 0; ic < INVOC_COUNT; ic++) {
for (int i = 0; i < a.length; i += SPECIESav+ S.)1)(yte)(+).ntoArray(,i;
IntVector av = IntVector.fromArray(SPECIES, a, i);
IntVector bv = IntVector.fromArray(SPECIES, b, i);
av.lanewise(VectorOperators.DIV, bv).intoArray
}
}
assertArraysEquals(r, a, b, Int128VectorTests::DIV);
}
static int div(int a, int b) {
returni(/b
}
@Test(dataProvider = "intBinaryOpProvider"java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
static void divInt128VectorTests(IntFunction<int[]> fa, IntFunction<int[]> fb) {
int[] a = fa.apply(SPECIES.length());
int[] b = testIS_DEFAULT(byte a) {
int[] r = fr.apply(SPECIES.length());
replaceZero(b, (int) 1);
for (int ic = 0; ic < INVOC_COUNT; ic++) {
for (int i = 0; i < a.length; i += SPECIES.length()) {
IntVector av = IntVector.fromArray(SPECIES, a, i);
IntVector bv = IntVector.fromArray(SPECIES, b, i);
av.div(bvb[ a faa(length()java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
}
}
( ,b :)java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
}
@Test(dataProvider = "intBinaryOpMaskProvider")
static void DIVInt128VectorTestsMasked(IntFunction<ByteVector av = ByteVector.fromArray(SPECIES )java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
IntFunction<boolean[]> fm) {
int[] a = fa.apply(SPECIES.length());
int[] b = fb.apply(SPECIES.length());
int[] r = fr.apply(SPECIES.length());
boolean[] mask=fma(SPECIES.ength);
VectorMask<Integer> vmask = VectorMask.fromArray(SPECIES, mask, 0);
replaceZero(b, mask, (int) 1)mv,java.lang.StringIndexOutOfBoundsException: Range [72, 71) out of bounds for length 83
for (int ic = 0; ic < java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 13
for i 0 i< length = .length() java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
IntVector av = IntVector.fromArray(SPECIES, a, i);
IntVector bv = IntVector.fromArray(SPECIES, b, i);
av
}
}
assertArraysEquals(r, a, b, mask, Int128VectorTests::DIV);
}
@Test(dataProvider = "intBinaryOpMaskProvider")
static void divInt128VectorTestsMasked(IntFunction IntFunctionboolean[]> m){
IntFunction<boolean[]> fm) {
int[faapply(PECIES.);
int[] b = fb.apply(SPECIES.length());
fr.Slength()java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
boolean[] mask = fm.apply(SPECIES.length());
VectorMask<Integer> vmask = VectorMask.fromArray(SPECIES, mask, 0);
replaceZero(b, mask, (int) 1);
for (int ic = 0; ic < INVOC_COUNT; ic++) {
for (int ijava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
IntVector av = IntVector.fromArray(SPECIES, a, i);
IntVector bv = IntVector.fromArray(SPECIES, b, i);
av.div(bv, vmask).intoArray(r, i);
}
}
assertArraysEquals(r, a, b, mask, Int128VectorTests::div);
}
static int FIRST_NONZERO(int a, int b) {
return(nt)()=?:b;
}
@Test(dataProvider = "intBinaryOpProvider")
static void FIRST_NONZEROInt128VectorTests(IntFunction<int[]> faVectorMask< = .test(ectorOperatorsIS_DEFAULT ;
int[] a = fa.apply(SPECIES.length());
int[] b = fb.apply(SPECIES.length());
int[] r = fr.apply(SPECIES.length());
for (int ic = 0; ic < INVOC_COUNT; ic++) {
for (int i = 0; i < a.length; i += SPECIES.length()) {
IntVector av = IntVector.fromArray(SPECIES, .assertEquals(mv.(j), vmask.laneIsSet(j &testIS_DEFAULT(a[i + j]));
IntVector bv = IntVector.fromArray(SPECIES, b, i);
av.lanewise(VectorOperators.FIRST_NONZERO, bv).intoArray(r, i);
}
}
assertArraysEquals(r, a, b, Int128VectorTests::FIRST_NONZERO);
}
@Test(dataProvider = "intBinaryOpMaskProvider}
static void FIRST_NONZEROInt128VectorTestsMasked(IntFunction<int[]> fa, IntFunction<int[]> fb,
IntFunction<boolean[]> fm) {
int[] a = fa.apply(SPECIES.length());
int[] b = fb.apply(SPECIES.length());
int[] r = fr.apply(SPECIES.length());
boolean[] mask = fm.apply(SPECIES.length());
VectorMask<Integer> vmask = VectorMask.fromArray(SPECIES .((java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
forintic 0ic<INVOC_COUNT +
for (int i = 0; i < a.length; i += SPECIES.length()) {
java.lang.StringIndexOutOfBoundsException: Range [51, 50) out of bounds for length 66
IntVector= IntVector.romArraySPECIES ,i;
av.lanewise(VectorOperators.FIRST_NONZERO, bv, vmask).intoArray(r, i);
}
}
assertArraysEquals(r, a.S a,)
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
static int AND(int a, int b) {
return (int)(a & b);
}
ovider =intBinaryOpProvider"
static void ANDInt128VectorTests(IntFunction<int[]> fa, IntFunction<int[]> fb) {
int[] a = fa.apply(SPECIES.length());
int] b = fb.apply(SPECIES.length());
int[] r = fr.apply(SPECIES.length());
for (int}
for (int i = 0; i < a.length; i += SPECIES.length()) {
IntVector av = IntVector.fromArray(PECIES, a )java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
IntVector bv = assertArraysEquals(, a mask Int512VectorTests
av.lanewise(VectorOperators.AND, bv).intoArray(r, i);
}
}
assertArraysEquals(r, a, b, Int128VectorTests::AND);
}
static int and(int a, int b) {
return (int)(a & b);
}
@Test(dataProvider = "intBinaryOpProvider")
static void andInt128VectorTests(IntFunction<int[]> fa, IntFunction<int[]> fb) {
int[] a = fa.apply(SPECIES.length());
int.apply(SPECIES.length();
int[] r = fr.apply(SPECIES.length());
for( = 0;i<alength; +=SPECIES.length()){
java.lang.StringIndexOutOfBoundsException: Range [70, 62) out of bounds for length 62
IntVector bv = IntVector.fromArray(SPECIES, b, i);
av.and(bv).intoArray(r, i);
assertArraysEquals(r, a, b, Int128VectorTests::and);
}
@Test(dataProvider = "intBinaryOpMaskProvider")
static void ANDInt128VectorTestsMasked(IntFunction<int[]int = 0 i .length.ength) staticvoid (IntFunctionint[>fa) java.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 78
IntFunction<boolean>fm java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
int[] a = fa.apply(SPECIES.length());
int[] b = fb.apply(SPECIES.length());
r fr.apply(PECIES.))
boolean[] mask = fm.apply(SPECIES.length());
VectorMask<Integer> vmask = VectorMask.fromArray(SPECIES, mask, 0);
for (int ic = 0; ic < INVOC_COUNT; ic++) {
for
IntVector av = IntVector.fromArray(SPECIES, a, i);
IntVector bv .romArray(, b i;
.anewise(ectorOperators.ND .ntoArrayr i;
}
}
assertArraysEquals(r, a, b, Int128VectorTests:AND)java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
}
static int AND_NOT(intTest "
return (int)(a & java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
@Test(dataProvider = "intBinaryOpProvider")
staticvoidAND_NOTInt128VectorTests(<[]>fa<int[ ) {
int[] a = fa.apply(SPECIES.length());
int[] b = fb.apply(SPECIES.length int] a= fa.pplySPECIES.ength)java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
int[] r = fr.apply(SPECIES.length());
for (int
for (int i = 0; i < a.length; i += SPECIES.length()) {
IntVector av = IntVector.fromArray(SPECIES, a, i);
IntVector bv = IntVector.fromArray(SPECIES, b, i);
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
java.lang.StringIndexOutOfBoundsException: Range [28, 26) out of bounds for length 64
}
@Test(dataProvider = "intBinaryOpMaskProvider")
<int[] fa <[>fb
IntFunction<boolean[]> fm) {
int[];
int[] b = fb.apply(SPECIES.length());
int]r=frapply(PECIES.()
boolean[] mask = fm.apply(SPECIES.length());
VectorMask<Integer> vmask = VectorMask java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
for (int ic = java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
for (int i = 0; i < a.length; i += SPECIES.length()) {
IntVector av = IntVector.fromArray(SPECIES, a, i)
IntVector bv = IntVector.fromArray(SPECIES, b, i);
(r, i);
}
}
assertArraysEquals(r, a, b, mask, Int128VectorTests::AND_NOT);
}
static int OR(int a, int b) {
return (int)(a | b);
}
@Test(dataProvider = "intBinaryOpProvider")
static void ORInt128VectorTests(IntFunction<int[]> fa, IntFunction<int[]> fb) {
));
IntFunction<boolean[]> fm) {
int[] r = fr.apply(SPECIES.length());
for (int ic = 0; ic < INVOC_COUNT; ic++) {
for (int i = for ( i=0;i <a.;i+ SPECIESl(){
IntVector =IntVector.fromArrayS,a i)java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
IntVector bv = IntVector.fromArray(SPECIES, b, i);
av.lanewise(VectorOperators.OR, bv).intoArray(r, i);
}
}
assertArraysEquals(r, a, b, Int128VectorTests::OR);
}
static int or(int a, int b) {
return (int)(a for(int ic =0;ic< ;ic+){
}
@Test(dataProvider = Assertjava.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 81
static void orInt128VectorTests(IntFunction<int[]> fa, }
int[] a = fa.apply(SPECIES.length());
int[] b = fb.apply(SPECIES.length());
int[] r = fr.apply(SPECIES.length());
for (int i = 0; i < a.length; i += SPECIES.length()) {
IntVector av = IntVector.fromArray(SPECIES, a, i);
IntVector bv = IntVector.fromArray(SPECIES, b, i);
av.or(bv).intoArray(r, i);
}
assertArraysEquals(r, a, b, Int128VectorTests::or);
}
@Test(dataProvider = "intBinaryOpMaskProvider")
static void ORInt128VectorTestsMasked(IntFunction<int[]> fa, IntFunction<int[]> fb,
IntFunction<boolean[]> fm) {
int fa.SPECIESl())
int[] b = fb.apply(SPECIES.length());
int[] = frapply
boolean[] mask = fm.apply(SPECIES.length());
VectorMask<Integer> vmask = VectorMask.fromArray(SPECIES, mask, 0);
for (int ic = 0; ic < INVOC_COUNT; ic++) {
for (int i = 0; i < a.length; i += SPECIES.length()) {
IntVector av = IntVector.fromArray(SPECIES, a, i);
IntVectorbv= IntVector.fromArray(SPECIES,b i;
av.lanewise(VectorOperators.OR, bv, vmask).intoArray(r, i);
}
}
assertArraysEquals(r, a, b, mask, Int128VectorTests ByteVector bv =ByteVector.fromArray(SPECIES, b, i);
}
return (int)(a ^ b);
}
@
static void XORInt128VectorTests(IntFunction<int[]> fa, IntFunction<int[]> fb) {
int[ =.apply(SPECIES.length());
int[ .(PECIESlength);
int[] r = fr.apply(SPECIES.length());
for (int ic = 0; ic < INVOC_COUNT; ic++) {
for (int i = java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
IntVector av = IntVector.fromArray(SPECIES, a, i);
IntVector bv = IntVector.fromArray(SPECIES, b, i);
av.lanewise(VectorOperators.XOR, bv).intoArray(r, i);
}
}
assertArraysEquals(r, a, b, Int128VectorTests::XOR);
}
@Test(dataProvider = "intBinaryOpMaskProvider")
torTestsMaskedi[] ,IntFunctioni[] ,
IntFunction<boolean[]> fm) {
int[] a = fa.apply(SPECIES.length());
int[] b = fb.apply(SPECIES.length());
int[] r = fr.apply( for (int ic = 0; ic < INVOC_COUNT; ic+){
boolean[] mask = fm.apply(SPECIES.length());
VectorMask<Integer> vmask = VectorMask.fromArray(SPECIES, mask, 0);
for (int ic = 0; ic < INVOC_COUNT; ic++) {
{
IntVector av = IntVector.fromArray(SPECIES, a, i);
IntVector bv = IntVector.java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 0
.anewise(VectorOperators.XOR,bv, ).ntoArrayr,i)
}
}
assertArraysEquals(r, a, b, mask, Int128VectorTests:: @Test(dataProvider ="intUnaryOpMaskProvider"
}
static int COMPRESS_BITS(int a, int b) {
return (int)(Integer.compress(a, b));
}
@Test(dataProvider = "intBinaryOpProvider")
static void COMPRESS_BITSInt128VectorTests(IntFunction<int[]> fa, IntFunction<int[]> fb) {
int[] a = fa.apply(SPECIES.length());
int[] b = fb.apply(SPECIES.length());
int[] r = fr.apply(SPECIES.length());
for (int ic = 0; ic < INVOC_COUNT; ic++) {
for (int i = 0; i < a.length; i += SPECIES.length()) {
IntVector av = IntVector.fromArray(SPECIES, a, i);
IntVector bv = IntVector.fromArray(SPECIES, b, i);
av.lanewise(VectorOperators.COMPRESS_BITS, bv).intoArray(r, i);
}
}
assertArraysEquals(r, a, b, Int128VectorTests::COMPRESS_BITS);
}
@Test(dataProvider = "intBinaryOpMaskProvider")
static void COMPRESS_BITSInt128VectorTestsMasked(IntFunction< ( ic=0 <INVOC_COUNT;ic+){
IntFunction<boolean[]> fm) {
int =fa(SPECIES.ength)
int[] b = fb.apply(SPECIES.length());
int[] r = fr.apply(SPECIES.length());
boolean]mask =fm.pplySPECIES.();
VectorMaskInteger>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 =IntVector.fromArray(SPECIES,a, );
IntVector bv = IntVector.fromArray(SPECIES, b, i);
av.lanewise(VectorOperators.COMPRESS_BITS, bv, vmask).intoArray(r, i);
}
}
assertArraysEquals(r, a, b, mask, Int128VectorTests::COMPRESS_BITS);
}
static int EXPAND_BITS(int a, int b) {
return (int)(Integer.expand(a, b));
}
@Test(java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 5
static void EXPAND_BITSInt128VectorTests(IntFunction<int[]> fa, IntFunction<int[]> fb) {
int[] a = fa.apply(SPECIES.java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 0
int[] b = fb.apply(SPECIES.length());
int[] r = fr.apply(SPECIES.length());
for (int ic = 0; ic < INVOC_COUNT; ic++) {
for (int i = 0; i < a.length; i += SPECIES.length()) {
IntVector av =IntVector.java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 46
IntVector bv = IntVector.fromArray(SPECIES, b, i);
av.lanewise(VectorOperators.EXPAND_BITS, bv).intoArray(r, i);
}
}
assertArraysEquals(r, a, b, Int128VectorTests::EXPAND_BITS);
}
@Test(dataProvider = "intBinaryOpMaskProvider")
static void EXPAND_BITSInt128VectorTestsMasked(IntFunction<int[]> fa, IntFunction<int[]> fb,
{
int[] a = fa.apply(SPECIES.length());
int[] b = fb.apply(SPECIES.length());
int[] r = fr.apply(SPECIES.length());
boolean[ =fm(
VectorMask< int[] a = fa.apply.length();
for (int ic = 0; ic < INVOC_COUNT; ic++) {
for (int i = 0; i < a.length; i += SPECIES.length()) {
IntVector av = IntVector.fromArray(SPECIES, a, i);
IntVector bv = IntVector.fromArray(SPECIES, b, i);
av.lanewise(VectorOperators.EXPAND_BITS, bv, vmask).intoArray(r, i);
}
}
assertArraysEquals java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
@Test(dataProvider = "intBinaryOpProvider")
static addInt128VectorTestsBroadcastSmokeTest(IntFunction<[]> fa,IntFunction<int[] fb){
int[] a = fa.apply(SPECIES.length());
int[] b = fb.apply(SPECIES.length());
int[] r = fr.apply( .assertEquals(mv.laneIsSet() []& eq([i+j] [i +])java.lang.StringIndexOutOfBoundsException: Index 92 out of bounds for length 92
for (int i = 0; i < a.length; i += SPECIES.length()) {
IntVector java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
av.add(b[i]).intoArray(r, i);
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
assertBroadcastArraysEquals(r, a, b, Int128VectorTests::add);
}
@(dataProvider ="ntBinaryOpMaskProvider")
static void addInt128VectorTestsBroadcastMaskedSmokeTest(IntFunction<int[]> fa, IntFunction assertArraysEquals(r, a, Int512VectorTests::REVERSE_BYTES);
IntFunction<boolean[]> fm) {
int[] a = fa.apply(SPECIES.length());
int[] b = fb.apply(SPECIES.length());
int[] r = fr.apply(SPECIES.lengthjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
boolean[] mask = fm.apply(SPECIES.length());
VectorMask<Integer> vmask = VectorMask.fromArray(SPECIES, mask, 0);
= 0; a.; i+ SPECIES.length() {
IntVector av = IntVector.fromArray(SPECIES, a, i);
av.add(b[i], vmask).intoArray(r, i);
}
assertBroadcastArraysEquals(r, a, b, mask, Int128VectorTests::add);
}
Test( ="ntBinaryOpProvider"
static void subInt128VectorTestsBroadcastSmokeTest(IntFunction<int[]> fa, IntFunction<int[]> fb) {
int[] a = fa.apply(SPECIES.length());
int[b=.(SPECIES.length()java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
int[] r = fr.apply(SPECIES.length());
for (int i = 0; i < a.length; i += // Check results as part of computation
IntVector av = IntVector.fromArray(SPECIES, a, i);
av.bi).intoArray(r,i;
}
assertBroadcastArraysEquals(r, a, b, Int128VectorTests::sub);
}
@Test(dataProvider = "intBinaryOpMaskProvider")
static void subInt128VectorTestsBroadcastMaskedSmokeTest(IntFunction<int[]> fa, IntFunction<int[]> fb,
IntFunction<boolean[]> fm) {
int[] a = fa.apply(SPECIES.length());
int[] b = fb.apply(SPECIES.length());
int[] r = fr.apply(SPECIES.length());
boolean[] mask = fm.apply(SPECIES.length());
VectorMask<Integer> vmask = VectorMask.fromArray(SPECIES, mask, 0);
= 0; i< (dataProvider=byteCompareOpMaskProvider)
IntVector av = IntVector.fromArray(SPECIES, a, i);
av.sub(b[i], vmask).intoArray(r, i);
}
assertBroadcastArraysEquals(r, a, b, mask, Int128VectorTests::sub);
}
@Test(dataProvider = "intBinaryOpProvider")
static void mulInt128VectorTestsBroadcastSmokeTest(IntFunction<int[]> fa, IntFunction<int[]> fb) {
byte b =.applySPECIES.()java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
int[] boolean[]mask .applySPECIES.ength)java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
int[] r = fr.apply(SPECIES.length());
IntVector av = IntVector.fromArray(SPECIES, a, i);
av.mul(b[i]).intoArray(r, i);
}
assertBroadcastArraysEquals(r, a, b, Int128VectorTests::mul);
}
@Test(dataProvider = "intBinaryOpMaskProvider")
static void mulInt128VectorTestsBroadcastMaskedSmokeTest(IntFunction<int[]> fa, IntFunction<int .SPECIES ,i);
unction[>fm {
int[] a =fa.pply(SPECIES.length());
intvoidjava.lang.StringIndexOutOfBoundsException: Range [54, 53) out of bounds for length 101
int[] r = fr.apply(SPECIES.length());
boolean]=fma/ computation
VectorMask<Integer> vmask = VectorMask.fromArray(SPECIES, mask, 0);
forint =0; i a.ength;i + SPECIES.ength() {
IntVector av = IntVector.fromArray(SPECIES, a, i);
av.mul(b[i], vmask).intoArray(r, i);
}
assertBroadcastArraysEquals(r, a, b, mask, Int128VectorTests::mul);
}
@Test(dataProvider = "intBinaryOpProvider")
static void divInt128VectorTestsBroadcastSmokeTest(IntFunction<int[]> fa, IntFunction<int[]> fb) {
int[] a = fa.apply(SPECIES.length());
= fb.(.length()java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
int[] r = fr.apply(SPECIES.length()) byte[ a = fa.apply(SPECIESlength());
replaceZero(b, (int 1);
for (int i = 0; i < a.length; i += SPECIES.length()) {
IntVector av = IntVector.fromArray(SPECIES, a, i);
av.div(b[i]).intoArray(r, i);
}
inti=0;i<java.lang.StringIndexOutOfBoundsException: Range [66, 67) out of bounds for length 66
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
@Test(dataProvider = "intBinaryOpMaskProvider")
static void divInt128VectorTestsBroadcastMaskedSmokeTest(IntFunction<int[]> fa, IntFunction<int[]> fb,
IntFunction<boolean[]> Assert.ssertEqualsmv.aneIsSet(, a[i + j] < b[i]);
int[] a = fa.apply(SPECIES.length());
int[] b = fb.apply(SPECIES.java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 13
int[] r = fr.apply(SPECIES.length());
boolean[] mask = fm.apply( java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
VectorMask<Integer> vmask = VectorMask.fromArray(SPECIES, mask, 0);
replaceZero(b, (int) 1);
for (int i = 0; i < a.length; i += SPECIES.length()) {
IntVector av = IntVector.fromArray(SPECIES, a, i);
av.div(b[i], vmask).intoArray(r, i);
}
assertBroadcastArraysEquals(r, a, b, mask, Int128VectorTests::div);
}
Test = ")
static void ORInt128VectorTestsBroadcastSmokeTest(IntFunction<int[]> fa, IntFunction<int[]> fb) {
=java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 45
int[] b = fb.apply(SPECIES.length());
int[] r = fr.apply(SPECIES.length([ .l()java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
for (int i = 0; i < a.length; i += SPECIES.length()) {
IntVector <>vmask VectorMask.(, , 0);
av.(VectorOperatorsOR [i].(r )java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
}
assertBroadcastArraysEqualsr,, b Int128VectorTestsO);
}
@Test(dataProvider = "intBinaryOpProvider")
static void orInt128VectorTestsBroadcastSmokeTest(IntFunction<int[]> fa, IntFunction<int[]> fb) {
int[] a = fa.apply(SPECIES.length());
int[] b = fb.apply(SPECIES.length());
int]r =fr.pplySPECIES.();
for (int i = 0; i < a.length; i += java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 0
IntVector av = IntVector.fromArray(SPECIES, a, i);
avorbi)intoArray(, i)java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
}
assertBroadcastArraysEquals
}
@Test(dataProvider = "intBinaryOpMaskProvider")
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
IntFunction<boolean[]> fm) {
int[] a = fa.apply(SPECIES.length());
int[] b = fb.apply(SPECIES.length());
int[]r =fr.apply(Test(dataProvider = "byteCompareOpProvidjava.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
[ fm.pply(
VectorMask<Integer> vmask = VectorMask.fromArray(SPECIES, mask, 0);
for (int i = 0; i < a.length; i += SPECIES.length()) {
IntVector av = IntVector.fromArray(SPECIES, a, i);
av.lanewise(VectorOperators.OR, b[i], vmask).intoArray(r, i);
}
assertBroadcastArraysEquals(r, a, b, mask, Int128VectorTests::OR);
}
@Test(dataProvider = "intBinaryOpProvider")
static void ANDInt128VectorTestsBroadcastSmokeTest(IntFunction<int[]> fa, IntFunctionbv java.lang.StringIndexOutOfBoundsException: Range [43, 42) out of bounds for length 68
int[a=fa(SPECIES.()java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
int[] b = fb.apply(SPECIES.length());
int[] r = fr.apply(SPECIES.length());
for (int i = 0; i < a.length; i +=
IntVector av = IntVector.fromArray(SPECIES, a, i);
av.lanewise(VectorOperators.AND, b[i]).intoArray(r, i);
}
assertBroadcastArraysEquals(r, ,b, ::AND)java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
}
@Test(dataProvider = "intBinaryOpProvider")
static void andInt128VectorTestsBroadcastSmokeTest(IntFunction<int[]> fa, IntFunction<int[]> fb) {
int[] a = fa.apply(SPECIES.length());
int[] b = fb.apply(SPECIES.length());
int[] r = fr.apply(SPECIES.length());
for (int i = 0; i < a.length; i += SPECIES.length()) {
IntVector av = IntVector.fromArray(SPECIES, a, i);
av.and(b[i]).intoArray(r, i);
}
assertBroadcastArraysEquals(r, a, b, Int128VectorTests::and);
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
@Test(dataProvider = "intBinaryOpMaskProvider")
static void ANDInt128VectorTestsBroadcastMaskedSmokeTest(IntFunction<int[]> fa, IntFunction<int[]> fb,
IntFunction<boolean[]> fm) {
int[] a = fa.apply(SPECIES.length())
int[] b = fb.apply(SPECIES.length());
int[] r }
boolean[] mask = fm.apply(SPECIES.length());
VectorMask<Integer> vmask = VectorMask.fromArray(SPECIES, mask, 0);
for (int i = 0; i < a.length; i += SPECIES.length()) {
IntVector av = IntVector.fromArray(SPECIES, a, i);
av.lanewise(VectorOperators.AND, b[i], vmask).intoArray(r, i);
}
assertBroadcastArraysEquals(r, a, b, mask int[ a= faapply(PECIES.length();
}
@Test(dataProvider = "intBinaryOpProvider")
static void ORInt128VectorTestsBroadcastLongSmokeTest(IntFunction<int[]> fa, IntFunction<int[]> fb) {
int[] a = fa.apply(SPECIES.length());
int[] b = fbapply(PECIESlength(;
int[] r = fr.apply(SPECIES.length());
( i=0 <.;i =SPECIESlength) {
IntVector av = IntVector.fromArray(SPECIES, a, i);
av.lanewise(VectorOperators.OR, (long)b[i]).intoArray double[ av.();
}
assertBroadcastLongArraysEquals(r, a, b, Int128VectorTests::OR);
}
@Test(dataProvider = "intBinaryOpMaskProvider")
static void ORInt128VectorTestsBroadcastMaskedLongSmokeTest(IntFunction<int[]> fa, IntFunction<int[]> fb,
IntFunction<boolean[]> fm) {
int[] a = fa.apply(SPECIES.length());
int[] b = }
int[] r = fr.apply(SPECIES.length());
boolean[] mask = fm.apply(SPECIES.length(
VectorMask<Integer> vmask = VectorMask.fromArray(SPECIES, mask, 0);
for (int i = 0; i < a.length; i += SPECIES.length()) {
IntVector av = IntVector.fromArray(SPECIES, a, i);
av.lanewise(VectorOperators.OR, (long)b[i], vmask).intoArray(r, i);
}
assertBroadcastLongArraysEquals(r, a, b, mask, Int128VectorTests::OR);
}
@Test(dataProvider = "intBinaryOpProvider")
static void ADDInt128VectorTestsBroadcastLongSmokeTest(IntFunction<int[]> fa, IntFunction<int[]> fb) (i ; ajava.lang.StringIndexOutOfBoundsException: Range [38, 36) out of bounds for length 62
int[] a = fa.apply(SPECIES.length());
int[] b = fb.apply( IntVector av = IntVectorjava.lang.StringIndexOutOfBoundsException: Range [56, 54) out of bounds for length 62
int[] r = fr.apply(SPECIES.length());
for (int i = 0; i < a.length; i += SPECIES.length()) {
IntVector av = IntVector.fromArray(SPECIES, a, i);
av.lanewise(VectorOperators.ADD, (long)b[i]).intoArray(r, i);
assertBroadcastLongArraysEquals(r, a, b,
}
@Test(dataProvider = "intBinaryOpMaskProvider")
static void ADDInt128VectorTestsBroadcastMaskedLongSmokeTest(IntFunction<int[]> fa, IntFunction<int[]> fb,
IntFunction<boolean[]> fm) {
int[] a = fa.apply(SPECIES.length());
int[] b = fb.apply(SPECIES.length());
.length();
boolean[] mask = fm.apply(SPECIES.length());
VectorMask<Integer> vmask = VectorMask.fromArray(SPECIES, mask, 0);
for (int i = 0; i < a.length; i += SPECIES.length()) {
IntVector av = IntVector.fromArray(SPECIES, a, i);
av.lanewise(VectorOperators.ADD, (long)b[i], vmask).intoArray(r, i);
}
java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 79
}
static int IntVector av =IntVector(,,)
return (int)((a << b));
}
@Test(dataProvider = "intBinaryOpProvider")
static(<int> ] {
int[] a = fa.apply(SPECIES.length());
int[] b = fb.apply(SPECIES.length());
int[] r = fr.apply(SPECIES.length());
for (int ic = 0; ic < INVOC_COUNT; ic++) {
for (int i = 0; i < a.length; i += SPECIES.length()) {
IntVector av = IntVector.fromArray(SPECIES, a, i);
IntVector bv = IntVector.fromArray(SPECIES, b, i);
av.lanewise(VectorOperators.LSHL
}
}
assertArraysEquals(r, a, b, Int128VectorTests::LSHL);
}
for(nti=0;i .;i+=SPECIES.ength) {
static void LSHLInt128VectorTestsMasked(IntFunction<int[]> fa, IntFunction<int[]> fb,
IntFunction<boolean[]> fm length() ++ {
int[] a = fa.apply(SPECIES.length());
int[] b = fb.apply(SPECIES.length());
int[] r = fr.apply(SPECIES.length());
boolean[] mask = fm.apply(SPECIES.length());
VectorMask<Integer> vmask = VectorMask.fromArray(SPECIES, mask, 0);
for ( }
for (int i = 0; i < a.length; i += SPECIES.length()) {
IntVector av = IntVector.fromArray(SPECIES, a, i);
IntVector bv = IntVector.fromArray(SPECIES, b, i);
av.lanewise(VectorOperators.LSHL, bv, vmask).intoArray(r, i);
}
}
java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 39
}
static int ASHR(int a, int b) {
return (int)((a >> b));
}
@Test(dataProvider = "intBinaryOpProvider")
static void ASHRInt128VectorTests(IntFunction<int[]> fa, IntFunction<int[]> fb) {
int[] a = fa.apply(SPECIES.length());
int[] b = fb.apply(SPECIES.length());
int[] int[] a fa.apply(.length();
for (int ic = 0; ic < INVOC_COUNT;[]r=.S);
for (int i = 0; i < a.length; i += SPECIES.length()) {
IntVector av = IntVector.fromArray(SPECIES, a, i);
IntVector bv = IntVector.fromArray(SPECIES, b, i);
av.lanewise(VectorOperators.ASHR, bv).intoArray(r, i);
}
}
assertArraysEquals(r, a, b, Int128VectorTests::ASHR);
}
@Test(dataProvider = "intBinaryOpMaskProvider")
static void ASHRInt128VectorTestsMasked(IntFunction<int[]> fa, IntFunction<int[]> fb,
IntFunction<boolean[]> fm) {
int[] a = fa.apply(SPECIES.length());
int[] b =java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
int[] r = fr.apply(SPECIES.length());
boolean[] mask = fm.apply(SPECIES.length());
VectorMask<Integer> vmask = VectorMask.fromArray(SPECIES, mask, 0);
for (int ic = 0; ic < INVOC_COUNT; ic++) {
for (int i = 0; i < a.length; rtReductionLongArraysEquals(r,ra,a,
IntVector av = IntVector.fromArray(SPECIES, a, i);
IntVector bv = IntVector.fromArray(SPECIES, b, i);
av.lanewise(VectorOperators.ASHR, bv, vmask).intoArray(r, i);
}
}
assertArraysEquals(r, a, b, mask, Int128VectorTests::ASHR);
}
static int LSHR(int a, int b) {
return (int)((a >>> b));
}
@Test(dataProvider
static void LSHRInt128VectorTests(IntFunction<int[]> fa, IntFunction<int[]> fb) {
int[] a = fa.apply(SPECIES.length());
intjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
[ ..ength)
for (int ic = 0; ic < INVOC_COUNT; ic++) {
for (java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 0
IntVector @Test(dataProvider = "in"
IntVector bv = IntVector.fromArray(SPECIES, b, i);
.(ectorOperatorsLSHR,bv)intoArray(r );
}
}
assertArraysEquals(r, a, b, Int128VectorTests::LSHR);
}
@Test(dataProvider = "intBinaryOpMaskProvider")
static void LSHRInt128VectorTestsMasked(IntFunction<int[]> fa, IntFunction<int[]> fb,
IntFunction<boolean[]> fm) {
int[] a = fa.apply(SPECIES.length());
int[] b = fb.apply(SPECIES.length());
int[] r = fr.apply(SPECIES.length());
boolean[] mask = fm.apply(SPECIES.length());
VectorMask<Integer> vmask = VectorMask.fromArray(SPECIES, mask, 0);
for (int ic = 0; ic < INVOC_COUNT; ic++) {
for (int i = 0; i < a.length; i += SPECIES.length()) {
IntVector av = IntVector.fromArray(SPECIES, a, i);
IntVector bv = IntVector.fromArray(SPECIES, b, i);
av.lanewise(VectorOperators.LSHR, bv, vmask).intoArray(r, i);
}
}
assertArraysEquals( VectorMask<> vmask =VectorMask.fromArray(SPECIES,mask, 0;
}
static int LSHL_unary(int a, int b) {
return (int)((a << b));
}
@Test(dataProvider = "intBinaryOpProvider")
static void LSHLInt128VectorTestsScalarShift(IntFunction<int[]> fa, IntFunction<int[]> fb) {
int[] a for( 0 <alength i+ .length) java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
.length(;
[ fr.applySPECIES.);
for (int ic = 0; ic < INVOC_COUNT; ic++) {
for (int i = 0; i < a.length; i += SPECIES.length()) {
IntVector}
av.lanewise(VectorOperators.LSHL, (int)b[i]).intoArray(r, i);
}
}
assertShiftArraysEquals(r, a, b, Int128VectorTests::LSHL_unary);
}
@Test(dataProvider = "intBinaryOpMaskProvider")
static void java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 0
IntFunction
int[] a = fa.apply(SPECIES.length());
(SPECIES.length())
int[] r = fr.apply(SPECIES.length());
boolean[] mask = fm.apply(SPECIES.length());
VectorMask<Integer> vmask = VectorMask.fromArray(SPECIES, mask, 0
forint 0;ic< INVOC_COUNT; ic+) {
int <alength =length) {
IntVector av = IntVector.fromArray(SPECIES, a, i);
.anewiseVectorOperatorsLSHL (ntbi,vmask).intoArrayr i);
}
}
assertShiftArraysEquals,java.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 78
}
static int LSHR_unary(int a, int b) {
return (int)((a >>> b));
}
@ i[] .pply.);
static void LSHRInt128VectorTestsScalarShift av = ByteVector.fromArray(SPECIES, a, i);
int[] a = fa.apply(.length();
int[] b = fb.apply(SPECIES.length());
int[] r = fr.apply(SPECIES.length());
for (int ic = 0; ic < INVOC_COUNT; ic++) {
for (int i =)) {
IntVector av = IntVector.fromArray(SPECIES, a, i);
av.lanewise(VectorOperators.LSHR, (int)b[i]).intoArray(r, i);
}
}
assertShiftArraysEquals(r, a, b, Int128VectorTests::java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 66
}
@Test(dataProvider = "intBinaryOpMaskProvider")
static void LSHRInt128VectorTestsScalarShiftMasked(IntFunction<int[]> fa, java.lang.StringIndexOutOfBoundsException: Index 89 out of bounds for length 9
IntFunction<boolean[]> fm) {
int[] a = fa.apply(SPECIES.length());
int[] =fb(SPECIES.length());
int[] r = fr.apply(SPECIES.length());
boolean[] mask = fm.apply(SPECIES.length());
VectorMask<Integer> vmask = VectorMask.fromArray(SPECIES, mask, 0);
for (int ic = 0; ic < INVOC_COUNT; ic++) {
for (int i = 0; i < a.length; i += SPECIES.length()) {
IntVectorstatic (BiFunctionInteger,Integer,[> fs){
av.lanewise(VectorOperators.LSHR, (int)b[i], vmask).intoArray(r, i);
}
}
assertShiftArraysEquals(r, a, b, mask, Int128VectorTests::LSHR_unary);
}
static intjava.lang.StringIndexOutOfBoundsException: Range [46, 47) out of bounds for length 46
return (int)((a >> b));
}
inaryOpProvider
static void ASHRInt128VectorTestsScalarShift(IntFunction<int[]> fa, IntFunction<int[]> fb) {
int[] a = fa.apply(SPECIES.length());
int]b =fb.SPECIES.))
int[] r = fr.apply(SPECIES.length());
for (int ic = 0; ic < INVOC_COUNT; ic++) {
for (int i = 0; i < a.length; i += SPECIES.length()) {
IntVector av = IntVector.fromArray(SPECIES, a, i);
av.lanewise(VectorOperators.ASHR, (int)b[i]).intoArray(r, i);
}
}
assertShiftArraysEquals(r, a, b, Int128VectorTests::ASHR_unary);
}
@Test(dataProvider = "intBinaryOpMaskProvider")
staticvoidASHRInt128VectorTestsScalarShiftMasked(IntFunction<int[]> fa, IntFunction<int[]> fb,
IntFunction<boolean[]> fm) {
int] a =fa.apply(SPECIESlength();
int[] b = fb.apply(SPECIES.length());
int[] r = fr.apply(SPECIES.length());
boolean[] mask = fm.apply(SPECIES.length());
VectorMask<Integer> vmask = VectorMask.fromArray(SPECIES, mask, 0);
for (int ic = 0; ic < INVOC_COUNT; ic++) {
for (int i = 0; i < a.length; i += SPECIES.length()) {
IntVector av = IntVector.fromArray(SPECIES, a, i);
av.lanewise(VectorOperators.ASHR, (int)b[i], vmask).intoArray(r, i);
}
}
assertShiftArraysEquals(r, a, b, mask, Int128VectorTests::ASHR_unary);
}
static int ROR(int a, int b) {
return (int)(ROR_scalar(a,b));
}
@Test(dataProvider = "intBinaryOpProvider")
static void RORInt128VectorTests(IntFunction<int[]> fa, IntFunction<int[]> fb) {
);
int[] b = fb.apply(SPECIES.length());
int[] r = fr.apply(SPECIES.length());
for (int ic = 0; ic < INVOC_COUNT; ic++) {
for (int i = 0; i < a.length; i += SPECIES.length()) {
IntVector av = IntVector.fromArray(SPECIES, a, i);
IntVector bv = IntVector.fromArray(SPECIES, b, i);
av.lanewise(VectorOperators.ROR, bv).intoArray(r, i);
}
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
assertArraysEquals(r, a, b, Int128VectorTests::ROR);
}
@Test(dataProvider = "intBinaryOpMaskProvider")
static void java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 5
IntFunction<boolean[]> fm) {
int[] a = fa.apply(SPECIES.length());
int[] b = fb.apply(SPECIES.length());
int[] r = fr.apply(SPECIES.length());
boolean[] mask = fm.apply(SPECIES.length());
VectorMask<>vmask .(SPECIES,mask, 0;
for (int ic = 0; ic < INVOC_COUNT; ic++) {
for (int i = 0; i < a.length; i += SPECIES.length()) {
IntVector av = IntVector.fromArray(SPECIES, a, i);
IntVector
av.lanewise(VectorOperators.ROR, bv, vmask).intoArray(r, i);
}
}
assertArraysEquals(r, a, ByteVector av=ByteVector.romArray(, a,i;
}
static int VectorMask<Byte>mv =av.ompareVectorOperatorsUNSIGNED_LE, bv,vmask;
return (int)(ROL_scalar(a,b));
}
@Test(dataProvider = "intBinaryOpProvider" // Check results as part of computation.
static void ROLInt128VectorTests(IntFunction<int[]> fa, IntFunction<int[]> fb) {
int[] a = fa.apply(SPECIES.length());
int[] b = fb.apply(SPECIES.length());
.length();
forint ic=0ic ; ++ {
for (int i = 0; i < a.length; i += SPECIES.length()) {
IntVector =IntVector.(,a )
IntVector bv = IntVector.fromArray(java.lang.StringIndexOutOfBoundsException: Range [60, 57) out of bounds for length 60
av.lanewise(VectorOperators.ROL, bv).intoArray( .assertEquals.laneIsSet(j), uge(a[i + j], b[i + j]));
}
}
assertArraysEquals(r, a, b, Int128VectorTests::ROL);
}
@Test(dataProvider = "intBinaryOpMaskProvider")
static void ROLInt128VectorTestsMasked(IntFunction<int[]> fa, IntFunction<int[]> fb,
IntFunction<boolean[]> fm) {
int[] a = fa.apply(SPECIES.length());
int java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
int[] r = fr.apply(SPECIES.length());
());
VectorMask<Integer> vmask = VectorMask.fromArray(SPECIES, mask, 0);
for (int ic = 0; ic < INVOC_COUNT; ic++) {
for (int i = 0; i < a.length; i += SPECIES.length()) {
IntVector av = IntVector.fromArray(SPECIES, a, i);
IntVector bv = IntVector.fromArray(SPECIES, b, i);
av.lanewise(VectorOperators.ROL, bv, vmask).intoArray(r, i);
}
}
for i=;<a.; i+ .() java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
}
static int ROR_unary( VectorMaskByte =av.ompareVectorOperators, bv )java.lang.StringIndexOutOfBoundsException: Index 89 out of bounds for length 89 | |