Skip to content

Commit 656980c

Browse files
tboinovski1pdhinaka
authored andcommitted
hexagon: clang format
1 parent 466e27e commit 656980c

1 file changed

Lines changed: 7 additions & 9 deletions

File tree

ggml/src/ggml-hexagon/htp/unary-ops.c

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -297,10 +297,8 @@ static void tri_f32(const float * restrict src,
297297
const uint32_t abs_row = ir + b;
298298
const uint32_t i01 = abs_row % ne01;
299299

300-
const HVX_Vector * restrict v_src =
301-
(const HVX_Vector *)((const uint8_t *)src + b * row_size);
302-
HVX_Vector * restrict v_dst =
303-
( HVX_Vector *)(( uint8_t *)dst + b * row_size);
300+
const HVX_Vector * restrict v_src = (const HVX_Vector *) ((const uint8_t *) src + b * row_size);
301+
HVX_Vector * restrict v_dst = (HVX_Vector *) ((uint8_t *) dst + b * row_size);
304302

305303
uint32_t boundary;
306304
int keep_left;
@@ -324,7 +322,7 @@ static void tri_f32(const float * restrict src,
324322
v_dst[i] = zero;
325323
} else {
326324
HVX_VectorPred mask = Q6_Q_vsetq_R((boundary - vec_start) * sizeof(float));
327-
v_dst[i] = Q6_V_vmux_QVV(mask, v_src[i], zero);
325+
v_dst[i] = Q6_V_vmux_QVV(mask, v_src[i], zero);
328326
}
329327
} else {
330328
if (vec_end <= boundary) {
@@ -333,7 +331,7 @@ static void tri_f32(const float * restrict src,
333331
v_dst[i] = v_src[i];
334332
} else {
335333
HVX_VectorPred mask = Q6_Q_vsetq_R((boundary - vec_start) * sizeof(float));
336-
v_dst[i] = Q6_V_vmux_QVV(mask, zero, v_src[i]);
334+
v_dst[i] = Q6_V_vmux_QVV(mask, zero, v_src[i]);
337335
}
338336
}
339337
}
@@ -342,15 +340,15 @@ static void tri_f32(const float * restrict src,
342340
if (nloe > 0) {
343341
const uint32_t vec_start = nvec * VLEN_FP32;
344342
const uint32_t vec_end = vec_start + nloe;
345-
HVX_Vector tail_val;
343+
HVX_Vector tail_val;
346344
if (keep_left) {
347345
if (vec_end <= boundary) {
348346
tail_val = v_src[nvec];
349347
} else if (vec_start >= boundary) {
350348
tail_val = zero;
351349
} else {
352350
HVX_VectorPred mask = Q6_Q_vsetq_R((boundary - vec_start) * sizeof(float));
353-
tail_val = Q6_V_vmux_QVV(mask, v_src[nvec], zero);
351+
tail_val = Q6_V_vmux_QVV(mask, v_src[nvec], zero);
354352
}
355353
} else {
356354
if (vec_end <= boundary) {
@@ -359,7 +357,7 @@ static void tri_f32(const float * restrict src,
359357
tail_val = v_src[nvec];
360358
} else {
361359
HVX_VectorPred mask = Q6_Q_vsetq_R((boundary - vec_start) * sizeof(float));
362-
tail_val = Q6_V_vmux_QVV(mask, zero, v_src[nvec]);
360+
tail_val = Q6_V_vmux_QVV(mask, zero, v_src[nvec]);
363361
}
364362
}
365363
hvx_vec_store_a(&v_dst[nvec], nloe * sizeof(float), tail_val);

0 commit comments

Comments
 (0)