MHNSW_param: compilation on windows
This commit is contained in:
parent
2d3428e953
commit
12757f8605
@ -368,7 +368,7 @@ struct FVector
|
|||||||
return subdist;
|
return subdist;
|
||||||
dp+= dot_product(dims+subdist_part, other->dims+subdist_part,
|
dp+= dot_product(dims+subdist_part, other->dims+subdist_part,
|
||||||
vec_len - subdist_part);
|
vec_len - subdist_part);
|
||||||
double dist= abs2 + other->abs2 - k * dp;
|
float dist= abs2 + other->abs2 - k * dp;
|
||||||
stats->subdist.add(subdist/dist);
|
stats->subdist.add(subdist/dist);
|
||||||
return dist;
|
return dist;
|
||||||
}
|
}
|
||||||
@ -1550,14 +1550,13 @@ int mhnsw_read_first(TABLE *table, KEY *keyinfo, Item *dist, ulonglong limit)
|
|||||||
((float*)buf.ptr())[i]= i == 0;
|
((float*)buf.ptr())[i]= i == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
const longlong max_layer= candidates.links[0]->max_layer;
|
|
||||||
auto target= FVector::create(ctx, thd->alloc(FVector::alloc_size(ctx->vec_len)),
|
auto target= FVector::create(ctx, thd->alloc(FVector::alloc_size(ctx->vec_len)),
|
||||||
res->ptr());
|
res->ptr());
|
||||||
|
|
||||||
if (int err= graph->file->ha_rnd_init(0))
|
if (int err= graph->file->ha_rnd_init(0))
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
MHNSW_param p(ctx, graph, max_layer);
|
MHNSW_param p(ctx, graph, candidates.links[0]->max_layer);
|
||||||
|
|
||||||
for (; p.layer > 0; p.layer--)
|
for (; p.layer > 0; p.layer--)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user