1# Copyright (c) 2023 Meta Platforms
2# SPDX-License-Identifier: Apache-2.0
3
4if(CONFIG_CMSIS_DSP)
5
6  set(CMSIS_DSP_DIR ${ZEPHYR_CURRENT_MODULE_DIR})
7  set(cmsis_glue_path ${ZEPHYR_CMSIS_MODULE_DIR})
8
9  zephyr_library()
10
11  zephyr_library_compile_options($<TARGET_PROPERTY:compiler,optimization_fast>)
12
13  zephyr_include_directories(
14    ${CMSIS_DSP_DIR}/Include
15  )
16
17  zephyr_library_include_directories(
18    ${CMSIS_DSP_DIR}/PrivateInclude
19    ${cmsis_glue_path}/CMSIS/Core/Include
20  )
21
22  # Global Feature Definitions
23  zephyr_library_compile_definitions_ifdef(CONFIG_CMSIS_DSP_NEON                  ARM_MATH_NEON)
24  zephyr_library_compile_definitions_ifdef(CONFIG_CMSIS_DSP_NEON_EXPERIMENTAL     ARM_MATH_NEON_EXPERIMENTAL)
25  zephyr_library_compile_definitions_ifdef(CONFIG_CMSIS_DSP_LOOPUNROLL            ARM_MATH_LOOPUNROLL)
26  zephyr_library_compile_definitions_ifdef(CONFIG_CMSIS_DSP_ROUNDING              ARM_MATH_ROUNDING)
27  zephyr_library_compile_definitions_ifdef(CONFIG_CMSIS_DSP_MATRIXCHECK           ARM_MATH_MATRIX_CHECK)
28  zephyr_library_compile_definitions_ifndef(CONFIG_CMSIS_DSP_FLOAT16              DISABLEFLOAT16)
29  zephyr_library_compile_definitions_ifdef(CONFIG_CMSIS_DSP_AUTOVECTORIZE         ARM_MATH_AUTOVECTORIZE)
30
31  # Helium is automatically enabled by CMSIS-DSP if the processor supports it
32  zephyr_library_compile_definitions_ifdef(CONFIG_CMSIS_DSP_HELIUM_EXPERIMENTAL   ARM_MATH_HELIUM_EXPERIMENTAL)
33
34  zephyr_compile_definitions_ifndef(CONFIG_ARM __GNUC_PYTHON__)
35
36  if (CONFIG_CMSIS_DSP_NEON OR CONFIG_CMSIS_DSP_NEON_EXPERIMENTAL)
37    zephyr_library_include_directories("${CMSIS_DSP_DIR}/ComputeLibrary/Include")
38  endif()
39
40  if (CONFIG_ARMV8_1_M_MVEI OR CONFIG_ARMV8_1_M_MVEF)
41    if (CONFIG_CMSIS_DSP_LAX_VECTOR_CONVERSIONS)
42      zephyr_library_compile_options($<$<STREQUAL:${CMAKE_C_COMPILER_ID},GNU>:-flax-vector-conversions>)
43      zephyr_library_compile_options($<$<STREQUAL:${CMAKE_C_COMPILER_ID},ARMClang>:-flax-vector-conversions=integer>)
44    else()
45      zephyr_library_compile_options($<$<STREQUAL:${CMAKE_C_COMPILER_ID},GNU>:-fno-lax-vector-conversions>)
46      zephyr_library_compile_options($<$<STREQUAL:${CMAKE_C_COMPILER_ID},ARMClang>:-flax-vector-conversions=none>)
47    endif()
48  endif()
49
50  zephyr_compile_definitions_ifndef(CONFIG_ARM __GNUC_PYTHON__)
51
52  # BasicMathFunctions
53  if(CONFIG_CMSIS_DSP_BASICMATH)
54    set(SRCF64 ${CMSIS_DSP_DIR}/Source/BasicMathFunctions/arm_abs_f64.c
55      ${CMSIS_DSP_DIR}/Source/BasicMathFunctions/arm_add_f64.c
56      ${CMSIS_DSP_DIR}/Source/BasicMathFunctions/arm_dot_prod_f64.c
57      ${CMSIS_DSP_DIR}/Source/BasicMathFunctions/arm_mult_f64.c
58      ${CMSIS_DSP_DIR}/Source/BasicMathFunctions/arm_negate_f64.c
59      ${CMSIS_DSP_DIR}/Source/BasicMathFunctions/arm_offset_f64.c
60      ${CMSIS_DSP_DIR}/Source/BasicMathFunctions/arm_scale_f64.c
61      ${CMSIS_DSP_DIR}/Source/BasicMathFunctions/arm_sub_f64.c
62    )
63
64    set(SRCF32 ${CMSIS_DSP_DIR}/Source/BasicMathFunctions/arm_abs_f32.c
65      ${CMSIS_DSP_DIR}/Source/BasicMathFunctions/arm_add_f32.c
66      ${CMSIS_DSP_DIR}/Source/BasicMathFunctions/arm_clip_f32.c
67      ${CMSIS_DSP_DIR}/Source/BasicMathFunctions/arm_dot_prod_f32.c
68      ${CMSIS_DSP_DIR}/Source/BasicMathFunctions/arm_mult_f32.c
69      ${CMSIS_DSP_DIR}/Source/BasicMathFunctions/arm_negate_f32.c
70      ${CMSIS_DSP_DIR}/Source/BasicMathFunctions/arm_offset_f32.c
71      ${CMSIS_DSP_DIR}/Source/BasicMathFunctions/arm_scale_f32.c
72      ${CMSIS_DSP_DIR}/Source/BasicMathFunctions/arm_sub_f32.c
73    )
74
75    set(SRCF16 ${CMSIS_DSP_DIR}/Source/BasicMathFunctions/arm_abs_f16.c
76      ${CMSIS_DSP_DIR}/Source/BasicMathFunctions/arm_add_f16.c
77      ${CMSIS_DSP_DIR}/Source/BasicMathFunctions/arm_clip_f16.c
78      ${CMSIS_DSP_DIR}/Source/BasicMathFunctions/arm_dot_prod_f16.c
79      ${CMSIS_DSP_DIR}/Source/BasicMathFunctions/arm_mult_f16.c
80      ${CMSIS_DSP_DIR}/Source/BasicMathFunctions/arm_negate_f16.c
81      ${CMSIS_DSP_DIR}/Source/BasicMathFunctions/arm_offset_f16.c
82      ${CMSIS_DSP_DIR}/Source/BasicMathFunctions/arm_scale_f16.c
83      ${CMSIS_DSP_DIR}/Source/BasicMathFunctions/arm_sub_f16.c
84    )
85
86    set(SRCQ31 ${CMSIS_DSP_DIR}/Source/BasicMathFunctions/arm_abs_q31.c
87      ${CMSIS_DSP_DIR}/Source/BasicMathFunctions/arm_add_q31.c
88      ${CMSIS_DSP_DIR}/Source/BasicMathFunctions/arm_clip_q31.c
89      ${CMSIS_DSP_DIR}/Source/BasicMathFunctions/arm_dot_prod_q31.c
90      ${CMSIS_DSP_DIR}/Source/BasicMathFunctions/arm_mult_q31.c
91      ${CMSIS_DSP_DIR}/Source/BasicMathFunctions/arm_negate_q31.c
92      ${CMSIS_DSP_DIR}/Source/BasicMathFunctions/arm_offset_q31.c
93      ${CMSIS_DSP_DIR}/Source/BasicMathFunctions/arm_scale_q31.c
94      ${CMSIS_DSP_DIR}/Source/BasicMathFunctions/arm_shift_q31.c
95      ${CMSIS_DSP_DIR}/Source/BasicMathFunctions/arm_sub_q31.c
96    )
97
98    set(SRCQ15 ${CMSIS_DSP_DIR}/Source/BasicMathFunctions/arm_abs_q15.c
99      ${CMSIS_DSP_DIR}/Source/BasicMathFunctions/arm_add_q15.c
100      ${CMSIS_DSP_DIR}/Source/BasicMathFunctions/arm_clip_q15.c
101      ${CMSIS_DSP_DIR}/Source/BasicMathFunctions/arm_dot_prod_q15.c
102      ${CMSIS_DSP_DIR}/Source/BasicMathFunctions/arm_mult_q15.c
103      ${CMSIS_DSP_DIR}/Source/BasicMathFunctions/arm_negate_q15.c
104      ${CMSIS_DSP_DIR}/Source/BasicMathFunctions/arm_offset_q15.c
105      ${CMSIS_DSP_DIR}/Source/BasicMathFunctions/arm_scale_q15.c
106      ${CMSIS_DSP_DIR}/Source/BasicMathFunctions/arm_shift_q15.c
107      ${CMSIS_DSP_DIR}/Source/BasicMathFunctions/arm_sub_q15.c
108    )
109
110    set(SRCQ7  ${CMSIS_DSP_DIR}/Source/BasicMathFunctions/arm_abs_q7.c
111      ${CMSIS_DSP_DIR}/Source/BasicMathFunctions/arm_add_q7.c
112      ${CMSIS_DSP_DIR}/Source/BasicMathFunctions/arm_clip_q7.c
113      ${CMSIS_DSP_DIR}/Source/BasicMathFunctions/arm_dot_prod_q7.c
114      ${CMSIS_DSP_DIR}/Source/BasicMathFunctions/arm_mult_q7.c
115      ${CMSIS_DSP_DIR}/Source/BasicMathFunctions/arm_negate_q7.c
116      ${CMSIS_DSP_DIR}/Source/BasicMathFunctions/arm_offset_q7.c
117      ${CMSIS_DSP_DIR}/Source/BasicMathFunctions/arm_scale_q7.c
118      ${CMSIS_DSP_DIR}/Source/BasicMathFunctions/arm_shift_q7.c
119      ${CMSIS_DSP_DIR}/Source/BasicMathFunctions/arm_sub_q7.c
120    )
121
122    set(SRCU32 ${CMSIS_DSP_DIR}/Source/BasicMathFunctions/arm_and_u32.c
123      ${CMSIS_DSP_DIR}/Source/BasicMathFunctions/arm_not_u32.c
124      ${CMSIS_DSP_DIR}/Source/BasicMathFunctions/arm_or_u32.c
125      ${CMSIS_DSP_DIR}/Source/BasicMathFunctions/arm_xor_u32.c
126    )
127
128    set(SRCU16 ${CMSIS_DSP_DIR}/Source/BasicMathFunctions/arm_and_u16.c
129      ${CMSIS_DSP_DIR}/Source/BasicMathFunctions/arm_not_u16.c
130      ${CMSIS_DSP_DIR}/Source/BasicMathFunctions/arm_or_u16.c
131      ${CMSIS_DSP_DIR}/Source/BasicMathFunctions/arm_xor_u16.c
132    )
133
134    set(SRCU8  ${CMSIS_DSP_DIR}/Source/BasicMathFunctions/arm_and_u8.c
135      ${CMSIS_DSP_DIR}/Source/BasicMathFunctions/arm_or_u8.c
136      ${CMSIS_DSP_DIR}/Source/BasicMathFunctions/arm_not_u8.c
137      ${CMSIS_DSP_DIR}/Source/BasicMathFunctions/arm_xor_u8.c)
138
139    zephyr_library_sources(${SRCF64})
140    zephyr_library_sources(${SRCF32})
141
142    if ((NOT ARMAC5) AND (NOT DISABLEFLOAT16))
143      zephyr_library_sources(${SRCF16})
144    endif()
145
146    zephyr_library_sources(${SRCQ31})
147    zephyr_library_sources(${SRCQ15})
148    zephyr_library_sources(${SRCQ7})
149
150    zephyr_library_sources(${SRCU32})
151    zephyr_library_sources(${SRCU16})
152    zephyr_library_sources(${SRCU8})
153  endif()
154
155  # BayesFunctions
156  if (CONFIG_CMSIS_DSP_BAYES)
157    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/BayesFunctions/arm_gaussian_naive_bayes_predict_f32.c)
158
159    if ((NOT ARMAC5) AND (NOT DISABLEFLOAT16))
160      zephyr_library_sources(${CMSIS_DSP_DIR}/Source/BayesFunctions/arm_gaussian_naive_bayes_predict_f16.c)
161    endif()
162  endif()
163
164  # Common Tables
165  zephyr_library_sources(${CMSIS_DSP_DIR}/Source/CommonTables/arm_common_tables.c
166    ${CMSIS_DSP_DIR}/Source/CommonTables/arm_common_tables_f16.c)
167
168
169  zephyr_library_sources(${CMSIS_DSP_DIR}/Source/CommonTables/arm_const_structs.c)
170  zephyr_library_sources(${CMSIS_DSP_DIR}/Source/CommonTables/arm_const_structs_f16.c)
171
172
173  if (CONFIG_CMSIS_DSP_NEON OR CONFIG_CMSIS_DSP_NEON_EXPERIMENTAL)
174    zephyr_library_sources("${CMSIS_DSP_DIR}/ComputeLibrary/Source/arm_cl_tables.c")
175  endif()
176
177  if (CONFIG_ARMV8_1_M_MVEI OR CONFIG_ARMV8_1_M_MVEF)
178    zephyr_library_sources("${CMSIS_DSP_DIR}/Source/CommonTables/arm_mve_tables.c")
179    zephyr_library_sources("${CMSIS_DSP_DIR}/Source/CommonTables/arm_mve_tables_f16.c")
180  endif()
181
182
183  if (WRAPPER)
184    target_compile_definitions(CMSISDSP PUBLIC ARM_TABLE_BITREV_1024)
185    target_compile_definitions(CMSISDSP PUBLIC ARM_TABLE_TWIDDLECOEF_F32_4096)
186    target_compile_definitions(CMSISDSP PUBLIC ARM_TABLE_TWIDDLECOEF_Q31_4096)
187    target_compile_definitions(CMSISDSP PUBLIC ARM_TABLE_TWIDDLECOEF_Q15_4096)
188    if ((NOT ARMAC5) AND (NOT DISABLEFLOAT16))
189      target_compile_definitions(CMSISDSP PUBLIC ARM_TABLE_TWIDDLECOEF_F16_4096)
190    endif()
191  endif()
192
193  # ComplexMathFunctions
194  # MVE code is using a table for computing the fast sqrt arm_cmplx_mag_q31
195  # There is the possibility of not compiling this function and not including
196  # the table.
197  if (CONFIG_CMSIS_DSP_COMPLEXMATH)
198    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/ComplexMathFunctions/arm_cmplx_mag_q31.c)
199
200    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/ComplexMathFunctions/arm_cmplx_mag_q15.c)
201
202    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/ComplexMathFunctions/arm_cmplx_mag_fast_q15.c)
203
204    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/ComplexMathFunctions/arm_cmplx_conj_f32.c)
205    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/ComplexMathFunctions/arm_cmplx_conj_q15.c)
206    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/ComplexMathFunctions/arm_cmplx_conj_q31.c)
207    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/ComplexMathFunctions/arm_cmplx_dot_prod_f32.c)
208    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/ComplexMathFunctions/arm_cmplx_dot_prod_q15.c)
209    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/ComplexMathFunctions/arm_cmplx_dot_prod_q31.c)
210    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/ComplexMathFunctions/arm_cmplx_mag_f32.c)
211    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/ComplexMathFunctions/arm_cmplx_mag_f64.c)
212    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/ComplexMathFunctions/arm_cmplx_mag_squared_f32.c)
213    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/ComplexMathFunctions/arm_cmplx_mag_squared_f64.c)
214    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/ComplexMathFunctions/arm_cmplx_mag_squared_q15.c)
215    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/ComplexMathFunctions/arm_cmplx_mag_squared_q31.c)
216    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/ComplexMathFunctions/arm_cmplx_mult_cmplx_f32.c)
217    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/ComplexMathFunctions/arm_cmplx_mult_cmplx_f64.c)
218    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/ComplexMathFunctions/arm_cmplx_mult_cmplx_q15.c)
219    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/ComplexMathFunctions/arm_cmplx_mult_cmplx_q31.c)
220    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/ComplexMathFunctions/arm_cmplx_mult_real_f32.c)
221    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/ComplexMathFunctions/arm_cmplx_mult_real_q15.c)
222    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/ComplexMathFunctions/arm_cmplx_mult_real_q31.c)
223
224    if ((NOT ARMAC5) AND (NOT DISABLEFLOAT16))
225      zephyr_library_sources(${CMSIS_DSP_DIR}/Source/ComplexMathFunctions/arm_cmplx_conj_f16.c)
226      zephyr_library_sources(${CMSIS_DSP_DIR}/Source/ComplexMathFunctions/arm_cmplx_dot_prod_f16.c)
227      zephyr_library_sources(${CMSIS_DSP_DIR}/Source/ComplexMathFunctions/arm_cmplx_mag_f16.c)
228      zephyr_library_sources(${CMSIS_DSP_DIR}/Source/ComplexMathFunctions/arm_cmplx_mag_squared_f16.c)
229      zephyr_library_sources(${CMSIS_DSP_DIR}/Source/ComplexMathFunctions/arm_cmplx_mult_cmplx_f16.c)
230      zephyr_library_sources(${CMSIS_DSP_DIR}/Source/ComplexMathFunctions/arm_cmplx_mult_real_f16.c)
231    endif()
232  endif()
233
234  # Controller Functions
235  if (CONFIG_CMSIS_DSP_CONTROLLER)
236    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/ControllerFunctions/arm_pid_init_f32.c)
237    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/ControllerFunctions/arm_pid_init_q15.c)
238    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/ControllerFunctions/arm_pid_init_q31.c)
239    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/ControllerFunctions/arm_pid_reset_f32.c)
240    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/ControllerFunctions/arm_pid_reset_q15.c)
241    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/ControllerFunctions/arm_pid_reset_q31.c)
242
243    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/ControllerFunctions/arm_sin_cos_f32.c)
244
245    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/ControllerFunctions/arm_sin_cos_q31.c)
246  endif()
247
248  # Distance Functions
249  if (CONFIG_CMSIS_DSP_DISTANCE)
250    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/DistanceFunctions/arm_boolean_distance.c)
251    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/DistanceFunctions/arm_braycurtis_distance_f32.c)
252    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/DistanceFunctions/arm_canberra_distance_f32.c)
253    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/DistanceFunctions/arm_chebyshev_distance_f32.c)
254    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/DistanceFunctions/arm_chebyshev_distance_f64.c)
255    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/DistanceFunctions/arm_cityblock_distance_f32.c)
256    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/DistanceFunctions/arm_cityblock_distance_f64.c)
257    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/DistanceFunctions/arm_correlation_distance_f32.c)
258    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/DistanceFunctions/arm_cosine_distance_f32.c)
259    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/DistanceFunctions/arm_cosine_distance_f64.c)
260    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/DistanceFunctions/arm_dice_distance.c)
261    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/DistanceFunctions/arm_euclidean_distance_f32.c)
262    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/DistanceFunctions/arm_euclidean_distance_f64.c)
263    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/DistanceFunctions/arm_hamming_distance.c)
264    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/DistanceFunctions/arm_jaccard_distance.c)
265    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/DistanceFunctions/arm_jensenshannon_distance_f32.c)
266    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/DistanceFunctions/arm_kulsinski_distance.c)
267    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/DistanceFunctions/arm_minkowski_distance_f32.c)
268    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/DistanceFunctions/arm_rogerstanimoto_distance.c)
269    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/DistanceFunctions/arm_russellrao_distance.c)
270    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/DistanceFunctions/arm_sokalmichener_distance.c)
271    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/DistanceFunctions/arm_sokalsneath_distance.c)
272    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/DistanceFunctions/arm_yule_distance.c)
273    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/DistanceFunctions/arm_dtw_distance_f32.c)
274    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/DistanceFunctions/arm_dtw_path_f32.c)
275    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/DistanceFunctions/arm_dtw_init_window_q7.c)
276
277
278    zephyr_library_include_directories("${CMSIS_DSP_DIR}/Source/DistanceFunctions")
279
280    if ((NOT ARMAC5) AND (NOT DISABLEFLOAT16))
281      zephyr_library_sources(${CMSIS_DSP_DIR}/Source/DistanceFunctions/arm_braycurtis_distance_f16.c)
282      zephyr_library_sources(${CMSIS_DSP_DIR}/Source/DistanceFunctions/arm_canberra_distance_f16.c)
283      zephyr_library_sources(${CMSIS_DSP_DIR}/Source/DistanceFunctions/arm_chebyshev_distance_f16.c)
284      zephyr_library_sources(${CMSIS_DSP_DIR}/Source/DistanceFunctions/arm_cityblock_distance_f16.c)
285      zephyr_library_sources(${CMSIS_DSP_DIR}/Source/DistanceFunctions/arm_correlation_distance_f16.c)
286      zephyr_library_sources(${CMSIS_DSP_DIR}/Source/DistanceFunctions/arm_cosine_distance_f16.c)
287      zephyr_library_sources(${CMSIS_DSP_DIR}/Source/DistanceFunctions/arm_euclidean_distance_f16.c)
288      zephyr_library_sources(${CMSIS_DSP_DIR}/Source/DistanceFunctions/arm_jensenshannon_distance_f16.c)
289      zephyr_library_sources(${CMSIS_DSP_DIR}/Source/DistanceFunctions/arm_minkowski_distance_f16.c)
290    endif()
291  endif()
292
293  # Fast Math Functions
294  if (CONFIG_CMSIS_DSP_FASTMATH)
295    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FastMathFunctions/arm_cos_f32.c)
296
297    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FastMathFunctions/arm_cos_q15.c)
298
299    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FastMathFunctions/arm_cos_q31.c)
300
301    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FastMathFunctions/arm_sin_f32.c)
302
303    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FastMathFunctions/arm_sin_q15.c)
304
305    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FastMathFunctions/arm_sin_q31.c)
306
307    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FastMathFunctions/arm_sqrt_q31.c)
308
309    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FastMathFunctions/arm_sqrt_q15.c)
310
311    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FastMathFunctions/arm_vlog_f32.c)
312    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FastMathFunctions/arm_vlog_f64.c)
313    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FastMathFunctions/arm_vexp_f32.c)
314    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FastMathFunctions/arm_vexp_f64.c)
315
316    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FastMathFunctions/arm_vlog_q31.c)
317    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FastMathFunctions/arm_vlog_q15.c)
318
319
320    if ((NOT ARMAC5) AND (NOT DISABLEFLOAT16))
321      zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FastMathFunctions/arm_vlog_f16.c)
322      zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FastMathFunctions/arm_vexp_f16.c)
323      zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FastMathFunctions/arm_vinverse_f16.c)
324      zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FastMathFunctions/arm_atan2_f16.c)
325    endif()
326
327    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FastMathFunctions/arm_divide_q15.c)
328    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FastMathFunctions/arm_divide_q31.c)
329
330    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FastMathFunctions/arm_atan2_f32.c)
331    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FastMathFunctions/arm_atan2_q31.c)
332    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FastMathFunctions/arm_atan2_q15.c)
333  endif()
334
335  # Filtering Functions
336  if (CONFIG_CMSIS_DSP_FILTERING)
337    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_lms_norm_init_q31.c)
338
339    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_lms_norm_init_q15.c)
340
341    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_biquad_cascade_df1_32x64_init_q31.c)
342    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_biquad_cascade_df1_32x64_q31.c)
343    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_biquad_cascade_df1_f32.c)
344    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_biquad_cascade_df1_fast_q15.c)
345    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_biquad_cascade_df1_fast_q31.c)
346    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_biquad_cascade_df1_init_f32.c)
347    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_biquad_cascade_df1_init_q15.c)
348    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_biquad_cascade_df1_init_q31.c)
349    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_biquad_cascade_df1_q15.c)
350    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_biquad_cascade_df1_q31.c)
351    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_biquad_cascade_df2T_f32.c)
352    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_biquad_cascade_df2T_f64.c)
353    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_biquad_cascade_df2T_init_f32.c)
354    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_biquad_cascade_df2T_init_f64.c)
355    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_biquad_cascade_stereo_df2T_f32.c)
356    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_biquad_cascade_stereo_df2T_init_f32.c)
357    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_conv_f32.c)
358    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_conv_fast_opt_q15.c)
359    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_conv_fast_q15.c)
360    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_conv_fast_q31.c)
361    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_conv_opt_q15.c)
362    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_conv_opt_q7.c)
363    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_conv_partial_f32.c)
364    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_conv_partial_fast_opt_q15.c)
365    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_conv_partial_fast_q15.c)
366    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_conv_partial_fast_q31.c)
367    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_conv_partial_opt_q15.c)
368    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_conv_partial_opt_q7.c)
369    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_conv_partial_q15.c)
370    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_conv_partial_q31.c)
371    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_conv_partial_q7.c)
372    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_conv_q15.c)
373    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_conv_q31.c)
374    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_conv_q7.c)
375    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_correlate_f32.c)
376    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_correlate_f64.c)
377    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_correlate_fast_opt_q15.c)
378    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_correlate_fast_q15.c)
379    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_correlate_fast_q31.c)
380    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_correlate_opt_q15.c)
381    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_correlate_opt_q7.c)
382    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_correlate_q15.c)
383    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_correlate_q31.c)
384    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_correlate_q7.c)
385    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_fir_decimate_f32.c)
386    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_fir_decimate_fast_q15.c)
387    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_fir_decimate_fast_q31.c)
388    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_fir_decimate_init_f32.c)
389    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_fir_decimate_init_q15.c)
390    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_fir_decimate_init_q31.c)
391    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_fir_decimate_q15.c)
392    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_fir_decimate_q31.c)
393    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_fir_f32.c)
394    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_fir_f64.c)
395    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_fir_fast_q15.c)
396    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_fir_fast_q31.c)
397    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_fir_init_f32.c)
398    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_fir_init_f64.c)
399    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_fir_init_q15.c)
400    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_fir_init_q31.c)
401    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_fir_init_q7.c)
402    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_fir_interpolate_f32.c)
403    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_fir_interpolate_init_f32.c)
404    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_fir_interpolate_init_q15.c)
405    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_fir_interpolate_init_q31.c)
406    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_fir_interpolate_q15.c)
407    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_fir_interpolate_q31.c)
408    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_fir_lattice_f32.c)
409    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_fir_lattice_init_f32.c)
410    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_fir_lattice_init_q15.c)
411    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_fir_lattice_init_q31.c)
412    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_fir_lattice_q15.c)
413    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_fir_lattice_q31.c)
414    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_fir_q15.c)
415    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_fir_q31.c)
416    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_fir_q7.c)
417    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_fir_sparse_f32.c)
418    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_fir_sparse_init_f32.c)
419    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_fir_sparse_init_q15.c)
420    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_fir_sparse_init_q31.c)
421    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_fir_sparse_init_q7.c)
422    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_fir_sparse_q15.c)
423    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_fir_sparse_q31.c)
424    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_fir_sparse_q7.c)
425    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_iir_lattice_f32.c)
426    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_iir_lattice_init_f32.c)
427    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_iir_lattice_init_q15.c)
428    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_iir_lattice_init_q31.c)
429    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_iir_lattice_q15.c)
430    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_iir_lattice_q31.c)
431    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_lms_f32.c)
432    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_lms_init_f32.c)
433    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_lms_init_q15.c)
434    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_lms_init_q31.c)
435    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_lms_norm_f32.c)
436    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_lms_norm_init_f32.c)
437    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_lms_norm_q15.c)
438    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_lms_norm_q31.c)
439    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_lms_q15.c)
440    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_lms_q31.c)
441    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_levinson_durbin_f32.c)
442    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_levinson_durbin_q31.c)
443
444    if ((NOT ARMAC5) AND (NOT DISABLEFLOAT16))
445      zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_fir_f16.c)
446      zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_fir_init_f16.c)
447      zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_biquad_cascade_df1_f16.c)
448      zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_biquad_cascade_df1_init_f16.c)
449      zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_biquad_cascade_df2T_f16.c)
450      zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_biquad_cascade_df2T_init_f16.c)
451      zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_biquad_cascade_stereo_df2T_f16.c)
452      zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_biquad_cascade_stereo_df2T_init_f16.c)
453      zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_correlate_f16.c)
454      zephyr_library_sources(${CMSIS_DSP_DIR}/Source/FilteringFunctions/arm_levinson_durbin_f16.c)
455    endif()
456  endif()
457
458  # Interpolation Functions
459  if (CONFIG_CMSIS_DSP_INTERPOLATION)
460    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/InterpolationFunctions/arm_bilinear_interp_f32.c)
461    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/InterpolationFunctions/arm_bilinear_interp_q15.c)
462    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/InterpolationFunctions/arm_bilinear_interp_q31.c)
463    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/InterpolationFunctions/arm_bilinear_interp_q7.c)
464    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/InterpolationFunctions/arm_linear_interp_f32.c)
465    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/InterpolationFunctions/arm_linear_interp_q15.c)
466    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/InterpolationFunctions/arm_linear_interp_q31.c)
467    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/InterpolationFunctions/arm_linear_interp_q7.c)
468    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/InterpolationFunctions/arm_spline_interp_f32.c)
469    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/InterpolationFunctions/arm_spline_interp_init_f32.c)
470
471
472    if ((NOT ARMAC5) AND (NOT DISABLEFLOAT16))
473      zephyr_library_sources(${CMSIS_DSP_DIR}/Source/InterpolationFunctions/arm_bilinear_interp_f16.c)
474      zephyr_library_sources(${CMSIS_DSP_DIR}/Source/InterpolationFunctions/arm_linear_interp_f16.c)
475    endif()
476  endif()
477
478  # Matrix Functions
479  if (CONFIG_CMSIS_DSP_MATRIX)
480    set(SRCF64 ${CMSIS_DSP_DIR}/Source/MatrixFunctions/arm_mat_cholesky_f64.c
481      ${CMSIS_DSP_DIR}/Source/MatrixFunctions/arm_mat_inverse_f64.c
482      ${CMSIS_DSP_DIR}/Source/MatrixFunctions/arm_mat_ldlt_f64.c
483      ${CMSIS_DSP_DIR}/Source/MatrixFunctions/arm_mat_mult_f64.c
484      ${CMSIS_DSP_DIR}/Source/MatrixFunctions/arm_mat_solve_lower_triangular_f64.c
485      ${CMSIS_DSP_DIR}/Source/MatrixFunctions/arm_mat_solve_upper_triangular_f64.c
486      ${CMSIS_DSP_DIR}/Source/MatrixFunctions/arm_mat_sub_f64.c
487      ${CMSIS_DSP_DIR}/Source/MatrixFunctions/arm_mat_trans_f64.c
488      ${CMSIS_DSP_DIR}/Source/MatrixFunctions/arm_mat_qr_f64.c
489      ${CMSIS_DSP_DIR}/Source/MatrixFunctions/arm_householder_f64.c
490    )
491
492    set(SRCF32 ${CMSIS_DSP_DIR}/Source/MatrixFunctions/arm_mat_add_f32.c
493      ${CMSIS_DSP_DIR}/Source/MatrixFunctions/arm_mat_cholesky_f32.c
494      ${CMSIS_DSP_DIR}/Source/MatrixFunctions/arm_mat_cmplx_mult_f32.c
495      ${CMSIS_DSP_DIR}/Source/MatrixFunctions/arm_mat_cmplx_trans_f32.c
496      ${CMSIS_DSP_DIR}/Source/MatrixFunctions/arm_mat_init_f32.c
497      ${CMSIS_DSP_DIR}/Source/MatrixFunctions/arm_mat_inverse_f32.c
498      ${CMSIS_DSP_DIR}/Source/MatrixFunctions/arm_mat_ldlt_f32.c
499      ${CMSIS_DSP_DIR}/Source/MatrixFunctions/arm_mat_mult_f32.c
500      ${CMSIS_DSP_DIR}/Source/MatrixFunctions/arm_mat_scale_f32.c
501      ${CMSIS_DSP_DIR}/Source/MatrixFunctions/arm_mat_solve_lower_triangular_f32.c
502      ${CMSIS_DSP_DIR}/Source/MatrixFunctions/arm_mat_solve_upper_triangular_f32.c
503      ${CMSIS_DSP_DIR}/Source/MatrixFunctions/arm_mat_sub_f32.c
504      ${CMSIS_DSP_DIR}/Source/MatrixFunctions/arm_mat_trans_f32.c
505      ${CMSIS_DSP_DIR}/Source/MatrixFunctions/arm_mat_vec_mult_f32.c
506      ${CMSIS_DSP_DIR}/Source/MatrixFunctions/arm_mat_qr_f32.c
507      ${CMSIS_DSP_DIR}/Source/MatrixFunctions/arm_householder_f32.c
508    )
509
510    set(SRCQ31 ${CMSIS_DSP_DIR}/Source/MatrixFunctions/arm_mat_add_q31.c
511      ${CMSIS_DSP_DIR}/Source/MatrixFunctions/arm_mat_cmplx_mult_q31.c
512      ${CMSIS_DSP_DIR}/Source/MatrixFunctions/arm_mat_cmplx_trans_q31.c
513      ${CMSIS_DSP_DIR}/Source/MatrixFunctions/arm_mat_init_q31.c
514      ${CMSIS_DSP_DIR}/Source/MatrixFunctions/arm_mat_mult_fast_q31.c
515      ${CMSIS_DSP_DIR}/Source/MatrixFunctions/arm_mat_mult_opt_q31.c
516      ${CMSIS_DSP_DIR}/Source/MatrixFunctions/arm_mat_mult_q31.c
517      ${CMSIS_DSP_DIR}/Source/MatrixFunctions/arm_mat_scale_q31.c
518      ${CMSIS_DSP_DIR}/Source/MatrixFunctions/arm_mat_sub_q31.c
519      ${CMSIS_DSP_DIR}/Source/MatrixFunctions/arm_mat_trans_q31.c
520      ${CMSIS_DSP_DIR}/Source/MatrixFunctions/arm_mat_vec_mult_q31.c
521    )
522
523    set(SRCQ15 ${CMSIS_DSP_DIR}/Source/MatrixFunctions/arm_mat_add_q15.c
524      ${CMSIS_DSP_DIR}/Source/MatrixFunctions/arm_mat_cmplx_mult_q15.c
525      ${CMSIS_DSP_DIR}/Source/MatrixFunctions/arm_mat_cmplx_trans_q15.c
526      ${CMSIS_DSP_DIR}/Source/MatrixFunctions/arm_mat_init_q15.c
527      ${CMSIS_DSP_DIR}/Source/MatrixFunctions/arm_mat_mult_fast_q15.c
528      ${CMSIS_DSP_DIR}/Source/MatrixFunctions/arm_mat_mult_q15.c
529      ${CMSIS_DSP_DIR}/Source/MatrixFunctions/arm_mat_scale_q15.c
530      ${CMSIS_DSP_DIR}/Source/MatrixFunctions/arm_mat_sub_q15.c
531      ${CMSIS_DSP_DIR}/Source/MatrixFunctions/arm_mat_trans_q15.c
532      ${CMSIS_DSP_DIR}/Source/MatrixFunctions/arm_mat_vec_mult_q15.c
533    )
534
535    set(SRCQ7 ${CMSIS_DSP_DIR}/Source/MatrixFunctions/arm_mat_mult_q7.c
536      ${CMSIS_DSP_DIR}/Source/MatrixFunctions/arm_mat_vec_mult_q7.c
537      ${CMSIS_DSP_DIR}/Source/MatrixFunctions/arm_mat_trans_q7.c
538    )
539
540    zephyr_library_sources(${SRCF64})
541    zephyr_library_sources(${SRCF32})
542
543    zephyr_library_sources(${SRCQ31})
544    zephyr_library_sources(${SRCQ15})
545    zephyr_library_sources(${SRCQ7})
546
547
548    if ((NOT ARMAC5) AND (NOT DISABLEFLOAT16))
549      zephyr_library_sources(${CMSIS_DSP_DIR}/Source/MatrixFunctions/arm_mat_add_f16.c
550      ${CMSIS_DSP_DIR}/Source/MatrixFunctions/arm_mat_cholesky_f16.c
551      ${CMSIS_DSP_DIR}/Source/MatrixFunctions/arm_mat_cmplx_mult_f16.c
552      ${CMSIS_DSP_DIR}/Source/MatrixFunctions/arm_mat_cmplx_trans_f16.c
553      ${CMSIS_DSP_DIR}/Source/MatrixFunctions/arm_mat_init_f16.c
554      ${CMSIS_DSP_DIR}/Source/MatrixFunctions/arm_mat_inverse_f16.c
555      ${CMSIS_DSP_DIR}/Source/MatrixFunctions/arm_mat_mult_f16.c
556      ${CMSIS_DSP_DIR}/Source/MatrixFunctions/arm_mat_scale_f16.c
557      ${CMSIS_DSP_DIR}/Source/MatrixFunctions/arm_mat_solve_lower_triangular_f16.c
558      ${CMSIS_DSP_DIR}/Source/MatrixFunctions/arm_mat_solve_upper_triangular_f16.c
559      ${CMSIS_DSP_DIR}/Source/MatrixFunctions/arm_mat_sub_f16.c
560      ${CMSIS_DSP_DIR}/Source/MatrixFunctions/arm_mat_trans_f16.c
561      ${CMSIS_DSP_DIR}/Source/MatrixFunctions/arm_mat_vec_mult_f16.c
562      ${CMSIS_DSP_DIR}/Source/MatrixFunctions/arm_mat_qr_f16.c
563      ${CMSIS_DSP_DIR}/Source/MatrixFunctions/arm_householder_f16.c
564      )
565    endif()
566  endif()
567
568  # Quaternion Math Functions
569  if (CONFIG_CMSIS_DSP_QUATERNIONMATH)
570    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/QuaternionMathFunctions/arm_quaternion_norm_f32.c)
571    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/QuaternionMathFunctions/arm_quaternion_inverse_f32.c)
572    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/QuaternionMathFunctions/arm_quaternion_conjugate_f32.c)
573    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/QuaternionMathFunctions/arm_quaternion_normalize_f32.c)
574    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/QuaternionMathFunctions/arm_quaternion_product_single_f32.c)
575    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/QuaternionMathFunctions/arm_quaternion_product_f32.c)
576    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/QuaternionMathFunctions/arm_quaternion2rotation_f32.c)
577    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/QuaternionMathFunctions/arm_rotation2quaternion_f32.c)
578  endif()
579
580  # Statistics Functions
581  if (CONFIG_CMSIS_DSP_STATISTICS)
582    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/StatisticsFunctions/arm_entropy_f32.c)
583    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/StatisticsFunctions/arm_entropy_f64.c)
584    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/StatisticsFunctions/arm_kullback_leibler_f32.c)
585    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/StatisticsFunctions/arm_kullback_leibler_f64.c)
586    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/StatisticsFunctions/arm_logsumexp_dot_prod_f32.c)
587    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/StatisticsFunctions/arm_logsumexp_f32.c)
588    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/StatisticsFunctions/arm_max_f32.c)
589    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/StatisticsFunctions/arm_max_f64.c)
590    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/StatisticsFunctions/arm_max_no_idx_f32.c)
591    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/StatisticsFunctions/arm_max_no_idx_f64.c)
592    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/StatisticsFunctions/arm_min_no_idx_f32.c)
593    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/StatisticsFunctions/arm_min_no_idx_f64.c)
594    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/StatisticsFunctions/arm_max_q15.c)
595    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/StatisticsFunctions/arm_max_q31.c)
596    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/StatisticsFunctions/arm_max_q7.c)
597    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/StatisticsFunctions/arm_max_no_idx_q31.c)
598    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/StatisticsFunctions/arm_max_no_idx_q15.c)
599    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/StatisticsFunctions/arm_max_no_idx_q7.c)
600    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/StatisticsFunctions/arm_mean_f32.c)
601    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/StatisticsFunctions/arm_mean_f64.c)
602    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/StatisticsFunctions/arm_mean_q15.c)
603    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/StatisticsFunctions/arm_mean_q31.c)
604    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/StatisticsFunctions/arm_mean_q7.c)
605    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/StatisticsFunctions/arm_min_f32.c)
606    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/StatisticsFunctions/arm_min_f64.c)
607    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/StatisticsFunctions/arm_min_q15.c)
608    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/StatisticsFunctions/arm_min_q31.c)
609    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/StatisticsFunctions/arm_min_q7.c)
610    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/StatisticsFunctions/arm_min_no_idx_q31.c)
611    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/StatisticsFunctions/arm_min_no_idx_q15.c)
612    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/StatisticsFunctions/arm_min_no_idx_q7.c)
613    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/StatisticsFunctions/arm_power_f32.c)
614    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/StatisticsFunctions/arm_power_f64.c)
615    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/StatisticsFunctions/arm_power_q15.c)
616    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/StatisticsFunctions/arm_power_q31.c)
617    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/StatisticsFunctions/arm_power_q7.c)
618    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/StatisticsFunctions/arm_rms_f32.c)
619    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/StatisticsFunctions/arm_rms_q15.c)
620    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/StatisticsFunctions/arm_rms_q31.c)
621    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/StatisticsFunctions/arm_std_f32.c)
622    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/StatisticsFunctions/arm_std_f64.c)
623    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/StatisticsFunctions/arm_std_q15.c)
624    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/StatisticsFunctions/arm_std_q31.c)
625    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/StatisticsFunctions/arm_var_f32.c)
626    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/StatisticsFunctions/arm_var_f64.c)
627    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/StatisticsFunctions/arm_var_q15.c)
628    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/StatisticsFunctions/arm_var_q31.c)
629
630    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/StatisticsFunctions/arm_absmax_f32.c)
631    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/StatisticsFunctions/arm_absmax_f64.c)
632    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/StatisticsFunctions/arm_absmax_q15.c)
633    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/StatisticsFunctions/arm_absmax_q31.c)
634    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/StatisticsFunctions/arm_absmax_q7.c)
635
636    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/StatisticsFunctions/arm_absmin_f32.c)
637    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/StatisticsFunctions/arm_absmin_f64.c)
638    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/StatisticsFunctions/arm_absmin_q15.c)
639    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/StatisticsFunctions/arm_absmin_q31.c)
640    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/StatisticsFunctions/arm_absmin_q7.c)
641
642    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/StatisticsFunctions/arm_absmax_no_idx_f32.c)
643    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/StatisticsFunctions/arm_absmax_no_idx_f64.c)
644    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/StatisticsFunctions/arm_absmax_no_idx_q15.c)
645    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/StatisticsFunctions/arm_absmax_no_idx_q31.c)
646    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/StatisticsFunctions/arm_absmax_no_idx_q7.c)
647
648    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/StatisticsFunctions/arm_absmin_no_idx_f32.c)
649    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/StatisticsFunctions/arm_absmin_no_idx_f64.c)
650    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/StatisticsFunctions/arm_absmin_no_idx_q15.c)
651    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/StatisticsFunctions/arm_absmin_no_idx_q31.c)
652    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/StatisticsFunctions/arm_absmin_no_idx_q7.c)
653    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/StatisticsFunctions/arm_mse_q7.c)
654    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/StatisticsFunctions/arm_mse_q15.c)
655    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/StatisticsFunctions/arm_mse_q31.c)
656    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/StatisticsFunctions/arm_mse_f16.c)
657    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/StatisticsFunctions/arm_mse_f32.c)
658    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/StatisticsFunctions/arm_mse_f64.c)
659    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/StatisticsFunctions/arm_accumulate_f64.c)
660    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/StatisticsFunctions/arm_accumulate_f32.c)
661
662
663    if ((NOT ARMAC5) AND (NOT DISABLEFLOAT16))
664      zephyr_library_sources(${CMSIS_DSP_DIR}/Source/StatisticsFunctions/arm_max_f16.c)
665      zephyr_library_sources(${CMSIS_DSP_DIR}/Source/StatisticsFunctions/arm_min_f16.c)
666      zephyr_library_sources(${CMSIS_DSP_DIR}/Source/StatisticsFunctions/arm_mean_f16.c)
667      zephyr_library_sources(${CMSIS_DSP_DIR}/Source/StatisticsFunctions/arm_power_f16.c)
668      zephyr_library_sources(${CMSIS_DSP_DIR}/Source/StatisticsFunctions/arm_rms_f16.c)
669      zephyr_library_sources(${CMSIS_DSP_DIR}/Source/StatisticsFunctions/arm_std_f16.c)
670      zephyr_library_sources(${CMSIS_DSP_DIR}/Source/StatisticsFunctions/arm_var_f16.c)
671      zephyr_library_sources(${CMSIS_DSP_DIR}/Source/StatisticsFunctions/arm_entropy_f16.c)
672      zephyr_library_sources(${CMSIS_DSP_DIR}/Source/StatisticsFunctions/arm_kullback_leibler_f16.c)
673      zephyr_library_sources(${CMSIS_DSP_DIR}/Source/StatisticsFunctions/arm_logsumexp_dot_prod_f16.c)
674      zephyr_library_sources(${CMSIS_DSP_DIR}/Source/StatisticsFunctions/arm_logsumexp_f16.c)
675      zephyr_library_sources(${CMSIS_DSP_DIR}/Source/StatisticsFunctions/arm_max_no_idx_f16.c)
676      zephyr_library_sources(${CMSIS_DSP_DIR}/Source/StatisticsFunctions/arm_min_no_idx_f16.c)
677
678      zephyr_library_sources(${CMSIS_DSP_DIR}/Source/StatisticsFunctions/arm_absmax_f16.c)
679      zephyr_library_sources(${CMSIS_DSP_DIR}/Source/StatisticsFunctions/arm_absmin_f16.c)
680      zephyr_library_sources(${CMSIS_DSP_DIR}/Source/StatisticsFunctions/arm_absmax_no_idx_f16.c)
681      zephyr_library_sources(${CMSIS_DSP_DIR}/Source/StatisticsFunctions/arm_absmin_no_idx_f16.c)
682      zephyr_library_sources(${CMSIS_DSP_DIR}/Source/StatisticsFunctions/arm_accumulate_f16.c)
683    endif()
684  endif()
685
686  # Support Functions
687  if (CONFIG_CMSIS_DSP_SUPPORT)
688    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/SupportFunctions/arm_barycenter_f32.c
689      ${CMSIS_DSP_DIR}/Source/SupportFunctions/arm_bitonic_sort_f32.c
690      ${CMSIS_DSP_DIR}/Source/SupportFunctions/arm_bubble_sort_f32.c
691      ${CMSIS_DSP_DIR}/Source/SupportFunctions/arm_copy_f32.c
692      ${CMSIS_DSP_DIR}/Source/SupportFunctions/arm_copy_f64.c
693      ${CMSIS_DSP_DIR}/Source/SupportFunctions/arm_copy_q15.c
694      ${CMSIS_DSP_DIR}/Source/SupportFunctions/arm_copy_q31.c
695      ${CMSIS_DSP_DIR}/Source/SupportFunctions/arm_copy_q7.c
696      ${CMSIS_DSP_DIR}/Source/SupportFunctions/arm_f16_to_float.c
697      ${CMSIS_DSP_DIR}/Source/SupportFunctions/arm_f16_to_q15.c
698      ${CMSIS_DSP_DIR}/Source/SupportFunctions/arm_fill_f32.c
699      ${CMSIS_DSP_DIR}/Source/SupportFunctions/arm_fill_f64.c
700      ${CMSIS_DSP_DIR}/Source/SupportFunctions/arm_fill_q15.c
701      ${CMSIS_DSP_DIR}/Source/SupportFunctions/arm_fill_q31.c
702      ${CMSIS_DSP_DIR}/Source/SupportFunctions/arm_fill_q7.c
703      ${CMSIS_DSP_DIR}/Source/SupportFunctions/arm_f64_to_float.c
704      ${CMSIS_DSP_DIR}/Source/SupportFunctions/arm_f64_to_q31.c
705      ${CMSIS_DSP_DIR}/Source/SupportFunctions/arm_f64_to_q15.c
706      ${CMSIS_DSP_DIR}/Source/SupportFunctions/arm_f64_to_q7.c
707      ${CMSIS_DSP_DIR}/Source/SupportFunctions/arm_float_to_f64.c
708      ${CMSIS_DSP_DIR}/Source/SupportFunctions/arm_float_to_q15.c
709      ${CMSIS_DSP_DIR}/Source/SupportFunctions/arm_float_to_q31.c
710      ${CMSIS_DSP_DIR}/Source/SupportFunctions/arm_float_to_q7.c
711      ${CMSIS_DSP_DIR}/Source/SupportFunctions/arm_heap_sort_f32.c
712      ${CMSIS_DSP_DIR}/Source/SupportFunctions/arm_insertion_sort_f32.c
713      ${CMSIS_DSP_DIR}/Source/SupportFunctions/arm_merge_sort_f32.c
714      ${CMSIS_DSP_DIR}/Source/SupportFunctions/arm_merge_sort_init_f32.c
715      ${CMSIS_DSP_DIR}/Source/SupportFunctions/arm_q15_to_f64.c
716      ${CMSIS_DSP_DIR}/Source/SupportFunctions/arm_q15_to_float.c
717      ${CMSIS_DSP_DIR}/Source/SupportFunctions/arm_q15_to_q31.c
718      ${CMSIS_DSP_DIR}/Source/SupportFunctions/arm_q15_to_q7.c
719      ${CMSIS_DSP_DIR}/Source/SupportFunctions/arm_q31_to_f64.c
720      ${CMSIS_DSP_DIR}/Source/SupportFunctions/arm_q31_to_float.c
721      ${CMSIS_DSP_DIR}/Source/SupportFunctions/arm_q31_to_q15.c
722      ${CMSIS_DSP_DIR}/Source/SupportFunctions/arm_q31_to_q7.c
723      ${CMSIS_DSP_DIR}/Source/SupportFunctions/arm_q7_to_f64.c
724      ${CMSIS_DSP_DIR}/Source/SupportFunctions/arm_q7_to_float.c
725      ${CMSIS_DSP_DIR}/Source/SupportFunctions/arm_q7_to_q15.c
726      ${CMSIS_DSP_DIR}/Source/SupportFunctions/arm_q7_to_q31.c
727      ${CMSIS_DSP_DIR}/Source/SupportFunctions/arm_quick_sort_f32.c
728      ${CMSIS_DSP_DIR}/Source/SupportFunctions/arm_selection_sort_f32.c
729      ${CMSIS_DSP_DIR}/Source/SupportFunctions/arm_sort_f32.c
730      ${CMSIS_DSP_DIR}/Source/SupportFunctions/arm_sort_init_f32.c
731      ${CMSIS_DSP_DIR}/Source/SupportFunctions/arm_weighted_average_f32.c
732    )
733
734    if ((NOT ARMAC5) AND (NOT DISABLEFLOAT16))
735      zephyr_library_sources(${CMSIS_DSP_DIR}/Source/SupportFunctions/arm_copy_f16.c)
736      zephyr_library_sources(${CMSIS_DSP_DIR}/Source/SupportFunctions/arm_fill_f16.c)
737      zephyr_library_sources(${CMSIS_DSP_DIR}/Source/SupportFunctions/arm_f16_to_q15.c)
738      zephyr_library_sources(${CMSIS_DSP_DIR}/Source/SupportFunctions/arm_q15_to_f16.c)
739      zephyr_library_sources(${CMSIS_DSP_DIR}/Source/SupportFunctions/arm_float_to_f16.c)
740      zephyr_library_sources(${CMSIS_DSP_DIR}/Source/SupportFunctions/arm_f16_to_float.c)
741      zephyr_library_sources(${CMSIS_DSP_DIR}/Source/SupportFunctions/arm_weighted_average_f16.c)
742      zephyr_library_sources(${CMSIS_DSP_DIR}/Source/SupportFunctions/arm_barycenter_f16.c)
743      zephyr_library_sources(${CMSIS_DSP_DIR}/Source/SupportFunctions/arm_f16_to_f64.c)
744      zephyr_library_sources(${CMSIS_DSP_DIR}/Source/SupportFunctions/arm_f64_to_f16.c)
745    endif()
746  endif()
747
748  # SVM Functions
749  if (CONFIG_CMSIS_DSP_SVM)
750    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/SVMFunctions/arm_svm_linear_init_f32.c)
751    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/SVMFunctions/arm_svm_rbf_init_f32.c)
752    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/SVMFunctions/arm_svm_linear_predict_f32.c)
753    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/SVMFunctions/arm_svm_rbf_predict_f32.c)
754    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/SVMFunctions/arm_svm_polynomial_init_f32.c)
755    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/SVMFunctions/arm_svm_sigmoid_init_f32.c)
756    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/SVMFunctions/arm_svm_polynomial_predict_f32.c)
757    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/SVMFunctions/arm_svm_sigmoid_predict_f32.c)
758
759    if ((NOT ARMAC5) AND (NOT DISABLEFLOAT16))
760      zephyr_library_sources(${CMSIS_DSP_DIR}/Source/SVMFunctions/arm_svm_linear_init_f16.c)
761      zephyr_library_sources(${CMSIS_DSP_DIR}/Source/SVMFunctions/arm_svm_rbf_init_f16.c)
762      zephyr_library_sources(${CMSIS_DSP_DIR}/Source/SVMFunctions/arm_svm_linear_predict_f16.c)
763      zephyr_library_sources(${CMSIS_DSP_DIR}/Source/SVMFunctions/arm_svm_rbf_predict_f16.c)
764      zephyr_library_sources(${CMSIS_DSP_DIR}/Source/SVMFunctions/arm_svm_polynomial_init_f16.c)
765      zephyr_library_sources(${CMSIS_DSP_DIR}/Source/SVMFunctions/arm_svm_sigmoid_init_f16.c)
766      zephyr_library_sources(${CMSIS_DSP_DIR}/Source/SVMFunctions/arm_svm_polynomial_predict_f16.c)
767      zephyr_library_sources(${CMSIS_DSP_DIR}/Source/SVMFunctions/arm_svm_sigmoid_predict_f16.c)
768    endif()
769  endif()
770
771  # Transform Functions
772  if (CONFIG_CMSIS_DSP_TRANSFORM)
773    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/TransformFunctions/arm_bitreversal.c)
774    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/TransformFunctions/arm_bitreversal2.c)
775
776    if ((NOT ARMAC5) AND (NOT DISABLEFLOAT16))
777      zephyr_library_sources(${CMSIS_DSP_DIR}/Source/TransformFunctions/arm_bitreversal_f16.c)
778    endif()
779
780    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/TransformFunctions/arm_cfft_radix2_f32.c)
781    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/TransformFunctions/arm_cfft_radix4_f32.c)
782    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/TransformFunctions/arm_cfft_radix8_f32.c)
783    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/TransformFunctions/arm_cfft_f32.c)
784    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/TransformFunctions/arm_cfft_init_f32.c)
785
786    if ((NOT ARMAC5) AND (NOT DISABLEFLOAT16))
787      zephyr_library_sources(${CMSIS_DSP_DIR}/Source/TransformFunctions/arm_cfft_radix2_f16.c)
788      zephyr_library_sources(${CMSIS_DSP_DIR}/Source/TransformFunctions/arm_cfft_radix4_f16.c)
789      zephyr_library_sources(${CMSIS_DSP_DIR}/Source/TransformFunctions/arm_cfft_f16.c)
790      zephyr_library_sources(${CMSIS_DSP_DIR}/Source/TransformFunctions/arm_cfft_init_f16.c)
791    endif()
792
793    if ((NOT ARMAC5) AND (NOT DISABLEFLOAT16))
794      zephyr_library_sources(${CMSIS_DSP_DIR}/Source/TransformFunctions/arm_cfft_radix4_init_f16.c)
795      zephyr_library_sources(${CMSIS_DSP_DIR}/Source/TransformFunctions/arm_cfft_radix4_f16.c)
796    endif()
797
798    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/TransformFunctions/arm_cfft_f64.c)
799    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/TransformFunctions/arm_cfft_init_f64.c)
800
801    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/TransformFunctions/arm_cfft_radix2_q15.c)
802    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/TransformFunctions/arm_cfft_radix4_q15.c)
803    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/TransformFunctions/arm_cfft_q15.c)
804    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/TransformFunctions/arm_cfft_init_q15.c)
805
806    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/TransformFunctions/arm_cfft_radix2_q31.c)
807    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/TransformFunctions/arm_cfft_radix4_q31.c)
808    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/TransformFunctions/arm_cfft_q31.c)
809    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/TransformFunctions/arm_cfft_init_q31.c)
810
811
812    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/TransformFunctions/arm_dct4_f32.c)
813    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/TransformFunctions/arm_dct4_init_f32.c)
814
815    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/TransformFunctions/arm_rfft_init_f32.c)
816    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/TransformFunctions/arm_rfft_f32.c)
817    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/TransformFunctions/arm_cfft_radix4_init_f32.c)
818    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/TransformFunctions/arm_cfft_radix4_f32.c)
819
820    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/TransformFunctions/arm_dct4_q31.c)
821    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/TransformFunctions/arm_dct4_init_q31.c)
822
823    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/TransformFunctions/arm_rfft_init_q31.c)
824    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/TransformFunctions/arm_rfft_q31.c)
825    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/TransformFunctions/arm_cfft_q31.c)
826    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/TransformFunctions/arm_cfft_init_q31.c)
827    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/TransformFunctions/arm_cfft_radix4_init_q31.c)
828    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/TransformFunctions/arm_cfft_radix4_q31.c)
829
830    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/TransformFunctions/arm_dct4_init_q15.c)
831    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/TransformFunctions/arm_dct4_q15.c)
832
833    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/TransformFunctions/arm_rfft_init_q15.c)
834    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/TransformFunctions/arm_rfft_q15.c)
835    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/TransformFunctions/arm_cfft_q15.c)
836    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/TransformFunctions/arm_cfft_init_q15.c)
837    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/TransformFunctions/arm_cfft_radix4_init_q15.c)
838    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/TransformFunctions/arm_cfft_radix4_q15.c)
839
840    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/TransformFunctions/arm_rfft_fast_f32.c)
841    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/TransformFunctions/arm_rfft_fast_init_f32.c)
842    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/TransformFunctions/arm_cfft_f32.c)
843    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/TransformFunctions/arm_cfft_init_f32.c)
844    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/TransformFunctions/arm_cfft_radix8_f32.c)
845
846    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/TransformFunctions/arm_rfft_fast_f64.c)
847    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/TransformFunctions/arm_rfft_fast_init_f64.c)
848
849    if ((NOT ARMAC5) AND (NOT DISABLEFLOAT16))
850      zephyr_library_sources(${CMSIS_DSP_DIR}/Source/TransformFunctions/arm_rfft_fast_f16.c)
851      zephyr_library_sources(${CMSIS_DSP_DIR}/Source/TransformFunctions/arm_rfft_fast_init_f16.c)
852      zephyr_library_sources(${CMSIS_DSP_DIR}/Source/TransformFunctions/arm_cfft_f16.c)
853      zephyr_library_sources(${CMSIS_DSP_DIR}/Source/TransformFunctions/arm_cfft_init_f16.c)
854      zephyr_library_sources(${CMSIS_DSP_DIR}/Source/TransformFunctions/arm_cfft_radix8_f16.c)
855    endif()
856
857    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/TransformFunctions/arm_rfft_init_f32.c)
858    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/TransformFunctions/arm_rfft_f32.c)
859    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/TransformFunctions/arm_cfft_radix4_init_f32.c)
860    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/TransformFunctions/arm_cfft_radix4_f32.c)
861
862    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/TransformFunctions/arm_rfft_init_q15.c)
863    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/TransformFunctions/arm_rfft_q15.c)
864    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/TransformFunctions/arm_cfft_q15.c)
865    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/TransformFunctions/arm_cfft_init_q15.c)
866    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/TransformFunctions/arm_cfft_radix4_q15.c)
867
868    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/TransformFunctions/arm_rfft_init_q31.c)
869    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/TransformFunctions/arm_rfft_q31.c)
870    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/TransformFunctions/arm_cfft_q31.c)
871    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/TransformFunctions/arm_cfft_init_q31.c)
872    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/TransformFunctions/arm_cfft_radix4_q31.c)
873
874    if (WRAPPER)
875      zephyr_library_sources(${CMSIS_DSP_DIR}/Source/TransformFunctions/arm_cfft_radix2_init_q15.c)
876      zephyr_library_sources(${CMSIS_DSP_DIR}/Source/TransformFunctions/arm_cfft_radix2_init_q31.c)
877    endif()
878
879    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/TransformFunctions/arm_cfft_radix4_init_q15.c)
880    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/TransformFunctions/arm_cfft_radix4_init_q31.c)
881
882
883    # For scipy or wrappers or benchmarks
884    if (WRAPPER)
885      zephyr_library_sources(${CMSIS_DSP_DIR}/Source/TransformFunctions/arm_cfft_radix2_init_f32.c)
886      if ((NOT ARMAC5) AND (NOT DISABLEFLOAT16))
887        zephyr_library_sources(${CMSIS_DSP_DIR}/Source/TransformFunctions/arm_cfft_radix2_init_f16.c)
888      endif()
889    endif()
890
891    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/TransformFunctions/arm_mfcc_init_f32.c)
892    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/TransformFunctions/arm_mfcc_f32.c)
893
894    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/TransformFunctions/arm_mfcc_init_q31.c)
895    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/TransformFunctions/arm_mfcc_q31.c)
896
897    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/TransformFunctions/arm_mfcc_init_q15.c)
898    zephyr_library_sources(${CMSIS_DSP_DIR}/Source/TransformFunctions/arm_mfcc_q15.c)
899
900    if ((NOT ARMAC5) AND (NOT DISABLEFLOAT16))
901      zephyr_library_sources(${CMSIS_DSP_DIR}/Source/TransformFunctions/arm_mfcc_init_f16.c)
902      zephyr_library_sources(${CMSIS_DSP_DIR}/Source/TransformFunctions/arm_mfcc_f16.c)
903    endif()
904  endif()
905
906  # Window Functions
907  if (CONFIG_CMSIS_DSP_WINDOW)
908    set(SRCF64 ${CMSIS_DSP_DIR}/Source/WindowFunctions/arm_welch_f64.c
909      ${CMSIS_DSP_DIR}/Source/WindowFunctions/arm_bartlett_f64.c
910      ${CMSIS_DSP_DIR}/Source/WindowFunctions/arm_hamming_f64.c
911      ${CMSIS_DSP_DIR}/Source/WindowFunctions/arm_hanning_f64.c
912      ${CMSIS_DSP_DIR}/Source/WindowFunctions/arm_nuttall3_f64.c
913      ${CMSIS_DSP_DIR}/Source/WindowFunctions/arm_nuttall4_f64.c
914      ${CMSIS_DSP_DIR}/Source/WindowFunctions/arm_nuttall3a_f64.c
915      ${CMSIS_DSP_DIR}/Source/WindowFunctions/arm_nuttall3b_f64.c
916      ${CMSIS_DSP_DIR}/Source/WindowFunctions/arm_nuttall4a_f64.c
917      ${CMSIS_DSP_DIR}/Source/WindowFunctions/arm_blackman_harris_92db_f64.c
918      ${CMSIS_DSP_DIR}/Source/WindowFunctions/arm_nuttall4b_f64.c
919      ${CMSIS_DSP_DIR}/Source/WindowFunctions/arm_nuttall4c_f64.c
920      ${CMSIS_DSP_DIR}/Source/WindowFunctions/arm_hft90d_f64.c
921      ${CMSIS_DSP_DIR}/Source/WindowFunctions/arm_hft95_f64.c
922      ${CMSIS_DSP_DIR}/Source/WindowFunctions/arm_hft116d_f64.c
923      ${CMSIS_DSP_DIR}/Source/WindowFunctions/arm_hft144d_f64.c
924      ${CMSIS_DSP_DIR}/Source/WindowFunctions/arm_hft169d_f64.c
925      ${CMSIS_DSP_DIR}/Source/WindowFunctions/arm_hft196d_f64.c
926      ${CMSIS_DSP_DIR}/Source/WindowFunctions/arm_hft223d_f64.c
927      ${CMSIS_DSP_DIR}/Source/WindowFunctions/arm_hft248d_f64.c
928    )
929
930    set(SRCF32 ${CMSIS_DSP_DIR}/Source/WindowFunctions/arm_welch_f32.c
931      ${CMSIS_DSP_DIR}/Source/WindowFunctions/arm_bartlett_f32.c
932      ${CMSIS_DSP_DIR}/Source/WindowFunctions/arm_hamming_f32.c
933      ${CMSIS_DSP_DIR}/Source/WindowFunctions/arm_hanning_f32.c
934      ${CMSIS_DSP_DIR}/Source/WindowFunctions/arm_nuttall3_f32.c
935      ${CMSIS_DSP_DIR}/Source/WindowFunctions/arm_nuttall4_f32.c
936      ${CMSIS_DSP_DIR}/Source/WindowFunctions/arm_nuttall3a_f32.c
937      ${CMSIS_DSP_DIR}/Source/WindowFunctions/arm_nuttall3b_f32.c
938      ${CMSIS_DSP_DIR}/Source/WindowFunctions/arm_nuttall4a_f32.c
939      ${CMSIS_DSP_DIR}/Source/WindowFunctions/arm_blackman_harris_92db_f32.c
940      ${CMSIS_DSP_DIR}/Source/WindowFunctions/arm_nuttall4b_f32.c
941      ${CMSIS_DSP_DIR}/Source/WindowFunctions/arm_nuttall4c_f32.c
942      ${CMSIS_DSP_DIR}/Source/WindowFunctions/arm_hft90d_f32.c
943      ${CMSIS_DSP_DIR}/Source/WindowFunctions/arm_hft95_f32.c
944      ${CMSIS_DSP_DIR}/Source/WindowFunctions/arm_hft116d_f32.c
945      ${CMSIS_DSP_DIR}/Source/WindowFunctions/arm_hft144d_f32.c
946      ${CMSIS_DSP_DIR}/Source/WindowFunctions/arm_hft169d_f32.c
947      ${CMSIS_DSP_DIR}/Source/WindowFunctions/arm_hft196d_f32.c
948      ${CMSIS_DSP_DIR}/Source/WindowFunctions/arm_hft223d_f32.c
949      ${CMSIS_DSP_DIR}/Source/WindowFunctions/arm_hft248d_f32.c
950    )
951
952    zephyr_library_sources(${SRCF64})
953    zephyr_library_sources(${SRCF32})
954  endif()
955endif()
956