Class Simd
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidabs(byte[] src, byte[] dst, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arraysvoidabs(float[] src, float[] dst, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arraysvoidabs(int[] src, int[] dst, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arraysvoidadd(byte[] srcA, byte[] srcB, byte[] dst, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arraysvoidadd(float[] srcA, float[] srcB, float[] dst, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arraysvoidadd(int[] srcA, int[] srcB, int[] dst, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arraysvoidadd(int[] srcA, int srcAOffset, int[] srcB, int srcBOffset, int[] dst, int dstOffset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arraysvoidaddWrapping(byte[] srcA, byte[] srcB, byte[] dst, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arraysvoidaddWrapping(byte[] src, byte value, byte[] dst, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arraysbyte[]allocaByte(int size) byte[]allocaByteFilled(int size, byte value) Special scratch-allocation API that guarantees every byte starts with the same value while retaining the same method-local constraints asallocaByte(int).byte[]allocaByteZeroed(int size) Special scratch-allocation API that guarantees a zero-initialized byte array while retaining the same method-local constraints asallocaByte(int).float[]allocaFloat(int size) float[]allocaFloatFilled(int size, float value) Special scratch-allocation API that guarantees every float starts with the same value while retaining the same method-local constraints asallocaFloat(int).float[]allocaFloatZeroed(int size) Special scratch-allocation API that guarantees a zero-initialized float array while retaining the same method-local constraints asallocaFloat(int).int[]allocaInt(int size) int[]allocaIntFilled(int size, int value) Special scratch-allocation API that guarantees every int starts with the same value while retaining the same method-local constraints asallocaInt(int).int[]allocaIntZeroed(int size) Special scratch-allocation API that guarantees a zero-initialized int array while retaining the same method-local constraints asallocaInt(int).byte[]allocByte(int size) Allocates an aligned memory block for efficient SIMD operations.float[]allocFloat(int size) Allocates an aligned memory block for efficient SIMD operations.int[]allocInt(int size) Allocates an aligned memory block for efficient SIMD operations.voidand(byte[] srcA, byte[] srcB, byte[] dst, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arraysvoidand(byte[] srcA, int srcAOffset, byte[] srcB, int srcBOffset, byte[] dst, int dstOffset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arraysvoidand(int[] srcA, int[] srcB, int[] dst, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arraysvoidand(int[] srcA, int srcAOffset, int[] srcB, int srcBOffset, int[] dst, int dstOffset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arraysvoidand(int[] src, int srcOffset, int constant, int[] dst, int dstOffset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arraysvoidblendByMaskTestNonzero(int[] src, int srcOffset, int testMask, int trueKeepMask, int trueOrValue, int[] dst, int dstOffset, int length) Fused single-pass conditional bit-blend driven by a masked-non-zero test ofsrcagainsttestMask.voidblendByMaskTestNonzeroSubstituteOnKeepEq(int[] src, int srcOffset, int testMask, int trueKeepMask, int trueOrValue, int removeMatch, int removeValue, int[] dst, int dstOffset, int length) Fused single-pass extension ofblendByMaskTestNonzerothat additionally substitutesremoveValuewhenever the post-mask result would equalremoveMatch.voidclamp(byte[] src, byte[] dst, byte minValue, byte maxValue, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arraysvoidclamp(float[] src, float[] dst, float minValue, float maxValue, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arraysvoidclamp(int[] src, int[] dst, int minValue, int maxValue, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arraysvoidcmpEq(byte[] srcA, byte[] srcB, byte[] dstMask, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arraysvoidcmpEq(byte[] src, byte value, byte[] dstMask, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arraysvoidcmpEq(int[] srcA, int[] srcB, byte[] dstMask, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arraysvoidcmpEq(int[] srcA, int srcAOffset, int[] srcB, int srcBOffset, byte[] dstMask, int dstOffset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arraysvoidcmpEq(int[] src, int srcOffset, int constant, byte[] dstMask, int dstOffset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arraysvoidcmpGt(byte[] srcA, byte[] srcB, byte[] dstMask, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arraysvoidcmpGt(int[] srcA, int[] srcB, byte[] dstMask, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arraysvoidcmpGt(int[] src, int srcOffset, int constant, byte[] dstMask, int dstOffset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arraysvoidcmpLt(byte[] srcA, byte[] srcB, byte[] dstMask, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arraysvoidcmpLt(byte[] src, byte value, byte[] dstMask, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arraysvoidcmpLt(int[] srcA, int[] srcB, byte[] dstMask, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arraysvoidcmpLt(int[] srcA, int srcAOffset, int[] srcB, int srcBOffset, byte[] dstMask, int dstOffset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arraysvoidcmpLt(int[] src, int srcOffset, int constant, byte[] dstMask, int dstOffset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arraysvoidcmpRange(byte[] src, byte minValue, byte maxValue, byte[] dstMask, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arraysfloatdot(float[] srcA, float[] srcB, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arraysintdot(int[] srcA, int[] srcB, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arraysstatic Simdget()Returns the singleton instance of the Simd class.booleanReturns true if SIMD instructions are natively supported if this returns false the APIs in this class would still work using fallback loop codevoidlookupBytes(byte[] table, byte[] indices, byte[] dst, int offset, int length) Looks up values from a table using unsigned byte indices.voidlookupBytes(byte[] table, byte[] indices, int indicesOffset, byte[] dst, int dstOffset, int length) Looks up values from a table using unsigned byte indices.voidmax(byte[] srcA, byte[] srcB, byte[] dst, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arraysvoidmax(float[] srcA, float[] srcB, float[] dst, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arraysvoidmax(int[] srcA, int[] srcB, int[] dst, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arraysvoidmin(byte[] srcA, byte[] srcB, byte[] dst, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arraysvoidmin(float[] srcA, float[] srcB, float[] dst, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arraysvoidmin(int[] srcA, int[] srcB, int[] dst, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arraysvoidmul(byte[] srcA, byte[] srcB, byte[] dst, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arraysvoidmul(float[] srcA, float[] srcB, float[] dst, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arraysvoidmul(int[] srcA, int[] srcB, int[] dst, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arraysvoidnot(byte[] src, byte[] dst, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arraysvoidnot(byte[] src, int srcOffset, byte[] dst, int dstOffset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arraysvoidnot(int[] src, int[] dst, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arraysvoidor(byte[] srcA, byte[] srcB, byte[] dst, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arraysvoidor(byte[] srcA, int srcAOffset, byte[] srcB, int srcBOffset, byte[] dst, int dstOffset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arraysvoidor(int[] srcA, int[] srcB, int[] dst, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arraysvoidor(int[] srcA, int srcAOffset, int[] srcB, int srcBOffset, int[] dst, int dstOffset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arraysvoidor(int[] src, int srcOffset, int constant, int[] dst, int dstOffset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arraysvoidpackBytesInterleaved3(byte[] src0, byte[] src1, byte[] src2, byte[] dst, int dstOffset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arraysvoidpackBytesInterleaved3(byte[] src, int src0Offset, int src1Offset, int src2Offset, byte[] dst, int dstOffset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arraysvoidpackBytesInterleaved4(byte[] src0, byte[] src1, byte[] src2, byte[] src3, byte[] dst, int dstOffset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arraysvoidpackBytesInterleaved4(byte[] src, int src0Offset, int src1Offset, int src2Offset, int src3Offset, byte[] dst, int dstOffset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arraysvoidpackIntToByteSaturating(int[] src, byte[] dst, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arraysvoidpackIntToByteTruncate(int[] src, byte[] dst, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arraysvoidpackIntToByteTruncate(int[] src, int srcOffset, byte[] dst, int dstOffset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arraysvoidpackIntToByteTruncateInterleaved4(int[] src, int src0Offset, int src1Offset, int src2Offset, int src3Offset, byte[] dst, int dstOffset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arraysvoidpermuteBytes(byte[] src, byte[] indices, byte[] dst, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arraysvoidreplaceTopByteFromUnsignedBytes(int[] rgbSrc, int rgbSrcOffset, byte[] alphaSrc, int alphaSrcOffset, int[] dst, int dstOffset, int length) Fused single-pass replacement of the top byte of every int inrgbSrcwith the corresponding unsigned byte fromalphaSrc.voidselect(byte[] mask, byte[] trueValues, byte[] falseValues, byte[] dst, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arraysvoidselect(byte[] mask, int[] trueValues, int[] falseValues, int[] dst, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arraysvoidselect(byte[] mask, int maskOffset, int[] trueValues, int trueOffset, int[] falseValues, int falseOffset, int[] dst, int dstOffset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arraysvoidselect(byte[] mask, int maskOffset, int[] trueValues, int trueOffset, int falseConstant, int[] dst, int dstOffset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arraysvoidselect(byte[] mask, int maskOffset, int trueConstant, int[] falseValues, int falseOffset, int[] dst, int dstOffset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arraysvoidselect(byte[] mask, int maskOffset, int trueConstant, int falseConstant, int[] dst, int dstOffset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arraysvoidshl(byte[] src, int bits, byte[] dst, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arraysvoidshl(byte[] src, int srcOffset, int bits, byte[] dst, int dstOffset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arraysvoidshl(int[] src, int bits, int[] dst, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arraysvoidshl(int[] src, int srcOffset, int bits, int[] dst, int dstOffset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arraysvoidshrArithmetic(int[] src, int bits, int[] dst, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arraysvoidshrLogical(byte[] src, int bits, byte[] dst, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arraysvoidshrLogical(byte[] src, int srcOffset, int bits, byte[] dst, int dstOffset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arraysvoidshrLogical(int[] src, int bits, int[] dst, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arraysvoidshrLogical(int[] src, int srcOffset, int bits, int[] dst, int dstOffset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arraysvoidsub(byte[] srcA, byte[] srcB, byte[] dst, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arraysvoidsub(float[] srcA, float[] srcB, float[] dst, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arraysvoidsub(int[] srcA, int[] srcB, int[] dst, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arraysvoidsubWrapping(byte[] srcA, byte[] srcB, byte[] dst, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arraysvoidsubWrapping(byte[] src, byte value, byte[] dst, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arraysfloatsum(float[] src, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arraysintsum(int[] src, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arraysvoidunpackBytesInterleaved3(byte[] src, int srcOffset, byte[] dst0, byte[] dst1, byte[] dst2, int length) Exposes SIMD APIs directly all arrays MUST be aligned arraysvoidunpackBytesInterleaved3(byte[] src, int srcOffset, byte[] dst, int dst0Offset, int dst1Offset, int dst2Offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arraysvoidunpackBytesInterleaved4(byte[] src, int srcOffset, byte[] dst0, byte[] dst1, byte[] dst2, byte[] dst3, int length) Exposes SIMD APIs directly all arrays MUST be aligned arraysvoidunpackBytesInterleaved4(byte[] src, int srcOffset, byte[] dst, int dst0Offset, int dst1Offset, int dst2Offset, int dst3Offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arraysintunpackLookupBytesInterleaved4(byte[] table, byte[] src, int srcOffset, byte[] dst0, byte[] dst1, byte[] dst2, byte[] dst3, int length) Unpacks interleaved bytes, looks each byte up in the provided table, stores the looked-up values into separate lane arrays, and returns the bitwise OR of all written values.intunpackLookupBytesInterleaved4(byte[] table, byte[] src, int srcOffset, byte[] dst, int dst0Offset, int dst1Offset, int dst2Offset, int dst3Offset, int length) Unpacks interleaved bytes, looks each byte up in the provided table, stores the looked-up values into virtual lane ranges in a destination array, and returns the bitwise OR of all written values.voidunpackUnsignedByteToInt(byte[] src, int[] dst, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arraysvoidunpackUnsignedByteToInt(byte[] src, int srcOffset, int[] dst, int dstOffset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arraysvoidunpackUnsignedByteToIntInterleaved3(byte[] src, int srcOffset, int[] dst, int dst0Offset, int dst1Offset, int dst2Offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arraysprotected final voidvalidateBinaryByte(byte[] srcA, byte[] srcB, byte[] dst, int offset, int length) This API is used internally to verify valid array arguments in the simulator notice that no validation occurs on the devices.protected final voidvalidateBinaryFloat(float[] srcA, float[] srcB, float[] dst, int offset, int length) This API is used internally to verify valid array arguments in the simulator notice that no validation occurs on the devices.protected final voidvalidateBinaryInt(int[] srcA, int[] srcB, int[] dst, int offset, int length) This API is used internally to verify valid array arguments in the simulator notice that no validation occurs on the devices.protected final voidvalidateByteToInt(byte[] src, int[] dst, int offset, int length) This API is used internally to verify valid array arguments in the simulator notice that no validation occurs on the devices.protected final voidvalidateDotFloat(float[] srcA, float[] srcB, int offset, int length) This API is used internally to verify valid array arguments in the simulator notice that no validation occurs on the devices.protected final voidvalidateDotInt(int[] srcA, int[] srcB, int offset, int length) This API is used internally to verify valid array arguments in the simulator notice that no validation occurs on the devices.protected final voidvalidateIntToByte(int[] src, byte[] dst, int offset, int length) This API is used internally to verify valid array arguments in the simulator notice that no validation occurs on the devices.protected final voidvalidateMaskBinaryByte(byte[] srcA, byte[] srcB, byte[] dstMask, int offset, int length) This API is used internally to verify valid array arguments in the simulator notice that no validation occurs on the devices.protected final voidvalidateMaskBinaryInt(int[] srcA, int[] srcB, byte[] dstMask, int offset, int length) This API is used internally to verify valid array arguments in the simulator notice that no validation occurs on the devices.protected final voidvalidateNotNull(Object o, String name) This API is used internally to verify valid array arguments in the simulator notice that no validation occurs on the devices.protected final voidvalidatePermuteByte(byte[] src, byte[] indices, byte[] dst, int offset, int length) This API is used internally to verify valid array arguments in the simulator notice that no validation occurs on the devices.protected final voidvalidateRange(int arrayLength, int offset, int length, String name) This API is used internally to verify valid array arguments in the simulator notice that no validation occurs on the devices.protected final voidvalidateRangeMaskByte(byte[] src, byte[] dstMask, int offset, int length) This API is used internally to verify valid array arguments in the simulator notice that no validation occurs on the devices.protected final voidvalidateReductionFloat(float[] src, int offset, int length) This API is used internally to verify valid array arguments in the simulator notice that no validation occurs on the devices.protected final voidvalidateReductionInt(int[] src, int offset, int length) This API is used internally to verify valid array arguments in the simulator notice that no validation occurs on the devices.protected final voidvalidateSelectByte(byte[] mask, byte[] trueValues, byte[] falseValues, byte[] dst, int offset, int length) This API is used internally to verify valid array arguments in the simulator notice that no validation occurs on the devices.protected final voidvalidateSelectInt(byte[] mask, int[] trueValues, int[] falseValues, int[] dst, int offset, int length) This API is used internally to verify valid array arguments in the simulator notice that no validation occurs on the devices.protected final voidvalidateUnaryByte(byte[] src, byte[] dst, int offset, int length) This API is used internally to verify valid array arguments in the simulator notice that no validation occurs on the devices.protected final voidvalidateUnaryFloat(float[] src, float[] dst, int offset, int length) This API is used internally to verify valid array arguments in the simulator notice that no validation occurs on the devices.protected final voidvalidateUnaryInt(int[] src, int[] dst, int offset, int length) This API is used internally to verify valid array arguments in the simulator notice that no validation occurs on the devices.voidxor(byte[] srcA, byte[] srcB, byte[] dst, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arraysvoidxor(int[] srcA, int[] srcB, int[] dst, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arraysvoidxor(int[] src, int srcOffset, int constant, int[] dst, int dstOffset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arrays
-
Constructor Details
-
Simd
public Simd()
-
-
Method Details
-
get
Returns the singleton instance of the Simd class. Equivalent toCN.getSimd(); -
isSupported
public boolean isSupported()Returns true if SIMD instructions are natively supported if this returns false the APIs in this class would still work using fallback loop code -
allocByte
public byte[] allocByte(int size) Allocates an aligned memory block for efficient SIMD operations. All operations MUST be performed on aligned arrays and shouldn't use arrays created withnew. Operations on unaligned arrays might produce undefined results. -
allocInt
public int[] allocInt(int size) Allocates an aligned memory block for efficient SIMD operations. All operations MUST be performed on aligned arrays and shouldn't use arrays created withnew. Operations on unaligned arrays might produce undefined results. -
allocFloat
public float[] allocFloat(int size) Allocates an aligned memory block for efficient SIMD operations. All operations MUST be performed on aligned arrays and shouldn't use arrays created withnew. Operations on unaligned arrays might produce undefined results. -
allocaByte
public byte[] allocaByte(int size) -
allocaInt
public int[] allocaInt(int size) -
allocaFloat
public float[] allocaFloat(int size) -
allocaByteZeroed
public byte[] allocaByteZeroed(int size) Special scratch-allocation API that guarantees a zero-initialized byte array while retaining the same method-local constraints asallocaByte(int). -
allocaIntZeroed
public int[] allocaIntZeroed(int size) Special scratch-allocation API that guarantees a zero-initialized int array while retaining the same method-local constraints asallocaInt(int). -
allocaFloatZeroed
public float[] allocaFloatZeroed(int size) Special scratch-allocation API that guarantees a zero-initialized float array while retaining the same method-local constraints asallocaFloat(int). -
allocaByteFilled
public byte[] allocaByteFilled(int size, byte value) Special scratch-allocation API that guarantees every byte starts with the same value while retaining the same method-local constraints asallocaByte(int). -
allocaIntFilled
public int[] allocaIntFilled(int size, int value) Special scratch-allocation API that guarantees every int starts with the same value while retaining the same method-local constraints asallocaInt(int). -
allocaFloatFilled
public float[] allocaFloatFilled(int size, float value) Special scratch-allocation API that guarantees every float starts with the same value while retaining the same method-local constraints asallocaFloat(int). -
lookupBytes
public void lookupBytes(byte[] table, byte[] indices, byte[] dst, int offset, int length) Looks up values from a table using unsigned byte indices. -
lookupBytes
public void lookupBytes(byte[] table, byte[] indices, int indicesOffset, byte[] dst, int dstOffset, int length) Looks up values from a table using unsigned byte indices. -
and
public void and(byte[] srcA, int srcAOffset, byte[] srcB, int srcBOffset, byte[] dst, int dstOffset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arrays -
or
public void or(byte[] srcA, int srcAOffset, byte[] srcB, int srcBOffset, byte[] dst, int dstOffset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arrays -
shl
public void shl(byte[] src, int srcOffset, int bits, byte[] dst, int dstOffset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arrays -
shrLogical
public void shrLogical(byte[] src, int srcOffset, int bits, byte[] dst, int dstOffset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arrays -
unpackBytesInterleaved3
public void unpackBytesInterleaved3(byte[] src, int srcOffset, byte[] dst, int dst0Offset, int dst1Offset, int dst2Offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arrays -
add
public void add(byte[] srcA, byte[] srcB, byte[] dst, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arrays -
sub
public void sub(byte[] srcA, byte[] srcB, byte[] dst, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arrays -
mul
public void mul(byte[] srcA, byte[] srcB, byte[] dst, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arrays -
min
public void min(byte[] srcA, byte[] srcB, byte[] dst, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arrays -
max
public void max(byte[] srcA, byte[] srcB, byte[] dst, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arrays -
abs
public void abs(byte[] src, byte[] dst, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arrays -
clamp
public void clamp(byte[] src, byte[] dst, byte minValue, byte maxValue, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arrays -
and
public void and(byte[] srcA, byte[] srcB, byte[] dst, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arrays -
or
public void or(byte[] srcA, byte[] srcB, byte[] dst, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arrays -
xor
public void xor(byte[] srcA, byte[] srcB, byte[] dst, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arrays -
not
public void not(byte[] src, byte[] dst, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arrays -
cmpEq
public void cmpEq(byte[] srcA, byte[] srcB, byte[] dstMask, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arrays -
cmpEq
public void cmpEq(byte[] src, byte value, byte[] dstMask, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arrays -
cmpLt
public void cmpLt(byte[] srcA, byte[] srcB, byte[] dstMask, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arrays -
cmpLt
public void cmpLt(byte[] src, byte value, byte[] dstMask, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arrays -
cmpGt
public void cmpGt(byte[] srcA, byte[] srcB, byte[] dstMask, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arrays -
cmpRange
public void cmpRange(byte[] src, byte minValue, byte maxValue, byte[] dstMask, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arrays -
select
public void select(byte[] mask, byte[] trueValues, byte[] falseValues, byte[] dst, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arrays -
shl
public void shl(byte[] src, int bits, byte[] dst, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arrays -
shrLogical
public void shrLogical(byte[] src, int bits, byte[] dst, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arrays -
addWrapping
public void addWrapping(byte[] srcA, byte[] srcB, byte[] dst, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arrays -
addWrapping
public void addWrapping(byte[] src, byte value, byte[] dst, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arrays -
subWrapping
public void subWrapping(byte[] srcA, byte[] srcB, byte[] dst, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arrays -
subWrapping
public void subWrapping(byte[] src, byte value, byte[] dst, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arrays -
unpackUnsignedByteToInt
public void unpackUnsignedByteToInt(byte[] src, int[] dst, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arrays -
unpackUnsignedByteToInt
public void unpackUnsignedByteToInt(byte[] src, int srcOffset, int[] dst, int dstOffset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arrays -
unpackUnsignedByteToIntInterleaved3
public void unpackUnsignedByteToIntInterleaved3(byte[] src, int srcOffset, int[] dst, int dst0Offset, int dst1Offset, int dst2Offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arrays -
unpackBytesInterleaved3
public void unpackBytesInterleaved3(byte[] src, int srcOffset, byte[] dst0, byte[] dst1, byte[] dst2, int length) Exposes SIMD APIs directly all arrays MUST be aligned arrays -
unpackBytesInterleaved4
public void unpackBytesInterleaved4(byte[] src, int srcOffset, byte[] dst0, byte[] dst1, byte[] dst2, byte[] dst3, int length) Exposes SIMD APIs directly all arrays MUST be aligned arrays -
unpackBytesInterleaved4
public void unpackBytesInterleaved4(byte[] src, int srcOffset, byte[] dst, int dst0Offset, int dst1Offset, int dst2Offset, int dst3Offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arrays -
unpackLookupBytesInterleaved4
public int unpackLookupBytesInterleaved4(byte[] table, byte[] src, int srcOffset, byte[] dst0, byte[] dst1, byte[] dst2, byte[] dst3, int length) Unpacks interleaved bytes, looks each byte up in the provided table, stores the looked-up values into separate lane arrays, and returns the bitwise OR of all written values. -
unpackLookupBytesInterleaved4
public int unpackLookupBytesInterleaved4(byte[] table, byte[] src, int srcOffset, byte[] dst, int dst0Offset, int dst1Offset, int dst2Offset, int dst3Offset, int length) Unpacks interleaved bytes, looks each byte up in the provided table, stores the looked-up values into virtual lane ranges in a destination array, and returns the bitwise OR of all written values. -
packIntToByteSaturating
public void packIntToByteSaturating(int[] src, byte[] dst, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arrays -
packIntToByteTruncate
public void packIntToByteTruncate(int[] src, byte[] dst, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arrays -
packIntToByteTruncate
public void packIntToByteTruncate(int[] src, int srcOffset, byte[] dst, int dstOffset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arrays -
packIntToByteTruncateInterleaved4
public void packIntToByteTruncateInterleaved4(int[] src, int src0Offset, int src1Offset, int src2Offset, int src3Offset, byte[] dst, int dstOffset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arrays -
packBytesInterleaved3
public void packBytesInterleaved3(byte[] src0, byte[] src1, byte[] src2, byte[] dst, int dstOffset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arrays -
packBytesInterleaved3
public void packBytesInterleaved3(byte[] src, int src0Offset, int src1Offset, int src2Offset, byte[] dst, int dstOffset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arrays -
packBytesInterleaved4
public void packBytesInterleaved4(byte[] src0, byte[] src1, byte[] src2, byte[] src3, byte[] dst, int dstOffset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arrays -
packBytesInterleaved4
public void packBytesInterleaved4(byte[] src, int src0Offset, int src1Offset, int src2Offset, int src3Offset, byte[] dst, int dstOffset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arrays -
permuteBytes
public void permuteBytes(byte[] src, byte[] indices, byte[] dst, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arrays -
add
public void add(int[] srcA, int[] srcB, int[] dst, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arrays -
add
public void add(int[] srcA, int srcAOffset, int[] srcB, int srcBOffset, int[] dst, int dstOffset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arrays -
sub
public void sub(int[] srcA, int[] srcB, int[] dst, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arrays -
mul
public void mul(int[] srcA, int[] srcB, int[] dst, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arrays -
min
public void min(int[] srcA, int[] srcB, int[] dst, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arrays -
max
public void max(int[] srcA, int[] srcB, int[] dst, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arrays -
abs
public void abs(int[] src, int[] dst, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arrays -
clamp
public void clamp(int[] src, int[] dst, int minValue, int maxValue, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arrays -
and
public void and(int[] srcA, int[] srcB, int[] dst, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arrays -
and
public void and(int[] srcA, int srcAOffset, int[] srcB, int srcBOffset, int[] dst, int dstOffset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arrays -
or
public void or(int[] srcA, int[] srcB, int[] dst, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arrays -
or
public void or(int[] srcA, int srcAOffset, int[] srcB, int srcBOffset, int[] dst, int dstOffset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arrays -
xor
public void xor(int[] srcA, int[] srcB, int[] dst, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arrays -
not
public void not(int[] src, int[] dst, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arrays -
shl
public void shl(int[] src, int bits, int[] dst, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arrays -
shl
public void shl(int[] src, int srcOffset, int bits, int[] dst, int dstOffset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arrays -
shrLogical
public void shrLogical(int[] src, int bits, int[] dst, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arrays -
shrLogical
public void shrLogical(int[] src, int srcOffset, int bits, int[] dst, int dstOffset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arrays -
shrArithmetic
public void shrArithmetic(int[] src, int bits, int[] dst, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arrays -
cmpEq
public void cmpEq(int[] srcA, int[] srcB, byte[] dstMask, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arrays -
cmpEq
public void cmpEq(int[] srcA, int srcAOffset, int[] srcB, int srcBOffset, byte[] dstMask, int dstOffset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arrays -
cmpLt
public void cmpLt(int[] srcA, int[] srcB, byte[] dstMask, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arrays -
cmpLt
public void cmpLt(int[] srcA, int srcAOffset, int[] srcB, int srcBOffset, byte[] dstMask, int dstOffset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arrays -
cmpGt
public void cmpGt(int[] srcA, int[] srcB, byte[] dstMask, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arrays -
select
public void select(byte[] mask, int[] trueValues, int[] falseValues, int[] dst, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arrays -
select
public void select(byte[] mask, int maskOffset, int[] trueValues, int trueOffset, int[] falseValues, int falseOffset, int[] dst, int dstOffset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arrays -
sum
public int sum(int[] src, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arrays -
dot
public int dot(int[] srcA, int[] srcB, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arrays -
add
public void add(float[] srcA, float[] srcB, float[] dst, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arrays -
sub
public void sub(float[] srcA, float[] srcB, float[] dst, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arrays -
mul
public void mul(float[] srcA, float[] srcB, float[] dst, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arrays -
min
public void min(float[] srcA, float[] srcB, float[] dst, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arrays -
max
public void max(float[] srcA, float[] srcB, float[] dst, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arrays -
abs
public void abs(float[] src, float[] dst, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arrays -
clamp
public void clamp(float[] src, float[] dst, float minValue, float maxValue, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arrays -
sum
public float sum(float[] src, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arrays -
dot
public float dot(float[] srcA, float[] srcB, int offset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arrays -
and
public void and(int[] src, int srcOffset, int constant, int[] dst, int dstOffset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arrays -
or
public void or(int[] src, int srcOffset, int constant, int[] dst, int dstOffset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arrays -
xor
public void xor(int[] src, int srcOffset, int constant, int[] dst, int dstOffset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arrays -
cmpEq
public void cmpEq(int[] src, int srcOffset, int constant, byte[] dstMask, int dstOffset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arrays -
cmpLt
public void cmpLt(int[] src, int srcOffset, int constant, byte[] dstMask, int dstOffset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arrays -
cmpGt
public void cmpGt(int[] src, int srcOffset, int constant, byte[] dstMask, int dstOffset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arrays -
not
public void not(byte[] src, int srcOffset, byte[] dst, int dstOffset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arrays -
select
public void select(byte[] mask, int maskOffset, int trueConstant, int falseConstant, int[] dst, int dstOffset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arrays -
select
public void select(byte[] mask, int maskOffset, int[] trueValues, int trueOffset, int falseConstant, int[] dst, int dstOffset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arrays -
select
public void select(byte[] mask, int maskOffset, int trueConstant, int[] falseValues, int falseOffset, int[] dst, int dstOffset, int length) Exposes SIMD APIs directly all arrays MUST be aligned arrays -
blendByMaskTestNonzero
public void blendByMaskTestNonzero(int[] src, int srcOffset, int testMask, int trueKeepMask, int trueOrValue, int[] dst, int dstOffset, int length) Fused single-pass conditional bit-blend driven by a masked-non-zero test of
srcagainsttestMask. For every element:dst[i] = (src[i] & testMask) != 0 ? (src[i] & trueKeepMask) | trueOrValue : src[i]This collapses a "test-then-modify-or-keep-source" pattern that would otherwise require three or more separate primitive calls (and three or more passes over
src) into a single pass. It maps directly to one NEON / SSE vector loop on platforms that ship a vectorized implementation. All arrays MUST be aligned/registered arrays. -
blendByMaskTestNonzeroSubstituteOnKeepEq
public void blendByMaskTestNonzeroSubstituteOnKeepEq(int[] src, int srcOffset, int testMask, int trueKeepMask, int trueOrValue, int removeMatch, int removeValue, int[] dst, int dstOffset, int length) Fused single-pass extension of
blendByMaskTestNonzerothat additionally substitutesremoveValuewhenever the post-mask result would equalremoveMatch. For every element:v = src[i] if ((v & testMask) == 0) dst[i] = v else if ((v & trueKeepMask) == removeMatch) dst[i] = removeValue else dst[i] = (v & trueKeepMask) | trueOrValueThis collapses a
blendByMaskTestNonzero+cmpEq+selectchain (three passes over the buffer plus two scratch allocations) into a single vector pass. It maps to one NEON / SSE loop on platforms that ship a vectorized implementation. All arrays MUST be aligned / registered arrays. -
replaceTopByteFromUnsignedBytes
public void replaceTopByteFromUnsignedBytes(int[] rgbSrc, int rgbSrcOffset, byte[] alphaSrc, int alphaSrcOffset, int[] dst, int dstOffset, int length) Fused single-pass replacement of the top byte of every int in
rgbSrcwith the corresponding unsigned byte fromalphaSrc. For every element:dst[i] = (rgbSrc[i] & 0x00ffffff) | ((alphaSrc[i] & 0xff) << 24)Designed for the
Image.applyMaskhot path, which previously required four separate primitive calls (unpackUnsignedByteToInt,shl,and,or) and two scratch allocations. Maps to a single NEON / SSE vector loop (vmovl_u8=>vshlq_n_u32(24)=>vorrq(vandq, ...)) on platforms that ship a vectorized implementation. All arrays MUST be aligned / registered arrays. -
validateBinaryByte
protected final void validateBinaryByte(byte[] srcA, byte[] srcB, byte[] dst, int offset, int length) This API is used internally to verify valid array arguments in the simulator notice that no validation occurs on the devices. -
validateMaskBinaryByte
protected final void validateMaskBinaryByte(byte[] srcA, byte[] srcB, byte[] dstMask, int offset, int length) This API is used internally to verify valid array arguments in the simulator notice that no validation occurs on the devices. -
validateRangeMaskByte
protected final void validateRangeMaskByte(byte[] src, byte[] dstMask, int offset, int length) This API is used internally to verify valid array arguments in the simulator notice that no validation occurs on the devices. -
validateSelectByte
protected final void validateSelectByte(byte[] mask, byte[] trueValues, byte[] falseValues, byte[] dst, int offset, int length) This API is used internally to verify valid array arguments in the simulator notice that no validation occurs on the devices. -
validateByteToInt
protected final void validateByteToInt(byte[] src, int[] dst, int offset, int length) This API is used internally to verify valid array arguments in the simulator notice that no validation occurs on the devices. -
validateIntToByte
protected final void validateIntToByte(int[] src, byte[] dst, int offset, int length) This API is used internally to verify valid array arguments in the simulator notice that no validation occurs on the devices. -
validatePermuteByte
protected final void validatePermuteByte(byte[] src, byte[] indices, byte[] dst, int offset, int length) This API is used internally to verify valid array arguments in the simulator notice that no validation occurs on the devices. -
validateUnaryByte
protected final void validateUnaryByte(byte[] src, byte[] dst, int offset, int length) This API is used internally to verify valid array arguments in the simulator notice that no validation occurs on the devices. -
validateBinaryInt
protected final void validateBinaryInt(int[] srcA, int[] srcB, int[] dst, int offset, int length) This API is used internally to verify valid array arguments in the simulator notice that no validation occurs on the devices. -
validateUnaryInt
protected final void validateUnaryInt(int[] src, int[] dst, int offset, int length) This API is used internally to verify valid array arguments in the simulator notice that no validation occurs on the devices. -
validateMaskBinaryInt
protected final void validateMaskBinaryInt(int[] srcA, int[] srcB, byte[] dstMask, int offset, int length) This API is used internally to verify valid array arguments in the simulator notice that no validation occurs on the devices. -
validateSelectInt
protected final void validateSelectInt(byte[] mask, int[] trueValues, int[] falseValues, int[] dst, int offset, int length) This API is used internally to verify valid array arguments in the simulator notice that no validation occurs on the devices. -
validateReductionInt
protected final void validateReductionInt(int[] src, int offset, int length) This API is used internally to verify valid array arguments in the simulator notice that no validation occurs on the devices. -
validateDotInt
protected final void validateDotInt(int[] srcA, int[] srcB, int offset, int length) This API is used internally to verify valid array arguments in the simulator notice that no validation occurs on the devices. -
validateBinaryFloat
protected final void validateBinaryFloat(float[] srcA, float[] srcB, float[] dst, int offset, int length) This API is used internally to verify valid array arguments in the simulator notice that no validation occurs on the devices. -
validateUnaryFloat
protected final void validateUnaryFloat(float[] src, float[] dst, int offset, int length) This API is used internally to verify valid array arguments in the simulator notice that no validation occurs on the devices. -
validateReductionFloat
protected final void validateReductionFloat(float[] src, int offset, int length) This API is used internally to verify valid array arguments in the simulator notice that no validation occurs on the devices. -
validateDotFloat
protected final void validateDotFloat(float[] srcA, float[] srcB, int offset, int length) This API is used internally to verify valid array arguments in the simulator notice that no validation occurs on the devices. -
validateNotNull
-
validateRange
This API is used internally to verify valid array arguments in the simulator notice that no validation occurs on the devices.
-