Skip to content

Commit a63a703

Browse files
committed
dnn: sync generated DNN sources from passing branch (jmvalin_rename_part1) — MSVC-friendly outputs
1 parent 28dd7e7 commit a63a703

80 files changed

Lines changed: 799029 additions & 670 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

dnn/adaconvtest.c

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
#include <math.h>
1010

1111

12-
extern const WeightArray lacelayers_arrays[];
13-
extern const WeightArray nolacelayers_arrays[];
12+
extern const WeightArray oaci_lacelayers_arrays[];
13+
extern const WeightArray oaci_nolacelayers_arrays[];
1414

1515
void adaconv_compare(
1616
const char * prefix,
@@ -40,8 +40,8 @@ void adaconv_compare(
4040
float x_out[512];
4141
float window[40];
4242

43-
init_adaconv_state(hAdaConv);
44-
compute_overlap_window(window, 40);
43+
oaci_init_adaconv_state(hAdaConv);
44+
oaci_compute_overlap_window(window, 40);
4545

4646
FILE *f_features, *f_x_in, *f_x_out;
4747

@@ -88,7 +88,7 @@ void adaconv_compare(
8888
exit(1);
8989
}
9090

91-
adaconv_process_frame(hAdaConv, x_out, x_in, features, kernel_layer, gain_layer, feature_dim,
91+
oaci_adaconv_process_frame(hAdaConv, x_out, x_in, features, kernel_layer, gain_layer, feature_dim,
9292
frame_size, overlap_size, in_channels, out_channels, kernel_size, left_padding,
9393
filter_gain_a, filter_gain_b, shape_gain, window, 0);
9494

@@ -132,8 +132,8 @@ void adacomb_compare(
132132
int pitch_lag;
133133
float window[40];
134134

135-
init_adacomb_state(hAdaComb);
136-
compute_overlap_window(window, 40);
135+
oaci_init_adacomb_state(hAdaComb);
136+
oaci_compute_overlap_window(window, 40);
137137

138138
FILE *f_features, *f_x_in, *f_p_in, *f_x_out;
139139

@@ -194,7 +194,7 @@ void adacomb_compare(
194194
exit(1);
195195
}
196196

197-
adacomb_process_frame(hAdaComb, x_out, x_in, features, kernel_layer, gain_layer, global_gain_layer,
197+
oaci_adacomb_process_frame(hAdaComb, x_out, x_in, features, kernel_layer, gain_layer, global_gain_layer,
198198
pitch_lag, feature_dim, frame_size, overlap_size, kernel_size, left_padding, filter_gain_a, filter_gain_b,
199199
log_gain_limit, window, 0);
200200

@@ -229,7 +229,7 @@ void adashape_compare(
229229
float x_out_ref[512];
230230
float x_out[512];
231231

232-
init_adashape_state(hAdaShape);
232+
oaci_init_adashape_state(hAdaShape);
233233

234234
FILE *f_features, *f_x_in, *f_x_out;
235235

@@ -276,7 +276,7 @@ void adashape_compare(
276276
exit(1);
277277
}
278278

279-
adashape_process_frame(hAdaShape, x_out, x_in, features, alpha1, alpha2, feature_dim,
279+
oaci_adashape_process_frame(hAdaShape, x_out, x_in, features, alpha1, alpha2, feature_dim,
280280
frame_size, avg_pool_k, 0);
281281

282282
mse = 0;
@@ -298,10 +298,10 @@ int main() {
298298
AdaCombState hAdaComb;
299299
AdaShapeState hAdaShape;
300300

301-
init_adaconv_state(&hAdaConv);
301+
oaci_init_adaconv_state(&hAdaConv);
302302

303-
init_lacelayers(&hLACE, lacelayers_arrays);
304-
init_nolacelayers(&hNoLACE, nolacelayers_arrays);
303+
oaci_init_lacelayers(&hLACE, oaci_lacelayers_arrays);
304+
oaci_init_nolacelayers(&hNoLACE, oaci_nolacelayers_arrays);
305305

306306
printf("\ntesting lace.af1 (1 in, 1 out)...\n");
307307
adaconv_compare(

dnn/arm/arm_dnn_map.c

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -36,36 +36,36 @@
3636

3737
# if (defined(OAC_ARM_MAY_HAVE_DOTPROD) && !defined(OAC_ARM_PRESUME_DOTPROD))
3838

39-
void (*const DNN_COMPUTE_LINEAR_IMPL[OAC_ARCHMASK + 1])(
39+
void (*const oaci_DNN_COMPUTE_LINEAR_IMPL[OAC_ARCHMASK + 1])(
4040
const LinearLayer *linear,
4141
float *out,
4242
const float *in
4343
) = {
44-
compute_linear_c, /* default */
45-
compute_linear_c,
46-
compute_linear_c,
47-
MAY_HAVE_NEON(compute_linear), /* neon */
48-
MAY_HAVE_DOTPROD(compute_linear) /* dotprod */
44+
oaci_compute_linear_c, /* default */
45+
oaci_compute_linear_c,
46+
oaci_compute_linear_c,
47+
MAY_HAVE_NEON(oaci_compute_linear), /* neon */
48+
MAY_HAVE_DOTPROD(oaci_compute_linear) /* dotprod */
4949
};
5050

5151
# endif
5252

5353
# if (defined(OAC_ARM_MAY_HAVE_DOTPROD) || defined(OAC_ARM_MAY_HAVE_NEON)) && !defined(OAC_ARM_PRESUME_NEON)
5454

55-
void (*const DNN_COMPUTE_ACTIVATION_IMPL[OAC_ARCHMASK + 1])(
55+
void (*const oaci_DNN_COMPUTE_ACTIVATION_IMPL[OAC_ARCHMASK + 1])(
5656
float *output,
5757
const float *input,
5858
int N,
5959
int activation
6060
) = {
61-
compute_activation_c, /* default */
62-
compute_activation_c,
63-
compute_activation_c,
64-
MAY_HAVE_NEON(compute_activation), /* neon */
65-
MAY_HAVE_DOTPROD(compute_activation) /* dotprod */
61+
oaci_compute_activation_c, /* default */
62+
oaci_compute_activation_c,
63+
oaci_compute_activation_c,
64+
MAY_HAVE_NEON(oaci_compute_activation), /* neon */
65+
MAY_HAVE_DOTPROD(oaci_compute_activation) /* dotprod */
6666
};
6767

68-
void (*const DNN_COMPUTE_CONV2D_IMPL[OAC_ARCHMASK + 1])(
68+
void (*const oaci_DNN_COMPUTE_CONV2D_IMPL[OAC_ARCHMASK + 1])(
6969
const Conv2dLayer *conv,
7070
float *out,
7171
float *mem,
@@ -74,11 +74,11 @@ void (*const DNN_COMPUTE_CONV2D_IMPL[OAC_ARCHMASK + 1])(
7474
int hstride,
7575
int activation
7676
) = {
77-
compute_conv2d_c, /* default */
78-
compute_conv2d_c,
79-
compute_conv2d_c,
80-
MAY_HAVE_NEON(compute_conv2d), /* neon */
81-
MAY_HAVE_DOTPROD(compute_conv2d) /* dotprod */
77+
oaci_compute_conv2d_c, /* default */
78+
oaci_compute_conv2d_c,
79+
oaci_compute_conv2d_c,
80+
MAY_HAVE_NEON(oaci_compute_conv2d), /* neon */
81+
MAY_HAVE_DOTPROD(oaci_compute_conv2d) /* dotprod */
8282
};
8383

8484

dnn/arm/dnn_arm.h

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -31,65 +31,65 @@
3131
#include "cpu_support.h"
3232
#include "oac_types.h"
3333

34-
void compute_linear_dotprod(const LinearLayer *linear, float *out, const float *in);
35-
void compute_linear_neon(const LinearLayer *linear, float *out, const float *in);
34+
void oaci_compute_linear_dotprod(const LinearLayer *linear, float *out, const float *in);
35+
void oaci_compute_linear_neon(const LinearLayer *linear, float *out, const float *in);
3636

37-
void compute_activation_neon(float *output, const float *input, int N, int activation);
38-
void compute_activation_dotprod(float *output, const float *input, int N, int activation);
37+
void oaci_compute_activation_neon(float *output, const float *input, int N, int activation);
38+
void oaci_compute_activation_dotprod(float *output, const float *input, int N, int activation);
3939

40-
void compute_conv2d_neon(const Conv2dLayer *conv, float *out, float *mem, const float *in, int height, int hstride,
40+
void oaci_compute_conv2d_neon(const Conv2dLayer *conv, float *out, float *mem, const float *in, int height, int hstride,
4141
int activation);
42-
void compute_conv2d_dotprod(const Conv2dLayer *conv, float *out, float *mem, const float *in, int height, int hstride,
42+
void oaci_compute_conv2d_dotprod(const Conv2dLayer *conv, float *out, float *mem, const float *in, int height, int hstride,
4343
int activation);
4444

4545
#if defined(OAC_ARM_PRESUME_DOTPROD)
4646

4747
# define OVERRIDE_COMPUTE_LINEAR
48-
# define compute_linear(linear, out, in, arch) ((void)(arch), compute_linear_dotprod(linear, out, in))
48+
# define oaci_compute_linear(linear, out, in, arch) ((void)(arch), oaci_compute_linear_dotprod(linear, out, in))
4949

5050
#elif defined(OAC_ARM_PRESUME_NEON_INTR) && !defined(OAC_ARM_MAY_HAVE_DOTPROD)
5151

5252
# define OVERRIDE_COMPUTE_LINEAR
53-
# define compute_linear(linear, out, in, arch) ((void)(arch), compute_linear_neon(linear, out, in))
53+
# define oaci_compute_linear(linear, out, in, arch) ((void)(arch), oaci_compute_linear_neon(linear, out, in))
5454

5555
#elif defined(OAC_HAVE_RTCD) && (defined(OAC_ARM_MAY_HAVE_DOTPROD) || defined(OAC_ARM_MAY_HAVE_NEON))
5656

57-
extern void (*const DNN_COMPUTE_LINEAR_IMPL[OAC_ARCHMASK + 1])(
57+
extern void (*const oaci_DNN_COMPUTE_LINEAR_IMPL[OAC_ARCHMASK + 1])(
5858
const LinearLayer *linear,
5959
float *out,
6060
const float *in
6161
);
6262
# define OVERRIDE_COMPUTE_LINEAR
63-
# define compute_linear(linear, out, in, arch) \
64-
((*DNN_COMPUTE_LINEAR_IMPL[(arch)&OAC_ARCHMASK])(linear, out, in))
63+
# define oaci_compute_linear(linear, out, in, arch) \
64+
((*oaci_DNN_COMPUTE_LINEAR_IMPL[(arch)&OAC_ARCHMASK])(linear, out, in))
6565

6666

6767
#endif
6868

6969
#if defined(OAC_ARM_PRESUME_NEON)
7070

7171
# define OVERRIDE_COMPUTE_ACTIVATION
72-
# define compute_activation(output, input, N, activation, arch) ((void)(arch), \
73-
compute_activation_neon(output, input, N, activation))
72+
# define oaci_compute_activation(output, input, N, activation, arch) ((void)(arch), \
73+
oaci_compute_activation_neon(output, input, N, activation))
7474
# define OVERRIDE_COMPUTE_CONV2D
75-
# define compute_conv2d(conv, out, mem, in, height, hstride, activation, arch) ((void)(arch), \
76-
compute_conv2d_neon(conv, out, mem, in, \
75+
# define oaci_compute_conv2d(conv, out, mem, in, height, hstride, activation, arch) ((void)(arch), \
76+
oaci_compute_conv2d_neon(conv, out, mem, in, \
7777
height, hstride, activation))
7878

7979
#elif defined(OAC_HAVE_RTCD) && (defined(OAC_ARM_MAY_HAVE_DOTPROD) || defined(OAC_ARM_MAY_HAVE_NEON))
8080

81-
extern void (*const DNN_COMPUTE_ACTIVATION_IMPL[OAC_ARCHMASK + 1])(
81+
extern void (*const oaci_DNN_COMPUTE_ACTIVATION_IMPL[OAC_ARCHMASK + 1])(
8282
float *output,
8383
const float *input,
8484
int N,
8585
int activation
8686
);
8787
# define OVERRIDE_COMPUTE_ACTIVATION
88-
# define compute_activation(output, input, N, activation, arch) \
89-
((*DNN_COMPUTE_ACTIVATION_IMPL[(arch)&OAC_ARCHMASK])(output, input, N, activation))
88+
# define oaci_compute_activation(output, input, N, activation, arch) \
89+
((*oaci_DNN_COMPUTE_ACTIVATION_IMPL[(arch)&OAC_ARCHMASK])(output, input, N, activation))
9090

9191

92-
extern void (*const DNN_COMPUTE_CONV2D_IMPL[OAC_ARCHMASK + 1])(
92+
extern void (*const oaci_DNN_COMPUTE_CONV2D_IMPL[OAC_ARCHMASK + 1])(
9393
const Conv2dLayer *conv,
9494
float *out,
9595
float *mem,
@@ -99,8 +99,8 @@ extern void (*const DNN_COMPUTE_CONV2D_IMPL[OAC_ARCHMASK + 1])(
9999
int activation
100100
);
101101
# define OVERRIDE_COMPUTE_CONV2D
102-
# define compute_conv2d(conv, out, mem, in, height, hstride, activation, arch) \
103-
((*DNN_COMPUTE_CONV2D_IMPL[(arch)&OAC_ARCHMASK])(conv, out, mem, in, height, hstride, activation))
102+
# define oaci_compute_conv2d(conv, out, mem, in, height, hstride, activation, arch) \
103+
((*oaci_DNN_COMPUTE_CONV2D_IMPL[(arch)&OAC_ARCHMASK])(conv, out, mem, in, height, hstride, activation))
104104

105105

106106
#endif

0 commit comments

Comments
 (0)