提交 213d628d 编写于 作者: C chenjiaoAngel

fix format. test=develop

上级 6a6301f3
......@@ -1558,8 +1558,11 @@ inline void compute_all_padding_pre(float* dout,
}
// right
for (int i = 0; i < pad_right; i++) {
float sum = compute_one_data_post(
din_ptr_arr[num], weights[4], bias[0], weights[4][num_index_right], num_index_right);
float sum = compute_one_data_post(din_ptr_arr[num],
weights[4],
bias[0],
weights[4][num_index_right],
num_index_right);
din_ptr_arr[num] += 2;
for (int k = 0; k < num; k++) {
sum += compute_one_data_post(din_ptr_arr[tmp_index - k],
......@@ -1681,8 +1684,11 @@ inline void compute_all_padding_mid(float* dout,
}
// right
for (int i = 0; i < pad_right; i++) {
float sum = compute_one_data_post(
din_ptr_arr[num], weights[num], bias[0], weights[num][num_index_right], num_index_right);
float sum = compute_one_data_post(din_ptr_arr[num],
weights[num],
bias[0],
weights[num][num_index_right],
num_index_right);
din_ptr_arr[num] += 2;
for (int k = 0; k < num; k++) {
sum += compute_one_data_post(din_ptr_arr[tmp - k],
......@@ -1716,8 +1722,11 @@ inline void compute_all_padding_mid_out2(float* dout0,
for (int i = pad_left; i > 0; i--) {
float sum = compute_one_data_pre(
din_ptr_arr[num], weights[num], bias[0], weights[6][0], num_index_left);
float sum1 = compute_one_data_pre(
din_ptr_arr[tmp1], weights[num], bias[0], weights[6][0], num_index_left);
float sum1 = compute_one_data_pre(din_ptr_arr[tmp1],
weights[num],
bias[0],
weights[6][0],
num_index_left);
for (int k = 0; k < num; k++) {
sum += compute_one_data_pre(din_ptr_arr[tmp - k],
weights[tmp - k],
......@@ -1832,10 +1841,16 @@ inline void compute_all_padding_mid_out2(float* dout0,
}
// right
for (int i = 0; i < pad_right; i++) {
float sum = compute_one_data_post(
din_ptr_arr[num], weights[num], bias[0], weights[num][num_index_right], num_index_right);
float sum1 = compute_one_data_post(
din_ptr_arr[tmp1], weights[num], bias[0], weights[num][num_index_right], num_index_right);
float sum = compute_one_data_post(din_ptr_arr[num],
weights[num],
bias[0],
weights[num][num_index_right],
num_index_right);
float sum1 = compute_one_data_post(din_ptr_arr[tmp1],
weights[num],
bias[0],
weights[num][num_index_right],
num_index_right);
din_ptr_arr[tmp1] += 2;
for (int k = 0; k < num; k++) {
sum += compute_one_data_post(din_ptr_arr[tmp - k],
......@@ -1873,8 +1888,11 @@ inline void compute_all_padding_post(float* dout,
// left
int tmp = num - 1;
for (int i = pad_left; i > 0; i--) {
float sum = compute_one_data_pre(
din_ptr_arr[num], weights[num], bias[0], weights[5][num], num_index_left);
float sum = compute_one_data_pre(din_ptr_arr[num],
weights[num],
bias[0],
weights[5][num],
num_index_left);
for (int k = 0; k < num; k++) {
sum += compute_one_data_pre(din_ptr_arr[tmp - k],
weights[tmp - k],
......@@ -2098,8 +2116,11 @@ inline void compute_all_padding_post(float* dout,
}
// right
for (int i = 0; i < pad_right; i++) {
float sum = compute_one_data_post(
din_ptr_arr[num], weights[num], bias[0], weights[num][num_index_right], num_index_right);
float sum = compute_one_data_post(din_ptr_arr[num],
weights[num],
bias[0],
weights[num][num_index_right],
num_index_right);
din_ptr_arr[num] += 2;
for (int k = 0; k < num; k++) {
sum += compute_one_data_post(din_ptr_arr[tmp - k],
......@@ -2146,7 +2167,7 @@ void conv_depthwise_5x5s2_bias(float* dout,
int n_left_w = 4 - pad_left;
int n_right_w = 4;
int n_bottom_h = 4;
int in_w_cnt = (win - 4 ) >> 1;
int in_w_cnt = (win - 4) >> 1;
int in_h_cnt = (hin - 4) >> 1;
int in_w_remain = win - (in_w_cnt << 1);
int in_h_remain = hin - (in_h_cnt << 1);
......@@ -2588,8 +2609,11 @@ inline void compute_all_padding_pre_relu(float* dout,
}
// right
for (int i = 0; i < pad_right; i++) {
float sum = compute_one_data_post(
din_ptr_arr[num], weights[4], bias[0], weights[4][num_index_right], num_index_right);
float sum = compute_one_data_post(din_ptr_arr[num],
weights[4],
bias[0],
weights[4][num_index_right],
num_index_right);
din_ptr_arr[num] += 2;
for (int k = 0; k < num; k++) {
sum += compute_one_data_post(din_ptr_arr[tmp_index - k],
......@@ -2712,8 +2736,11 @@ inline void compute_all_padding_mid_relu(float* dout,
}
// right
for (int i = 0; i < pad_right; i++) {
float sum = compute_one_data_post(
din_ptr_arr[num], weights[num], bias[0], weights[num][num_index_right], num_index_right);
float sum = compute_one_data_post(din_ptr_arr[num],
weights[num],
bias[0],
weights[num][num_index_right],
num_index_right);
din_ptr_arr[num] += 2;
for (int k = 0; k < num; k++) {
sum += compute_one_data_post(din_ptr_arr[tmp - k],
......@@ -2748,8 +2775,11 @@ inline void compute_all_padding_mid_relu_out2(float* dout0,
for (int i = pad_left; i > 0; i--) {
float sum = compute_one_data_pre(
din_ptr_arr[num], weights[num], bias[0], weights[6][0], num_index_left);
float sum1 = compute_one_data_pre(
din_ptr_arr[tmp1], weights[num], bias[0], weights[6][0], num_index_left);
float sum1 = compute_one_data_pre(din_ptr_arr[tmp1],
weights[num],
bias[0],
weights[6][0],
num_index_left);
for (int k = 0; k < num; k++) {
sum += compute_one_data_pre(din_ptr_arr[tmp - k],
weights[tmp - k],
......@@ -2865,10 +2895,16 @@ inline void compute_all_padding_mid_relu_out2(float* dout0,
}
// right
for (int i = 0; i < pad_right; i++) {
float sum = compute_one_data_post(
din_ptr_arr[num], weights[num], bias[0], weights[num][num_index_right], num_index_right);
float sum1 = compute_one_data_post(
din_ptr_arr[tmp1], weights[num], bias[0], weights[num][num_index_right], num_index_right);
float sum = compute_one_data_post(din_ptr_arr[num],
weights[num],
bias[0],
weights[num][num_index_right],
num_index_right);
float sum1 = compute_one_data_post(din_ptr_arr[tmp1],
weights[num],
bias[0],
weights[num][num_index_right],
num_index_right);
din_ptr_arr[tmp1] += 2;
for (int k = 0; k < num; k++) {
sum += compute_one_data_post(din_ptr_arr[tmp - k],
......@@ -2906,8 +2942,11 @@ inline void compute_all_padding_post_relu(float* dout,
// left
int tmp = num - 1;
for (int i = pad_left; i > 0; i--) {
float sum = compute_one_data_pre(
din_ptr_arr[num], weights[num], bias[0], weights[5][num], num_index_left);
float sum = compute_one_data_pre(din_ptr_arr[num],
weights[num],
bias[0],
weights[5][num],
num_index_left);
for (int k = 0; k < num; k++) {
sum += compute_one_data_pre(din_ptr_arr[tmp - k],
weights[tmp - k],
......@@ -3139,8 +3178,11 @@ inline void compute_all_padding_post_relu(float* dout,
}
// right
for (int i = 0; i < pad_right; i++) {
float sum = compute_one_data_post(
din_ptr_arr[num], weights[num], bias[0], weights[num][num_index_right], num_index_right);
float sum = compute_one_data_post(din_ptr_arr[num],
weights[num],
bias[0],
weights[num][num_index_right],
num_index_right);
din_ptr_arr[num] += 2;
for (int k = 0; k < num; k++) {
sum += compute_one_data_post(din_ptr_arr[tmp - k],
......@@ -3187,7 +3229,7 @@ void conv_depthwise_5x5s2_bias_relu(float* dout,
int n_left_w = 4 - pad_left;
int n_right_w = 4;
int n_bottom_h = 4;
int in_w_cnt = (win - 4 ) >> 1;
int in_w_cnt = (win - 4) >> 1;
int in_h_cnt = (hin - 4) >> 1;
int in_w_remain = win - (in_w_cnt << 1);
int in_h_remain = hin - (in_h_cnt << 1);
......@@ -3647,8 +3689,11 @@ inline void compute_all_padding_pre_relu6(float* dout,
}
// right
for (int i = 0; i < pad_right; i++) {
float sum = compute_one_data_post(
din_ptr_arr[num], weights[4], bias[0], weights[4][num_index_right], num_index_right);
float sum = compute_one_data_post(din_ptr_arr[num],
weights[4],
bias[0],
weights[4][num_index_right],
num_index_right);
din_ptr_arr[num] += 2;
for (int k = 0; k < num; k++) {
sum += compute_one_data_post(din_ptr_arr[tmp_index - k],
......@@ -3778,8 +3823,11 @@ inline void compute_all_padding_mid_relu6(float* dout,
}
// right
for (int i = 0; i < pad_right; i++) {
float sum = compute_one_data_post(
din_ptr_arr[num], weights[num], bias[0], weights[num][num_index_right], num_index_right);
float sum = compute_one_data_post(din_ptr_arr[num],
weights[num],
bias[0],
weights[num][num_index_right],
num_index_right);
din_ptr_arr[num] += 2;
for (int k = 0; k < num; k++) {
sum += compute_one_data_post(din_ptr_arr[tmp - k],
......@@ -3938,10 +3986,16 @@ inline void compute_all_padding_mid_relu6_out2(float* dout0,
}
// right
for (int i = 0; i < pad_right; i++) {
float sum = compute_one_data_post(
din_ptr_arr[num], weights[num], bias[0], weights[num][num_index_right], num_index_right);
float sum1 = compute_one_data_post(
din_ptr_arr[tmp1], weights[num], bias[0], weights[num][num_index_right], num_index_right);
float sum = compute_one_data_post(din_ptr_arr[num],
weights[num],
bias[0],
weights[num][num_index_right],
num_index_right);
float sum1 = compute_one_data_post(din_ptr_arr[tmp1],
weights[num],
bias[0],
weights[num][num_index_right],
num_index_right);
din_ptr_arr[tmp1] += 2;
for (int k = 0; k < num; k++) {
sum += compute_one_data_post(din_ptr_arr[tmp - k],
......@@ -4224,8 +4278,11 @@ inline void compute_all_padding_post_relu6(float* dout,
}
// right
for (int i = 0; i < pad_right; i++) {
float sum = compute_one_data_post(
din_ptr_arr[num], weights[num], bias[0], weights[num][num_index_right], num_index_right);
float sum = compute_one_data_post(din_ptr_arr[num],
weights[num],
bias[0],
weights[num][num_index_right],
num_index_right);
din_ptr_arr[num] += 2;
for (int k = 0; k < num; k++) {
sum += compute_one_data_post(din_ptr_arr[tmp - k],
......@@ -4273,7 +4330,7 @@ void conv_depthwise_5x5s2_bias_relu6(float* dout,
int n_left_w = 4 - pad_left;
int n_right_w = 4;
int n_bottom_h = 4;
int in_w_cnt = (win - 4 ) >> 1;
int in_w_cnt = (win - 4) >> 1;
int in_h_cnt = (hin - 4) >> 1;
int in_w_remain = win - (in_w_cnt << 1);
int in_h_remain = hin - (in_h_cnt << 1);
......@@ -4745,8 +4802,11 @@ inline void compute_all_padding_pre_leakyRelu(float* dout,
}
// right
for (int i = 0; i < pad_right; i++) {
float sum = compute_one_data_post(
din_ptr_arr[num], weights[4], bias[0], weights[4][num_index_right], num_index_right);
float sum = compute_one_data_post(din_ptr_arr[num],
weights[4],
bias[0],
weights[4][num_index_right],
num_index_right);
din_ptr_arr[num] += 2;
for (int k = 0; k < num; k++) {
sum += compute_one_data_post(din_ptr_arr[tmp_index - k],
......@@ -4878,8 +4938,11 @@ inline void compute_all_padding_mid_leakyRelu(float* dout,
}
// right
for (int i = 0; i < pad_right; i++) {
float sum = compute_one_data_post(
din_ptr_arr[num], weights[num], bias[0], weights[num][num_index_right], num_index_right);
float sum = compute_one_data_post(din_ptr_arr[num],
weights[num],
bias[0],
weights[num][num_index_right],
num_index_right);
din_ptr_arr[num] += 2;
for (int k = 0; k < num; k++) {
sum += compute_one_data_post(din_ptr_arr[tmp - k],
......@@ -4918,8 +4981,11 @@ inline void compute_all_padding_mid_leakyRelu_out2(float* dout0,
for (int i = pad_left; i > 0; i--) {
float sum = compute_one_data_pre(
din_ptr_arr[num], weights[num], bias[0], weights[6][0], num_index_left);
float sum1 = compute_one_data_pre(
din_ptr_arr[tmp1], weights[num], bias[0], weights[6][0], num_index_left);
float sum1 = compute_one_data_pre(din_ptr_arr[tmp1],
weights[num],
bias[0],
weights[6][0],
num_index_left);
for (int k = 0; k < num; k++) {
sum += compute_one_data_pre(din_ptr_arr[tmp - k],
weights[tmp - k],
......@@ -5041,10 +5107,16 @@ inline void compute_all_padding_mid_leakyRelu_out2(float* dout0,
}
// right
for (int i = 0; i < pad_right; i++) {
float sum = compute_one_data_post(
din_ptr_arr[num], weights[num], bias[0], weights[num][num_index_right], num_index_right);
float sum1 = compute_one_data_post(
din_ptr_arr[tmp1], weights[num], bias[0], weights[num][num_index_right], num_index_right);
float sum = compute_one_data_post(din_ptr_arr[num],
weights[num],
bias[0],
weights[num][num_index_right],
num_index_right);
float sum1 = compute_one_data_post(din_ptr_arr[tmp1],
weights[num],
bias[0],
weights[num][num_index_right],
num_index_right);
din_ptr_arr[tmp1] += 2;
for (int k = 0; k < num; k++) {
sum += compute_one_data_post(din_ptr_arr[tmp - k],
......@@ -5086,8 +5158,11 @@ inline void compute_all_padding_post_leakyRelu(float* dout,
// left
int tmp = num - 1;
for (int i = pad_left; i > 0; i--) {
float sum = compute_one_data_pre(
din_ptr_arr[num], weights[num], bias[0], weights[5][num], num_index_left);
float sum = compute_one_data_pre(din_ptr_arr[num],
weights[num],
bias[0],
weights[5][num],
num_index_left);
for (int k = 0; k < num; k++) {
sum += compute_one_data_pre(din_ptr_arr[tmp - k],
weights[tmp - k],
......@@ -5335,8 +5410,11 @@ inline void compute_all_padding_post_leakyRelu(float* dout,
}
// right
for (int i = 0; i < pad_right; i++) {
float sum = compute_one_data_post(
din_ptr_arr[num], weights[num], bias[0], weights[num][num_index_right], num_index_right);
float sum = compute_one_data_post(din_ptr_arr[num],
weights[num],
bias[0],
weights[num][num_index_right],
num_index_right);
din_ptr_arr[num] += 2;
for (int k = 0; k < num; k++) {
sum += compute_one_data_post(din_ptr_arr[tmp - k],
......@@ -5384,7 +5462,7 @@ void conv_depthwise_5x5s2_bias_leakyRelu(float* dout,
int n_left_w = 4 - pad_left;
int n_right_w = 4;
int n_bottom_h = 4;
int in_w_cnt = (win - 4 ) >> 1;
int in_w_cnt = (win - 4) >> 1;
int in_h_cnt = (hin - 4) >> 1;
int in_w_remain = win - (in_w_cnt << 1);
int in_h_remain = hin - (in_h_cnt << 1);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册