mirror of
https://github.com/pgvector/pgvector.git
synced 2026-07-14 08:36:54 +08:00
Added CPU dispatching for vector cosine distance [skip ci]
This commit is contained in:
@@ -653,7 +653,7 @@ vector_negative_inner_product(PG_FUNCTION_ARGS)
|
|||||||
PG_RETURN_FLOAT8((double) -VectorInnerProduct(a->dim, a->x, b->x));
|
PG_RETURN_FLOAT8((double) -VectorInnerProduct(a->dim, a->x, b->x));
|
||||||
}
|
}
|
||||||
|
|
||||||
static double
|
VECTOR_DISPATCH static double
|
||||||
VectorCosineSimilarity(int dim, float *ax, float *bx)
|
VectorCosineSimilarity(int dim, float *ax, float *bx)
|
||||||
{
|
{
|
||||||
float similarity = 0.0;
|
float similarity = 0.0;
|
||||||
|
|||||||
Reference in New Issue
Block a user