Skip to content

Commit 3961ca9

Browse files
FeiGeChuanShuactions-user
authored andcommitted
apply code-format changes
1 parent 7462ddb commit 3961ca9

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

source/device/cpu/op/interp/cortex-a/interp_kernel_arm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@ int interp_run(struct tensor* output_tensor, struct tensor* input_tensor, struct
516516
float* alpha = (float*)(buf + out_w + out_h); // new float[ow * 2];
517517
float* beta = (float*)(buf + out_w + out_h + out_w * 2); // new float[oh * 2];
518518

519-
int align_corner = interp_param->resize_type == 2? 0 : 1;
519+
int align_corner = interp_param->resize_type == 2 ? 0 : 1;
520520
linear_coeffs(in_w, out_w, xofs, alpha, align_corner);
521521
linear_coeffs(in_h, out_h, yofs, beta, align_corner);
522522

source/device/cpu/op/interp/interp_ref.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ static void linear_coeffs(int w, int outw, int* xofs, float* alpha, int align_co
5353
{
5454
fx = (float)(dx * scale);
5555
}
56-
56+
5757
int sx = floor(fx);
5858
fx -= sx;
5959

@@ -230,7 +230,7 @@ int ref_interp_fp32(struct tensor* input_tensor, struct tensor* output_tensor, s
230230
float* alpha = (float*)(buf + param->output_width + param->output_height); //new float[ow * 2];
231231
float* beta = (float*)(buf + param->output_width + param->output_height + param->output_width * 2); //new float[oh * 2];
232232

233-
int align_corner = param->resize_type == 2? 0 : 1;
233+
int align_corner = param->resize_type == 2 ? 0 : 1;
234234
linear_coeffs(in_w, out_w, xofs, alpha, align_corner);
235235
linear_coeffs(in_h, out_h, yofs, beta, align_corner);
236236

@@ -325,7 +325,7 @@ int ref_interp_int8(struct tensor* input_tensor, struct tensor* output_tensor, s
325325
float* alpha = (float*)(buf + param->output_width + param->output_height); //new float[ow * 2];
326326
float* beta = (float*)(buf + param->output_width + param->output_height + param->output_width * 2); //new float[oh * 2];
327327

328-
int align_corner = param->resize_type == 2? 0 : 1;
328+
int align_corner = param->resize_type == 2 ? 0 : 1;
329329
linear_coeffs(in_w, out_w, xofs, alpha, align_corner);
330330
linear_coeffs(in_h, out_h, yofs, beta, align_corner);
331331

@@ -434,7 +434,7 @@ int ref_interp_uint8(struct tensor* input_tensor, struct tensor* output_tensor,
434434
float* alpha = (float*)(buf + param->output_width + param->output_height); //new float[ow * 2];
435435
float* beta = (float*)(buf + param->output_width + param->output_height + param->output_width * 2); //new float[oh * 2];
436436

437-
int align_corner = param->resize_type == 2? 0 : 1;
437+
int align_corner = param->resize_type == 2 ? 0 : 1;
438438
linear_coeffs(in_w, out_w, xofs, alpha, align_corner);
439439
linear_coeffs(in_h, out_h, yofs, beta, align_corner);
440440

tools/convert_tool/onnx/onnx2tengine.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2209,7 +2209,7 @@ int load_resize(ir_graph_t* graph, ir_node_t* node, const onnx::NodeProto& onnx_
22092209
}
22102210
else if (mode == "bilinear" || mode == "linear")
22112211
{
2212-
interp_param->resize_type = align_corner == 0? 2 : 4;
2212+
interp_param->resize_type = align_corner == 0 ? 2 : 4;
22132213
}
22142214

22152215
return 0;

0 commit comments

Comments
 (0)