mirror of
https://github.com/pgvector/pgvector.git
synced 2026-06-06 05:51:21 +08:00
Use consistent style [skip ci]
This commit is contained in:
@@ -916,19 +916,17 @@ vector_concat(PG_FUNCTION_ARGS)
|
||||
Vector *b = PG_GETARG_VECTOR_P(1);
|
||||
Vector *result;
|
||||
int dim = a->dim + b->dim;
|
||||
int dim_a = a->dim;
|
||||
int dim_b = b->dim;
|
||||
|
||||
CheckDim(dim);
|
||||
result = InitVector(dim);
|
||||
|
||||
/* Auto-vectorized */
|
||||
for (int i = 0; i < dim_a; i++)
|
||||
for (int i = 0, imax = a->dim; i < imax; i++)
|
||||
result->x[i] = a->x[i];
|
||||
|
||||
/* Auto-vectorized */
|
||||
for (int i = 0; i < dim_b; i++)
|
||||
result->x[i + dim_a] = b->x[i];
|
||||
for (int i = 0, imax = b->dim, start = a->dim; i < imax; i++)
|
||||
result->x[i + start] = b->x[i];
|
||||
|
||||
PG_RETURN_POINTER(result);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user