-
Notifications
You must be signed in to change notification settings - Fork 1.5k
GH-3475: Fix parquet-vector compatiblity with Java > 17 #3476
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,7 @@ | ||
| *.class | ||
| .project | ||
| .classpath | ||
| .factorypath | ||
| .settings | ||
| target | ||
| # Package Files # | ||
|
|
@@ -20,4 +21,3 @@ target/ | |
| mvn_install.log | ||
| .vscode/* | ||
| .DS_Store | ||
|
|
||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's keep this blank line |
||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -177,7 +177,7 @@ public final void unpackValuesUsingVector(final byte[] in, final int inPos, fina | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public final void unpackValuesUsingVector( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| final ByteBuffer in, final int inPos, final int[] out, final int outPos) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ByteVector byteVector = ByteVector.fromByteBuffer(BYTE_SPECIES_64, in, inPos, in.order()); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ByteVector byteVector = fromByteBuffer(BYTE_SPECIES_64, in, inPos); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ShortVector tempRes = byteVector | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| .castShape(SHORT_SPECIES_512, 0) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| .reinterpretAsBytes() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -260,7 +260,7 @@ public final void unpackValuesUsingVector(final byte[] in, final int inPos, fina | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public final void unpackValuesUsingVector( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| final ByteBuffer in, final int inPos, final int[] out, final int outPos) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ByteVector byteVector = ByteVector.fromByteBuffer(BYTE_SPECIES, in, inPos, in.order()); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ByteVector byteVector = fromByteBuffer(BYTE_SPECIES, in, inPos); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ShortVector tempRes = byteVector | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| .castShape(LONG_SPECIES, 0) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| .reinterpretAsBytes() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -377,9 +377,8 @@ public final void unpackValuesUsingVector(final byte[] in, final int inPos, fina | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public final void unpackValuesUsingVector( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| final ByteBuffer in, final int inPos, final int[] out, final int outPos) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ByteVector byteVector = ByteVector.fromByteBuffer(B128, in, inPos, in.order()) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| .castShape(S512, 0) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| .reinterpretAsBytes(); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ByteVector byteVector = | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| fromByteBuffer(B128, in, inPos, inp_mask).castShape(S512, 0).reinterpretAsBytes(); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ShortVector tempRes1 = byteVector | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| .rearrange(perm_mask0) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| .reinterpretAsShorts() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -466,7 +465,7 @@ public final void unpackValuesUsingVector(final byte[] in, final int inPos, fina | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public final void unpackValuesUsingVector( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| final ByteBuffer in, final int inPos, final int[] out, final int outPos) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ByteVector byteVector = ByteVector.fromByteBuffer(BSPECIES, in, inPos, in.order()); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ByteVector byteVector = fromByteBuffer(BSPECIES, in, inPos); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ShortVector tempRes = byteVector | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| .castShape(ISPECIES, 0) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| .reinterpretAsBytes() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -582,9 +581,8 @@ public final void unpackValuesUsingVector(final byte[] in, final int inPos, fina | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public final void unpackValuesUsingVector( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| final ByteBuffer in, final int inPos, final int[] out, final int outPos) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ByteVector byteVector = ByteVector.fromByteBuffer(B256, in, inPos, in.order(), inp_mask) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| .castShape(S512, 0) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| .reinterpretAsBytes(); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ByteVector byteVector = | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| fromByteBuffer(B256, in, inPos, inp_mask).castShape(S512, 0).reinterpretAsBytes(); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ShortVector tempRes1 = byteVector | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| .rearrange(perm_mask0) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -705,9 +703,8 @@ public final void unpackValuesUsingVector(final byte[] in, final int inPos, fina | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public final void unpackValuesUsingVector( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| final ByteBuffer in, final int inPos, final int[] out, final int outPos) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ByteVector byteVector = ByteVector.fromByteBuffer(B256, in, inPos, in.order(), inp_mask) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| .castShape(S512, 0) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| .reinterpretAsBytes(); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ByteVector byteVector = | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| fromByteBuffer(B256, in, inPos, inp_mask).castShape(S512, 0).reinterpretAsBytes(); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ShortVector tempRes1 = byteVector | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| .rearrange(perm_mask0) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -827,9 +824,8 @@ public final void unpackValuesUsingVector(final byte[] in, final int inPos, fina | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public final void unpackValuesUsingVector( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| final ByteBuffer in, final int inPos, final int[] out, final int outPos) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ByteVector byteVector = ByteVector.fromByteBuffer(B256, in, inPos, in.order(), inp_mask) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| .castShape(S512, 0) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| .reinterpretAsBytes(); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ByteVector byteVector = | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| fromByteBuffer(B256, in, inPos, inp_mask).castShape(S512, 0).reinterpretAsBytes(); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ShortVector tempRes1 = byteVector | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| .rearrange(perm_mask0) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| .reinterpretAsShorts() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -914,7 +910,7 @@ public final void unpackValuesUsingVector(final byte[] in, final int inPos, fina | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public final void unpackValuesUsingVector( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| final ByteBuffer in, final int inPos, final int[] out, final int outPos) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ByteVector byteVector = ByteVector.fromByteBuffer(B512, in, inPos, in.order()); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ByteVector byteVector = fromByteBuffer(B512, in, inPos); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| byteVector | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| .castShape(ISPECIES, 0) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| .lanewise(VectorOperators.AND, 255) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -1004,7 +1000,7 @@ public final void unpackValuesUsingVector(final byte[] in, final int inPos, fina | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public final void unpackValuesUsingVector( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| final ByteBuffer in, final int inPos, final int[] out, final int outPos) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ByteVector byteVector = ByteVector.fromByteBuffer(B512, in, inPos, in.order(), inp_mask); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ByteVector byteVector = fromByteBuffer(B512, in, inPos, inp_mask); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ShortVector tempRes1 = byteVector | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| .rearrange(perm_mask0) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| .reinterpretAsShorts() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -1084,7 +1080,7 @@ public final void unpackValuesUsingVector(final byte[] in, final int inPos, fina | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public final void unpackValuesUsingVector( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| final ByteBuffer in, final int inPos, final int[] out, final int outPos) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ByteVector byteVector = ByteVector.fromByteBuffer(B512, in, inPos, in.order()); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ByteVector byteVector = fromByteBuffer(B512, in, inPos); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ShortVector tempRes1 = byteVector | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| .rearrange(perm_mask0) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| .reinterpretAsShorts() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -1194,7 +1190,7 @@ public final void unpackValuesUsingVector(final byte[] in, final int inPos, fina | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public final void unpackValuesUsingVector( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| final ByteBuffer in, final int inPos, final int[] out, final int outPos) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ByteVector byteVector = ByteVector.fromByteBuffer(B512, in, inPos, in.order(), inp_mask); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ByteVector byteVector = fromByteBuffer(B512, in, inPos, inp_mask); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ShortVector tempRes1 = byteVector | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| .rearrange(perm_mask0) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| .reinterpretAsShorts() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -1280,7 +1276,7 @@ public final void unpackValuesUsingVector(final byte[] in, final int inPos, fina | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public final void unpackValuesUsingVector( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| final ByteBuffer in, final int inPos, final int[] out, final int outPos) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ByteVector byteVector = ByteVector.fromByteBuffer(B512, in, inPos, in.order()); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ByteVector byteVector = fromByteBuffer(B512, in, inPos); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ShortVector tempRes1 = byteVector | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| .rearrange(perm_mask0) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| .reinterpretAsShorts() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -1388,7 +1384,7 @@ public final void unpackValuesUsingVector(final byte[] in, final int inPos, fina | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public final void unpackValuesUsingVector( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| final ByteBuffer in, final int inPos, final int[] out, final int outPos) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ByteVector byteVector = ByteVector.fromByteBuffer(B512, in, inPos, in.order(), inp_mask); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ByteVector byteVector = fromByteBuffer(B512, in, inPos, inp_mask); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ShortVector tempRes1 = byteVector | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| .rearrange(perm_mask0) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| .reinterpretAsShorts() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -1512,7 +1508,7 @@ public final void unpackValuesUsingVector(final byte[] in, final int inPos, fina | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public final void unpackValuesUsingVector( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| final ByteBuffer in, final int inPos, final int[] out, final int outPos) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ByteVector byteVector = ByteVector.fromByteBuffer(B512, in, inPos, in.order(), inp_mask); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ByteVector byteVector = fromByteBuffer(B512, in, inPos, inp_mask); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ShortVector tempRes1 = byteVector | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| .rearrange(perm_mask0) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| .reinterpretAsShorts() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -1630,7 +1626,7 @@ public final void unpackValuesUsingVector(final byte[] in, final int inPos, fina | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public final void unpackValuesUsingVector( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| final ByteBuffer in, final int inPos, final int[] out, final int outPos) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ByteVector byteVector = ByteVector.fromByteBuffer(B512, in, inPos, in.order(), inp_mask); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ByteVector byteVector = fromByteBuffer(B512, in, inPos, inp_mask); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ShortVector tempRes1 = byteVector | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| .rearrange(perm_mask0) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| .reinterpretAsShorts() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -1703,7 +1699,7 @@ public final void unpackValuesUsingVector(final byte[] in, final int inPos, fina | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public final void unpackValuesUsingVector( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| final ByteBuffer in, final int inPos, final int[] out, final int outPos) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ByteVector byteVector = ByteVector.fromByteBuffer(B512, in, inPos, in.order(), inp_mask); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ByteVector byteVector = fromByteBuffer(B512, in, inPos, inp_mask); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ShortVector shortVector = byteVector.reinterpretAsShorts(); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| shortVector | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| .castShape(I512, 0) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -1783,7 +1779,7 @@ public final void unpackValuesUsingVector(final byte[] in, final int inPos, fina | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public final void unpackValuesUsingVector( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| final ByteBuffer in, final int inPos, final int[] out, final int outPos) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ByteVector byteVector = ByteVector.fromByteBuffer(B512, in, inPos, in.order(), inp_mask); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ByteVector byteVector = fromByteBuffer(B512, in, inPos, inp_mask); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| IntVector tempRes1 = byteVector | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| .rearrange(perm_mask0) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| .reinterpretAsInts() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -1866,7 +1862,7 @@ public final void unpackValuesUsingVector(final byte[] in, final int inPos, fina | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public final void unpackValuesUsingVector( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| final ByteBuffer in, final int inPos, final int[] out, final int outPos) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ByteVector byteVector = ByteVector.fromByteBuffer(B512, in, inPos, in.order(), inp_mask); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ByteVector byteVector = fromByteBuffer(B512, in, inPos, inp_mask); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| IntVector tempRes1 = byteVector | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| .rearrange(perm_mask0) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| .reinterpretAsInts() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -1944,7 +1940,7 @@ public final void unpackValuesUsingVector(final byte[] in, final int inPos, fina | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public final void unpackValuesUsingVector( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| final ByteBuffer in, final int inPos, final int[] out, final int outPos) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ByteVector byteVector = ByteVector.fromByteBuffer(B512, in, inPos, in.order(), inp_mask); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ByteVector byteVector = fromByteBuffer(B512, in, inPos, inp_mask); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| IntVector tempRes1 = byteVector | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| .rearrange(perm_mask0) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| .reinterpretAsInts() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -2022,7 +2018,7 @@ public final void unpackValuesUsingVector(final byte[] in, final int inPos, fina | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public final void unpackValuesUsingVector( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| final ByteBuffer in, final int inPos, final int[] out, final int outPos) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ByteVector byteVector = ByteVector.fromByteBuffer(B512, in, inPos, in.order(), inp_mask); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ByteVector byteVector = fromByteBuffer(B512, in, inPos, inp_mask); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| IntVector tempRes1 = byteVector | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| .rearrange(perm_mask0) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| .reinterpretAsInts() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -2102,7 +2098,7 @@ public final void unpackValuesUsingVector(final byte[] in, final int inPos, fina | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public final void unpackValuesUsingVector( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| final ByteBuffer in, final int inPos, final int[] out, final int outPos) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ByteVector byteVector = ByteVector.fromByteBuffer(B512, in, inPos, in.order(), inp_mask); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ByteVector byteVector = fromByteBuffer(B512, in, inPos, inp_mask); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| IntVector tempRes1 = byteVector | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| .rearrange(perm_mask0) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| .reinterpretAsInts() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -2182,7 +2178,7 @@ public final void unpackValuesUsingVector(final byte[] in, final int inPos, fina | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public final void unpackValuesUsingVector( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| final ByteBuffer in, final int inPos, final int[] out, final int outPos) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ByteVector byteVector = ByteVector.fromByteBuffer(B512, in, inPos, in.order(), inp_mask); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ByteVector byteVector = fromByteBuffer(B512, in, inPos, inp_mask); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| IntVector tempRes1 = byteVector | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| .rearrange(perm_mask0) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| .reinterpretAsInts() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -2261,7 +2257,7 @@ public final void unpackValuesUsingVector(final byte[] in, final int inPos, fina | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public final void unpackValuesUsingVector( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| final ByteBuffer in, final int inPos, final int[] out, final int outPos) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ByteVector byteVector = ByteVector.fromByteBuffer(B512, in, inPos, in.order(), inp_mask); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ByteVector byteVector = fromByteBuffer(B512, in, inPos, inp_mask); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| IntVector tempRes1 = byteVector | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| .rearrange(perm_mask0) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| .reinterpretAsInts() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -2332,7 +2328,7 @@ public final void unpackValuesUsingVector(final byte[] in, final int inPos, fina | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public final void unpackValuesUsingVector( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| final ByteBuffer in, final int inPos, final int[] out, final int outPos) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ByteVector byteVector = ByteVector.fromByteBuffer(B512, in, inPos, in.order(), inp_mask); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ByteVector byteVector = fromByteBuffer(B512, in, inPos, inp_mask); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| IntVector tempRes1 = | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| byteVector.rearrange(perm_mask0).reinterpretAsInts().lanewise(VectorOperators.AND, 16777215); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| tempRes1.intoArray(out, outPos, out_mask); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -2407,7 +2403,7 @@ public final void unpackValuesUsingVector(final byte[] in, final int inPos, fina | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public final void unpackValuesUsingVector( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| final ByteBuffer in, final int inPos, final int[] out, final int outPos) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ByteVector byteVector = ByteVector.fromByteBuffer(B512, in, inPos, in.order(), inp_mask); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ByteVector byteVector = fromByteBuffer(B512, in, inPos, inp_mask); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| IntVector tempRes1 = byteVector | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| .rearrange(perm_mask0) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| .reinterpretAsInts() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -2486,7 +2482,7 @@ public final void unpackValuesUsingVector(final byte[] in, final int inPos, fina | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public final void unpackValuesUsingVector( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| final ByteBuffer in, final int inPos, final int[] out, final int outPos) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ByteVector byteVector = ByteVector.fromByteBuffer(B512, in, inPos, in.order(), inp_mask); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ByteVector byteVector = fromByteBuffer(B512, in, inPos, inp_mask); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| IntVector tempRes1 = byteVector | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| .rearrange(perm_mask0) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| .reinterpretAsInts() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -2603,7 +2599,7 @@ public final void unpackValuesUsingVector(final byte[] in, final int inPos, fina | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public final void unpackValuesUsingVector( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| final ByteBuffer in, final int inPos, final int[] out, final int outPos) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ByteVector byteVector = ByteVector.fromByteBuffer(B512, in, inPos, in.order(), inp_mask); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ByteVector byteVector = fromByteBuffer(B512, in, inPos, inp_mask); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| IntVector tempRes1 = byteVector | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| .rearrange(perm_mask0) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| .reinterpretAsInts() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -2718,7 +2714,7 @@ public final void unpackValuesUsingVector(final byte[] in, final int inPos, fina | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public final void unpackValuesUsingVector( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| final ByteBuffer in, final int inPos, final int[] out, final int outPos) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ByteVector byteVector = ByteVector.fromByteBuffer(B512, in, inPos, in.order(), inp_mask); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ByteVector byteVector = fromByteBuffer(B512, in, inPos, inp_mask); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| IntVector tempRes1 = byteVector | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| .rearrange(perm_mask0) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| .reinterpretAsInts() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -2832,7 +2828,7 @@ public final void unpackValuesUsingVector(final byte[] in, final int inPos, fina | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public final void unpackValuesUsingVector( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| final ByteBuffer in, final int inPos, final int[] out, final int outPos) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ByteVector byteVector = ByteVector.fromByteBuffer(B512, in, inPos, in.order(), inp_mask); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ByteVector byteVector = fromByteBuffer(B512, in, inPos, inp_mask); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| IntVector tempRes1 = byteVector | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| .rearrange(perm_mask0) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| .reinterpretAsInts() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -2960,7 +2956,7 @@ public final void unpackValuesUsingVector(final byte[] in, final int inPos, fina | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public final void unpackValuesUsingVector( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| final ByteBuffer in, final int inPos, final int[] out, final int outPos) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ByteVector byteVector = ByteVector.fromByteBuffer(B512, in, inPos, in.order(), inp_mask); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ByteVector byteVector = fromByteBuffer(B512, in, inPos, inp_mask); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| IntVector tempRes1 = byteVector | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| .rearrange(perm_mask0) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| .reinterpretAsInts() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -3089,7 +3085,7 @@ public final void unpackValuesUsingVector(final byte[] in, final int inPos, fina | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public final void unpackValuesUsingVector( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| final ByteBuffer in, final int inPos, final int[] out, final int outPos) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ByteVector byteVector = ByteVector.fromByteBuffer(B512, in, inPos, in.order(), inp_mask); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ByteVector byteVector = fromByteBuffer(B512, in, inPos, inp_mask); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| IntVector tempRes1 = byteVector | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| .rearrange(perm_mask0) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| .reinterpretAsInts() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -3175,13 +3171,30 @@ public final void unpackValuesUsingVector(final byte[] in, final int inPos, fina | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public final void unpackValuesUsingVector( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| final ByteBuffer in, final int inPos, final int[] out, final int outPos) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ByteVector byteVector = ByteVector.fromByteBuffer(B512, in, inPos, in.order(), inp_mask); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ByteVector byteVector = fromByteBuffer(B512, in, inPos, inp_mask); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| IntVector tempRes1 = byteVector.rearrange(perm_mask0).reinterpretAsInts(); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| tempRes1.intoArray(out, outPos, out_mask); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| private static ByteVector fromByteBuffer(VectorSpecies<Byte> species, ByteBuffer input, int inPos) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| return ByteVector.fromArray(species, readInputBytes(input, inPos, species.length()), 0); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| private static ByteVector fromByteBuffer( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| VectorSpecies<Byte> species, ByteBuffer input, int inPos, VectorMask<Byte> mask) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not an expert on this, but Codex complains as below: The new fromByteBuffer(species, input, inPos, mask) helper changes the contract of the old JDK 17 masked load. Per the JDK 17 ByteVector.fromByteBuffer(..., m) docs, only masked-on lanes must be in bounds, but this fallback always copies species.length() bytes for direct buffers before applying the mask. That breaks packers whose mask intentionally covers fewer bytes than the vector width, such as Packer3 (B128 with a 12-byte mask): a direct ByteBuffer with exactly the required packed bytes now throws BufferUnderflowException, even though the old implementation and the array-backed path both accept it. The fix needs to preserve masked-load bounds semantics instead of unconditionally reading the whole vector window. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| return ByteVector.fromArray(species, readInputBytes(input, inPos, mask.trueCount()), 0, mask); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+3203
to
+3214
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| private static byte[] readInputBytes(ByteBuffer input, int inPos, int byteCount) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| byte[] bytes = new byte[byteCount]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ByteBuffer source = input.duplicate(); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| source.position(inPos); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| source.get(bytes); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+3189
to
+3220
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| private static ByteVector fromByteBuffer(VectorSpecies<Byte> species, ByteBuffer input, int inPos) { | |
| return ByteVector.fromArray(species, readInputBytes(input, inPos, species.length()), 0); | |
| } | |
| private static ByteVector fromByteBuffer( | |
| VectorSpecies<Byte> species, ByteBuffer input, int inPos, VectorMask<Byte> mask) { | |
| return ByteVector.fromArray(species, readInputBytes(input, inPos, mask.trueCount()), 0, mask); | |
| } | |
| private static byte[] readInputBytes(ByteBuffer input, int inPos, int byteCount) { | |
| byte[] bytes = new byte[byteCount]; | |
| ByteBuffer source = input.duplicate(); | |
| source.position(inPos); | |
| source.get(bytes); | |
| private static final ThreadLocal<byte[]> INPUT_SCRATCH = | |
| ThreadLocal.withInitial(() -> new byte[B512.length()]); | |
| private static ByteVector fromByteBuffer(VectorSpecies<Byte> species, ByteBuffer input, int inPos) { | |
| if (input.hasArray()) { | |
| return ByteVector.fromArray(species, input.array(), input.arrayOffset() + inPos); | |
| } | |
| return ByteVector.fromArray(species, readInputBytes(input, inPos, species.length()), 0); | |
| } | |
| private static ByteVector fromByteBuffer( | |
| VectorSpecies<Byte> species, ByteBuffer input, int inPos, VectorMask<Byte> mask) { | |
| if (input.hasArray()) { | |
| return ByteVector.fromArray(species, input.array(), input.arrayOffset() + inPos, mask); | |
| } | |
| return ByteVector.fromArray(species, readInputBytes(input, inPos, mask.trueCount()), 0, mask); | |
| } | |
| private static byte[] readInputBytes(ByteBuffer input, int inPos, int byteCount) { | |
| byte[] bytes = INPUT_SCRATCH.get(); | |
| for (int i = 0; i < byteCount; i++) { | |
| bytes[i] = input.get(inPos + i); | |
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed on the regression concern, and the heap-buffer fast path is in dffb6e6 — input.hasArray() returns ByteVector.fromArray(species, input.array(), input.arrayOffset() + inPos[, mask]) directly, which HotSpot intrinsifies to the same vmovdqu64 AVX-512 load as the original fromByteBuffer. Since BytePacker call sites in parquet-mr use ByteBuffer.wrap(byte[]) (heap), this fast path covers the dominant production case with no copy and no duplicate().
I'd like to push back on the ThreadLocal<byte[]> part:
- It only eliminates the
byte[]allocation, not theByteBuffer.duplicate(), which is the larger of the two costs on the direct-buffer path. To eliminate both you'd need a thread-localByteBufferview as well, at which point the helper is doing more bookkeeping than the load itself. - The
byte[]is 8–64 bytes, TLAB-allocated, never escapes the helper, and is a strong escape-analysis candidate — HotSpot will frequently scalar-replace it on hot paths.ThreadLocal.get()(~5 ns) never scalarizes, so on the common JIT-hot case theThreadLocalis a net loss. ThreadLocalof a mutablebyte[]carries the usual operational risks in long-lived JVMs (thread-pool retention, classloader leak surface) for code that is explicitly throwaway: dffb6e6 adds a TODO markingByteVector.fromMemorySegment(JEP 454, JDK 22+) as the proper replacement, which removes the copy entirely for both heap and direct buffers viaScopedMemoryAccessand is intrinsifiable. Once the project's minimum JDK reaches 22, both helpers andreadInputBytesgo away.
So the change keeps the direct-buffer path as a simple byte[] + duplicate() fallback (matching the previous PR's behavior on that path), adds the heap fast path you suggested for the dominant case, and defers further optimization to the fromMemorySegment migration tracked in the TODO.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to use similar pattern like
SPOTLESS_ARGSbelow?