Module org.elasticsearch.simdvec
Class Native22ESVectorUtilSupport
java.lang.Object
org.elasticsearch.simdvec.internal.vectorization.PanamaESVectorUtilSupport
org.elasticsearch.simdvec.internal.vectorization.Native22ESVectorUtilSupport
- All Implemented Interfaces:
ESVectorUtilSupport
-
Field Summary
Fields inherited from interface org.elasticsearch.simdvec.internal.vectorization.ESVectorUtilSupport
B_QUERY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfloatcosine(byte[] a, byte[] b) Calculates the cosine of the given byte arrays.floatdotProduct(byte[] a, byte[] b) Calculates the dot product of the given byte arrays.floatdotProduct(byte[] a, byte[] b, int offset, int length) Calculates the dot product over[offset, offset + length).floatdotProduct(float[] a, float[] b) Calculates the dot product of the given float arrays.floatdotProduct(float[] a, float[] b, int offset, int length) Calculates the dot product over[offset, offset + length).floatmaxSimDotProduct(MultiBFloat16VectorsSource source, float[][] query, float[] scoresScratch) floatmaxSimDotProduct(MultiByteVectorsSource source, byte[][] query, float[] scoresScratch) floatmaxSimDotProduct(MultiFloatVectorsSource source, float[][] query, float[] scoresScratch) floatsquareDistance(byte[] a, byte[] b) Returns the sum of squared differences of the two vectors.floatsquareDistance(byte[] a, byte[] b, int offset, int length) Returns the sum of squared differences of the two byte vectors over a sub-range.floatsquareDistance(float[] a, float[] b) Returns the sum of squared differences of the two vectors.floatsquareDistance(float[] a, float[] b, int offset, int length) Returns the sum of squared differences over[offset, offset + length).Methods inherited from class org.elasticsearch.simdvec.internal.vectorization.PanamaESVectorUtilSupport
bFloat16ToFloat, calculateOSQGridPoints, calculateOSQLoss, centerAndCalculateOSQStatsDp, centerAndCalculateOSQStatsDp, centerAndCalculateOSQStatsEuclidean, centerAndCalculateOSQStatsEuclidean, codePointCount, contains, cosineBulk, dotProductBulk, dotProductBulk, floatToBFloat16, indexOf, inRangeBitmask, ipByteBinByte, ipByteBit, ipFloatBit, ipFloatByte, l2Normalize, l2Normalize, linearCombination, linearCombination, linearCombination, linearCombination, logSumExpNQT, logSumExpNQTDiff, packAsBinary, packDibit, packDibitQuad, pow2DiffAndScaleNQT, quantizeVectorWithIntervals, soarDistance, soarDistance, soarDistanceBulk, soarDistanceBulk, squareDistanceBulk, squareDistanceBulk, transposeHalfByte
-
Constructor Details
-
Native22ESVectorUtilSupport
public Native22ESVectorUtilSupport()
-
-
Method Details
-
dotProduct
public float dotProduct(float[] a, float[] b) Description copied from interface:ESVectorUtilSupportCalculates the dot product of the given float arrays.- Specified by:
dotProductin interfaceESVectorUtilSupport- Overrides:
dotProductin classPanamaESVectorUtilSupport
-
dotProduct
public float dotProduct(float[] a, float[] b, int offset, int length) Description copied from interface:ESVectorUtilSupportCalculates the dot product over[offset, offset + length).- Specified by:
dotProductin interfaceESVectorUtilSupport- Overrides:
dotProductin classPanamaESVectorUtilSupport
-
squareDistance
public float squareDistance(float[] a, float[] b) Description copied from interface:ESVectorUtilSupportReturns the sum of squared differences of the two vectors.- Specified by:
squareDistancein interfaceESVectorUtilSupport- Overrides:
squareDistancein classPanamaESVectorUtilSupport
-
squareDistance
public float squareDistance(float[] a, float[] b, int offset, int length) Description copied from interface:ESVectorUtilSupportReturns the sum of squared differences over[offset, offset + length).- Specified by:
squareDistancein interfaceESVectorUtilSupport- Overrides:
squareDistancein classPanamaESVectorUtilSupport
-
cosine
public float cosine(byte[] a, byte[] b) Description copied from interface:ESVectorUtilSupportCalculates the cosine of the given byte arrays.- Specified by:
cosinein interfaceESVectorUtilSupport- Overrides:
cosinein classPanamaESVectorUtilSupport
-
dotProduct
public float dotProduct(byte[] a, byte[] b) Description copied from interface:ESVectorUtilSupportCalculates the dot product of the given byte arrays.- Specified by:
dotProductin interfaceESVectorUtilSupport- Overrides:
dotProductin classPanamaESVectorUtilSupport
-
dotProduct
public float dotProduct(byte[] a, byte[] b, int offset, int length) Description copied from interface:ESVectorUtilSupportCalculates the dot product over[offset, offset + length).- Specified by:
dotProductin interfaceESVectorUtilSupport- Overrides:
dotProductin classPanamaESVectorUtilSupport
-
squareDistance
public float squareDistance(byte[] a, byte[] b) Description copied from interface:ESVectorUtilSupportReturns the sum of squared differences of the two vectors.- Specified by:
squareDistancein interfaceESVectorUtilSupport- Overrides:
squareDistancein classPanamaESVectorUtilSupport
-
squareDistance
public float squareDistance(byte[] a, byte[] b, int offset, int length) Description copied from interface:ESVectorUtilSupportReturns the sum of squared differences of the two byte vectors over a sub-range.- Specified by:
squareDistancein interfaceESVectorUtilSupport- Overrides:
squareDistancein classPanamaESVectorUtilSupport
-
maxSimDotProduct
public float maxSimDotProduct(MultiFloatVectorsSource source, float[][] query, float[] scoresScratch) - Specified by:
maxSimDotProductin interfaceESVectorUtilSupport- Overrides:
maxSimDotProductin classPanamaESVectorUtilSupport
-
maxSimDotProduct
public float maxSimDotProduct(MultiBFloat16VectorsSource source, float[][] query, float[] scoresScratch) - Specified by:
maxSimDotProductin interfaceESVectorUtilSupport- Overrides:
maxSimDotProductin classPanamaESVectorUtilSupport
-
maxSimDotProduct
- Specified by:
maxSimDotProductin interfaceESVectorUtilSupport- Overrides:
maxSimDotProductin classPanamaESVectorUtilSupport
-