mirror of
https://github.com/pgvector/pgvector.git
synced 2026-07-13 16:16:56 +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 *b = PG_GETARG_VECTOR_P(1);
|
||||||
Vector *result;
|
Vector *result;
|
||||||
int dim = a->dim + b->dim;
|
int dim = a->dim + b->dim;
|
||||||
int dim_a = a->dim;
|
|
||||||
int dim_b = b->dim;
|
|
||||||
|
|
||||||
CheckDim(dim);
|
CheckDim(dim);
|
||||||
result = InitVector(dim);
|
result = InitVector(dim);
|
||||||
|
|
||||||
/* Auto-vectorized */
|
/* 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];
|
result->x[i] = a->x[i];
|
||||||
|
|
||||||
/* Auto-vectorized */
|
/* Auto-vectorized */
|
||||||
for (int i = 0; i < dim_b; i++)
|
for (int i = 0, imax = b->dim, start = a->dim; i < imax; i++)
|
||||||
result->x[i + dim_a] = b->x[i];
|
result->x[i + start] = b->x[i];
|
||||||
|
|
||||||
PG_RETURN_POINTER(result);
|
PG_RETURN_POINTER(result);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user