comparison include/ne10/NE10_math.h @ 379:24c3a0663d54 prerelease

Added Ne10 headers within include directory
author andrewm
date Sun, 12 Jun 2016 18:16:20 +0100
parents
children
comparison
equal deleted inserted replaced
378:8db03611ee76 379:24c3a0663d54
1 /*
2 * Copyright 2011-15 ARM Limited and Contributors.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of ARM Limited nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY ARM LIMITED AND CONTRIBUTORS "AS IS" AND
17 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL ARM LIMITED AND CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28 /*
29 * NE10 Library : inc/NE10_math.h
30 */
31
32
33 #include "NE10_types.h"
34
35 #ifndef NE10_MATH_H
36 #define NE10_MATH_H
37
38 #ifdef __cplusplus
39 extern "C" {
40 #endif
41
42 ///////////////////////////
43 // function prototypes:
44 ///////////////////////////
45
46
47 // ## Vector-Constant Arithmetic ##
48
49 /**
50 * @ingroup groupMaths
51 */
52
53 /**
54 * @defgroup ADD_VEC Vector Add
55 *
56 * \par
57 * These functions implement the vector add operation for float data type.
58 */
59
60 /**
61 * @addtogroup ADD_VEC
62 * @{
63 */
64
65 /**
66 * Adds a constant scalar value to all the elements of an input array and stores the results in an output array.
67 * This function point could be pointed to one of ne10_addc_float_c, ne10_addc_float_neon and ne10_addc_float_asm.
68 * @param[out] dst Pointer to the destination array
69 * @param[in] src Pointer to the source array
70 * @param[in] cst The constant scalar added to the input values
71 * @param[in] count The number of items in the input array
72 */
73 extern ne10_result_t (*ne10_addc_float) (ne10_float32_t * dst, ne10_float32_t * src, const ne10_float32_t cst, ne10_uint32_t count);
74 extern ne10_result_t ne10_addc_float_c (ne10_float32_t * dst, ne10_float32_t * src, const ne10_float32_t cst, ne10_uint32_t count);
75 extern ne10_result_t ne10_addc_float_neon (ne10_float32_t * dst, ne10_float32_t * src, const ne10_float32_t cst, ne10_uint32_t count) asm ("ne10_addc_float_neon");
76 extern ne10_result_t ne10_addc_float_asm (ne10_float32_t * dst, ne10_float32_t * src, const ne10_float32_t cst, ne10_uint32_t count);
77 /**
78 * Adds a constant 2D vector to all of the vectors in an input array and stores the results in an output array.
79 * This function point could be pointed to one of ne10_addc_vec2f_c, ne10_addc_vec2f_neon and ne10_addc_vec2f_asm.
80 * @param[out] dst Pointer to the destination array
81 * @param[in] src Pointer to the source array
82 * @param[in] cst Pointer to the 2D vector added to the input values
83 * @param[in] count The number of items in the input array
84 */
85 extern ne10_result_t (*ne10_addc_vec2f) (ne10_vec2f_t * dst, ne10_vec2f_t * src, const ne10_vec2f_t * cst, ne10_uint32_t count);
86 extern ne10_result_t ne10_addc_vec2f_c (ne10_vec2f_t * dst, ne10_vec2f_t * src, const ne10_vec2f_t * cst, ne10_uint32_t count);
87 extern ne10_result_t ne10_addc_vec2f_neon (ne10_vec2f_t * dst, ne10_vec2f_t * src, const ne10_vec2f_t * cst, ne10_uint32_t count) asm ("ne10_addc_vec2f_neon");
88 extern ne10_result_t ne10_addc_vec2f_asm (ne10_vec2f_t * dst, ne10_vec2f_t * src, const ne10_vec2f_t * cst, ne10_uint32_t count);
89 /**
90 * Adds a constant 3D vector to all of the vectors in an input array and stores the results in an output array.
91 * This function point could be pointed to one of ne10_addc_vec3f_c, ne10_addc_vec3f_neon and ne10_addc_vec3f_asm.
92 * @param[out] dst Pointer to the destination array
93 * @param[in] src Pointer to the source array
94 * @param[in] cst Pointer to the 3D vector added to the input values
95 * @param[in] count The number of items in the input array
96 */
97 extern ne10_result_t (*ne10_addc_vec3f) (ne10_vec3f_t * dst, ne10_vec3f_t * src, const ne10_vec3f_t * cst, ne10_uint32_t count);
98 extern ne10_result_t ne10_addc_vec3f_c (ne10_vec3f_t * dst, ne10_vec3f_t * src, const ne10_vec3f_t * cst, ne10_uint32_t count);
99 extern ne10_result_t ne10_addc_vec3f_neon (ne10_vec3f_t * dst, ne10_vec3f_t * src, const ne10_vec3f_t * cst, ne10_uint32_t count) asm ("ne10_addc_vec3f_neon");
100 extern ne10_result_t ne10_addc_vec3f_asm (ne10_vec3f_t * dst, ne10_vec3f_t * src, const ne10_vec3f_t * cst, ne10_uint32_t count);
101 /**
102 * Adds a constant 4D vector to all of the vectors in an input array and stores the results in an output array.
103 * This function point could be pointed to one of ne10_addc_vec4f_c, ne10_addc_vec4f_neon and ne10_addc_vec4f_asm.
104 * @param[out] dst Pointer to the destination array
105 * @param[in] src Pointer to the source array
106 * @param[in] cst Pointer to the 4D vector added to the input values
107 * @param[in] count The number of items in the input array
108 */
109 extern ne10_result_t (*ne10_addc_vec4f) (ne10_vec4f_t * dst, ne10_vec4f_t * src, const ne10_vec4f_t * cst, ne10_uint32_t count);
110 extern ne10_result_t ne10_addc_vec4f_c (ne10_vec4f_t * dst, ne10_vec4f_t * src, const ne10_vec4f_t * cst, ne10_uint32_t count);
111 extern ne10_result_t ne10_addc_vec4f_neon (ne10_vec4f_t * dst, ne10_vec4f_t * src, const ne10_vec4f_t * cst, ne10_uint32_t count) asm ("ne10_addc_vec4f_neon");
112 extern ne10_result_t ne10_addc_vec4f_asm (ne10_vec4f_t * dst, ne10_vec4f_t * src, const ne10_vec4f_t * cst, ne10_uint32_t count);
113
114
115 /**
116 * Adds the elements of src1 to the elements of src2 and stores the results in the dst.
117 * This function point could be pointed to one of ne10_add_float_c, ne10_add_float_neon and ne10_add_float_asm.
118 * @param[out] dst Pointer to the destination array
119 * @param[in] src1 The first array to use as the input array
120 * @param[in] src2 The second array to use as the input array
121 * @param[in] count The number of items in the two input arrays
122 */
123 extern ne10_result_t (*ne10_add_float) (ne10_float32_t * dst, ne10_float32_t * src1, ne10_float32_t * src2, ne10_uint32_t count);
124 extern ne10_result_t ne10_add_float_c (ne10_float32_t * dst, ne10_float32_t * src1, ne10_float32_t * src2, ne10_uint32_t count);
125 extern ne10_result_t ne10_add_float_neon (ne10_float32_t * dst, ne10_float32_t * src1, ne10_float32_t * src2, ne10_uint32_t count) asm ("ne10_add_float_neon");
126 extern ne10_result_t ne10_add_float_asm (ne10_float32_t * dst, ne10_float32_t * src1, ne10_float32_t * src2, ne10_uint32_t count);
127 /**
128 * Vector addition of two 2D vectors.
129 * This function point could be pointed to one of ne10_add_vec2f_c, ne10_add_vec2f_neon and ne10_add_vec2f_asm.
130 * @param[out] dst Pointer to the destination array
131 * @param[in] src1 Pointer to the first source array
132 * @param[in] src2 Pointer to the second source array
133 * @param[in] count The number of items in the input arrays
134 */
135 extern ne10_result_t (*ne10_add_vec2f) (ne10_vec2f_t * dst, ne10_vec2f_t * src1, ne10_vec2f_t * src2, ne10_uint32_t count);
136 extern ne10_result_t ne10_add_vec2f_c (ne10_vec2f_t * dst, ne10_vec2f_t * src1, ne10_vec2f_t * src2, ne10_uint32_t count);
137 extern ne10_result_t ne10_add_vec2f_neon (ne10_vec2f_t * dst, ne10_vec2f_t * src1, ne10_vec2f_t * src2, ne10_uint32_t count) asm ("ne10_add_vec2f_neon");
138 extern ne10_result_t ne10_add_vec2f_asm (ne10_vec2f_t * dst, ne10_vec2f_t * src1, ne10_vec2f_t * src2, ne10_uint32_t count);
139 /**
140 * Vector addition of two 3D vectors.
141 * This function point could be pointed to one of ne10_add_vec3f_c, ne10_add_vec3f_neon and ne10_add_vec3f_asm.
142 * @param[out] dst Pointer to the destination array
143 * @param[in] src1 Pointer to the first source array
144 * @param[in] src2 Pointer to the second source array
145 * @param[in] count The number of items in the input arrays
146 */
147 extern ne10_result_t (*ne10_add_vec3f) (ne10_vec3f_t * dst, ne10_vec3f_t * src1, ne10_vec3f_t * src2, ne10_uint32_t count);
148 extern ne10_result_t ne10_add_vec3f_c (ne10_vec3f_t * dst, ne10_vec3f_t * src1, ne10_vec3f_t * src2, ne10_uint32_t count);
149 extern ne10_result_t ne10_add_vec3f_neon (ne10_vec3f_t * dst, ne10_vec3f_t * src1, ne10_vec3f_t * src2, ne10_uint32_t count) asm ("ne10_add_vec3f_neon");
150 extern ne10_result_t ne10_add_vec3f_asm (ne10_vec3f_t * dst, ne10_vec3f_t * src1, ne10_vec3f_t * src2, ne10_uint32_t count);
151 /**
152 * Vector addition of two 4D vectors.
153 * This function point could be pointed to one of ne10_add_vec4f_c, ne10_add_vec4f_neon and ne10_add_vec4f_asm.
154 * @param[out] dst Pointer to the destination array
155 * @param[in] src1 Pointer to the first source array
156 * @param[in] src2 Pointer to the second source array
157 * @param[in] count The number of items in the input arrays
158 */
159 extern ne10_result_t (*ne10_add_vec4f) (ne10_vec4f_t * dst, ne10_vec4f_t * src1, ne10_vec4f_t * src2, ne10_uint32_t count);
160 extern ne10_result_t ne10_add_vec4f_c (ne10_vec4f_t * dst, ne10_vec4f_t * src1, ne10_vec4f_t * src2, ne10_uint32_t count);
161 extern ne10_result_t ne10_add_vec4f_neon (ne10_vec4f_t * dst, ne10_vec4f_t * src1, ne10_vec4f_t * src2, ne10_uint32_t count) asm ("ne10_add_vec4f_neon");
162 extern ne10_result_t ne10_add_vec4f_asm (ne10_vec4f_t * dst, ne10_vec4f_t * src1, ne10_vec4f_t * src2, ne10_uint32_t count);
163 /** @} */ //end of Vector Add group
164
165 /**
166 * @ingroup groupMaths
167 */
168
169 /**
170 * @defgroup ADD_MAT Matrix Add
171 *
172 * \par
173 * These functions implement the matrix add operation for float data type.
174 */
175
176 /**
177 * @addtogroup ADD_MAT
178 * @{
179 */
180
181 /**
182 * Vector addition of two 4x4 matrixs.
183 * This function point could be pointed to one of ne10_addmat_4x4f_c, ne10_addmat_4x4f_neon and ne10_addmat_4x4f_asm.
184 * @param[out] dst Pointer to the destination array
185 * @param[in] src1 Pointer to the first source array
186 * @param[in] src2 Pointer to the second source array
187 * @param[in] count The number of items in the input arrays
188 */
189 extern ne10_result_t (*ne10_addmat_4x4f) (ne10_mat4x4f_t * dst, ne10_mat4x4f_t * src1, ne10_mat4x4f_t * src2, ne10_uint32_t count);
190 extern ne10_result_t ne10_addmat_4x4f_c (ne10_mat4x4f_t * dst, ne10_mat4x4f_t * src1, ne10_mat4x4f_t * src2, ne10_uint32_t count);
191 extern ne10_result_t ne10_addmat_4x4f_neon (ne10_mat4x4f_t * dst, ne10_mat4x4f_t * src1, ne10_mat4x4f_t * src2, ne10_uint32_t count);
192 extern ne10_result_t ne10_addmat_4x4f_asm (ne10_mat4x4f_t * dst, ne10_mat4x4f_t * src1, ne10_mat4x4f_t * src2, ne10_uint32_t count);
193 /**
194 * Vector addition of two 3x3 matrixs.
195 * This function point could be pointed to one of ne10_addmat_3x3f_c, ne10_addmat_3x3f_neon and ne10_addmat_3x3f_asm.
196 * @param[out] dst Pointer to the destination array
197 * @param[in] src1 Pointer to the first source array
198 * @param[in] src2 Pointer to the second source array
199 * @param[in] count The number of items in the input arrays
200 */
201 extern ne10_result_t (*ne10_addmat_3x3f) (ne10_mat3x3f_t * dst, ne10_mat3x3f_t * src1, ne10_mat3x3f_t * src2, ne10_uint32_t count);
202 extern ne10_result_t ne10_addmat_3x3f_c (ne10_mat3x3f_t * dst, ne10_mat3x3f_t * src1, ne10_mat3x3f_t * src2, ne10_uint32_t count);
203 extern ne10_result_t ne10_addmat_3x3f_neon (ne10_mat3x3f_t * dst, ne10_mat3x3f_t * src1, ne10_mat3x3f_t * src2, ne10_uint32_t count);
204 extern ne10_result_t ne10_addmat_3x3f_asm (ne10_mat3x3f_t * dst, ne10_mat3x3f_t * src1, ne10_mat3x3f_t * src2, ne10_uint32_t count);
205 /**
206 * Vector addition of two 2x2 matrixs.
207 * This function point could be pointed to one of ne10_addmat_2x2f_c, ne10_addmat_2x2f_neon and ne10_addmat_2x2f_asm.
208 * @param[out] dst Pointer to the destination array
209 * @param[in] src1 Pointer to the first source array
210 * @param[in] src2 Pointer to the second source array
211 * @param[in] count The number of items in the input arrays
212 */
213 extern ne10_result_t (*ne10_addmat_2x2f) (ne10_mat2x2f_t * dst, ne10_mat2x2f_t * src1, ne10_mat2x2f_t * src2, ne10_uint32_t count);
214 extern ne10_result_t ne10_addmat_2x2f_c (ne10_mat2x2f_t * dst, ne10_mat2x2f_t * src1, ne10_mat2x2f_t * src2, ne10_uint32_t count);
215 extern ne10_result_t ne10_addmat_2x2f_neon (ne10_mat2x2f_t * dst, ne10_mat2x2f_t * src1, ne10_mat2x2f_t * src2, ne10_uint32_t count);
216 extern ne10_result_t ne10_addmat_2x2f_asm (ne10_mat2x2f_t * dst, ne10_mat2x2f_t * src1, ne10_mat2x2f_t * src2, ne10_uint32_t count);
217 /** @} */ //end of Matrix Add group
218
219
220 /**
221 * @ingroup groupMaths
222 */
223
224 /**
225 * @defgroup SUB_VEC Vector Sub
226 *
227 * \par
228 * These functions implement the vector sub operation for float data type.
229 */
230
231 /**
232 * @addtogroup SUB_VEC
233 * @{
234 */
235
236 /**
237 * Subtracts a constant scalar from all the elements of an input array and stores the results in an output array.
238 * This function point could be pointed to one of ne10_subc_float_c, ne10_subc_float_neon and ne10_subc_float_asm.
239 * @param[out] dst Pointer to the destination array
240 * @param[in] src Pointer to the source array
241 * @param[in] cst The constant scalar subtracted from the input values
242 * @param[in] count The number of items in the input array
243 */
244 extern ne10_result_t (*ne10_subc_float) (ne10_float32_t * dst, ne10_float32_t * src, const ne10_float32_t cst, ne10_uint32_t count);
245 extern ne10_result_t ne10_subc_float_c (ne10_float32_t * dst, ne10_float32_t * src, const ne10_float32_t cst, ne10_uint32_t count); // subtract cst from the element(s)
246 extern ne10_result_t ne10_subc_float_neon (ne10_float32_t * dst, ne10_float32_t * src, const ne10_float32_t cst, ne10_uint32_t count); // subtract cst from the element(s)
247 extern ne10_result_t ne10_subc_float_asm (ne10_float32_t * dst, ne10_float32_t * src, const ne10_float32_t cst, ne10_uint32_t count); // subtract cst from the element(s)
248 /**
249 * Subtracts a constant 2D vector from all of the vectors in an input array and stores the results in an output array.
250 * This function point could be pointed to one of ne10_subc_vec2f_c, ne10_subc_vec2f_neon and ne10_subc_vec2f_asm.
251 * @param[out] dst Pointer to the destination array
252 * @param[in] src Pointer to the source array
253 * @param[in] cst Pointer to the 2D vector subtracted from the input values
254 * @param[in] count The number of items in the input array
255 */
256 extern ne10_result_t (*ne10_subc_vec2f) (ne10_vec2f_t * dst, ne10_vec2f_t * src, const ne10_vec2f_t * cst, ne10_uint32_t count);
257 extern ne10_result_t ne10_subc_vec2f_c (ne10_vec2f_t * dst, ne10_vec2f_t * src, const ne10_vec2f_t * cst, ne10_uint32_t count); // subtract cst from the element(s)
258 extern ne10_result_t ne10_subc_vec2f_neon (ne10_vec2f_t * dst, ne10_vec2f_t * src, const ne10_vec2f_t * cst, ne10_uint32_t count); // subtract cst from the element(s)
259 extern ne10_result_t ne10_subc_vec2f_asm (ne10_vec2f_t * dst, ne10_vec2f_t * src, const ne10_vec2f_t * cst, ne10_uint32_t count); // subtract cst from the element(s)
260 /**
261 * Subtracts a constant 3D vector from all of the vectors in an input array and stores the results in an output array.
262 * This function point could be pointed to one of ne10_subc_vec3f_c, ne10_subc_vec3f_neon and ne10_subc_vec3f_asm.
263 * @param[out] dst Pointer to the destination array
264 * @param[in] src Pointer to the source array
265 * @param[in] cst Pointer to the 3D vector subtracted from the input values
266 * @param[in] count The number of items in the input array
267 */
268 extern ne10_result_t (*ne10_subc_vec3f) (ne10_vec3f_t * dst, ne10_vec3f_t * src, const ne10_vec3f_t * cst, ne10_uint32_t count);
269 extern ne10_result_t ne10_subc_vec3f_c (ne10_vec3f_t * dst, ne10_vec3f_t * src, const ne10_vec3f_t * cst, ne10_uint32_t count); // subtract cst from the element(s)
270 extern ne10_result_t ne10_subc_vec3f_neon (ne10_vec3f_t * dst, ne10_vec3f_t * src, const ne10_vec3f_t * cst, ne10_uint32_t count); // subtract cst from the element(s)
271 extern ne10_result_t ne10_subc_vec3f_asm (ne10_vec3f_t * dst, ne10_vec3f_t * src, const ne10_vec3f_t * cst, ne10_uint32_t count); // subtract cst from the element(s)
272 /**
273 * Subtracts a constant 4D vector from all of the vectors in an input array and stores the results in an output array.
274 * This function point could be pointed to one of ne10_subc_vec4f_c, ne10_subc_vec4f_neon and ne10_subc_vec4f_asm.
275 * @param[out] dst Pointer to the destination array
276 * @param[in] src Pointer to the source array
277 * @param[in] cst Pointer to the 4D vector subtracted from the input values
278 * @param[in] count The number of items in the input array
279 */
280 extern ne10_result_t (*ne10_subc_vec4f) (ne10_vec4f_t * dst, ne10_vec4f_t * src, const ne10_vec4f_t * cst, ne10_uint32_t count);
281 extern ne10_result_t ne10_subc_vec4f_c (ne10_vec4f_t * dst, ne10_vec4f_t * src, const ne10_vec4f_t * cst, ne10_uint32_t count); // subtract cst from the element(s)
282 extern ne10_result_t ne10_subc_vec4f_neon (ne10_vec4f_t * dst, ne10_vec4f_t * src, const ne10_vec4f_t * cst, ne10_uint32_t count); // subtract cst from the element(s)
283 extern ne10_result_t ne10_subc_vec4f_asm (ne10_vec4f_t * dst, ne10_vec4f_t * src, const ne10_vec4f_t * cst, ne10_uint32_t count); // subtract cst from the element(s)
284
285 /**
286 * Subtracts the elements of src2 from the elements of src1 and stores the results in the dst.
287 * This function point could be pointed to one of ne10_sub_float_c, ne10_sub_float_neon and ne10_sub_float_asm.
288 * @param[out] dst Pointer to the destination array
289 * @param[in] src1 The first array to use as the input array
290 * @param[in] src2 The second array to use as the input array
291 * @param[in] count The number of items in the two input arrays
292 */
293 extern ne10_result_t (*ne10_sub_float) (ne10_float32_t * dst, ne10_float32_t * src1, ne10_float32_t * src2, ne10_uint32_t count);
294 extern ne10_result_t ne10_sub_float_c (ne10_float32_t * dst, ne10_float32_t * src1, ne10_float32_t * src2, ne10_uint32_t count);
295 extern ne10_result_t ne10_sub_float_neon (ne10_float32_t * dst, ne10_float32_t * src1, ne10_float32_t * src2, ne10_uint32_t count) asm ("ne10_sub_float_neon");
296 extern ne10_result_t ne10_sub_float_asm (ne10_float32_t * dst, ne10_float32_t * src1, ne10_float32_t * src2, ne10_uint32_t count);
297 /**
298 * Vector subtraction of two 2D vectors.
299 * This function point could be pointed to one of ne10_sub_vec2f_c, ne10_sub_vec2f_neon and ne10_sub_vec2f_asm.
300 * @param[out] dst Pointer to the destination array
301 * @param[in] src1 Pointer to the first source array
302 * @param[in] src2 Pointer to the second source array
303 * @param[in] count The number of items in the input arrays
304 */
305 extern ne10_result_t (*ne10_sub_vec2f) (ne10_vec2f_t * dst, ne10_vec2f_t * src1, ne10_vec2f_t * src2, ne10_uint32_t count);
306 extern ne10_result_t ne10_sub_vec2f_c (ne10_vec2f_t * dst, ne10_vec2f_t * src1, ne10_vec2f_t * src2, ne10_uint32_t count);
307 extern ne10_result_t ne10_sub_vec2f_neon (ne10_vec2f_t * dst, ne10_vec2f_t * src1, ne10_vec2f_t * src2, ne10_uint32_t count) asm ("ne10_sub_vec2f_neon");
308 extern ne10_result_t ne10_sub_vec2f_asm (ne10_vec2f_t * dst, ne10_vec2f_t * src1, ne10_vec2f_t * src2, ne10_uint32_t count);
309 /**
310 * Vector subtraction of two 3D vectors.
311 * This function point could be pointed to one of ne10_sub_vec3f_c, ne10_sub_vec3f_neon and ne10_sub_vec3f_asm.
312 * @param[out] dst Pointer to the destination array
313 * @param[in] src1 Pointer to the first source array
314 * @param[in] src2 Pointer to the second source array
315 * @param[in] count The number of items in the input arrays
316 */
317 extern ne10_result_t (*ne10_sub_vec3f) (ne10_vec3f_t * dst, ne10_vec3f_t * src1, ne10_vec3f_t * src2, ne10_uint32_t count);
318 extern ne10_result_t ne10_sub_vec3f_c (ne10_vec3f_t * dst, ne10_vec3f_t * src1, ne10_vec3f_t * src2, ne10_uint32_t count);
319 extern ne10_result_t ne10_sub_vec3f_neon (ne10_vec3f_t * dst, ne10_vec3f_t * src1, ne10_vec3f_t * src2, ne10_uint32_t count) asm ("ne10_sub_vec3f_neon");
320 extern ne10_result_t ne10_sub_vec3f_asm (ne10_vec3f_t * dst, ne10_vec3f_t * src1, ne10_vec3f_t * src2, ne10_uint32_t count);
321 /**
322 * Vector subtraction of two 4D vectors.
323 * This function point could be pointed to one of ne10_sub_vec4f_c, ne10_sub_vec4f_neon and ne10_sub_vec4f_asm.
324 * @param[out] dst Pointer to the destination array
325 * @param[in] src1 Pointer to the first source array
326 * @param[in] src2 Pointer to the second source array
327 * @param[in] count The number of items in the input arrays
328 */
329 extern ne10_result_t (*ne10_sub_vec4f) (ne10_vec4f_t * dst, ne10_vec4f_t * src1, ne10_vec4f_t * src2, ne10_uint32_t count);
330 extern ne10_result_t ne10_sub_vec4f_c (ne10_vec4f_t * dst, ne10_vec4f_t * src1, ne10_vec4f_t * src2, ne10_uint32_t count);
331 extern ne10_result_t ne10_sub_vec4f_neon (ne10_vec4f_t * dst, ne10_vec4f_t * src1, ne10_vec4f_t * src2, ne10_uint32_t count) asm ("ne10_sub_vec4f_neon");
332 extern ne10_result_t ne10_sub_vec4f_asm (ne10_vec4f_t * dst, ne10_vec4f_t * src1, ne10_vec4f_t * src2, ne10_uint32_t count);
333 /** @} */ //end of Vector Sub group
334
335 /**
336 * @ingroup groupMaths
337 */
338
339 /**
340 * @defgroup RSBC Vector Rsbc
341 *
342 * \par
343 * These functions implement the vector rsbc operation for float data type.
344 */
345
346 /**
347 * @addtogroup RSBC
348 * @{
349 */
350 /**
351 * Subtracts the elements of an input array from a constant scalar and stores the results in an output array.
352 * This function point could be pointed to one of ne10_rsbc_float_c, ne10_rsbc_float_neon and ne10_rsbc_float_asm.
353 * @param[out] dst Pointer to the destination array
354 * @param[in] src Pointer to the source array
355 * @param[in] cst The constant scalar to subtract the input values from
356 * @param[in] count The number of items in the input array
357 */
358 extern ne10_result_t (*ne10_rsbc_float) (ne10_float32_t * dst, ne10_float32_t *src, const ne10_float32_t cst, ne10_uint32_t count);
359 extern ne10_result_t ne10_rsbc_float_c (ne10_float32_t * dst, ne10_float32_t * src, const ne10_float32_t cst, ne10_uint32_t count); // subtract element(s) from a cst
360 extern ne10_result_t ne10_rsbc_float_neon (ne10_float32_t * dst, ne10_float32_t * src, const ne10_float32_t cst, ne10_uint32_t count); // subtract element(s) from a cst
361 extern ne10_result_t ne10_rsbc_float_asm (ne10_float32_t * dst, ne10_float32_t *src, const ne10_float32_t cst, ne10_uint32_t count); // subtract element(s) from a cst
362 /**
363 * Subtracts the vectors in an input array from a constant 2D vector and stores the results in an output array.
364 * This function point could be pointed to one of ne10_rsbc_vec2f_c, ne10_rsbc_vec2f_neon and ne10_rsbc_vec2f_asm.
365 * @param[out] dst Pointer to the destination array
366 * @param[in] src Pointer to the source array
367 * @param[in] cst Pointer to the 2D vector to subtract the input values from
368 * @param[in] count The number of items in the input array
369 */
370 extern ne10_result_t (*ne10_rsbc_vec2f) (ne10_vec2f_t * dst, ne10_vec2f_t * src, const ne10_vec2f_t * cst, ne10_uint32_t count);
371 extern ne10_result_t ne10_rsbc_vec2f_c (ne10_vec2f_t * dst, ne10_vec2f_t * src, const ne10_vec2f_t * cst, ne10_uint32_t count); // subtract element(s) from a cst
372 extern ne10_result_t ne10_rsbc_vec2f_neon (ne10_vec2f_t * dst, ne10_vec2f_t * src, const ne10_vec2f_t * cst, ne10_uint32_t count); // subtract element(s) from a cst
373 extern ne10_result_t ne10_rsbc_vec2f_asm (ne10_vec2f_t * dst, ne10_vec2f_t *src, const ne10_vec2f_t * cst, ne10_uint32_t count); // subtract element(s) from a cst
374 /**
375 * Subtracts the vectors in an input array from a constant 3D vector and stores the results in an output array.
376 * This function point could be pointed to one of ne10_rsbc_vec3f_c, ne10_rsbc_vec3f_neon and ne10_rsbc_vec3f_asm.
377 * @param[out] dst Pointer to the destination array
378 * @param[in] src Pointer to the source array
379 * @param[in] cst Pointer to the 3D vector to subtract the input values from
380 * @param[in] count The number of items in the input array
381 */
382 extern ne10_result_t (*ne10_rsbc_vec3f) (ne10_vec3f_t * dst, ne10_vec3f_t * src, const ne10_vec3f_t * cst, ne10_uint32_t count);
383 extern ne10_result_t ne10_rsbc_vec3f_c (ne10_vec3f_t * dst, ne10_vec3f_t * src, const ne10_vec3f_t * cst, ne10_uint32_t count); // subtract element(s) from a cst
384 extern ne10_result_t ne10_rsbc_vec3f_neon (ne10_vec3f_t * dst, ne10_vec3f_t * src, const ne10_vec3f_t * cst, ne10_uint32_t count); // subtract element(s) from a cst
385 extern ne10_result_t ne10_rsbc_vec3f_asm (ne10_vec3f_t * dst, ne10_vec3f_t *src, const ne10_vec3f_t * cst, ne10_uint32_t count); // subtract element(s) from a cst
386 /**
387 * Subtracts the vectors in an input array from a constant 4D vector and stores the results in an output array.
388 * This function point could be pointed to one of ne10_rsbc_vec4f_c, ne10_rsbc_vec4f_neon and ne10_rsbc_vec4f_asm.
389 * @param[out] dst Pointer to the destination array
390 * @param[in] src Pointer to the source array
391 * @param[in] cst Pointer to the 4D vector to subtract the input values from
392 * @param[in] count The number of items in the input array
393 */
394 extern ne10_result_t (*ne10_rsbc_vec4f) (ne10_vec4f_t * dst, ne10_vec4f_t * src, const ne10_vec4f_t * cst, ne10_uint32_t count);
395 extern ne10_result_t ne10_rsbc_vec4f_c (ne10_vec4f_t * dst, ne10_vec4f_t * src, const ne10_vec4f_t * cst, ne10_uint32_t count); // subtract element(s) from a cst
396 extern ne10_result_t ne10_rsbc_vec4f_neon (ne10_vec4f_t * dst, ne10_vec4f_t * src, const ne10_vec4f_t * cst, ne10_uint32_t count); // subtract element(s) from a cst
397 extern ne10_result_t ne10_rsbc_vec4f_asm (ne10_vec4f_t * dst, ne10_vec4f_t *src, const ne10_vec4f_t * cst, ne10_uint32_t count); // subtract element(s) from a cst
398 /** @} */ //end of Vector RSBC group
399
400 /**
401 * @ingroup groupMaths
402 */
403
404 /**
405 * @defgroup SUB_MAT Matrix Sub
406 *
407 * \par
408 * These functions implement the matrix sub operation for float data type.
409 */
410
411 /**
412 * @addtogroup SUB_MAT
413 * @{
414 */
415 /**
416 * Matrix subtraction of two 4x4 matrixs.
417 * This function point could be pointed to one of ne10_submat_4x4f_c, ne10_submat_4x4f_neon and ne10_submat_4x4f_asm.
418 * @param[out] dst Pointer to the destination array
419 * @param[in] src1 Pointer to the first source array
420 * @param[in] src2 Pointer to the second source array
421 * @param[in] count The number of items in the input arrays
422 */
423 extern ne10_result_t (*ne10_submat_4x4f) (ne10_mat4x4f_t * dst, ne10_mat4x4f_t * src1, ne10_mat4x4f_t * src2, ne10_uint32_t count);
424 extern ne10_result_t ne10_submat_4x4f_c (ne10_mat4x4f_t * dst, ne10_mat4x4f_t * src1, ne10_mat4x4f_t * src2, ne10_uint32_t count);
425 extern ne10_result_t ne10_submat_4x4f_neon (ne10_mat4x4f_t * dst, ne10_mat4x4f_t * src1, ne10_mat4x4f_t * src2, ne10_uint32_t count);
426 extern ne10_result_t ne10_submat_4x4f_asm (ne10_mat4x4f_t * dst, ne10_mat4x4f_t * src1, ne10_mat4x4f_t * src2, ne10_uint32_t count);
427
428 /**
429 * Matrix subtraction of two 3x3 matrixs.
430 * This function point could be pointed to one of ne10_submat_3x3f_c, ne10_submat_3x3f_neon and ne10_submat_3x3f_asm.
431 * @param[out] dst Pointer to the destination array
432 * @param[in] src1 Pointer to the first source array
433 * @param[in] src2 Pointer to the second source array
434 * @param[in] count The number of items in the input arrays
435 */
436 extern ne10_result_t (*ne10_submat_3x3f) (ne10_mat3x3f_t * dst, ne10_mat3x3f_t * src1, ne10_mat3x3f_t * src2, ne10_uint32_t count);
437 extern ne10_result_t ne10_submat_3x3f_c (ne10_mat3x3f_t * dst, ne10_mat3x3f_t * src1, ne10_mat3x3f_t * src2, ne10_uint32_t count);
438 extern ne10_result_t ne10_submat_3x3f_neon (ne10_mat3x3f_t * dst, ne10_mat3x3f_t * src1, ne10_mat3x3f_t * src2, ne10_uint32_t count);
439 extern ne10_result_t ne10_submat_3x3f_asm (ne10_mat3x3f_t * dst, ne10_mat3x3f_t * src1, ne10_mat3x3f_t * src2, ne10_uint32_t count);
440
441 /**
442 * Matrix subtraction of two 2x2 matrixs.
443 * This function point could be pointed to one of ne10_submat_2x2f_c, ne10_submat_2x2f_neon and ne10_submat_2x2f_asm.
444 * @param[out] dst Pointer to the destination array
445 * @param[in] src1 Pointer to the first source array
446 * @param[in] src2 Pointer to the second source array
447 * @param[in] count The number of items in the input arrays
448 */
449 extern ne10_result_t (*ne10_submat_2x2f) (ne10_mat2x2f_t * dst, ne10_mat2x2f_t * src1, ne10_mat2x2f_t * src2, ne10_uint32_t count);
450 extern ne10_result_t ne10_submat_2x2f_c (ne10_mat2x2f_t * dst, ne10_mat2x2f_t * src1, ne10_mat2x2f_t * src2, ne10_uint32_t count);
451 extern ne10_result_t ne10_submat_2x2f_neon (ne10_mat2x2f_t * dst, ne10_mat2x2f_t * src1, ne10_mat2x2f_t * src2, ne10_uint32_t count);
452 extern ne10_result_t ne10_submat_2x2f_asm (ne10_mat2x2f_t * dst, ne10_mat2x2f_t * src1, ne10_mat2x2f_t * src2, ne10_uint32_t count);
453 /** @} */ //end of Matrix Sub group
454
455 /**
456 * @ingroup groupMaths
457 */
458
459 /**
460 * @defgroup MUL_VEC Vector Multiply
461 *
462 * \par
463 * These functions implement the vector multiply operation for float data type.
464 */
465
466 /**
467 * @addtogroup MUL_VEC
468 * @{
469 */
470
471 /**
472 * Multiplies the elements of an input array by a constant scalar and stores the results in an output array.
473 * This function point could be pointed to one of ne10_mulc_float_c, ne10_mulc_float_neon and ne10_mulc_float_asm.
474 * @param[out] dst Pointer to the destination array
475 * @param[in] src Pointer to the source array
476 * @param[in] cst The constant scalar to multiply the input values with
477 * @param[in] count The number of items in the input array
478 */
479 extern ne10_result_t (*ne10_mulc_float) (ne10_float32_t * dst, ne10_float32_t * src, const ne10_float32_t cst, ne10_uint32_t count);
480 extern ne10_result_t ne10_mulc_float_c (ne10_float32_t * dst, ne10_float32_t * src, const ne10_float32_t cst, ne10_uint32_t count);
481 extern ne10_result_t ne10_mulc_float_neon (ne10_float32_t * dst, ne10_float32_t * src, const ne10_float32_t cst, ne10_uint32_t count);
482 extern ne10_result_t ne10_mulc_float_asm (ne10_float32_t * dst, ne10_float32_t * src, const ne10_float32_t cst, ne10_uint32_t count);
483 /**
484 * Multiplies the components of 2D vectors in an input array by the components of a constant 2D vector and stores the results in an output array.
485 * This function point could be pointed to one of ne10_mulc_vec2f_c, ne10_mulc_vec2f_neon and ne10_mulc_vec2f_asm.
486 * @param[out] dst Pointer to the destination array
487 * @param[in] src Pointer to the source array
488 * @param[in] cst Pointer to the 2D vector to multiply the input values with
489 * @param[in] count The number of items in the input array
490 */
491 extern ne10_result_t (*ne10_mulc_vec2f) (ne10_vec2f_t * dst, ne10_vec2f_t * src, const ne10_vec2f_t * cst, ne10_uint32_t count);
492 extern ne10_result_t ne10_mulc_vec2f_c (ne10_vec2f_t * dst, ne10_vec2f_t * src, const ne10_vec2f_t * cst, ne10_uint32_t count);
493 extern ne10_result_t ne10_mulc_vec2f_neon (ne10_vec2f_t * dst, ne10_vec2f_t * src, const ne10_vec2f_t * cst, ne10_uint32_t count);
494 extern ne10_result_t ne10_mulc_vec2f_asm (ne10_vec2f_t * dst, ne10_vec2f_t * src, const ne10_vec2f_t * cst, ne10_uint32_t count);
495 /**
496 * Multiplies the components of 3D vectors in an input array by the components of a constant 3D vector and stores the results in an output array.
497 * This function point could be pointed to one of ne10_mulc_vec3f_c, ne10_mulc_vec3f_neon and ne10_mulc_vec3f_asm.
498 * @param[out] dst Pointer to the destination array
499 * @param[in] src Pointer to the source array
500 * @param[in] cst Pointer to the 3D vector to multiply the input values with
501 * @param[in] count The number of items in the input array
502 */
503 extern ne10_result_t (*ne10_mulc_vec3f) (ne10_vec3f_t * dst, ne10_vec3f_t * src, const ne10_vec3f_t * cst, ne10_uint32_t count);
504 extern ne10_result_t ne10_mulc_vec3f_c (ne10_vec3f_t * dst, ne10_vec3f_t * src, const ne10_vec3f_t * cst, ne10_uint32_t count);
505 extern ne10_result_t ne10_mulc_vec3f_neon (ne10_vec3f_t * dst, ne10_vec3f_t * src, const ne10_vec3f_t * cst, ne10_uint32_t count);
506 extern ne10_result_t ne10_mulc_vec3f_asm (ne10_vec3f_t * dst, ne10_vec3f_t * src, const ne10_vec3f_t * cst, ne10_uint32_t count);
507 /**
508 * Multiplies the components of 4D vectors in an input array by the components of a constant 4D vector and stores the results in an output array.
509 * This function point could be pointed to one of ne10_mulc_vec4f_c, ne10_mulc_vec4f_neon and ne10_mulc_vec4f_asm.
510 * @param[out] dst Pointer to the destination array
511 * @param[in] src Pointer to the source array
512 * @param[in] cst Pointer to the 4D vector to multiply the input values with
513 * @param[in] count The number of items in the input array
514 */
515 extern ne10_result_t (*ne10_mulc_vec4f) (ne10_vec4f_t * dst, ne10_vec4f_t * src, const ne10_vec4f_t * cst, ne10_uint32_t count);
516 extern ne10_result_t ne10_mulc_vec4f_c (ne10_vec4f_t * dst, ne10_vec4f_t * src, const ne10_vec4f_t * cst, ne10_uint32_t count);
517 extern ne10_result_t ne10_mulc_vec4f_neon (ne10_vec4f_t * dst, ne10_vec4f_t * src, const ne10_vec4f_t * cst, ne10_uint32_t count);
518 extern ne10_result_t ne10_mulc_vec4f_asm (ne10_vec4f_t * dst, ne10_vec4f_t * src, const ne10_vec4f_t * cst, ne10_uint32_t count);
519
520 /**
521 * Multiplies the elements of src1 by the elements of src2 and stores the results in the dst.
522 * This function point could be pointed to one of ne10_mul_float_c, ne10_mul_float_neon and ne10_mul_float_asm.
523 * @param[out] dst Pointer to the destination array
524 * @param[in] src1 The first array to use as the input array
525 * @param[in] src2 The second array to use as the input array
526 * @param[in] count The number of items in the two input arrays
527 */
528 extern ne10_result_t (*ne10_mul_float) (ne10_float32_t * dst, ne10_float32_t * src1, ne10_float32_t * src2, ne10_uint32_t count);
529 extern ne10_result_t ne10_mul_float_c (ne10_float32_t * dst, ne10_float32_t * src1, ne10_float32_t * src2, ne10_uint32_t count);
530 extern ne10_result_t ne10_mul_float_neon (ne10_float32_t * dst, ne10_float32_t * src1, ne10_float32_t * src2, ne10_uint32_t count) asm ("ne10_mul_float_neon");
531 extern ne10_result_t ne10_mul_float_asm (ne10_float32_t * dst, ne10_float32_t * src1, ne10_float32_t * src2, ne10_uint32_t count);
532 /**
533 * Multiplies the components of a 2D vector with the corresponding components of another.
534 * This function point could be pointed to one of ne10_vmul_vec2f_c, ne10_vmul_vec2f_neon and ne10_vmul_vec2f_asm.
535 * @param[out] dst Pointer to the destination array
536 * @param[in] src1 Pointer to the first source array
537 * @param[in] src2 Pointer to the second source array
538 * @param[in] count The number of items in the input arrays
539 */
540 extern ne10_result_t (*ne10_vmul_vec2f) (ne10_vec2f_t * dst, ne10_vec2f_t * src1, ne10_vec2f_t * src2, ne10_uint32_t count);
541 extern ne10_result_t ne10_vmul_vec2f_c (ne10_vec2f_t * dst, ne10_vec2f_t * src1, ne10_vec2f_t * src2, ne10_uint32_t count);
542 extern ne10_result_t ne10_vmul_vec2f_neon (ne10_vec2f_t * dst, ne10_vec2f_t * src1, ne10_vec2f_t * src2, ne10_uint32_t count) asm ("ne10_vmul_vec2f_neon");
543 extern ne10_result_t ne10_vmul_vec2f_asm (ne10_vec2f_t * dst, ne10_vec2f_t * src1, ne10_vec2f_t * src2, ne10_uint32_t count);
544 /**
545 * Multiplies the components of a 3D vector with the corresponding components of another.
546 * This function point could be pointed to one of ne10_vmul_vec3f_c, ne10_vmul_vec3f_neon and ne10_vmul_vec3f_asm.
547 * @param[out] dst Pointer to the destination array
548 * @param[in] src1 Pointer to the first source array
549 * @param[in] src2 Pointer to the second source array
550 * @param[in] count The number of items in the input arrays
551 */
552 extern ne10_result_t (*ne10_vmul_vec3f) (ne10_vec3f_t * dst, ne10_vec3f_t * src1, ne10_vec3f_t * src2, ne10_uint32_t count);
553 extern ne10_result_t ne10_vmul_vec3f_c (ne10_vec3f_t * dst, ne10_vec3f_t * src1, ne10_vec3f_t * src2, ne10_uint32_t count);
554 extern ne10_result_t ne10_vmul_vec3f_neon (ne10_vec3f_t * dst, ne10_vec3f_t * src1, ne10_vec3f_t * src2, ne10_uint32_t count) asm ("ne10_vmul_vec3f_neon");
555 extern ne10_result_t ne10_vmul_vec3f_asm (ne10_vec3f_t * dst, ne10_vec3f_t * src1, ne10_vec3f_t * src2, ne10_uint32_t count);
556 /**
557 * Multiplies the components of a 4D vector with the corresponding components of another.
558 * This function point could be pointed to one of ne10_vmul_vec4f_c, ne10_vmul_vec4f_neon and ne10_vmul_vec4f_asm.
559 * @param[out] dst Pointer to the destination array
560 * @param[in] src1 Pointer to the first source array
561 * @param[in] src2 Pointer to the second source array
562 * @param[in] count The number of items in the input arrays
563 */
564 extern ne10_result_t (*ne10_vmul_vec4f) (ne10_vec4f_t * dst, ne10_vec4f_t * src1, ne10_vec4f_t * src2, ne10_uint32_t count);
565 extern ne10_result_t ne10_vmul_vec4f_c (ne10_vec4f_t * dst, ne10_vec4f_t * src1, ne10_vec4f_t * src2, ne10_uint32_t count);
566 extern ne10_result_t ne10_vmul_vec4f_neon (ne10_vec4f_t * dst, ne10_vec4f_t * src1, ne10_vec4f_t * src2, ne10_uint32_t count) asm ("ne10_vmul_vec4f_neon");
567 extern ne10_result_t ne10_vmul_vec4f_asm (ne10_vec4f_t * dst, ne10_vec4f_t * src1, ne10_vec4f_t * src2, ne10_uint32_t count);
568 /** @} */ //end of Vector Multiply group
569
570 /**
571 * @ingroup groupMaths
572 */
573
574 /**
575 * @defgroup MLA_VEC Vector Multiply-Accumulator
576 *
577 * \par
578 * These functions implement the vector multiply-accumulator operation for float data type.
579 */
580
581 /**
582 * @addtogroup MLA_VEC
583 * @{
584 */
585
586 /**
587 * Multiplies each entry in the source array (src) by cst, then adds the result to
588 * the corresponding item of the accumulation array (acc), and stores the result in the destination array.
589 * This function point could be pointed to one of ne10_mlac_float_c, ne10_mlac_float_neon and ne10_mlac_float_asm.
590 * @param[out] dst Pointer to the destination array
591 * @param[in] acc The corresponding elemetn is added to the result of the multiplication
592 * @param[in] src Pointer to the source array
593 * @param[in] cst The constant scalar to multiply the input elements with
594 * @param[in] count The number of items in the input array
595 */
596 extern ne10_result_t (*ne10_mlac_float) (ne10_float32_t * dst, ne10_float32_t * acc, ne10_float32_t * src, const ne10_float32_t cst, ne10_uint32_t count);
597 extern ne10_result_t ne10_mlac_float_c (ne10_float32_t * dst, ne10_float32_t * acc, ne10_float32_t * src, const ne10_float32_t cst, ne10_uint32_t count);
598 extern ne10_result_t ne10_mlac_float_neon (ne10_float32_t * dst, ne10_float32_t * acc, ne10_float32_t * src, const ne10_float32_t cst, ne10_uint32_t count);
599 extern ne10_result_t ne10_mlac_float_asm (ne10_float32_t * dst, ne10_float32_t * acc, ne10_float32_t * src, const ne10_float32_t cst, ne10_uint32_t count);
600 /**
601 * Multiplies each entry in the source array (src) by the 2D vector cst, then adds the result to
602 * the corresponding item of the accumulation array (acc), and stores the result in the destination array.
603 * This function point could be pointed to one of ne10_mlac_vec2f_c, ne10_mlac_vec2f_neon and ne10_mlac_vec2f_asm.
604 * @param[out] dst Pointer to the destination array
605 * @param[in] acc The corresponding elemetn is added to the result of the multiplication
606 * @param[in] src Pointer to the source array
607 * @param[in] cst Pointer to the 2D vector to multiply the input vectors with
608 * @param[in] count The number of items in the input array
609 */
610 extern ne10_result_t (*ne10_mlac_vec2f) (ne10_vec2f_t * dst, ne10_vec2f_t * acc, ne10_vec2f_t * src, const ne10_vec2f_t * cst, ne10_uint32_t count);
611 extern ne10_result_t ne10_mlac_vec2f_c (ne10_vec2f_t * dst, ne10_vec2f_t * acc, ne10_vec2f_t * src, const ne10_vec2f_t * cst, ne10_uint32_t count);
612 extern ne10_result_t ne10_mlac_vec2f_neon (ne10_vec2f_t * dst, ne10_vec2f_t * acc, ne10_vec2f_t * src, const ne10_vec2f_t * cst, ne10_uint32_t count);
613 extern ne10_result_t ne10_mlac_vec2f_asm (ne10_vec2f_t * dst, ne10_vec2f_t * acc, ne10_vec2f_t * src, const ne10_vec2f_t * cst, ne10_uint32_t count);
614 /**
615 * Multiplies each entry in the source array (src) by the 3D vector cst, then adds the result to
616 * the corresponding item of the accumulation array (acc), and stores the result in the destination array.
617 * This function point could be pointed to one of ne10_mlac_vec3f_c, ne10_mlac_vec3f_neon and ne10_mlac_vec3f_asm.
618 * @param[out] dst Pointer to the destination array
619 * @param[in] acc The corresponding elemetn is added to the result of the multiplication
620 * @param[in] src Pointer to the source array
621 * @param[in] cst Pointer to the 3D vector to multiply the input vectors with
622 * @param[in] count The number of items in the input array
623 */
624 extern ne10_result_t (*ne10_mlac_vec3f) (ne10_vec3f_t * dst, ne10_vec3f_t * acc, ne10_vec3f_t * src, const ne10_vec3f_t * cst, ne10_uint32_t count);
625 extern ne10_result_t ne10_mlac_vec3f_c (ne10_vec3f_t * dst, ne10_vec3f_t * acc, ne10_vec3f_t * src, const ne10_vec3f_t * cst, ne10_uint32_t count);
626 extern ne10_result_t ne10_mlac_vec3f_neon (ne10_vec3f_t * dst, ne10_vec3f_t * acc, ne10_vec3f_t * src, const ne10_vec3f_t * cst, ne10_uint32_t count);
627 extern ne10_result_t ne10_mlac_vec3f_asm (ne10_vec3f_t * dst, ne10_vec3f_t * acc, ne10_vec3f_t * src, const ne10_vec3f_t * cst, ne10_uint32_t count);
628 /**
629 * Multiplies each entry in the source array (src) by the 4D vector cst, then adds the result to
630 * the corresponding item of the accumulation array (acc), and stores the result in the destination array.
631 * This function point could be pointed to one of ne10_mlac_vec4f_c, ne10_mlac_vec4f_neon and ne10_mlac_vec4f_asm.
632 * @param[out] dst Pointer to the destination array
633 * @param[in] acc The corresponding elemetn is added to the result of the multiplication
634 * @param[in] src Pointer to the source array
635 * @param[in] cst Pointer to the 4D vector to multiply the input vectors with
636 * @param[in] count The number of items in the input array
637 */
638 extern ne10_result_t (*ne10_mlac_vec4f) (ne10_vec4f_t * dst, ne10_vec4f_t * acc, ne10_vec4f_t * src, const ne10_vec4f_t * cst, ne10_uint32_t count);
639 extern ne10_result_t ne10_mlac_vec4f_c (ne10_vec4f_t * dst, ne10_vec4f_t * acc, ne10_vec4f_t * src, const ne10_vec4f_t * cst, ne10_uint32_t count);
640 extern ne10_result_t ne10_mlac_vec4f_neon (ne10_vec4f_t * dst, ne10_vec4f_t * acc, ne10_vec4f_t * src, const ne10_vec4f_t * cst, ne10_uint32_t count);
641 extern ne10_result_t ne10_mlac_vec4f_asm (ne10_vec4f_t * dst, ne10_vec4f_t * acc, ne10_vec4f_t * src, const ne10_vec4f_t * cst, ne10_uint32_t count);
642
643 /**
644 * Performs a multiply and accumulate operation using the corresponding elements in acc, src1, and src2.
645 * This function point could be pointed to one of ne10_mla_float_c, ne10_mla_float_neon and ne10_mla_float_asm.
646 * @param[out] dst Pointer to the destination array
647 * @param[in] acc These elemtns are added to the result of the multiplication operation
648 * @param[in] src1 The first array to use as the input array
649 * @param[in] src2 The second array to use as the input array
650 * @param[in] count The number of items in the two input arrays
651 */
652 extern ne10_result_t (*ne10_mla_float) (ne10_float32_t * dst, ne10_float32_t * acc, ne10_float32_t * src1, ne10_float32_t * src2, ne10_uint32_t count);
653 extern ne10_result_t ne10_mla_float_c (ne10_float32_t * dst, ne10_float32_t * acc, ne10_float32_t * src1, ne10_float32_t * src2, ne10_uint32_t count);
654 extern ne10_result_t ne10_mla_float_neon (ne10_float32_t * dst, ne10_float32_t * acc, ne10_float32_t * src1, ne10_float32_t * src2, ne10_uint32_t count) asm ("ne10_mla_float_neon");
655 extern ne10_result_t ne10_mla_float_asm (ne10_float32_t * dst, ne10_float32_t * acc, ne10_float32_t * src1, ne10_float32_t * src2, ne10_uint32_t count);
656 /**
657 * Performs a multiply and accumulate operation on the components of a 2D vector with the corresponding components of another.
658 * This function point could be pointed to one of ne10_vmla_vec2f_c, ne10_vmla_vec2f_neon and ne10_vmla_vec2f_asm.
659 * @param[out] dst Pointer to the destination array
660 * @param[in] src1 Pointer to the first source array
661 * @param[in] src2 Pointer to the second source array
662 * @param[in] count The number of items in the input arrays
663 */
664 extern ne10_result_t (*ne10_vmla_vec2f) (ne10_vec2f_t * dst, ne10_vec2f_t * acc, ne10_vec2f_t * src1, ne10_vec2f_t * src2, ne10_uint32_t count);
665 extern ne10_result_t ne10_vmla_vec2f_c (ne10_vec2f_t * dst, ne10_vec2f_t * acc, ne10_vec2f_t * src1, ne10_vec2f_t * src2, ne10_uint32_t count);
666 extern ne10_result_t ne10_vmla_vec2f_neon (ne10_vec2f_t * dst, ne10_vec2f_t * acc, ne10_vec2f_t * src1, ne10_vec2f_t * src2, ne10_uint32_t count) asm ("ne10_vmla_vec2f_neon");
667 extern ne10_result_t ne10_vmla_vec2f_asm (ne10_vec2f_t * dst, ne10_vec2f_t * acc, ne10_vec2f_t * src1, ne10_vec2f_t * src2, ne10_uint32_t count);
668 /**
669 * Performs a multiply and accumulate operation on the components of a 3D vector with the corresponding components of another.
670 * This function point could be pointed to one of ne10_vmla_vec3f_c, ne10_vmla_vec3f_neon and ne10_vmla_vec3f_asm.
671 * @param[out] dst Pointer to the destination array
672 * @param[in] src1 Pointer to the first source array
673 * @param[in] src2 Pointer to the second source array
674 * @param[in] count The number of items in the input arrays
675 */
676 extern ne10_result_t (*ne10_vmla_vec3f) (ne10_vec3f_t * dst, ne10_vec3f_t * acc, ne10_vec3f_t * src1, ne10_vec3f_t * src2, ne10_uint32_t count);
677 extern ne10_result_t ne10_vmla_vec3f_c (ne10_vec3f_t * dst, ne10_vec3f_t * acc, ne10_vec3f_t * src1, ne10_vec3f_t * src2, ne10_uint32_t count);
678 extern ne10_result_t ne10_vmla_vec3f_neon (ne10_vec3f_t * dst, ne10_vec3f_t * acc, ne10_vec3f_t * src1, ne10_vec3f_t * src2, ne10_uint32_t count) asm ("ne10_vmla_vec3f_neon");
679 extern ne10_result_t ne10_vmla_vec3f_asm (ne10_vec3f_t * dst, ne10_vec3f_t * acc, ne10_vec3f_t * src1, ne10_vec3f_t * src2, ne10_uint32_t count);
680 /**
681 * Performs a multiply and accumulate operation on the components of a 4D vector with the corresponding components of another.
682 * This function point could be pointed to one of ne10_vmla_vec4f_c, ne10_vmla_vec4f_neon and ne10_vmla_vec4f_asm.
683 * @param[out] dst Pointer to the destination array
684 * @param[in] src1 Pointer to the first source array
685 * @param[in] src2 Pointer to the second source array
686 * @param[in] count The number of items in the input arrays
687 */
688 extern ne10_result_t (*ne10_vmla_vec4f) (ne10_vec4f_t * dst, ne10_vec4f_t * acc, ne10_vec4f_t * src1, ne10_vec4f_t * src2, ne10_uint32_t count);
689 extern ne10_result_t ne10_vmla_vec4f_c (ne10_vec4f_t * dst, ne10_vec4f_t * acc, ne10_vec4f_t * src1, ne10_vec4f_t * src2, ne10_uint32_t count);
690 extern ne10_result_t ne10_vmla_vec4f_neon (ne10_vec4f_t * dst, ne10_vec4f_t * acc, ne10_vec4f_t * src1, ne10_vec4f_t * src2, ne10_uint32_t count) asm ("ne10_vmla_vec4f_neon");
691 extern ne10_result_t ne10_vmla_vec4f_asm (ne10_vec4f_t * dst, ne10_vec4f_t * acc, ne10_vec4f_t * src1, ne10_vec4f_t * src2, ne10_uint32_t count);
692 /** @} */ //end of Vector Multiply-Accumulator group
693
694 /**
695 * @ingroup groupMaths
696 */
697
698 /**
699 * @defgroup MUL_MAT Matrix Multiply
700 *
701 * \par
702 * These functions implement the matrix multiply operation for float data type.
703 */
704
705 /**
706 * @addtogroup MUL_MAT
707 * @{
708 */
709
710 /**
711 * Matrix multiplication of two 4x4 matrixs.
712 * This function point could be pointed to one of ne10_mulmat_4x4f_c, ne10_mulmat_4x4f_neon and ne10_mulmat_4x4f_asm.
713 * @param[out] dst Pointer to the destination array
714 * @param[in] src1 Pointer to the first source array
715 * @param[in] src2 Pointer to the second source array
716 * @param[in] count The number of items in the input arrays
717 */
718 extern ne10_result_t (*ne10_mulmat_4x4f) (ne10_mat4x4f_t * dst, ne10_mat4x4f_t * src1, ne10_mat4x4f_t * src2, ne10_uint32_t count);
719 extern ne10_result_t ne10_mulmat_4x4f_c (ne10_mat4x4f_t * dst, ne10_mat4x4f_t * src1, ne10_mat4x4f_t * src2, ne10_uint32_t count);
720 extern ne10_result_t ne10_mulmat_4x4f_neon (ne10_mat4x4f_t * dst, ne10_mat4x4f_t * src1, ne10_mat4x4f_t * src2, ne10_uint32_t count) asm ("ne10_mulmat_4x4f_neon");
721 extern ne10_result_t ne10_mulmat_4x4f_asm (ne10_mat4x4f_t * dst, ne10_mat4x4f_t * src1, ne10_mat4x4f_t * src2, ne10_uint32_t count);
722
723 /**
724 * Matrix multiplication of two 3x3 matrixs.
725 * This function point could be pointed to one of ne10_mulmat_3x3f_c, ne10_mulmat_3x3f_neon and ne10_mulmat_3x3f_asm.
726 * @param[out] dst Pointer to the destination array
727 * @param[in] src1 Pointer to the first source array
728 * @param[in] src2 Pointer to the second source array
729 * @param[in] count The number of items in the input arrays
730 */
731 extern ne10_result_t (*ne10_mulmat_3x3f) (ne10_mat3x3f_t * dst, ne10_mat3x3f_t * src1, ne10_mat3x3f_t * src2, ne10_uint32_t count);
732 extern ne10_result_t ne10_mulmat_3x3f_c (ne10_mat3x3f_t * dst, ne10_mat3x3f_t * src1, ne10_mat3x3f_t * src2, ne10_uint32_t count);
733 extern ne10_result_t ne10_mulmat_3x3f_neon (ne10_mat3x3f_t * dst, ne10_mat3x3f_t * src1, ne10_mat3x3f_t * src2, ne10_uint32_t count) asm ("ne10_mulmat_3x3f_neon");
734 extern ne10_result_t ne10_mulmat_3x3f_asm (ne10_mat3x3f_t * dst, ne10_mat3x3f_t * src1, ne10_mat3x3f_t * src2, ne10_uint32_t count);
735
736 /**
737 * Matrix multiplication of two 2x2 matrixs.
738 * This function point could be pointed to one of ne10_mulmat_2x2f_c, ne10_mulmat_2x2f_neon and ne10_mulmat_2x2f_asm.
739 * @param[out] dst Pointer to the destination array
740 * @param[in] src1 Pointer to the first source array
741 * @param[in] src2 Pointer to the second source array
742 * @param[in] count The number of items in the input arrays
743 */
744 extern ne10_result_t (*ne10_mulmat_2x2f) (ne10_mat2x2f_t * dst, ne10_mat2x2f_t * src1, ne10_mat2x2f_t * src2, ne10_uint32_t count);
745 extern ne10_result_t ne10_mulmat_2x2f_c (ne10_mat2x2f_t * dst, ne10_mat2x2f_t * src1, ne10_mat2x2f_t * src2, ne10_uint32_t count);
746 extern ne10_result_t ne10_mulmat_2x2f_neon (ne10_mat2x2f_t * dst, ne10_mat2x2f_t * src1, ne10_mat2x2f_t * src2, ne10_uint32_t count) asm ("ne10_mulmat_2x2f_neon");
747 extern ne10_result_t ne10_mulmat_2x2f_asm (ne10_mat2x2f_t * dst, ne10_mat2x2f_t * src1, ne10_mat2x2f_t * src2, ne10_uint32_t count);
748 /** @} */ //end of Matrix Multiply group
749
750 /**
751 * @ingroup groupMaths
752 */
753
754 /**
755 * @defgroup MUL_MAT_VEC Matrix Vector Multiply
756 *
757 * \par
758 * These functions implement the matrix vector multiply operation for float data type.
759 */
760
761 /**
762 * @addtogroup MUL_MAT_VEC
763 * @{
764 */
765 /**
766 * Matrix multiplication of 4x4 matrix and 4D vector.
767 * This function point could be pointed to one of ne10_mulcmatvec_cm4x4f_v4f_c, ne10_mulcmatvec_cm4x4f_v4f_neon and ne10_mulcmatvec_cm4x4f_v4f_asm.
768 * @param[out] dst Pointer to the destination array
769 * @param[in] cst Pointer to the matrix to multiply the input values with
770 * @param[in] src Pointer to the source array
771 * @param[in] count The number of items in the input arrays
772 */
773 extern ne10_result_t (*ne10_mulcmatvec_cm4x4f_v4f) (ne10_vec4f_t * dst, const ne10_mat4x4f_t * cst, ne10_vec4f_t * src, ne10_uint32_t count);
774 extern ne10_result_t ne10_mulcmatvec_cm4x4f_v4f_c (ne10_vec4f_t * dst, const ne10_mat4x4f_t * cst, ne10_vec4f_t * src, ne10_uint32_t count);
775 extern ne10_result_t ne10_mulcmatvec_cm4x4f_v4f_neon (ne10_vec4f_t * dst, const ne10_mat4x4f_t * cst, ne10_vec4f_t * src, ne10_uint32_t count) asm ("ne10_mulcmatvec_cm4x4f_v4f_neon");
776 extern ne10_result_t ne10_mulcmatvec_cm4x4f_v4f_asm (ne10_vec4f_t * dst, const ne10_mat4x4f_t * cst, ne10_vec4f_t * src, ne10_uint32_t count);
777 /**
778 * Matrix multiplication of 3x3 matrix and 3D vector.
779 * This function point could be pointed to one of ne10_mulcmatvec_cm3x3f_v3f_c, ne10_mulcmatvec_cm3x3f_v3f_neon and ne10_mulcmatvec_cm3x3f_v3f_asm.
780 * @param[out] dst Pointer to the destination array
781 * @param[in] cst Pointer to the matrix to multiply the input values with
782 * @param[in] src Pointer to the source array
783 * @param[in] count The number of items in the input arrays
784 */
785 extern ne10_result_t (*ne10_mulcmatvec_cm3x3f_v3f) (ne10_vec3f_t * dst, const ne10_mat3x3f_t * cst, ne10_vec3f_t * src, ne10_uint32_t count);
786 extern ne10_result_t ne10_mulcmatvec_cm3x3f_v3f_c (ne10_vec3f_t * dst, const ne10_mat3x3f_t * cst, ne10_vec3f_t * src, ne10_uint32_t count);
787 extern ne10_result_t ne10_mulcmatvec_cm3x3f_v3f_neon (ne10_vec3f_t * dst, const ne10_mat3x3f_t * cst, ne10_vec3f_t * src, ne10_uint32_t count) asm ("ne10_mulcmatvec_cm3x3f_v3f_neon");
788 extern ne10_result_t ne10_mulcmatvec_cm3x3f_v3f_asm (ne10_vec3f_t * dst, const ne10_mat3x3f_t * cst, ne10_vec3f_t * src, ne10_uint32_t count);
789 /**
790 * Matrix multiplication of 2x2 matrix and 2D vector.
791 * This function point could be pointed to one of ne10_mulcmatvec_cm2x2f_v2f_c, ne10_mulcmatvec_cm2x2f_v2f_neon and ne10_mulcmatvec_cm2x2f_v2f_asm.
792 * @param[out] dst Pointer to the destination array
793 * @param[in] cst Pointer to the matrix to multiply the input values with
794 * @param[in] src Pointer to the source array
795 * @param[in] count The number of items in the input arrays
796 */
797 extern ne10_result_t (*ne10_mulcmatvec_cm2x2f_v2f) (ne10_vec2f_t * dst, const ne10_mat2x2f_t * cst, ne10_vec2f_t * src, ne10_uint32_t count);
798 extern ne10_result_t ne10_mulcmatvec_cm2x2f_v2f_c (ne10_vec2f_t * dst, const ne10_mat2x2f_t * cst, ne10_vec2f_t * src, ne10_uint32_t count);
799 extern ne10_result_t ne10_mulcmatvec_cm2x2f_v2f_neon (ne10_vec2f_t * dst, const ne10_mat2x2f_t * cst, ne10_vec2f_t * src, ne10_uint32_t count) asm ("ne10_mulcmatvec_cm2x2f_v2f_neon");
800 extern ne10_result_t ne10_mulcmatvec_cm2x2f_v2f_asm (ne10_vec2f_t * dst, const ne10_mat2x2f_t * cst, ne10_vec2f_t * src, ne10_uint32_t count);
801
802 /** @} */ //end of Matrix Vector Multiply group
803
804 /**
805 * @ingroup groupMaths
806 */
807
808 /**
809 * @defgroup DIV_VEC Vector Div
810 *
811 * \par
812 * These functions implement the vector division operation for float data type.
813 */
814
815 /**
816 * @addtogroup DIV_VEC
817 * @{
818 */
819
820 /**
821 * Divides the elements of an input array by a constant scalar and stores the results in an output array.
822 * This function point could be pointed to one of ne10_divc_float_c, ne10_divc_float_neon and ne10_divc_float_asm.
823 * @param[out] dst Pointer to the destination array
824 * @param[in] src Pointer to the source array
825 * @param[in] cst The constant scalar to divide the input values by
826 * @param[in] count The number of items in the input array
827 */
828 extern ne10_result_t (*ne10_divc_float) (ne10_float32_t * dst, ne10_float32_t * src, const ne10_float32_t cst, ne10_uint32_t count);
829 extern ne10_result_t ne10_divc_float_c (ne10_float32_t * dst, ne10_float32_t * src, const ne10_float32_t cst, ne10_uint32_t count);
830 extern ne10_result_t ne10_divc_float_neon (ne10_float32_t * dst, ne10_float32_t * src, const ne10_float32_t cst, ne10_uint32_t count);
831 extern ne10_result_t ne10_divc_float_asm (ne10_float32_t * dst, ne10_float32_t * src, const ne10_float32_t cst, ne10_uint32_t count);
832 /**
833 * Divides the components of 2D vectors in an input array with the components of a constant 2D vector and stores the results in an output array.
834 * This function point could be pointed to one of ne10_divc_vec2f_c, ne10_divc_vec2f_neon and ne10_divc_vec2f_asm.
835 * @param[out] dst Pointer to the destination array
836 * @param[in] src Pointer to the source array
837 * @param[in] cst Pointer to the 2D vector to divide the input values by
838 * @param[in] count The number of items in the input array
839 */
840 extern ne10_result_t (*ne10_divc_vec2f) (ne10_vec2f_t * dst, ne10_vec2f_t * src, const ne10_vec2f_t * cst, ne10_uint32_t count);
841 extern ne10_result_t ne10_divc_vec2f_c (ne10_vec2f_t * dst, ne10_vec2f_t * src, const ne10_vec2f_t * cst, ne10_uint32_t count);
842 extern ne10_result_t ne10_divc_vec2f_neon (ne10_vec2f_t * dst, ne10_vec2f_t * src, const ne10_vec2f_t * cst, ne10_uint32_t count);
843 extern ne10_result_t ne10_divc_vec2f_asm (ne10_vec2f_t * dst, ne10_vec2f_t * src, const ne10_vec2f_t * cst, ne10_uint32_t count);
844 /**
845 * Divides the components of 3D vectors in an input array with the components of a constant 3D vector and stores the results in an output array.
846 * This function point could be pointed to one of ne10_divc_vec3f_c, ne10_divc_vec3f_neon and ne10_divc_vec3f_asm.
847 * @param[out] dst Pointer to the destination array
848 * @param[in] src Pointer to the source array
849 * @param[in] cst Pointer to the 3D vector to divide the input values by
850 * @param[in] count The number of items in the input array
851 */
852 extern ne10_result_t (*ne10_divc_vec3f) (ne10_vec3f_t * dst, ne10_vec3f_t * src, const ne10_vec3f_t * cst, ne10_uint32_t count);
853 extern ne10_result_t ne10_divc_vec3f_c (ne10_vec3f_t * dst, ne10_vec3f_t * src, const ne10_vec3f_t * cst, ne10_uint32_t count);
854 extern ne10_result_t ne10_divc_vec3f_neon (ne10_vec3f_t * dst, ne10_vec3f_t * src, const ne10_vec3f_t * cst, ne10_uint32_t count);
855 extern ne10_result_t ne10_divc_vec3f_asm (ne10_vec3f_t * dst, ne10_vec3f_t * src, const ne10_vec3f_t * cst, ne10_uint32_t count);
856 /**
857 * Divides the components of 4D vectors in an input array with the components of a constant 4D vector and stores the results in an output array.
858 * This function point could be pointed to one of ne10_divc_vec4f_c, ne10_divc_vec4f_neon and ne10_divc_vec4f_asm.
859 * @param[out] dst Pointer to the destination array
860 * @param[in] src Pointer to the source array
861 * @param[in] cst Pointer to the 4D vector to divide the input values by
862 * @param[in] count The number of items in the input array
863 */
864 extern ne10_result_t (*ne10_divc_vec4f) (ne10_vec4f_t * dst, ne10_vec4f_t * src, const ne10_vec4f_t * cst, ne10_uint32_t count);
865 extern ne10_result_t ne10_divc_vec4f_c (ne10_vec4f_t * dst, ne10_vec4f_t * src, const ne10_vec4f_t * cst, ne10_uint32_t count);
866 extern ne10_result_t ne10_divc_vec4f_neon (ne10_vec4f_t * dst, ne10_vec4f_t * src, const ne10_vec4f_t * cst, ne10_uint32_t count);
867 extern ne10_result_t ne10_divc_vec4f_asm (ne10_vec4f_t * dst, ne10_vec4f_t * src, const ne10_vec4f_t * cst, ne10_uint32_t count);
868 /**
869 * Divides the elements of src1 by the elements of src2 and stores the results in the dst.
870 * This function point could be pointed to one of ne10_div_float_c, ne10_div_float_neon and ne10_div_float_asm.
871 * @param[out] dst Pointer to the destination array
872 * @param[in] src1 The first array to use as the input array
873 * @param[in] src2 The second array to use as the input array
874 * @param[in] count The number of items in the two input arrays
875 */
876 extern ne10_result_t (*ne10_div_float) (ne10_float32_t * dst, ne10_float32_t * src1, ne10_float32_t * src2, ne10_uint32_t count);
877 extern ne10_result_t ne10_div_float_c (ne10_float32_t * dst, ne10_float32_t * src1, ne10_float32_t * src2, ne10_uint32_t count);
878 extern ne10_result_t ne10_div_float_neon (ne10_float32_t * dst, ne10_float32_t * src1, ne10_float32_t * src2, ne10_uint32_t count) asm ("ne10_div_float_neon");
879 extern ne10_result_t ne10_div_float_asm (ne10_float32_t * dst, ne10_float32_t * src1, ne10_float32_t * src2, ne10_uint32_t count);
880 /**
881 * Divides the components of a 2D vector with the corresponding components of another.
882 * This function point could be pointed to one of ne10_vdiv_vec2f_c, ne10_vdiv_vec2f_neon and ne10_vdiv_vec2f_asm.
883 * @param[out] dst Pointer to the destination array
884 * @param[in] src1 Pointer to the nominators' source array
885 * @param[in] src2 Pointer to the denominators' source array
886 * @param[in] count The number of items in the input arrays
887 */
888 extern ne10_result_t (*ne10_vdiv_vec2f) (ne10_vec2f_t * dst, ne10_vec2f_t * src1, ne10_vec2f_t * src2, ne10_uint32_t count);
889 extern ne10_result_t ne10_vdiv_vec2f_c (ne10_vec2f_t * dst, ne10_vec2f_t * src1, ne10_vec2f_t * src2, ne10_uint32_t count);
890 extern ne10_result_t ne10_vdiv_vec2f_neon (ne10_vec2f_t * dst, ne10_vec2f_t * src1, ne10_vec2f_t * src2, ne10_uint32_t count) asm ("ne10_vdiv_vec2f_neon");
891 extern ne10_result_t ne10_vdiv_vec2f_asm (ne10_vec2f_t * dst, ne10_vec2f_t * src1, ne10_vec2f_t * src2, ne10_uint32_t count);
892 /**
893 * Divides the components of a 3D vector with the corresponding components of another.
894 * This function point could be pointed to one of ne10_vdiv_vec3f_c, ne10_vdiv_vec3f_neon and ne10_vdiv_vec3f_asm.
895 * @param[out] dst Pointer to the destination array
896 * @param[in] src1 Pointer to the nominators' source array
897 * @param[in] src2 Pointer to the denominators' source array
898 * @param[in] count The number of items in the input arrays
899 */
900 extern ne10_result_t (*ne10_vdiv_vec3f) (ne10_vec3f_t * dst, ne10_vec3f_t * src1, ne10_vec3f_t * src2, ne10_uint32_t count);
901 extern ne10_result_t ne10_vdiv_vec3f_c (ne10_vec3f_t * dst, ne10_vec3f_t * src1, ne10_vec3f_t * src2, ne10_uint32_t count);
902 extern ne10_result_t ne10_vdiv_vec3f_neon (ne10_vec3f_t * dst, ne10_vec3f_t * src1, ne10_vec3f_t * src2, ne10_uint32_t count) asm ("ne10_vdiv_vec3f_neon");
903 extern ne10_result_t ne10_vdiv_vec3f_asm (ne10_vec3f_t * dst, ne10_vec3f_t * src1, ne10_vec3f_t * src2, ne10_uint32_t count);
904 /**
905 * Divides the components of a 4D vector with the corresponding components of another.
906 * This function point could be pointed to one of ne10_vdiv_vec4f_c, ne10_vdiv_vec4f_neon and ne10_vdiv_vec4f_asm.
907 * @param[out] dst Pointer to the destination array
908 * @param[in] src1 Pointer to the nominators' source array
909 * @param[in] src2 Pointer to the denominators' source array
910 * @param[in] count The number of items in the input arrays
911 */
912 extern ne10_result_t (*ne10_vdiv_vec4f) (ne10_vec4f_t * dst, ne10_vec4f_t * src1, ne10_vec4f_t * src2, ne10_uint32_t count);
913 extern ne10_result_t ne10_vdiv_vec4f_c (ne10_vec4f_t * dst, ne10_vec4f_t * src1, ne10_vec4f_t * src2, ne10_uint32_t count);
914 extern ne10_result_t ne10_vdiv_vec4f_neon (ne10_vec4f_t * dst, ne10_vec4f_t * src1, ne10_vec4f_t * src2, ne10_uint32_t count) asm ("ne10_vdiv_vec4f_neon");
915 extern ne10_result_t ne10_vdiv_vec4f_asm (ne10_vec4f_t * dst, ne10_vec4f_t * src1, ne10_vec4f_t * src2, ne10_uint32_t count);
916 /** @} */ //end of Vector Div group
917
918 /**
919 * @ingroup groupMaths
920 */
921
922 /**
923 * @defgroup DIV_MAT Matrix Div
924 *
925 * \par
926 * These functions implement the matrix division operation for float data type.
927 */
928
929 /**
930 * @addtogroup DIV_MAT
931 * @{
932 */
933
934 /**
935 * Divides the components of a 4x4 matrix with the corresponding components of another.
936 * This function point could be pointed to one of ne10_divmat_4x4f_c, ne10_divmat_4x4f_neon and ne10_divmat_4x4f_asm.
937 * @param[out] dst Pointer to the destination array
938 * @param[in] src1 Pointer to the nominators' source array
939 * @param[in] src2 Pointer to the denominators' source array
940 * @param[in] count The number of items in the input arrays
941 */
942 extern ne10_result_t (*ne10_divmat_4x4f) (ne10_mat4x4f_t * dst, ne10_mat4x4f_t * src1, ne10_mat4x4f_t * src2, ne10_uint32_t count);
943 extern ne10_result_t ne10_divmat_4x4f_c (ne10_mat4x4f_t * dst, ne10_mat4x4f_t * src1, ne10_mat4x4f_t * src2, ne10_uint32_t count);
944 extern ne10_result_t ne10_divmat_4x4f_neon (ne10_mat4x4f_t * dst, ne10_mat4x4f_t * src1, ne10_mat4x4f_t * src2, ne10_uint32_t count) asm ("ne10_divmat_4x4f_neon");
945 extern ne10_result_t ne10_divmat_4x4f_asm (ne10_mat4x4f_t * dst, ne10_mat4x4f_t * src1, ne10_mat4x4f_t * src2, ne10_uint32_t count);
946 /**
947 * Divides the components of a 3x3 matrix with the corresponding components of another.
948 * This function point could be pointed to one of ne10_divmat_3x3f_c, ne10_divmat_3x3f_neon and ne10_divmat_3x3f_asm.
949 * @param[out] dst Pointer to the destination array
950 * @param[in] src1 Pointer to the nominators' source array
951 * @param[in] src2 Pointer to the denominators' source array
952 * @param[in] count The number of items in the input arrays
953 */
954 extern ne10_result_t (*ne10_divmat_3x3f) (ne10_mat3x3f_t * dst, ne10_mat3x3f_t * src1, ne10_mat3x3f_t * src2, ne10_uint32_t count);
955 extern ne10_result_t ne10_divmat_3x3f_c (ne10_mat3x3f_t * dst, ne10_mat3x3f_t * src1, ne10_mat3x3f_t * src2, ne10_uint32_t count);
956 extern ne10_result_t ne10_divmat_3x3f_neon (ne10_mat3x3f_t * dst, ne10_mat3x3f_t * src1, ne10_mat3x3f_t * src2, ne10_uint32_t count) asm ("ne10_divmat_3x3f_neon");
957 extern ne10_result_t ne10_divmat_3x3f_asm (ne10_mat3x3f_t * dst, ne10_mat3x3f_t * src1, ne10_mat3x3f_t * src2, ne10_uint32_t count);
958 /**
959 * Divides the components of a 2x2 matrix with the corresponding components of another.
960 * This function point could be pointed to one of ne10_divmat_2x2f_c, ne10_divmat_2x2f_neon and ne10_divmat_2x2f_asm.
961 * @param[out] dst Pointer to the destination array
962 * @param[in] src1 Pointer to the nominators' source array
963 * @param[in] src2 Pointer to the denominators' source array
964 * @param[in] count The number of items in the input arrays
965 */
966 extern ne10_result_t (*ne10_divmat_2x2f) (ne10_mat2x2f_t * dst, ne10_mat2x2f_t * src1, ne10_mat2x2f_t * src2, ne10_uint32_t count);
967 extern ne10_result_t ne10_divmat_2x2f_c (ne10_mat2x2f_t * dst, ne10_mat2x2f_t * src1, ne10_mat2x2f_t * src2, ne10_uint32_t count);
968 extern ne10_result_t ne10_divmat_2x2f_neon (ne10_mat2x2f_t * dst, ne10_mat2x2f_t * src1, ne10_mat2x2f_t * src2, ne10_uint32_t count) asm ("ne10_divmat_2x2f_neon");
969 extern ne10_result_t ne10_divmat_2x2f_asm (ne10_mat2x2f_t * dst, ne10_mat2x2f_t * src1, ne10_mat2x2f_t * src2, ne10_uint32_t count);
970 /** @} */ //end of Matrix Div group
971
972 /**
973 * @ingroup groupMaths
974 */
975
976 /**
977 * @defgroup SETC_VEC Vector Setc
978 *
979 * \par
980 * These functions implement vector setc operation for float data type.
981 */
982
983 /**
984 * @addtogroup SETC_VEC
985 * @{
986 */
987
988 /**
989 * Sets the elements of an input array to a constant scalar and stores the results in an output array.
990 * This function point could be pointed to one of ne10_setc_float_c, ne10_setc_float_neon and ne10_setc_float_asm.
991 * @param[out] dst Pointer to the destination array
992 * @param[in] cst The constant scalar to set the input values to
993 * @param[in] count The number of items in the input array
994 */
995 extern ne10_result_t (*ne10_setc_float) (ne10_float32_t * dst, const ne10_float32_t cst, ne10_uint32_t count);
996 extern ne10_result_t ne10_setc_float_c (ne10_float32_t * dst, const ne10_float32_t cst, ne10_uint32_t count);
997 extern ne10_result_t ne10_setc_float_neon (ne10_float32_t * dst, const ne10_float32_t cst, ne10_uint32_t count);
998 extern ne10_result_t ne10_setc_float_asm (ne10_float32_t * dst, const ne10_float32_t cst, ne10_uint32_t count);
999 /**
1000 * Sets the components of 2D vectors in an input array to the components of a constant 2D vector and stores the results in an output array.
1001 * This function point could be pointed to one of ne10_setc_vec2f_c, ne10_setc_vec2f_neon and ne10_setc_vec2f_asm.
1002 * @param[out] dst Pointer to the destination array
1003 * @param[in] cst Pointer to the 2D vector to set the input values to
1004 * @param[in] count The number of items in the input array
1005 */
1006 extern ne10_result_t (*ne10_setc_vec2f) (ne10_vec2f_t * dst, const ne10_vec2f_t * cst, ne10_uint32_t count);
1007 extern ne10_result_t ne10_setc_vec2f_c (ne10_vec2f_t * dst, const ne10_vec2f_t * cst, ne10_uint32_t count);
1008 extern ne10_result_t ne10_setc_vec2f_neon (ne10_vec2f_t * dst, const ne10_vec2f_t * cst, ne10_uint32_t count);
1009 extern ne10_result_t ne10_setc_vec2f_asm (ne10_vec2f_t * dst, const ne10_vec2f_t * cst, ne10_uint32_t count);
1010 /**
1011 * Sets the components of 3D vectors in an input array to the components of a constant 3D vector and stores the results in an output array.
1012 * This function point could be pointed to one of ne10_setc_vec3f_c, ne10_setc_vec3f_neon and ne10_setc_vec3f_asm.
1013 * @param[out] dst Pointer to the destination array
1014 * @param[in] cst Pointer to the 3D vector to set the input values to
1015 * @param[in] count The number of items in the input array
1016 */
1017 extern ne10_result_t (*ne10_setc_vec3f) (ne10_vec3f_t * dst, const ne10_vec3f_t * cst, ne10_uint32_t count);
1018 extern ne10_result_t ne10_setc_vec3f_c (ne10_vec3f_t * dst, const ne10_vec3f_t * cst, ne10_uint32_t count);
1019 extern ne10_result_t ne10_setc_vec3f_neon (ne10_vec3f_t * dst, const ne10_vec3f_t * cst, ne10_uint32_t count);
1020 extern ne10_result_t ne10_setc_vec3f_asm (ne10_vec3f_t * dst, const ne10_vec3f_t * cst, ne10_uint32_t count);
1021 /**
1022 * Sets the components of 4D vectors in an input array to the components of a constant 3D vector and stores the results in an output array.
1023 * This function point could be pointed to one of ne10_setc_vec4f_c, ne10_setc_vec4f_neon and ne10_setc_vec4f_asm.
1024 * @param[out] dst Pointer to the destination array
1025 * @param[in] cst Pointer to the 4D vector to set the input values to
1026 * @param[in] count The number of items in the input array
1027 */
1028 extern ne10_result_t (*ne10_setc_vec4f) (ne10_vec4f_t * dst, const ne10_vec4f_t * cst, ne10_uint32_t count);
1029 extern ne10_result_t ne10_setc_vec4f_c (ne10_vec4f_t * dst, const ne10_vec4f_t * cst, ne10_uint32_t count);
1030 extern ne10_result_t ne10_setc_vec4f_neon (ne10_vec4f_t * dst, const ne10_vec4f_t * cst, ne10_uint32_t count);
1031 extern ne10_result_t ne10_setc_vec4f_asm (ne10_vec4f_t * dst, const ne10_vec4f_t * cst, ne10_uint32_t count);
1032 /** @} */ //end of Vector Setc group
1033
1034 /**
1035 * @ingroup groupMaths
1036 */
1037
1038 /**
1039 * @defgroup LEN_VEC Vector Len
1040 *
1041 * \par
1042 * These functions implement vector len operation for float data type.
1043 */
1044
1045 /**
1046 * @addtogroup LEN_VEC
1047 * @{
1048 */
1049 /**
1050 * Returns length of 2D vectors in corresponding elements of the output array.
1051 * This function point could be pointed to one of ne10_len_vec2f_c, ne10_len_vec2f_neon and ne10_len_vec2f_asm.
1052 * @param[out] dst Pointer to the destination array
1053 * @param[in] src Pointer to the source array
1054 * @param[in] count The number of items in the input array
1055 */
1056 extern ne10_result_t (*ne10_len_vec2f) (ne10_float32_t * dst, ne10_vec2f_t * src, ne10_uint32_t count);
1057 extern ne10_result_t ne10_len_vec2f_c (ne10_float32_t * dst, ne10_vec2f_t * src, ne10_uint32_t count);
1058 extern ne10_result_t ne10_len_vec2f_neon (ne10_float32_t * dst, ne10_vec2f_t * src, ne10_uint32_t count) asm ("ne10_len_vec2f_neon");
1059 extern ne10_result_t ne10_len_vec2f_asm (ne10_float32_t * dst, ne10_vec2f_t * src, ne10_uint32_t count);
1060 /**
1061 * Returns length of 3D vectors in corresponding elements of the output array.
1062 * This function point could be pointed to one of ne10_len_vec3f_c, ne10_len_vec3f_neon and ne10_len_vec3f_asm.
1063 * @param[out] dst Pointer to the destination array
1064 * @param[in] src Pointer to the source array
1065 * @param[in] count The number of items in the input array
1066 */
1067 extern ne10_result_t (*ne10_len_vec3f) (ne10_float32_t * dst, ne10_vec3f_t * src, ne10_uint32_t count);
1068 extern ne10_result_t ne10_len_vec3f_c (ne10_float32_t * dst, ne10_vec3f_t * src, ne10_uint32_t count);
1069 extern ne10_result_t ne10_len_vec3f_neon (ne10_float32_t * dst, ne10_vec3f_t * src, ne10_uint32_t count) asm ("ne10_len_vec3f_neon");
1070 extern ne10_result_t ne10_len_vec3f_asm (ne10_float32_t * dst, ne10_vec3f_t * src, ne10_uint32_t count);
1071 /**
1072 * Returns length of 4D vectors in corresponding elements of the output array.
1073 * This function point could be pointed to one of ne10_len_vec4f_c, ne10_len_vec4f_neon and ne10_len_vec4f_asm.
1074 * @param[out] dst Pointer to the destination array
1075 * @param[in] src Pointer to the source array
1076 * @param[in] count The number of items in the input array
1077 */
1078 extern ne10_result_t (*ne10_len_vec4f) (ne10_float32_t * dst, ne10_vec4f_t * src, ne10_uint32_t count);
1079 extern ne10_result_t ne10_len_vec4f_c (ne10_float32_t * dst, ne10_vec4f_t * src, ne10_uint32_t count);
1080 extern ne10_result_t ne10_len_vec4f_neon (ne10_float32_t * dst, ne10_vec4f_t * src, ne10_uint32_t count) asm ("ne10_len_vec4f_neon");
1081 extern ne10_result_t ne10_len_vec4f_asm (ne10_float32_t * dst, ne10_vec4f_t * src, ne10_uint32_t count);
1082 /** @} */ //end of Vector Len group
1083
1084
1085 /**
1086 * @ingroup groupMaths
1087 */
1088
1089 /**
1090 * @defgroup NORM_VEC Vector Normalize
1091 *
1092 * \par
1093 * These functions implement vector normalize operation for float data type.
1094 */
1095
1096 /**
1097 * @addtogroup NORM_VEC
1098 * @{
1099 */
1100 /**
1101 * Normalizes 2D vectors of the input array and stores them in the corresponding elements of the output array.
1102 * This function point could be pointed to one of ne10_normalize_vec2f_c, ne10_normalize_vec2f_neon and ne10_normalize_vec2f_asm.
1103 * @param[out] dst Pointer to the destination array
1104 * @param[in] src Pointer to the source array
1105 * @param[in] count The number of items in the input array
1106 */
1107 extern ne10_result_t (*ne10_normalize_vec2f) (ne10_vec2f_t * dst, ne10_vec2f_t * src, ne10_uint32_t count);
1108 extern ne10_result_t ne10_normalize_vec2f_c (ne10_vec2f_t * dst, ne10_vec2f_t * src, ne10_uint32_t count);
1109 extern ne10_result_t ne10_normalize_vec2f_neon (ne10_vec2f_t * dst, ne10_vec2f_t * src, ne10_uint32_t count) asm ("ne10_normalize_vec2f_neon");
1110 extern ne10_result_t ne10_normalize_vec2f_asm (ne10_vec2f_t * dst, ne10_vec2f_t * src, ne10_uint32_t count);
1111 /**
1112 * Normalizes 3D vectors of the input array and stores them in the corresponding elements of the output array.
1113 * This function point could be pointed to one of ne10_normalize_vec3f_c, ne10_normalize_vec3f_neon and ne10_normalize_vec3f_asm.
1114 * @param[out] dst Pointer to the destination array
1115 * @param[in] src Pointer to the source array
1116 * @param[in] count The number of items in the input array
1117 */
1118 extern ne10_result_t (*ne10_normalize_vec3f) (ne10_vec3f_t * dst, ne10_vec3f_t * src, ne10_uint32_t count);
1119 extern ne10_result_t ne10_normalize_vec3f_c (ne10_vec3f_t * dst, ne10_vec3f_t * src, ne10_uint32_t count);
1120 extern ne10_result_t ne10_normalize_vec3f_neon (ne10_vec3f_t * dst, ne10_vec3f_t * src, ne10_uint32_t count) asm ("ne10_normalize_vec3f_neon");
1121 extern ne10_result_t ne10_normalize_vec3f_asm (ne10_vec3f_t * dst, ne10_vec3f_t * src, ne10_uint32_t count);
1122 /**
1123 * Normalizes 4D vectors of the input array and stores them in the corresponding elements of the output array.
1124 * This function point could be pointed to one of ne10_normalize_vec4f_c, ne10_normalize_vec4f_neon and ne10_normalize_vec4f_asm.
1125 * @param[out] dst Pointer to the destination array
1126 * @param[in] src Pointer to the source array
1127 * @param[in] count The number of items in the input array
1128 */
1129 extern ne10_result_t (*ne10_normalize_vec4f) (ne10_vec4f_t * dst, ne10_vec4f_t * src, ne10_uint32_t count);
1130 extern ne10_result_t ne10_normalize_vec4f_c (ne10_vec4f_t * dst, ne10_vec4f_t * src, ne10_uint32_t count);
1131 extern ne10_result_t ne10_normalize_vec4f_neon (ne10_vec4f_t * dst, ne10_vec4f_t * src, ne10_uint32_t count) asm ("ne10_normalize_vec4f_neon");
1132 extern ne10_result_t ne10_normalize_vec4f_asm (ne10_vec4f_t * dst, ne10_vec4f_t * src, ne10_uint32_t count);
1133 /** @} */ //end of Vector Normalize group
1134
1135
1136 /**
1137 * @ingroup groupMaths
1138 */
1139
1140 /**
1141 * @defgroup ABS_VEC Vector Abs
1142 *
1143 * \par
1144 * These functions implement vector abs operation for float data type.
1145 */
1146
1147 /**
1148 * @addtogroup ABS_VEC
1149 * @{
1150 */
1151
1152 /**
1153 * Calculates the absolute value of each element in the source array and stores the result in the corresponding entry of the destination array.
1154 * This function point could be pointed to one of ne10_abs_float_c, ne10_abs_float_neon and ne10_abs_float_asm.
1155 * @param[out] dst Pointer to the destination array
1156 * @param[in] src Pointer to the source array
1157 * @param[in] count The number of items in the input array
1158 */
1159 extern ne10_result_t (*ne10_abs_float) (ne10_float32_t * dst, ne10_float32_t * src, ne10_uint32_t count);
1160 extern ne10_result_t ne10_abs_float_c (ne10_float32_t * dst, ne10_float32_t * src, ne10_uint32_t count);
1161 extern ne10_result_t ne10_abs_float_neon (ne10_float32_t * dst, ne10_float32_t * src, ne10_uint32_t count) asm ("ne10_abs_float_neon");
1162 extern ne10_result_t ne10_abs_float_asm (ne10_float32_t * dst, ne10_float32_t * src, ne10_uint32_t count);
1163 /**
1164 * Generates a 2D vector from the absolute values of each of the components of an input vector.
1165 * This function point could be pointed to one of ne10_abs_vec2f_c, ne10_abs_vec2f_neon and ne10_abs_vec2f_asm.
1166 * @param[out] dst Pointer to the destination array
1167 * @param[in] src Pointer to the source array
1168 * @param[in] count The number of items in the input array
1169 */
1170 extern ne10_result_t (*ne10_abs_vec2f) (ne10_vec2f_t * dst, ne10_vec2f_t * src, ne10_uint32_t count);
1171 extern ne10_result_t ne10_abs_vec2f_c (ne10_vec2f_t * dst, ne10_vec2f_t * src, ne10_uint32_t count);
1172 extern ne10_result_t ne10_abs_vec2f_neon (ne10_vec2f_t * dst, ne10_vec2f_t * src, ne10_uint32_t count) asm ("ne10_abs_vec2f_neon");
1173 extern ne10_result_t ne10_abs_vec2f_asm (ne10_vec2f_t * dst, ne10_vec2f_t * src, ne10_uint32_t count);
1174 /**
1175 * Generates a 3D vector from the absolute values of each of the components of an input vector.
1176 * This function point could be pointed to one of ne10_abs_vec3f_c, ne10_abs_vec3f_neon and ne10_abs_vec3f_asm.
1177 * @param[out] dst Pointer to the destination array
1178 * @param[in] src Pointer to the source array
1179 * @param[in] count The number of items in the input array
1180 */
1181 extern ne10_result_t (*ne10_abs_vec3f) (ne10_vec3f_t * dst, ne10_vec3f_t * src, ne10_uint32_t count);
1182 extern ne10_result_t ne10_abs_vec3f_c (ne10_vec3f_t * dst, ne10_vec3f_t * src, ne10_uint32_t count);
1183 extern ne10_result_t ne10_abs_vec3f_neon (ne10_vec3f_t * dst, ne10_vec3f_t * src, ne10_uint32_t count) asm ("ne10_abs_vec3f_neon");
1184 extern ne10_result_t ne10_abs_vec3f_asm (ne10_vec3f_t * dst, ne10_vec3f_t * src, ne10_uint32_t count);
1185 /**
1186 * Generates a 4D vector from the absolute values of each of the components of an input vector.
1187 * This function point could be pointed to one of ne10_abs_vec4f_c, ne10_abs_vec4f_neon and ne10_abs_vec4f_asm.
1188 * @param[out] dst Pointer to the destination array
1189 * @param[in] src Pointer to the source array
1190 * @param[in] count The number of items in the input array
1191 */
1192 extern ne10_result_t (*ne10_abs_vec4f) (ne10_vec4f_t * dst, ne10_vec4f_t * src, ne10_uint32_t count);
1193 extern ne10_result_t ne10_abs_vec4f_c (ne10_vec4f_t * dst, ne10_vec4f_t * src, ne10_uint32_t count);
1194 extern ne10_result_t ne10_abs_vec4f_neon (ne10_vec4f_t * dst, ne10_vec4f_t * src, ne10_uint32_t count) asm ("ne10_abs_vec4f_neon");
1195 extern ne10_result_t ne10_abs_vec4f_asm (ne10_vec4f_t * dst, ne10_vec4f_t * src, ne10_uint32_t count);
1196 /** @} */ //end of Vector Abs group
1197
1198 /**
1199 * @ingroup groupMaths
1200 */
1201
1202 /**
1203 * @defgroup DOT_VEC Vector Dot
1204 *
1205 * \par
1206 * These functions implement vector dot operation for float data type.
1207 */
1208
1209 /**
1210 * @addtogroup DOT_VEC
1211 * @{
1212 */
1213 /**
1214 * Dot product of two 2D vectors.
1215 * This function point could be pointed to one of ne10_dot_vec2f_c, ne10_dot_vec2f_neon and ne10_dot_vec2f_asm.
1216 * @param[out] dst Pointer to the destination array
1217 * @param[in] src1 Pointer to the first source array
1218 * @param[in] src2 Pointer to the second source array
1219 * @param[in] count The number of items in the input arrays
1220 */
1221 extern ne10_result_t (*ne10_dot_vec2f) (ne10_float32_t * dst, ne10_vec2f_t * src1, ne10_vec2f_t * src2, ne10_uint32_t count);
1222 extern ne10_result_t ne10_dot_vec2f_c (ne10_float32_t * dst, ne10_vec2f_t * src1, ne10_vec2f_t * src2, ne10_uint32_t count);
1223 extern ne10_result_t ne10_dot_vec2f_neon (ne10_float32_t * dst, ne10_vec2f_t * src1, ne10_vec2f_t * src2, ne10_uint32_t count) asm ("ne10_dot_vec2f_neon");
1224 extern ne10_result_t ne10_dot_vec2f_asm (ne10_float32_t * dst, ne10_vec2f_t * src1, ne10_vec2f_t * src2, ne10_uint32_t count);
1225 /**
1226 * Dot product of two 3D vectors.
1227 * This function point could be pointed to one of ne10_dot_vec3f_c, ne10_dot_vec3f_neon and ne10_dot_vec3f_asm.
1228 * @param[out] dst Pointer to the destination array
1229 * @param[in] src1 Pointer to the first source array
1230 * @param[in] src2 Pointer to the second source array
1231 * @param[in] count The number of items in the input arrays
1232 */
1233 extern ne10_result_t (*ne10_dot_vec3f) (ne10_float32_t * dst, ne10_vec3f_t * src1, ne10_vec3f_t * src2, ne10_uint32_t count);
1234 extern ne10_result_t ne10_dot_vec3f_c (ne10_float32_t * dst, ne10_vec3f_t * src1, ne10_vec3f_t * src2, ne10_uint32_t count);
1235 extern ne10_result_t ne10_dot_vec3f_neon (ne10_float32_t * dst, ne10_vec3f_t * src1, ne10_vec3f_t * src2, ne10_uint32_t count) asm ("ne10_dot_vec3f_neon");
1236 extern ne10_result_t ne10_dot_vec3f_asm (ne10_float32_t * dst, ne10_vec3f_t * src1, ne10_vec3f_t * src2, ne10_uint32_t count);
1237 /**
1238 * Dot product of two 4D vectors.
1239 * This function point could be pointed to one of ne10_dot_vec4f_c, ne10_dot_vec4f_neon and ne10_dot_vec4f_asm.
1240 * @param[out] dst Pointer to the destination array
1241 * @param[in] src1 Pointer to the first source array
1242 * @param[in] src2 Pointer to the second source array
1243 * @param[in] count The number of items in the input arrays
1244 */
1245 extern ne10_result_t (*ne10_dot_vec4f) (ne10_float32_t * dst, ne10_vec4f_t * src1, ne10_vec4f_t * src2, ne10_uint32_t count);
1246 extern ne10_result_t ne10_dot_vec4f_c (ne10_float32_t * dst, ne10_vec4f_t * src1, ne10_vec4f_t * src2, ne10_uint32_t count);
1247 extern ne10_result_t ne10_dot_vec4f_neon (ne10_float32_t * dst, ne10_vec4f_t * src1, ne10_vec4f_t * src2, ne10_uint32_t count) asm ("ne10_dot_vec4f_neon");
1248 extern ne10_result_t ne10_dot_vec4f_asm (ne10_float32_t * dst, ne10_vec4f_t * src1, ne10_vec4f_t * src2, ne10_uint32_t count);
1249 /** @} */ //end of Vector Dot group
1250
1251
1252 /**
1253 * @ingroup groupMaths
1254 */
1255
1256 /**
1257 * @defgroup CROSS_VEC Vector Cross
1258 *
1259 * \par
1260 * These functions implement vector cross operation for float data type.
1261 */
1262
1263 /**
1264 * @addtogroup CROSS_VEC
1265 * @{
1266 */
1267
1268 /**
1269 * Performs a cross product operation on the two input vectors.
1270 * This function point could be pointed to one of ne10_cross_vec3f_c, ne10_cross_vec3f_neon and ne10_cross_vec3f_asm.
1271 * @param[out] dst Pointer to the destination array
1272 * @param[in] src1 Pointer to the first source array
1273 * @param[in] src2 Pointer to the second source array
1274 * @param[in] count The number of items in the input arrays
1275 */
1276 extern ne10_result_t (*ne10_cross_vec3f) (ne10_vec3f_t * dst, ne10_vec3f_t * src1, ne10_vec3f_t * src2, ne10_uint32_t count);
1277 extern ne10_result_t ne10_cross_vec3f_c (ne10_vec3f_t * dst, ne10_vec3f_t * src1, ne10_vec3f_t * src2, ne10_uint32_t count);
1278 extern ne10_result_t ne10_cross_vec3f_neon (ne10_vec3f_t * dst, ne10_vec3f_t * src1, ne10_vec3f_t * src2, ne10_uint32_t count) asm ("ne10_cross_vec3f_neon");
1279 extern ne10_result_t ne10_cross_vec3f_asm (ne10_vec3f_t * dst, ne10_vec3f_t * src1, ne10_vec3f_t * src2, ne10_uint32_t count);
1280 /** @} */ //end of Vector Cross group
1281
1282 /**
1283 * @ingroup groupMaths
1284 */
1285
1286 /**
1287 * @defgroup DET_MAT Matrix Determinant
1288 *
1289 * \par
1290 * These functions implement matrix determinant operation for float data type.
1291 */
1292
1293 /**
1294 * @addtogroup DET_MAT
1295 * @{
1296 */
1297
1298 /**
1299 * Calculate the determinant of a 4x4 matrix.
1300 * This function point could be pointed to one of ne10_detmat_4x4f_c, ne10_detmat_4x4f_neon and ne10_detmat_4x4f_asm.
1301 * @param[out] dst Pointer to the destination array
1302 * @param[in] src Pointer to the source array
1303 * @param[in] count The number of items in the input array
1304 */
1305 extern ne10_result_t (*ne10_detmat_4x4f) (ne10_float32_t * dst, ne10_mat4x4f_t * src, ne10_uint32_t count);
1306 extern ne10_result_t ne10_detmat_4x4f_c (ne10_float32_t * dst, ne10_mat4x4f_t * src, ne10_uint32_t count);
1307 extern ne10_result_t ne10_detmat_4x4f_neon (ne10_float32_t * dst, ne10_mat4x4f_t * src, ne10_uint32_t count) asm ("ne10_detmat_4x4f_neon");
1308 extern ne10_result_t ne10_detmat_4x4f_asm (ne10_float32_t * dst, ne10_mat4x4f_t * src, ne10_uint32_t count);
1309 /**
1310 * Calculate the determinant of a 3x3 matrix.
1311 * This function point could be pointed to one of ne10_detmat_3x3f_c, ne10_detmat_3x3f_neon and ne10_detmat_3x3f_asm.
1312 * @param[out] dst Pointer to the destination array
1313 * @param[in] src Pointer to the source array
1314 * @param[in] count The number of items in the input array
1315 */
1316 extern ne10_result_t (*ne10_detmat_3x3f) (ne10_float32_t * dst, ne10_mat3x3f_t * src, ne10_uint32_t count);
1317 extern ne10_result_t ne10_detmat_3x3f_c (ne10_float32_t * dst, ne10_mat3x3f_t * src, ne10_uint32_t count);
1318 extern ne10_result_t ne10_detmat_3x3f_neon (ne10_float32_t * dst, ne10_mat3x3f_t * src, ne10_uint32_t count) asm ("ne10_detmat_3x3f_neon");
1319 extern ne10_result_t ne10_detmat_3x3f_asm (ne10_float32_t * dst, ne10_mat3x3f_t * src, ne10_uint32_t count);
1320 /**
1321 * Calculate the determinant of a 2x2 matrix.
1322 * This function point could be pointed to one of ne10_detmat_2x2f_c, ne10_detmat_2x2f_neon and ne10_detmat_2x2f_asm.
1323 * @param[out] dst Pointer to the destination array
1324 * @param[in] src Pointer to the source array
1325 * @param[in] count The number of items in the input array
1326 */
1327 extern ne10_result_t (*ne10_detmat_2x2f) (ne10_float32_t * dst, ne10_mat2x2f_t * src, ne10_uint32_t count);
1328 extern ne10_result_t ne10_detmat_2x2f_c (ne10_float32_t * dst, ne10_mat2x2f_t * src, ne10_uint32_t count);
1329 extern ne10_result_t ne10_detmat_2x2f_neon (ne10_float32_t * dst, ne10_mat2x2f_t * src, ne10_uint32_t count) asm ("ne10_detmat_2x2f_neon");
1330 extern ne10_result_t ne10_detmat_2x2f_asm (ne10_float32_t * dst, ne10_mat2x2f_t * src, ne10_uint32_t count);
1331 /** @} */ //end of Matrix Determinant group
1332
1333 /**
1334 * @ingroup groupMaths
1335 */
1336
1337 /**
1338 * @defgroup INV_MAT Matrix Invertible
1339 *
1340 * \par
1341 * These functions implement matrix invertible operation for float data type.
1342 */
1343
1344 /**
1345 * @addtogroup INV_MAT
1346 * @{
1347 */
1348 /**
1349 * Calculate the invertible matrix of a 4x4 matrix.
1350 * This function point could be pointed to one of ne10_invmat_4x4f_c, ne10_invmat_4x4f_neon and ne10_invmat_4x4f_asm.
1351 * @param[out] dst Pointer to the destination array
1352 * @param[in] src Pointer to the source array
1353 * @param[in] count The number of items in the input array
1354 */
1355 extern ne10_result_t (*ne10_invmat_4x4f) (ne10_mat4x4f_t * dst, ne10_mat4x4f_t * src, ne10_uint32_t count);
1356 extern ne10_result_t ne10_invmat_4x4f_c (ne10_mat4x4f_t * dst, ne10_mat4x4f_t * src, ne10_uint32_t count);
1357 extern ne10_result_t ne10_invmat_4x4f_neon (ne10_mat4x4f_t * dst, ne10_mat4x4f_t * src, ne10_uint32_t count) asm ("ne10_invmat_4x4f_neon");
1358 extern ne10_result_t ne10_invmat_4x4f_asm (ne10_mat4x4f_t * dst, ne10_mat4x4f_t * src, ne10_uint32_t count);
1359 /**
1360 * Calculate the invertible matrix of a 3x3 matrix.
1361 * This function point could be pointed to one of ne10_invmat_3x3f_c, ne10_invmat_3x3f_neon and ne10_invmat_3x3f_asm.
1362 * @param[out] dst Pointer to the destination array
1363 * @param[in] src Pointer to the source array
1364 * @param[in] count The number of items in the input array
1365 */
1366 extern ne10_result_t (*ne10_invmat_3x3f) (ne10_mat3x3f_t * dst, ne10_mat3x3f_t * src, ne10_uint32_t count);
1367 extern ne10_result_t ne10_invmat_3x3f_c (ne10_mat3x3f_t * dst, ne10_mat3x3f_t * src, ne10_uint32_t count);
1368 extern ne10_result_t ne10_invmat_3x3f_neon (ne10_mat3x3f_t * dst, ne10_mat3x3f_t * src, ne10_uint32_t count) asm ("ne10_invmat_3x3f_neon");
1369 extern ne10_result_t ne10_invmat_3x3f_asm (ne10_mat3x3f_t * dst, ne10_mat3x3f_t * src, ne10_uint32_t count);
1370 /**
1371 * Calculate the invertible matrix of a 2x2 matrix.
1372 * This function point could be pointed to one of ne10_invmat_2x2f_c, ne10_invmat_2x2f_neon and ne10_invmat_2x2f_asm.
1373 * @param[out] dst Pointer to the destination array
1374 * @param[in] src Pointer to the source array
1375 * @param[in] count The number of items in the input array
1376 */
1377 extern ne10_result_t (*ne10_invmat_2x2f) (ne10_mat2x2f_t * dst, ne10_mat2x2f_t * src, ne10_uint32_t count);
1378 extern ne10_result_t ne10_invmat_2x2f_c (ne10_mat2x2f_t * dst, ne10_mat2x2f_t * src, ne10_uint32_t count);
1379 extern ne10_result_t ne10_invmat_2x2f_neon (ne10_mat2x2f_t * dst, ne10_mat2x2f_t * src, ne10_uint32_t count) asm ("ne10_invmat_2x2f_neon");
1380 extern ne10_result_t ne10_invmat_2x2f_asm (ne10_mat2x2f_t * dst, ne10_mat2x2f_t * src, ne10_uint32_t count);
1381 /** @} */ //end of Matrix Invertible group
1382
1383 /**
1384 * @ingroup groupMaths
1385 */
1386
1387 /**
1388 * @defgroup TRANS_MAT Matrix Transpose
1389 *
1390 * \par
1391 * These functions implement matrix transpose operation for float data type.
1392 */
1393
1394 /**
1395 * @addtogroup TRANS_MAT
1396 * @{
1397 */
1398 /**
1399 * Calculate the transpose matrix of a 4x4 matrix.
1400 * This function point could be pointed to one of ne10_transmat_4x4f_c, ne10_transmat_4x4f_neon and ne10_transmat_4x4f_asm.
1401 * @param[out] dst Pointer to the destination array
1402 * @param[in] src Pointer to the source array
1403 * @param[in] count The number of items in the input array
1404 */
1405 extern ne10_result_t (*ne10_transmat_4x4f) (ne10_mat4x4f_t * dst, ne10_mat4x4f_t * src, ne10_uint32_t count);
1406 extern ne10_result_t ne10_transmat_4x4f_c (ne10_mat4x4f_t * dst, ne10_mat4x4f_t * src, ne10_uint32_t count);
1407 extern ne10_result_t ne10_transmat_4x4f_neon (ne10_mat4x4f_t * dst, ne10_mat4x4f_t * src, ne10_uint32_t count) asm ("ne10_transmat_4x4f_neon");
1408 extern ne10_result_t ne10_transmat_4x4f_asm (ne10_mat4x4f_t * dst, ne10_mat4x4f_t * src, ne10_uint32_t count);
1409 /**
1410 * Calculate the transpose matrix of a 4x4 matrix.
1411 * This function point could be pointed to one of ne10_transmat_4x4f_c, ne10_transmat_4x4f_neon and ne10_transmat_4x4f_asm.
1412 * @param[out] dst Pointer to the destination array
1413 * @param[in] src Pointer to the source array
1414 * @param[in] count The number of items in the input array
1415 */
1416 extern ne10_result_t (*ne10_transmat_3x3f) (ne10_mat3x3f_t * dst, ne10_mat3x3f_t * src, ne10_uint32_t count);
1417 extern ne10_result_t ne10_transmat_3x3f_c (ne10_mat3x3f_t * dst, ne10_mat3x3f_t * src, ne10_uint32_t count);
1418 extern ne10_result_t ne10_transmat_3x3f_neon (ne10_mat3x3f_t * dst, ne10_mat3x3f_t * src, ne10_uint32_t count) asm ("ne10_transmat_3x3f_neon");
1419 extern ne10_result_t ne10_transmat_3x3f_asm (ne10_mat3x3f_t * dst, ne10_mat3x3f_t * src, ne10_uint32_t count);
1420 /**
1421 * Calculate the transpose matrix of a 3x3 matrix.
1422 * This function point could be pointed to one of ne10_transmat_3x3f_c, ne10_transmat_3x3f_neon and ne10_transmat_3x3f_asm.
1423 * @param[out] dst Pointer to the destination array
1424 * @param[in] src Pointer to the source array
1425 * @param[in] count The number of items in the input array
1426 */
1427 extern ne10_result_t (*ne10_transmat_2x2f) (ne10_mat2x2f_t * dst, ne10_mat2x2f_t * src, ne10_uint32_t count);
1428 extern ne10_result_t ne10_transmat_2x2f_c (ne10_mat2x2f_t * dst, ne10_mat2x2f_t * src, ne10_uint32_t count);
1429 extern ne10_result_t ne10_transmat_2x2f_neon (ne10_mat2x2f_t * dst, ne10_mat2x2f_t * src, ne10_uint32_t count) asm ("ne10_transmat_2x2f_neon");
1430 extern ne10_result_t ne10_trans_mat2x2f_asm (ne10_mat2x2f_t * dst, ne10_mat2x2f_t * src, ne10_uint32_t count);
1431 /** @} */ //end of Matrix Transpose group
1432
1433 /**
1434 * @ingroup groupMaths
1435 */
1436
1437 /**
1438 * @defgroup IDENTITY_MAT Matrix Identity
1439 *
1440 * \par
1441 * These functions implement matrix identity operation for float data type.
1442 */
1443
1444 /**
1445 * @addtogroup IDENTITY_MAT
1446 * @{
1447 */
1448 /**
1449 * Set the identity matrix of a 2x2 matrix.
1450 * This function point could be pointed to one of ne10_identitymat_2x2f_c, ne10_identitymat_2x2f_neon and ne10_identitymat_2x2f_asm.
1451 * @param[out] dst Pointer to the destination array
1452 * @param[in] count The number of items in the input array
1453 */
1454 extern ne10_result_t (*ne10_identitymat_4x4f) (ne10_mat4x4f_t * dst, ne10_uint32_t count);
1455 extern ne10_result_t ne10_identitymat_4x4f_c (ne10_mat4x4f_t * dst, ne10_uint32_t count);
1456 extern ne10_result_t ne10_identitymat_4x4f_neon (ne10_mat4x4f_t * dst, ne10_uint32_t count) asm ("ne10_identitymat_4x4f_neon");
1457 extern ne10_result_t ne10_identitymat_4x4f_asm (ne10_mat4x4f_t * dst, ne10_uint32_t count);
1458 /**
1459 * Set the identity matrix of a 3x3 matrix.
1460 * This function point could be pointed to one of ne10_identitymat_3x3f_c, ne10_identitymat_3x3f_neon and ne10_identitymat_3x3f_asm.
1461 * @param[out] dst Pointer to the destination array
1462 * @param[in] count The number of items in the input array
1463 */
1464 extern ne10_result_t (*ne10_identitymat_3x3f) (ne10_mat3x3f_t * dst, ne10_uint32_t count);
1465 extern ne10_result_t ne10_identitymat_3x3f_c (ne10_mat3x3f_t * dst, ne10_uint32_t count);
1466 extern ne10_result_t ne10_identitymat_3x3f_neon (ne10_mat3x3f_t * dst, ne10_uint32_t count) asm ("ne10_identitymat_3x3f_neon");
1467 extern ne10_result_t ne10_identitymat_3x3f_asm (ne10_mat3x3f_t * dst, ne10_uint32_t count);
1468 /**
1469 * Set the identity matrix of a 2x2 matrix.
1470 * This function point could be pointed to one of ne10_identitymat_2x2f_c, ne10_identitymat_2x2f_neon and ne10_identitymat_2x2f_asm.
1471 * @param[out] dst Pointer to the destination array
1472 * @param[in] count The number of items in the input array
1473 */
1474 extern ne10_result_t (*ne10_identitymat_2x2f) (ne10_mat2x2f_t * dst, ne10_uint32_t count);
1475 extern ne10_result_t ne10_identitymat_2x2f_c (ne10_mat2x2f_t * dst, ne10_uint32_t count);
1476 extern ne10_result_t ne10_identitymat_2x2f_neon (ne10_mat2x2f_t * dst, ne10_uint32_t count) asm ("ne10_identitymat_2x2f_neon");
1477 extern ne10_result_t ne10_identity_mat2x2f_asm (ne10_mat2x2f_t * dst, ne10_uint32_t count);
1478 /** @} */ //end of Matrix Identity group
1479
1480 #ifdef __cplusplus
1481 }
1482 #endif
1483
1484 #endif