Module org.elasticsearch.simdvec
Interface ESVectorUtilSupport
public interface ESVectorUtilSupport
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final shortThe number of bits in bit-quantized query vectors -
Method Summary
Modifier and TypeMethodDescriptionvoidcalculateOSQGridPoints(float[] target, int[] quantize, int points, float[] pts) floatcalculateOSQLoss(float[] target, float lowerInterval, float upperInterval, float step, float invStep, float norm2, float lambda, int[] quantize) voidcenterAndCalculateOSQStatsDp(float[] target, float[] centroid, float[] centered, float[] stats) voidcenterAndCalculateOSQStatsEuclidean(float[] target, float[] centroid, float[] centered, float[] stats) longipByteBinByte(byte[] q, byte[] d) Compute dot product betweenqanddintipByteBit(byte[] q, byte[] d) floatipFloatBit(float[] q, byte[] d) floatipFloatByte(float[] q, byte[] d) voidpackAsBinary(int[] vector, byte[] packed) intquantizeVectorWithIntervals(float[] vector, int[] quantize, float lowInterval, float upperInterval, byte bit) floatsoarDistance(float[] v1, float[] centroid, float[] originalResidual, float soarLambda, float rnorm) voidsoarDistanceBulk(float[] v1, float[] c0, float[] c1, float[] c2, float[] c3, float[] originalResidual, float soarLambda, float rnorm, float[] distances) voidsquareDistanceBulk(float[] query, float[] v0, float[] v1, float[] v2, float[] v3, float[] distances) voidtransposeHalfByte(int[] q, byte[] quantQueryByte)
-
Field Details
-
B_QUERY
static final short B_QUERYThe number of bits in bit-quantized query vectors- See Also:
-
-
Method Details
-
ipByteBinByte
long ipByteBinByte(byte[] q, byte[] d) Compute dot product betweenqandd- Parameters:
q- query vector,B_QUERY-bit quantized and striped (seeBQSpaceUtils.transposeHalfByte)d- data vector, 1-bit quantized
-
ipByteBit
int ipByteBit(byte[] q, byte[] d) -
ipFloatBit
float ipFloatBit(float[] q, byte[] d) -
ipFloatByte
float ipFloatByte(float[] q, byte[] d) -
calculateOSQLoss
float calculateOSQLoss(float[] target, float lowerInterval, float upperInterval, float step, float invStep, float norm2, float lambda, int[] quantize) -
calculateOSQGridPoints
void calculateOSQGridPoints(float[] target, int[] quantize, int points, float[] pts) -
centerAndCalculateOSQStatsEuclidean
void centerAndCalculateOSQStatsEuclidean(float[] target, float[] centroid, float[] centered, float[] stats) -
centerAndCalculateOSQStatsDp
void centerAndCalculateOSQStatsDp(float[] target, float[] centroid, float[] centered, float[] stats) -
soarDistance
float soarDistance(float[] v1, float[] centroid, float[] originalResidual, float soarLambda, float rnorm) -
quantizeVectorWithIntervals
int quantizeVectorWithIntervals(float[] vector, int[] quantize, float lowInterval, float upperInterval, byte bit) -
squareDistanceBulk
void squareDistanceBulk(float[] query, float[] v0, float[] v1, float[] v2, float[] v3, float[] distances) -
soarDistanceBulk
void soarDistanceBulk(float[] v1, float[] c0, float[] c1, float[] c2, float[] c3, float[] originalResidual, float soarLambda, float rnorm, float[] distances) -
packAsBinary
void packAsBinary(int[] vector, byte[] packed) -
transposeHalfByte
void transposeHalfByte(int[] q, byte[] quantQueryByte)
-